lcjs.iife.js 1.2 MB

123456789101112131415
  1. var lcjs=function(t){"use strict";
  2. /*! *****************************************************************************
  3. Copyright (c) Microsoft Corporation.
  4. Permission to use, copy, modify, and/or distribute this software for any
  5. purpose with or without fee is hereby granted.
  6. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
  7. REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  8. AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
  9. INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  10. LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  11. OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  12. PERFORMANCE OF THIS SOFTWARE.
  13. ***************************************************************************** */var i=function(t,n){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])})(t,n)};function n(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function e(){this.constructor=t}i(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)}var e=function(){return(e=Object.assign||function(t){for(var i,n=1,e=arguments.length;n<e;n++)for(var r in i=arguments[n])Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r]);return t}).apply(this,arguments)};function r(t,i,n,e){return new(n||(n=Promise))((function(r,s){function o(t){try{u(e.next(t))}catch(t){s(t)}}function h(t){try{u(e.throw(t))}catch(t){s(t)}}function u(t){var i;t.done?r(t.value):(i=t.value,i instanceof n?i:new n((function(t){t(i)}))).then(o,h)}u((e=e.apply(t,i||[])).next())}))}function s(t,i){var n,e,r,s,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return s={next:h(0),throw:h(1),return:h(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function h(s){return function(h){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,e&&(r=2&s[0]?e.return:s[0]?e.throw||((r=e.return)&&r.call(e),0):e.next)&&!(r=r.call(e,s[1])).done)return r;switch(e=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,e=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(r=o.trys,(r=r.length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(6===s[0]&&o.label<r[1]){o.label=r[1],r=s;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(s);break}r[2]&&o.ops.pop(),o.trys.pop();continue}s=i.call(t,o)}catch(t){s=[6,t],e=0}finally{n=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,h])}}}function o(t){var i="function"==typeof Symbol&&Symbol.iterator,n=i&&t[i],e=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&e>=t.length&&(t=void 0),{value:t&&t[e++],done:!t}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")}function h(t,i){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var e,r,s=n.call(t),o=[];try{for(;(void 0===i||i-- >0)&&!(e=s.next()).done;)o.push(e.value)}catch(t){r={error:t}}finally{try{e&&!e.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return o}function u(t,i,n){if(n||2===arguments.length)for(var e,r=0,s=i.length;r<s;r++)!e&&r in i||(e||(e=Array.prototype.slice.call(i,0,r)),e[r]=i[r]);return t.concat(e||Array.prototype.slice.call(i))}var a=function(){function t(){this.t=!0}return t.prototype.o=function(){return this.t},t}(),f=function(t){function i(i,n){var e=t.call(this)||this;return e.u=i,e.t=n,e}return n(i,t),i.prototype.l=function(t){return t!==this.u&&(this.u=t,this.t=!0),this},i.prototype.S=function(){return this.u},i.prototype.o=function(){return t.prototype.o.call(this)},i}(a),c=function(){function t(t,i){this.M=!1,this.F=t,this.T=i}return t.prototype.C=function(t){return this.F="function"==typeof t?t(this.F):t,this.M||(this.T=void 0),this},t.prototype.L=function(){return this.F},t.prototype.I=function(t){if("function"==typeof t){var i=this.O();this.T=t(i),this.M=!0}else this.T=t,this.M=void 0!==t;return this},t.prototype.P=function(){return this.M?this.T:void 0},t.prototype.O=function(){return this.T=this.T||this.F.getDefaultHighlightStyle(),this.T},t.prototype.D=function(t){return t?this.O():this.L()},t}(),l=function(t,i){return{x:t,y:i}},d=function(t,i){return{x:t,y:i}},v=function(t,i,n){return{position:t,high:i,low:n}},y=function(t,i,n){return{x:t,y:i,z:n}},S=function(t,i,n){return{x:t,y:i,z:n}},m=function(t){var i=Array(0),n=Array(0);return t.length>0&&t.forEach((function(t){i.push(l(t.position,t.high)),n.push(l(t.position,t.low))})),[i,n]},b=function(t,i){return{min:t,max:i}},g=function(t,i,n,e){return{x:Math.ceil(t),y:Math.ceil(i),width:Math.ceil(n),height:Math.ceil(e)}},w=function(t,i){return void 0===i&&(i=!0),new f(t,i)},p=function(t,i,n,e){return void 0===t&&(t=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===e&&(e=0),{left:t,top:i,right:n,bottom:e}},k=p,x=function(t,i){return{left:void 0!==i.left?i.left:t.left,top:void 0!==i.top?i.top:t.top,right:void 0!==i.right?i.right:t.right,bottom:void 0!==i.bottom?i.bottom:t.bottom}};function M(t){return(M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var A=32,F=31,T={};function C(t){t&&(t.value=!0)}function B(){}function L(t){return void 0===t.size&&(t.size=t._(O)),t.size}function I(t,i){if("number"!=typeof i){var n=i>>>0;if(""+n!==i||4294967295===n)return NaN;i=n}return i<0?L(t)+i:i}function O(){return!0}function P(t,i,n){return(0===t&&!z(t)||void 0!==n&&t<=-n)&&(void 0===i||void 0!==n&&i>=n)}function D(t,i){return R(t,i,0)}function _(t,i){return R(t,i,i)}function R(t,i,n){return void 0===t?n:z(t)?i===1/0?i:0|Math.max(0,i+t):void 0===i||i===t?t:0|Math.min(i,t)}function z(t){return t<0||0===t&&1/t==-1/0}var E="@@__IMMUTABLE_ITERABLE__@@";function N(t){return Boolean(t&&t[E])}var V="@@__IMMUTABLE_KEYED__@@";function G(t){return Boolean(t&&t[V])}var H="@@__IMMUTABLE_INDEXED__@@";function j(t){return Boolean(t&&t[H])}function W(t){return G(t)||j(t)}var U=function(t){return N(t)?t:vt(t)},Y=function(t){function i(t){return G(t)?t:yt(t)}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i}(U),X=function(t){function i(t){return j(t)?t:St(t)}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i}(U),Z=function(t){function i(t){return N(t)&&!W(t)?t:mt(t)}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i}(U);U.Keyed=Y,U.Indexed=X,U.Set=Z;var K="@@__IMMUTABLE_SEQ__@@";function q(t){return Boolean(t&&t[K])}var J="@@__IMMUTABLE_RECORD__@@";function Q(t){return Boolean(t&&t[J])}function $(t){return N(t)||Q(t)}var tt="@@__IMMUTABLE_ORDERED__@@";function it(t){return Boolean(t&&t[tt])}var nt="function"==typeof Symbol&&Symbol.iterator,et="@@iterator",rt=nt||et,st=function(t){this.next=t};function ot(t,i,n,e){var r=0===t?i:1===t?n:[i,n];return e?e.value=r:e={value:r,done:!1},e}function ht(){return{value:void 0,done:!0}}function ut(t){return!!ct(t)}function at(t){return t&&"function"==typeof t.next}function ft(t){var i=ct(t);return i&&i.call(t)}function ct(t){var i=t&&(nt&&t[nt]||t["@@iterator"]);if("function"==typeof i)return i}st.prototype.toString=function(){return"[Iterator]"},st.KEYS=0,st.VALUES=1,st.ENTRIES=2,st.prototype.inspect=st.prototype.toSource=function(){return this.toString()},st.prototype[rt]=function(){return this};var lt=Object.prototype.hasOwnProperty;function dt(t){return!(!Array.isArray(t)&&"string"!=typeof t)||t&&"object"===M(t)&&Number.isInteger(t.length)&&t.length>=0&&(0===t.length?1===Object.keys(t).length:t.hasOwnProperty(t.length-1))}var vt=function(t){function i(t){return null==t?kt():$(t)?t.toSeq():function(t){var i=At(t);if(i)return i;if("object"===M(t))return new gt(t);throw new TypeError("Expected Array or collection object of values, or keyed object: "+t)}(t)}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.toSeq=function(){return this},i.prototype.toString=function(){return this.R("Seq {","}")},i.prototype.cacheResult=function(){return!this.N&&this.V&&(this.N=this.entrySeq().toArray(),this.size=this.N.length),this},i.prototype._=function(t,i){var n=this.N;if(n){for(var e=n.length,r=0;r!==e;){var s=n[i?e-++r:r++];if(!1===t(s[1],s[0],this))break}return r}return this.V(t,i)},i.prototype.G=function(t,i){var n=this.N;if(n){var e=n.length,r=0;return new st((function(){if(r===e)return{value:void 0,done:!0};var s=n[i?e-++r:r++];return ot(t,s[0],s[1])}))}return this.H(t,i)},i}(U),yt=function(t){function i(t){return null==t?kt().toKeyedSeq():N(t)?G(t)?t.toSeq():t.fromEntrySeq():Q(t)?t.toSeq():xt(t)}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.toKeyedSeq=function(){return this},i}(vt),St=function(t){function i(t){return null==t?kt():N(t)?G(t)?t.entrySeq():t.toIndexedSeq():Q(t)?t.toSeq().entrySeq():Mt(t)}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.of=function(){return i(arguments)},i.prototype.toIndexedSeq=function(){return this},i.prototype.toString=function(){return this.R("Seq [","]")},i}(vt),mt=function(t){function i(t){return(N(t)&&!W(t)?t:St(t)).toSetSeq()}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.of=function(){return i(arguments)},i.prototype.toSetSeq=function(){return this},i}(vt);vt.isSeq=q,vt.Keyed=yt,vt.Set=mt,vt.Indexed=St,vt.prototype[K]=!0;var bt=function(t){function i(t){this.j=t,this.size=t.length}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.get=function(t,i){return this.has(t)?this.j[I(this,t)]:i},i.prototype._=function(t,i){for(var n=this.j,e=n.length,r=0;r!==e;){var s=i?e-++r:r++;if(!1===t(n[s],s,this))break}return r},i.prototype.G=function(t,i){var n=this.j,e=n.length,r=0;return new st((function(){if(r===e)return{value:void 0,done:!0};var s=i?e-++r:r++;return ot(t,s,n[s])}))},i}(St),gt=function(t){function i(t){var i=Object.keys(t);this.W=t,this.U=i,this.size=i.length}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.get=function(t,i){return void 0===i||this.has(t)?this.W[t]:i},i.prototype.has=function(t){return lt.call(this.W,t)},i.prototype._=function(t,i){for(var n=this.W,e=this.U,r=e.length,s=0;s!==r;){var o=e[i?r-++s:s++];if(!1===t(n[o],o,this))break}return s},i.prototype.G=function(t,i){var n=this.W,e=this.U,r=e.length,s=0;return new st((function(){if(s===r)return{value:void 0,done:!0};var o=e[i?r-++s:s++];return ot(t,o,n[o])}))},i}(yt);gt.prototype[tt]=!0;var wt,pt=function(t){function i(t){this.Y=t,this.size=t.length||t.size}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.V=function(t,i){if(i)return this.cacheResult()._(t,i);var n=ft(this.Y),e=0;if(at(n))for(var r;!(r=n.next()).done&&!1!==t(r.value,e++,this););return e},i.prototype.H=function(t,i){if(i)return this.cacheResult().G(t,i);var n=ft(this.Y);if(!at(n))return new st(ht);var e=0;return new st((function(){var i=n.next();return i.done?i:ot(t,e++,i.value)}))},i}(St);function kt(){return wt||(wt=new bt([]))}function xt(t){var i=Array.isArray(t)?new bt(t):ut(t)?new pt(t):void 0;if(i)return i.fromEntrySeq();if("object"===M(t))return new gt(t);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+t)}function Mt(t){var i=At(t);if(i)return i;throw new TypeError("Expected Array or collection object of values: "+t)}function At(t){return dt(t)?new bt(t):ut(t)?new pt(t):void 0}var Ft="@@__IMMUTABLE_MAP__@@";function Tt(t){return Boolean(t&&t[Ft])}function Ct(t){return Tt(t)&&it(t)}function Bt(t){return Boolean(t&&"function"==typeof t.equals&&"function"==typeof t.hashCode)}function Lt(t,i){if(t===i||t!=t&&i!=i)return!0;if(!t||!i)return!1;if("function"==typeof t.valueOf&&"function"==typeof i.valueOf){if((t=t.valueOf())===(i=i.valueOf())||t!=t&&i!=i)return!0;if(!t||!i)return!1}return!!(Bt(t)&&Bt(i)&&t.equals(i))}var It="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,i){var n=65535&(t|=0),e=65535&(i|=0);return n*e+((t>>>16)*e+n*(i>>>16)<<16>>>0)|0};function Ot(t){return t>>>1&1073741824|3221225471&t}var Pt=Object.prototype.valueOf;function Dt(t){switch(M(t)){case"boolean":return t?1108378657:1108378656;case"number":return function(t){if(t!=t||t===1/0)return 0;var i=0|t;i!==t&&(i^=4294967295*t);for(;t>4294967295;)i^=t/=4294967295;return Ot(i)}(t);case"string":return t.length>Ht?function(t){var i=Ut[t];void 0===i&&(i=_t(t),Wt===jt&&(Wt=0,Ut={}),Wt++,Ut[t]=i);return i}(t):_t(t);case"object":case"function":return null===t?1108378658:"function"==typeof t.hashCode?Ot(t.hashCode(t)):(t.valueOf!==Pt&&"function"==typeof t.valueOf&&(t=t.valueOf(t)),function(t){var i;if(Nt&&void 0!==(i=Et.get(t)))return i;if(void 0!==(i=t[Gt]))return i;if(!zt){if(void 0!==(i=t.propertyIsEnumerable&&t.propertyIsEnumerable[Gt]))return i;if(void 0!==(i=function(t){if(t&&t.nodeType>0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}(t)))return i}i=++Vt,1073741824&Vt&&(Vt=0);if(Nt)Et.set(t,i);else{if(void 0!==Rt&&!1===Rt(t))throw new Error("Non-extensible objects are not allowed as keys.");if(zt)Object.defineProperty(t,Gt,{enumerable:!1,configurable:!1,writable:!1,value:i});else if(void 0!==t.propertyIsEnumerable&&t.propertyIsEnumerable===t.constructor.prototype.propertyIsEnumerable)t.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},t.propertyIsEnumerable[Gt]=i;else{if(void 0===t.nodeType)throw new Error("Unable to set a non-enumerable property on object.");t[Gt]=i}}return i}(t));case"undefined":return 1108378659;default:if("function"==typeof t.toString)return _t(t.toString());throw new Error("Value type "+M(t)+" cannot be hashed.")}}function _t(t){for(var i=0,n=0;n<t.length;n++)i=31*i+t.charCodeAt(n)|0;return Ot(i)}var Rt=Object.isExtensible,zt=function(){try{return Object.defineProperty({},"@",{}),!0}catch(t){return!1}}();var Et,Nt="function"==typeof WeakMap;Nt&&(Et=new WeakMap);var Vt=0,Gt="__immutablehash__";"function"==typeof Symbol&&(Gt=Symbol(Gt));var Ht=16,jt=255,Wt=0,Ut={},Yt=function(t){function i(t,i){this.X=t,this.Z=i,this.size=t.size}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.get=function(t,i){return this.X.get(t,i)},i.prototype.has=function(t){return this.X.has(t)},i.prototype.valueSeq=function(){return this.X.valueSeq()},i.prototype.reverse=function(){var t=this,i=Qt(this,!0);return this.Z||(i.valueSeq=function(){return t.X.toSeq().reverse()}),i},i.prototype.map=function(t,i){var n=this,e=Jt(this,t,i);return this.Z||(e.valueSeq=function(){return n.X.toSeq().map(t,i)}),e},i.prototype._=function(t,i){var n=this;return this.X._((function(i,e){return t(i,e,n)}),i)},i.prototype.G=function(t,i){return this.X.G(t,i)},i}(yt);Yt.prototype[tt]=!0;var Xt=function(t){function i(t){this.X=t,this.size=t.size}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.includes=function(t){return this.X.includes(t)},i.prototype._=function(t,i){var n=this,e=0;return i&&L(this),this.X._((function(r){return t(r,i?n.size-++e:e++,n)}),i)},i.prototype.G=function(t,i){var n=this,e=this.X.G(1,i),r=0;return i&&L(this),new st((function(){var s=e.next();return s.done?s:ot(t,i?n.size-++r:r++,s.value,s)}))},i}(St),Zt=function(t){function i(t){this.X=t,this.size=t.size}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.has=function(t){return this.X.includes(t)},i.prototype._=function(t,i){var n=this;return this.X._((function(i){return t(i,i,n)}),i)},i.prototype.G=function(t,i){var n=this.X.G(1,i);return new st((function(){var i=n.next();return i.done?i:ot(t,i.value,i.value,i)}))},i}(mt),Kt=function(t){function i(t){this.X=t,this.size=t.size}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.entrySeq=function(){return this.X.toSeq()},i.prototype._=function(t,i){var n=this;return this.X._((function(i){if(i){ai(i);var e=N(i);return t(e?i.get(1):i[1],e?i.get(0):i[0],n)}}),i)},i.prototype.G=function(t,i){var n=this.X.G(1,i);return new st((function(){for(;;){var i=n.next();if(i.done)return i;var e=i.value;if(e){ai(e);var r=N(e);return ot(t,r?e.get(0):e[0],r?e.get(1):e[1],i)}}}))},i}(yt);function qt(t){var i=ci(t);return i.X=t,i.size=t.size,i.flip=function(){return t},i.reverse=function(){var i=t.reverse.apply(this);return i.flip=function(){return t.reverse()},i},i.has=function(i){return t.includes(i)},i.includes=function(i){return t.has(i)},i.cacheResult=li,i.V=function(i,n){var e=this;return t._((function(t,n){return!1!==i(n,t,e)}),n)},i.H=function(i,n){if(2===i){var e=t.G(i,n);return new st((function(){var t=e.next();if(!t.done){var i=t.value[0];t.value[0]=t.value[1],t.value[1]=i}return t}))}return t.G(1===i?0:1,n)},i}function Jt(t,i,n){var e=ci(t);return e.size=t.size,e.has=function(i){return t.has(i)},e.get=function(e,r){var s=t.get(e,T);return s===T?r:i.call(n,s,e,t)},e.V=function(e,r){var s=this;return t._((function(t,r,o){return!1!==e(i.call(n,t,r,o),r,s)}),r)},e.H=function(e,r){var s=t.G(2,r);return new st((function(){var r=s.next();if(r.done)return r;var o=r.value,h=o[0];return ot(e,h,i.call(n,o[1],h,t),r)}))},e}function Qt(t,i){var n=this,e=ci(t);return e.X=t,e.size=t.size,e.reverse=function(){return t},t.flip&&(e.flip=function(){var i=qt(t);return i.reverse=function(){return t.flip()},i}),e.get=function(n,e){return t.get(i?n:-1-n,e)},e.has=function(n){return t.has(i?n:-1-n)},e.includes=function(i){return t.includes(i)},e.cacheResult=li,e._=function(n,e){var r=this,s=0;return e&&L(t),t._((function(t,o){return n(t,i?o:e?r.size-++s:s++,r)}),!e)},e.G=function(e,r){var s=0;r&&L(t);var o=t.G(2,!r);return new st((function(){var t=o.next();if(t.done)return t;var h=t.value;return ot(e,i?h[0]:r?n.size-++s:s++,h[1],t)}))},e}function $t(t,i,n,e){var r=ci(t);return e&&(r.has=function(e){var r=t.get(e,T);return r!==T&&!!i.call(n,r,e,t)},r.get=function(e,r){var s=t.get(e,T);return s!==T&&i.call(n,s,e,t)?s:r}),r.V=function(r,s){var o=this,h=0;return t._((function(t,s,u){if(i.call(n,t,s,u))return h++,r(t,e?s:h-1,o)}),s),h},r.H=function(r,s){var o=t.G(2,s),h=0;return new st((function(){for(;;){var s=o.next();if(s.done)return s;var u=s.value,a=u[0],f=u[1];if(i.call(n,f,a,t))return ot(r,e?a:h++,f,s)}}))},r}function ti(t,i,n,e){var r=t.size;if(P(i,n,r))return t;var s=D(i,r),o=_(n,r);if(s!=s||o!=o)return ti(t.toSeq().cacheResult(),i,n,e);var h,u=o-s;u==u&&(h=u<0?0:u);var a=ci(t);return a.size=0===h?h:t.size&&h||void 0,!e&&q(t)&&h>=0&&(a.get=function(i,n){return(i=I(this,i))>=0&&i<h?t.get(i+s,n):n}),a.V=function(i,n){var r=this;if(0===h)return 0;if(n)return this.cacheResult()._(i,n);var o=0,u=!0,a=0;return t._((function(t,n){if(!u||!(u=o++<s))return a++,!1!==i(t,e?n:a-1,r)&&a!==h})),a},a.H=function(i,n){if(0!==h&&n)return this.cacheResult().G(i,n);if(0===h)return new st(ht);var r=t.G(i,n),o=0,u=0;return new st((function(){for(;o++<s;)r.next();if(++u>h)return{value:void 0,done:!0};var t=r.next();return e||1===i||t.done?t:ot(i,u-1,0===i?void 0:t.value[1],t)}))},a}function ii(t,i,n,e){var r=ci(t);return r.V=function(r,s){var o=this;if(s)return this.cacheResult()._(r,s);var h=!0,u=0;return t._((function(t,s,a){if(!h||!(h=i.call(n,t,s,a)))return u++,r(t,e?s:u-1,o)})),u},r.H=function(r,s){var o=this;if(s)return this.cacheResult().G(r,s);var h=t.G(2,s),u=!0,a=0;return new st((function(){var t,s,f;do{if((t=h.next()).done)return e||1===r?t:ot(r,a++,0===r?void 0:t.value[1],t);var c=t.value;s=c[0],f=c[1],u&&(u=i.call(n,f,s,o))}while(u);return 2===r?t:ot(r,s,f,t)}))},r}function ni(t,i){var n=G(t),e=[t].concat(i).map((function(t){return N(t)?n&&(t=Y(t)):t=n?xt(t):Mt(Array.isArray(t)?t:[t]),t})).filter((function(t){return 0!==t.size}));if(0===e.length)return t;if(1===e.length){var r=e[0];if(r===t||n&&G(r)||j(t)&&j(r))return r}var s=new bt(e);return n?s=s.toKeyedSeq():j(t)||(s=s.toSetSeq()),(s=s.flatten(!0)).size=e.reduce((function(t,i){if(void 0!==t){var n=i.size;if(void 0!==n)return t+n}}),0),s}function ei(t,i,n){var e=ci(t);return e.V=function(r,s){if(s)return this.cacheResult()._(r,s);var o=0,h=!1;return function t(u,a){u._((function(s,u){return(!i||a<i)&&N(s)?t(s,a+1):(o++,!1===r(s,n?u:o-1,e)&&(h=!0)),!h}),s)}(t,0),o},e.H=function(e,r){if(r)return this.cacheResult().G(e,r);var s=t.G(e,r),o=[],h=0;return new st((function(){for(;s;){var t=s.next();if(!1===t.done){var u=t.value;if(2===e&&(u=u[1]),i&&!(o.length<i)||!N(u))return n?t:ot(e,h++,u,t);o.push(s),s=u.G(e,r)}else s=o.pop()}return{value:void 0,done:!0}}))},e}function ri(t,i,n){i||(i=di);var e=G(t),r=0,s=t.toSeq().map((function(i,e){return[e,i,r++,n?n(i,e,t):i]})).valueSeq().toArray();return s.sort((function(t,n){return i(t[3],n[3])||t[2]-n[2]})).forEach(e?function(t,i){s[i].length=2}:function(t,i){s[i]=t[1]}),e?yt(s):j(t)?St(s):mt(s)}function si(t,i,n){if(i||(i=di),n){var e=t.toSeq().map((function(i,e){return[i,n(i,e,t)]})).reduce((function(t,n){return oi(i,t[1],n[1])?n:t}));return e&&e[0]}return t.reduce((function(t,n){return oi(i,t,n)?n:t}))}function oi(t,i,n){var e=t(n,i);return 0===e&&n!==i&&(null==n||n!=n)||e>0}function hi(t,i,n,e){var r=ci(t),s=new bt(n).map((function(t){return t.size}));return r.size=e?s.max():s.min(),r._=function(t,i){for(var n,e=this.G(1,i),r=0;!(n=e.next()).done&&!1!==t(n.value,r++,this););return r},r.H=function(t,r){var s=n.map((function(t){return t=U(t),ft(r?t.reverse():t)})),o=0,h=!1;return new st((function(){var n;return h||(n=s.map((function(t){return t.next()})),h=e?n.every((function(t){return t.done})):n.some((function(t){return t.done}))),h?{value:void 0,done:!0}:ot(t,o++,i.apply(null,n.map((function(t){return t.value}))))}))},r}function ui(t,i){return t===i?t:q(t)?i:t.constructor(i)}function ai(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function fi(t){return G(t)?Y:j(t)?X:Z}function ci(t){return Object.create((G(t)?yt:j(t)?St:mt).prototype)}function li(){return this.X.cacheResult?(this.X.cacheResult(),this.size=this.X.size,this):vt.prototype.cacheResult.call(this)}function di(t,i){return void 0===t&&void 0===i?0:void 0===t?1:void 0===i?-1:t>i?1:t<i?-1:0}function vi(t,i){i=i||0;for(var n=Math.max(0,t.length-i),e=new Array(n),r=0;r<n;r++)e[r]=t[r+i];return e}function yi(t,i){if(!t)throw new Error(i)}function Si(t){yi(t!==1/0,"Cannot perform this action with an infinite size.")}function mi(t){if(dt(t)&&"string"!=typeof t)return t;if(it(t))return t.toArray();throw new TypeError("Invalid keyPath: expected Ordered Collection or Array: "+t)}function bi(t){return"object"===M(t)&&($(t)||Array.isArray(t)||function(t){return t&&("function"!=typeof t.constructor||"Object"===t.constructor.name)}(t))}function gi(t){try{return"string"==typeof t?JSON.stringify(t):String(t)}catch(i){return JSON.stringify(t)}}function wi(t,i,n){return $(t)?t.get(i,n):function(t,i){return $(t)?t.has(i):bi(t)&&lt.call(t,i)}(t,i)?"function"==typeof t.get?t.get(i):t[i]:n}function pi(t){if(Array.isArray(t))return vi(t);var i={};for(var n in t)lt.call(t,n)&&(i[n]=t[n]);return i}function ki(t,i,n,e){e||(e=n,n=void 0);var r=xi($(t),t,mi(i),0,n,e);return r===T?n:r}function xi(t,i,n,e,r,s){var o=i===T;if(e===n.length){var h=o?r:i,u=s(h);return u===h?i:u}if(!o&&!bi(i))throw new TypeError("Cannot update within non-data-structure value in path ["+n.slice(0,e).map(gi)+"]: "+i);var a=n[e],f=o?T:wi(i,a,T),c=xi(f===T?t:$(f),f,n,e+1,r,s);return c===f?i:c===T?function(t,i){if(!bi(t))throw new TypeError("Cannot update non-data-structure value: "+t);if($(t)){if(!t.remove)throw new TypeError("Cannot update immutable value without .remove() method: "+t);return t.remove(i)}if(!lt.call(t,i))return t;var n=pi(t);return Array.isArray(n)?n.splice(i,1):delete n[i],n}(i,a):function(t,i,n){if(!bi(t))throw new TypeError("Cannot update non-data-structure value: "+t);if($(t)){if(!t.set)throw new TypeError("Cannot update immutable value without .set() method: "+t);return t.set(i,n)}if(lt.call(t,i)&&n===t[i])return t;var e=pi(t);return e[i]=n,e}(o?t?tn():{}:i,a,c)}function Mi(t,i){return function(t,i,n){return ki(t,i,T,(function(){return n}))}(this,t,i)}function Ai(t){return function(t,i){return ki(t,i,(function(){return T}))}(this,t)}function Fi(t,i,n,e){return ki(t,[i],n,e)}function Ti(t,i,n){return 1===arguments.length?t(this):Fi(this,t,i,n)}function Ci(t,i,n){return ki(this,t,i,n)}function Bi(){for(var t=[],i=arguments.length;i--;)t[i]=arguments[i];return Ii(this,t)}function Li(t){for(var i=[],n=arguments.length-1;n-- >0;)i[n]=arguments[n+1];if("function"!=typeof t)throw new TypeError("Invalid merger function: "+t);return Ii(this,i,t)}function Ii(t,i,n){for(var e=[],r=0;r<i.length;r++){var s=Y(i[r]);0!==s.size&&e.push(s)}return 0===e.length?t:0!==t.toSeq().size||t.K||1!==e.length?t.withMutations((function(t){for(var i=n?function(i,e){Fi(t,e,T,(function(t){return t===T?i:n(t,i,e)}))}:function(i,n){t.set(n,i)},r=0;r<e.length;r++)e[r].forEach(i)})):t.constructor(e[0])}function Oi(t,i,n){return Pi(t,i,function(t){function i(n,e,r){return bi(n)&&bi(e)?Pi(n,[e],i):t?t(n,e,r):e}return i}(n))}function Pi(t,i,n){if(!bi(t))throw new TypeError("Cannot merge into non-data-structure value: "+t);if($(t))return"function"==typeof n&&t.mergeWith?t.mergeWith.apply(t,[n].concat(i)):t.merge?t.merge.apply(t,i):t.concat.apply(t,i);for(var e=Array.isArray(t),r=t,s=e?X:Y,o=e?function(i){r===t&&(r=pi(r)),r.push(i)}:function(i,e){var s=lt.call(r,e),o=s&&n?n(r[e],i,e):i;s&&o===r[e]||(r===t&&(r=pi(r)),r[e]=o)},h=0;h<i.length;h++)s(i[h]).forEach(o);return r}function Di(){for(var t=[],i=arguments.length;i--;)t[i]=arguments[i];return Oi(this,t)}function _i(t){for(var i=[],n=arguments.length-1;n-- >0;)i[n]=arguments[n+1];return Oi(this,i,t)}function Ri(t){for(var i=[],n=arguments.length-1;n-- >0;)i[n]=arguments[n+1];return ki(this,t,tn(),(function(t){return Pi(t,i)}))}function zi(t){for(var i=[],n=arguments.length-1;n-- >0;)i[n]=arguments[n+1];return ki(this,t,tn(),(function(t){return Oi(t,i)}))}function Ei(t){var i=this.asMutable();return t(i),i.wasAltered()?i.q(this.K):this}function Ni(){return this.K?this:this.q(new B)}function Vi(){return this.q()}function Gi(){return this.J}Xt.prototype.cacheResult=Yt.prototype.cacheResult=Zt.prototype.cacheResult=Kt.prototype.cacheResult=li;var Hi=function(t){function i(i){return null==i?tn():Tt(i)&&!it(i)?i:tn().withMutations((function(n){var e=t(i);Si(e.size),e.forEach((function(t,i){return n.set(i,t)}))}))}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.of=function(){for(var t=[],i=arguments.length;i--;)t[i]=arguments[i];return tn().withMutations((function(i){for(var n=0;n<t.length;n+=2){if(n+1>=t.length)throw new Error("Missing value for key: "+t[n]);i.set(t[n],t[n+1])}}))},i.prototype.toString=function(){return this.R("Map {","}")},i.prototype.get=function(t,i){return this.$?this.$.get(0,void 0,t,i):i},i.prototype.set=function(t,i){return nn(this,t,i)},i.prototype.remove=function(t){return nn(this,t,T)},i.prototype.deleteAll=function(t){var i=U(t);return 0===i.size?this:this.withMutations((function(t){i.forEach((function(i){return t.remove(i)}))}))},i.prototype.clear=function(){return 0===this.size?this:this.K?(this.size=0,this.$=null,this.tt=void 0,this.J=!0,this):tn()},i.prototype.sort=function(t){return Tn(ri(this,t))},i.prototype.sortBy=function(t,i){return Tn(ri(this,i,t))},i.prototype.map=function(t,i){return this.withMutations((function(n){n.forEach((function(e,r){n.set(r,t.call(i,e,r,n))}))}))},i.prototype.G=function(t,i){return new qi(this,t,i)},i.prototype._=function(t,i){var n=this,e=0;return this.$&&this.$.iterate((function(i){return e++,t(i[1],i[0],n)}),i),e},i.prototype.q=function(t){return t===this.K?this:t?$i(this.size,this.$,t,this.tt):0===this.size?tn():(this.K=t,this.J=!1,this)},i}(Y);Hi.isMap=Tt;var ji=Hi.prototype;ji[Ft]=!0,ji.delete=ji.remove,ji.removeAll=ji.deleteAll,ji.setIn=Mi,ji.removeIn=ji.deleteIn=Ai,ji.update=Ti,ji.updateIn=Ci,ji.merge=ji.concat=Bi,ji.mergeWith=Li,ji.mergeDeep=Di,ji.mergeDeepWith=_i,ji.mergeIn=Ri,ji.mergeDeepIn=zi,ji.withMutations=Ei,ji.wasAltered=Gi,ji.asImmutable=Vi,ji["@@transducer/init"]=ji.asMutable=Ni,ji["@@transducer/step"]=function(t,i){return t.set(i[0],i[1])},ji["@@transducer/result"]=function(t){return t.asImmutable()};var Wi=function(t,i){this.ownerID=t,this.entries=i};Wi.prototype.get=function(t,i,n,e){for(var r=this.entries,s=0,o=r.length;s<o;s++)if(Lt(n,r[s][0]))return r[s][1];return e},Wi.prototype.update=function(t,i,n,e,r,s,o){for(var h=r===T,u=this.entries,a=0,f=u.length;a<f&&!Lt(e,u[a][0]);a++);var c=a<f;if(c?u[a][1]===r:h)return this;if(C(o),(h||!c)&&C(s),!h||1!==u.length){if(!c&&!h&&u.length>=un)return function(t,i,n,e){t||(t=new B);for(var r=new Zi(t,Dt(n),[n,e]),s=0;s<i.length;s++){var o=i[s];r=r.update(t,0,void 0,o[0],o[1])}return r}(t,u,e,r);var l=t&&t===this.ownerID,d=l?u:vi(u);return c?h?a===f-1?d.pop():d[a]=d.pop():d[a]=[e,r]:d.push([e,r]),l?(this.entries=d,this):new Wi(t,d)}};var Ui=function(t,i,n){this.ownerID=t,this.bitmap=i,this.nodes=n};Ui.prototype.get=function(t,i,n,e){void 0===i&&(i=Dt(n));var r=1<<((0===t?i:i>>>t)&F),s=this.bitmap;return 0==(s&r)?e:this.nodes[on(s&r-1)].get(t+5,i,n,e)},Ui.prototype.update=function(t,i,n,e,r,s,o){void 0===n&&(n=Dt(e));var h=(0===i?n:n>>>i)&F,u=1<<h,a=this.bitmap,f=0!=(a&u);if(!f&&r===T)return this;var c=on(a&u-1),l=this.nodes,d=f?l[c]:void 0,v=en(d,t,i+5,n,e,r,s,o);if(v===d)return this;if(!f&&v&&l.length>=an)return function(t,i,n,e,r){for(var s=0,o=new Array(A),h=0;0!==n;h++,n>>>=1)o[h]=1&n?i[s++]:void 0;return o[e]=r,new Yi(t,s+1,o)}(t,l,a,h,v);if(f&&!v&&2===l.length&&rn(l[1^c]))return l[1^c];if(f&&v&&1===l.length&&rn(v))return v;var y=t&&t===this.ownerID,S=f?v?a:a^u:a|u,m=f?v?hn(l,c,v,y):function(t,i,n){var e=t.length-1;if(n&&i===e)return t.pop(),t;for(var r=new Array(e),s=0,o=0;o<e;o++)o===i&&(s=1),r[o]=t[o+s];return r}(l,c,y):function(t,i,n,e){var r=t.length+1;if(e&&i+1===r)return t[i]=n,t;for(var s=new Array(r),o=0,h=0;h<r;h++)h===i?(s[h]=n,o=-1):s[h]=t[h+o];return s}(l,c,v,y);return y?(this.bitmap=S,this.nodes=m,this):new Ui(t,S,m)};var Yi=function(t,i,n){this.ownerID=t,this.count=i,this.nodes=n};Yi.prototype.get=function(t,i,n,e){void 0===i&&(i=Dt(n));var r=(0===t?i:i>>>t)&F,s=this.nodes[r];return s?s.get(t+5,i,n,e):e},Yi.prototype.update=function(t,i,n,e,r,s,o){void 0===n&&(n=Dt(e));var h=(0===i?n:n>>>i)&F,u=r===T,a=this.nodes,f=a[h];if(u&&!f)return this;var c=en(f,t,i+5,n,e,r,s,o);if(c===f)return this;var l=this.count;if(f){if(!c&&--l<fn)return function(t,i,n,e){for(var r=0,s=0,o=new Array(n),h=0,u=1,a=i.length;h<a;h++,u<<=1){var f=i[h];void 0!==f&&h!==e&&(r|=u,o[s++]=f)}return new Ui(t,r,o)}(t,a,l,h)}else l++;var d=t&&t===this.ownerID,v=hn(a,h,c,d);return d?(this.count=l,this.nodes=v,this):new Yi(t,l,v)};var Xi=function(t,i,n){this.ownerID=t,this.keyHash=i,this.entries=n};Xi.prototype.get=function(t,i,n,e){for(var r=this.entries,s=0,o=r.length;s<o;s++)if(Lt(n,r[s][0]))return r[s][1];return e},Xi.prototype.update=function(t,i,n,e,r,s,o){void 0===n&&(n=Dt(e));var h=r===T;if(n!==this.keyHash)return h?this:(C(o),C(s),sn(this,t,i,n,[e,r]));for(var u=this.entries,a=0,f=u.length;a<f&&!Lt(e,u[a][0]);a++);var c=a<f;if(c?u[a][1]===r:h)return this;if(C(o),(h||!c)&&C(s),h&&2===f)return new Zi(t,this.keyHash,u[1^a]);var l=t&&t===this.ownerID,d=l?u:vi(u);return c?h?a===f-1?d.pop():d[a]=d.pop():d[a]=[e,r]:d.push([e,r]),l?(this.entries=d,this):new Xi(t,this.keyHash,d)};var Zi=function(t,i,n){this.ownerID=t,this.keyHash=i,this.entry=n};Zi.prototype.get=function(t,i,n,e){return Lt(n,this.entry[0])?this.entry[1]:e},Zi.prototype.update=function(t,i,n,e,r,s,o){var h=r===T,u=Lt(e,this.entry[0]);return(u?r===this.entry[1]:h)?this:(C(o),h?void C(s):u?t&&t===this.ownerID?(this.entry[1]=r,this):new Zi(t,this.keyHash,[e,r]):(C(s),sn(this,t,i,Dt(e),[e,r])))},Wi.prototype.iterate=Xi.prototype.iterate=function(t,i){for(var n=this.entries,e=0,r=n.length-1;e<=r;e++)if(!1===t(n[i?r-e:e]))return!1},Ui.prototype.iterate=Yi.prototype.iterate=function(t,i){for(var n=this.nodes,e=0,r=n.length-1;e<=r;e++){var s=n[i?r-e:e];if(s&&!1===s.iterate(t,i))return!1}},Zi.prototype.iterate=function(t,i){return t(this.entry)};var Ki,qi=function(t){function i(t,i,n){this.it=i,this.nt=n,this.et=t.$&&Qi(t.$)}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.next=function(){for(var t=this.it,i=this.et;i;){var n=i.node,e=i.index++,r=void 0;if(n.entry){if(0===e)return Ji(t,n.entry)}else if(n.entries){if(e<=(r=n.entries.length-1))return Ji(t,n.entries[this.nt?r-e:e])}else if(e<=(r=n.nodes.length-1)){var s=n.nodes[this.nt?r-e:e];if(s){if(s.entry)return Ji(t,s.entry);i=this.et=Qi(s,i)}continue}i=this.et=this.et.rt}return{value:void 0,done:!0}},i}(st);function Ji(t,i){return ot(t,i[0],i[1])}function Qi(t,i){return{node:t,index:0,rt:i}}function $i(t,i,n,e){var r=Object.create(ji);return r.size=t,r.$=i,r.K=n,r.tt=e,r.J=!1,r}function tn(){return Ki||(Ki=$i(0))}function nn(t,i,n){var e,r;if(t.$){var s={value:!1},o={value:!1};if(e=en(t.$,t.K,0,void 0,i,n,s,o),!o.value)return t;r=t.size+(s.value?n===T?-1:1:0)}else{if(n===T)return t;r=1,e=new Wi(t.K,[[i,n]])}return t.K?(t.size=r,t.$=e,t.tt=void 0,t.J=!0,t):e?$i(r,e):tn()}function en(t,i,n,e,r,s,o,h){return t?t.update(i,n,e,r,s,o,h):s===T?t:(C(h),C(o),new Zi(i,e,[r,s]))}function rn(t){return t.constructor===Zi||t.constructor===Xi}function sn(t,i,n,e,r){if(t.keyHash===e)return new Xi(i,e,[t.entry,r]);var s,o=(0===n?t.keyHash:t.keyHash>>>n)&F,h=(0===n?e:e>>>n)&F,u=o===h?[sn(t,i,n+5,e,r)]:(s=new Zi(i,e,r),o<h?[t,s]:[s,t]);return new Ui(i,1<<o|1<<h,u)}function on(t){return t=(t=(858993459&(t-=t>>1&1431655765))+(t>>2&858993459))+(t>>4)&252645135,t+=t>>8,127&(t+=t>>16)}function hn(t,i,n,e){var r=e?t:vi(t);return r[i]=n,r}var un=8,an=16,fn=8,cn="@@__IMMUTABLE_LIST__@@";function ln(t){return Boolean(t&&t[cn])}var dn=function(t){function i(i){var n=wn();if(null==i)return n;if(ln(i))return i;var e=t(i),r=e.size;return 0===r?n:(Si(r),r>0&&r<A?gn(0,r,5,null,new yn(e.toArray())):n.withMutations((function(t){t.setSize(r),e.forEach((function(i,n){return t.set(n,i)}))})))}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.of=function(){return this(arguments)},i.prototype.toString=function(){return this.R("List [","]")},i.prototype.get=function(t,i){if((t=I(this,t))>=0&&t<this.size){var n=xn(this,t+=this.st);return n&&n.array[t&F]}return i},i.prototype.set=function(t,i){return function(t,i,n){if((i=I(t,i))!=i)return t;if(i>=t.size||i<0)return t.withMutations((function(t){i<0?Mn(t,i).set(0,n):Mn(t,0,i+1).set(i,n)}));i+=t.st;var e=t.ot,r=t.$,s={value:!1};i>=An(t.ht)?e=pn(e,t.K,0,i,n,s):r=pn(r,t.K,t.ut,i,n,s);if(!s.value)return t;if(t.K)return t.$=r,t.ot=e,t.tt=void 0,t.J=!0,t;return gn(t.st,t.ht,t.ut,r,e)}(this,t,i)},i.prototype.remove=function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},i.prototype.insert=function(t,i){return this.splice(t,0,i)},i.prototype.clear=function(){return 0===this.size?this:this.K?(this.size=this.st=this.ht=0,this.ut=5,this.$=this.ot=null,this.tt=void 0,this.J=!0,this):wn()},i.prototype.push=function(){var t=arguments,i=this.size;return this.withMutations((function(n){Mn(n,0,i+t.length);for(var e=0;e<t.length;e++)n.set(i+e,t[e])}))},i.prototype.pop=function(){return Mn(this,0,-1)},i.prototype.unshift=function(){var t=arguments;return this.withMutations((function(i){Mn(i,-t.length);for(var n=0;n<t.length;n++)i.set(n,t[n])}))},i.prototype.shift=function(){return Mn(this,1)},i.prototype.concat=function(){for(var i=arguments,n=[],e=0;e<arguments.length;e++){var r=i[e],s=t("string"!=typeof r&&ut(r)?r:[r]);0!==s.size&&n.push(s)}return 0===n.length?this:0!==this.size||this.K||1!==n.length?this.withMutations((function(t){n.forEach((function(i){return i.forEach((function(i){return t.push(i)}))}))})):this.constructor(n[0])},i.prototype.setSize=function(t){return Mn(this,0,t)},i.prototype.map=function(t,i){var n=this;return this.withMutations((function(e){for(var r=0;r<n.size;r++)e.set(r,t.call(i,e.get(r),r,e))}))},i.prototype.slice=function(t,i){var n=this.size;return P(t,i,n)?this:Mn(this,D(t,n),_(i,n))},i.prototype.G=function(t,i){var n=i?this.size:0,e=bn(this,i);return new st((function(){var r=e();return r===mn?{value:void 0,done:!0}:ot(t,i?--n:n++,r)}))},i.prototype._=function(t,i){for(var n,e=i?this.size:0,r=bn(this,i);(n=r())!==mn&&!1!==t(n,i?--e:e++,this););return e},i.prototype.q=function(t){return t===this.K?this:t?gn(this.st,this.ht,this.ut,this.$,this.ot,t,this.tt):0===this.size?wn():(this.K=t,this.J=!1,this)},i}(X);dn.isList=ln;var vn=dn.prototype;vn[cn]=!0,vn.delete=vn.remove,vn.merge=vn.concat,vn.setIn=Mi,vn.deleteIn=vn.removeIn=Ai,vn.update=Ti,vn.updateIn=Ci,vn.mergeIn=Ri,vn.mergeDeepIn=zi,vn.withMutations=Ei,vn.wasAltered=Gi,vn.asImmutable=Vi,vn["@@transducer/init"]=vn.asMutable=Ni,vn["@@transducer/step"]=function(t,i){return t.push(i)},vn["@@transducer/result"]=function(t){return t.asImmutable()};var yn=function(t,i){this.array=t,this.ownerID=i};yn.prototype.removeBefore=function(t,i,n){if(n===i?1<<i:0===this.array.length)return this;var e=n>>>i&F;if(e>=this.array.length)return new yn([],t);var r,s=0===e;if(i>0){var o=this.array[e];if((r=o&&o.removeBefore(t,i-5,n))===o&&s)return this}if(s&&!r)return this;var h=kn(this,t);if(!s)for(var u=0;u<e;u++)h.array[u]=void 0;return r&&(h.array[e]=r),h},yn.prototype.removeAfter=function(t,i,n){if(n===(i?1<<i:0)||0===this.array.length)return this;var e,r=n-1>>>i&F;if(r>=this.array.length)return this;if(i>0){var s=this.array[r];if((e=s&&s.removeAfter(t,i-5,n))===s&&r===this.array.length-1)return this}var o=kn(this,t);return o.array.splice(r+1),e&&(o.array[r]=e),o};var Sn,mn={};function bn(t,i){var n=t.st,e=t.ht,r=An(e),s=t.ot;return o(t.$,t.ut,0);function o(t,h,u){return 0===h?function(t,o){var h=o===r?s&&s.array:t&&t.array,u=o>n?0:n-o,a=e-o;a>A&&(a=A);return function(){if(u===a)return mn;var t=i?--a:u++;return h&&h[t]}}(t,u):function(t,r,s){var h,u=t&&t.array,a=s>n?0:n-s>>r,f=1+(e-s>>r);f>A&&(f=A);return function(){for(;;){if(h){var t=h();if(t!==mn)return t;h=null}if(a===f)return mn;var n=i?--f:a++;h=o(u&&u[n],r-5,s+(n<<r))}}}(t,h,u)}}function gn(t,i,n,e,r,s,o){var h=Object.create(vn);return h.size=i-t,h.st=t,h.ht=i,h.ut=n,h.$=e,h.ot=r,h.K=s,h.tt=o,h.J=!1,h}function wn(){return Sn||(Sn=gn(0,0,5))}function pn(t,i,n,e,r,s){var o,h=e>>>n&F,u=t&&h<t.array.length;if(!u&&void 0===r)return t;if(n>0){var a=t&&t.array[h],f=pn(a,i,n-5,e,r,s);return f===a?t:((o=kn(t,i)).array[h]=f,o)}return u&&t.array[h]===r?t:(s&&C(s),o=kn(t,i),void 0===r&&h===o.array.length-1?o.array.pop():o.array[h]=r,o)}function kn(t,i){return i&&t&&i===t.ownerID?t:new yn(t?t.array.slice():[],i)}function xn(t,i){if(i>=An(t.ht))return t.ot;if(i<1<<t.ut+5){for(var n=t.$,e=t.ut;n&&e>0;)n=n.array[i>>>e&F],e-=5;return n}}function Mn(t,i,n){void 0!==i&&(i|=0),void 0!==n&&(n|=0);var e=t.K||new B,r=t.st,s=t.ht,o=r+i,h=void 0===n?s:n<0?s+n:r+n;if(o===r&&h===s)return t;if(o>=h)return t.clear();for(var u=t.ut,a=t.$,f=0;o+f<0;)a=new yn(a&&a.array.length?[void 0,a]:[],e),f+=1<<(u+=5);f&&(o+=f,r+=f,h+=f,s+=f);for(var c=An(s),l=An(h);l>=1<<u+5;)a=new yn(a&&a.array.length?[a]:[],e),u+=5;var d=t.ot,v=l<c?xn(t,h-1):l>c?new yn([],e):d;if(d&&l>c&&o<s&&d.array.length){for(var y=a=kn(a,e),S=u;S>5;S-=5){var m=c>>>S&F;y=y.array[m]=kn(y.array[m],e)}y.array[c>>>5&F]=d}if(h<s&&(v=v&&v.removeAfter(e,0,h)),o>=l)o-=l,h-=l,u=5,a=null,v=v&&v.removeBefore(e,0,o);else if(o>r||l<c){for(f=0;a;){var b=o>>>u&F;if(b!==l>>>u&F)break;b&&(f+=(1<<u)*b),u-=5,a=a.array[b]}a&&o>r&&(a=a.removeBefore(e,u,o-f)),a&&l<c&&(a=a.removeAfter(e,u,l-f)),f&&(o-=f,h-=f)}return t.K?(t.size=h-o,t.st=o,t.ht=h,t.ut=u,t.$=a,t.ot=v,t.tt=void 0,t.J=!0,t):gn(o,h,u,a,v)}function An(t){return t<A?0:t-1>>>5<<5}var Fn,Tn=function(t){function i(t){return null==t?Bn():Ct(t)?t:Bn().withMutations((function(i){var n=Y(t);Si(n.size),n.forEach((function(t,n){return i.set(n,t)}))}))}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.of=function(){return this(arguments)},i.prototype.toString=function(){return this.R("OrderedMap {","}")},i.prototype.get=function(t,i){var n=this.ft.get(t);return void 0!==n?this.ct.get(n)[1]:i},i.prototype.clear=function(){return 0===this.size?this:this.K?(this.size=0,this.ft.clear(),this.ct.clear(),this):Bn()},i.prototype.set=function(t,i){return Ln(this,t,i)},i.prototype.remove=function(t){return Ln(this,t,T)},i.prototype.wasAltered=function(){return this.ft.wasAltered()||this.ct.wasAltered()},i.prototype._=function(t,i){var n=this;return this.ct._((function(i){return i&&t(i[1],i[0],n)}),i)},i.prototype.G=function(t,i){return this.ct.fromEntrySeq().G(t,i)},i.prototype.q=function(t){if(t===this.K)return this;var i=this.ft.q(t),n=this.ct.q(t);return t?Cn(i,n,t,this.tt):0===this.size?Bn():(this.K=t,this.ft=i,this.ct=n,this)},i}(Hi);function Cn(t,i,n,e){var r=Object.create(Tn.prototype);return r.size=t?t.size:0,r.ft=t,r.ct=i,r.K=n,r.tt=e,r}function Bn(){return Fn||(Fn=Cn(tn(),wn()))}function Ln(t,i,n){var e,r,s=t.ft,o=t.ct,h=s.get(i),u=void 0!==h;if(n===T){if(!u)return t;o.size>=A&&o.size>=2*s.size?(e=(r=o.filter((function(t,i){return void 0!==t&&h!==i}))).toKeyedSeq().map((function(t){return t[0]})).flip().toMap(),t.K&&(e.K=r.K=t.K)):(e=s.remove(i),r=h===o.size-1?o.pop():o.set(h,void 0))}else if(u){if(n===o.get(h)[1])return t;e=s,r=o.set(h,[i,n])}else e=s.set(i,o.size),r=o.set(o.size,[i,n]);return t.K?(t.size=e.size,t.ft=e,t.ct=r,t.tt=void 0,t):Cn(e,r)}Tn.isOrderedMap=Ct,Tn.prototype[tt]=!0,Tn.prototype.delete=Tn.prototype.remove;var In="@@__IMMUTABLE_STACK__@@";function On(t){return Boolean(t&&t[In])}var Pn=function(t){function i(t){return null==t?zn():On(t)?t:zn().pushAll(t)}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.of=function(){return this(arguments)},i.prototype.toString=function(){return this.R("Stack [","]")},i.prototype.get=function(t,i){var n=this.dt;for(t=I(this,t);n&&t--;)n=n.next;return n?n.value:i},i.prototype.peek=function(){return this.dt&&this.dt.value},i.prototype.push=function(){var t=arguments;if(0===arguments.length)return this;for(var i=this.size+arguments.length,n=this.dt,e=arguments.length-1;e>=0;e--)n={value:t[e],next:n};return this.K?(this.size=i,this.dt=n,this.tt=void 0,this.J=!0,this):Rn(i,n)},i.prototype.pushAll=function(i){if(0===(i=t(i)).size)return this;if(0===this.size&&On(i))return i;Si(i.size);var n=this.size,e=this.dt;return i._((function(t){n++,e={value:t,next:e}}),!0),this.K?(this.size=n,this.dt=e,this.tt=void 0,this.J=!0,this):Rn(n,e)},i.prototype.pop=function(){return this.slice(1)},i.prototype.clear=function(){return 0===this.size?this:this.K?(this.size=0,this.dt=void 0,this.tt=void 0,this.J=!0,this):zn()},i.prototype.slice=function(i,n){if(P(i,n,this.size))return this;var e=D(i,this.size);if(_(n,this.size)!==this.size)return t.prototype.slice.call(this,i,n);for(var r=this.size-e,s=this.dt;e--;)s=s.next;return this.K?(this.size=r,this.dt=s,this.tt=void 0,this.J=!0,this):Rn(r,s)},i.prototype.q=function(t){return t===this.K?this:t?Rn(this.size,this.dt,t,this.tt):0===this.size?zn():(this.K=t,this.J=!1,this)},i.prototype._=function(t,i){var n=this;if(i)return new bt(this.toArray())._((function(i,e){return t(i,e,n)}),i);for(var e=0,r=this.dt;r&&!1!==t(r.value,e++,this);)r=r.next;return e},i.prototype.G=function(t,i){if(i)return new bt(this.toArray()).G(t,i);var n=0,e=this.dt;return new st((function(){if(e){var i=e.value;return e=e.next,ot(t,n++,i)}return{value:void 0,done:!0}}))},i}(X);Pn.isStack=On;var Dn,_n=Pn.prototype;function Rn(t,i,n,e){var r=Object.create(_n);return r.size=t,r.dt=i,r.K=n,r.tt=e,r.J=!1,r}function zn(){return Dn||(Dn=Rn(0))}_n[In]=!0,_n.shift=_n.pop,_n.unshift=_n.push,_n.unshiftAll=_n.pushAll,_n.withMutations=Ei,_n.wasAltered=Gi,_n.asImmutable=Vi,_n["@@transducer/init"]=_n.asMutable=Ni,_n["@@transducer/step"]=function(t,i){return t.unshift(i)},_n["@@transducer/result"]=function(t){return t.asImmutable()};var En="@@__IMMUTABLE_SET__@@";function Nn(t){return Boolean(t&&t[En])}function Vn(t){return Nn(t)&&it(t)}function Gn(t,i){if(t===i)return!0;if(!N(i)||void 0!==t.size&&void 0!==i.size&&t.size!==i.size||void 0!==t.tt&&void 0!==i.tt&&t.tt!==i.tt||G(t)!==G(i)||j(t)!==j(i)||it(t)!==it(i))return!1;if(0===t.size&&0===i.size)return!0;var n=!W(t);if(it(t)){var e=t.entries();return i.every((function(t,i){var r=e.next().value;return r&&Lt(r[1],t)&&(n||Lt(r[0],i))}))&&e.next().done}var r=!1;if(void 0===t.size)if(void 0===i.size)"function"==typeof t.cacheResult&&t.cacheResult();else{r=!0;var s=t;t=i,i=s}var o=!0,h=i._((function(i,e){if(n?!t.has(i):r?!Lt(i,t.get(e,T)):!Lt(t.get(e,T),i))return o=!1,!1}));return o&&t.size===h}function Hn(t,i){var n=function(n){t.prototype[n]=i[n]};return Object.keys(i).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(i).forEach(n),t}function jn(t){if(!t||"object"!==M(t))return t;if(!N(t)){if(!bi(t))return t;t=vt(t)}if(G(t)){var i={};return t._((function(t,n){i[n]=jn(t)})),i}var n=[];return t._((function(t){n.push(jn(t))})),n}var Wn=function(t){function i(i){return null==i?Kn():Nn(i)&&!it(i)?i:Kn().withMutations((function(n){var e=t(i);Si(e.size),e.forEach((function(t){return n.add(t)}))}))}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.of=function(){return this(arguments)},i.fromKeys=function(t){return this(Y(t).keySeq())},i.intersect=function(t){return(t=U(t).toArray()).length?Yn.intersect.apply(i(t.pop()),t):Kn()},i.union=function(t){return(t=U(t).toArray()).length?Yn.union.apply(i(t.pop()),t):Kn()},i.prototype.toString=function(){return this.R("Set {","}")},i.prototype.has=function(t){return this.ft.has(t)},i.prototype.add=function(t){return Xn(this,this.ft.set(t,t))},i.prototype.remove=function(t){return Xn(this,this.ft.remove(t))},i.prototype.clear=function(){return Xn(this,this.ft.clear())},i.prototype.map=function(t,i){var n=this,e=[],r=[];return this.forEach((function(s){var o=t.call(i,s,s,n);o!==s&&(e.push(s),r.push(o))})),this.withMutations((function(t){e.forEach((function(i){return t.remove(i)})),r.forEach((function(i){return t.add(i)}))}))},i.prototype.union=function(){for(var i=[],n=arguments.length;n--;)i[n]=arguments[n];return 0===(i=i.filter((function(t){return 0!==t.size}))).length?this:0!==this.size||this.K||1!==i.length?this.withMutations((function(n){for(var e=0;e<i.length;e++)t(i[e]).forEach((function(t){return n.add(t)}))})):this.constructor(i[0])},i.prototype.intersect=function(){for(var i=[],n=arguments.length;n--;)i[n]=arguments[n];if(0===i.length)return this;i=i.map((function(i){return t(i)}));var e=[];return this.forEach((function(t){i.every((function(i){return i.includes(t)}))||e.push(t)})),this.withMutations((function(t){e.forEach((function(i){t.remove(i)}))}))},i.prototype.subtract=function(){for(var i=[],n=arguments.length;n--;)i[n]=arguments[n];if(0===i.length)return this;i=i.map((function(i){return t(i)}));var e=[];return this.forEach((function(t){i.some((function(i){return i.includes(t)}))&&e.push(t)})),this.withMutations((function(t){e.forEach((function(i){t.remove(i)}))}))},i.prototype.sort=function(t){return le(ri(this,t))},i.prototype.sortBy=function(t,i){return le(ri(this,i,t))},i.prototype.wasAltered=function(){return this.ft.wasAltered()},i.prototype._=function(t,i){var n=this;return this.ft._((function(i){return t(i,i,n)}),i)},i.prototype.G=function(t,i){return this.ft.G(t,i)},i.prototype.q=function(t){if(t===this.K)return this;var i=this.ft.q(t);return t?this.vt(i,t):0===this.size?this.yt():(this.K=t,this.ft=i,this)},i}(Z);Wn.isSet=Nn;var Un,Yn=Wn.prototype;function Xn(t,i){return t.K?(t.size=i.size,t.ft=i,t):i===t.ft?t:0===i.size?t.yt():t.vt(i)}function Zn(t,i){var n=Object.create(Yn);return n.size=t?t.size:0,n.ft=t,n.K=i,n}function Kn(){return Un||(Un=Zn(tn()))}Yn[En]=!0,Yn.delete=Yn.remove,Yn.merge=Yn.concat=Yn.union,Yn.withMutations=Ei,Yn.asImmutable=Vi,Yn["@@transducer/init"]=Yn.asMutable=Ni,Yn["@@transducer/step"]=function(t,i){return t.add(i)},Yn["@@transducer/result"]=function(t){return t.asImmutable()},Yn.yt=Kn,Yn.vt=Zn;var qn,Jn=function(t){function i(t,n,e){if(!(this instanceof i))return new i(t,n,e);if(yi(0!==e,"Cannot step a Range by 0"),t=t||0,void 0===n&&(n=1/0),e=void 0===e?1:Math.abs(e),n<t&&(e=-e),this.St=t,this.bt=n,this.wt=e,this.size=Math.max(0,Math.ceil((n-t)/e-1)+1),0===this.size){if(qn)return qn;qn=this}}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this.St+"..."+this.bt+(1!==this.wt?" by "+this.wt:"")+" ]"},i.prototype.get=function(t,i){return this.has(t)?this.St+I(this,t)*this.wt:i},i.prototype.includes=function(t){var i=(t-this.St)/this.wt;return i>=0&&i<this.size&&i===Math.floor(i)},i.prototype.slice=function(t,n){return P(t,n,this.size)?this:(t=D(t,this.size),(n=_(n,this.size))<=t?new i(0,0):new i(this.get(t,this.bt),this.get(n,this.bt),this.wt))},i.prototype.indexOf=function(t){var i=t-this.St;if(i%this.wt==0){var n=i/this.wt;if(n>=0&&n<this.size)return n}return-1},i.prototype.lastIndexOf=function(t){return this.indexOf(t)},i.prototype._=function(t,i){for(var n=this.size,e=this.wt,r=i?this.St+(n-1)*e:this.St,s=0;s!==n&&!1!==t(r,i?n-++s:s++,this);)r+=i?-e:e;return s},i.prototype.G=function(t,i){var n=this.size,e=this.wt,r=i?this.St+(n-1)*e:this.St,s=0;return new st((function(){if(s===n)return{value:void 0,done:!0};var o=r;return r+=i?-e:e,ot(t,i?n-++s:s++,o)}))},i.prototype.equals=function(t){return t instanceof i?this.St===t.St&&this.bt===t.bt&&this.wt===t.wt:Gn(this,t)},i}(St);function Qn(t,i,n){for(var e=mi(i),r=0;r!==e.length;)if((t=wi(t,e[r++],T))===T)return n;return t}function $n(t,i){return Qn(this,t,i)}function te(){Si(this.size);var t={};return this._((function(i,n){t[n]=i})),t}U.isIterable=N,U.isKeyed=G,U.isIndexed=j,U.isAssociative=W,U.isOrdered=it,U.Iterator=st,Hn(U,{toArray:function(){Si(this.size);var t=new Array(this.size||0),i=G(this),n=0;return this._((function(e,r){t[n++]=i?[r,e]:e})),t},toIndexedSeq:function(){return new Xt(this)},toJS:function(){return jn(this)},toKeyedSeq:function(){return new Yt(this,!0)},toMap:function(){return Hi(this.toKeyedSeq())},toObject:te,toOrderedMap:function(){return Tn(this.toKeyedSeq())},toOrderedSet:function(){return le(G(this)?this.valueSeq():this)},toSet:function(){return Wn(G(this)?this.valueSeq():this)},toSetSeq:function(){return new Zt(this)},toSeq:function(){return j(this)?this.toIndexedSeq():G(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Pn(G(this)?this.valueSeq():this)},toList:function(){return dn(G(this)?this.valueSeq():this)},toString:function(){return"[Collection]"},R:function(t,i){return 0===this.size?t+i:t+" "+this.toSeq().map(this.kt).join(", ")+" "+i},concat:function(){for(var t=[],i=arguments.length;i--;)t[i]=arguments[i];return ui(this,ni(this,t))},includes:function(t){return this.some((function(i){return Lt(i,t)}))},entries:function(){return this.G(2)},every:function(t,i){Si(this.size);var n=!0;return this._((function(e,r,s){if(!t.call(i,e,r,s))return n=!1,!1})),n},filter:function(t,i){return ui(this,$t(this,t,i,!0))},find:function(t,i,n){var e=this.findEntry(t,i);return e?e[1]:n},forEach:function(t,i){return Si(this.size),this._(i?t.bind(i):t)},join:function(t){Si(this.size),t=void 0!==t?""+t:",";var i="",n=!0;return this._((function(e){n?n=!1:i+=t,i+=null!=e?e.toString():""})),i},keys:function(){return this.G(0)},map:function(t,i){return ui(this,Jt(this,t,i))},reduce:function(t,i,n){return re(this,t,i,n,arguments.length<2,!1)},reduceRight:function(t,i,n){return re(this,t,i,n,arguments.length<2,!0)},reverse:function(){return ui(this,Qt(this,!0))},slice:function(t,i){return ui(this,ti(this,t,i,!0))},some:function(t,i){return!this.every(he(t),i)},sort:function(t){return ui(this,ri(this,t))},values:function(){return this.G(1)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(t,i){return L(t?this.toSeq().filter(t,i):this)},countBy:function(t,i){return function(t,i,n){var e=Hi().asMutable();return t._((function(r,s){e.update(i.call(n,r,s,t),0,(function(t){return t+1}))})),e.asImmutable()}(this,t,i)},equals:function(t){return Gn(this,t)},entrySeq:function(){var t=this;if(t.N)return new bt(t.N);var i=t.toSeq().map(oe).toIndexedSeq();return i.fromEntrySeq=function(){return t.toSeq()},i},filterNot:function(t,i){return this.filter(he(t),i)},findEntry:function(t,i,n){var e=n;return this._((function(n,r,s){if(t.call(i,n,r,s))return e=[r,n],!1})),e},findKey:function(t,i){var n=this.findEntry(t,i);return n&&n[0]},findLast:function(t,i,n){return this.toKeyedSeq().reverse().find(t,i,n)},findLastEntry:function(t,i,n){return this.toKeyedSeq().reverse().findEntry(t,i,n)},findLastKey:function(t,i){return this.toKeyedSeq().reverse().findKey(t,i)},first:function(t){return this.find(O,null,t)},flatMap:function(t,i){return ui(this,function(t,i,n){var e=fi(t);return t.toSeq().map((function(r,s){return e(i.call(n,r,s,t))})).flatten(!0)}(this,t,i))},flatten:function(t){return ui(this,ei(this,t,!0))},fromEntrySeq:function(){return new Kt(this)},get:function(t,i){return this.find((function(i,n){return Lt(n,t)}),void 0,i)},getIn:$n,groupBy:function(t,i){return function(t,i,n){var e=G(t),r=(it(t)?Tn():Hi()).asMutable();t._((function(s,o){r.update(i.call(n,s,o,t),(function(t){return(t=t||[]).push(e?[o,s]:s),t}))}));var s=fi(t);return r.map((function(i){return ui(t,s(i))})).asImmutable()}(this,t,i)},has:function(t){return this.get(t,T)!==T},hasIn:function(t){return Qn(this,t,T)!==T},isSubset:function(t){return t="function"==typeof t.includes?t:U(t),this.every((function(i){return t.includes(i)}))},isSuperset:function(t){return(t="function"==typeof t.isSubset?t:U(t)).isSubset(this)},keyOf:function(t){return this.findKey((function(i){return Lt(i,t)}))},keySeq:function(){return this.toSeq().map(se).toIndexedSeq()},last:function(t){return this.toSeq().reverse().first(t)},lastKeyOf:function(t){return this.toKeyedSeq().reverse().keyOf(t)},max:function(t){return si(this,t)},maxBy:function(t,i){return si(this,i,t)},min:function(t){return si(this,t?ue(t):fe)},minBy:function(t,i){return si(this,i?ue(i):fe,t)},rest:function(){return this.slice(1)},skip:function(t){return 0===t?this:this.slice(Math.max(0,t))},skipLast:function(t){return 0===t?this:this.slice(0,-Math.max(0,t))},skipWhile:function(t,i){return ui(this,ii(this,t,i,!0))},skipUntil:function(t,i){return this.skipWhile(he(t),i)},sortBy:function(t,i){return ui(this,ri(this,i,t))},take:function(t){return this.slice(0,Math.max(0,t))},takeLast:function(t){return this.slice(-Math.max(0,t))},takeWhile:function(t,i){return ui(this,function(t,i,n){var e=ci(t);return e.V=function(e,r){var s=this;if(r)return this.cacheResult()._(e,r);var o=0;return t._((function(t,r,h){return i.call(n,t,r,h)&&++o&&e(t,r,s)})),o},e.H=function(e,r){var s=this;if(r)return this.cacheResult().G(e,r);var o=t.G(2,r),h=!0;return new st((function(){if(!h)return{value:void 0,done:!0};var t=o.next();if(t.done)return t;var r=t.value,u=r[0],a=r[1];return i.call(n,a,u,s)?2===e?t:ot(e,u,a,t):(h=!1,{value:void 0,done:!0})}))},e}(this,t,i))},takeUntil:function(t,i){return this.takeWhile(he(t),i)},update:function(t){return t(this)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.tt||(this.tt=function(t){if(t.size===1/0)return 0;var i=it(t),n=G(t),e=i?1:0;return function(t,i){return i=It(i,3432918353),i=It(i<<15|i>>>-15,461845907),i=It(i<<13|i>>>-13,5),i=It((i=(i+3864292196|0)^t)^i>>>16,2246822507),i=Ot((i=It(i^i>>>13,3266489909))^i>>>16)}(t._(n?i?function(t,i){e=31*e+ce(Dt(t),Dt(i))|0}:function(t,i){e=e+ce(Dt(t),Dt(i))|0}:i?function(t){e=31*e+Dt(t)|0}:function(t){e=e+Dt(t)|0}),e)}(this))}});var ie=U.prototype;ie[E]=!0,ie[rt]=ie.values,ie.toJSON=ie.toArray,ie.kt=gi,ie.inspect=ie.toSource=function(){return this.toString()},ie.chain=ie.flatMap,ie.contains=ie.includes,Hn(Y,{flip:function(){return ui(this,qt(this))},mapEntries:function(t,i){var n=this,e=0;return ui(this,this.toSeq().map((function(r,s){return t.call(i,[s,r],e++,n)})).fromEntrySeq())},mapKeys:function(t,i){var n=this;return ui(this,this.toSeq().flip().map((function(e,r){return t.call(i,e,r,n)})).flip())}});var ne=Y.prototype;ne[V]=!0,ne[rt]=ie.entries,ne.toJSON=te,ne.kt=function(t,i){return gi(i)+": "+gi(t)},Hn(X,{toKeyedSeq:function(){return new Yt(this,!1)},filter:function(t,i){return ui(this,$t(this,t,i,!1))},findIndex:function(t,i){var n=this.findEntry(t,i);return n?n[0]:-1},indexOf:function(t){var i=this.keyOf(t);return void 0===i?-1:i},lastIndexOf:function(t){var i=this.lastKeyOf(t);return void 0===i?-1:i},reverse:function(){return ui(this,Qt(this,!1))},slice:function(t,i){return ui(this,ti(this,t,i,!1))},splice:function(t,i){var n=arguments.length;if(i=Math.max(i||0,0),0===n||2===n&&!i)return this;t=D(t,t<0?this.count():this.size);var e=this.slice(0,t);return ui(this,1===n?e:e.concat(vi(arguments,2),this.slice(t+i)))},findLastIndex:function(t,i){var n=this.findLastEntry(t,i);return n?n[0]:-1},first:function(t){return this.get(0,t)},flatten:function(t){return ui(this,ei(this,t,!1))},get:function(t,i){return(t=I(this,t))<0||this.size===1/0||void 0!==this.size&&t>this.size?i:this.find((function(i,n){return n===t}),void 0,i)},has:function(t){return(t=I(this,t))>=0&&(void 0!==this.size?this.size===1/0||t<this.size:-1!==this.indexOf(t))},interpose:function(t){return ui(this,function(t,i){var n=ci(t);return n.size=t.size&&2*t.size-1,n.V=function(n,e){var r=this,s=0;return t._((function(t){return(!s||!1!==n(i,s++,r))&&!1!==n(t,s++,r)}),e),s},n.H=function(n,e){var r,s=t.G(1,e),o=0;return new st((function(){return(!r||o%2)&&(r=s.next()).done?r:o%2?ot(n,o++,i):ot(n,o++,r.value,r)}))},n}(this,t))},interleave:function(){var t=[this].concat(vi(arguments)),i=hi(this.toSeq(),St.of,t),n=i.flatten(!0);return i.size&&(n.size=i.size*t.length),ui(this,n)},keySeq:function(){return Jn(0,this.size)},last:function(t){return this.get(-1,t)},skipWhile:function(t,i){return ui(this,ii(this,t,i,!1))},zip:function(){var t=[this].concat(vi(arguments));return ui(this,hi(this,ae,t))},zipAll:function(){var t=[this].concat(vi(arguments));return ui(this,hi(this,ae,t,!0))},zipWith:function(t){var i=vi(arguments);return i[0]=this,ui(this,hi(this,t,i))}});var ee=X.prototype;function re(t,i,n,e,r,s){return Si(t.size),t._((function(t,s,o){r?(r=!1,n=t):n=i.call(e,n,t,s,o)}),s),n}function se(t,i){return i}function oe(t,i){return[i,t]}function he(t){return function(){return!t.apply(this,arguments)}}function ue(t){return function(){return-t.apply(this,arguments)}}function ae(){return vi(arguments)}function fe(t,i){return t<i?1:t>i?-1:0}function ce(t,i){return t^i+2654435769+(t<<6)+(t>>2)|0}ee[H]=!0,ee[tt]=!0,Hn(Z,{get:function(t,i){return this.has(t)?t:i},includes:function(t){return this.has(t)},keySeq:function(){return this.valueSeq()}}),Z.prototype.has=ie.includes,Z.prototype.contains=Z.prototype.includes,Hn(yt,Y.prototype),Hn(St,X.prototype),Hn(mt,Z.prototype);var le=function(t){function i(t){return null==t?Se():Vn(t)?t:Se().withMutations((function(i){var n=Z(t);Si(n.size),n.forEach((function(t){return i.add(t)}))}))}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.of=function(){return this(arguments)},i.fromKeys=function(t){return this(Y(t).keySeq())},i.prototype.toString=function(){return this.R("OrderedSet {","}")},i}(Wn);le.isOrderedSet=Vn;var de,ve=le.prototype;function ye(t,i){var n=Object.create(ve);return n.size=t?t.size:0,n.ft=t,n.K=i,n}function Se(){return de||(de=ye(Bn()))}ve[tt]=!0,ve.zip=ee.zip,ve.zipWith=ee.zipWith,ve.yt=Se,ve.vt=ye;var me=function(t,i){var n,e=function(s){var o=this;if(s instanceof e)return s;if(!(this instanceof e))return new e(s);if(!n){n=!0;var h=Object.keys(t),u=r.xt={};r.Mt=i,r.U=h,r.At=t;for(var a=0;a<h.length;a++){var f=h[a];u[f]=a,r[f]?"object"===("undefined"==typeof console?"undefined":M(console))&&console.warn&&console.warn("Cannot define "+we(this)+' with property "'+f+'" since that property name is part of the Record API.'):ke(r,f)}}this.K=void 0,this.Ft=dn().withMutations((function(t){t.setSize(o.U.length),Y(s).forEach((function(i,n){t.set(o.xt[n],i===o.At[n]?void 0:i)}))}))},r=e.prototype=Object.create(be);return r.constructor=e,i&&(e.displayName=i),e};me.prototype.toString=function(){for(var t,i=we(this)+" { ",n=this.U,e=0,r=n.length;e!==r;e++)i+=(e?", ":"")+(t=n[e])+": "+gi(this.get(t));return i+" }"},me.prototype.equals=function(t){return this===t||t&&this.U===t.U&&pe(this).equals(pe(t))},me.prototype.hashCode=function(){return pe(this).hashCode()},me.prototype.has=function(t){return this.xt.hasOwnProperty(t)},me.prototype.get=function(t,i){if(!this.has(t))return i;var n=this.xt[t],e=this.Ft.get(n);return void 0===e?this.At[t]:e},me.prototype.set=function(t,i){if(this.has(t)){var n=this.Ft.set(this.xt[t],i===this.At[t]?void 0:i);if(n!==this.Ft&&!this.K)return ge(this,n)}return this},me.prototype.remove=function(t){return this.set(t)},me.prototype.clear=function(){var t=this.Ft.clear().setSize(this.U.length);return this.K?this:ge(this,t)},me.prototype.wasAltered=function(){return this.Ft.wasAltered()},me.prototype.toSeq=function(){return pe(this)},me.prototype.toJS=function(){return jn(this)},me.prototype.entries=function(){return this.G(2)},me.prototype.G=function(t,i){return pe(this).G(t,i)},me.prototype._=function(t,i){return pe(this)._(t,i)},me.prototype.q=function(t){if(t===this.K)return this;var i=this.Ft.q(t);return t?ge(this,i,t):(this.K=t,this.Ft=i,this)},me.isRecord=Q,me.getDescriptiveName=we;var be=me.prototype;function ge(t,i,n){var e=Object.create(Object.getPrototypeOf(t));return e.Ft=i,e.K=n,e}function we(t){return t.constructor.displayName||t.constructor.name||"Record"}function pe(t){return xt(t.U.map((function(i){return[i,t.get(i)]})))}function ke(t,i){try{Object.defineProperty(t,i,{get:function(){return this.get(i)},set:function(t){yi(this.K,"Cannot set on an immutable record."),this.set(i,t)}})}catch(t){}}be[J]=!0,be.delete=be.remove,be.deleteIn=be.removeIn=Ai,be.getIn=$n,be.hasIn=ie.hasIn,be.merge=Bi,be.mergeWith=Li,be.mergeIn=Ri,be.mergeDeep=Di,be.mergeDeepWith=_i,be.mergeDeepIn=zi,be.setIn=Mi,be.update=Ti,be.updateIn=Ci,be.withMutations=Ei,be.asMutable=Ni,be.asImmutable=Vi,be[rt]=be.entries,be.toJSON=be.toObject=ie.toObject,be.inspect=be.toSource=function(){return this.toString()};var xe=function(t){function i(i){return t.call(this,i)||this}return n(i,t),i.prototype.toString=function(){return"color:"+this.r+","+this.g+","+this.b+","+this.a},i.prototype.setA=function(t){return this.set("a",t/255)},i.prototype.setR=function(t){return this.set("r",t/255)},i.prototype.setG=function(t){return this.set("g",t/255)},i.prototype.setB=function(t){return this.set("b",t/255)},i.prototype.getA=function(){return 255*this.get("a")},i.prototype.getR=function(){return 255*this.get("r")},i.prototype.getG=function(){return 255*this.get("g")},i.prototype.getB=function(){return 255*this.get("b")},i.prototype.getHighlight=function(){return this.Tt||(this.Tt=new i({r:this.r+.45*(1-this.r),g:this.g+.45*(1-this.g),b:this.b+.45*(1-this.b),a:this.a<1?this.a+.45*(1-this.a):1})),this.Tt},i.prototype.getLighter=function(){return this.Ct||(this.Ct=new i({r:this.r+.4*(1-this.r),g:this.g+.4*(1-this.g),b:this.b+.4*(1-this.b),a:this.a})),this.Ct},i.prototype.getDarker=function(){return this.Bt||(this.Bt=new i({r:this.r-.4*(1-this.r),g:this.g-.4*(1-this.g),b:this.b-.4*(1-this.b),a:this.a})),this.Bt},i.prototype.toRGBAString=function(){return"rgba( "+255*this.r+", "+255*this.g+", "+255*this.b+", "+255*this.a+" )"},i}(me({r:1,g:1,b:1,a:1})),Me=new xe({}),Ae=function(t,i,n,e){return void 0===e&&(e=255),new xe({r:t/255,g:i/255,b:n/255,a:e/255})},Fe=function(t){var i=t.startsWith("#")?t.substring(1):t.startsWith("0x")?t.substr(2):t;switch(i.length){case 8:return new xe({r:Number("0x"+i.substring(0,2))/255,g:Number("0x"+i.substring(2,4))/255,b:Number("0x"+i.substring(4,6))/255,a:Number("0x"+i.substring(6,8))/255});case 6:return new xe({r:Number("0x"+i.substring(0,2))/255,g:Number("0x"+i.substring(2,4))/255,b:Number("0x"+i.substring(4,6))/255});case 4:return new xe({r:Number("0x"+i.charAt(0)+i.charAt(0))/255,g:Number("0x"+i.charAt(1)+i.charAt(1))/255,b:Number("0x"+i.charAt(2)+i.charAt(2))/255,a:Number("0x"+i.charAt(3)+i.charAt(3))/255});case 3:return new xe({r:Number("0x"+i.charAt(0)+i.charAt(0))/255,g:Number("0x"+i.charAt(1)+i.charAt(1))/255,b:Number("0x"+i.charAt(2)+i.charAt(2))/255});default:throw new Error("ColorHEX parsing error | input: "+t)}},Te=function(t,i,n){var e,r,s;void 0===i&&(i=1),void 0===n&&(n=1),t/=360;var o=Math.floor(6*t),h=6*t-o,u=n*(1-i),a=n*(1-h*i),f=n*(1-(1-h)*i);switch(o%6){case 0:e=n,r=f,s=u;break;case 1:e=a,r=n,s=u;break;case 2:e=u,r=n,s=f;break;case 3:e=u,r=a,s=n;break;case 4:e=f,r=u,s=n;break;default:e=n,r=u,s=a}return new xe({r:e,g:r,b:s})},Ce=function(t,i,n){i/=100,n/=100;var e=(1-Math.abs(2*n-1))*i,r=t/60,s=e*(1-Math.abs(r%2-1)),o=[];isNaN(t)?o=[0,0,0]:r<=1?o=[e,s,0]:r<=2?o=[s,e,0]:r<=3?o=[0,e,s]:r<=4?o=[0,s,e]:r<=5?o=[s,0,e]:r<=6&&(o=[e,0,s]);var h=n-.5*e;return[Math.round(255*(o[0]+h)),Math.round(255*(o[1]+h)),Math.round(255*(o[2]+h))]},Be={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},Le=function(t){var i=Be[t.toLowerCase()];if(i)return i;throw new Error("Unknown color code: "+t)},Ie=function(t,i){return t.value-i.value},Oe=me({steps:[],title:"",units:"",interpolate:!0,color:Ae(0,0,0,255),length:0,min:0,max:0,subranges:[],isValid:!1,valueRangeMin:0,valueRangeMax:0}),Pe=function(t){var i=t.steps,n=i.length;i.sort(Ie);for(var e=h(n>0?[i[0].value,i[n-1].value]:[0,0],2),r=e[0],s=e[1],o=n>0?n-1:0,u=Array(o),a=0;a<o;a+=1)u[a]={min:i[a],max:i[a+1]};return{min:r,max:s,length:n,steps:i,subranges:u,valueRangeMin:void 0!==t.valueRangeMin?t.valueRangeMin:r-(s-r),valueRangeMax:void 0!==t.valueRangeMax?t.valueRangeMax:s+(s-r),isValid:n>0&&r!==s}},De=function(t){function i(i){var n=Pe(i);return t.call(this,function(t,i){return{steps:t.steps,title:t.title,units:t.units,interpolate:t.interpolate,color:t.color,valueRangeMin:i.valueRangeMin,valueRangeMax:i.valueRangeMax,length:i.length,min:i.min,max:i.max,subranges:i.subranges,isValid:i.isValid}}(i,n))||this}return n(i,t),i.prototype.toString=function(){return"LUT:interpolate="+this.interpolate+",steps="+this.steps.map((function(t){return t.value+","+t.color.toString()})).join(",")},i.prototype.setSteps=function(t){return this.merge(Pe(e(e({},this),{steps:t})))},i.prototype.getSteps=function(){return this.get("steps")},i.prototype.setTitle=function(t){return this.set("title",t)},i.prototype.getTitle=function(){return this.get("title")},i.prototype.setUnits=function(t){return this.set("units",t)},i.prototype.getUnits=function(){return this.get("units")},i.prototype.setInterpolation=function(t){return this.set("interpolate",t)},i.prototype.getInterpolation=function(){return this.get("interpolate")},i.prototype.setFallbackColor=function(t){return this.set("color",t)},i.prototype.getFallbackColor=function(){return this.get("color")},i.prototype.getColors=function(t){if(Array.isArray(t)){if(Array.isArray(t[0])){for(var i=t,n=i.length,e=i[0].length,r=u([],h(Array(n))).map((function(){return Array(e)})),s=0;s<n;s+=1)for(var o=0;o<e;o+=1)r[s][o]=this.Lt(i[s][o]);return r}for(var a=t,f=a.length,c=Array(f),l=0;l<f;l+=1)c[l]=this.Lt(a[l]);return c}return this.Lt(t)},i.prototype.Lt=function(t){var i=this.steps,n=i.length,e=Math.min(Math.max(this.min,t),this.max);if(0===n)return this.getFallbackColor();if(1===n)return i[0].color||this.color;var r,s,o,h=this.subranges.find((function(t){return e>=t.min.value&&e<=t.max.value})),u=h.min,a=h.max,f=this.isValid?(e-u.value)/(a.value-u.value):1;return this.interpolate?(r=u.color||this.color,s=a.color||this.color,o=f,new xe({r:r.r+(s.r-r.r)*o,g:r.g+(s.g-r.g)*o,b:r.b+(s.b-r.b)*o,a:r.a+(s.a-r.a)*o})):f>0?a.color||this.color:u.color||this.color},i}(Oe),_e=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.type="fillstyle",i}return n(i,t),i.prototype.getDefaultHighlightStyle=function(){return this},i.prototype.toString=function(){return"emptyFill"},i}(me({})),Re=new _e,ze=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.type="fillstyle",i}return n(i,t),i.prototype.getDefaultHighlightStyle=function(){return this.It||(this.It=this.createDefaultHighlightStyle()),this.It},i}(me({color:Ae(255,255,255)})),Ee=function(t){function i(i){return t.call(this,i)||this}return n(i,t),i.prototype.toString=function(){return"solidFill:"+this.color.toString()},i.prototype.setColor=function(t){return t instanceof xe?this.set("color",t):this.set("color",t(this.get("color")))},i.prototype.getColor=function(){return this.get("color")},i.prototype.setA=function(t){return this.setColor(this.getColor().setA(t))},i.prototype.setR=function(t){return this.setColor(this.getColor().setR(t))},i.prototype.setG=function(t){return this.setColor(this.getColor().setG(t))},i.prototype.setB=function(t){return this.setColor(this.getColor().setB(t))},i.prototype.createDefaultHighlightStyle=function(){return this.setColor(this.getColor().getHighlight())},i}(ze),Ne=function(t){function i(i){return t.call(this,i)||this}return n(i,t),i.prototype.toString=function(){return"individualPointFill:"+this.color.toString()},i.prototype.setFallbackColor=function(t){return t instanceof xe?this.set("color",t):this.set("color",t(this.get("color")))},i.prototype.getFallbackColor=function(){return this.get("color")},i.prototype.createDefaultHighlightStyle=function(){return this},i}(ze),Ve=function(t){function i(i){var n=t.call(this,i)||this;return n.type="fillstyle",n}return n(i,t),i.prototype.toString=function(){return"palettedFill:lut="+this.lut.toString()+",lookUpProperty="+this.lookUpProperty},i.prototype.getDefaultHighlightStyle=function(){return this},i.prototype.getPalette=function(){return this.get("lut")},i.prototype.setLookUpProperty=function(t){return"function"==typeof t?this.set("lookUpProperty",t(this.get("lookUpProperty"))):this.set("lookUpProperty",t)},i.prototype.getLookUpProperty=function(){return this.get("lookUpProperty")},i}(me({lut:new De({steps:[]}),lookUpProperty:"value"})),Ge=function(t,i){return(Ge=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n])})(t,i)};function He(t){var i="function"==typeof Symbol&&t[Symbol.iterator],n=0;return i?i.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function je(t,i){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var e,r,s=n.call(t),o=[];try{for(;(void 0===i||i-- >0)&&!(e=s.next()).done;)o.push(e.value)}catch(t){r={error:t}}finally{try{e&&!e.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return o}function We(){for(var t=[],i=0;i<arguments.length;i++)t=t.concat(je(arguments[i]));return t}var Ue,Ye,Xe=function(t){function i(n){var e,r="EventError: "+n+"}";return e=t.call(this,r)||this,Object.setPrototypeOf(e,i.prototype),e}return function(t,i){function n(){this.constructor=t}Ge(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}(i,t),i}(Error),Ze=0,Ke=function(t,i){return new Xe("Event listener with "+t.token+" id does not exist at Eventer with "+i+" id.")},qe=function(){function t(){this.id=++Ze,this.lastEventIndex=0,this.topics=new Map}return t.prototype.on=function(t,i,n){var e,r,s=this.topics.get(t),o=n||(e=this.id,r=++this.lastEventIndex,{token:e+"-"+r,ownerIndex:e,id:r});return s?s.set(o,i):this.topics.set(t,new Map([[o,i]])),o},t.prototype.has=function(t,i){var n,e;if(i)return(o=this.topics.get(i))?(h=o.get(t))||Ke(t,this.id):new Xe("Eventer with "+t.ownerIndex+" does not have "+i+".");try{for(var r=He(this.topics),s=r.next();!s.done;s=r.next()){var o,h,u=je(s.value,2);u[0];if(h=(o=u[1]).get(t))return h}}catch(t){n={error:t}}finally{try{s&&!s.done&&(e=r.return)&&e.call(r)}finally{if(n)throw n.error}}return Ke(t,this.id)},t.prototype.off=function(t,i){var n,e;if(i)return!(!(o=this.topics.get(i))||!o.delete(t));try{for(var r=He(this.topics),s=r.next();!s.done;s=r.next()){var o,h=je(s.value,2);h[0];if((o=h[1]).delete(t))return!0}}catch(t){n={error:t}}finally{try{s&&!s.done&&(e=r.return)&&e.call(r)}finally{if(n)throw n.error}}return!1},t.prototype.allOff=function(){return this.topics.clear(),this},t.prototype.topicOff=function(t){return this.topics.delete(t)},t.prototype.emit=function(t){for(var i=[],n=1;n<arguments.length;n++)i[n-1]=arguments[n];var e=this.topics.get(t),r=0;return e&&e.forEach((function(t){t.apply(void 0,We(i)),r++})),r},t.prototype.listeners=function(t){var i=this.topics.get(t);return i||new Map},t}();t.GradientShape=void 0,(Ue=t.GradientShape||(t.GradientShape={})).circle="circle",Ue.ellipse="ellipse",t.GradientExtent=void 0,(Ye=t.GradientExtent||(t.GradientExtent={})).closestSide="closest-side",Ye.closestCorner="closest-corner",Ye.farthestSide="farthest-side",Ye.farthestCorner="farthest-corner";var Je=function(t){function i(i){var n=t.call(this,i)||this;if(n.type="fillstyle",null===i||i&&null===i.stops||i&&i.stops&&!Array.isArray(i.stops)||i&&i.stops&&Array.isArray(i.stops)&&i.stops.length<2)throw new Error("RadialGradientFill requires minimum two color stops to be defined.");return n}return n(i,t),i.prototype.toString=function(){return"radialGradientFill:"+this.shape+","+this.extent+","+this.position.x+","+this.position.y+","+this.stops.map((function(t){return t.offset+","+t.color.toString()})).join(",")},i.prototype.setColorStops=function(t){if(t.length<2)throw new Error("Minimum of two color stops required");return this.set("stops",t)},i.prototype.getColorStops=function(){return this.get("stops")},i.prototype.setPosition=function(t){return this.set("position",t)},i.prototype.getPosition=function(){return this.get("position")},i.prototype.setShape=function(t){return this.set("shape",t)},i.prototype.getShape=function(){return this.get("shape")},i.prototype.setExtent=function(t){return this.set("extent",t)},i.prototype.getExtent=function(){return this.get("extent")},i.prototype.createDefaultHighlightStyle=function(){return this.setColorStops(this.getColorStops().map((function(t){return{color:t.color.getHighlight(),offset:t.offset}})))},i.prototype.getDefaultHighlightStyle=function(){return this.It||(this.It=this.createDefaultHighlightStyle()),this.It},i}(me({stops:[{color:Fe("#f00"),offset:0},{color:Fe("#0f0"),offset:1}],position:l(.5,.5),shape:t.GradientShape.ellipse,extent:t.GradientExtent.farthestCorner})),Qe=function(t){function i(i){var n=t.call(this,i)||this;if(n.type="fillstyle",null===i||i&&null===i.stops||i&&i.stops&&!Array.isArray(i.stops)||i&&i.stops&&Array.isArray(i.stops)&&i.stops.length<2)throw new Error("LinearGradientFill requires minimum two color stops to be defined.");return n}return n(i,t),i.prototype.toString=function(){return"linearGradientFill:"+this.angle+","+this.stops.map((function(t){return t.offset+","+t.color.toString()})).join(",")},i.prototype.setColorStops=function(t){if(t.length<2)throw new Error("Minimum of two color stops required");var i=t.sort((function(t,i){return t.offset-i.offset}));return this.set("stops",i)},i.prototype.getColorStops=function(){return this.get("stops")},i.prototype.setAngle=function(t,i){return this.set("angle",i?wo(t):t)},i.prototype.getAngle=function(t){return t?go(this.get("angle")):this.get("angle")},i.prototype.createDefaultHighlightStyle=function(){return this.setColorStops(this.getColorStops().map((function(t){return{color:t.color.getHighlight(),offset:t.offset}})))},i.prototype.getDefaultHighlightStyle=function(){return this.It||(this.It=this.createDefaultHighlightStyle()),this.It},i}(me({stops:[{color:Fe("#f00"),offset:0},{color:Fe("#0f0"),offset:1}],angle:0})),$e=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.type="linestyle",i}return n(i,t),i.prototype.getDefaultHighlightStyle=function(){return this.Ot||(this.Ot=this.createDefaultHighlightStyle()),this.Ot},i}(me({fillStyle:new Ee({color:Ae(255,255,255)}),thickness:1,highlightThicknessMultiplier:2})),tr=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return n(i,t),i.prototype.createDefaultHighlightStyle=function(){return this},i}($e),ir=Object.assign(Object.create(new tr),{getDefaultHighlightStyle:function(){return this}}),nr=function(t){function i(i){return t.call(this,i)||this}return n(i,t),i.prototype.createDefaultHighlightStyle=function(){return this.setFillStyle(this.getFillStyle().getDefaultHighlightStyle()).setThickness(Math.abs(this.get("thickness"))*this.highlightThicknessMultiplier)},i.prototype.setFillStyle=function(t){return"function"==typeof t?this.set("fillStyle",t(this.getFillStyle())):this.set("fillStyle",t)},i}(function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return n(i,t),i.prototype.getFillStyle=function(){return this.get("fillStyle")},i.prototype.setThickness=function(t){return this.set("thickness",t)},i.prototype.getThickness=function(){return this.get("thickness")},i.prototype.setHighlightThicknessMultiplier=function(t){return this.set("highlightThicknessMultiplier",t)},i.prototype.getHighlightThicknessMultiplier=function(){return this.get("highlightThicknessMultiplier")},i}($e)),er={d1:function(t){return new t.scale1DConstructor(0,1,1,void 0)},d2:function(t){return(new t.scaleXYConstructor).Pt({x:0,y:0},{x:1,y:1},{x:1,y:1},void 0)}},rr=function(t,i,n){return i===n?t:n.Dt(i._t(t))},sr=function(t,i,n){if(i===n)return t;var r=i instanceof No?i.x:i.x instanceof No?i.x.x:i.x.Rt,s=i instanceof No?i.y:i.y instanceof No?i.y.y:i.y.Rt,o=n instanceof No?n.x:n.x instanceof No?n.x.x:n.x.Rt,h=n instanceof No?n.y:n.y instanceof No?n.y.y:n.y.Rt;return e(e({},t),{x:rr(t.x,r,o),y:rr(t.y,s,h)})},or=function(t,i,n){var e=t(i,n);return function(t){return new Ee({color:e(t)})}},hr=function(t,i,n){var e=t(i+1,n);return function(t){return new Je({stops:[{offset:0,color:e(t)},{offset:1,color:e(t).getDarker()}]})}},ur=function(t,i,n,e){var r=t(i+1,e);return function(t){return new Qe({stops:[{offset:0,color:r(t).getDarker()},{offset:.5,color:r(t)},{offset:1,color:r(t).getDarker()}],angle:n||90})}},ar=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];if(0===t.length)return{remove:Cr};var n=!1,e=function(i,e,r){n||(n=!0,t.filter((function(t){return t!==i})).forEach((function(t){return t.setInterval(e,r,!1,!0)})),n=!1)},r=t.map((function(t){return t.onScaleChange((function(i,n){return e(t,i,n)}))})),s={remove:function(){t.forEach((function(t,i){return t.offScaleChange(r[i])}))}};return s},fr=function(t){function i(n,e){var r,s="ChartError: "+n+" "+(e?"in "+e.constructor.name:"");return r=t.call(this,s)||this,Object.setPrototypeOf(r,i.prototype),r}return n(i,t),i}(Error);!function(t){function i(n,e){var r,s="Axis Error: "+n+" "+(e?"in "+e.constructor.name:"");return r=t.call(this,s)||this,Object.setPrototypeOf(r,i.prototype),r}n(i,t)}(Error);var cr,lr,dr,vr,yr=function(t){function i(n,e,r){void 0===r&&(r=!1);var s,o="EngineError: "+n+" "+(e?"in "+e.constructor.name:"");return s=t.call(this,o)||this,r&&wr.alert(o),Object.setPrototypeOf(s,i.prototype),s}return n(i,t),i}(Error),Sr=function(t){function i(n){var e=t.call(this,n)||this;return Object.setPrototypeOf(e,i.prototype),e}return n(i,t),i}(yr);!function(t){function i(n){var e,r="UnImplemented Error: "+n+"() is not implemented!";return e=t.call(this,r)||this,Object.setPrototypeOf(e,i.prototype),e}n(i,t)}(Error),t.UISpace=void 0,(cr=t.UISpace||(t.UISpace={}))[cr.Content=0]="Content",cr[cr.PaddedContent=1]="PaddedContent",cr[cr.PaddedBackground=2]="PaddedBackground",cr[cr.Everything=3]="Everything",t.UIVisibilityModes=void 0,(lr=t.UIVisibilityModes||(t.UIVisibilityModes={}))[lr.never=0]="never",lr[lr.always=1]="always",lr[lr.whenHovered=2]="whenHovered",lr[lr.whenDragged=3]="whenDragged",lr[lr.whenNotDragged=4]="whenNotDragged",lr[lr.whenHoveredOrDragged=5]="whenHoveredOrDragged",t.UIDraggingModes=void 0,(dr=t.UIDraggingModes||(t.UIDraggingModes={}))[dr.notDraggable=0]="notDraggable",dr[dr.draggable=1]="draggable",dr[dr.onlyHorizontal=2]="onlyHorizontal",dr[dr.onlyVertical=3]="onlyVertical",t.UIDirections=void 0,(vr=t.UIDirections||(t.UIDirections={}))[vr.Up=0]="Up",vr[vr.Right=1]="Right",vr[vr.Down=2]="Down",vr[vr.Left=3]="Left";var mr,br,gr,wr="undefined"!=typeof window?window:"undefined"!=typeof global&&global._lcjs?global._lcjs:{},pr=function(t,i){return t.x===i.x&&t.y===i.y},kr=function(t){return t!==Is&&t!==Os&&!Number.isNaN(t)&&Number.isFinite(t)&&t!==1/0&&t!==-1/0},xr=function(t,i){return Math.min(t,i.y)},Mr=function(t,i){return Math.max(t,i.y)},Ar=function(t){return t[1]},Fr=function(t){return t.restore()},Tr=function(t){return t.dispose()},Cr=function(){},Br=function(t,i){return t===i},Lr=function(t,i,n){return n>i?Math.min(Math.max(t,i),n):Math.min(Math.max(t,n),i)},Ir=function(t){return Array.prototype.concat.apply([],t)},Or=function(t,i){for(var n={x:t[0].length,y:t.length},e=n.x,r=n.y,s=i.column,o=i.row,h=Math.max(0,s.start),u=Math.min(e,s.end),a=Math.max(0,o.start),f=Math.min(r,o.end),c=u-h,l=f-a,d=Array.from(Array(l)).map((function(){return Array(c)})),v=a,y=0;v<f;v+=1,y+=1)for(var S=h,m=0;S<u;S+=1,m+=1)d[y][m]=t[v][S];return{sliced:d,rows:l,columns:c}},Pr=function(t,i){var n=i&&void 0!==i.row.start?i.row.start:0,e=i&&void 0!==i.row.end?i.row.end:t.y,r=i&&void 0!==i.column.start?i.column.start:0,s=i&&void 0!==i.column.end?i.column.end:t.x;return[Math.min(n,e),Math.max(n,e),Math.min(r,s),Math.max(r,s)]},Dr=function(t,i){for(;i;)t.push(t.shift()),i-=1},_r=function(t){var i,n,e=[];try{for(var r=o(t),s=r.next();!s.done;s=r.next()){var h=s.value;e.push(h.slice())}}catch(t){i={error:t}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return e},Rr=function(t,i){return void 0!==t?t:i},zr=function(t){return t.zt()},Er=function(t){return t.Et()},Nr=function(t){return t.Nt()},Vr=function(t){return t.Vt()},Gr=function(t){return t.Gt()},Hr=function(t){return t.Ht()},jr=function(t){return t.min.x},Wr=function(t){return t.max.x},Ur=function(t){return t.min.y},Yr=function(t){return t.max.y},Xr=function(t){return t.min.z},Zr=function(t){return t.max.z},Kr=function(t,i,n,e,r){if(t.length>0){for(var s=r?e(r):void 0,o=0;o<t.length;o+=1){var h=i(t[o]);void 0!==h&&(s=void 0!==s?n(s,h):h)}return s}if(r)return e(r)},qr=function(t,i){return t.position===i.position&&t.high===i.high&&t.low===i.low},Jr=function(t){return t?function(t){return t.restore()}:function(t){return t.dispose()}},Qr=l(0,1),$r=l(1,0),ts=l(0,-1),is=l(-1,0),ns=l(0,0),es=function(i){switch(i){case t.UIDirections.Up:return Qr;case t.UIDirections.Right:return $r;case t.UIDirections.Down:return ts;case t.UIDirections.Left:return is;default:return ns}},rs=function(i){return i===t.UIDirections.Left||i===t.UIDirections.Right},ss=function(t){t.stopPropagation(),t.preventDefault()},os=function(t,i){if(!i){for(var n=t.length,e=new Float32Array(2*n),r=0,s=0;s<n;s+=1){var o=t[s];e[r+0]=o.x,e[r+1]=o.y,r+=2}return e}var h=t.length,u=new Float32Array(4*h),a=0;for(s=0;s<h;s+=1){o=t[s];var f=Math.fround(o.x),c=Math.fround(o.y);u[a+0]=f,u[a+1]=c,u[a+2]=o.x-f,u[a+3]=o.y-c,a+=4}return u},hs=function(t){for(var i=t.length,n=new Float32Array(3*i),e=0,r=0;r<i;r+=1){var s=t[r];n[e+0]=s.x,n[e+1]=s.y,n[e+2]=s.z,e+=3}return n},us=function(t,i){if(!i){for(var n=t.length,e=new Float32Array(3*n),r=0,s=0;r<n;r+=1){var o=t[r];e[s+0]=o.x,e[s+1]=o.y,e[s+2]=void 0!==o.value?o.value:0,s+=3}return e}var h=t.length,u=new Float32Array(5*h),a=0;for(r=0;r<h;r+=1){o=t[r];var f=Math.fround(o.x),c=Math.fround(o.y);u[a+0]=f,u[a+1]=c,u[a+2]=o.x-f,u[a+3]=o.y-c,u[a+4]=void 0!==o.value?o.value:0,a+=5}return u},as=function(t,i){var n=i&&i.getSize(),e={x:1,y:1,z:1};"object"==typeof n&&(e=n);for(var r=t.length,s=new Float32Array(6*r),o=0,h=0;h<r;h+=1){var u=t[h];s[o+0]=u.x,s[o+1]=u.y,s[o+2]=u.z;var a=void 0!==u.sizeAxisX?u.sizeAxisX:e.x,f=void 0!==u.sizeAxisY?u.sizeAxisY:e.y,c=void 0!==u.sizeAxisZ?u.sizeAxisZ:e.z;s[o+3]=a,s[o+4]=f,s[o+5]=c,o+=6}return s},fs=function(t,i){for(var n=i&&i instanceof Ne&&i.getFallbackColor()||Me,e=t.length,r=new Float32Array(7*e),s=0,o=0;s<e;s+=1){var h=t[s];r[o+0]=h.x,r[o+1]=h.y,r[o+2]=h.z;var u=h.color||n;r[o+3]=u.r,r[o+4]=u.g,r[o+5]=u.b,r[o+6]=u.a,o+=7}return r},cs=function(t,i){var n=i&&i.getSize(),e=1;"number"==typeof n&&(e=n);for(var r=t.length,s=new Float32Array(4*r),o=0,h=0;o<r;o+=1){var u=t[o];s[h+0]=u.x,s[h+1]=u.y,s[h+2]=u.z;var a=void 0!==u.size?u.size:e;s[h+3]=a,h+=4}return s},ls=function(t){for(var i=t.length,n=new Float32Array(4*i),e=0,r=0;e<i;e+=1){var s=t[e];n[r+0]=s.x,n[r+1]=s.y,n[r+2]=s.z,n[r+3]=void 0!==s.value?s.value:0,r+=4}return n},ds=function(t){return function(i){var n=t.indexOf(i);n>=0&&t.splice(n,1)}},vs=function(t){return function(i){t.indexOf(i)<0&&t.push(i)}},ys=function(t,i,n){var e=function(t,i){if(i<Is&&i>Os&&t<Is&&t>Os){var n=Math.abs(t/Math.pow(2,23)),e=Math.abs(i/Math.pow(2,23)),r=Math.min(n,e);return Math.pow(10,Math.floor(Math.log10(r)))}}(t,i);if(void 0!==e)return e*n},Ss=function(t){for(var i=t.length,n=0;n<i-1;n+=1)t[n].x===t[n+1].x&&t[n].y===t[n+1].y&&(t.splice(n,1),n-=1,i-=1);return t},ms=function(t){var i=Math.log(t);return function(t){return Math.log(t)/i}},bs=ms(Math.E),gs=function(t,i){var n=i[t];return n?n():void 0},ws=function(t,i){var n;if(i)n=i;else{for(var e={x:0,y:0},r=0;r<t.length;r+=1)e.x+=t[r].x/t.length,e.y+=t[r].y/t.length;n=e}return t.sort((function(t,i){return po(co(t,n))-po(co(i,n))}))},ps=function(t,i,n){if(0===t.length)return!1===n.canReturnB?i.slice():i;var e=i.length;if(e<1e5)return t.push.apply(t,i),t;for(var r=0;r<e;r+=1)t.push(i[r]);return t},ks=(mr=function(t){return 255===t.getColor().getA()?t:new Ee({color:t.getColor().setA(255)})},br=function(t){if(t){if(t instanceof Ee){if(0===t.getColor().getA())return;return mr(t)}if(t instanceof Je||t instanceof Qe)return t}},gr=function(t,i){return new Qe({angle:0,stops:[{offset:0,color:i.getColor()},{offset:.5,color:i.getColor()},{offset:.5,color:t.getColor()},{offset:1,color:t.getColor()}]})},function(t,i,n){var e,r,s,o=[],u=[];if(n.fill&&((e=n.fill)instanceof c?(o.push(e.L()),u.push(e.P())):o.push(e)),n.fill2&&((e=n.fill2)instanceof c?(o.push(e.L()),u.push(e.P())):o.push(e)),n.stroke){var a=n.stroke,f=void 0,l=void 0;a instanceof c?(f=a.L(),l=a.P()):(f=a,l=void 0),f instanceof nr&&o.push(f.getFillStyle()),l&&l instanceof nr&&u.push(l.getFillStyle())}if(n.point3D){var d=n.point3D,v=d.L(),y=d.P();o.push(v.getFillStyle()),y&&u.push(y.getFillStyle())}if(n.behavior&&!0===n.behavior.colorStep){var S=h(o.reduce((function(t,i){if(t[0]&&t[1])return t;if(i instanceof Ee&&0!==i.getColor().getA()){var n=mr(i);void 0===t[0]?t[0]=n:t[1]=n}return t}),[void 0,void 0]),2),m=S[0],b=S[1];m&&b?(r=gr(m,b),s=gr(m.getDefaultHighlightStyle(),b.getDefaultHighlightStyle())):(r=i.uiButtonFillStyle,s=void 0)}else r=o.reduce((function(t,i){return t||br(i)}),void 0)||i.uiButtonFillStyle,s=u.reduce((function(t,i){return t||br(i)}),void 0);t.setButtonOffFillStyle(new Ee({color:Ae(255,255,255,0)})).setButtonOffStrokeStyle(i.uiBackgroundStrokeStyle).setButtonOnFillStyle(r).setButtonOnFillStyleHighlight(s).setButtonOnStrokeStyle(ir)}),xs=function(t){var i=t instanceof c?t.L():t;if(i instanceof Ve)return{lut:i.getPalette(),lookUpProperty:i.getLookUpProperty()}},Ms=function(t){var i=0;return function(){return t+"-"+(i+=1)}},As=function(t,i){for(var n="string"==typeof t?t:String(t),e=n.indexOf("."),r=e>=0?e:n.length;r<i;r+=1)n="0"+n;return n},Fs=function(t,i){return"function"==typeof t?t(i):t},Ts=function(t,i,n){var e=t||n;return"function"==typeof e?e(i):e},Cs=function(t){return t.ctrlKey?.2*Math.sign(t.deltaY):Math.sign(t.deltaY)},Bs=function(t,i){void 0===i&&(i=Cr),i()},Ls={add:function(t,i){return y(t.x+i,t.y+i,t.z+i)},addVec:function(t){for(var i,n,e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var s={x:t.x,y:t.y,z:t.z};try{for(var h=o(e),u=h.next();!u.done;u=h.next()){var a=u.value;s.x+=a.x,s.y+=a.y,s.z+=a.z}}catch(t){i={error:t}}finally{try{u&&!u.done&&(n=h.return)&&n.call(h)}finally{if(i)throw i.error}}return s},subtract:function(t,i){return y(t.x-i,t.y-i,t.z-i)},subtractVec:function(t){for(var i,n,e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var s={x:t.x,y:t.y,z:t.z};try{for(var h=o(e),u=h.next();!u.done;u=h.next()){var a=u.value;s.x-=a.x,s.y-=a.y,s.z-=a.z}}catch(t){i={error:t}}finally{try{u&&!u.done&&(n=h.return)&&n.call(h)}finally{if(i)throw i.error}}return s},multiply:function(t,i){return y(t.x*i,t.y*i,t.z*i)},divide:function(t,i){return y(t.x/i,t.y/i,t.z/i)},multiplyVec:function(t){for(var i,n,e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var s={x:t.x,y:t.y,z:t.z};try{for(var h=o(e),u=h.next();!u.done;u=h.next()){var a=u.value;s.x*=a.x,s.y*=a.y,s.z*=a.z}}catch(t){i={error:t}}finally{try{u&&!u.done&&(n=h.return)&&n.call(h)}finally{if(i)throw i.error}}return s},divideVec:function(t){for(var i,n,e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var s={x:t.x,y:t.y,z:t.z};try{for(var h=o(e),u=h.next();!u.done;u=h.next()){var a=u.value;s.x/=a.x,s.y/=a.y,s.z/=a.z}}catch(t){i={error:t}}finally{try{u&&!u.done&&(n=h.return)&&n.call(h)}finally{if(i)throw i.error}}return s},length:function(t){return Math.sqrt(t.x*t.x+t.y*t.y+t.z*t.z)},normalize:function(t){return Ls.divide(t,Ls.length(t))},dot:function(t,i){return t.x*i.x+t.y*i.y+t.z*i.z},cross:function(t,i){return y(t.y*i.z-t.z*i.y,t.z*i.x-t.x*i.z,t.x*i.y-t.y*i.x)},angle:function(t,i){return Math.acos(Ls.dot(t,i)/(Ls.length(t)*Ls.length(i)))},rotateAroundAxis:function(t,i,n){var e=Math.cos(n),r=Math.sin(n),s=Ls.dot(i,t),o=Ls.cross(i,t);return Ls.addVec(Ls.multiply(t,e),Ls.addVec(Ls.multiply(i,(1-e)*s),Ls.multiply(o,r)))},lerp:function(t,i,n){return n=Lr(n,0,1),Ls.addVec(Ls.multiply(t,1-n),Ls.multiply(i,n))},equals:function(t,i){return Br(t.x,i.x)&&Br(t.y,i.y)&&Br(t.z,i.z)},abs:function(t){return{x:Math.abs(t.x),y:Math.abs(t.y),z:Math.abs(t.z)}},sign:function(t){return{x:Math.sign(t.x),y:Math.sign(t.y),z:Math.sign(t.z)}}},Is=Number.MAX_SAFE_INTEGER,Os=-Number.MAX_SAFE_INTEGER,Ps=b(l(Is,Is),l(Os,Os)),Ds=b(y(Is,Is,Is),y(Os,Os,Os)),_s=function(t,i){var n=Math.log(t)/Math.log(i);return Math.floor(function(t){return Math.ceil(t)-t<1e-4?t=Math.ceil(t):t-Math.floor(t)<1e-4&&(t=Math.floor(t)),t}(n))},Rs=function(t,i){return!(i.min.x>t.max.x||i.max.x<t.min.x||i.min.y>t.max.y||i.max.y<t.min.y)},zs=function(t,i){return!(t[1].x<i[0].x||t[0].x>i[1].x||t[3].y<i[0].y||t[0].y>i[3].y)},Es=function(t,i){return b(l(Math.max(Math.min(t[0].x,t[2].x),Math.min(i[0].x,i[2].x)),Math.max(Math.min(t[0].y,t[2].y),Math.min(i[0].y,i[2].y))),l(Math.min(Math.max(t[0].x,t[2].x),Math.max(i[0].x,i[2].x)),Math.min(Math.max(t[0].y,t[2].y),Math.max(i[0].y,i[2].y))))},Ns=function(t,i){return i+t},Vs=function(t,i,n){var e=co(i,t),r=e.x*e.x+e.y*e.y;if(0===r)return t;var s=co(n,t),o=(s.x*e.x+s.y*e.y)/r;return o<=0?t:o>=1?i:l(t.x+o*e.x,t.y+o*e.y)},Gs=function(t,i,n){return n>i?t>=i&&t<=n:t>=n&&t<=i},Hs=function(t,i){var n=t.x-i.x,e=t.y-i.y;return Math.sqrt(n*n+e*e)},js=function(t,i){var n=t.x-i.x,e=t.y-i.y;return n*n+e*e},Ws=function(t,i,n){var e=js(i,n);if(0===e)return[js(t,i),i];var r=So(co(t,i),co(n,i))/e;r=Math.max(0,Math.min(1,r));var s=l(i.x+r*(n.x-i.x),i.y+r*(n.y-i.y));return[js(t,s),s]},Us=function(t,i,n){return fo(t,ao(co(i,t),n))},Ys=function(t,i,n){return Ls.addVec(t,Ls.multiply(Ls.subtractVec(i,t),n))},Xs=function(t,i,n){for(var e=n.length,r=0;r<e;r+=3)if(eo.jt(t,i[n[r]],i[n[r+1]],i[n[r+2]])&&$s(t,i[n[r]],i[n[r+1]],i[n[r+2]]))return!0;return!1},Zs=function(t,i){for(var n=i.length,e={x:0,y:0},r={x:0,y:0},s={x:0,y:0},o=0;o<n;o+=2)if(e.x=i[o+0],e.y=i[o+1],r.x=i[o+2],r.y=i[o+3],s.x=i[o+4],s.y=i[o+5],eo.jt(t,e,r,s)&&$s(t,e,r,s))return!0;return!1};function Ks(t){var i=t.length;if(i>0){for(var n=t[0].x,e=t[0].x,r=t[0].y,s=t[0].y,o=0;o<i;o+=1){var h=t[o];h.x>n&&(n=h.x),h.x<e&&(e=h.x),h.y>r&&(r=h.y),h.y<s&&(s=h.y)}return b(l(e,s),l(n,r))}return Ps}function qs(t){var i=t.length;if(i>0){for(var n=t[0].x,e=t[0].x,r=t[0].y,s=t[0].y,o=t[0].z,h=t[0].z,u=0;u<i;u+=1){var a=t[u];a.x>n&&(n=a.x),a.x<e&&(e=a.x),a.y>r&&(r=a.y),a.y<s&&(s=a.y),a.z>o&&(o=a.z),a.z<h&&(h=a.z)}return b(y(e,s,h),y(n,r,o))}return Ds}var Js=function(t,i){return b(l(t.min.x<i.min.x?t.min.x:i.min.x,t.min.y<i.min.y?t.min.y:i.min.y),l(t.max.x>i.max.x?t.max.x:i.max.x,t.max.y>i.max.y?t.max.y:i.max.y))},Qs=function(t,i){return b(y(t.min.x<i.min.x?t.min.x:i.min.x,t.min.y<i.min.y?t.min.y:i.min.y,t.min.z<i.min.z?t.min.z:i.min.z),y(t.max.x>i.max.x?t.max.x:i.max.x,t.max.y>i.max.y?t.max.y:i.max.y,t.max.z>i.max.z?t.max.z:i.max.z))};function $s(t,i,n,e){var r=t.x-e.x,s=t.y-e.y,o=e.x-n.x,h=n.y-e.y,u=h*r+o*s,a=(e.y-i.y)*r+(i.x-e.x)*s,f=h*(i.x-e.x)+o*(i.y-e.y);return f<0?u<=0&&a<=0&&u+a>=f:u>=0&&a>=0&&u+a<=f}function to(t,i,n){for(var e=fo(n,i[0]),r=i.length-2,s=0;s<r;s+=1)if($s(t,e,fo(n,i[s+1]),fo(n,i[s+2])))return!0;return!1}function io(t,i,n,e){var r=lo(oo(co(n,i)),e),s=lo(ho(i=co(i,r),n=fo(n,r)),e);return $s(t,co(i,s),fo(i,s),fo(n,s))||$s(t,fo(n,s),co(n,s),co(i,s))}var no=function(t,i,n,e){return l((t.x+i.x+n.x+e.x)/4,(t.y+i.y+n.y+e.y)/4)},eo={Wt:function(t,i,n){if(i.x>n.x){if(t.x>i.x)return!1;if(t.x<n.x)return!1}else{if(t.x>n.x)return!1;if(t.x<i.x)return!1}if(i.y>n.y){if(t.y>i.y)return!1;if(t.y<n.y)return!1}else{if(t.y>n.y)return!1;if(t.y<i.y)return!1}return!0},jt:function(t,i,n,e){if(i.x>n.x)if(i.x>e.x){if(t.x>i.x)return!1;if(n.x<e.x){if(t.x<n.x)return!1}else if(t.x<e.x)return!1}else{if(t.x>e.x)return!1;if(t.x<n.x)return!1}else if(n.x>e.x){if(t.x>n.x)return!1;if(i.x<e.x){if(t.x<i.x)return!1}else if(t.x<e.x)return!1}else{if(t.x>e.x)return!1;if(i.x<e.x){if(t.x<i.x)return!1}else if(t.x<e.x)return!1}if(i.y>n.y)if(i.y>e.y){if(t.y>i.y)return!1;if(n.y<e.y){if(t.y<n.y)return!1}else if(t.y<e.y)return!1}else{if(t.y>e.y)return!1;if(t.y<n.y)return!1}else if(n.y>e.y){if(t.y>n.y)return!1;if(i.y<e.y){if(t.y<i.y)return!1}else if(t.y<e.y)return!1}else{if(t.y>e.y)return!1;if(i.y<e.y){if(t.y<i.y)return!1}else if(t.y<e.y)return!1}return!0},Ut:function(t,i,n){return!(t.x>n.x)&&(!(t.y>n.y)&&(!(t.x<i.x)&&!(t.y<i.y)))},Yt:function(t,i,n,e,r){if(i.x>n.x)if(i.x>e.x)if(i.x>r.x){if(t.x>i.x)return!1;if(r.x<e.x){if(r.x<n.x){if(t.x<r.x)return!1}else if(t.x<n.x)return!1}else if(e.x<n.x){if(t.x<e.x)return!1}else if(t.x<n.x)return!1}else{if(t.x>r.x)return!1;if(e.x<n.x){if(t.x<e.x)return!1}else if(t.x<n.x)return!1}else if(e.x>r.x){if(t.x>e.x)return!1;if(r.x<n.x){if(t.x<r.x)return!1}else if(t.x<n.x)return!1}else{if(t.x>r.x)return!1;if(t.x<n.x)return!1}else if(n.x>e.x)if(n.x>r.x){if(t.x>n.x)return!1;if(r.x<e.x){if(r.x<i.x){if(t.x<r.x)return!1}else if(t.x<i.x)return!1}else if(e.x<i.x){if(t.x<e.x)return!1}else if(t.x<i.x)return!1}else{if(t.x>r.x)return!1;if(e.x<i.x){if(t.x<e.x)return!1}else if(t.x<i.x)return!1}else if(e.x>r.x){if(t.x>e.x)return!1;if(r.x<i.x){if(t.x<r.x)return!1}else if(t.x<i.x)return!1}else{if(t.x>r.x)return!1;if(e.x<i.x){if(t.x<e.x)return!1}else if(t.x<i.x)return!1}if(i.y>n.y)if(i.y>e.y)if(i.y>r.y){if(t.y>i.y)return!1;if(r.y<e.y){if(r.y<n.y){if(t.y<r.y)return!1}else if(t.y<n.y)return!1}else if(e.y<n.y){if(t.y<e.y)return!1}else if(t.y<n.y)return!1}else{if(t.y>r.y)return!1;if(e.y<n.y){if(t.y<e.y)return!1}else if(t.y<n.y)return!1}else if(e.y>r.y){if(t.y>e.y)return!1;if(r.y<n.y){if(t.y<r.y)return!1}else if(t.y<n.y)return!1}else{if(t.y>r.y)return!1;if(t.y<n.y)return!1}else if(n.y>e.y)if(n.y>r.y){if(t.y>n.y)return!1;if(r.y<e.y){if(r.y<i.y){if(t.y<r.y)return!1}else if(t.y<i.y)return!1}else if(e.y<i.y){if(t.y<e.y)return!1}else if(t.y<i.y)return!1}else{if(t.y>r.y)return!1;if(e.y<i.y){if(t.y<e.y)return!1}else if(t.y<i.y)return!1}else if(e.y>r.y){if(t.y>e.y)return!1;if(r.y<i.y){if(t.y<r.y)return!1}else if(t.y<i.y)return!1}else{if(t.y>r.y)return!1;if(e.y<i.y){if(t.y<e.y)return!1}else if(t.y<i.y)return!1}return!0}};function ro(t,i,n){return l(Math.cos(n)*(t.x-i.x)+Math.sin(n)*(t.y-i.y)+i.x,-Math.sin(n)*(t.x-i.x)+Math.cos(n)*(t.y-i.y)+i.y)}function so(t,i){return l(t.x-i.x,t.y-i.y)}function oo(t){var i=uo(t);return 0===i?l(0,0):l(t.x/i,t.y/i)}function ho(t,i){var n={x:i.x-t.x,y:i.y-t.y};n=oo(n);var e=Math.PI/2,r=n.x;return n.x=-Math.sin(e)*n.y,n.y=r*Math.sin(e),n}function uo(t){return Math.sqrt(t.x*t.x+t.y*t.y)}function ao(t,i){return l(t.x*i,t.y*i)}function fo(t,i){return l(t.x+i.x,t.y+i.y)}function co(t,i){return l(t.x-i.x,t.y-i.y)}function lo(t,i){return l(t.x*i.x,t.y*i.y)}function vo(t,i){return l(t.x/i.x,t.y/i.y)}function yo(t){return ao(t,-1)}function So(t,i){return t.x*i.x+t.y*i.y}var mo=function(t,i,n){var e=(n.y-i.y)/(n.x-i.x),r=i.y+(t-i.x)*e;return l(t,r)},bo=function(t,i,n){var e=(n.y-i.y)/(n.x-i.x),r=i.x+(t-i.y)/e;return l(r,t)};function go(t){return t*Math.PI/180}function wo(t){return 180*t/Math.PI}function po(t){return 180*Math.atan2(t.y,t.x)/Math.PI}function ko(t){return l(Math.cos(t),Math.sin(t))}function xo(t){var i=-1,n=Math.cos(t),e=Math.sin(t);return n>0&&n<1&&e>0&&e<1?i=1:n<0&&n>-1&&e>0&&e<1?i=2:n<0&&n>-1&&e<0&&e>-1?i=3:n>0&&n<1&&e<0&&e>-1&&(i=4),i}var Mo=function(t,i,n,e){var r,s,o,h;if(i.x-t.x!=0||e.x-n.x!=0)return i.x-t.x==0?(o=i.x,h=(s=(e.y-n.y)/(e.x-n.x))*(o-n.x)+n.y):e.x-n.x==0?(o=e.x,h=(r=(i.y-t.y)/(i.x-t.x))*(o-t.x)+t.y):(r=(i.y-t.y)/(i.x-t.x),s=(e.y-n.y)/(e.x-n.x),h=r*((o=(n.y-s*n.x+r*t.x-t.y)/(r-s))-t.x)+t.y),l(o,h)},Ao=function(t,i){var n=t.length,e=i.length,r=new Uint16Array(n+e);return r.set(t,0),r.set(i,n),r},Fo=function(t,i){for(var n=[],e=Math.sin(i),r=Math.cos(i),s=0;s<t.length;s+=1)n[s]={x:t[s].x*r+t[s].y*e,y:t[s].y*r-t[s].x*e};return n},To=function(t){function i(i,n,e,r){var s=t.call(this)||this;if(s.Xt=i,s.Zt=n,s.Kt=e,s.qt=!0,s.Jt=!0,s.Qt=[0,0],s.$t=!0,s.ti=i,s.ii=n,r){var o=r.ni(s.ei.bind(s));s.ei(r.S()),s.ri=function(){return r.si(o)}}return s}return n(i,t),i.prototype.oi=function(t){return this.hi=t,this.Jt=!0,this},i.prototype.ai=function(t){return this.Qt=t.map(Math.abs),this.$t=!0,this},i.prototype.fi=function(){return this.Xt/this.Kt*this.hi+this.Qt[0]},i.prototype.ci=function(){return(this.Xt+this.Zt)/this.Kt*this.hi-this.Qt[1]},i.prototype.li=function(){return this.getCellSize()-this.di()},i.prototype.vi=function(){return this.hi},i.prototype.getCellSize=function(){return this.yi(this.hi)},i.prototype.di=function(){return this.Qt[0]+this.Qt[1]},i.prototype.Si=function(){return this.Qt},i.prototype.ei=function(t){var i=this;this.Kt=t.reduce(Ns,0),this.Xt=t.reduce((function(t,n,e){return e>=i.ti?t:t+n}),0),this.Zt=t.reduce((function(t,n,e){return e>=i.ti&&e<i.ti+i.ii?t+n:t}),0),this.qt=!0,this.mi()},i.prototype.yi=function(t){return t*this.Zt/this.Kt},i.prototype.bi=function(){return t.prototype.bi.call(this),this.Jt=!1,this.$t=!1,this.qt=!1,this},i.prototype.gi=function(){return t.prototype.gi.call(this),this.Jt=!0,this.$t=!0,this.qt=!0,this},i}(function(){function t(){this.wi=!0}return t.prototype.getInnerStart=function(){return this.pi},t.prototype.getInnerEnd=function(){return this.ki},t.prototype.getInnerInterval=function(){return Math.abs(this.ki-this.pi)},t.prototype.xi=function(t,i){return this.pi=t,this.ki=i,this},t.prototype.bi=function(){return this.wi=!1,this},t.prototype.gi=function(){return this.wi=!0,this},t}()),Co=function(t){function i(i,n,e,r){var s=t.call(this,i,n,e,r)||this;return s.Mi={internal:10,function:Bo(10),number:10},s.hi=1e3,s.xi(1,1e3),s.Ai=s.Fi(),s}return n(i,t),i.prototype.Ti=function(t,i,n,e,r){if(t===i)return!1;var s=Math.min(t,i)<Io,o=Math.max(t,i)>Oo;return!s&&!o||!!r&&(i>t?{start:s?Io:t,end:o?Oo:i}:{start:o?Oo:t,end:s?Io:i})},i.prototype._t=function(t){var i=this.fi(),n=this.ci(),e=Math.max(t,Io);return i+(this.Mi.function(e)-this.Ai.scaleStartLog)/this.Ai.scaleIntervalLog*(n-i)},i.prototype.Dt=function(t){var i=this.fi(),n=(t-i)/(this.ci()-i),e=this.Ai.scaleStartLog+n*this.Ai.scaleIntervalLog;return Math.pow(this.Mi.number,e)},i.prototype.mi=function(){this.Mi&&this.Fi()},i.prototype.xi=function(i,n){return t.prototype.xi.call(this,i,n),this.Mi&&this.Fi(),this},i.prototype.ai=function(i){return t.prototype.ai.call(this,i),this.Mi&&this.Fi(),this},i.prototype.oi=function(i){return t.prototype.oi.call(this,i),this.Mi&&this.Fi(),this},i.prototype.Ci=function(t){return this.Mi={internal:t,function:Bo(t),number:Lo(t)},this},i.prototype.Bi=function(){return this.Mi.internal},i.prototype.Li=function(t,i){var n=this._t(t)+i;return this.Dt(n)},Object.defineProperty(i.prototype,"Ii",{get:function(){return this.Jt||this.wi||this.$t||this.qt},enumerable:!1,configurable:!0}),i.prototype.Fi=function(){var t=this.Mi.function(this.pi),i=this.Mi.function(this.ki)-t,n=2*this.fi()/this.hi-1,e=2*this.ci()/this.hi-1-n;return this.Ai={scaleStartLog:t,scaleIntervalLog:i,viewportStart:n,viewportSize:e},this.Ai},i.prototype.Oi=function(){return this.Ai},i}(To),Bo=function(t){return"e"===t?bs:ms(t)},Lo=function(t){return"e"===t?Math.E:t},Io=.9*Math.pow(10,-9),Oo=1.1*Math.pow(10,32),Po=["K","M","B","T"],Do=function(t,i,n){var e=Math.abs(n-i),r=Math.max(2-_s(e,10),0);return t.toFixed(r)},_o={Numeric:function(t,i){return Do(t,i.getInnerStart(),i.getInnerEnd())},NumericUnits:function(t,i){var n=Math.abs(i.getInnerEnd()-i.getInnerStart()),e=t<0;t=Math.abs(t);var r=_s(t,1e3),s=Math.pow(1e3,r),o="",h="";if(n>=1e3&&t>=1e3){for(var u=Math.pow(10,_s(n,10)-1),a=Math.round(t/u)*u/s,f=r;f>0;){var c=Math.min(f,Po.length)-1;h=Po[c]+h,f-=c+1}o=(e?"-":"")+a}else{for(a=String(Math.floor(t)),f=1;f<=r;f+=1){var l=a.length-(3*f+(f-1));a=a.substring(0,l)+" "+a.substring(l,a.length)}o=(e?"-":"")+a+(n<=10?function(t,i){if(0===i)return"";var n=(Math.abs(t)-Math.abs(Math.floor(t))).toString().substring(1);return n.length>i&&(n=n.substring(0,i+1)),n}(t,2-_s(n,10)):"")}return o+=h}},Ro=function(t,i){var n=Bo(i);return"e"===i?t?function(t,i){return Math.floor(n(t))+"e"}:function(){return""}:function(t,i){var e=t.toString();if(t>1)return e;var r=Math.floor(n(t));return t.toFixed(Math.abs(r))}},zo=function(t){function i(i,n,e,r){var s=t.call(this,i,n,e,r)||this;return s.Pi=!1,s.Ii=!1,s.Di=0,s.hi=1e3,s.xi(0,10),s._i(),s}return n(i,t),i.prototype.Ti=function(t,i,n,e,r){if(t===i)return!1;var s=Math.abs(e-n),o=Math.abs(i-t);if(!this.Pi){var h=ys(t,i,this.getCellSize());if(void 0===h)return!1;if(o>h)return!0;var u=(i+t)/2,a=(r?h/2:s/2)*(t>i?-1:1);return{start:u-a,end:u+a}}var f=Math.pow(10,-(12-Math.log10(Math.max(Math.abs(t),1))));if(o>f)return!0;var c=(i+t)/2,l=(r?f/2:s/2)*(t>i?-1:1);return{start:c-l,end:c+l}},i.prototype.mi=function(){this._i()},i.prototype._t=function(t){return this.fi()+(t-this.pi)/(this.ki-this.pi)*(this.ci()-this.fi())},i.prototype.Dt=function(t){return this.pi+(t-this.fi())/(this.ci()-this.fi())*(this.ki-this.pi)},i.prototype.xi=function(i,n){return t.prototype.xi.call(this,i,n),this._i(),this},i.prototype.ai=function(i){return t.prototype.ai.call(this,i),this._i(),this},i.prototype.oi=function(i){return t.prototype.oi.call(this,i),this.Ri=Eo(this.ki-this.pi,this.Qt,this.hi,this.Zt,this.Kt),this._i(),this},i.prototype.zi=function(){return this.Pi=!0,this},i.prototype.Ei=function(){return this.Pi},i.prototype.Ni=function(){return Math.abs(this.Vi)},i.prototype.Gi=function(){return this.Ni()/this.Ri},i.prototype.Hi=function(){return this.bt},i.prototype.ji=function(){return this.St},i.prototype.getPixelSize=function(){return this.Ri},i.prototype.Oi=function(){return this.Ai},i.prototype.gi=function(){return t.prototype.gi.call(this),this.Ii=!0,this},i.prototype.bi=function(){return t.prototype.bi.call(this),this.Ii=!1,this},i.prototype.Wi=function(t,i){return void 0===i&&(i=_o.Numeric),i(t,this)},i.prototype.Ui=function(){var t=Math.abs(this.getInnerEnd()).toString().length,i=Math.abs(this.getInnerStart()).toString().length;return t>i?t:i},i.prototype.Yi=function(t){return Eo(t,this.Qt,this.hi,this.Zt,this.Kt)},i.prototype._i=function(){var t=this.pi,i=this.ki,n=0;this.Pi&&(t=0,i=this.ki-this.pi,n=this.pi);var e=i-t,r=Eo(e,this.Qt,this.hi,this.Zt,this.Kt);this.St=t-this.Qt[0]*r,this.bt=i+this.Qt[1]*r;var s=this.bt-this.St,o=s-this.Vi,h=Math.abs(o/r),u=e-this.Di,a=Math.abs(u/r);(!this.Ai||h>=.4||a>=.4)&&(this.Di=e,this.Vi=s,this.Ri=r,this.Ii=!0);var f=this.Vi*this.Kt/(2*this.Zt),c=-(this.St-this.Vi*this.Xt/this.Zt)-f,l=2*this.fi()/this.hi-1,d=2*this.ci()/this.hi-1-l;this.Ai={displacement:c,scaling:f,highPrecisionOffset:n,viewportStart:l,viewportSize:d,scaleStartLog:0,scaleIntervalLog:0}},i.prototype.Li=function(t,i){return t+this.Ri*i},i}(To),Eo=function(t,i,n,e,r){return void 0===e&&(e=1),void 0===r&&(r=1),t/(n*e/r-(i[0]+i[1]))},No=function(){function t(){}return t.prototype.Xi=function(t,i){return"x"in t?(this.x=t.x,this.y=t.y):(this.x=t,this.y=i),this},t.prototype.bi=function(){return this.x.bi(),this.y.bi(),this},t.prototype.gi=function(){return this.x.gi(),this.y.gi(),this},t.prototype.oi=function(t,i){return"object"==typeof t?(this.x.oi(t.x),this.y.oi(t.y)):(this.x.oi(t),this.y.oi(i)),this},t.prototype.vi=function(){return l(this.x.vi(),this.y.vi())},t.prototype.Zi=function(t){return this.x.ai(t),this},t.prototype.Ki=function(t){return this.y.ai(t),this},t.prototype.di=function(){return l(this.x.di(),this.y.di())},t.prototype.qi=function(t,i){return this.x.xi(t,i),this},t.prototype.Ji=function(t,i){return this.y.xi(t,i),this},t.prototype.getInnerIntervalPixels=function(){var t=this.x.getCellSize(),i=this.y.getCellSize();return{x:t-this.x.di(),y:i-this.y.di()}},t.prototype.Qi=function(){return this.x.Ii||this.y.Ii},t}(),Vo=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.$i="LinearScaleXY",i}return n(i,t),i.prototype.Pt=function(t,i,n,e){return this.x=new zo(t.x,i.x,n.x,e?e.x:void 0),this.y=new zo(t.y,i.y,n.y,e?e.y:void 0),this},i.prototype.Ei=function(){return this.x.Ei()||this.y.Ei()},i.prototype.tn=function(){return l(this.x.getPixelSize(),this.y.getPixelSize())},i.prototype.Oi=function(){return{x:this.x.Oi(),y:this.y.Oi()}},i.prototype.Li=function(t,i){var n=this.tn();return{x:t.x+i.x*n.x,y:t.y+i.y*n.y}},i.prototype.nn=function(t,i,n,e){var r=this.tn(),s=ho(t,i);return s.x*=e,s.y*=e,{x:t.x+n*r.x*s.x,y:t.y+n*r.y*s.y}},i}(No),Go=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.$i="MixedScaleXY",i}return n(i,t),i.prototype.Ei=function(){return!1},i.prototype.Li=function(t,i){var n=this.x._t(t.x),e=this.y._t(t.y),r={x:n+i.x,y:e+i.y};return{x:this.x.Dt(r.x),y:this.y.Dt(r.y)}},i.prototype.nn=function(t,i,n,e){var r={x:this.x._t(t.x),y:this.y._t(t.y)},s={x:this.x._t(i.x),y:this.y._t(i.y)},o=oo(co(s,r)),h=ho(s,r),u={x:r.x+o.x*e+h.x*n,y:r.y+o.y*e+h.y*n};return{x:this.x.Dt(u.x),y:this.y.Dt(u.y)}},i.prototype.Oi=function(){var t=this.x.Oi(),i=this.y.Oi();return{uScaleStart:[this.x.pi,this.y.pi],uScaleInterval:[this.x.getInnerInterval(),this.y.getInnerInterval()],uScaleStartLog:[t.scaleStartLog,i.scaleStartLog],uScaleIntervalLog:[t.scaleIntervalLog,i.scaleIntervalLog],uViewportStart:[t.viewportStart,i.viewportStart],uViewportSize:[t.viewportSize,i.viewportSize]}},i}(No),Ho={fitting:{start:function(t,i,n,e){return i>=t?n:e},end:function(t,i,n,e){return i>=t?e:n}},expansion:{start:function(t,i,n,e){return i>=t?n<t?n:t:e>t?e:t},end:function(t,i,n,e){return i>=t?e>i?e:i:n<i?n:i}},progressive:{start:function(t,i,n,e){return i>t?Ho.progressive.end(t,i,n,e)+(t-i):e>t?e:t},end:function(t,i,n,e){return i>t?e>i?e:i:Ho.progressive.start(t,i,n,e)+(i-t)}},regressive:{start:function(t,i,n,e){return i>t?n<t?n:t:Ho.regressive.end(t,i,n,e)+(t-i)},end:function(t,i,n,e){return i>t?Ho.regressive.start(t,i,n,e)+(i-t):n<i?n:i}}},jo={Empty:"Empty",Numeric:"Numeric",DateTime:"DateTime",Time:"Time"},Wo=function(t){return void 0!==t.en},Uo={rn:_o.Numeric},Yo=function(t,i){return[t,i]},Xo=function(t,i,n){for(var e=[],r=Math.round(Math.abs((t-i)/n)),s=1;s<r;s+=1){var o=t+n*s;o<i&&e.push(o)}return e},Zo=function(t,i,n,e){Br(t,0)&&(t=0),Br(i,0)&&(i=0);var r=[],s=void 0!==e?function(t,i,n){return t-(t-n)%i}(t,n,e):t;if(n<=0)throw new Error("_getRegularGreatKeyValues unit less than or equal to 0, unit: "+n);for(;s<i&&!1===Br(s,i);)r.push(s),s+=n;return r.push(s),r},Ko=function(t,i,n,e){for(var r=[],s=n(t),o=0;s<i&&!1===Br(s,i);)if(r.push(s),s=e(s),(o+=1)>1e3)throw new Error("Infinite loop in Axis tick key values logic.");return r.push(s),r},qo=function(t,i,n,e,r){return n&&(t=t.filter((function(t,i){return i>0}))),e&&(t=t.filter((function(i,n){return n<t.length-1}))),t.filter((function(t,n){return(n+r)%i==0}))},Jo=function(t){for(var i=[],n=1;n<arguments.length;n++)i[n-1]=arguments[n];var e=i.length>0?i.length:t?1:0;return function(n,r,s,o,h,u){if(!(r>=e)){var a=i[r]||1,f=!1,c=!1,l=1;return t&&(f="ignore"in t?"first"===t.ignore||"both"===t.ignore:f,c="ignore"in t?"last"===t.ignore||"both"===t.ignore:c,l="offset"in t&&void 0!==t.offset?t.offset:l),qo(n,a,f,c,l)}}},Qo={linear:function(t,i,n){var e=i-t;return function(r){return r<n?t+e/n*r:i}},easeIn:function(t,i,n){return function(e){return e<n?t+Math.abs(2*Math.pow(Math.sqrt(.5)*e/n,2))*(i-t):i}},easeOut:function(t,i,n){return function(e){return e<n?t+Math.abs(1-2*Math.pow(Math.sqrt(.5)*(1-e/n),2))*(i-t):i}},ease:function(t,i,n){return function(e){return e<n?t+(e<n/2?.5*Math.pow(e/n*2,2.5):.5+.5*(1-Math.pow(1-2*(e/n-.5),2.5)))*(i-t):i}},logarithmic:function(t){var i=ms(t);return function(n,e,r){var s=i(n),o=i(e);return function(i){return i<r?Math.pow(t,s+Math.abs(1-2*Math.pow(Math.sqrt(.5)*(1-i/r),2))*(o-s)):e}}}},$o=function(){function t(t,i,n,e,r){var s=this;void 0===e&&(e=Qo.linear),this.Ft=t,this.action=i,this.duration=n,this.easing=e,this.sn=r,this.delta=0,this.hn=new Array,this.un=!1,this.an=new qe,this.isOver=function(){return(s.delta===s.duration||s.un)&&0===s.hn.length},this.eases=t.map((function(t){var i=h(t,2),r=i[0],s=i[1];return e(r,s,n)}))}return t.prototype.start=function(){return this.sn.includes(this)||this.sn.push(this),this},t.prototype.addNextAnimations=function(t){var i=this;return t instanceof Array?t.forEach((function(t){return i.hn.push(t)})):this.hn.push(t),this},t.prototype.NextAnimation=function(i,n,e){void 0===e&&(e=this.duration);var r=new t(i,n,e,this.easing,this.sn);return this.hn.push(r),r},t.prototype.onAnimationEnd=function(t,i){return this.an.on("end",t,i)},t.prototype.onEveryAnimationEnd=function(t,i){return this.an.on("everyEnd",t,i)},t.prototype.onAllAnimationEnd=function(t,i){return this.an.on("allEnd",t,i)},t.prototype.allOffAnimationEnd=function(){return this.an.topicOff("end"),this},t.prototype.allOffEveryAnimationEnd=function(){return this.an.topicOff("everyEnd"),this},t.prototype.allOffAllAnimationEnd=function(){return this.an.topicOff("allEnd"),this},t.prototype.offAnimationEnd=function(t){return this.an.off(t,"end")},t.prototype.offEveryAnimationEnd=function(t){return this.an.off(t,"everyEnd")},t.prototype.offAllAnimationEnd=function(t){return this.an.off(t,"allEnd")},t.prototype.finish=function(t){if(void 0===t&&(t=!0),this.un=!0,this.sn.splice(this.sn.indexOf(this),1),this.hn.length>0){var i=this.hn[0];return t&&(this.an.listeners("allEnd").forEach((function(t,n){return i.onAllAnimationEnd(t,n)})),this.an.listeners("everyEnd").forEach((function(t,n){return i.onEveryAnimationEnd(t,n)}))),i.addNextAnimations(this.hn.slice(1)),i.start(),t&&(this.an.emit("end",i),this.an.emit("everyEnd",i)),i}t&&(this.an.emit("end",void 0),this.an.emit("everyEnd",void 0),this.an.emit("allEnd"))},t.prototype.finishAll=function(t){void 0===t&&(t=!0);for(var i=this;i;)i=i.finish(t)},t.prototype.getFinalValues=function(){return this.hn.length>0?this.hn[this.hn.length-1].Ft.map(Ar):this.Ft.map(Ar)},t.prototype.getTimeUntilFinish=function(){for(var t=this.duration-this.delta,i=0;i<this.hn.length;i+=1)t+=this.hn[i].duration-this.hn[i].delta;return t},t}(),th=function(t,i){void 0===i&&(i=60),i>60&&console.log("Note: Animator FPS is usually capped at 60 by the browser!");var n,e,r=[],s=0,o=function(){n=void 0;var h=Date.now();(s=h-(e=e||h))/1e3>=1/i&&(e=Date.now()-s%(1e3/i),r.forEach((function(t){t.delta+=s-s%(1e3/i),t.delta>t.duration&&(t.delta=t.duration),t.action(t.eases.map((function(i){return i(t.delta)}))),t.delta===t.duration&&t.finish()})),t()),r.length>0?n=wr.requestAnimationFrame(o):(n=void 0,e=void 0)};return function(t,i){return void 0===t&&(t=1e3),void 0===i&&(i=Qo.linear),function(e,s,h){void 0===h&&(h=t);var u=new $o(e,s,h,i,r).start();return n||(n=wr.requestAnimationFrame(o)),u}}},ih=function(t,i){if(i.has(t))return i.get(t);var n=Ks(t.label.fn());return i.set(t,n),n},nh=function(t){var i,n,e,r,s=new Map;if(t!==Uo){try{for(var h=o(t.cn),u=h.next();!u.done;u=h.next()){var a=u.value;s.set(a,new Map)}}catch(t){i={error:t}}finally{try{u&&!u.done&&(n=h.return)&&n.call(h)}finally{if(i)throw i.error}}try{for(var f=o(t.ln),c=f.next();!c.done;c=f.next()){var l=c.value;s.set(l,new Map)}}catch(t){e={error:t}}finally{try{c&&!c.done&&(r=f.return)&&r.call(f)}finally{if(e)throw e.error}}}return s},eh=function(){function t(t,i,n,e,r,s,u){var a=this;this.chart=t,this.dn=i,this.vn=e,this.yn=s,this.an=new qe,this.Sn=Uo,this.mn=jo.Empty,this.bn=new Map,this.gn=new Map,this.wn=Ho.fitting,this.pn=!0,this.kn=th((function(){return a.chart.engine.xn()}))(300,Qo.linear),this.Mn=!1,this.An=!1,this.Fn=Os,this.Tn=!1,this.Cn=!1,this.Bn=Os,this.Ln=Os,this.In=Os,this.release=function(){!1!==a.An&&(a.An=!1,a.Fn=wr.performance.now(),a.chart.engine.xn())},this.On={},this.Pn=function(t){var i=a.bn.get(t.tickLevel);i&&i.delete(t.value);var n=a.gn.get(t.tickLevel);n&&n.has(t.value)||n&&n.set(t.value,t)},this.Dn=Cr,this._n=function(t,i,n,e,r,s){var h,u,f=[],c=[];try{for(var l=o(t),d=l.next();!d.done;d=l.next()){var v=d.value;if(v<n||v>e)f.push(v);else{var y=a.bn.get(i),S=(y?y.get(v):void 0)||a.Rn(v,i);S.label.restore(),S.zn(!1);var m=a.En(S,r);s.set(S,m),f.push(v),c.push(S)}}}catch(t){h={error:t}}finally{try{d&&!d.done&&(u=l.return)&&u.call(l)}finally{if(h)throw h.error}}return{displayedKeyValues:f,createdTicks:c}},this.Nn=function(t,i,n,e,r,s,o,h,u,f,c){for(var l=[],d=function(d){var v=t[d],y=i[d],S=void 0,m=void 0;if(a.Vn(v,n)){var b=ih(v,u);S=(m=[t[d-1],t[d+1]].concat(f).concat(c).filter((function(t){return void 0!==t})).filter((function(i){return i.tickLevel!==n||!!t.find((function(t){return t===i}))})).map((function(t){return Rs(b,ih(t,u))?t:void 0}))).some((function(t){return void 0!==t}))}else S=!1;if(S){var g=!0,w=m.filter((function(t){return void 0!==t}));return g&&n.Gn&&w.every((function(t){return Wo(t.tickLevel)}))&&(g=!1),g&&n.Gn&&n.Gn.Hn&&!1===n.Gn.Hn(y,e,r,s,o,h)&&(g=!1),!1===g?"continue":{value:!0}}l.push(v)},v=0;v<t.length;v+=1){var y=d(v);if("object"==typeof y)return y.value}return l},this.formatValue=function(t){return a.Sn.rn(t,a.Rt)},this.jn=function(t){var i=h(t,2),n=i[0],e=i[1];a.Wn(n,e)},this.Rt=n,this.Un=u,"logarithmic"===u.type&&this.setAnimationZoom(Qo.logarithmic(Lo(u.base))),this.Yn=s.numeric,this.setTickStrategy("Numeric"),this.Xn=n.getInnerStart(),this.Zn=n.getInnerEnd(),r&&this.setAnimationsEnabled(!1)}return t.prototype.getTitle=function(){return this.qn.Kn()},t.prototype.setTitle=function(t){return this.qn.Jn(t),this.chart.engine.xn(),this},t.prototype.getTitleFillStyle=function(){return this.qn.Qn()},t.prototype.setTitleFillStyle=function(t){return this.qn.$n(t),this.chart.engine.xn(),this},t.prototype.getTitleFont=function(){return this.qn.te()},t.prototype.setTitleFont=function(t){return this.qn.ie(t),this.chart.engine.xn(),this},t.prototype.setTitleRotation=function(t){return this.qn.ne(t),this.chart.engine.xn(),this},t.prototype.getTitleRotation=function(){return this.qn.ee()},t.prototype.setTickStrategy=function(t,i){if(this.re(),"Empty"===t)this.Sn=Uo,this.mn=t;else if("Numeric"===t){"Numeric"!==this.mn&&(this.Yn=this.yn.numeric);var n=i||function(t){return t};this.Yn=n(this.Yn),this.Sn=this.Yn.se(this.Un),this.mn=t}else if("DateTime"===t){"DateTime"!==this.mn&&(this.Yn=this.yn.datetime);n=i||function(t){return t};this.Yn=n(this.Yn),this.Sn=this.Yn.se(this.Un),this.mn=t}else if("Time"===t){"Time"!==this.mn&&(this.Yn=this.yn.time);n=i||function(t){return t};this.Yn=n(this.Yn),this.Sn=this.Yn.se(this.Un),this.mn=t}return this.gn=nh(this.Sn),this.chart.engine.xn(),this},t.prototype.getTickStrategy=function(){return this.mn},t.prototype.oe=function(){return this.Sn},t.prototype.setTickStyle=function(t){return this.setTickStrategy(this.getTickStrategy(),t)},t.prototype.he=function(t){this.Sn=t,this.gn=nh(this.Sn),this.chart.engine.xn()},t.prototype.setInterval=function(t,i,n,e){return void 0===n&&(n=void 0),void 0===e&&(e=void 0),this.ue(t,i,n,e,"userSetInterval"),this},t.prototype.ue=function(t,i,n,e,r){var s=this;void 0===n&&(n=!1),void 0===e&&(e=!1);var o,h,u={start:t,end:i},a=Math.abs(i-t);(Math.abs(this.Zn-this.Xn),void 0!==this.Sn.ae&&this.Sn.ae>a)&&(u={start:(o=(i+t)/2)-(h=this.Sn.ae/2*(t>i?-1:1)),end:o+h});void 0!==this.Sn.fe&&this.Sn.fe<a&&(u={start:(o=(i+t)/2)-(h=this.Sn.fe/2*(t>i?-1:1)),end:o+h});var f=this.Rt.Ti(u.start,u.end,this.Xn,this.Zn,!0);if(!1===f)return this;!0===f||(u=f);var c="interactionZoom"!==r;if(this.stop(),this.kn&&(!0===n||n>0)){var l=!0===n?void 0:n,d=!this.ce||this.ce.isOver()?this.kn:this.ce.NextAnimation.bind(this);this.ce=d([[this.Xn,u.start],[this.Zn,u.end]],this.jn,l),this.ce.onAnimationEnd((function(){s.ce=void 0,s.chart.le(),c&&(s.In=wr.performance.now())})),e||this.ce.onAnimationEnd(this.release)}else this.Wn(u.start,u.end),e||this.release(),c&&(this.In=wr.performance.now());return this},t.prototype.getInterval=function(){return{start:this.Xn,end:this.Zn}},t.prototype.stop=function(){return this.ce&&this.ce.finishAll(!1),this.ce=void 0,!0!==this.An&&(this.An=!0,this.Fn=wr.performance.now()),this.chart.le(),this.chart.engine.xn(),this},t.prototype.isStopped=function(){return this.An},t.prototype.fit=function(t,i){void 0===i&&(i=!1);var n=this.de(!1);if(n){var e=this.Zn>=this.Xn,r=e?n.min:n.max,s=e?n.max:n.min;this.ue(r,s,t,i,"userFit")}return this},t.prototype.setScrollStrategy=function(t){return this.wn=t,this.chart.engine.xn(),this},t.prototype.getScrollStrategy=function(){return this.wn},t.prototype.setAnimationScroll=function(t){return this.pn=Boolean(t),this.chart.engine.xn(),this},t.prototype.setAnimationZoom=function(t,i){var n=this;return void 0===i&&(i=300),this.ce&&(this.ce.finishAll(!1),this.ce=void 0),this.kn=t?th((function(){return n.chart.engine.xn()}))(i,t):void 0,this},t.prototype.setAnimationsEnabled=function(t){return this.Mn=!!t,t?(this.setAnimationScroll(!0),this.setAnimationZoom(Qo.ease,void 0)):(this.setAnimationScroll(void 0),this.setAnimationZoom(void 0)),this},t.prototype.getAnimationsEnabled=function(){return this.Mn},t.prototype.disableAnimations=function(){return this.setAnimationsEnabled(!1),this},t.prototype.onScaleChange=function(t){return this.an.on("scaleChange",t)},t.prototype.offScaleChange=function(t){return this.an.off(t,"scaleChange")},t.prototype.ve=function(t,i){var n,e,r,s,a,f,c=new Map;if(this.Sn===Uo)return this.re(),c;i=i||new Map;var l=this.ye(),d=l.min,v=l.max,y=v-d,S=t.physicalAxisSize;this.On.physicalAxisSize=S;var m=this.Se(this.Sn,d,v,this.Xn,this.Zn,S),b=[];if(this.me(),b.push.apply(b,u([],h(this.be(this.Sn,d,v,m,i,t,c)))),this.ge(this.Sn,d,v,m,i,t,b,c),this.we(),m)try{for(var g=o(this.gn),w=g.next();!w.done;w=g.next()){var p=h(w.value,2),k=p[0],x=p[1],M=m.get(k);if(void 0===M)return c;try{for(var A=(r=void 0,o(x)),F=A.next();!F.done;F=A.next()){var T=h(F.value,1)[0];try{for(var C=(a=void 0,o(M)),B=C.next();!B.done;B=C.next()){if(B.value===T)return c}}catch(t){a={error:t}}finally{try{B&&!B.done&&(f=C.return)&&f.call(C)}finally{if(a)throw a.error}}x.delete(T)}}catch(t){r={error:t}}finally{try{F&&!F.done&&(s=A.return)&&s.call(A)}finally{if(r)throw r.error}}}}catch(t){n={error:t}}finally{try{w&&!w.done&&(e=g.return)&&e.call(g)}finally{if(n)throw n.error}}return this.On.min=d,this.On.max=v,this.On.scaleInterval=y,this.On.physicalAxisSize=S,c},t.prototype.Se=function(t,i,n,e,r,s){var h,u,a,f,c,l=new Map;try{for(var d=o(t.cn),v=d.next();!v.done;v=d.next()){var y=(b=v.value).pe(i,n,e,r);y=this.ke(y),l.set(b,y)}}catch(t){h={error:t}}finally{try{v&&!v.done&&(u=d.return)&&u.call(d)}finally{if(h)throw h.error}}try{for(var S=o(t.ln),m=S.next();!m.done;m=S.next()){var b=m.value;y=void 0;if(void 0===c)y=b.pe(i,n,i,n);else{var g=[],w=s/(c.filter((function(t){return i<=t&&t<=n})).length-1);if(void 0!==b.xe&&b.xe>w)break;for(var p=0;p<c.length-1;p+=1){var k=b.pe(c[p],c[p+1],i,n);g=g.concat(k)}y=g}y=this.ke(y),l.set(b,y),c=y}}catch(t){a={error:t}}finally{try{m&&!m.done&&(f=S.return)&&f.call(S)}finally{if(a)throw a.error}}return l},t.prototype.ke=function(t){return t=(t=function(t){for(var i={},n=[],e=t.length,r=0,s=0;s<e;s+=1){var o=t[s];1!==i[o]&&(i[o]=1,n[r]=o,r+=1)}return n}(t)).sort((function(t,i){return t-i}))},t.prototype.Me=function(t){var i=t.tickLevel.Ae;t.label.Jn(i(t.value,this.Rt)).Fe()},t.prototype.Te=function(t,i){var n=i.Ce;t.label.$n(n.getLabelFillStyle()).ie(n.getLabelFont()).ne(n.getLabelRotation())},t.prototype.Rn=function(t,i){var n=this.gn.get(i),e=n.get(t);e?(n.delete(t),e.tickLevel=i,e.restore()):e=this.Be(t,i,this.Pn,this.Dn);var r=this.bn.get(i)||new Map;return r.set(t,e),this.bn.set(i,r),this.Te(e,i),e},t.prototype.En=function(t,i){var n=this.Le(t,i);return this.Me(t),n},t.prototype.be=function(t,i,n,e,r,s,h){var u,a,f,c,l=[];try{for(var d=o(t.cn),v=d.next();!v.done;v=d.next()){var y=v.value,S=e.get(y),m=function(t){if(t<i||t>n)return"continue";var e=b.bn.get(y),o=(e?e.get(t):void 0)||b.Rn(t,y);o.label.restore();var u=b.En(o,s),a=ih(o,r);l.find((function(t){return Rs(a,ih(t,r))}))&&o.label.dispose(),o.zn(!1),h.set(o,u),l.push(o)},b=this;try{for(var g=(f=void 0,o(S)),w=g.next();!w.done;w=g.next()){m(w.value)}}catch(t){f={error:t}}finally{try{w&&!w.done&&(c=g.return)&&c.call(g)}finally{if(f)throw f.error}}}}catch(t){u={error:t}}finally{try{v&&!v.done&&(a=d.return)&&a.call(d)}finally{if(u)throw u.error}}return l},t.prototype.ge=function(t,i,n,e,r,s,h,u){var a,f,c,l=[],d=function(t){var a,f,d=e.get(t);if(!d)return"break";var y=void 0;if(void 0===c)y=[{start:i,end:n,keyValues:d}];else{y=[];for(var S=0;S<c.length-1;S+=1){var m=c[S],b=c[S+1],g={start:m,end:b,keyValues:[]};try{for(var w=(a=void 0,o(d)),p=w.next();!p.done;p=w.next()){var k=p.value;k>=m&&k<b&&g.keyValues.push(k)}}catch(t){a={error:t}}finally{try{p&&!p.done&&(f=w.return)&&f.call(w)}finally{if(a)throw a.error}}y.push(g)}}if(c=d,function(t){return void 0!==t.Ie}(t))return"continue";var x=0,M=-1,A=[],F=[];for(S=0;S<y.length;S+=1){var T=v._n(y[S].keyValues,t,i,n,s,u);A=A.concat(T.displayedKeyValues),F=F.concat(T.createdTicks)}var C=[],B=!0;if(t.Ce.getLabelFillStyle()!==Re)for(var L=function(){var e=y[M],s=e.start,o=e.end,u=e.keyValues;if(x>0){if(void 0===t.Gn)return B=!1,"break";var a=t.Gn.Oe;if(void 0===(u=a(u.slice(),x-1,s,o,i,n)))return"break"}var f=v.Nn(F.filter((function(t){return u.some((function(i){return Br(t.value,i)}))})),A,t,x,s,o,i,n,r,h,l);if(!0===f)return x+=1,M=-1,C=[],"continue";C=C.concat(f)};++M<y.length;){if("break"===L())break}return F.forEach((function(t){C.find((function(i){return i===t}))||t.label.dispose()})),l=F.map((function(t){return t})),B?void 0:"break"},v=this;try{for(var y=o(t.ln),S=y.next();!S.done;S=y.next()){if("break"===d(S.value))break}}catch(t){a={error:t}}finally{try{S&&!S.done&&(f=y.return)&&f.call(y)}finally{if(a)throw a.error}}},t.prototype.Pe=function(t){var i,n,e,r;try{for(var s=o(this.bn.values()),h=s.next();!h.done;h=s.next()){var u=h.value;try{for(var a=(e=void 0,o(u.values())),f=a.next();!f.done;f=a.next()){t(f.value)}}catch(t){e={error:t}}finally{try{f&&!f.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}}}catch(t){i={error:t}}finally{try{h&&!h.done&&(n=s.return)&&n.call(s)}finally{if(i)throw i.error}}},t.prototype.De=function(t,i){var n,e,r,s;try{for(var h=o(this.bn.values()),u=h.next();!u.done;u=h.next()){var a=u.value;try{for(var f=(r=void 0,o(a.values())),c=f.next();!c.done;c=f.next()){i=t(i,c.value)}}catch(t){r={error:t}}finally{try{c&&!c.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}}}catch(t){n={error:t}}finally{try{u&&!u.done&&(e=h.return)&&e.call(h)}finally{if(n)throw n.error}}return i},t.prototype.re=function(){var t,i,n,e;try{for(var r=o(this.bn.values()),s=r.next();!s.done;s=r.next()){var h=s.value;try{for(var u=(n=void 0,o(h.values())),a=u.next();!a.done;a=u.next()){a.value.dispose()}}catch(t){n={error:t}}finally{try{a&&!a.done&&(e=u.return)&&e.call(u)}finally{if(n)throw n.error}}}}catch(i){t={error:i}}finally{try{s&&!s.done&&(i=r.return)&&i.call(r)}finally{if(t)throw t.error}}this.bn.clear()},t.prototype.me=function(){var t,i,n,e;try{for(var r=o(this.bn.values()),s=r.next();!s.done;s=r.next()){var h=s.value;try{for(var u=(n=void 0,o(h.values())),a=u.next();!a.done;a=u.next()){a.value.zn(!0)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(e=u.return)&&e.call(u)}finally{if(n)throw n.error}}}}catch(i){t={error:i}}finally{try{s&&!s.done&&(i=r.return)&&i.call(r)}finally{if(t)throw t.error}}},t.prototype.we=function(){var t,i,n,e;try{for(var r=o(this.bn.values()),s=r.next();!s.done;s=r.next()){var u=s.value;try{for(var a=(n=void 0,o(u.entries())),f=a.next();!f.done;f=a.next()){var c=h(f.value,2),l=c[0],d=c[1];d._e()&&(d.dispose(),u.delete(l))}}catch(t){n={error:t}}finally{try{f&&!f.done&&(e=a.return)&&e.call(a)}finally{if(n)throw n.error}}}}catch(i){t={error:i}}finally{try{s&&!s.done&&(i=r.return)&&i.call(r)}finally{if(t)throw t.error}}},t.prototype.ye=function(){var t=this.Rt.getInnerStart()<this.Rt.getInnerEnd()?this.Rt.getInnerStart():this.Rt.getInnerEnd(),i=this.Rt.getInnerEnd()>this.Rt.getInnerStart()?this.Rt.getInnerEnd():this.Rt.getInnerStart();return b(t,i)},t.prototype.Re=function(t,i,n){for(var e,r,s=[],h="left"===n?t.ze():t.Ee(),u=0;h&&u<2;){var a=h.value.value,f=0;try{for(var c=(e=void 0,o(a)),l=c.next();!l.done;l=c.next()){var d=l.value;this.Vn(d,i)&&(f+=1,s.push(d))}}catch(t){e={error:t}}finally{try{l&&!l.done&&(r=c.return)&&r.call(c)}finally{if(e)throw e.error}}0!==a.length&&0!==f&&(u+=1),h="left"===n?h.ze():h.Ee()}return s},t.prototype.Vn=function(t,i){return!t._e()&&(0!==t.label.Kn().length&&(!Wo(i)||!0===i.Ne))},t.prototype.Ve=function(t,i){return this.Sn===Uo||(this.Sn.cn.forEach((function(n){i=t(i,n.Ce)})),this.Sn.ln.forEach((function(n){(function(t){return void 0!==t.Ae})(n)&&(i=t(i,n.Ce))}))),i},t.prototype.de=function(t){var i,n,e;try{for(var r=o(this.Ge()),s=r.next();!s.done;s=r.next()){var h=s.value;if(h.He()){var u=this.dn.je(h),a=this.dn.We(h);if(void 0!==u&&kr(u)&&void 0!==a&&kr(a)){if("logarithmic"===this.Un.type){var f=void 0;if(Math.sign(u)!==Math.sign(a)&&(f="Logarithmic series data range must be either > 0 or < 0 (encountered ["+u+", "+a+"])"),0!==u&&0!==a||(f="Logarithmic series data range is not defined at 0 (encountered ["+u+", "+a+"])"),f)throw wr.alert(f),new Error(f)}e?(e.min=Math.min(e.min,u),e.max=Math.max(e.max,a)):e=b(u,a)}}}}catch(t){i={error:t}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}if(e&&kr(e.min)&&kr(e.max)){if(Br(e.min,e.max)){if(t)return;return{min:e.min-1,max:e.max+1}}return e}},t.prototype.Ue=function(){var t,i,n=0;try{for(var e=o(this.Ge()),r=e.next();!r.done;r=e.next()){var s=r.value,h=this.dn.Ye(s);h&&(n=Math.max(n,h))}}catch(i){t={error:i}}finally{try{r&&!r.done&&(i=e.return)&&i.call(e)}finally{if(t)throw t.error}}return n},t.prototype.Xe=function(){var t=this,i=this.Ge(),n=this.Tn,e=!1;if(0!==i.length&&this.wn&&!this.An){var r=this.de(!0);if(r){var s=this.Xn,o=this.Zn,h=this.wn.start(s,o,r.min,r.max),u=this.wn.end(s,o,r.min,r.max),a=!1===Br(s,h),f=!1===Br(o,u);if(h=a?h:s,u=f?u:o,a||f){var c=!1;if(this.pn)if(this.pn){c=!0;var l=a?this.Ze(s,h):s,d=f?this.Ze(o,u):o;if(!0===this.Wn(l,d,{allowClamping:!1})&&(a&&!1===Br(l,h)||f&&!1===Br(d,u))){this.chart.engine.xn(!0),e=!0;var v=Math.abs(u-h)/Math.abs(l-d);v<1&&(v=1/v),this.Cn=v>=1.4}}else c=!1;c||this.Wn(h,u)}}}e?(this.Tn!==e&&(this.Tn=e,this.Bn=wr.performance.now()),this.Ke&&(clearTimeout(this.Ke),this.Ke=void 0)):!0===n&&void 0===this.Ke&&(this.Cn=!1,this.Ke=setTimeout((function(){!1!==t.Tn&&(t.Tn=!1,t.Bn=wr.performance.now()),t.Ke=void 0,t.chart.engine.xn()}),200))},t.prototype.Wn=function(t,i,n){var e,r,s=!n||!("allowClamping"in n)||void 0===n.allowClamping||n.allowClamping,o={start:t,end:i},h=!0,u=Math.abs(i-t),a=Math.abs(this.Zn-this.Xn);void 0!==this.Sn.ae&&this.Sn.ae>u&&(o={start:(e=(i+t)/2)-(r=(s?this.Sn.ae/2:a/2)*(t>i?-1:1)),end:e+r},h=!1);void 0!==this.Sn.fe&&this.Sn.fe<u&&(o={start:(e=(i+t)/2)-(r=(s?this.Sn.fe/2:a/2)*(t>i?-1:1)),end:e+r},h=!1);var f=this.Rt.Ti(o.start,o.end,this.Xn,this.Zn,s);if(!1===f)return!1;!0!==f&&(o=f);var c=this.Ue(),l=this.qe(Math.min(o.start,o.end),Math.max(o.start,o.end),c);return!!(f=this.Rt.Ti(o.end>o.start?l.min:l.max,o.end>o.start?l.max:l.min,this.Xn,this.Zn,!1))&&(!0===f?this.Rt.xi(o.end>o.start?l.min:l.max,o.end>o.start?l.max:l.min):this.Rt.xi(o.start,o.end),this.Xn=o.start,this.Zn=o.end,this.an.emit("scaleChange",o.start,o.end),this.Ln=wr.performance.now(),this.chart.engine.xn(),h)},t.prototype.Je=function(){return this.Tn},t.prototype.Qe=function(){return void 0!==this.ce},t}(),rh=function(){function t(t,i,n,e,r,s,o){void 0===o&&(o=r.$e(s).setMouseInteractions(!1)),this.tickLevel=t,this.value=i,this.tr=n,this.ir=e,this.nr=r,this.er=s,this.label=o,this.rr=!1}return t.prototype.restore=function(){return this.label.restore(),this.ir(this),this},t.prototype.dispose=function(){return this.label.dispose(),this.rr=!0,this.tr(this),this},t.prototype.zn=function(t){return this.rr=t,this},t.prototype._e=function(){return this.rr},t.prototype.isDisposed=function(){return this.label.isDisposed()},t}(),sh=function(t){function i(i){return t.call(this,i)||this}return n(i,t),i.prototype.setSize=function(t){return this.set("size",t)},i.prototype.setFamily=function(t){return this.set("family",t)},i.prototype.setWeight=function(t){return this.set("weight",t)},i.prototype.setStyle=function(t){return this.set("style",t)},i.prototype.setVariant=function(t){return this.set("variant",t)},i.prototype.getSize=function(){return this.get("size")},i.prototype.getFamily=function(){return this.get("family")},i.prototype.getWeight=function(){return this.get("weight")},i.prototype.getStyle=function(){return this.get("style")},i.prototype.getVariant=function(){return this.get("variant")},i}(me({size:14,family:"Arial",weight:"normal",style:"normal",variant:!1})),oh=new sh,hh=function(){},uh=new hh,ah=function(t){function i(i){return t.call(this,i)||this}return n(i,t),i.prototype.setSize=function(t){return this.set("size",t)},i.prototype.getSize=function(){return this.get("size")},i.prototype.setFillStyle=function(t){return"function"==typeof t?this.set("fillStyle",t(this.get("fillStyle"))):this.set("fillStyle",t)},i.prototype.getFillStyle=function(){return this.get("fillStyle")},i.prototype.setWireframeStyle=function(t){return"function"==typeof t?this.set("wireframeStyle",t(this.get("wireframeStyle"))):this.set("wireframeStyle",t)},i.prototype.getWireframeStyle=function(){return this.get("wireframeStyle")},i.prototype.setShape=function(t){return this.set("shape",t)},i.prototype.getShape=function(){return this.get("shape")},i.prototype.getDefaultHighlightStyle=function(){return this.It||(this.It=this.setFillStyle(this.getFillStyle().getDefaultHighlightStyle())),this.It},i}(me({shape:"sphere",size:10,fillStyle:new Ee,wireframeStyle:ir})),fh=function(t){function i(i){return t.call(this,i)||this}return n(i,t),i.prototype.setSize=function(t){return this.set("size",t)},i.prototype.getSize=function(){return this.get("size")},i.prototype.setFillStyle=function(t){return"function"==typeof t?this.set("fillStyle",t(this.get("fillStyle"))):this.set("fillStyle",t)},i.prototype.getFillStyle=function(){return this.get("fillStyle")},i.prototype.getDefaultHighlightStyle=function(){return this.It||(this.It=this.setFillStyle(this.getFillStyle().getDefaultHighlightStyle())),this.It},i}(me({size:5,fillStyle:new Ee})),ch={Triangulated:ah,Pixelated:fh},lh=new Map,dh=function(t){var i=t.getSize(),n=t.getFamily(),e=t.getWeight(),r=t.getStyle(),s=t.getVariant(),o=r+" "+(s?"small-caps":"normal")+" "+e+" "+i+"px "+n,h=lh.get(o);return h||(h=function(t,i){return{font:t,properties:i}}(o,{size:i,family:n,style:r,variant:s,weight:e}),lh.set(o,h)),h},vh=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return n(i,t),i}(me({gridStrokeLength:1,gridStrokeStyle:new nr,tickLength:7,tickStyle:new nr,tickPadding:0,labelFont:new sh,labelFillStyle:new Ee,labelPadding:0,labelAlignment:0,labelRotation:0})),yh=function(t){function i(i){return t.call(this,i)||this}return n(i,t),i.prototype.setGridStrokeLength=function(t){return this.set("gridStrokeLength",t)},i.prototype.getGridStrokeLength=function(){return this.get("gridStrokeLength")},i.prototype.setGridStrokeStyle=function(t){return this.set("gridStrokeStyle","function"==typeof t?t(this.get("gridStrokeStyle")):t)},i.prototype.getGridStrokeStyle=function(){return this.get("gridStrokeStyle")},i.prototype.setTickLength=function(t){return this.set("tickLength",t)},i.prototype.getTickLength=function(){return this.get("tickLength")},i.prototype.setTickStyle=function(t){return this.set("tickStyle","function"==typeof t?t(this.get("tickStyle")):t)},i.prototype.getTickStyle=function(){return this.get("tickStyle")},i.prototype.setTickPadding=function(t){return this.set("tickPadding",t)},i.prototype.getTickPadding=function(){return this.get("tickPadding")},i.prototype.setLabelFillStyle=function(t){return this.set("labelFillStyle","function"==typeof t?t(this.get("labelFillStyle")):t)},i.prototype.getLabelFillStyle=function(){return this.get("labelFillStyle")},i.prototype.setLabelFont=function(t){return this.set("labelFont","function"==typeof t?t(this.get("labelFont")):t)},i.prototype.getLabelFont=function(){return this.get("labelFont")},i.prototype.setLabelPadding=function(t){return this.set("labelPadding",t)},i.prototype.getLabelPadding=function(){return this.get("labelPadding")},i.prototype.setLabelAlignment=function(t){return this.set("labelAlignment",t)},i.prototype.getLabelAlignment=function(){return this.get("labelAlignment")},i.prototype.setLabelRotation=function(t){return this.set("labelRotation",t)},i.prototype.getLabelRotation=function(){return this.get("labelRotation")},i}(vh),Sh=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return n(i,t),i}(vh),mh=Object.assign(Object.create(new Sh),{}),bh=-1,gh=0,wh=1,ph=function(t,i,n,e,r){return function(s){return function(o){var h=new Date(o+s),u={year:h.getFullYear(),monthIndex:h.getMonth(),day:h.getDate(),hours:h.getHours(),minutes:h.getMinutes(),seconds:h.getSeconds(),millis:h.getMilliseconds()},a=e?e(u):void 0;if(t===gh&&!0===a)return o;var f=u[i];r.includes("year")&&(u.year=Math.floor(u.year/n)*n),r.includes("monthIndex")&&(u.monthIndex=0),r.includes("day")&&(u.day=1),r.includes("hours")&&(u.hours=0),r.includes("minutes")&&(u.minutes=0),r.includes("seconds")&&(u.seconds=0),r.includes("millis")&&(u.millis=0);var c=(t===gh?1:t)*n;return t===bh&&!1===a&&(c=0),0!==c&&(u[i]=n*(c>0?Math.floor((f+c)/n):Math.ceil((f+c)/n))),new Date(u.year,u.monthIndex,u.day,u.hours,u.minutes,u.seconds,u.millis).getTime()-s}}},kh=function(t,i,n){for(var e=[],r=3;r<arguments.length;r++)e[r-3]=arguments[r];return ph(bh,t,i,n,e)},xh=function(t,i,n){for(var e=[],r=3;r<arguments.length;r++)e[r-3]=arguments[r];return ph(bh,t,i,n,e)},Mh=function(t,i,n){for(var e=[],r=3;r<arguments.length;r++)e[r-3]=arguments[r];return ph(gh,t,i,n,e)},Ah=function(t,i){for(var n=[],e=2;e<arguments.length;e++)n[e-2]=arguments[e];return ph(wh,t,i,void 0,n)},Fh=function(t){return function(i){return function(n){var e=new Date(n+i),r=e.getDay(),s=1===r&&0===e.getHours()&&0===e.getMinutes()&&0===e.getSeconds()&&0===e.getMilliseconds();if(t===gh&&!0===s)return n;var o=e.getDate();return t===bh&&1===r&&!1===s||(-1===t?o-=r>=2?r-1:r+6:o+=r>0?8-r:1),new Date(e.getFullYear(),e.getMonth(),o,0,0,0,0).getTime()-i}}},Th=[{label:"MilliSecond100",unit:100,irregular:!1,greatTicks:void 0,majorTicks:{fitFunction:Jo({ignore:"first"},2,5)},minorTicks:{amount:4,fitFunction:Jo(void 0,2)}},{label:"Second",unit:1e3,irregular:!1,greatTicks:{getReferenceKeyValue:kh("seconds",1,(function(t){return 0===t.millis}),"millis")},majorTicks:{fitFunction:Jo({ignore:"first"},5,10,15,30)},minorTicks:{amount:4,fitFunction:Jo(void 0,2)}},{label:"Minute",unit:6e4,irregular:!1,greatTicks:{getReferenceKeyValue:kh("minutes",1,(function(t){return 0===t.seconds&&0===t.millis}),"seconds","millis")},majorTicks:{fitFunction:Jo({ignore:"first"},5,10,15,30)},minorTicks:{amount:12,fitFunction:Jo(void 0,3,6)}},{label:"Hour",unit:36e5,irregular:!1,greatTicks:{getReferenceKeyValue:kh("hours",1,(function(t){return 0===t.minutes&&0===t.seconds&&0===t.millis}),"minutes","seconds","millis")},majorTicks:{fitFunction:Jo({ignore:"first"},3,6,12)},minorTicks:{amount:8,fitFunction:Jo(void 0,2,4)}},{label:"Day",unit:864e5,irregular:!1,greatTicks:{getReferenceKeyValue:kh("day",1,(function(t){return 0===t.hours&&0===t.minutes&&0===t.seconds&&0===t.millis}),"hours","minutes","seconds","millis")},majorTicks:{fitFunction:Jo({ignore:"last"},2,4)},minorTicks:{amount:7,fitFunction:Jo({ignore:"last"},2,3)}},{label:"Week",unit:6048e5,irregular:!0,getPrevKeyValue:Fh(bh),getNextKeyValueIncludingRef:Fh(gh),getNextKeyValue:Fh(wh),greatTicks:!0,majorTicks:{fitFunction:Jo(void 0,2)},minorTicks:{fitFunction:void 0}},{label:"Month",unit:2592e6,irregular:!0,getPrevKeyValue:xh("monthIndex",1,(function(t){return 1===t.day&&0===t.hours&&0===t.minutes&&0===t.seconds&&0===t.millis}),"day","hours","minutes","seconds","millis"),getNextKeyValueIncludingRef:Mh("monthIndex",1,(function(t){return 1===t.day&&0===t.hours&&0===t.minutes&&0===t.seconds&&0===t.millis}),"day","hours","minutes","seconds","millis"),getNextKeyValue:Ah("monthIndex",1,"day","hours","minutes","seconds","millis"),greatTicks:!0,majorTicks:{fitFunction:Jo(void 0,2,3)},minorTicks:{fitFunction:Jo(void 0,2,4,6)}},{label:"Year",unit:31536e6,irregular:!0,getPrevKeyValue:xh("year",1,(function(t){return 1===t.day&&0===t.hours&&0===t.minutes&&0===t.seconds&&0===t.millis}),"monthIndex","day","hours","minutes","seconds","millis"),getNextKeyValueIncludingRef:Mh("year",1,(function(t){return 1===t.day&&0===t.hours&&0===t.minutes&&0===t.seconds&&0===t.millis}),"monthIndex","day","hours","minutes","seconds","millis"),getNextKeyValue:Ah("year",1,"monthIndex","day","hours","minutes","seconds","millis"),greatTicks:!0,majorTicks:{fitFunction:Jo({ignore:"first"},2,5)},minorTicks:{fitFunction:Jo(void 0,2,5)}},{label:"Decade",unit:31536e7,irregular:!0,getPrevKeyValue:xh("year",10,(function(t){return t.year%10==0&&1===t.day&&0===t.hours&&0===t.minutes&&0===t.seconds&&0===t.millis}),"year","monthIndex","day","hours","minutes","seconds","millis"),getNextKeyValueIncludingRef:Mh("year",10,(function(t){return t.year%10==0&&1===t.day&&0===t.hours&&0===t.minutes&&0===t.seconds&&0===t.millis}),"year","monthIndex","day","hours","minutes","seconds","millis"),getNextKeyValue:Ah("year",10,"year","monthIndex","day","hours","minutes","seconds","millis"),greatTicks:!0,majorTicks:{fitFunction:Jo(void 0,2,4)},minorTicks:{fitFunction:Jo(void 0,2,5)}},{label:"Century",unit:316224e7,irregular:!0,getPrevKeyValue:xh("year",100,(function(t){return t.year%100==0&&1===t.day&&0===t.hours&&0===t.minutes&&0===t.seconds&&0===t.millis}),"year","monthIndex","day","hours","minutes","seconds","millis"),getNextKeyValueIncludingRef:Mh("year",100,(function(t){return t.year%100==0&&1===t.day&&0===t.hours&&0===t.minutes&&0===t.seconds&&0===t.millis}),"year","monthIndex","day","hours","minutes","seconds","millis"),getNextKeyValue:Ah("year",100,"year","monthIndex","day","hours","minutes","seconds","millis"),greatTicks:!0,majorTicks:{fitFunction:void 0},minorTicks:void 0},{label:"Millennium",unit:316224e8,irregular:!0,getPrevKeyValue:xh("year",1e3,(function(t){return t.year%1e3==0&&1===t.day&&0===t.hours&&0===t.minutes&&0===t.seconds&&0===t.millis}),"year","monthIndex","day","hours","minutes","seconds","millis"),getNextKeyValueIncludingRef:Mh("year",1e3,(function(t){return t.year%1e3==0&&1===t.day&&0===t.hours&&0===t.minutes&&0===t.seconds&&0===t.millis}),"year","monthIndex","day","hours","minutes","seconds","millis"),getNextKeyValue:Ah("year",1e3,"year","monthIndex","day","hours","minutes","seconds","millis"),greatTicks:!0,majorTicks:{fitFunction:void 0},minorTicks:void 0}],Ch=function(t,i,n){var e=function(t,i,n,e,r){for(var s,o=i-t,h=r?0:Th.length-1;r?h<Th.length:h>=0;r?h+=1:h-=1){var u=o/Th[h].unit;if((void 0===n||u>=n)&&(void 0===e||u<=e)){s=Th[h];break}}return s}(i,n,void 0,1,!0);if(void 0!==e&&0===Th.indexOf(e)&&(e=Th[1]),void 0!==e){if("great"===t)return e;var r="major"===t?1:2,s=Th[Th.indexOf(e)-r];return void 0===s?Th[0]:s}},Bh=function(t,i){return function(n,e,r,s){var h=Ch("great",n,e);if(void 0===h)return[];if("Decade"===h.label||"Century"===h.label||"Millennium"===h.label)return[];var u,a=s>r?n:e,f=(n+e)/2,c=s>r?e:n;if(Th.indexOf(h)<=Th.findIndex((function(t){return"Hour"===t.label})))return"left"===i?[a]:[];if(!0===h.irregular)u=Ko(n,e,h.getPrevKeyValue(t),h.getNextKeyValue(t));else{var l=h.greatTicks.getReferenceKeyValue(t)(n);u=Zo(n,e,h.unit,l)}var d=function(t,i,n){var e,r;try{for(var s=o(n),h=s.next();!h.done;h=s.next()){var u=h.value;if(u>=t&&u<=i)return u}}catch(t){e={error:t}}finally{try{h&&!h.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}}(n,e,u);return"left"===i?void 0===d||Gs(d,f,c)?[a]:[d]:void 0!==d&&Gs(d,f,c)?[d]:[c]}},Lh=function(t,i){return function(n,e,r,s){var o,h=Ch(t,r,s);if(void 0===h)return[];if("great"===t&&void 0!==h.greatTicks)if(!0===h.irregular)o=Ko(n,e,h.getPrevKeyValue(i),h.getNextKeyValue(i));else{var u=h.greatTicks.getReferenceKeyValue(i)(n);o=Zo(n,e,h.unit,u)}else if("major"===t&&void 0!==h.majorTicks)o=!0===h.irregular?function(t,i,n,e){for(var r=[],s=n(t),o=0;s<i;)if(r.push(s),s=e(s),(o+=1)>1e3)throw new Error("Infinite loop in Axis tick key values logic.");return r.push(s),r}(n,e,h.getPrevKeyValue(i),h.getNextKeyValue(i)):function(t,i,n){for(var e=[],r=t,s=0;r<i;)if(e.push(r),r+=n,(s+=1)>1e3)throw new Error("Infinite loop in Axis tick key values logic.");return e.push(r),e}(n,e,h.unit);else{if("minor"!==t||void 0===h.minorTicks)return[];if(!0===h.irregular)o=function(t,i,n,e){for(var r=[],s=n(t),o=0;s<i;)if(r.push(s),s=e(s),(o+=1)>1e3)throw new Error("Infinite loop in Axis tick key values logic.");return r}(n,e,h.getNextKeyValueIncludingRef(i),h.getNextKeyValue(i));else{var a=function(t){if(void 0!==t)return Th[Th.indexOf(t)+1]}(h);if(void 0===a)return[];o=Xo(n,e,a.unit/h.minorTicks.amount)}}return o}},Ih=function(t){return function(i,n,e,r,s,o){var h,u=Ch(t,s,o);if(void 0!==u)return"major"===t?h=u.majorTicks.fitFunction:u.minorTicks&&(h=u.minorTicks.fitFunction),h?h(i,n,e,r,s,o):void 0}},Oh=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return n(i,t),i.prototype.se=function(t){var i=this,n=void 0!==this.dateOrigin?this.dateOrigin.getTime():0,e=function(t){return Th.map((function(n){var e=function(t,i,n){switch(n.label){case"MilliSecond100":return"Great"===i?void 0:"Major"===i?t.formatOptionsMajorMilliSecond:t.formatOptionsMinorMillisecond;case"Second":return"Great"===i?t.formatOptionsGreatSecond:"Major"===i?t.formatOptionsMajorSecond:t.formatOptionsMinorSecond;case"Minute":return"Great"===i?t.formatOptionsGreatMinute:"Major"===i?t.formatOptionsMajorMinute:t.formatOptionsMinorMinute;default:case"Hour":return"Great"===i?t.formatOptionsGreatHour:"Major"===i?t.formatOptionsMajorHour:t.formatOptionsMinorHour;case"Day":return"Great"===i?t.formatOptionsGreatDay:"Major"===i?t.formatOptionsMajorDay:t.formatOptionsMinorDay;case"Week":return"Great"===i?t.formatOptionsGreatWeek:"Major"===i?t.formatOptionsMajorWeek:t.formatOptionsMinorWeek;case"Month":return"Great"===i?t.formatOptionsGreatMonth:"Major"===i?t.formatOptionsMajorMonth:t.formatOptionsMinorMonth;case"Year":return"Great"===i?t.formatOptionsGreatYear:"Major"===i?t.formatOptionsMajorYear:t.formatOptionsMinorYear;case"Decade":return"Great"===i?void 0:"Major"===i?t.formatOptionsMajorDecade:t.formatOptionsMinorDecade;case"Century":return"Great"===i?void 0:"Major"===i?t.formatOptionsMajorCentury:void 0;case"Millennium":return}}(i,t,n);if("object"!=typeof e)return e;try{return new Intl.DateTimeFormat(i.locale,e)}catch(t){var r="";for(var s in e)r+=" "+s+": "+e[s]+",";console.error("Invalid Intl.DateTimeFormat ( locale: "+i.locale+", formatOptions {"+r+"} )")}}))},r=new Map;r.set("great",e("Great")),r.set("major",e("Major")),r.set("minor",e("Minor"));var s=function(t){return String(t)},o=function(t,e){return function(o,h){var u=o+n,a=h.getInnerStart(),f=h.getInnerEnd(),c=a>f,l=Ch(t,c?f:a,c?a:f);if(void 0===l)return s(u);if("great"===t){u=(!1===Br(o,"left"===e?a:f)?o:!1===l.irregular?"left"===e&&!1===c||"right"===e&&!0===c?l.greatTicks.getReferenceKeyValue(n)(o):l.greatTicks.getReferenceKeyValue(n)(o+1*l.unit):"left"===e&&!1===c||"right"===e&&!0===c?l.getPrevKeyValue(n)(o):l.getNextKeyValue(n)(o))+n}var d=r.get(t);if(void 0===d)return s(u);var v=d[Th.indexOf(l)];return void 0===v?"":"function"==typeof v?v(u,h,i.locale):v.format(u)}},h=[],u=[{sr:"Great ticks (directive)",hr:0,Ie:!0,pe:Lh("great",n),xe:void 0},{sr:"Major ticks",hr:1,Ce:this.majorTickStyle,Ae:o("major"),pe:Lh("major",n),Gn:{Oe:Ih("major")},xe:void 0}];this.greatTickStyle!==mh&&(h.push({sr:"Great ticks (left)",Ce:this.greatTickStyle.setLabelAlignment(-1),Ae:o("great","left"),pe:Bh(n,"left"),en:!0,Ne:!1}),h.push({sr:"Great ticks (right)",Ce:this.greatTickStyle.setLabelAlignment(1),Ae:o("great","right"),pe:Bh(n,"right"),en:!0,Ne:!1})),this.minorTickStyle!==mh&&u.push({sr:"Minor ticks",hr:2,Ce:this.minorTickStyle,Ae:o("minor"),pe:Lh("minor",n),Gn:{Oe:Ih("minor"),Hn:function(t,i,n,e,r,s){var o=Ch("minor",r,s);return!o||"Week"!==o.label}},xe:void 0});var a=this.cursorFormatter;return{cn:h,ln:u,rn:a?function(t,i,e){return a(n+t,i,e)}:function(t,i,e){var r=new Date(n+t);return new Intl.DateTimeFormat(e,{year:"numeric",month:"numeric",day:"numeric",minute:"2-digit",hour:"2-digit"}).format(r)+" "},ae:1e3,fe:31536e9}},i.prototype.setCursorFormatter=function(t){return this.set("cursorFormatter",t)},i.prototype.getCursorFormatter=function(){return this.get("cursorFormatter")},i.prototype.setGreatTickStyle=function(t){if("function"==typeof t){var i=this.get("greatTickStyle");return i!==mh?this.set("greatTickStyle",t(i)):this}return this.set("greatTickStyle",t)},i.prototype.getGreatTickStyle=function(){return this.get("greatTickStyle")},i.prototype.setMajorTickStyle=function(t){return"function"==typeof t?this.set("majorTickStyle",t(this.get("majorTickStyle"))):this.set("majorTickStyle",t)},i.prototype.getMajorTickStyle=function(){return this.get("majorTickStyle")},i.prototype.setMinorTickStyle=function(t){if("function"==typeof t){var i=this.get("minorTickStyle");return i!==mh?this.set("minorTickStyle",t(i)):this}return this.set("minorTickStyle",t)},i.prototype.getMinorTickStyle=function(){return this.get("minorTickStyle")},i.prototype.setLocale=function(t){return this.set("locale",t)},i.prototype.getLocale=function(){return this.get("locale")},i.prototype.setDateOrigin=function(t){return this.set("dateOrigin",t)},i.prototype.getDateOrigin=function(){return this.get("dateOrigin")},i.prototype.setFormattingDecade=function(t,i){return this.withMutations((function(n){return t&&(n=n.set("formatOptionsMajorDecade",t)),i&&(n=n.set("formatOptionsMinorYear",i)),n}))},i.prototype.setFormattingYear=function(t,i){return this.withMutations((function(n){return t&&(n=n.set("formatOptionsMajorYear",t)),i&&(n=n.set("formatOptionsMinorMonth",i)),n}))},i.prototype.setFormattingMonth=function(t,i,n){return this.withMutations((function(e){return t&&(e=e.set("formatOptionsGreatYear",t)),i&&(e=e.set("formatOptionsMajorMonth",i)),n&&(e=e.set("formatOptionsMinorWeek",n)),e}))},i.prototype.setFormattingWeek=function(t,i,n){return this.withMutations((function(e){return t&&(e=e.set("formatOptionsGreatMonth",t)),i&&(e=e.set("formatOptionsMajorWeek",i)),n&&(e=e.set("formatOptionsMinorDay",n)),e}))},i.prototype.setFormattingDay=function(t,i,n){return this.withMutations((function(e){return t&&(e=e.set("formatOptionsGreatWeek",t)),i&&(e=e.set("formatOptionsMajorDay",i)),n&&(e=e.set("formatOptionsMinorHour",n)),e}))},i.prototype.setFormattingHour=function(t,i,n){return this.withMutations((function(e){return t&&(e=e.set("formatOptionsGreatDay",t)),i&&(e=e.set("formatOptionsMajorHour",i)),n&&(e=e.set("formatOptionsMinorMinute",n)),e}))},i.prototype.setFormattingMinute=function(t,i,n){return this.withMutations((function(e){return t&&(e=e.set("formatOptionsGreatHour",t)),i&&(e=e.set("formatOptionsMajorMinute",i)),n&&(e=e.set("formatOptionsMinorSecond",n)),e}))},i.prototype.setFormattingSecond=function(t,i,n){return this.withMutations((function(e){return t&&(e=e.set("formatOptionsGreatMinute",t)),i&&(e=e.set("formatOptionsMajorSecond",i)),n&&(e=e.set("formatOptionsMinorMillisecond",n)),e}))},i.prototype.setFormattingMilliSecond=function(t,i){return this.withMutations((function(n){return t&&(n=n.set("formatOptionsGreatSecond",t)),i&&(n=n.set("formatOptionsMajorMilliSecond",i)),n}))},i}(me({locale:void 0,dateOrigin:void 0,cursorFormatter:void 0,greatTickStyle:new yh,majorTickStyle:new yh,minorTickStyle:new yh,formatOptionsMajorCentury:{year:"numeric"},formatOptionsMinorDecade:{year:"numeric"},formatOptionsMajorDecade:{year:"numeric"},formatOptionsMinorYear:{year:"numeric"},formatOptionsMajorYear:{year:"numeric"},formatOptionsMinorMonth:{month:"short"},formatOptionsGreatYear:{year:"numeric"},formatOptionsMajorMonth:{month:"long"},formatOptionsMinorWeek:{day:"numeric"},formatOptionsGreatMonth:{year:"numeric",month:"long"},formatOptionsMajorWeek:{day:"numeric",weekday:"short"},formatOptionsMinorDay:{day:"numeric",weekday:"short"},formatOptionsGreatWeek:function(t,i,n){var e=new Date(t),r=function(t){var i=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate()));i.setUTCDate(i.getUTCDate()+4-(i.getUTCDay()||7));var n=new Date(Date.UTC(i.getUTCFullYear(),0,1));return Math.ceil(((i.getTime()-n.getTime())/864e5+1)/7)}(e);return new Intl.DateTimeFormat(n,{year:"numeric",month:"long"}).format(e)+" Week "+r},formatOptionsMajorDay:{weekday:"long",day:"numeric"},formatOptionsMinorHour:{hour:"2-digit",minute:"2-digit"},formatOptionsGreatDay:{year:"numeric",month:"long",day:"numeric"},formatOptionsMajorHour:{hour:"2-digit",minute:"2-digit"},formatOptionsMinorMinute:{hour:"2-digit",minute:"2-digit"},formatOptionsGreatHour:{year:"numeric",month:"long",day:"numeric"},formatOptionsMajorMinute:{hour:"2-digit",minute:"2-digit"},formatOptionsMinorSecond:{hour:"2-digit",minute:"2-digit",second:"2-digit"},formatOptionsGreatMinute:{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"},formatOptionsMajorSecond:{second:"2-digit"},formatOptionsMinorMillisecond:function(t){var i=new Date(t);return""+(i.getSeconds()+i.getUTCMilliseconds()/1e3).toFixed(2)},formatOptionsGreatSecond:{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"},formatOptionsMajorMilliSecond:function(t){var i=new Date(t);return""+(i.getSeconds()+i.getUTCMilliseconds()/1e3).toFixed(1)}})),Ph=function(t,i){return function(n,e){var r=e-n;if(i){var s=Math.log10(r/2),o=Math.pow(10,Math.floor(s-t)),h=Math.floor(n/(10*o))*o*10;return Zo(h,e,o,void 0)}var u=Math.log10(r),a=Math.pow(10,Math.floor(u-t));return Xo(n,e,a)}},Dh=function(t,i,n,e,r,s){return 0===i?t.filter((function(t,i){return i%2==0})):1===i?t.filter((function(t,i){return i%5==0})):void 0},_h=Jo(void 0,2,5),Rh=function(t,i,n,e,r,s){return 0===i?[t[1],t[3],t[5]]:1===i?[t[0],t[3]]:2===i?[t[1]]:void 0},zh=function(t,i){var n=Bo(t),e=Lo(t);if(i)return function(t,i){for(var r=[],s=Math.floor(n(t)),o=Math.ceil(n(i)),h=s-1;h<=o+1;h+=1){var u=Math.pow(e,h);r.push(u)}return r};var r=10===t?9:4;return function(t,i){for(var s=Math.round(n(t)),o=Math.round(n(i)),h=[],u=Math.pow(e,s),a=(Math.pow(e,o)-u)/r,f=1;f<=r;f+=1){var c=u+a*f;c>t&&c<i&&h.push(c)}return h}},Eh=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return n(i,t),i.prototype.se=function(t){var i=this.formattingOffset,n=this.get("extremeFormattingFunction")||("logarithmic"===t.type?Ro(!0,t.base):_o.Numeric),e=this.get("majorFormattingFunction")||("logarithmic"===t.type?Ro(!0,t.base):_o.Numeric),r=this.get("minorFormattingFunction")||("logarithmic"===t.type?Ro(!0,t.base):_o.Numeric),s=[],o=[];this.extremeTickStyle!==mh&&s.push({sr:"Extreme ticks",Ce:this.extremeTickStyle,Ae:void 0===i?n:function(t,e,r){return n(i+t,e,r)},pe:Yo,en:!0,Ne:!0}),o.push({sr:"Major ticks",hr:0,Ce:this.majorTickStyle,Ae:void 0===i?e:function(t,n,r){return e(i+t,n,r)},pe:"logarithmic"===t.type?zh(t.base,!0):Ph(0,!0),Gn:"logarithmic"===t.type?void 0:{Oe:Dh},xe:void 0}),this.minorTickStyle!==mh&&o.push({sr:"Minor ticks",hr:1,Ce:this.minorTickStyle,Ae:void 0===i?r:function(t,n,e){return r(i+t,n,e)},pe:"logarithmic"===t.type?zh(t.base,!1):Ph(1,!1),Gn:"logarithmic"===t.type?{Oe:Rh}:{Oe:_h},xe:50});var h=this.cursorFormatter?this.cursorFormatter:_o.Numeric;return{cn:s,ln:o,rn:void 0===i?h:function(t,n,e){return h(i+t,n,e)},ae:1e-9,fe:void 0}},i.prototype.setCursorFormatter=function(t){return this.set("cursorFormatter",t)},i.prototype.getCursorFormatter=function(){return this.get("cursorFormatter")},i.prototype.setExtremeTickStyle=function(t){if("function"==typeof t){var i=this.get("extremeTickStyle");return i!==mh?this.set("extremeTickStyle",t(i)):this}return this.set("extremeTickStyle",t)},i.prototype.getExtremeTickStyle=function(){return this.get("extremeTickStyle")},i.prototype.setFormattingOffset=function(t){return this.set("formattingOffset",t)},i.prototype.getFormattingOffset=function(){return this.get("formattingOffset")},i.prototype.setMajorTickStyle=function(t){return"function"==typeof t?this.set("majorTickStyle",t(this.get("majorTickStyle"))):this.set("majorTickStyle",t)},i.prototype.getMajorTickStyle=function(){return this.get("majorTickStyle")},i.prototype.setMinorTickStyle=function(t){if("function"==typeof t){var i=this.get("minorTickStyle");return i!==mh?this.set("minorTickStyle",t(i)):this}return this.set("minorTickStyle",t)},i.prototype.getMinorTickStyle=function(){return this.get("minorTickStyle")},i.prototype.setFormattingFunction=function(t){return this.withMutations((function(i){return i.set("extremeFormattingFunction",t).set("majorFormattingFunction",t).set("minorFormattingFunction",t).set("cursorFormatter",t)}))},i.prototype.getExtremeFormattingFunction=function(){return this.get("extremeFormattingFunction")},i.prototype.setExtremeFormattingFunction=function(t){return this.set("extremeFormattingFunction",t)},i.prototype.getMajorFormattingFunction=function(){return this.get("majorFormattingFunction")},i.prototype.setMajorFormattingFunction=function(t){return this.set("majorFormattingFunction",t)},i.prototype.getMinorFormattingFunction=function(){return this.get("minorFormattingFunction")},i.prototype.setMinorFormattingFunction=function(t){return this.set("minorFormattingFunction",t)},i}(me({cursorFormatter:void 0,extremeTickStyle:new yh,majorTickStyle:new yh,minorTickStyle:new yh,formattingOffset:void 0,extremeFormattingFunction:void 0,majorFormattingFunction:void 0,minorFormattingFunction:void 0})),Nh=me({cursorFormatter:void 0,timeOrigin:void 0,majorTickStyle:new yh,minorTickStyle:new yh}),Vh=36e5,Gh=6e4,Hh=1e3,jh=1,Wh=.001,Uh=1e-6,Yh=function(t,i){var n=i-t;return n>=24*Vh?"MajorHours12":n>=Vh?"MajorHours":n>=10*Gh?"MajorMinutes15":n>=1*Gh?"MajorMinutes":n>=10*Hh?"MajorSeconds15":n>=Hh?"MajorSeconds":n>=100*jh?"MajorMilliseconds100":n>=10*jh?"MajorMilliseconds10":n>=1*jh?"MajorMilliseconds":n>=100*Wh?"MajorMicroseconds100":n>=10*Wh?"MajorMicroseconds10":n>=1*Wh?"MajorMicroseconds":n<=1*Wh?"MajorNanoseconds100":"Unknown"},Xh={hhmmss:function(t){var i=Math.abs(t),n=t>=0?"":"-",e=Math.floor(i/Vh);i%=Vh;var r=Math.floor(i/Gh);i%=Gh;var s=Math.floor(i/Hh);return""+n+As(e,2)+":"+As(r,2)+":"+As(s,2)},hhmmssmmm:function(t){var i=Math.abs(t),n=t>=0?"":"-",e=Math.floor(i/Vh);i%=Vh;var r=Math.floor(i/Gh);i%=Gh;var s=Math.floor(i/Hh);i%=Hh;var o=Math.floor(i/jh);return""+n+As(e,2)+":"+As(r,2)+":"+As(s,2)+"."+As(o,3)},hhmmssmmmuuu:function(t){var i=Math.abs(t),n=t>=0?"":"-",e=Math.floor(i/Vh),r=Math.floor(i/Gh)%60,s=Math.floor(i/Hh)%60,o=Math.floor(i/jh)%1e3,h=t.toLocaleString("en-US",{minimumFractionDigits:3,maximumFractionDigits:3}).split(".")[1];return""+n+As(e,2)+":"+As(r,2)+":"+As(s,2)+"."+As(o,3)+h},hhmmssmmmuuunnn:function(t){var i=Math.abs(t),n=t>=0?"":"-",e=Math.floor(i/Vh),r=Math.floor(i/Gh)%60,s=Math.floor(i/Hh)%60,o=Math.floor(i/jh)%1e3,h=t.toLocaleString("en-US",{minimumFractionDigits:6,maximumFractionDigits:6}).split(".")[1];return""+n+As(e,2)+":"+As(r,2)+":"+As(s,2)+"."+As(o,3)+h}},Zh={MajorHours12:{major:{format:Xh.hhmmss,getKeyValues:function(t,i,n,e){var r=12*Vh;return t=Math.floor(t/(4*r))*r*4,Zo(t,i,r,void 0)},fitKeyValues:Jo({ignore:"first"},2,4)},minor:{format:Xh.hhmmss,getKeyValues:function(t,i,n,e){return Xo(t,i,1*Vh)},fitKeyValues:Jo({},2,3,4,6)},defaultValueFormatter:Xh.hhmmss},MajorHours:{major:{format:Xh.hhmmss,getKeyValues:function(t,i,n,e){var r=Vh;return t=Math.floor(t/(12*r))*r*12,Zo(t,i,r,void 0)},fitKeyValues:Jo({ignore:"first"},2,6,12)},minor:{format:Xh.hhmmss,getKeyValues:function(t,i,n,e){return Xo(t,i,5*Gh)},fitKeyValues:Jo({},2,4,6)},defaultValueFormatter:Xh.hhmmss},MajorMinutes15:{major:{format:Xh.hhmmss,getKeyValues:function(t,i,n,e){var r=15*Gh;return t=Math.floor(t/Vh)*Vh,Zo(t,i,r,void 0)},fitKeyValues:Jo({ignore:"first"},2)},minor:{format:Xh.hhmmss,getKeyValues:function(t,i,n,e){return Xo(t,i,1*Gh)},fitKeyValues:Jo({},3,5)},defaultValueFormatter:Xh.hhmmss},MajorMinutes:{major:{format:Xh.hhmmss,getKeyValues:function(t,i,n,e){var r=Gh;return t=Math.floor(t/(10*r))*r*10,Zo(t,i,r,void 0)},fitKeyValues:Jo({ignore:"first"},2,5)},minor:{format:Xh.hhmmss,getKeyValues:function(t,i,n,e){return Xo(t,i,5*Hh)},fitKeyValues:Jo({},2,3,4,6)},defaultValueFormatter:Xh.hhmmss},MajorSeconds15:{major:{format:Xh.hhmmss,getKeyValues:function(t,i,n,e){var r=15*Hh;return t=Math.floor(t/(4*r))*r*4,Zo(t,i,r,void 0)},fitKeyValues:Jo({ignore:"first"},2,4)},minor:{format:Xh.hhmmss,getKeyValues:function(t,i,n,e){return Xo(t,i,1*Hh)},fitKeyValues:Jo({},3,5)},defaultValueFormatter:Xh.hhmmss},MajorSeconds:{major:{format:Xh.hhmmssmmm,getKeyValues:function(t,i,n,e){var r=Hh;return t=Math.floor(t/(10*r))*r*10,Zo(t,i,r,void 0)},fitKeyValues:Jo({ignore:"first"},2,5)},minor:{format:Xh.hhmmssmmm,getKeyValues:function(t,i,n,e){return Xo(t,i,100*jh)},fitKeyValues:Jo({},2,3,5)},defaultValueFormatter:Xh.hhmmssmmm},MajorMilliseconds100:{major:{format:Xh.hhmmssmmm,getKeyValues:function(t,i,n,e){var r=100*jh;return t=Math.floor(t/(10*r))*r*10,Zo(t,i,r,void 0)},fitKeyValues:Jo({ignore:"first"},2,5)},minor:{format:Xh.hhmmssmmm,getKeyValues:function(t,i,n,e){return Xo(t,i,10*jh)},fitKeyValues:Jo({},2,3,5)},defaultValueFormatter:Xh.hhmmssmmm},MajorMilliseconds10:{major:{format:Xh.hhmmssmmm,getKeyValues:function(t,i,n,e){var r=10*jh;return t=Math.floor(t/(10*r))*r*10,Zo(t,i,r,void 0)},fitKeyValues:Jo({ignore:"first"},2,5)},minor:{format:Xh.hhmmssmmm,getKeyValues:function(t,i,n,e){return Xo(t,i,jh)},fitKeyValues:Jo({},2,3,5)},defaultValueFormatter:Xh.hhmmssmmm},MajorMilliseconds:{major:{format:Xh.hhmmssmmmuuu,getKeyValues:function(t,i,n,e){var r=jh;return t=Math.floor(t/(10*r))*r*10,Zo(t,i,r,void 0)},fitKeyValues:Jo({ignore:"first"},2,5)},minor:{format:Xh.hhmmssmmmuuu,getKeyValues:function(t,i,n,e){return Xo(t,i,100*Wh)},fitKeyValues:Jo({},2)},defaultValueFormatter:Xh.hhmmssmmmuuu},MajorMicroseconds100:{major:{format:Xh.hhmmssmmmuuu,getKeyValues:function(t,i,n,e){var r=100*Wh;return t=Math.floor(t/(10*r))*r*10,Zo(t,i,r,void 0)},fitKeyValues:Jo({ignore:"first"},2,5)},minor:{format:Xh.hhmmssmmmuuu,getKeyValues:function(t,i,n,e){return Xo(t,i,10*Wh)},fitKeyValues:Jo({},2,3,5)},defaultValueFormatter:Xh.hhmmssmmmuuu},MajorMicroseconds10:{major:{format:Xh.hhmmssmmmuuu,getKeyValues:function(t,i,n,e){var r=10*Wh;return t=Math.floor(t/(10*r))*r*10,Zo(t,i,r,void 0)},fitKeyValues:Jo({ignore:"first"},2,5)},minor:{format:Xh.hhmmssmmmuuu,getKeyValues:function(t,i,n,e){return Xo(t,i,1*Wh)},fitKeyValues:Jo({},2,3,5)},defaultValueFormatter:Xh.hhmmssmmmuuu},MajorMicroseconds:{major:{format:Xh.hhmmssmmmuuunnn,getKeyValues:function(t,i,n,e){var r=1*Wh;return t=Math.floor(t/(10*r))*r*10,Zo(t,i,r,void 0)},fitKeyValues:Jo({ignore:"first"},2,5)},minor:{format:Xh.hhmmssmmmuuunnn,getKeyValues:function(t,i,n,e){return Xo(t,i,100*Uh)},fitKeyValues:Jo({},2,3,5)},defaultValueFormatter:Xh.hhmmssmmmuuunnn},MajorNanoseconds100:{major:{format:Xh.hhmmssmmmuuunnn,getKeyValues:function(t,i,n,e){var r=100*Uh;return t=Math.floor(t/(10*r))*r*10,Zo(t,i,r,void 0)},fitKeyValues:Jo({ignore:"first"},2,5)},minor:{format:Xh.hhmmssmmmuuunnn,getKeyValues:function(t,i,n,e){return Xo(t,i,10*Uh)},fitKeyValues:Jo({},2,3,5)},defaultValueFormatter:Xh.hhmmssmmmuuunnn},Unknown:{major:{format:function(t,i,n){return""},getKeyValues:function(t,i,n,e){return[]},fitKeyValues:void 0},minor:{format:function(t,i,n){return""},getKeyValues:function(t,i,n,e){return[]},fitKeyValues:void 0},defaultValueFormatter:function(t,i,n){return""}}},Kh=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return n(i,t),i.prototype.se=function(t){var i=this.timeOrigin||0,n=[{sr:"Major ticks",hr:0,Ce:this.majorTickStyle,Ae:function(t,n,e){var r=Yh(Math.min(n.getInnerStart(),n.getInnerEnd()),Math.max(n.getInnerStart(),n.getInnerEnd()));return(0,Zh[r].major.format)(t+i,n,e)},pe:function(t,i,n,e){var r=Yh(n,e);return(0,Zh[r].major.getKeyValues)(t,i,n,e)},Gn:{Oe:function(t,i,n,e,r,s){var o=Yh(r,s),h=Zh[o].major.fitKeyValues;if(h)return h(t,i,n,e,r,s)}},xe:void 0}];return this.minorTickStyle instanceof yh&&n.push({sr:"Minor ticks",hr:1,Ce:this.minorTickStyle,Ae:function(t,n,e){var r=Yh(Math.min(n.getInnerStart(),n.getInnerEnd()),Math.max(n.getInnerStart(),n.getInnerEnd()));return(0,Zh[r].minor.format)(t+i,n,e)},pe:function(t,i,n,e){var r=Yh(n,e);return(0,Zh[r].minor.getKeyValues)(t,i,n,e)},Gn:{Oe:function(t,i,n,e,r,s){var o=Yh(r,s),h=Zh[o].minor.fitKeyValues;if(h)return h(t,i,n,e,r,s)}},xe:void 0}),{cn:[],ln:n,rn:this.cursorFormatter||function(t,n,e){var r=Yh(Math.min(n.getInnerStart(),n.getInnerEnd()),Math.max(n.getInnerStart(),n.getInnerEnd()));return Zh[r].defaultValueFormatter(t+i,n,e)},ae:1e-4,fe:864e6}},i.prototype.setMajorTickStyle=function(t){return"function"==typeof t?this.set("majorTickStyle",t(this.get("majorTickStyle"))):this.set("majorTickStyle",t)},i.prototype.getMajorTickStyle=function(){return this.get("majorTickStyle")},i.prototype.setMinorTickStyle=function(t){if("function"==typeof t){var i=this.get("minorTickStyle");return i!==mh?this.set("minorTickStyle",t(i)):this}return this.set("minorTickStyle",t)},i.prototype.getMinorTickStyle=function(){return this.get("minorTickStyle")},i.prototype.setCursorFormatter=function(t){return this.set("cursorFormatter",t)},i.prototype.getCursorFormatter=function(){return this.get("cursorFormatter")},i.prototype.setTimeOrigin=function(t){return this.set("timeOrigin",t)},i.prototype.getTimeOrigin=function(){return this.get("timeOrigin")},i}(Nh),qh={ZoomIn:{x:-43,y:0},ZoomOut:{x:-65,y:0},ZoomToFit:{x:-86,y:0},ZoomInX:{x:-107,y:-1},ZoomOutX:{x:-128,y:-3},ZoomInY:{x:-150,y:0},ZoomOutY:{x:-171,y:0},EnableAnimation:{x:-276,y:0},DisableAnimation:{x:-298,y:0},CollapseMenu:{x:0,y:0},ShowMenu:{x:-21,y:0}},Jh={ZoomIn:{x:-43,y:0},ZoomOut:{x:-65,y:0},ZoomToFit:{x:-86,y:0},ZoomInX:{x:-107,y:-1},ZoomOutX:{x:-128,y:-3},ZoomInY:{x:-150,y:0},ZoomOutY:{x:-171,y:0},EnableAnimation:{x:-276,y:0},DisableAnimation:{x:-298,y:0},CollapseMenu:{x:0,y:0},ShowMenu:{x:-21,y:0}};function Qh(t,i,n){return n<0?t:n>1?i:Ae(t.getR()+n*(i.getR()-t.getR()),t.getG()+n*(i.getG()-t.getG()),t.getB()+n*(i.getB()-t.getB()),t.getA()+n*(i.getA()-t.getA()))}var $h,tu,iu={seriesBackgroundTint:Ae(20,20,20),dashBGStops:[{color:Ae(50,51,52),offset:0},{color:Ae(14,15,16),offset:.5},{color:Ae(0,0,1),offset:1}],panelBGStops:[{color:Ae(120,120,120,100),offset:0},{color:Ae(0,1,1,50),offset:1}],seriesBGStops:[{color:Ae(20,20,20,200),offset:0},{color:Ae(0,0,0,255),offset:1}],spiderWebStops:[{color:Ae(200,200,200,150),offset:0},{color:Ae(50,50,50,150),offset:.5},{color:Ae(255,255,255,150),offset:1}],legendFillStops:[{color:Ae(80,80,80,130),offset:0},{color:Ae(30,30,30,130),offset:1}],axisColorStops:[{color:Ae(255,255,255),offset:0},{color:Ae(50,50,50),offset:1}],axisOverlayColorStops:[{color:Ae(255,255,255,50),offset:0},{color:Ae(255,255,255,20),offset:.2},{color:Ae(255,255,255,30),offset:.8},{color:Ae(255,255,255,50),offset:1}],gridColor:Ae(200,200,200),isDarkTheme:!0,colorStrength:1,colorSaturation:.7,darkLightBlendColor:Ae(255,255,255,255),legendStrokeColor:Ae(255,255,255),dashRadialFillCenterX:.8,dashRadialFillCenterY:.8,forceLabelsWhite:!1,explicitMasterColor:Ae(100,100,100),gradientStrength:1,cursorSolverColor:Ae(32,32,32),mapColor:Ae(100,100,100),gaugeValueColor:Ae(100,100,100),useFullHSVPalette:!0,customPaletteSteps:[Ae(255,0,0),Ae(0,255,0),Ae(0,0,255)]},nu=Ae(254,204,0,.7),eu=function(i){var n=e(e({},iu),i),r=n.seriesBackgroundTint,s=n.dashBGStops,o=n.panelBGStops,h=n.seriesBGStops,u=n.spiderWebStops,a=n.legendFillStops,f=n.axisColorStops,c=n.axisOverlayColorStops,l=n.gridColor,d=n.isDarkTheme,v=n.colorStrength,y=n.colorSaturation,S=n.darkLightBlendColor,m=n.legendStrokeColor,b=n.dashRadialFillCenterX,g=n.dashRadialFillCenterY,w=n.forceLabelsWhite,p=n.masterHueDeg,k=n.sliceHueStep,x=n.explicitMasterColor,M=n.gradientStrength,A=n.cursorSolverColor,F=n.mapColor,T=n.gaugeValueColor,C=Te(p,y,v),B=Qh(C,Ae(255,255,255),.5),L=Qh(C,Ae(255,255,255),.2),I=Qh(C,Ae(255,255,255),.8),O=Qh(C,Ae(255,255,255),.9),P=Qh(C,Ae(255,255,255),.8),D=B,_=Qh(S,C,.3),R=Qh(S,C,.5),z=[{color:Qh(F,Ae(255,255,255),.4*M),offset:0},{color:Qh(F,Ae(0,0,0),.1*M),offset:1}],E=Qh(O,Ae(0,0,0),.8),N=h[0].color.setA(60);function V(t,i){var e=t*k+i;e<0&&(e+=360*(1+Math.abs(Math.floor(e/360)))),e%=360;var r=n.customPaletteSteps.length,s=Math.floor(e%360/(360/r)),o=s+1;o>=r&&(o=0);var h=e%(360/r)/(360/r),u=Qh(n.customPaletteSteps[s],n.customPaletteSteps[o],h),a=Qh(C,S,.2);return Qh(a,u,.6)}function G(t){if(!0===n.useFullHSVPalette){var i=p+t*k;i<0&&(i+=360*(1+Math.abs(Math.floor(i/360))));var e=Te(i,y,v),r=Qh(C,S,.2);return Qh(r,e,.6)}return V(t,0)}function H(t){if(!0===n.useFullHSVPalette){var i=p+t*k+180;i<0&&(i+=360*(1+Math.abs(Math.floor(i/360))));var e=Te(i,y,v),r=Qh(C,S,.2);return Qh(r,e,.6)}return V(t,180)}d?w&&(I=Ae(255,255,255),_=Ae(255,255,255),P=Ae(255,255,255),B=Ae(255,255,255),D=Ae(255,255,255)):(S=Ae(0,0,0,255),C=Te(p,y,v),x!==iu.explicitMasterColor&&(C=x),B=Qh(C,Ae(0,0,0),.5),L=Qh(C,Ae(0,0,0),.2),I=Qh(C,Ae(0,0,0),.8),O=Qh(C,Ae(0,0,0),.9),l=Ae(40,40,40),P=Qh(C,Ae(0,0,0),.8),D=B,m=Ae(40,40,40),_=Qh(S,C,.3),R=Qh(S,C,.5),z=[{color:Qh(F,Ae(255,255,255),.8*M),offset:0},{color:Qh(F,Ae(0,0,0),.8*M),offset:1}],u=[{color:Ae(60,60,60,150),offset:0},{color:Ae(100,100,100,150),offset:.5},{color:Ae(80,80,80,150),offset:1}],a=[{color:Qh(C,Ae(100,100,100,0),.6*M),offset:0},{color:Qh(C,Ae(255,255,255,0),.6*M),offset:1}],c=[{color:Ae(128,128,128,50),offset:0},{color:Ae(128,128,128,20),offset:.2},{color:Ae(128,128,128,30),offset:.8},{color:Ae(128,128,128,50),offset:1}],E=Qh(O,Ae(255,255,255),.8));var j=new Je({stops:s,position:{x:b,y:g}}),W=new nr({thickness:1,fillStyle:new Qe({angle:45,stops:[{color:Ae(255,255,255,150),offset:0},{color:Ae(50,50,50,150),offset:1}]}),highlightThicknessMultiplier:1}),U=new nr({thickness:6,fillStyle:new Ee({color:Ae(0,0,0,0)}),highlightThicknessMultiplier:1}),Y=new Je({stops:o,position:{x:.5,y:.5},shape:t.GradientShape.circle,extent:t.GradientExtent.farthestCorner}),X=new nr({thickness:1,fillStyle:new Ee({color:S.setA(20)})}),Z=new Je({stops:h,position:{x:.5,y:.5},shape:t.GradientShape.circle,extent:t.GradientExtent.farthestCorner}),K=new nr({thickness:0,fillStyle:new Ee({color:Ae(0,0,0)})}),q="Verdana",J=new sh({size:16,family:q,style:"normal",weight:"normal"}),Q=new Ee({color:P}),$=new Ee({color:S.setA(20)}),tt=new nr({thickness:2,fillStyle:new Ee({color:S.setA(150)})}),it=$,nt=tt,et=new Ee({color:B}),rt=new sh({size:16,family:q,style:"normal",weight:"normal"}),st=new nr({thickness:1,fillStyle:new Ee({color:l.setA(75)})}),ot=new nr({thickness:1,fillStyle:new Ee({color:l.setA(50)})}),ht=new nr({thickness:1,fillStyle:new Ee({color:l.setA(20)})}),ut=new nr({thickness:2,fillStyle:new Ee({color:l.setA(200)})}),at=new nr({thickness:1,fillStyle:new Ee({color:l.setA(200)})}),ft=new nr({thickness:1,fillStyle:new Ee({color:l.setA(150)})}),ct=new sh({size:13,family:q,style:"italic",weight:"bold"}),lt=new Ee({color:I}),dt=new sh({size:12,family:q,style:"italic",weight:"normal"}),vt=new Ee({color:I}),yt=new sh({size:10,family:q,style:"italic",weight:"normal"}),St=new Ee({color:I}),mt=new nr({thickness:2,fillStyle:new Qe({angle:45,stops:f})}),bt=new nr({thickness:0,fillStyle:new Ee({color:Ae(0,0,0)})}),gt=new Qe({angle:45,stops:c}),wt=new Qe({angle:45,stops:[{color:L.setA(50),offset:0},{color:Qh(L,S,.3).setA(50),offset:1}]}),pt=new nr({thickness:1,fillStyle:new Ee({color:L.setA(100)})}),kt=new nr({thickness:3,fillStyle:new Ee({color:Qh(L,S,.3).setA(150)})}),xt=function(t){return new Ee({color:Qh(G(t),S,.3)})},Mt=new nr({thickness:1,fillStyle:new Ee({color:N})}),At=Mt,Ft=new nr({thickness:1,fillStyle:new Ee({color:R})}),Tt=new Ee({color:Qh(Te(120,y,v),C,.2)}),Ct=new Ee({color:Qh(Te(0,y,v),C,.2)}),Bt=new nr({thickness:2,fillStyle:Tt,highlightThicknessMultiplier:1}),Lt=new nr({thickness:2,fillStyle:Ct,highlightThicknessMultiplier:1}),It=new Ee({color:Ae(255,255,255)}),Ot=new nr({thickness:0,fillStyle:new Ee({color:Ae(0,0,0)})}),Pt=new Ee({color:Qh(Qh(A,S,.01),C,.1).setA(220)}),Dt=new nr({thickness:1,fillStyle:new Ee({color:Qh(A,S,.5).setA(240)})}),_t=new Ee({color:Qh(A,S,.99)}),Rt=new sh({size:13,family:q,style:"italic",weight:"normal"}),zt=new nr({thickness:1,fillStyle:new Ee({color:Ae(150,150,150)})}),Et=new Ee({color:Qh(Qh(A,S,.01),C,.1).setA(220)}),Nt=new nr({thickness:1,fillStyle:new Ee({color:Qh(A,S,.5).setA(240)})}),Vt=new Ee({color:Qh(A,S,.99)}),Gt=new sh({size:15,family:q,style:"normal",weight:"normal"}),Ht=dt,jt=at,Wt=vt,Ut=new nr({thickness:2,fillStyle:new Je({stops:u,position:{x:.2,y:.2},shape:t.GradientShape.circle,extent:t.GradientExtent.farthestCorner})}),Yt=Ut,Xt=new nr({thickness:3,fillStyle:new Ee({color:Ae(200,200,200)})}),Zt=new Ee({color:I}),Kt=new sh({size:15,family:q,style:"normal",weight:"normal"}),qt=new Ee({color:I}),Jt=new sh({size:15,family:q,style:"normal",weight:"normal"}),Qt=new yh({gridStrokeStyle:new nr({thickness:1,fillStyle:new Qe({angle:45,stops:[{color:Ae(50,50,50,150),offset:0},{color:Ae(255,255,255,150),offset:1}]})}),tickLength:7,tickStyle:new nr({thickness:1,fillStyle:new Ee({color:l.setA(200)})}),tickPadding:0,labelFont:new sh({size:14,family:q,style:"normal",weight:"normal"}),labelPadding:0,labelFillStyle:new Ee({color:I})}),$t=new nr({thickness:2,fillStyle:new Je({stops:[{color:Ae(50,50,50,150),offset:0},{color:Ae(255,255,255,150),offset:1}],position:{x:.4,y:.8},shape:t.GradientShape.circle,extent:t.GradientExtent.farthestCorner})}),ti=new Ee({color:B}),ii=new nr({thickness:2,fillStyle:new Qe({angle:45,stops:[{color:Ae(100,100,100,150),offset:0},{color:Ae(255,255,255,150),offset:1}]})}),ni=new Ee({color:B}),ei={x:new nr({thickness:1,fillStyle:new Ee({color:Ae(200,200,200)})}),y:new nr({thickness:1,fillStyle:new Ee({color:Ae(200,200,200)})}),z:new nr({thickness:1,fillStyle:new Ee({color:Ae(200,200,200)})})},ri=ir;var si=new nr({thickness:1,fillStyle:new Ee({color:O})}),oi=new nr({thickness:1,fillStyle:new Ee({color:D})}),hi=new Ee({color:I}),ui=new sh({size:14,family:q,style:"normal",weight:"normal"}),ai=new Je({stops:[{color:r,offset:.5},{color:Ae(0,0,0,255),offset:1}],position:{x:.5,y:.5}}),fi=new nr({thickness:1.5,fillStyle:new Je({stops:[{color:Ae(200,200,200,150),offset:0},{color:Ae(50,50,50,150),offset:.5},{color:Ae(255,255,255,150),offset:1}],position:{x:.2,y:.2},shape:t.GradientShape.circle,extent:t.GradientExtent.farthestCorner})}),ci=new Je({stops:[{color:Qh(T,Ae(255,255,255,255),.5*M),offset:0},{color:T,offset:.5},{color:Qh(T,Ae(0,0,0,255),.5*M),offset:1}],position:{x:.5,y:.5}}),li=new Qe({angle:0,stops:a}),di=new nr({thickness:1,fillStyle:new Ee({color:m})}),vi=new Ee({color:_}),yi=new sh({size:13,family:q,style:"italic",weight:"normal"}),Si=li,mi=di,bi=vi;var gi=new Qe({angle:-45,stops:z}),wi=new nr({thickness:1,fillStyle:new Ee({color:O})}),pi=new Ee({color:Ae(0,0,0,0)}),ki=new nr({thickness:1,fillStyle:new Ee({color:E})}),xi=li,Mi=di,Ai=new nr({thickness:1,fillStyle:xt(0)}),Fi=Ai.getFillStyle(),Ti=Ai,Ci=ir,Bi=new nr({thickness:1,fillStyle:new Ee({color:Ae(0,0,0)})}),Li=mh,Ii=new yh({gridStrokeStyle:st,tickStyle:ut,tickLength:50,tickPadding:-14,labelFont:ct,labelPadding:0,labelFillStyle:lt}),Oi=new yh({gridStrokeStyle:ot,tickStyle:at,tickLength:7,tickPadding:0,labelFont:dt,labelPadding:0,labelFillStyle:vt}),Pi=new yh({gridStrokeStyle:ht,tickStyle:ft,tickLength:4,tickPadding:5,labelFont:yt,labelPadding:0,labelFillStyle:St}),Di=new Eh({extremeTickStyle:Li,majorTickStyle:Oi,minorTickStyle:Pi}),_i=new Oh({greatTickStyle:Ii,majorTickStyle:Oi,minorTickStyle:Pi}),Ri=new Kh({majorTickStyle:Oi,minorTickStyle:Pi});return{onScreenMenuButtonBackgroundColor:nu,onScreenMenuButtonIconSet:Jh,segmentSeriesStyle:Ai,boxFigureStyle:Fi,boxFigureLineStyle:Ti,boxFigureStrokeStyle:Ci,boxFigureMedianLineStyle:Bi,uiButtonFillStyle:bi,uiButtonSize:10,candleStickStyle:Ft,candleStickPositiveStyle:Tt,candleStickNegativeStyle:Ct,candleStickPositiveStrokeStyle:ir,candleStickNegativeStrokeStyle:ir,OHLCBarPositiveStyle:Bt,OHLCBarNegativeStyle:Lt,lcjsBackgroundFillStyle:j,lcjsBackgroundStrokeStyle:W,dashboardSplitterStyle:U,panelBackgroundFillStyle:Y,panelBackgroundStrokeStyle:X,chartTitleFont:J,chartTitleFillStyle:Q,seriesBackgroundFillStyle:Z,seriesBackgroundStrokeStyle:K,chartXYZoomingRectangleFillStyle:$,chartXYZoomingRectangleStrokeStyle:tt,chartXYFittingRectangleFillStyle:it,chartXYFittingRectangleStrokeStyle:nt,axisTitleFillStyle:et,axisTitleFont:rt,axisStyle:mt,axisOverlayStyle:gt,axisNibOverlayStyle:gt,axisNibStyle:bt,numericTickStrategy:Di,dateTimeTickStrategy:_i,timeTickStrategy:Ri,pointMarkerFillStyle:It,pointMarkerStrokeStyle:Ot,resultTableFillStyle:Pt,resultTableStrokeStyle:Dt,resultTableTextFillStyle:_t,resultTableTextFont:Rt,customTickGridStrokeStyle:zt,customTickPointerLength:7,uiPointableTextBoxFillStyle:Et,uiPointableTextBoxFont:Gt,uiPointableTextBoxStrokeStyle:Nt,uiPointableTextBoxTextFillStyle:Vt,uiTickFont:Ht,uiTickStrokeStyle:jt,uiTickTextFillStyle:Wt,uiBackgroundFillStyle:Si,uiBackgroundStrokeStyle:mi,uiTextFillStyle:vi,uiFont:yi,seriesFillStyle:xt,seriesStrokeStyle:function(t){return new nr({thickness:2,fillStyle:new Ee({color:G(t)})})},seriesPointFillStyle:function(t){return new Ee({color:Qh(G(t),S,.3)})},seriesStrokeStyle3D:function(t){return new nr({thickness:5,fillStyle:new Ee({color:G(t)})})},seriesTriangulatedPointStyle3D:function(t){return new ch.Triangulated({shape:"sphere",size:10,fillStyle:new Ee({color:G(t)})})},seriesNonTriangulatedPointStyle3D:function(t){return new ch.Pixelated({size:5,fillStyle:new Ee({color:G(t)})})},heatmapGridSeriesWireframeStyle:Mt,surfaceSeriesFillStyle:function(t){return function(t){return new Ee({color:G(t)})}(t)},surfaceSeriesWireframeStyle:At,boxSeriesFillStyle:function(t){return function(t){return new Ee({color:G(t)})}(t)},mountainsStrokeStyle:function(t){return new nr({thickness:2,fillStyle:new Ee({color:G(t)})})},mountainsFillStyle:function(t){return new Qe({angle:180,stops:[{color:Qh(G(t),Ae(255,255,255,0),.1*M).setA(100),offset:0},{color:Qh(G(t),Ae(0,0,0,0),.5*M).setA(100),offset:1}]})},mountainsInvertedStrokeStyle:function(t){return new nr({thickness:2,fillStyle:new Ee({color:H(t)})})},mountainsInvertedFillStyle:function(t){return new Qe({angle:0,stops:[{color:Qh(H(t),Ae(255,255,255,0),.1*M).setA(100),offset:0},{color:Qh(H(t),Ae(0,0,0,0),.5*M).setA(100),offset:1}]})},bandFillStyle:wt,bandStrokeStyle:pt,constantLineStrokeStyle:kt,spiderSeriesFillStyle:function(t){return new Ee({color:G(t).setA(100)})},spiderSeriesStrokeStyle:function(t){return new nr({thickness:2,fillStyle:new Ee({color:G(t)}),highlightThicknessMultiplier:2})},spiderWebStyle:Ut,spiderAxisStyle:Yt,spiderAxisNibStyle:Xt,spiderScaleLabelFillStyle:Zt,spiderScaleLabelFont:Kt,spiderAxisLabelFillStyle:qt,spiderAxisLabelFont:Jt,polarRadialAxisTickStyle:Qt,polarRadialAxisStyle:$t,polarRadialAxisTitleStyle:ti,polarAmplitudeAxisStyle:ii,polarAmplitudeAxisTitleStyle:ni,axesStyles3D:ei,boundingBoxStyle3D:ri,sliceChartRadialFillStylePalette:function(t){var i=G(t);return new Je({stops:[{color:Qh(i,Ae(255,255,255),.2*M),offset:0},{color:i,offset:.5},{color:Qh(i,Ae(0,0,0),.2*M),offset:1}]})},sliceChartStackedFillStylePalette:function(t){var i=G(t);return new Qe({angle:90,stops:[{color:Qh(i,Ae(255,255,255),.5*M),offset:0},{color:i,offset:.5},{color:Qh(i,Ae(0,0,0),.5*M),offset:1}]})},sliceChartStrokeStyle:si,sliceLabelConnectorStyle:oi,sliceLabelFillStyle:hi,sliceLabelFont:ui,gaugeBackgroundFillStyle:ai,gaugeBackgroundStrokeStyle:fi,gaugeSliceFillStyle:ci,mapChartFillStyle:gi,mapChartStrokeStyle:wi,mapChartOutlierRegionFillStyle:pi,mapChartOutlierRegionStrokeStyle:ki,mapChartSeparateRegionFillStyle:xi,mapChartSeparateRegionStrokeStyle:Mi,rectangleSeriesFillStyle:function(t){var i=G(t);return new Qe({angle:90,stops:[{color:Qh(i,Ae(255,255,255),.5*M),offset:0},{color:i,offset:.5},{color:Qh(i,Ae(0,0,0),.8*M),offset:1}]})}}},ru=function(t,i,n){return t*(1-n)+i*n},su=function(t,i,n,e,r){if(void 0!==i.value&&void 0!==n.value&&void 0!==e.value&&void 0!==r.value){var s=(t.x-n.point.x)/(r.point.x-n.point.x),o=(r.point.y-n.point.y)*s+n.point.y,h=(t.x-i.point.x)/(e.point.x-i.point.x),u=(e.point.y-i.point.y)*h+i.point.y,a=(t.y-u)/(o-u),f=ru(n.value,r.value,s),c=ru(i.value,e.value,h);return ru(c,f,a)}},ou={warm:function(t){return function(i){return Te(60/(t-1)*i,.8,.8)}},cold:function(t){return function(i){return Te(60/(t-1)*i+180,.8,.8)}},fullSpectrum:function(t){return function(i){return Te(360/t*i,.8,.8)}},reverseSpectrum:function(t){return function(i){return Te(360/t*(t-i),.8,.8)}},flatUI:function(t){return function(i){return Te(360/t*i+8,.8,.8-.15/t*i)}},arction:function(t){return function(i){var n=1-.2/t*i;return Te(360/t*i+51,n,n)}},arctionWarm:function(t){return function(i){var n=t-1,e=1-.2/n*i;return Te(46-46/n*i+4,e,e)}},sunset:function(t){return function(i){var n=[170,320];return Te(i%2?n[0]:n[1],.8,.5+.5/(t-1)*i)}},dynamic:function(t){return function(i){var n=i%2,e=[234,346];return Te(n?e[0]:e[1],n?.3:.9,.5+.5/(t-1)*i)}},magenta:function(t){return function(i){var n=[.9,.6];return Te(354,i%2?n[0]:n[1],.5+.5/(t-1)*i)}},greyscale:function(t){return function(i){return Te(0,0,.25+.5/(t-1)*i)}},frozen:function(t){return function(i){var n=[.8,.6];return Te(160+80/(t-1)*i,.6,i%2?n[0]:n[1])}},retro:function(t){return function(i){var n=[6,183];return Te(i%2?n[0]:n[1],.7,.5+.5/(t-1)*i)}},crayons:function(t){return function(i){var n=180+230/(t-1)*i;return n>360&&(n-=360),Te(n,.9,.8)}},custom:function(t,i){return function(n){var e=.25+.5/(t-1)*n;if(!i)return Te(0,0,e);var r=i.getR()/255,s=i.getG()/255,o=i.getB()/255,h=Math.max(r,s,o),u=Math.min(r,s,o),a=0;if(h!==u){var f=h-u;switch(h){case r:a=(s-o)/f+(s<o?6:0);break;case s:a=(o-r)/f+2;break;case o:a=(r-s)/f+4;break;default:a=0}return Te(a=a/6*360,.8,e)}return Te(0,0,e)}},sector:function(t,i,n,e){return void 0===n&&(n=.8),void 0===e&&(e=.8),function(r){return function(s){return Te(t+(i-t)/r*s,n,e)}}},auroraBorealis:function(t){return function(i){return hu([{value:0,hex:"#23FF7A"},{value:1/9,hex:"#03E65D"},{value:2/9,hex:"#04D155"},{value:3/9,hex:"#00B849"},{value:4/9,hex:"#00A869"},{value:5/9,hex:"#008F68"},{value:6/9,hex:"#00815E"},{value:7/9,hex:"#017153"},{value:8/9,hex:"#704A85"},{value:1,hex:"#743A70"}],t,i)}},blueSciFi:function(t){return function(i){return hu([{value:0,hex:"#FFFFFF"},{value:1/9,hex:"#E2E7FF"},{value:2/9,hex:"#ACB9F8"},{value:3/9,hex:"#889DFF"},{value:4/9,hex:"#547EEF"},{value:5/9,hex:"#4068D8"},{value:6/9,hex:"#2B50B7"},{value:7/9,hex:"#1B3E9F"},{value:8/9,hex:"#8D1395"},{value:1,hex:"#780A74"}],t,i)}},light:function(t){return function(i){return hu([{value:0,hex:"#FECC00"},{value:1/9,hex:"#F7B300"},{value:2/9,hex:"#EF9900"},{value:3/9,hex:"#E88000"},{value:4/9,hex:"#E06600"},{value:5/9,hex:"#DD5A00"},{value:6/9,hex:"#D94D00"},{value:7/9,hex:"#D13300"},{value:8/9,hex:"#C91A00"},{value:1,hex:"#C10000"}],t,i)}},monochrome:function(t){return function(i){return hu([{value:0,hex:"#FFFFFF"},{value:1/9,hex:"#EEEEEE"},{value:2/9,hex:"#DCDCDC"},{value:3/9,hex:"#C1C1C1"},{value:4/9,hex:"#A4A2A2"},{value:5/9,hex:"#8B8B8B"},{value:6/9,hex:"#787878"},{value:7/9,hex:"#656565"},{value:8/9,hex:"#565555"},{value:1,hex:"#434343"}],t,i)}},night:function(t){return function(i){return hu([{value:0,hex:"#F0F9E0"},{value:1/9,hex:"#C9DFA4"},{value:2/9,hex:"#B5C796"},{value:3/9,hex:"#8998B7"},{value:4/9,hex:"#6E7E9E"},{value:5/9,hex:"#5C6D8F"},{value:6/9,hex:"#47587A"},{value:7/9,hex:"#374B72"},{value:8/9,hex:"#273C65"},{value:1,hex:"#192847"}],t,i)}},sunset2:function(t){return function(i){return hu([{value:0,hex:"#22334D"},{value:1/9,hex:"#82062C"},{value:2/9,hex:"#AB001D"},{value:3/9,hex:"#D80428"},{value:4/9,hex:"#CF5D1B"},{value:5/9,hex:"#CF8229"},{value:6/9,hex:"#CF9D29"},{value:7/9,hex:"#C4BE25"},{value:8/9,hex:"#E1DC49"},{value:1,hex:"#FFFA67"}],t,i)}}},hu=function(t,i,n){var e=au(i,n),r=h(fu(e,t),2),s=r[0],o=r[1],u=uu(t[s]),a=uu(t[o]),f=0!==u.value?(a.value-e)/u.value:0,c={value:f,h:ru(u.h,a.h,f),s:ru(u.s,a.s,f),v:ru(u.v,a.v,f)};return Te(c.h,c.s,c.v)},uu=function(t){var i=function(t){var i=t.r,n=t.g,e=t.b,r=Math.max(i,n,e),s=Math.min(i,n,e),o=0,h=r,u=r-s,a=0===r?0:u/r;if(r===s)o=0;else{switch(r){case i:o=(n-e)/u+(n<e?6:0);break;case n:o=(e-i)/u+2;break;case e:o=(i-n)/u+4}o/=6}return[360*o,a,h]}(Fe(t.hex));return{value:t.value,h:i[0],s:i[1],v:i[2]}},au=function(t,i){var n=i/t;return n<0?0:n>1?1:n},fu=function(t,i){if(i.length<2)throw new Error("Invalid palette size");for(var n=0;n<i.length;n+=1)if(t<i[n].value)return[n-1,n];return[i.length-2,i.length-1]},cu=new sh({size:16}),lu=new sh({size:16}),du=new sh({size:16}),vu=ou.arctionWarm(2),yu=[0,1].map(vu),Su=new Ee({color:Ae(32,32,32)}),mu=new Ee({color:Ae(64,64,64)}),bu=new Ee({color:Ae(24,24,24)}),gu=new Ee({color:Ae(255,215,0)}),wu=new Ee({color:Ae(241,246,242)}),pu=new Ee({color:Fe("#ffffff")}),ku=new Ee({color:Ae(54,54,54,.7)}),xu=new Ee({color:Ae(255,255,255,50)}),Mu=new Ee({color:Ae(150,150,150)}),Au=new Ee({color:Ae(200,200,200)}),Fu=new Ee({color:Ae(225,225,225)}),Tu=new Ee({color:Ae(50,50,50)}),Cu=new Ee({color:Ae(242,67,79)}),Bu=new Ee({color:yu[0]}),Lu=new Ee({color:yu[1]}),Iu=new Ee({color:Ae(0,0,0)}),Ou=new Ee({color:Ae(46,204,113)}),Pu=new Ee({color:Fe("#C72929")}),Du=new Ee({color:Fe("#2B2B2B")}),_u=new nr({fillStyle:mu,thickness:1}),Ru=new nr({fillStyle:gu,thickness:1}),zu=gu,Eu=_u,Nu=mu,Vu=ir,Gu=Su,Hu=Ru,ju=new nr({fillStyle:Iu,thickness:3}),Wu=new nr({fillStyle:Iu,thickness:3}),Uu=new nr({fillStyle:Iu,thickness:5}),Yu=new nr({fillStyle:mu,thickness:6,highlightThicknessMultiplier:1}),Xu=Yu.setThickness(5),Zu=new nr({fillStyle:pu,thickness:2}),Ku=new nr({fillStyle:pu,thickness:2}),qu=new nr({fillStyle:Mu,thickness:1}),Ju=new sh({size:15}),Qu=new sh({size:11}),$u=new nr({fillStyle:Tu,thickness:1}),ta=new nr({fillStyle:Au,thickness:3}),ia=new nr({fillStyle:Au,thickness:3}),na=new yh({gridStrokeLength:1,gridStrokeStyle:ir,tickStyle:new nr({thickness:2,fillStyle:new Ee({color:Ae(255,255,255,70)})}),tickLength:50,tickPadding:-14,labelFillStyle:wu}),ea=new yh({gridStrokeLength:1,gridStrokeStyle:$u,tickLength:7,tickStyle:new nr({thickness:1,fillStyle:Au}),tickPadding:0,labelFont:Ju,labelPadding:0,labelFillStyle:wu}),ra=new yh({gridStrokeLength:1,gridStrokeStyle:$u.setFillStyle(Tu.setA(50)),tickLength:4,tickStyle:new nr({fillStyle:Au,thickness:1}),tickPadding:5,labelFont:Qu,labelFillStyle:wu,labelPadding:0}),sa=new Eh({extremeTickStyle:mh,majorTickStyle:ea,minorTickStyle:ra}),oa=new Oh({greatTickStyle:na,majorTickStyle:ea,minorTickStyle:ra}),ha=new Kh({majorTickStyle:ea,minorTickStyle:ra}),ua=ir,aa=xu,fa=new nr({fillStyle:xu,thickness:5}),ca=new nr({fillStyle:Tu,thickness:2}),la=new nr({fillStyle:gu,thickness:2}),da=xu,va=gu,ya=pu,Sa=new Ee({color:Ae(223,147,6)}),ma=new Ee({color:Ae(171,86,45)}),ba=new Ee({color:Ae(80,40,22)}),ga=new nr({fillStyle:ma,thickness:2}),wa=new nr({fillStyle:ba,thickness:2}),pa=pu,ka=Sa,xa=new nr({fillStyle:gu,thickness:1}),Ma=new nr({fillStyle:pu,thickness:1}),Aa=new nr({fillStyle:Mu,thickness:1}),Fa=new nr({fillStyle:gu,thickness:1}),Ta=new nr({fillStyle:pu}),Ca=Lu,Ba=Bu,La=new nr({fillStyle:Ba}),Ia=new nr({fillStyle:Ca}),Oa=new nr({fillStyle:gu}),Pa=new nr({fillStyle:Ou}),Da=new nr({fillStyle:Cu}),_a=pu,Ra=new nr,za=or(ou.arctionWarm,10),Ea=Du,Na=new nr({thickness:1}),Va={x:Na.setFillStyle(Au),y:Na.setFillStyle(Au),z:Na.setFillStyle(Au)},Ga=new nr({thickness:1,fillStyle:new Ee({color:Fe("#FFF")})}),Ha=new ch.Triangulated({fillStyle:gu}),ja=new ch.Pixelated({fillStyle:gu}),Wa=new nr({fillStyle:gu,thickness:5}),Ua=new nr({fillStyle:gu,thickness:5}),Ya=new ch.Triangulated({fillStyle:gu,shape:"sphere",size:10}),Xa=new nr({fillStyle:gu,thickness:5}),Za=new ch.Triangulated({fillStyle:wu,shape:"sphere",size:10}),Ka=Re,qa=xu,Ja=new nr({thickness:1,fillStyle:xu}),Qa={lcjsBackgroundFillStyle:void 0,lcjsBackgroundStrokeStyle:void 0,dashboardSplitterStyle:Yu,dashboardBackgroundStrokeStyle:Xu,dashboardBackgroundFillStyle:bu,panelBackgroundFillStyle:Su,chartTitleFillStyle:pu,seriesBackgroundFillStyle:bu,panelBackgroundStrokeStyle:ir,chartTitleFont:cu,seriesBackgroundStrokeStyle:ir,sliceChartStrokeStyle:ir,sliceLabelFont:du,chartXYZoomingRectangleFillStyle:Re,chartXYFittingRectangleFillStyle:Re,axisTitleFillStyle:Mu,axisTitleFont:lu,bandStrokeStyle:ua,segmentSeriesStyle:Oa,OHLCBarPositiveStyle:Pa,OHLCBarNegativeStyle:Da,candleStickPositiveStyle:Ou,candleStickPositiveStrokeStyle:ir,candleStickNegativeStyle:Cu,candleStickNegativeStrokeStyle:ir,boxFigureStrokeStyle:ju,boxFigureLineStyle:Wu,boxFigureMedianLineStyle:Uu,pointMarkerFillStyle:pu,uiFont:cu,spiderSeriesFillStyle:da,spiderWebStyle:ca,spiderAxisStyle:ca,spiderAxisNibStyle:ta,spiderSeriesStrokeStyle:la,spiderScaleLabelFillStyle:va,spiderScaleLabelFont:Ju,spiderAxisLabelFillStyle:ya,spiderAxisLabelFont:Ju,sliceChartRadialFillStylePalette:za,sliceChartStackedFillStylePalette:za,sliceLabelFillStyle:_a,sliceLabelConnectorStyle:Ra,gaugeSliceFillStyle:Pu,gaugeBackgroundFillStyle:Ea,gaugeBackgroundStrokeStyle:ir,chartXYZoomingRectangleStrokeStyle:Ku,chartXYFittingRectangleStrokeStyle:Zu,mapChartFillStyle:zu,mapChartStrokeStyle:Eu,mapChartOutlierRegionFillStyle:Nu,mapChartOutlierRegionStrokeStyle:Vu,mapChartSeparateRegionFillStyle:Gu,mapChartSeparateRegionStrokeStyle:Hu,axisLabelFillStyle:wu,axisLabelFont:Ju,axisStyle:qu,axisOverlayStyle:xu,numericTickStrategy:sa,dateTimeTickStrategy:oa,timeTickStrategy:ha,axisNibStyle:ir,axisNibOverlayStyle:xu,customTickGridStrokeStyle:ia,customTickMarkerFont:ea.getLabelFont(),customTickPointerLength:ea.getTickLength(),bandFillStyle:aa,constantLineStrokeStyle:fa,seriesFillStyle:gu,seriesStrokeStyle:Fa,seriesPointFillStyle:Fu,seriesStrokeStyle3D:Wa,seriesTriangulatedPointStyle3D:Ha,seriesNonTriangulatedPointStyle3D:ja,mountainsStrokeStyle:La,mountainsFillStyle:Ba.setA(175),mountainsInvertedStrokeStyle:Ia,mountainsInvertedFillStyle:Ca.setA(175),candleStickStyle:Ta,boxFigureStyle:pu,pointMarkerStrokeStyle:ir,pointMarkerHorizontalGridStrokeStyle:Aa,pointMarkerVerticalGridStrokeStyle:Aa,customTickMarkerFillStyle:Su,customTickMarkerTextFillStyle:wu,customTickMarkerStrokeStyle:Ma,pointMarkerTextFillStyle:wu,resultTableFillStyle:Su.setA(200),resultTableStrokeStyle:Ma,resultTableTextFillStyle:pu,uiBackgroundFillStyle:Su,uiBackgroundStrokeStyle:xa,uiTextFillStyle:wu,uiButtonFillStyle:wu,uiButtonSize:12,axesStyles3D:Va,boundingBoxStyle3D:Ga,surfaceSeriesFillStyle:gu,boxSeriesFillStyle:gu,onScreenMenuButtonBackgroundColor:ku.getColor(),onScreenMenuButtonIconSet:Jh,polarRadialAxisTickStyle:ea,polarRadialAxisStyle:ga,polarRadialAxisTitleStyle:pa,polarAmplitudeAxisStyle:wa,polarAmplitudeAxisTitleStyle:ka,heatmapFillStyle:Ka,heatmapWireframeStyle:undefined,heatmapGridSeriesFillStyle:qa,heatmapGridSeriesWireframeStyle:Ja,rectangleSeriesStrokeStyle:ir,polygonSeriesStrokeStyle:ir,lineSeries3DStrokeStyle:Ua,pointLineSeries3DStrokeStyle:Xa,pointLineSeries3DPointStyle:Za,pointSeries3DPointStyle:Ya,pointCloudSeries3DPointStyle:undefined},$a=new sh({size:16}),tf=new sh({size:16}),nf=new sh({size:16}),ef=new Ee({color:Ae(32,32,32)}),rf=new Ee({color:Ae(64,64,64)}),sf=new Ee({color:Fe("#ffffff")}),of=new Ee({color:Fe("#fcfcfc")}),hf=new Ee({color:Ae(0,0,0,50)}),uf=new Ee({color:Ae(150,150,150)}),af=new Ee({color:Ae(175,175,175)}),ff=new Ee({color:Ae(200,200,200)}),cf=new Ee({color:Ae(225,225,225)}),lf=new Ee({color:Ae(50,50,50)}),df=new nr({fillStyle:ef,thickness:1}),vf=new Ee({color:Ae(0,0,0)}),yf=new Ee({color:Ae(46,204,113)}),Sf=new Ee({color:Ae(242,67,79)}),mf=new Ee({color:Fe("#C72929")}),bf=new Ee({color:Fe("#E06600")}),gf=new nr({fillStyle:sf,thickness:1}),wf=new nr({fillStyle:of,thickness:1}),pf=new nr({fillStyle:vf,thickness:3}),kf=uf,xf=wf,Mf=cf,Af=ir,Ff=sf,Tf=pf,Cf=new nr({fillStyle:vf,thickness:3}),Bf=new nr({fillStyle:vf,thickness:3}),Lf=new nr({fillStyle:vf,thickness:5}),If=new nr({fillStyle:rf,thickness:6,highlightThicknessMultiplier:1}),Of=new nr({fillStyle:uf,thickness:2}),Pf=new nr({fillStyle:uf,thickness:2}),Df=new nr({fillStyle:uf,thickness:1}),_f=new sh({size:15}),Rf=new sh({size:11}),zf=new nr({fillStyle:ff,thickness:1}),Ef=new nr({fillStyle:rf,thickness:3}),Nf=new yh({gridStrokeLength:1,gridStrokeStyle:ir,tickStyle:new nr({thickness:2,fillStyle:new Ee({color:Ae(0,0,0,70)})}),tickLength:50,tickPadding:-14,labelFillStyle:ef}),Vf=new yh({gridStrokeLength:1,gridStrokeStyle:zf,tickLength:7,tickStyle:new nr({thickness:1,fillStyle:lf}),tickPadding:0,labelFont:_f,labelPadding:0,labelFillStyle:ef}),Gf=new yh({gridStrokeLength:1,gridStrokeStyle:zf.setFillStyle(ff.setA(50)),tickLength:4,tickStyle:new nr({fillStyle:lf,thickness:1}),tickPadding:5,labelFont:Rf,labelFillStyle:ef,labelPadding:0}),Hf=new Eh({extremeTickStyle:mh,majorTickStyle:Vf,minorTickStyle:Gf}),jf=new Oh({greatTickStyle:Nf,majorTickStyle:Vf,minorTickStyle:Gf}),Wf=new Kh({majorTickStyle:Vf,minorTickStyle:Gf}),Uf=ir,Yf=hf,Xf=new nr({fillStyle:hf,thickness:5}),Zf=new nr({fillStyle:ff,thickness:2}),Kf=new nr({fillStyle:bf,thickness:2}),qf=bf.setA(80),Jf=new nr({fillStyle:af,thickness:2}),Qf=new nr({fillStyle:ff,thickness:2}),$f=ef,tc=ef,ic=new nr({fillStyle:uf,thickness:1}),nc=df,ec=df,rc=new nr({fillStyle:uf,thickness:1}),sc=new nr({fillStyle:bf,thickness:1}),oc=new nr({fillStyle:new Ee({color:Fe("#575757")})}),hc=bf,uc=mf,ac=new nr({fillStyle:uc}),fc=new nr({fillStyle:hc}),cc=new nr({fillStyle:bf}),lc=new nr({fillStyle:yf}),dc=new nr({fillStyle:Sf}),vc=new nr,yc=new Ee({color:Fe("#F4F4F4")}),Sc=new nr({thickness:1}),mc={x:Sc.setFillStyle(ef),y:Sc.setFillStyle(ef),z:Sc.setFillStyle(ef)},bc=new nr({thickness:1,fillStyle:new Ee({color:Fe("#000")})}),gc=new ch.Triangulated({fillStyle:bf}),wc=new ch.Pixelated({fillStyle:bf}),pc=new nr({fillStyle:bf,thickness:5}),kc=or(ou.light,10),xc=hf,Mc=new nr({fillStyle:ef}),Ac={lcjsBackgroundFillStyle:Re,lcjsBackgroundStrokeStyle:ir,dashboardBackgroundFillStyle:sf,dashboardBackgroundStrokeStyle:ir,dashboardSplitterStyle:If.setFillStyle(cf),panelBackgroundFillStyle:sf,chartTitleFillStyle:rf,seriesBackgroundFillStyle:of,panelBackgroundStrokeStyle:ir,chartTitleFont:$a,seriesBackgroundStrokeStyle:new nr({fillStyle:uf,thickness:1}),sliceChartStrokeStyle:gf,sliceLabelFont:nf,chartXYZoomingRectangleFillStyle:Re,chartXYFittingRectangleFillStyle:Re,axisTitleFont:tf,bandStrokeStyle:Uf,segmentSeriesStyle:cc,OHLCBarPositiveStyle:lc,OHLCBarNegativeStyle:dc,candleStickPositiveStyle:yf,candleStickPositiveStrokeStyle:ir,candleStickNegativeStyle:Sf,candleStickNegativeStrokeStyle:ir,boxFigureStrokeStyle:Cf,boxFigureLineStyle:Bf,boxFigureMedianLineStyle:Lf,pointMarkerFillStyle:sf,uiFont:$a,spiderSeriesFillStyle:qf,spiderWebStyle:Zf,spiderAxisStyle:Zf,spiderAxisNibStyle:new nr({fillStyle:bf,thickness:2}),spiderSeriesStrokeStyle:Kf,spiderScaleLabelFillStyle:rf,spiderScaleLabelFont:_f,spiderAxisLabelFillStyle:rf,spiderAxisLabelFont:_f,sliceChartRadialFillStylePalette:kc,sliceChartStackedFillStylePalette:kc,sliceLabelFillStyle:rf,sliceLabelConnectorStyle:vc.setFillStyle(rf),gaugeSliceFillStyle:mf,gaugeBackgroundFillStyle:yc,gaugeBackgroundStrokeStyle:ir,chartXYZoomingRectangleStrokeStyle:Pf,chartXYFittingRectangleStrokeStyle:Of,mapChartFillStyle:kf,mapChartStrokeStyle:xf,mapChartOutlierRegionFillStyle:Mf,mapChartOutlierRegionStrokeStyle:Af,mapChartSeparateRegionFillStyle:Ff,mapChartSeparateRegionStrokeStyle:Tf,axisTitleFillStyle:uf,axisLabelFillStyle:rf,axisLabelFont:_f,axisStyle:Df.setFillStyle(ff),axisOverlayStyle:uf.setA(80),numericTickStrategy:Hf,dateTimeTickStrategy:jf,timeTickStrategy:Wf,axisNibStyle:ir,axisNibOverlayStyle:ff.setA(80),customTickGridStrokeStyle:Ef,customTickMarkerFont:Vf.getLabelFont(),customTickPointerLength:Vf.getTickLength(),bandFillStyle:Yf,constantLineStrokeStyle:Xf,seriesFillStyle:bf,seriesStrokeStyle:sc,seriesPointFillStyle:bf,seriesStrokeStyle3D:pc,seriesTriangulatedPointStyle3D:gc,seriesNonTriangulatedPointStyle3D:wc,mountainsStrokeStyle:ac,mountainsFillStyle:uc.setA(175),mountainsInvertedStrokeStyle:fc,mountainsInvertedFillStyle:hc.setA(175),candleStickStyle:oc,boxFigureStyle:bf,pointMarkerStrokeStyle:ec,pointMarkerHorizontalGridStrokeStyle:rc,pointMarkerVerticalGridStrokeStyle:rc,customTickMarkerFillStyle:sf,customTickMarkerTextFillStyle:ef,customTickMarkerStrokeStyle:df,pointMarkerTextFillStyle:rf,resultTableFillStyle:sf.setA(200),resultTableStrokeStyle:nc,resultTableTextFillStyle:rf,uiBackgroundFillStyle:cf,uiBackgroundStrokeStyle:ic,uiTextFillStyle:rf,uiButtonFillStyle:rf,uiButtonSize:12,axesStyles3D:mc,boundingBoxStyle3D:bc,boxSeriesFillStyle:bf,surfaceSeriesFillStyle:bf,onScreenMenuButtonBackgroundColor:rf.getColor(),onScreenMenuButtonIconSet:qh,polarRadialAxisTickStyle:Vf,polarRadialAxisStyle:Jf,polarRadialAxisTitleStyle:$f,polarAmplitudeAxisStyle:Qf,polarAmplitudeAxisTitleStyle:tc,heatmapFillStyle:undefined,heatmapWireframeStyle:undefined,heatmapGridSeriesFillStyle:xc,heatmapGridSeriesWireframeStyle:Mc,rectangleSeriesStrokeStyle:ir,polygonSeriesStrokeStyle:ir},Fc=new sh({size:16}),Tc=new sh({size:16}),Cc=new sh({size:16}),Bc=new sh({size:15}),Lc=new sh({size:11}),Ic=new Ee({color:Fe("#23FF7A")}),Oc=new Ee({color:Fe("#23FF7A1A")}),Pc=new Ee({color:Fe("#4BCF6C")}),Dc=new Ee({color:Ae(242,67,79)}),_c=new Ee({color:Fe("#032E3E")}),Rc=new Ee({color:Fe("#001E29")}),zc=new Ee({color:Fe("#323232")}),Ec=new Ee({color:Fe("#A1A1A1")}),Nc=new Ee({color:Fe("#ffffff")}),Vc=new Ee({color:Fe("#017153")}),Gc=new Ee({color:Fe("#001219")}),Hc=new Ee({color:Fe("#212121")}),jc=new Ee({color:Fe("#008F68")}),Wc=new Ee({color:Fe("#9E9E9E")}),Uc=new Ee({color:Fe("#001E29CC")}),Yc=new nr({fillStyle:new Ee(Ic)}),Xc=new nr({fillStyle:jc}),Zc=new nr({fillStyle:Wc,thickness:1}),Kc=new nr({fillStyle:Hc.setA(150),thickness:1}),qc=new nr({fillStyle:Hc.setA(75),thickness:1}),Jc=new nr({fillStyle:jc,thickness:3}),Qc=new nr({fillStyle:Nc,thickness:1}),$c=Qc.setFillStyle((function(t){return t.setA(50)})),tl=new nr({fillStyle:Vc}),il=new nr({fillStyle:zc}),nl=new nr({fillStyle:Nc}),el=new nr({fillStyle:_c,thickness:6,highlightThicknessMultiplier:1}),rl=Ic,sl=il,ol=zc,hl=ir,ul=Rc,al=Yc,fl=Ic,cl=_c,ll=Rc,dl=Gc,vl=Ec,yl=Re,Sl=Re,ml=Vc,bl=Gc,gl=Oc,wl=Oc,pl=Nc,kl=Pc,xl=Dc,Ml=Nc,Al=Nc,Fl=Ic,Tl=Nc,Cl=Nc,Bl=Oc,Ll=Oc,Il=fl,Ol=Pc.setA(175),Pl=Vc.setA(175),Dl=Pc,_l=Rc,Rl=Ic,zl=Ic,El=Uc,Nl=Ic,Vl=Rc,Gl=Ec,Hl=Pc,jl=Pc,Wl=Pc,Ul=Pc,Yl=Pc,Xl=el,Zl=Xl.setThickness(5),Kl=Zc,ql=nl,Jl=Yc,Ql=il,$l=Yc.setThickness(2),td=Yc,id=Yc,nd=Yc,ed=Xc,rd=Zc,sd=Jc,od=Jc,hd=ir,ud=Yc,ad=new nr({fillStyle:Pc}),fd=ad.getDefaultHighlightStyle(),cd=new nr({fillStyle:Dc}),ld=cd.getDefaultHighlightStyle(),dd=ir,vd=ir,yd=ir,Sd=ir,md=ir,bd=ir,gd=ir,wd=ir,pd=ir,kd=$c,xd=Yc,Md=tl,Ad=ir,Fd=Qc,Td=Qc,Cd=Qc,Bd=Qc,Ld=Qc,Id=Yc,Od=Yc,Pd=Yc,Dd=or(ou.auroraBorealis,10),_d=new nr({thickness:1}),Rd={x:_d.setFillStyle(Wc),y:_d.setFillStyle(Wc),z:_d.setFillStyle(Wc)},zd=new nr({thickness:2,fillStyle:new Ee({color:Fe("#FFF")})}),Ed=new ch.Triangulated({fillStyle:fl}),Nd=new ch.Pixelated({fillStyle:fl}),Vd=new nr({fillStyle:fl,thickness:5}),Gd=new yh({gridStrokeLength:1,gridStrokeStyle:ir,tickStyle:Kc,tickLength:50,tickPadding:-14,labelFillStyle:Nc}),Hd=new yh({gridStrokeLength:1,gridStrokeStyle:Kc,tickLength:7,tickStyle:Zc,tickPadding:0,labelFont:Bc,labelPadding:0,labelFillStyle:Nc}),jd=new yh({gridStrokeLength:1,gridStrokeStyle:qc,tickLength:4,tickStyle:Zc,tickPadding:5,labelFont:Lc,labelFillStyle:Nc,labelPadding:0}),Wd=new Eh({extremeTickStyle:mh,majorTickStyle:Hd,minorTickStyle:jd}),Ud=new Oh({greatTickStyle:Gd,majorTickStyle:Hd,minorTickStyle:jd}),Yd=new Kh({majorTickStyle:Hd,minorTickStyle:jd}),Xd=Re,Zd=Yc,Kd={lcjsBackgroundFillStyle:Re,lcjsBackgroundStrokeStyle:ir,dashboardBackgroundFillStyle:cl,dashboardBackgroundStrokeStyle:Zl,dashboardSplitterStyle:Xl,panelBackgroundFillStyle:ll,chartTitleFillStyle:pl,seriesBackgroundFillStyle:dl,panelBackgroundStrokeStyle:dd,chartTitleFont:Fc,seriesBackgroundStrokeStyle:vd,sliceChartStrokeStyle:yd,sliceLabelFont:Cc,chartXYZoomingRectangleFillStyle:yl,chartXYFittingRectangleFillStyle:Sl,axisTitleFillStyle:vl,axisTitleFont:Tc,bandStrokeStyle:hd,segmentSeriesStyle:ud,OHLCBarPositiveStyle:ad,OHLCBarPositiveHighlightStyle:fd,OHLCBarNegativeStyle:cd,OHLCBarNegativeHighlightStyle:ld,candleStickPositiveStyle:kl,candleStickPositiveStyleHighlight:kl.getDefaultHighlightStyle(),candleStickPositiveStrokeStyle:Sd,candleStickPositiveStrokeStyleHighlight:md,candleStickNegativeStyle:xl,candleStickNegativeStyleHighlight:xl.getDefaultHighlightStyle(),candleStickNegativeStrokeStyle:bd,candleStickNegativeStrokeStyleHighlight:gd,boxFigureStrokeStyle:id,boxFigureLineStyle:td,boxFigureMedianLineStyle:nd,pointMarkerFillStyle:Ml,uiFont:Fc,spiderSeriesFillStyle:gl,spiderWebStyle:Ql,spiderAxisStyle:Ql,spiderAxisNibStyle:$l,spiderSeriesStrokeStyle:Jl,spiderScaleLabelFillStyle:Fl,spiderScaleLabelFont:Bc,spiderAxisLabelFillStyle:Al,spiderAxisLabelFont:Bc,sliceChartRadialFillStylePalette:Dd,sliceChartStackedFillStylePalette:Dd,sliceLabelFillStyle:Tl,sliceLabelConnectorStyle:ed,gaugeSliceFillStyle:ml,gaugeBackgroundFillStyle:bl,gaugeBackgroundStrokeStyle:wd,chartXYZoomingRectangleStrokeStyle:od,chartXYFittingRectangleStrokeStyle:sd,mapChartFillStyle:rl,mapChartStrokeStyle:sl,mapChartOutlierRegionFillStyle:ol,mapChartOutlierRegionStrokeStyle:hl,mapChartSeparateRegionFillStyle:ul,mapChartSeparateRegionStrokeStyle:al,axisLabelFillStyle:Cl,axisLabelFont:Bc,axisStyle:rd,axisOverlayStyle:wl,numericTickStrategy:Wd,dateTimeTickStrategy:Ud,timeTickStrategy:Yd,axisNibStyle:pd,axisNibOverlayStyle:Bl,customTickGridStrokeStyle:Kl,customTickMarkerFont:Hd.getLabelFont(),customTickPointerLength:Hd.getTickLength(),bandFillStyle:Ll,constantLineStrokeStyle:kd,seriesFillStyle:fl,seriesStrokeStyle:Id,seriesPointFillStyle:Il,seriesStrokeStyle3D:Vd,seriesTriangulatedPointStyle3D:Ed,seriesNonTriangulatedPointStyle3D:Nd,mountainsStrokeStyle:xd,mountainsFillStyle:Ol,mountainsInvertedStrokeStyle:Md,mountainsInvertedFillStyle:Pl,candleStickStyle:ql,candleStickStyleHighlight:ql.getDefaultHighlightStyle(),boxFigureStyle:Dl,pointMarkerStrokeStyle:Ad,pointMarkerHorizontalGridStrokeStyle:Fd,pointMarkerVerticalGridStrokeStyle:Td,customTickMarkerFillStyle:_l,customTickMarkerTextFillStyle:Rl,customTickMarkerStrokeStyle:Cd,pointMarkerTextFillStyle:zl,resultTableFillStyle:El,resultTableStrokeStyle:Bd,resultTableTextFillStyle:Nl,uiBackgroundFillStyle:Vl,uiBackgroundStrokeStyle:Ld,uiTextFillStyle:Gl,uiButtonFillStyle:Hl,uiButtonSize:12,axesStyles3D:Rd,boundingBoxStyle3D:zd,surfaceSeriesFillStyle:jl,boxSeriesFillStyle:Wl,onScreenMenuButtonBackgroundColor:Hl.getColor(),onScreenMenuButtonIconSet:Jh,polarRadialAxisTickStyle:Hd,polarRadialAxisStyle:Od,polarRadialAxisTitleStyle:Ul,polarAmplitudeAxisStyle:Pd,polarAmplitudeAxisTitleStyle:Yl,heatmapFillStyle:undefined,heatmapWireframeStyle:undefined,heatmapGridSeriesFillStyle:Xd,heatmapGridSeriesWireframeStyle:Zd,rectangleSeriesStrokeStyle:ir,polygonSeriesStrokeStyle:ir},qd=new sh({size:16}),Jd=new sh({size:16}),Qd=new sh({size:16}),$d=new sh({size:15}),tv=new sh({size:11}),iv=new Ee({color:Fe("#00083A")}),nv=new Ee({color:Fe("#889DFF")}),ev=new Ee({color:Fe("#000420")}),rv=new Ee({color:Fe("#ACB9F8")}),sv=new Ee({color:Fe("#1B3E9F")}),ov=new Ee({color:Fe("#9AA0FF")}),hv=new Ee({color:Fe("#00083ACC")}),uv=new Ee({color:Fe("#ACB9F84D")}),av=new Ee({color:Fe("#889DFF4D")}),fv=new Ee({color:Ae(242,67,79)}),cv=new Ee({color:Fe("#4BCF6C")}),lv=new Ee({color:Fe("#ffffff")}),dv=new nr({fillStyle:iv}),vv=new nr({fillStyle:ev}),yv=new nr({fillStyle:nv}),Sv=new nr({fillStyle:rv}),mv=new nr({fillStyle:sv}),bv=new nr({fillStyle:uv}),gv=new nr({fillStyle:lv}),wv=new nr({fillStyle:cv}),pv=new nr({fillStyle:fv}),kv=rv,xv=vv,Mv=sv,Av=ir,Fv=iv,Tv=Sv,Cv=nv,Bv=iv,Lv=iv,Iv=ev,Ov=ov,Pv=Re,Dv=Re,_v=nv,Rv=ev,zv=uv,Ev=uv,Nv=lv,Vv=cv,Gv=fv,Hv=lv,jv=ov,Wv=lv,Uv=ov,Yv=lv,Xv=uv,Zv=uv,Kv=nv,qv=av,Jv=uv,Qv=nv,$v=iv,ty=nv,iy=nv,ny=hv,ey=nv,ry=iv,sy=ov,oy=nv,hy=nv,uy=nv,ay=nv,fy=nv,cy=dv.setThickness(6).setHighlightThicknessMultiplier(1),ly=cy.setThickness(5),dy=Sv.setThickness(1),vy=gv,yy=Sv,Sy=mv,my=Sv.setThickness(2),by=yv,gy=yv,wy=yv,py=yv,ky=Sv.setThickness(1),xy=Sv,My=Sv,Ay=ir,Fy=yv,Ty=wv,Cy=Ty.getDefaultHighlightStyle(),By=pv,Ly=By.getDefaultHighlightStyle(),Iy=yv,Oy=Sv.setThickness(1),Py=ir,Dy=ir,_y=ir,Ry=ir,zy=ir,Ey=ir,Ny=ir,Vy=Sv,Gy=yv,Hy=Sv,jy=ir,Wy=Sv.setThickness(1),Uy=Sv.setThickness(1),Yy=Sv.setThickness(1),Xy=gv.setThickness(1),Zy=gv.setThickness(1),Ky=yv,qy=yv,Jy=yv,Qy=or(ou.blueSciFi,10),$y=new nr({thickness:1}),tS={x:$y.setFillStyle(rv),y:$y.setFillStyle(rv),z:$y.setFillStyle(rv)},iS=new nr({thickness:2,fillStyle:rv}),nS=new ch.Triangulated({fillStyle:Cv}),eS=new ch.Pixelated({fillStyle:Cv}),rS=new nr({fillStyle:Cv,thickness:5}),sS=new yh({gridStrokeLength:1,gridStrokeStyle:ir,tickStyle:bv.setThickness(1),tickLength:50,tickPadding:-14,labelFillStyle:lv}),oS=new yh({gridStrokeLength:1,gridStrokeStyle:gv.setFillStyle((function(t){return t.setA(80)})).setThickness(1),tickLength:7,tickStyle:Sv.setThickness(1),tickPadding:0,labelFont:$d,labelPadding:0,labelFillStyle:lv}),hS=new yh({gridStrokeLength:1,gridStrokeStyle:gv.setFillStyle((function(t){return t.setA(30)})).setThickness(1),tickLength:4,tickStyle:Sv.setThickness(1),tickPadding:5,labelFont:tv,labelFillStyle:lv,labelPadding:0}),uS=new Eh({extremeTickStyle:mh,majorTickStyle:oS,minorTickStyle:hS}),aS=new Oh({greatTickStyle:sS,majorTickStyle:oS,minorTickStyle:hS}),fS=new Kh({majorTickStyle:oS,minorTickStyle:hS}),cS=Re,lS=wv,dS={lcjsBackgroundFillStyle:Re,lcjsBackgroundStrokeStyle:ir,dashboardBackgroundFillStyle:Bv,dashboardBackgroundStrokeStyle:ly,dashboardSplitterStyle:cy,panelBackgroundFillStyle:Lv,chartTitleFillStyle:Nv,seriesBackgroundFillStyle:Iv,panelBackgroundStrokeStyle:Iy,chartTitleFont:qd,seriesBackgroundStrokeStyle:Oy,sliceChartStrokeStyle:Py,sliceLabelFont:Qd,chartXYZoomingRectangleFillStyle:Pv,chartXYFittingRectangleFillStyle:Dv,axisTitleFillStyle:Ov,axisTitleFont:Jd,bandStrokeStyle:Ay,segmentSeriesStyle:Fy,OHLCBarPositiveStyle:Ty,OHLCBarPositiveHighlightStyle:Cy,OHLCBarNegativeStyle:By,OHLCBarNegativeHighlightStyle:Ly,candleStickPositiveStyle:Vv,candleStickPositiveStyleHighlight:Vv.getDefaultHighlightStyle(),candleStickPositiveStrokeStyle:Dy,candleStickPositiveStrokeStyleHighlight:_y,candleStickNegativeStyle:Gv,candleStickNegativeStyleHighlight:Gv.getDefaultHighlightStyle(),candleStickNegativeStrokeStyle:Ry,candleStickNegativeStrokeStyleHighlight:zy,boxFigureStrokeStyle:gy,boxFigureLineStyle:by,boxFigureMedianLineStyle:wy,pointMarkerFillStyle:Hv,uiFont:qd,spiderSeriesFillStyle:zv,spiderWebStyle:Sy,spiderAxisStyle:Sy,spiderAxisNibStyle:my,spiderSeriesStrokeStyle:yy,spiderScaleLabelFillStyle:Wv,spiderScaleLabelFont:$d,spiderAxisLabelFillStyle:jv,spiderAxisLabelFont:$d,sliceChartRadialFillStylePalette:Qy,sliceChartStackedFillStylePalette:Qy,sliceLabelFillStyle:Uv,sliceLabelConnectorStyle:py,gaugeSliceFillStyle:_v,gaugeBackgroundFillStyle:Rv,gaugeBackgroundStrokeStyle:Ey,chartXYZoomingRectangleStrokeStyle:My,chartXYFittingRectangleStrokeStyle:xy,mapChartFillStyle:kv,mapChartStrokeStyle:xv,mapChartOutlierRegionFillStyle:Mv,mapChartOutlierRegionStrokeStyle:Av,mapChartSeparateRegionFillStyle:Fv,mapChartSeparateRegionStrokeStyle:Tv,axisLabelFillStyle:Yv,axisLabelFont:$d,axisStyle:ky,axisOverlayStyle:Ev,numericTickStrategy:uS,dateTimeTickStrategy:aS,timeTickStrategy:fS,axisNibStyle:Ny,axisNibOverlayStyle:Xv,customTickGridStrokeStyle:dy,customTickMarkerFont:oS.getLabelFont(),customTickPointerLength:oS.getTickLength(),bandFillStyle:Zv,constantLineStrokeStyle:Vy,seriesFillStyle:Cv,seriesStrokeStyle:Ky,seriesPointFillStyle:Kv,seriesStrokeStyle3D:rS,seriesTriangulatedPointStyle3D:nS,seriesNonTriangulatedPointStyle3D:eS,mountainsStrokeStyle:Gy,mountainsFillStyle:qv,mountainsInvertedStrokeStyle:Hy,mountainsInvertedFillStyle:Jv,candleStickStyle:vy,candleStickStyleHighlight:vy.getDefaultHighlightStyle(),boxFigureStyle:Qv,pointMarkerStrokeStyle:jy,pointMarkerHorizontalGridStrokeStyle:Wy,pointMarkerVerticalGridStrokeStyle:Uy,customTickMarkerFillStyle:$v,customTickMarkerTextFillStyle:ty,customTickMarkerStrokeStyle:Yy,pointMarkerTextFillStyle:iy,resultTableFillStyle:ny,resultTableStrokeStyle:Xy,resultTableTextFillStyle:ey,uiBackgroundFillStyle:ry,uiBackgroundStrokeStyle:Zy,uiTextFillStyle:sy,uiButtonFillStyle:oy,uiButtonSize:12,axesStyles3D:tS,boundingBoxStyle3D:iS,surfaceSeriesFillStyle:hy,boxSeriesFillStyle:uy,onScreenMenuButtonBackgroundColor:new Ee({color:Ae(54,54,54,.7)}).getColor(),onScreenMenuButtonIconSet:qh,polarRadialAxisTickStyle:oS,polarRadialAxisStyle:qy,polarRadialAxisTitleStyle:ay,polarAmplitudeAxisStyle:Jy,polarAmplitudeAxisTitleStyle:fy,heatmapFillStyle:undefined,heatmapWireframeStyle:undefined,heatmapGridSeriesFillStyle:cS,heatmapGridSeriesWireframeStyle:lS,rectangleSeriesStrokeStyle:ir,polygonSeriesStrokeStyle:ir},vS=function(t,i,n){var e;if(void 0===n&&(n=1),"solid"!==i.fillType&&i.fillType){if("linearGradient"===i.fillType||"radialGradient"===i.fillType){var r=[];if(Array.isArray(i.color)){var s=1/(i.color.length-1);i.color.forEach((function(t,i){r.push({offset:i*s,color:t})}))}else r.push({offset:0,color:i.color});"linearGradient"===i.fillType?e=new Qe({angle:0,stops:r}):"radialGradient"===i.fillType&&(e=new Je({stops:r}))}}else e=Array.isArray(i.color)?new Ee({color:i.color[0]}):new Ee({color:i.color});return"line"!==t||"solid"!==i.lineType&&i.lineType?e:new nr({fillStyle:e,thickness:n})},yS=function(t,i){return e(e({},t),i)},SS=new Ee({color:Fe("#525252")}),mS=new Ee({color:Fe("#197278")}),bS=new Ee({color:Fe("#FFFFFA")}),gS=new Ee({color:Fe("#c44536")}),wS=new Ee({color:Fe("#c44536").getLighter()}),pS=new Ee({color:Fe("#463F3A")}),kS=new Ee({color:Ae(124,124,124)}),xS=yS(Ac,{panelBackgroundFillStyle:bS,chartTitleFillStyle:pS,seriesBackgroundFillStyle:bS,sliceLabelFillStyle:gS,uiTextFillStyle:gS,uiButtonFillStyle:gS,uiBackgroundStrokeStyle:new nr({fillStyle:SS}),sliceLabelConnectorStyle:new nr({fillStyle:mS}),spiderScaleLabelFillStyle:gS,spiderAxisLabelFillStyle:gS,spiderSeriesFillStyle:mS.setA(80),spiderSeriesStrokeStyle:new nr({fillStyle:pS}),seriesPointFillStyle:gS,seriesStrokeStyle:new nr({fillStyle:SS}),seriesFillStyle:mS,axisLabelFillStyle:SS,axisTitleFillStyle:SS,numericTickStrategy:Ac.numericTickStrategy.setMajorTickStyle((function(t){return t.setLabelFillStyle(gS)})).setMinorTickStyle((function(t){return t.setLabelFillStyle(wS)})).setExtremeTickStyle((function(t){return t.setLabelFillStyle(gS)})),dateTimeTickStrategy:Ac.dateTimeTickStrategy.setMajorTickStyle((function(t){return t.setLabelFillStyle(gS)})).setMinorTickStyle((function(t){return t.setLabelFillStyle(wS)})).setGreatTickStyle((function(t){return t.setLabelFillStyle(gS)})),resultTableTextFillStyle:gS,resultTableStrokeStyle:new nr({fillStyle:SS}),customTickMarkerStrokeStyle:new nr({fillStyle:gS}),mountainsFillStyle:mS,mountainsInvertedFillStyle:gS,mountainsStrokeStyle:new nr({fillStyle:pS}),mountainsInvertedStrokeStyle:new nr({fillStyle:pS}),gaugeSliceFillStyle:gS,pointMarkerTextFillStyle:gS,dashboardSplitterStyle:new nr({fillStyle:kS,thickness:5}),rectangleSeriesStrokeStyle:ir,polygonSeriesStrokeStyle:ir,onScreenMenuButtonBackgroundColor:new Ee({color:Ae(54,54,54,.7)}).getColor(),onScreenMenuButtonIconSet:Jh}),MS=new Je({stops:[{offset:0,color:Ae(10,10,10)},{offset:.33,color:Ae(14,12,10)},{offset:.66,color:Ae(26,22,20)},{offset:1,color:Ae(32,32,32)}]}),AS=new Je({stops:[{offset:0,color:Ae(30,30,30,200)},{offset:1,color:Ae(20,20,20)}]}),FS=new Je({stops:[{offset:0,color:Ae(10,10,10)},{offset:.4,color:Ae(14,12,10)},{offset:.75,color:Ae(26,22,20)},{offset:1,color:Ae(32,32,32)}]}),TS=new Je({stops:[{offset:0,color:Ae(100,100,100,60)},{offset:1,color:Ae(230,230,230,80)}]}),CS=hr(ou.arctionWarm,10),BS=ur(ou.arctionWarm,10),LS=new Qe({stops:[{offset:0,color:Ae(80,80,80)},{offset:.5,color:Ae(120,120,120)},{offset:1,color:Ae(80,80,80)}]}),IS=new Qe({stops:[{offset:0,color:Ae(26,120,66)},{offset:.5,color:Ae(46,204,113)},{offset:1,color:Ae(26,120,66)}],angle:90}),OS=new Qe({stops:[{offset:0,color:Ae(150,10,20)},{offset:.5,color:Ae(242,67,79)},{offset:1,color:Ae(150,10,20)}],angle:90}),PS=new nr({fillStyle:IS}),DS=PS.getDefaultHighlightStyle(),_S=new nr({fillStyle:OS}),RS=_S.getDefaultHighlightStyle(),zS=yS(Qa,{panelBackgroundFillStyle:MS,spiderSeriesFillStyle:TS,resultTableFillStyle:AS,customTickMarkerFillStyle:AS,seriesBackgroundFillStyle:FS,dashboardSplitterStyle:new nr({fillStyle:LS,thickness:6,highlightThicknessMultiplier:1}),sliceChartRadialFillStylePalette:CS,sliceChartStackedFillStylePalette:BS,OHLCBarPositiveStyle:PS,OHLCBarPositiveHighlightStyle:DS,OHLCBarNegativeStyle:_S,OHLCBarNegativeHighlightStyle:RS,candleStickPositiveStyle:IS,candleStickPositiveStyleHighlight:IS.getDefaultHighlightStyle(),candleStickNegativeStyle:OS,candleStickNegativeStyleHighlight:OS.getDefaultHighlightStyle(),rectangleSeriesStrokeStyle:ir,polygonSeriesStrokeStyle:ir,onScreenMenuButtonBackgroundColor:new Ee({color:Ae(54,54,54,.7)}).getColor(),onScreenMenuButtonIconSet:Jh}),ES=new sh({size:16}),NS=new sh({size:16}),VS=new sh({size:16}),GS=new Ee({color:Fe("#ffffff")}),HS=new Ee({color:Ae(255,255,255,50)}),jS=new Ee({color:Ae(242,67,79)}),WS=new Ee({color:Ae(0,0,0)}),US=new Ee({color:Ae(46,204,113)}),YS=new Ee({color:Fe("#003123")}),XS=new Ee({color:Fe("#00533C")}),ZS=new Ee({color:Fe("#002118")}),KS=new Ee({color:Fe("#00815140")}),qS=new Ee({color:Fe("#87FFC7")}),JS=new Ee({color:Fe("#00FF88")}),QS=new Ee({color:Fe("#00E178")}),$S=new Ee({color:Fe("#02D170")}),tm=new Ee({color:Fe("#02BC65")}),im=new Ee({color:Fe("#00A558")}),nm=new Ee({color:Fe("#00945D")}),em=new Ee({color:Fe("#008151")}),rm=new Ee({color:Fe("#006A46")}),sm=new Ee({color:Fe("#005437")}),om=new Ee({color:Ae(54,54,54,.7)}),hm=new nr({fillStyle:ZS,thickness:1}),um=new nr({fillStyle:qS,thickness:1}),am=qS,fm=hm,cm=WS,lm=ir,dm=YS,vm=um,ym=new nr({fillStyle:WS,thickness:3}),Sm=new nr({fillStyle:WS,thickness:3}),mm=new nr({fillStyle:WS,thickness:5}),bm=new nr({fillStyle:XS,thickness:6,highlightThicknessMultiplier:1}),gm=bm.setThickness(5),wm=new nr({fillStyle:GS,thickness:2}),pm=new nr({fillStyle:GS,thickness:2}),km=new nr({fillStyle:JS,thickness:1}),xm=new sh({size:15}),Mm=new sh({size:11}),Am=new nr({fillStyle:em,thickness:1}),Fm=new nr({fillStyle:JS,thickness:3}),Tm=new nr({fillStyle:KS,thickness:1}),Cm=new yh({gridStrokeLength:1,gridStrokeStyle:ir,tickStyle:new nr({thickness:2,fillStyle:new Ee({color:Ae(255,255,255,70)})}),tickLength:50,tickPadding:-14,labelFillStyle:qS}),Bm=new yh({gridStrokeLength:1,gridStrokeStyle:Am,tickLength:7,tickStyle:new nr({thickness:1,fillStyle:JS}),tickPadding:0,labelFont:xm,labelPadding:0,labelFillStyle:qS}),Lm=new yh({gridStrokeLength:1,gridStrokeStyle:Tm,tickLength:4,tickStyle:new nr({fillStyle:JS,thickness:1}),tickPadding:5,labelFont:Mm,labelFillStyle:qS,labelPadding:0}),Im=new Eh({extremeTickStyle:mh,majorTickStyle:Bm,minorTickStyle:Lm}),Om=new Oh({greatTickStyle:Cm,majorTickStyle:Bm,minorTickStyle:Lm}),Pm=new Kh({majorTickStyle:Bm,minorTickStyle:Lm}),Dm=ir,_m=HS,Rm=new nr({fillStyle:HS,thickness:5}),zm=new nr({fillStyle:sm,thickness:1}),Em=new nr({fillStyle:qS,thickness:2}),Nm=HS,Vm=qS,Gm=qS,Hm=new nr({fillStyle:$S,thickness:2}),jm=new nr({fillStyle:$S,thickness:2}),Wm=qS,Um=rm,Ym=new nr({fillStyle:qS,thickness:1}),Xm=new nr({fillStyle:GS,thickness:1}),Zm=new nr({fillStyle:JS,thickness:1}),Km=new nr({fillStyle:qS,thickness:1}),qm=new nr({fillStyle:GS}),Jm=$S,Qm=em,$m=new nr({fillStyle:Qm}),tb=new nr({fillStyle:Jm}),ib=new nr({fillStyle:qS}),nb=new nr({fillStyle:US}),eb=nb.getDefaultHighlightStyle(),rb=new nr({fillStyle:jS}),sb=rb.getDefaultHighlightStyle(),ob=GS,hb=new nr,ub=[qS,JS,QS,$S,tm,im,nm,em,rm,sm],ab=function(t){return ub[t%ub.length]},fb=ZS,cb=new nr({thickness:2}),lb={x:cb.setFillStyle(new Ee({color:Fe("#FFF")})),y:cb.setFillStyle(new Ee({color:Fe("#FFF")})),z:cb.setFillStyle(new Ee({color:Fe("#FFF")}))},db=new nr({thickness:2,fillStyle:new Ee({color:Fe("#FFF")})}),vb=new ch.Triangulated({fillStyle:qS}),yb=new ch.Pixelated({fillStyle:qS}),Sb=new nr({fillStyle:qS,thickness:5}),mb=Re,bb=new nr({fillStyle:jS}),gb={lcjsBackgroundFillStyle:Re,lcjsBackgroundStrokeStyle:ir,dashboardBackgroundFillStyle:ZS,dashboardBackgroundStrokeStyle:gm,dashboardSplitterStyle:bm,panelBackgroundFillStyle:YS,chartTitleFillStyle:GS,seriesBackgroundFillStyle:ZS,panelBackgroundStrokeStyle:ir,chartTitleFont:ES,seriesBackgroundStrokeStyle:ir,sliceChartStrokeStyle:ir,sliceLabelFont:VS,chartXYZoomingRectangleFillStyle:Re,chartXYFittingRectangleFillStyle:Re,axisTitleFillStyle:JS,axisTitleFont:NS,bandStrokeStyle:Dm,segmentSeriesStyle:ib,OHLCBarPositiveStyle:nb,OHLCBarPositiveHighlightStyle:eb,OHLCBarNegativeStyle:rb,OHLCBarNegativeHighlightStyle:sb,candleStickPositiveStyle:US,candleStickPositiveStyleHighlight:US.getDefaultHighlightStyle(),candleStickPositiveStrokeStyle:ir,candleStickPositiveStrokeStyleHighlight:ir,candleStickNegativeStyle:jS,candleStickNegativeStyleHighlight:jS.getDefaultHighlightStyle(),candleStickNegativeStrokeStyle:ir,candleStickNegativeStrokeStyleHighlight:ir,boxFigureStrokeStyle:ym,boxFigureLineStyle:Sm,boxFigureMedianLineStyle:mm,pointMarkerFillStyle:GS,uiFont:ES,spiderSeriesFillStyle:Nm,spiderWebStyle:zm,spiderAxisStyle:zm,spiderAxisNibStyle:Fm,spiderSeriesStrokeStyle:Em,spiderScaleLabelFillStyle:Vm,spiderScaleLabelFont:xm,spiderAxisLabelFillStyle:Gm,spiderAxisLabelFont:xm,sliceChartRadialFillStylePalette:ab,sliceChartStackedFillStylePalette:ab,sliceLabelFillStyle:ob,sliceLabelConnectorStyle:hb,gaugeSliceFillStyle:im,gaugeBackgroundFillStyle:fb,gaugeBackgroundStrokeStyle:ir,chartXYZoomingRectangleStrokeStyle:pm,chartXYFittingRectangleStrokeStyle:wm,axisLabelFillStyle:GS,axisLabelFont:xm,axisStyle:km,axisOverlayStyle:HS,numericTickStrategy:Im,dateTimeTickStrategy:Om,timeTickStrategy:Pm,axisNibStyle:ir,axisNibOverlayStyle:HS,customTickGridStrokeStyle:Fm,customTickMarkerFont:Bm.getLabelFont(),customTickPointerLength:Bm.getTickLength(),bandFillStyle:_m,constantLineStrokeStyle:Rm,seriesFillStyle:qS,seriesStrokeStyle:Km,seriesPointFillStyle:JS,seriesStrokeStyle3D:Sb,seriesTriangulatedPointStyle3D:vb,seriesNonTriangulatedPointStyle3D:yb,mountainsStrokeStyle:$m,mountainsFillStyle:Qm.setA(175),mountainsInvertedStrokeStyle:tb,mountainsInvertedFillStyle:Jm.setA(175),candleStickStyle:qm,candleStickStyleHighlight:qm.getDefaultHighlightStyle(),boxFigureStyle:GS,pointMarkerStrokeStyle:ir,pointMarkerHorizontalGridStrokeStyle:Zm,pointMarkerVerticalGridStrokeStyle:Zm,customTickMarkerFillStyle:YS,customTickMarkerTextFillStyle:GS,customTickMarkerStrokeStyle:Xm,pointMarkerTextFillStyle:GS,resultTableFillStyle:YS.setA(200),resultTableStrokeStyle:Xm,resultTableTextFillStyle:qS,uiBackgroundFillStyle:YS,uiBackgroundStrokeStyle:Ym,uiTextFillStyle:qS,uiButtonFillStyle:GS,uiButtonSize:12,axesStyles3D:lb,boundingBoxStyle3D:db,surfaceSeriesFillStyle:qS,boxSeriesFillStyle:qS,onScreenMenuButtonBackgroundColor:om.getColor(),onScreenMenuButtonIconSet:Jh,polarRadialAxisTickStyle:Bm,polarRadialAxisStyle:Hm,polarRadialAxisTitleStyle:Wm,polarAmplitudeAxisStyle:jm,polarAmplitudeAxisTitleStyle:Um,heatmapFillStyle:undefined,heatmapWireframeStyle:undefined,heatmapGridSeriesFillStyle:mb,heatmapGridSeriesWireframeStyle:bb,mapChartFillStyle:am,mapChartStrokeStyle:fm,mapChartOutlierRegionFillStyle:cm,mapChartOutlierRegionStrokeStyle:lm,mapChartSeparateRegionFillStyle:dm,mapChartSeparateRegionStrokeStyle:vm,rectangleSeriesStrokeStyle:ir,polygonSeriesStrokeStyle:ir},wb=new Ee({color:Fe("#2b2d42")}),pb=new Ee({color:Fe("#8d99ae")}),kb=new Ee({color:Fe("#edf2f4")}),xb=new Ee({color:Fe("#f35467")}),Mb=new Ee({color:Fe("#d80032")}),Ab=or(ou.dynamic,10),Fb=yS(Ac,{panelBackgroundFillStyle:kb,chartTitleFillStyle:Mb,seriesBackgroundFillStyle:kb,sliceLabelFillStyle:xb,uiTextFillStyle:wb,uiButtonFillStyle:xb,uiBackgroundStrokeStyle:new nr({fillStyle:wb}),sliceLabelConnectorStyle:new nr({fillStyle:pb}),spiderScaleLabelFillStyle:xb,spiderAxisLabelFillStyle:xb,spiderSeriesFillStyle:pb.setA(80),spiderSeriesStrokeStyle:new nr({fillStyle:Mb}),seriesPointFillStyle:xb,seriesStrokeStyle:new nr({fillStyle:wb}),seriesFillStyle:pb,axisLabelFillStyle:wb,axisTitleFillStyle:wb,numericTickStrategy:Ac.numericTickStrategy.setMajorTickStyle((function(t){return t.setLabelFillStyle(xb)})).setExtremeTickStyle((function(t){return t.setLabelFillStyle(xb)})).setMinorTickStyle((function(t){return t.setLabelFillStyle(xb)})),dateTimeTickStrategy:Ac.dateTimeTickStrategy.setMajorTickStyle((function(t){return t.setLabelFillStyle(xb)})).setGreatTickStyle((function(t){return t.setLabelFillStyle(xb)})).setMinorTickStyle((function(t){return t.setLabelFillStyle(xb)})),resultTableTextFillStyle:xb,resultTableStrokeStyle:new nr({fillStyle:wb}),customTickMarkerStrokeStyle:new nr({fillStyle:xb}),mountainsFillStyle:pb,mountainsInvertedFillStyle:xb,mountainsStrokeStyle:new nr({fillStyle:Mb}),mountainsInvertedStrokeStyle:new nr({fillStyle:Mb}),gaugeSliceFillStyle:xb,pointMarkerTextFillStyle:xb,sliceChartRadialFillStylePalette:Ab,sliceChartStackedFillStylePalette:Ab,rectangleSeriesStrokeStyle:ir,polygonSeriesStrokeStyle:ir,onScreenMenuButtonBackgroundColor:new Ee({color:Ae(54,54,54,.7)}).getColor(),onScreenMenuButtonIconSet:Jh}),Tb=new Ee({color:Fe("#edf2f4")}),Cb=hr(ou.dynamic,10),Bb=ur(ou.dynamic,10),Lb=new Je({stops:[{offset:0,color:Tb.getColor()},{offset:1,color:Tb.getColor().getLighter()}]}),Ib=new Je({stops:[{offset:0,color:Tb.getColor().getLighter()},{offset:1,color:Tb.getColor().getDarker()}]}),Ob=new Je({stops:[{offset:0,color:Ae(200,200,200,40)},{offset:1,color:Ae(155,155,155,80)}]}),Pb=new Je({stops:[{offset:0,color:Ae(255,255,255,200)},{offset:1,color:Ae(240,240,240)}]}),Db=new Qe({stops:[{offset:0,color:Ae(200,200,200)},{offset:.5,color:Ae(220,220,220)},{offset:1,color:Ae(200,200,200)}]}),_b=new Qe({stops:[{offset:0,color:Ae(26,120,66)},{offset:.5,color:Ae(46,204,113)},{offset:1,color:Ae(26,120,66)}],angle:90}),Rb=new Qe({stops:[{offset:0,color:Ae(150,10,20)},{offset:.5,color:Ae(242,67,79)},{offset:1,color:Ae(150,10,20)}],angle:90}),zb=new nr({fillStyle:_b}),Eb=zb.getDefaultHighlightStyle(),Nb=new nr({fillStyle:Rb}),Vb=Nb.getDefaultHighlightStyle(),Gb=yS(Fb,{panelBackgroundFillStyle:Lb,seriesBackgroundFillStyle:Ib,sliceChartRadialFillStylePalette:Cb,sliceChartStackedFillStylePalette:Bb,dashboardSplitterStyle:new nr({fillStyle:Db,thickness:6,highlightThicknessMultiplier:1}),spiderSeriesFillStyle:Ob,resultTableFillStyle:Pb,customTickMarkerFillStyle:Pb,OHLCBarPositiveStyle:zb,OHLCBarPositiveHighlightStyle:Eb,OHLCBarNegativeStyle:Nb,OHLCBarNegativeHighlightStyle:Vb,candleStickPositiveStyle:_b,candleStickPositiveStyleHighlight:_b.getDefaultHighlightStyle(),candleStickNegativeStyle:Rb,candleStickNegativeStyleHighlight:Rb.getDefaultHighlightStyle(),rectangleSeriesStrokeStyle:ir,polygonSeriesStrokeStyle:ir,onScreenMenuButtonBackgroundColor:new Ee({color:Ae(54,54,54,.7)}).getColor(),onScreenMenuButtonIconSet:Jh}),Hb=new Je({stops:[{offset:0,color:Ae(245,245,245)},{offset:1,color:Ae(255,255,255)}]}),jb=new Je({stops:[{offset:0,color:Ae(255,255,255,200)},{offset:1,color:Ae(240,240,240)}]}),Wb=new Je({stops:[{offset:0,color:Ae(255,255,255)},{offset:1,color:Ae(240,240,240)}]}),Ub=new Qe({stops:[{offset:0,color:Ae(200,200,200)},{offset:.5,color:Ae(220,220,220)},{offset:1,color:Ae(200,200,200)}]}),Yb=hr(ou.light,10),Xb=ur(ou.light,10),Zb=new Je({stops:[{offset:0,color:Fe("#E066003D")},{offset:1,color:Fe("#E066008D")}]}),Kb=new Qe({stops:[{offset:0,color:Ae(26,120,66)},{offset:.5,color:Ae(46,204,113)},{offset:1,color:Ae(26,120,66)}],angle:90}),qb=new Qe({stops:[{offset:0,color:Ae(150,10,20)},{offset:.5,color:Ae(242,67,79)},{offset:1,color:Ae(150,10,20)}],angle:90}),Jb=new nr({fillStyle:Kb}),Qb=Jb.getDefaultHighlightStyle(),$b=new nr({fillStyle:qb}),tg=$b.getDefaultHighlightStyle(),ig=yS(Ac,{panelBackgroundFillStyle:Hb,spiderSeriesFillStyle:Zb,resultTableFillStyle:jb,customTickMarkerFillStyle:jb,seriesBackgroundFillStyle:Wb,dashboardSplitterStyle:new nr({fillStyle:Ub,thickness:6,highlightThicknessMultiplier:1}),sliceChartRadialFillStylePalette:Yb,sliceChartStackedFillStylePalette:Xb,OHLCBarPositiveStyle:Jb,OHLCBarPositiveHighlightStyle:Qb,OHLCBarNegativeStyle:$b,OHLCBarNegativeHighlightStyle:tg,candleStickPositiveStyle:Kb,candleStickPositiveStyleHighlight:Kb.getDefaultHighlightStyle(),candleStickNegativeStyle:qb,candleStickNegativeStyleHighlight:qb.getDefaultHighlightStyle(),rectangleSeriesStrokeStyle:ir,polygonSeriesStrokeStyle:ir,onScreenMenuButtonBackgroundColor:new Ee({color:Ae(54,54,54,.7)}).getColor(),onScreenMenuButtonIconSet:Jh}),ng=new sh({size:16}),eg=new sh({size:16}),rg=new sh({size:16}),sg=new Ee({color:Fe("#ffffff")}),og=new Ee({color:Ae(46,204,113)}),hg=new Ee({color:Ae(242,67,79)}),ug=new nr({fillStyle:sg,thickness:1}),ag=new Ee({color:Fe("#87FFC7")}),fg=new Ee({color:Fe("#00FF88")}),cg=new Ee({color:Fe("#00E178")}),lg=new Ee({color:Fe("#02D170")}),dg=new Ee({color:Fe("#02BC65")}),vg=new Ee({color:Fe("#00A558")}),yg=new Ee({color:Fe("#00945D")}),Sg=new Ee({color:Fe("#008151")}),mg=new Ee({color:Fe("#006A46")}),bg=new Ee({color:Fe("#005437")}),gg=new Ee({color:Fe("#6DD8BA")}),wg=new Ee({color:Fe("#02BC6550")}),pg=new nr({fillStyle:bg,thickness:1}),kg=new Ee({color:Ae(54,54,54,.7)}),xg=new nr({fillStyle:ag,thickness:1}),Mg=ag,Ag=ug,Fg=cg,Tg=ir,Cg=sg,Bg=xg,Lg=new nr({fillStyle:bg,thickness:3}),Ig=new nr({fillStyle:bg,thickness:3}),Og=new nr({fillStyle:bg,thickness:5}),Pg=new nr({fillStyle:fg,thickness:6,highlightThicknessMultiplier:1}),Dg=new nr({fillStyle:lg,thickness:2}),_g=new nr({fillStyle:lg,thickness:2}),Rg=new nr({fillStyle:Sg,thickness:1}),zg=new sh({size:15}),Eg=new sh({size:11}),Ng=new nr({fillStyle:cg,thickness:3}),Vg=new yh({gridStrokeLength:1,gridStrokeStyle:ir,tickStyle:new nr({thickness:2,fillStyle:new Ee(wg)}),tickLength:50,tickPadding:-14,labelFillStyle:bg}),Gg=new yh({gridStrokeLength:1,gridStrokeStyle:new nr({fillStyle:cg,thickness:1}),tickLength:7,tickStyle:new nr({fillStyle:bg,thickness:1}),tickPadding:0,labelFont:zg,labelPadding:0,labelFillStyle:bg}),Hg=new yh({gridStrokeLength:1,gridStrokeStyle:new nr({fillStyle:new Ee({color:Fe("#d5ffec")}),thickness:1}),tickLength:4,tickStyle:new nr({fillStyle:bg,thickness:1}),tickPadding:5,labelFont:Eg,labelFillStyle:bg,labelPadding:0}),jg=new Eh({extremeTickStyle:mh,majorTickStyle:Gg,minorTickStyle:Hg}),Wg=new Oh({greatTickStyle:Vg,majorTickStyle:Gg,minorTickStyle:Hg}),Ug=new Kh({majorTickStyle:Gg,minorTickStyle:Hg}),Yg=ir,Xg=wg,Zg=new nr({fillStyle:wg,thickness:5}),Kg=new nr({fillStyle:bg,thickness:1}),qg=new nr({fillStyle:bg,thickness:2}),Jg=bg.setA(80),Qg=new nr({fillStyle:bg,thickness:2}),$g=new nr({fillStyle:bg,thickness:2}),tw=bg,iw=bg,nw=new nr({fillStyle:bg,thickness:1}),ew=pg,rw=pg,sw=new nr({fillStyle:bg,thickness:1}),ow=new nr({fillStyle:Sg,thickness:1}),hw=new nr({fillStyle:Sg}),uw=lg,aw=Sg,fw=new nr({fillStyle:aw}),cw=new nr({fillStyle:uw}),lw=new nr({fillStyle:Sg}),dw=new nr({fillStyle:og}),vw=dw.getDefaultHighlightStyle(),yw=new nr({fillStyle:hg}),Sw=yw.getDefaultHighlightStyle(),mw=new nr({fillStyle:dg}),bw=ag,gw=new nr({thickness:2}),ww={x:gw.setFillStyle(bg),y:gw.setFillStyle(bg),z:gw.setFillStyle(bg)},pw=new nr({thickness:2,fillStyle:new Ee(bg)}),kw=new ch.Triangulated({fillStyle:Sg}),xw=new ch.Pixelated({fillStyle:Sg}),Mw=new nr({fillStyle:Sg,thickness:5}),Aw=[ag,fg,cg,lg,dg,vg,yg,Sg,mg,bg],Fw=function(t){return Aw[t%Aw.length]},Tw=Re,Cw=new nr({fillStyle:hg}),Bw={lcjsBackgroundFillStyle:Re,lcjsBackgroundStrokeStyle:ir,dashboardBackgroundFillStyle:sg,dashboardBackgroundStrokeStyle:ir,dashboardSplitterStyle:Pg.setFillStyle(gg),panelBackgroundFillStyle:sg,chartTitleFillStyle:bg,seriesBackgroundFillStyle:sg,panelBackgroundStrokeStyle:ir,chartTitleFont:ng,seriesBackgroundStrokeStyle:new nr({fillStyle:Sg,thickness:1}),sliceChartStrokeStyle:ug,sliceLabelFont:rg,chartXYZoomingRectangleFillStyle:Re,chartXYFittingRectangleFillStyle:Re,axisTitleFont:eg,bandStrokeStyle:Yg,segmentSeriesStyle:lw,OHLCBarPositiveStyle:dw,OHLCBarPositiveHighlightStyle:vw,OHLCBarNegativeStyle:yw,OHLCBarNegativeHighlightStyle:Sw,candleStickPositiveStyle:og,candleStickPositiveStyleHighlight:og.getDefaultHighlightStyle(),candleStickPositiveStrokeStyle:ir,candleStickPositiveStrokeStyleHighlight:ir,candleStickNegativeStyle:hg,candleStickNegativeStyleHighlight:hg.getDefaultHighlightStyle(),candleStickNegativeStrokeStyle:ir,candleStickNegativeStrokeStyleHighlight:ir,boxFigureStrokeStyle:Lg,boxFigureLineStyle:Ig,boxFigureMedianLineStyle:Og,pointMarkerFillStyle:sg,uiFont:ng,spiderSeriesFillStyle:Jg,spiderWebStyle:Kg,spiderAxisStyle:Kg,spiderAxisNibStyle:new nr({fillStyle:bg,thickness:2}),spiderSeriesStrokeStyle:qg,spiderScaleLabelFillStyle:bg,spiderScaleLabelFont:zg,spiderAxisLabelFillStyle:bg,spiderAxisLabelFont:zg,sliceChartRadialFillStylePalette:Fw,sliceChartStackedFillStylePalette:Fw,sliceLabelFillStyle:bg,sliceLabelConnectorStyle:mw,gaugeSliceFillStyle:Sg,gaugeBackgroundFillStyle:bw,gaugeBackgroundStrokeStyle:ir,chartXYZoomingRectangleStrokeStyle:_g,chartXYFittingRectangleStrokeStyle:Dg,axisTitleFillStyle:dg,axisLabelFillStyle:dg,axisLabelFont:zg,axisStyle:Rg,axisOverlayStyle:dg.setA(80),numericTickStrategy:jg,dateTimeTickStrategy:Wg,timeTickStrategy:Ug,axisNibStyle:ir,axisNibOverlayStyle:dg.setA(80),customTickGridStrokeStyle:Ng,customTickMarkerFont:Gg.getLabelFont(),customTickPointerLength:Gg.getTickLength(),bandFillStyle:Xg,constantLineStrokeStyle:Zg,seriesFillStyle:Sg,seriesStrokeStyle:ow,seriesPointFillStyle:bg,seriesStrokeStyle3D:Mw,seriesTriangulatedPointStyle3D:kw,seriesNonTriangulatedPointStyle3D:xw,mountainsStrokeStyle:fw,mountainsFillStyle:aw.setA(175),mountainsInvertedStrokeStyle:cw,mountainsInvertedFillStyle:uw.setA(175),candleStickStyle:hw,candleStickStyleHighlight:hw.getDefaultHighlightStyle(),boxFigureStyle:Sg,pointMarkerStrokeStyle:rw,pointMarkerHorizontalGridStrokeStyle:sw,pointMarkerVerticalGridStrokeStyle:sw,customTickMarkerFillStyle:sg,customTickMarkerTextFillStyle:bg,customTickMarkerStrokeStyle:pg,pointMarkerTextFillStyle:bg,resultTableFillStyle:sg.setA(200),resultTableStrokeStyle:ew,resultTableTextFillStyle:bg,uiBackgroundFillStyle:sg,uiBackgroundStrokeStyle:nw,uiTextFillStyle:bg,uiButtonFillStyle:bg,uiButtonSize:12,axesStyles3D:ww,boundingBoxStyle3D:pw,boxSeriesFillStyle:Sg,onScreenMenuButtonBackgroundColor:kg.getColor(),onScreenMenuButtonIconSet:Jh,surfaceSeriesFillStyle:Sg,polarRadialAxisTickStyle:Gg,polarRadialAxisStyle:Qg,polarRadialAxisTitleStyle:tw,polarAmplitudeAxisStyle:$g,polarAmplitudeAxisTitleStyle:iw,heatmapFillStyle:undefined,heatmapWireframeStyle:undefined,heatmapGridSeriesFillStyle:Tw,heatmapGridSeriesWireframeStyle:Cw,mapChartFillStyle:Mg,mapChartStrokeStyle:Ag,mapChartOutlierRegionFillStyle:Fg,mapChartOutlierRegionStrokeStyle:Tg,mapChartSeparateRegionFillStyle:Cg,mapChartSeparateRegionStrokeStyle:Bg,rectangleSeriesStrokeStyle:ir,polygonSeriesStrokeStyle:ir},Lw=new sh({size:16}),Iw=new sh({size:16}),Ow=new sh({size:16}),Pw=new Ee({color:Fe("#ffffff")}),Dw=new Ee({color:Ae(46,204,113)}),_w=new Ee({color:Ae(242,67,79)}),Rw=new nr({fillStyle:Pw,thickness:1}),zw=new Ee({color:Fe("#FFEFFF")}),Ew=new Ee({color:Fe("#FFD5FF")}),Nw=new Ee({color:Fe("#FFB2FF")}),Vw=new Ee({color:Fe("#ECA1EC")}),Gw=new Ee({color:Fe("#E291D5")}),Hw=new Ee({color:Fe("#E172BF")}),jw=new Ee({color:Fe("#D663B0")}),Ww=new Ee({color:Fe("#C459AE")}),Uw=new Ee({color:Fe("#9C529C")}),Yw=new Ee({color:Fe("#8A4A8A")}),Xw=new Ee({color:Fe("#FFD5FF")}),Zw=new Ee({color:Fe("#E291D550")}),Kw=new nr({fillStyle:Yw,thickness:1}),qw=new Ee({color:Ae(54,54,54,.7)}),Jw=new nr({fillStyle:Gw,thickness:1}),Qw=Nw,$w=Rw,tp=Zw,ip=ir,np=Pw,ep=Jw,rp=new nr({fillStyle:Yw,thickness:3}),sp=new nr({fillStyle:Yw,thickness:3}),op=new nr({fillStyle:Yw,thickness:5}),hp=new nr({fillStyle:Ew,thickness:6,highlightThicknessMultiplier:1}),up=new nr({fillStyle:Vw,thickness:2}),ap=new nr({fillStyle:Vw,thickness:2}),fp=new nr({fillStyle:Ww,thickness:1}),cp=new sh({size:15}),lp=new sh({size:11}),dp=new nr({fillStyle:Nw,thickness:3}),vp=new yh({gridStrokeLength:1,gridStrokeStyle:ir,tickStyle:new nr({thickness:2,fillStyle:new Ee(Zw)}),tickLength:50,tickPadding:-14,labelFillStyle:Yw}),yp=new yh({gridStrokeLength:1,gridStrokeStyle:new nr({fillStyle:Nw,thickness:1}),tickLength:7,tickStyle:new nr({thickness:1,fillStyle:Yw}),tickPadding:0,labelFont:cp,labelPadding:0,labelFillStyle:Yw}),Sp=new yh({gridStrokeLength:1,gridStrokeStyle:new nr({fillStyle:zw,thickness:1}),tickLength:4,tickStyle:new nr({fillStyle:Yw,thickness:1}),tickPadding:5,labelFont:lp,labelFillStyle:Yw,labelPadding:0}),mp=new Eh({extremeTickStyle:mh,majorTickStyle:yp,minorTickStyle:Sp}),bp=new Oh({greatTickStyle:vp,majorTickStyle:yp,minorTickStyle:Sp}),gp=new Kh({majorTickStyle:yp,minorTickStyle:Sp}),wp=ir,pp=Zw,kp=new nr({fillStyle:Zw,thickness:5}),xp=new nr({fillStyle:Yw,thickness:1}),Mp=new nr({fillStyle:Yw,thickness:2}),Ap=Yw.setA(80),Fp=new nr({fillStyle:Yw,thickness:2}),Tp=new nr({fillStyle:Yw,thickness:2}),Cp=Yw,Bp=Yw,Lp=new nr({fillStyle:Yw,thickness:1}),Ip=Kw,Op=Kw,Pp=new nr({fillStyle:Yw,thickness:1}),Dp=new nr({fillStyle:Ww,thickness:1}),_p=new nr({fillStyle:Ww}),Rp=Vw,zp=Ww,Ep=new nr({fillStyle:zp}),Np=new nr({fillStyle:Rp}),Vp=new nr({fillStyle:Ww}),Gp=new nr({fillStyle:Dw}),Hp=Gp.getDefaultHighlightStyle(),jp=new nr({fillStyle:_w}),Wp=jp.getDefaultHighlightStyle(),Up=new nr({fillStyle:Gw}),Yp=zw,Xp=new nr({thickness:2}),Zp={x:Xp.setFillStyle(Yw),y:Xp.setFillStyle(Yw),z:Xp.setFillStyle(Yw)},Kp=new nr({thickness:2,fillStyle:new Ee(Yw)}),qp=new ch.Triangulated({fillStyle:Ww}),Jp=new ch.Pixelated({fillStyle:Ww}),Qp=new nr({fillStyle:Ww,thickness:5}),$p=[zw,Ew,Nw,Vw,Gw,Hw,jw,Ww,Uw,Yw],tk=function(t){return $p[t%$p.length]},ik=zw,nk=new nr({fillStyle:Dw}),ek={lcjsBackgroundFillStyle:Re,lcjsBackgroundStrokeStyle:ir,dashboardBackgroundFillStyle:Pw,dashboardBackgroundStrokeStyle:ir,dashboardSplitterStyle:hp.setFillStyle(Xw),panelBackgroundFillStyle:Pw,chartTitleFillStyle:Yw,seriesBackgroundFillStyle:Pw,panelBackgroundStrokeStyle:ir,chartTitleFont:Lw,seriesBackgroundStrokeStyle:new nr({fillStyle:Ww,thickness:1}),sliceChartStrokeStyle:Rw,sliceLabelFont:Ow,chartXYZoomingRectangleFillStyle:Re,chartXYFittingRectangleFillStyle:Re,axisTitleFont:Iw,bandStrokeStyle:wp,segmentSeriesStyle:Vp,OHLCBarPositiveStyle:Gp,OHLCBarPositiveHighlightStyle:Hp,OHLCBarNegativeStyle:jp,OHLCBarNegativeHighlightStyle:Wp,candleStickPositiveStyle:Dw,candleStickPositiveStyleHighlight:Dw.getDefaultHighlightStyle(),candleStickPositiveStrokeStyle:ir,candleStickPositiveStrokeStyleHighlight:ir,candleStickNegativeStyle:_w,candleStickNegativeStyleHighlight:_w.getDefaultHighlightStyle(),candleStickNegativeStrokeStyle:ir,candleStickNegativeStrokeStyleHighlight:ir,boxFigureStrokeStyle:rp,boxFigureLineStyle:sp,boxFigureMedianLineStyle:op,pointMarkerFillStyle:Pw,uiFont:Lw,spiderSeriesFillStyle:Ap,spiderWebStyle:xp,spiderAxisStyle:xp,spiderAxisNibStyle:new nr({fillStyle:Yw,thickness:2}),spiderSeriesStrokeStyle:Mp,spiderScaleLabelFillStyle:Yw,spiderScaleLabelFont:cp,spiderAxisLabelFillStyle:Yw,spiderAxisLabelFont:cp,sliceChartRadialFillStylePalette:tk,sliceChartStackedFillStylePalette:tk,sliceLabelFillStyle:Yw,sliceLabelConnectorStyle:Up,gaugeSliceFillStyle:Ww,gaugeBackgroundFillStyle:Yp,gaugeBackgroundStrokeStyle:ir,chartXYZoomingRectangleStrokeStyle:ap,chartXYFittingRectangleStrokeStyle:up,axisTitleFillStyle:Gw,axisLabelFillStyle:Gw,axisLabelFont:cp,axisStyle:fp,axisOverlayStyle:Gw.setA(80),numericTickStrategy:mp,dateTimeTickStrategy:bp,timeTickStrategy:gp,axisNibStyle:ir,axisNibOverlayStyle:Gw.setA(80),customTickGridStrokeStyle:dp,customTickMarkerFont:yp.getLabelFont(),customTickPointerLength:yp.getTickLength(),bandFillStyle:pp,constantLineStrokeStyle:kp,seriesFillStyle:Ww,seriesStrokeStyle:Dp,seriesPointFillStyle:Yw,seriesStrokeStyle3D:Qp,seriesTriangulatedPointStyle3D:qp,seriesNonTriangulatedPointStyle3D:Jp,mountainsStrokeStyle:Ep,mountainsFillStyle:zp.setA(175),mountainsInvertedStrokeStyle:Np,mountainsInvertedFillStyle:Rp.setA(175),candleStickStyle:_p,candleStickStyleHighlight:_p.getDefaultHighlightStyle(),boxFigureStyle:Ww,pointMarkerStrokeStyle:Op,pointMarkerHorizontalGridStrokeStyle:Pp,pointMarkerVerticalGridStrokeStyle:Pp,customTickMarkerFillStyle:Pw,customTickMarkerTextFillStyle:Yw,customTickMarkerStrokeStyle:Kw,pointMarkerTextFillStyle:Yw,resultTableFillStyle:Pw.setA(200),resultTableStrokeStyle:Ip,resultTableTextFillStyle:Yw,uiBackgroundFillStyle:Pw,uiBackgroundStrokeStyle:Lp,uiTextFillStyle:Yw,uiButtonFillStyle:Yw,uiButtonSize:12,axesStyles3D:Zp,boundingBoxStyle3D:Kp,boxSeriesFillStyle:Ww,onScreenMenuButtonBackgroundColor:qw.getColor(),onScreenMenuButtonIconSet:Jh,surfaceSeriesFillStyle:Ww,polarRadialAxisTickStyle:yp,polarRadialAxisStyle:Fp,polarRadialAxisTitleStyle:Cp,polarAmplitudeAxisStyle:Tp,polarAmplitudeAxisTitleStyle:Bp,heatmapFillStyle:undefined,heatmapWireframeStyle:undefined,heatmapGridSeriesFillStyle:ik,heatmapGridSeriesWireframeStyle:nk,mapChartFillStyle:Qw,mapChartStrokeStyle:$w,mapChartOutlierRegionFillStyle:tp,mapChartOutlierRegionStrokeStyle:ip,mapChartSeparateRegionFillStyle:np,mapChartSeparateRegionStrokeStyle:ep,rectangleSeriesStrokeStyle:ir,polygonSeriesStrokeStyle:ir},rk=new Ee({color:Ae(32,32,32)}),sk=new Ee({color:Fe("#0a7aad")}),ok=new Ee({color:Ae(175,175,175)}),hk=new Ee({color:Ae(200,200,200)}),uk=new nr({fillStyle:sk,thickness:2}),ak=new nr({fillStyle:ok,thickness:3}),fk=new Ee({color:Fe("#ffffff")}),ck=new nr({fillStyle:rk}),lk=new nr({fillStyle:rk,thickness:1}),dk=new nr({fillStyle:hk,thickness:2}),vk=new Ee({color:Fe("#FA255E")}),yk=new Ee({color:Fe("#C39EA0")}),Sk=new Ee({color:Ae(153,0,0)}),mk=new Ee({color:Fe("#F8E5E5")}),bk=new Ee({color:Fe("#FA255EAB")}),gk=new Ee({color:Fe("#C39EA0").getDarker().setA(175)}),wk=new Ee({color:Fe("#C39EA0").setA(85)}),pk=vk,kk=or(ou.magenta,10),xk=yS(Ac,{chartTitleFillStyle:vk,seriesBackgroundFillStyle:mk,axisTitleFillStyle:vk,uiTextFillStyle:Sk,numericTickStrategy:Ac.numericTickStrategy.setMajorTickStyle((function(t){return t.setGridStrokeStyle(new nr({fillStyle:gk}))})).setMinorTickStyle((function(t){return t.setGridStrokeStyle(new nr({fillStyle:wk}))})).setExtremeTickStyle((function(t){return t.setGridStrokeStyle(new nr({fillStyle:wk}))})),dateTimeTickStrategy:Ac.dateTimeTickStrategy.setMajorTickStyle((function(t){return t.setGridStrokeStyle(new nr({fillStyle:gk}))})).setMinorTickStyle((function(t){return t.setGridStrokeStyle(new nr({fillStyle:wk}))})).setGreatTickStyle((function(t){return t.setGridStrokeStyle(new nr({fillStyle:wk}))})),seriesStrokeStyle:new nr({fillStyle:vk}),seriesFillStyle:vk,gaugeSliceFillStyle:vk,spiderAxisStyle:dk.setFillStyle(yk),spiderWebStyle:dk.setFillStyle(yk),spiderSeriesFillStyle:bk,spiderSeriesStrokeStyle:uk.setFillStyle(vk),spiderAxisNibStyle:ak.setFillStyle(yk),seriesPointFillStyle:rk,spiderAxisLabelFillStyle:mk,spiderScaleLabelFillStyle:rk,sliceChartRadialFillStylePalette:kk,sliceChartStackedFillStylePalette:kk,candleStickStyle:ck,candleStickStyleHighlight:ck.getDefaultHighlightStyle(),resultTableFillStyle:fk.setA(200),resultTableStrokeStyle:lk,resultTableTextFillStyle:rk,customTickMarkerFillStyle:fk,mapChartFillStyle:pk,rectangleSeriesStrokeStyle:ir,polygonSeriesStrokeStyle:ir,onScreenMenuButtonBackgroundColor:new Ee({color:Ae(54,54,54,.7)}).getColor(),onScreenMenuButtonIconSet:Jh}),Mk=new Ee({color:Fe("#F8E5E5")}),Ak=new Ee({color:Fe("#FA255E")}),Fk=new Ee({color:Fe("#C39EA0").getDarker()}),Tk=new Ee({color:Fe("#F8E5E5").setA(220)}),Ck=new Ee({color:Fe("#C39EA0").getDarker().setA(220)}),Bk=new Ee({color:Fe("#C39EA0").setA(110)}),Lk=new Ee({color:Ae(32,32,32)}),Ik=new nr({thickness:1,fillStyle:Ak}),Ok=new Je({stops:[{offset:0,color:Ae(20,20,20)},{offset:1,color:Ae(32,32,32)}]}),Pk=new Je({stops:[{offset:0,color:Tk.getColor().getLighter()},{offset:1,color:Tk.getColor().getDarker()}]}),Dk=new Je({stops:[{offset:0,color:Mk.getColor().setA(120)},{offset:1,color:Ak.getColor().setA(120)}]}),_k=new Je({stops:[{offset:0,color:Ae(255,255,255,200)},{offset:1,color:Ae(240,240,240)}]}),Rk=new Qe({stops:[{offset:0,color:Ae(80,80,80)},{offset:.5,color:Ae(120,120,120)},{offset:1,color:Ae(80,80,80)}]}),zk=Ak,Ek=new nr({thickness:1,fillStyle:Lk}),Nk=Fk,Vk=ir,Gk=Ok,Hk=Ik,jk=new nr({thickness:1}),Wk=new nr({thickness:1,fillStyle:Fk}),Uk={x:jk.setFillStyle(Fk),y:jk.setFillStyle(Lk),z:jk.setFillStyle(Lk)},Yk=hr(ou.magenta,10),Xk=ur(ou.magenta,10),Zk=yS(xk,{panelBackgroundFillStyle:Ok,seriesBackgroundFillStyle:Pk,dashboardSplitterStyle:new nr({fillStyle:Rk,thickness:6,highlightThicknessMultiplier:1}),sliceLabelFillStyle:Mk,sliceLabelConnectorStyle:new nr({fillStyle:Mk,thickness:1}),gaugeBackgroundStrokeStyle:ir,spiderSeriesFillStyle:Dk,resultTableFillStyle:_k,customTickMarkerFillStyle:_k,customTickMarkerTextFillStyle:Ak,numericTickStrategy:Ac.numericTickStrategy.setMajorTickStyle((function(t){return t.setGridStrokeStyle(new nr({fillStyle:Ck})).setLabelFillStyle(Mk)})).setMinorTickStyle((function(t){return t.setGridStrokeStyle(new nr({fillStyle:Bk})).setLabelFillStyle(Mk)})).setExtremeTickStyle((function(t){return t.setGridStrokeStyle(new nr({fillStyle:Bk})).setLabelFillStyle(Mk)})),dateTimeTickStrategy:Ac.dateTimeTickStrategy.setMajorTickStyle((function(t){return t.setGridStrokeStyle(new nr({fillStyle:Ck})).setLabelFillStyle(Mk)})).setMinorTickStyle((function(t){return t.setGridStrokeStyle(new nr({fillStyle:Bk})).setLabelFillStyle(Mk)})).setGreatTickStyle((function(t){return t.setGridStrokeStyle(new nr({fillStyle:Bk})).setLabelFillStyle(Mk)})),sliceChartRadialFillStylePalette:Yk,sliceChartStackedFillStylePalette:Xk,mapChartFillStyle:zk,mapChartStrokeStyle:Ek,mapChartOutlierRegionFillStyle:Nk,mapChartOutlierRegionStrokeStyle:Vk,mapChartSeparateRegionFillStyle:Gk,mapChartSeparateRegionStrokeStyle:Hk,axesStyles3D:Uk,boundingBoxStyle3D:Wk,rectangleSeriesStrokeStyle:ir,polygonSeriesStrokeStyle:ir,onScreenMenuButtonBackgroundColor:new Ee({color:Ae(54,54,54,.7)}).getColor(),onScreenMenuButtonIconSet:Jh}),Kk=new sh({size:16}),qk=new sh({size:16}),Jk=new sh({size:16}),Qk=new sh({size:15}),$k=new sh({size:11}),tx=new Ee({color:Fe("#404040")}),ix=new Ee({color:Fe("#000000")}),nx=new Ee({color:Fe("#8B8B8B")}),ex=new Ee({color:Fe("#2B2B2B")}),rx=new Ee({color:Fe("#A4A2A2")}),sx=new Ee({color:Fe("#434343")}),ox=new Ee({color:Fe("#A1A1A1")}),hx=new Ee({color:Fe("#707070")}),ux=new Ee({color:Fe("#323232")}),ax=new Ee({color:Fe("#202020")}),fx=new Ee({color:Fe("#C8C8C8")}),cx=new Ee({color:Fe("#9E9E9E")}),lx=new Ee({color:Fe("#FFFFFF1A")}),dx=new Ee({color:Fe("#212121CC")}),vx=new Ee({color:Fe("#9E9E9E4D")}),yx=new Ee({color:Ae(242,67,79)}),Sx=new Ee({color:Fe("#4BCF6C")}),mx=new Ee({color:Fe("#ffffff")}),bx=new nr({fillStyle:tx}),gx=new nr({fillStyle:nx}),wx=new nr({fillStyle:rx}),px=new nr({fillStyle:ox}),kx=new nr({fillStyle:ux}),xx=new nr({fillStyle:fx}),Mx=new nr({fillStyle:cx}),Ax=new nr({fillStyle:mx}),Fx=new nr({fillStyle:Sx}),Tx=new nr({fillStyle:yx}),Cx=new nr({fillStyle:vx}),Bx=new nr({fillStyle:sx.setA(220)}),Lx=new nr({fillStyle:sx.setA(110)}),Ix=nx,Ox=bx,Px=ex,Dx=ir,_x=ix,Rx=gx,zx=nx,Ex=tx,Nx=ix,Vx=ix,Gx=ox,Hx=Re,jx=Re,Wx=nx,Ux=ex,Yx=lx,Xx=lx,Zx=mx,Kx=Sx,qx=yx,Jx=mx,Qx=ox,$x=mx,tM=ox,iM=mx,nM=lx,eM=lx,rM=mx,sM=lx,oM=dx,hM=nx,uM=ax,aM=mx,fM=mx,cM=dx,lM=mx,dM=ax,vM=ox,yM=mx,SM=hx,mM=hx,bM=hx,gM=hx,wM=bx.setThickness(6).setHighlightThicknessMultiplier(1),pM=wM.setThickness(5),kM=Mx.setThickness(1),xM=Ax,MM=wx,AM=kx,FM=xx.setThickness(2),TM=px,CM=px,BM=px,LM=px.setThickness(1),IM=Mx.setThickness(1),OM=Mx,PM=Mx,DM=ir,_M=gx,RM=Fx,zM=RM.getDefaultHighlightStyle(),EM=Tx,NM=EM.getDefaultHighlightStyle(),VM=ir,GM=kx.setThickness(1),HM=ir,jM=ir,WM=ir,UM=ir,YM=ir,XM=ir,ZM=ir,KM=kx,qM=xx,JM=gx,QM=ir,$M=Mx.setThickness(1),tA=Mx.setThickness(1),iA=Ax.setThickness(1),nA=Ax.setThickness(1),eA=Ax.setThickness(1),rA=gx,sA=gx,oA=gx,hA=or(ou.monochrome,10),uA=new nr({thickness:1}),aA={x:uA.setFillStyle(cx),y:uA.setFillStyle(cx),z:uA.setFillStyle(cx)},fA=new nr({thickness:2,fillStyle:cx}),cA=new ch.Triangulated({fillStyle:zx}),lA=new ch.Pixelated({fillStyle:zx}),dA=new nr({fillStyle:zx,thickness:5}),vA=new yh({gridStrokeLength:1,gridStrokeStyle:ir,tickStyle:Cx.setThickness(1),tickLength:50,tickPadding:-14,labelFillStyle:mx}),yA=new yh({gridStrokeLength:1,gridStrokeStyle:Bx.setThickness(1),tickLength:7,tickStyle:Mx.setThickness(1),tickPadding:0,labelFont:Qk,labelPadding:0,labelFillStyle:mx}),SA=new yh({gridStrokeLength:1,gridStrokeStyle:Lx,tickLength:4,tickStyle:Mx.setThickness(1),tickPadding:5,labelFont:$k,labelFillStyle:mx,labelPadding:0}),mA=new Eh({extremeTickStyle:mh,majorTickStyle:yA,minorTickStyle:SA}),bA=new Oh({greatTickStyle:vA,majorTickStyle:yA,minorTickStyle:SA}),gA=new Kh({majorTickStyle:yA,minorTickStyle:SA}),wA=Re,pA=Tx,kA={lcjsBackgroundFillStyle:Re,lcjsBackgroundStrokeStyle:ir,dashboardBackgroundFillStyle:Ex,dashboardBackgroundStrokeStyle:pM,dashboardSplitterStyle:wM,panelBackgroundFillStyle:Nx,chartTitleFillStyle:Zx,seriesBackgroundFillStyle:Vx,panelBackgroundStrokeStyle:VM,chartTitleFont:Kk,seriesBackgroundStrokeStyle:GM,sliceChartStrokeStyle:HM,sliceLabelFont:Jk,chartXYZoomingRectangleFillStyle:Hx,chartXYFittingRectangleFillStyle:jx,axisTitleFillStyle:Gx,axisTitleFont:qk,bandStrokeStyle:DM,segmentSeriesStyle:_M,OHLCBarPositiveStyle:RM,OHLCBarPositiveHighlightStyle:zM,OHLCBarNegativeStyle:EM,OHLCBarNegativeHighlightStyle:NM,candleStickPositiveStyle:Kx,candleStickPositiveStyleHighlight:Kx.getDefaultHighlightStyle(),candleStickPositiveStrokeStyle:jM,candleStickPositiveStrokeStyleHighlight:WM,candleStickNegativeStyle:qx,candleStickNegativeStyleHighlight:qx.getDefaultHighlightStyle(),candleStickNegativeStrokeStyle:UM,candleStickNegativeStrokeStyleHighlight:YM,boxFigureStrokeStyle:CM,boxFigureLineStyle:TM,boxFigureMedianLineStyle:BM,pointMarkerFillStyle:Jx,uiFont:Kk,spiderSeriesFillStyle:Yx,spiderWebStyle:AM,spiderAxisStyle:AM,spiderAxisNibStyle:FM,spiderSeriesStrokeStyle:MM,spiderScaleLabelFillStyle:$x,spiderScaleLabelFont:Qk,spiderAxisLabelFillStyle:Qx,spiderAxisLabelFont:Qk,sliceChartRadialFillStylePalette:hA,sliceChartStackedFillStylePalette:hA,sliceLabelFillStyle:tM,sliceLabelConnectorStyle:LM,gaugeSliceFillStyle:Wx,gaugeBackgroundFillStyle:Ux,gaugeBackgroundStrokeStyle:XM,chartXYZoomingRectangleStrokeStyle:PM,chartXYFittingRectangleStrokeStyle:OM,mapChartFillStyle:Ix,mapChartStrokeStyle:Ox,mapChartOutlierRegionFillStyle:Px,mapChartOutlierRegionStrokeStyle:Dx,mapChartSeparateRegionFillStyle:_x,mapChartSeparateRegionStrokeStyle:Rx,axisLabelFillStyle:iM,axisLabelFont:Qk,axisStyle:IM,axisOverlayStyle:Xx,numericTickStrategy:mA,dateTimeTickStrategy:bA,timeTickStrategy:gA,axisNibStyle:ZM,axisNibOverlayStyle:nM,customTickGridStrokeStyle:kM,customTickMarkerFont:yA.getLabelFont(),customTickPointerLength:yA.getTickLength(),bandFillStyle:eM,constantLineStrokeStyle:KM,seriesFillStyle:zx,seriesStrokeStyle:rA,seriesPointFillStyle:rM,seriesStrokeStyle3D:dA,seriesTriangulatedPointStyle3D:cA,seriesNonTriangulatedPointStyle3D:lA,mountainsStrokeStyle:qM,mountainsFillStyle:sM,mountainsInvertedStrokeStyle:JM,mountainsInvertedFillStyle:oM,candleStickStyle:xM,candleStickStyleHighlight:xM.getDefaultHighlightStyle(),boxFigureStyle:hM,pointMarkerStrokeStyle:QM,pointMarkerHorizontalGridStrokeStyle:$M,pointMarkerVerticalGridStrokeStyle:tA,customTickMarkerFillStyle:uM,customTickMarkerTextFillStyle:aM,customTickMarkerStrokeStyle:iA,pointMarkerTextFillStyle:fM,resultTableFillStyle:cM,resultTableStrokeStyle:nA,resultTableTextFillStyle:lM,uiBackgroundFillStyle:dM,uiBackgroundStrokeStyle:eA,uiTextFillStyle:vM,uiButtonFillStyle:yM,uiButtonSize:12,axesStyles3D:aA,boundingBoxStyle3D:fA,surfaceSeriesFillStyle:SM,boxSeriesFillStyle:mM,onScreenMenuButtonBackgroundColor:yM.getColor(),onScreenMenuButtonIconSet:qh,polarRadialAxisTickStyle:yA,polarRadialAxisStyle:sA,polarRadialAxisTitleStyle:bM,polarAmplitudeAxisStyle:oA,polarAmplitudeAxisTitleStyle:gM,heatmapFillStyle:undefined,heatmapWireframeStyle:undefined,heatmapGridSeriesFillStyle:wA,heatmapGridSeriesWireframeStyle:pA,rectangleSeriesStrokeStyle:ir,polygonSeriesStrokeStyle:ir},xA=new sh({size:16}),MA=new sh({size:16}),AA=new sh({size:16}),FA=new sh({size:15}),TA=new sh({size:11}),CA=new Ee({color:Fe("#071017")}),BA=new Ee({color:Fe("#8998B7")}),LA=new Ee({color:Fe("#182734")}),IA=new Ee({color:Fe("#03090F")}),OA=new Ee({color:Fe("#C9DFA4")}),PA=new Ee({color:Fe("#192847")}),DA=new Ee({color:Fe("#5C6D8F")}),_A=new Ee({color:Fe("#6E7E9E")}),RA=new Ee({color:Fe("#C8C8C8")}),zA=new Ee({color:Fe("#C9DFA44D")}),EA=new Ee({color:Fe("#071017")}),NA=new Ee({color:Fe("#071017CC")}),VA=new Ee({color:Fe("#9E9E9E")}),GA=new Ee({color:Fe("#4BCF6C")}),HA=new Ee({color:Ae(242,67,79)}),jA=new Ee({color:Fe("#ffffff")}),WA=new nr({fillStyle:new Ee(LA)}),UA=new nr({fillStyle:_A}),YA=new nr({fillStyle:RA}),XA=new nr({fillStyle:BA}),ZA=new nr({fillStyle:OA}),KA=new nr({fillStyle:PA}),qA=KA.setFillStyle((function(t){return t.setA(175)})),JA=KA.setFillStyle((function(t){return t.setA(85)})),QA=new nr({fillStyle:jA}),$A=new nr({fillStyle:VA}),tF=LA,iF=$A,nF=IA,eF=ir,rF=CA,sF=$A,oF=OA,hF=LA,uF=CA,aF=IA,fF=DA,cF=Re,lF=Re,dF=BA,vF=IA,yF=zA,SF=zA,mF=OA,bF=GA,gF=HA,wF=jA,pF=BA,kF=OA,xF=BA,MF=OA,AF=zA,FF=zA,TF=OA,CF=OA.setA(175),BF=_A.setA(175),LF=OA,IF=EA,OF=OA,PF=OA,DF=NA,_F=OA,RF=NA,zF=OA,EF=OA,NF=_A,VF=_A,GF=_A,HF=_A,jF=WA.setThickness(6).setHighlightThicknessMultiplier(1),WF=jF.setThickness(5),UF=$A.setThickness(1),YF=QA,XF=ZA,ZF=KA,KF=YA.setThickness(2),qF=ZA,JF=ZA,QF=ZA,$F=UA,tT=KA.setThickness(1),iT=UA,nT=UA,eT=ir,rT=ZA,sT=new nr({fillStyle:GA}),oT=sT.getDefaultHighlightStyle(),hT=new nr({fillStyle:HA}),uT=hT.getDefaultHighlightStyle(),aT=ir,fT=KA.setThickness(1),cT=ir,lT=ir,dT=ir,vT=ir,yT=ir,ST=ir,mT=ir,bT=ZA,gT=ZA,wT=UA,pT=ir,kT=$A,xT=$A,MT=ZA,AT=QA.setThickness(1),FT=QA.setThickness(1),TT=ZA,CT=ZA,BT=ZA,LT=or(ou.night,10),IT=new nr({thickness:1}),OT={x:IT.setFillStyle(RA),y:IT.setFillStyle(RA),z:IT.setFillStyle(RA)},PT=new nr({thickness:2,fillStyle:new Ee({color:Fe("#FFF")})}),DT=new ch.Triangulated({fillStyle:oF}),_T=new ch.Pixelated({fillStyle:oF}),RT=new nr({fillStyle:oF,thickness:5}),zT=new yh({gridStrokeLength:1,gridStrokeStyle:ir,tickStyle:qA.setThickness(1),tickLength:50,tickPadding:-14,labelFillStyle:OA}),ET=new yh({gridStrokeLength:1,gridStrokeStyle:qA.setThickness(1),tickLength:7,tickStyle:KA.setThickness(1),tickPadding:0,labelFont:FA,labelPadding:0,labelFillStyle:OA}),NT=new yh({gridStrokeLength:1,gridStrokeStyle:JA,tickLength:4,tickStyle:KA.setThickness(1),tickPadding:5,labelFont:TA,labelFillStyle:OA,labelPadding:0}),VT=new Eh({extremeTickStyle:mh,majorTickStyle:ET,minorTickStyle:NT}),GT=new Oh({greatTickStyle:zT,majorTickStyle:ET,minorTickStyle:NT}),HT=new Kh({majorTickStyle:ET,minorTickStyle:NT}),jT=Re,WT=XA,UT={lcjsBackgroundFillStyle:Re,lcjsBackgroundStrokeStyle:ir,dashboardBackgroundFillStyle:hF,dashboardBackgroundStrokeStyle:WF,dashboardSplitterStyle:jF,panelBackgroundFillStyle:uF,chartTitleFillStyle:mF,seriesBackgroundFillStyle:aF,panelBackgroundStrokeStyle:aT,chartTitleFont:xA,seriesBackgroundStrokeStyle:fT,sliceChartStrokeStyle:cT,sliceLabelFont:AA,chartXYZoomingRectangleFillStyle:cF,chartXYFittingRectangleFillStyle:lF,axisTitleFillStyle:fF,axisTitleFont:MA,bandStrokeStyle:eT,segmentSeriesStyle:rT,OHLCBarPositiveStyle:sT,OHLCBarPositiveHighlightStyle:oT,OHLCBarNegativeStyle:hT,OHLCBarNegativeHighlightStyle:uT,candleStickPositiveStyle:bF,candleStickPositiveStyleHighlight:bF.getDefaultHighlightStyle(),candleStickPositiveStrokeStyle:lT,candleStickPositiveStrokeStyleHighlight:dT,candleStickNegativeStyle:gF,candleStickNegativeStyleHighlight:gF.getDefaultHighlightStyle(),candleStickNegativeStrokeStyle:vT,candleStickNegativeStrokeStyleHighlight:yT,boxFigureStrokeStyle:JF,boxFigureLineStyle:qF,boxFigureMedianLineStyle:QF,pointMarkerFillStyle:wF,uiFont:xA,spiderSeriesFillStyle:yF,spiderWebStyle:ZF,spiderAxisStyle:ZF,spiderAxisNibStyle:KF,spiderSeriesStrokeStyle:XF,spiderScaleLabelFillStyle:kF,spiderScaleLabelFont:FA,spiderAxisLabelFillStyle:pF,spiderAxisLabelFont:FA,sliceChartRadialFillStylePalette:LT,sliceChartStackedFillStylePalette:LT,sliceLabelFillStyle:xF,sliceLabelConnectorStyle:$F,gaugeSliceFillStyle:dF,gaugeBackgroundFillStyle:vF,gaugeBackgroundStrokeStyle:ST,chartXYZoomingRectangleStrokeStyle:nT,chartXYFittingRectangleStrokeStyle:iT,mapChartFillStyle:tF,mapChartStrokeStyle:iF,mapChartOutlierRegionFillStyle:nF,mapChartOutlierRegionStrokeStyle:eF,mapChartSeparateRegionFillStyle:rF,mapChartSeparateRegionStrokeStyle:sF,axisLabelFillStyle:MF,axisLabelFont:FA,axisStyle:tT,axisOverlayStyle:SF,numericTickStrategy:VT,dateTimeTickStrategy:GT,timeTickStrategy:HT,axisNibStyle:mT,axisNibOverlayStyle:AF,customTickGridStrokeStyle:UF,customTickMarkerFont:ET.getLabelFont(),customTickPointerLength:ET.getTickLength(),bandFillStyle:FF,constantLineStrokeStyle:bT,seriesFillStyle:oF,seriesStrokeStyle:TT,seriesPointFillStyle:TF,seriesStrokeStyle3D:RT,seriesTriangulatedPointStyle3D:DT,seriesNonTriangulatedPointStyle3D:_T,mountainsStrokeStyle:gT,mountainsFillStyle:CF,mountainsInvertedStrokeStyle:wT,mountainsInvertedFillStyle:BF,candleStickStyle:YF,candleStickStyleHighlight:YF.getDefaultHighlightStyle(),boxFigureStyle:LF,pointMarkerStrokeStyle:pT,pointMarkerHorizontalGridStrokeStyle:kT,pointMarkerVerticalGridStrokeStyle:xT,customTickMarkerFillStyle:IF,customTickMarkerTextFillStyle:OF,customTickMarkerStrokeStyle:MT,pointMarkerTextFillStyle:PF,resultTableFillStyle:DF,resultTableStrokeStyle:AT,resultTableTextFillStyle:_F,uiBackgroundFillStyle:RF,uiBackgroundStrokeStyle:FT,uiTextFillStyle:zF,uiButtonFillStyle:EF,uiButtonSize:12,axesStyles3D:OT,boundingBoxStyle3D:PT,surfaceSeriesFillStyle:NF,boxSeriesFillStyle:VF,onScreenMenuButtonBackgroundColor:EF.getColor(),onScreenMenuButtonIconSet:Jh,polarRadialAxisTickStyle:ET,polarRadialAxisStyle:CT,polarRadialAxisTitleStyle:GF,polarAmplitudeAxisStyle:BT,polarAmplitudeAxisTitleStyle:HF,heatmapFillStyle:undefined,heatmapWireframeStyle:undefined,heatmapGridSeriesFillStyle:jT,heatmapGridSeriesWireframeStyle:WT,rectangleSeriesStrokeStyle:ir,polygonSeriesStrokeStyle:ir},YT=new sh({size:16}),XT=new sh({size:16}),ZT=new sh({size:16}),KT=new Ee({color:Fe("#ffffff")}),qT=new Ee({color:Ae(255,255,255,50)}),JT=new Ee({color:Ae(242,67,79)}),QT=new Ee({color:Ae(0,0,0)}),$T=new Ee({color:Ae(46,204,113)}),tC=new Ee({color:Fe("#371737")}),iC=new Ee({color:Fe("#684168")}),nC=new Ee({color:Fe("#270F27")}),eC=new Ee({color:Fe("#3F173F")}),rC=new Ee({color:Fe("#FFBFFF")}),sC=new Ee({color:Fe("#FF8FFF")}),oC=new Ee({color:Fe("#EC6FEC")}),hC=new Ee({color:Fe("#D160D1")}),uC=new Ee({color:Fe("#BA53A9")}),aC=new Ee({color:Fe("#A54488")}),fC=new Ee({color:Fe("#913D75")}),cC=new Ee({color:Fe("#7D376F")}),lC=new Ee({color:Fe("#672E67")}),dC=new Ee({color:Fe("#562756")}),vC=new Ee({color:Ae(54,54,54,.7)}),yC=new nr({fillStyle:nC,thickness:1}),SC=new nr({fillStyle:rC,thickness:1}),mC=rC,bC=yC,gC=QT,wC=ir,pC=tC,kC=SC,xC=new nr({fillStyle:QT,thickness:3}),MC=new nr({fillStyle:QT,thickness:3}),AC=new nr({fillStyle:QT,thickness:5}),FC=new nr({fillStyle:iC,thickness:6,highlightThicknessMultiplier:1}),TC=FC.setThickness(5),CC=new nr({fillStyle:KT,thickness:2}),BC=new nr({fillStyle:KT,thickness:2}),LC=new nr({fillStyle:sC,thickness:1}),IC=new sh({size:15}),OC=new sh({size:11}),PC=new nr({fillStyle:cC,thickness:1}),DC=new nr({fillStyle:sC,thickness:3}),_C=new nr({fillStyle:eC,thickness:1}),RC=new yh({gridStrokeLength:1,gridStrokeStyle:ir,tickStyle:new nr({thickness:2,fillStyle:new Ee({color:Ae(255,255,255,70)})}),tickLength:50,tickPadding:-14,labelFillStyle:rC}),zC=new yh({gridStrokeLength:1,gridStrokeStyle:PC,tickLength:7,tickStyle:new nr({thickness:1,fillStyle:sC}),tickPadding:0,labelFont:IC,labelPadding:0,labelFillStyle:rC}),EC=new yh({gridStrokeLength:1,gridStrokeStyle:_C,tickLength:4,tickStyle:new nr({fillStyle:sC,thickness:1}),tickPadding:5,labelFont:OC,labelFillStyle:rC,labelPadding:0}),NC=new Eh({extremeTickStyle:mh,majorTickStyle:zC,minorTickStyle:EC}),VC=new Oh({greatTickStyle:RC,majorTickStyle:zC,minorTickStyle:EC}),GC=new Kh({majorTickStyle:zC,minorTickStyle:EC}),HC=ir,jC=qT,WC=new nr({fillStyle:qT,thickness:5}),UC=new nr({fillStyle:dC,thickness:1}),YC=new nr({fillStyle:rC,thickness:2}),XC=qT,ZC=rC,KC=rC,qC=new nr({fillStyle:aC,thickness:2}),JC=new nr({fillStyle:aC,thickness:2}),QC=rC,$C=fC,tB=new nr({fillStyle:rC,thickness:1}),iB=new nr({fillStyle:KT,thickness:1}),nB=new nr({fillStyle:sC,thickness:1}),eB=new nr({fillStyle:rC,thickness:1}),rB=new nr({fillStyle:KT}),sB=hC,oB=cC,hB=new nr({fillStyle:oB}),uB=new nr({fillStyle:sB}),aB=new nr({fillStyle:rC}),fB=new nr({fillStyle:$T}),cB=fB.getDefaultHighlightStyle(),lB=new nr({fillStyle:JT}),dB=lB.getDefaultHighlightStyle(),vB=KT,yB=new nr,SB=[rC,sC,oC,hC,uC,aC,fC,cC,lC,dC],mB=function(t){return SB[t%SB.length]},bB=nC,gB=new nr({thickness:2}),wB={x:gB.setFillStyle(new Ee({color:Fe("#FFF")})),y:gB.setFillStyle(new Ee({color:Fe("#FFF")})),z:gB.setFillStyle(new Ee({color:Fe("#FFF")}))},pB=new nr({thickness:2,fillStyle:new Ee({color:Fe("#FFF")})}),kB=new ch.Triangulated({fillStyle:rC}),xB=new ch.Pixelated({fillStyle:rC}),MB=new nr({fillStyle:rC,thickness:5}),AB=rC.setA(30),FB=new nr({fillStyle:QT}),TB={lcjsBackgroundFillStyle:Re,lcjsBackgroundStrokeStyle:ir,dashboardBackgroundFillStyle:nC,dashboardBackgroundStrokeStyle:TC,dashboardSplitterStyle:FC,panelBackgroundFillStyle:tC,chartTitleFillStyle:KT,seriesBackgroundFillStyle:nC,panelBackgroundStrokeStyle:ir,chartTitleFont:YT,seriesBackgroundStrokeStyle:ir,sliceChartStrokeStyle:ir,sliceLabelFont:ZT,chartXYZoomingRectangleFillStyle:Re,chartXYFittingRectangleFillStyle:Re,axisTitleFillStyle:sC,axisTitleFont:XT,bandStrokeStyle:HC,segmentSeriesStyle:aB,OHLCBarPositiveStyle:fB,OHLCBarPositiveHighlightStyle:cB,OHLCBarNegativeStyle:lB,OHLCBarNegativeHighlightStyle:dB,candleStickPositiveStyle:$T,candleStickPositiveStyleHighlight:$T.getDefaultHighlightStyle(),candleStickPositiveStrokeStyle:ir,candleStickPositiveStrokeStyleHighlight:ir,candleStickNegativeStyle:JT,candleStickNegativeStyleHighlight:JT.getDefaultHighlightStyle(),candleStickNegativeStrokeStyle:ir,candleStickNegativeStrokeStyleHighlight:ir,boxFigureStrokeStyle:xC,boxFigureLineStyle:MC,boxFigureMedianLineStyle:AC,pointMarkerFillStyle:KT,uiFont:YT,spiderSeriesFillStyle:XC,spiderWebStyle:UC,spiderAxisStyle:UC,spiderAxisNibStyle:DC,spiderSeriesStrokeStyle:YC,spiderScaleLabelFillStyle:ZC,spiderScaleLabelFont:IC,spiderAxisLabelFillStyle:KC,spiderAxisLabelFont:IC,sliceChartRadialFillStylePalette:mB,sliceChartStackedFillStylePalette:mB,sliceLabelFillStyle:vB,sliceLabelConnectorStyle:yB,gaugeSliceFillStyle:aC,gaugeBackgroundFillStyle:bB,gaugeBackgroundStrokeStyle:ir,chartXYZoomingRectangleStrokeStyle:BC,chartXYFittingRectangleStrokeStyle:CC,axisLabelFillStyle:KT,axisLabelFont:IC,axisStyle:LC,axisOverlayStyle:qT,numericTickStrategy:NC,dateTimeTickStrategy:VC,timeTickStrategy:GC,axisNibStyle:ir,axisNibOverlayStyle:qT,customTickGridStrokeStyle:DC,customTickMarkerFont:zC.getLabelFont(),customTickPointerLength:zC.getTickLength(),bandFillStyle:jC,constantLineStrokeStyle:WC,seriesFillStyle:rC,seriesStrokeStyle:eB,seriesPointFillStyle:sC,seriesStrokeStyle3D:MB,seriesTriangulatedPointStyle3D:kB,seriesNonTriangulatedPointStyle3D:xB,mountainsStrokeStyle:hB,mountainsFillStyle:oB.setA(175),mountainsInvertedStrokeStyle:uB,mountainsInvertedFillStyle:sB.setA(175),candleStickStyle:rB,candleStickStyleHighlight:rB.getDefaultHighlightStyle(),boxFigureStyle:KT,pointMarkerStrokeStyle:ir,pointMarkerHorizontalGridStrokeStyle:nB,pointMarkerVerticalGridStrokeStyle:nB,customTickMarkerFillStyle:tC,customTickMarkerTextFillStyle:KT,customTickMarkerStrokeStyle:iB,pointMarkerTextFillStyle:KT,resultTableFillStyle:tC.setA(200),resultTableStrokeStyle:iB,resultTableTextFillStyle:rC,uiBackgroundFillStyle:tC,uiBackgroundStrokeStyle:tB,uiTextFillStyle:rC,uiButtonFillStyle:KT,uiButtonSize:12,axesStyles3D:wB,boundingBoxStyle3D:pB,surfaceSeriesFillStyle:rC,boxSeriesFillStyle:rC,onScreenMenuButtonBackgroundColor:vC.getColor(),onScreenMenuButtonIconSet:Jh,polarRadialAxisTickStyle:zC,polarRadialAxisStyle:qC,polarRadialAxisTitleStyle:QC,polarAmplitudeAxisStyle:JC,polarAmplitudeAxisTitleStyle:$C,heatmapFillStyle:undefined,heatmapWireframeStyle:undefined,heatmapGridSeriesFillStyle:AB,heatmapGridSeriesWireframeStyle:FB,mapChartFillStyle:mC,mapChartStrokeStyle:bC,mapChartOutlierRegionFillStyle:gC,mapChartOutlierRegionStrokeStyle:wC,mapChartSeparateRegionFillStyle:pC,mapChartSeparateRegionStrokeStyle:kC,rectangleSeriesStrokeStyle:ir,polygonSeriesStrokeStyle:ir},CB=new sh({size:16}),BB=new sh({size:16}),LB=new sh({size:16}),IB=new Ee({color:Ae(32,32,32)}),OB=new Ee({color:Ae(64,64,64)}),PB=new Ee({color:Fe("#ffffff")}),DB=new Ee({color:Fe("#fcfcfc")}),_B=new Ee({color:Ae(175,175,175)}),RB=new Ee({color:Ae(0,0,0,50)}),zB=new Ee({color:Ae(150,150,150)}),EB=new Ee({color:Ae(200,200,200)}),NB=new Ee({color:Ae(225,225,225)}),VB=new Ee({color:Ae(50,50,50)}),GB=new nr({fillStyle:IB,thickness:1}),HB=new Ee({color:Ae(0,0,0)}),jB=new Ee({color:Ae(46,204,113)}),WB=new Ee({color:Ae(242,67,79)}),UB=new Ee({color:Fe("#E06600")}),YB=new nr({fillStyle:PB,thickness:1}),XB=new Ee({color:Fe("#A50DE5")}),ZB=new Ee({color:Fe("#0D6BE5")}),KB=new Ee({color:Fe("#0DAAE5")}),qB=new Ee({color:Fe("#0DE5DE")}),JB=new Ee({color:Fe("#0DE594")}),QB=new Ee({color:Fe("#4DE50D")}),$B=new Ee({color:Fe("#E5C80D")}),tL=new Ee({color:Fe("#E5870D")}),iL=new Ee({color:Fe("#E50D1C")}),nL=new Ee({color:Fe("#E50D63")}),eL=new Ee({color:Ae(54,54,54,.7)}),rL=new Ee({color:Fe("#828281")}),sL=new Je({stops:[{offset:0,color:Fe("#E50D634D")},{offset:.1,color:Fe("#E5870D4D")},{offset:.3,color:Fe("#4DE50D4D")},{offset:.5,color:Fe("#0DE5DE4D")},{offset:.7,color:Fe("#0D6BE54D")},{offset:1,color:Fe("#A50DE54D")}]}),oL=new Qe({angle:90,stops:[{offset:0,color:Fe("#E50D63")},{offset:.1,color:Fe("#E5870D")},{offset:.3,color:Fe("#4DE50D")},{offset:.5,color:Fe("#0DE5DE")},{offset:.7,color:Fe("#0D6BE5")},{offset:1,color:Fe("#A50DE5")}]}),hL=new nr({fillStyle:ZB,thickness:1}),uL=new nr({fillStyle:XB,thickness:1}),aL=XB,fL=hL,cL=OB,lL=ir,dL=PB,vL=uL,yL=new nr({fillStyle:HB,thickness:3}),SL=new nr({fillStyle:HB,thickness:3}),mL=new nr({fillStyle:HB,thickness:5}),bL=new nr({fillStyle:OB,thickness:6,highlightThicknessMultiplier:1}),gL=new nr({fillStyle:zB,thickness:2}),wL=new nr({fillStyle:zB,thickness:2}),pL=new nr({fillStyle:zB,thickness:1}),kL=new sh({size:15}),xL=new sh({size:11}),ML=new nr({fillStyle:EB,thickness:1}),AL=new nr({fillStyle:OB,thickness:3}),FL=new yh({gridStrokeLength:1,gridStrokeStyle:ir,tickStyle:new nr({thickness:2,fillStyle:new Ee({color:Ae(0,0,0,70)})}),tickLength:50,tickPadding:-14,labelFillStyle:IB}),TL=new yh({gridStrokeLength:1,gridStrokeStyle:ML,tickLength:7,tickStyle:new nr({thickness:1,fillStyle:VB}),tickPadding:0,labelFont:kL,labelPadding:0,labelFillStyle:IB}),CL=new yh({gridStrokeLength:1,gridStrokeStyle:ML.setFillStyle(EB.setA(50)),tickLength:4,tickStyle:new nr({fillStyle:VB,thickness:1}),tickPadding:5,labelFont:xL,labelFillStyle:IB,labelPadding:0}),BL=new Eh({extremeTickStyle:mh,majorTickStyle:TL,minorTickStyle:CL}),LL=new Oh({greatTickStyle:FL,majorTickStyle:TL,minorTickStyle:CL}),IL=new Kh({majorTickStyle:TL,minorTickStyle:CL}),OL=ir,PL=RB,DL=new nr({fillStyle:RB,thickness:5}),_L=new nr({fillStyle:EB,thickness:2}),RL=new nr({fillStyle:rL,thickness:2}),zL=new nr({fillStyle:_B,thickness:2}),EL=new nr({fillStyle:EB,thickness:2}),NL=IB,VL=IB,GL=new nr({fillStyle:zB,thickness:1}),HL=GB,jL=GB,WL=new nr({fillStyle:zB,thickness:1}),UL=new nr({fillStyle:UB,thickness:1}),YL=new nr({fillStyle:new Ee({color:Fe("#575757")})}),XL=tL,ZL=nL,KL=new nr({fillStyle:ZL}),qL=new nr({fillStyle:XL}),JL=new nr({fillStyle:UB}),QL=new nr({fillStyle:jB}),$L=QL.getDefaultHighlightStyle(),tI=new nr({fillStyle:WB}),iI=tI.getDefaultHighlightStyle(),nI=new nr,eI=new Ee({color:Fe("#F4F4F4")}),rI=new nr({thickness:1}),sI={x:rI.setFillStyle(IB),y:rI.setFillStyle(IB),z:rI.setFillStyle(IB)},oI=new nr({thickness:1,fillStyle:new Ee({color:Fe("#000")})}),hI=new ch.Triangulated({fillStyle:UB}),uI=new ch.Pixelated({fillStyle:UB}),aI=new nr({fillStyle:UB,thickness:5}),fI=[XB,ZB,KB,qB,JB,QB,$B,tL,iL,nL],cI=function(t){return fI[t%fI.length]},lI=XB.setA(30),dI=YB,vI={lcjsBackgroundFillStyle:Re,lcjsBackgroundStrokeStyle:ir,dashboardBackgroundFillStyle:PB,dashboardBackgroundStrokeStyle:ir,dashboardSplitterStyle:bL.setFillStyle(NB),panelBackgroundFillStyle:PB,chartTitleFillStyle:OB,seriesBackgroundFillStyle:DB,panelBackgroundStrokeStyle:ir,chartTitleFont:CB,seriesBackgroundStrokeStyle:new nr({fillStyle:zB,thickness:1}),sliceChartStrokeStyle:YB,sliceLabelFont:LB,chartXYZoomingRectangleFillStyle:Re,chartXYFittingRectangleFillStyle:Re,axisTitleFont:BB,bandStrokeStyle:OL,segmentSeriesStyle:JL,OHLCBarPositiveStyle:QL,OHLCBarPositiveHighlightStyle:$L,OHLCBarNegativeStyle:tI,OHLCBarNegativeHighlightStyle:iI,candleStickPositiveStyle:jB,candleStickPositiveStyleHighlight:jB.getDefaultHighlightStyle(),candleStickPositiveStrokeStyle:ir,candleStickPositiveStrokeStyleHighlight:ir,candleStickNegativeStyle:WB,candleStickNegativeStyleHighlight:WB.getDefaultHighlightStyle(),candleStickNegativeStrokeStyle:ir,candleStickNegativeStrokeStyleHighlight:ir,boxFigureStrokeStyle:yL,boxFigureLineStyle:SL,boxFigureMedianLineStyle:mL,pointMarkerFillStyle:PB,uiFont:CB,spiderSeriesFillStyle:sL,spiderWebStyle:_L,spiderAxisStyle:_L,spiderAxisNibStyle:new nr({fillStyle:rL,thickness:2}),spiderSeriesStrokeStyle:RL,spiderScaleLabelFillStyle:OB,spiderScaleLabelFont:kL,spiderAxisLabelFillStyle:OB,spiderAxisLabelFont:kL,sliceChartRadialFillStylePalette:cI,sliceChartStackedFillStylePalette:cI,sliceLabelFillStyle:OB,sliceLabelConnectorStyle:nI.setFillStyle(OB),gaugeSliceFillStyle:oL,gaugeBackgroundFillStyle:eI,gaugeBackgroundStrokeStyle:ir,chartXYZoomingRectangleStrokeStyle:wL,chartXYFittingRectangleStrokeStyle:gL,axisTitleFillStyle:zB,axisLabelFillStyle:OB,axisLabelFont:kL,axisStyle:pL.setFillStyle(EB),axisOverlayStyle:zB.setA(80),numericTickStrategy:BL,dateTimeTickStrategy:LL,timeTickStrategy:IL,axisNibStyle:ir,axisNibOverlayStyle:EB.setA(80),customTickGridStrokeStyle:AL,customTickMarkerFont:TL.getLabelFont(),customTickPointerLength:TL.getTickLength(),bandFillStyle:PL,constantLineStrokeStyle:DL,seriesFillStyle:UB,seriesStrokeStyle:UL,seriesPointFillStyle:rL,seriesStrokeStyle3D:aI,seriesTriangulatedPointStyle3D:hI,seriesNonTriangulatedPointStyle3D:uI,mountainsStrokeStyle:KL,mountainsFillStyle:ZL.setA(175),mountainsInvertedStrokeStyle:qL,mountainsInvertedFillStyle:XL.setA(175),candleStickStyle:YL,candleStickStyleHighlight:YL.getDefaultHighlightStyle(),boxFigureStyle:UB,pointMarkerStrokeStyle:jL,pointMarkerHorizontalGridStrokeStyle:WL,pointMarkerVerticalGridStrokeStyle:WL,customTickMarkerFillStyle:PB,customTickMarkerTextFillStyle:IB,customTickMarkerStrokeStyle:GB,pointMarkerTextFillStyle:OB,resultTableFillStyle:PB.setA(200),resultTableStrokeStyle:HL,resultTableTextFillStyle:OB,uiBackgroundFillStyle:NB,uiBackgroundStrokeStyle:GL,uiTextFillStyle:OB,uiButtonFillStyle:OB,uiButtonSize:12,axesStyles3D:sI,boundingBoxStyle3D:oI,boxSeriesFillStyle:UB,onScreenMenuButtonBackgroundColor:eL.getColor(),onScreenMenuButtonIconSet:Jh,surfaceSeriesFillStyle:UB,polarRadialAxisTickStyle:TL,polarRadialAxisStyle:zL,polarRadialAxisTitleStyle:NL,polarAmplitudeAxisStyle:EL,polarAmplitudeAxisTitleStyle:VL,heatmapFillStyle:undefined,heatmapWireframeStyle:undefined,heatmapGridSeriesFillStyle:lI,heatmapGridSeriesWireframeStyle:dI,mapChartFillStyle:aL,mapChartStrokeStyle:fL,mapChartOutlierRegionFillStyle:cL,mapChartOutlierRegionStrokeStyle:lL,mapChartSeparateRegionFillStyle:dL,mapChartSeparateRegionStrokeStyle:vL,rectangleSeriesStrokeStyle:ir,polygonSeriesStrokeStyle:ir},yI=new sh({size:16}),SI=new sh({size:16}),mI=new sh({size:16}),bI=new Ee({color:Fe("#ffffff")}),gI=new Ee({color:Ae(255,255,255,50)}),wI=new Ee({color:Ae(242,67,79)}),pI=new Ee({color:Ae(0,0,0)}),kI=new Ee({color:Ae(46,204,113)}),xI=new Ee({color:Fe("#700000")}),MI=new Ee({color:Fe("#B22525")}),AI=new Ee({color:Fe("#400000")}),FI=new Ee({color:Fe("#C1363640")}),TI=new Ee({color:Fe("#FFDCDC")}),CI=new Ee({color:Fe("#FFA8A8")}),BI=new Ee({color:Fe("#F88686")}),LI=new Ee({color:Fe("#F56F6F")}),II=new Ee({color:Fe("#EE5F5F")}),OI=new Ee({color:Fe("#DC5656")}),PI=new Ee({color:Fe("#CE4848")}),DI=new Ee({color:Fe("#C13636")}),_I=new Ee({color:Fe("#B22020")}),RI=new Ee({color:Fe("#9F0E0E")}),zI=new Ee({color:Ae(54,54,54,.7)}),EI=new nr({fillStyle:AI,thickness:1}),NI=new nr({fillStyle:TI,thickness:1}),VI=new nr({fillStyle:bI}),GI=TI,HI=EI,jI=pI,WI=NI,UI=xI,YI=VI,XI=new nr({fillStyle:pI,thickness:3}),ZI=new nr({fillStyle:pI,thickness:3}),KI=new nr({fillStyle:pI,thickness:5}),qI=new nr({fillStyle:MI,thickness:6,highlightThicknessMultiplier:1}),JI=qI.setThickness(5),QI=new nr({fillStyle:bI,thickness:2}),$I=new nr({fillStyle:bI,thickness:2}),tO=new nr({fillStyle:CI,thickness:1}),iO=new sh({size:15}),nO=new sh({size:11}),eO=new nr({fillStyle:DI,thickness:1}),rO=new nr({fillStyle:CI,thickness:3}),sO=new nr({fillStyle:FI,thickness:1}),oO=new yh({gridStrokeLength:1,gridStrokeStyle:ir,tickStyle:new nr({thickness:2,fillStyle:new Ee({color:Ae(255,255,255,70)})}),tickLength:50,tickPadding:-14,labelFillStyle:TI}),hO=new yh({gridStrokeLength:1,gridStrokeStyle:eO,tickLength:7,tickStyle:new nr({thickness:1,fillStyle:CI}),tickPadding:0,labelFont:iO,labelPadding:0,labelFillStyle:TI}),uO=new yh({gridStrokeLength:1,gridStrokeStyle:sO,tickLength:4,tickStyle:new nr({fillStyle:CI,thickness:1}),tickPadding:5,labelFont:nO,labelFillStyle:TI,labelPadding:0}),aO=new Eh({extremeTickStyle:mh,majorTickStyle:hO,minorTickStyle:uO}),fO=new Oh({greatTickStyle:oO,majorTickStyle:hO,minorTickStyle:uO}),cO=new Kh({majorTickStyle:hO,minorTickStyle:uO}),lO=ir,dO=gI,vO=new nr({fillStyle:gI,thickness:5}),yO=new nr({fillStyle:RI,thickness:1}),SO=new nr({fillStyle:TI,thickness:2}),mO=gI,bO=TI,gO=TI,wO=new nr({fillStyle:OI,thickness:2}),pO=new nr({fillStyle:OI,thickness:2}),kO=TI,xO=DI,MO=new nr({fillStyle:TI,thickness:1}),AO=new nr({fillStyle:bI,thickness:1}),FO=new nr({fillStyle:CI,thickness:1}),TO=new nr({fillStyle:TI,thickness:1}),CO=new nr({fillStyle:bI}),BO=LI,LO=_I,IO=new nr({fillStyle:LO}),OO=new nr({fillStyle:BO}),PO=new nr({fillStyle:TI}),DO=new nr({fillStyle:kI}),_O=DO.getDefaultHighlightStyle(),RO=new nr({fillStyle:wI}),zO=RO.getDefaultHighlightStyle(),EO=bI,NO=new nr,VO=[TI,CI,BI,LI,II,OI,PI,DI,_I,RI],GO=function(t){return VO[t%VO.length]},HO=AI,jO=new nr({thickness:2}),WO={x:jO.setFillStyle(new Ee({color:Fe("#FFF")})),y:jO.setFillStyle(new Ee({color:Fe("#FFF")})),z:jO.setFillStyle(new Ee({color:Fe("#FFF")}))},UO=new nr({thickness:2,fillStyle:new Ee({color:Fe("#FFF")})}),YO=new ch.Triangulated({fillStyle:TI}),XO=new ch.Pixelated({fillStyle:TI}),ZO=new nr({fillStyle:TI,thickness:5}),KO=Re,qO=new nr({fillStyle:pI}),JO={lcjsBackgroundFillStyle:Re,lcjsBackgroundStrokeStyle:ir,dashboardBackgroundFillStyle:AI,dashboardBackgroundStrokeStyle:JI,dashboardSplitterStyle:qI,panelBackgroundFillStyle:xI,chartTitleFillStyle:bI,seriesBackgroundFillStyle:AI,panelBackgroundStrokeStyle:ir,chartTitleFont:yI,seriesBackgroundStrokeStyle:ir,sliceChartStrokeStyle:ir,sliceLabelFont:mI,chartXYZoomingRectangleFillStyle:Re,chartXYFittingRectangleFillStyle:Re,axisTitleFillStyle:CI,axisTitleFont:SI,bandStrokeStyle:lO,segmentSeriesStyle:PO,OHLCBarPositiveStyle:DO,OHLCBarPositiveHighlightStyle:_O,OHLCBarNegativeStyle:RO,OHLCBarNegativeHighlightStyle:zO,candleStickPositiveStyle:kI,candleStickPositiveStyleHighlight:kI.getDefaultHighlightStyle(),candleStickPositiveStrokeStyle:ir,candleStickPositiveStrokeStyleHighlight:ir,candleStickNegativeStyle:wI,candleStickNegativeStyleHighlight:wI.getDefaultHighlightStyle(),candleStickNegativeStrokeStyle:ir,candleStickNegativeStrokeStyleHighlight:ir,boxFigureStrokeStyle:XI,boxFigureLineStyle:ZI,boxFigureMedianLineStyle:KI,pointMarkerFillStyle:bI,uiFont:yI,spiderSeriesFillStyle:mO,spiderWebStyle:yO,spiderAxisStyle:yO,spiderAxisNibStyle:rO,spiderSeriesStrokeStyle:SO,spiderScaleLabelFillStyle:bO,spiderScaleLabelFont:iO,spiderAxisLabelFillStyle:gO,spiderAxisLabelFont:iO,sliceChartRadialFillStylePalette:GO,sliceChartStackedFillStylePalette:GO,sliceLabelFillStyle:EO,sliceLabelConnectorStyle:NO,gaugeSliceFillStyle:OI,gaugeBackgroundFillStyle:HO,gaugeBackgroundStrokeStyle:ir,chartXYZoomingRectangleStrokeStyle:$I,chartXYFittingRectangleStrokeStyle:QI,axisLabelFillStyle:bI,axisLabelFont:iO,axisStyle:tO,axisOverlayStyle:gI,numericTickStrategy:aO,dateTimeTickStrategy:fO,timeTickStrategy:cO,axisNibStyle:ir,axisNibOverlayStyle:gI,customTickGridStrokeStyle:rO,customTickMarkerFont:hO.getLabelFont(),customTickPointerLength:hO.getTickLength(),bandFillStyle:dO,constantLineStrokeStyle:vO,seriesFillStyle:TI,seriesStrokeStyle:TO,seriesPointFillStyle:CI,seriesStrokeStyle3D:ZO,seriesTriangulatedPointStyle3D:YO,seriesNonTriangulatedPointStyle3D:XO,mountainsStrokeStyle:IO,mountainsFillStyle:LO.setA(175),mountainsInvertedStrokeStyle:OO,mountainsInvertedFillStyle:BO.setA(175),candleStickStyle:CO,candleStickStyleHighlight:CO.getDefaultHighlightStyle(),boxFigureStyle:bI,pointMarkerStrokeStyle:ir,pointMarkerHorizontalGridStrokeStyle:FO,pointMarkerVerticalGridStrokeStyle:FO,customTickMarkerFillStyle:xI,customTickMarkerTextFillStyle:bI,customTickMarkerStrokeStyle:AO,pointMarkerTextFillStyle:bI,resultTableFillStyle:xI.setA(200),resultTableStrokeStyle:AO,resultTableTextFillStyle:TI,uiBackgroundFillStyle:xI,uiBackgroundStrokeStyle:MO,uiTextFillStyle:TI,uiButtonFillStyle:bI,uiButtonSize:12,axesStyles3D:WO,boundingBoxStyle3D:UO,surfaceSeriesFillStyle:TI,boxSeriesFillStyle:TI,onScreenMenuButtonBackgroundColor:zI.getColor(),onScreenMenuButtonIconSet:Jh,polarRadialAxisTickStyle:hO,polarRadialAxisStyle:wO,polarRadialAxisTitleStyle:kO,polarAmplitudeAxisStyle:pO,polarAmplitudeAxisTitleStyle:xO,heatmapFillStyle:undefined,heatmapWireframeStyle:undefined,heatmapGridSeriesFillStyle:KO,heatmapGridSeriesWireframeStyle:qO,mapChartFillStyle:GI,mapChartStrokeStyle:HI,mapChartOutlierRegionFillStyle:jI,mapChartOutlierRegionStrokeStyle:WI,mapChartSeparateRegionFillStyle:UI,mapChartSeparateRegionStrokeStyle:YI,rectangleSeriesStrokeStyle:ir,polygonSeriesStrokeStyle:ir},QO=new sh({size:16}),$O=new sh({size:16}),tP=new sh({size:16}),iP=new sh({size:15}),nP=new sh({size:11}),eP=new Ee({color:Fe("#8D0018")}),rP=new Ee({color:Fe("#360011")}),sP=new Ee({color:Fe("#CF5D1B")}),oP=new Ee({color:Fe("#21000A")}),hP=new Ee({color:Fe("#E1DC49")}),uP=new Ee({color:Fe("#AB001D")}),aP=new Ee({color:Fe("#FFFA67")}),fP=new Ee({color:Fe("#BF6D0F")}),cP=new Ee({color:Fe("#A1A1A1")}),lP=new Ee({color:Fe("#E1DC494D")}),dP=new Ee({color:Fe("#CF5D1B4D")}),vP=new Ee({color:Fe("#360011CC")}),yP=new Ee({color:Ae(242,67,79)}),SP=new Ee({color:Fe("#4BCF6C")}),mP=new Ee({color:Fe("#ffffff")}),bP=new Ee({color:Fe("#AB001D").setA(110)}),gP=new nr({fillStyle:eP}),wP=new nr({fillStyle:uP}),pP=new nr({fillStyle:aP}),kP=new nr({fillStyle:oP}),xP=new nr({fillStyle:cP}),MP=new nr({fillStyle:hP}),AP=new nr({fillStyle:sP}),FP=new nr({fillStyle:mP}),TP=new nr({fillStyle:SP}),CP=new nr({fillStyle:yP}),BP=new nr({fillStyle:bP}),LP=new nr({fillStyle:bP.setA(40)}),IP=uP,OP=kP,PP=sP,DP=ir,_P=rP,RP=gP,zP=hP,EP=eP,NP=rP,VP=oP,GP=sP,HP=Re,jP=Re,WP=sP,UP=oP,YP=lP,XP=lP,ZP=hP,KP=SP,qP=yP,JP=mP,QP=sP,$P=hP,tD=sP,iD=hP,nD=lP,eD=lP,rD=hP,sD=lP,oD=dP,hD=hP,uD=rP,aD=hP,fD=hP,cD=vP,lD=hP,dD=vP,vD=fP,yD=hP,SD=hP,mD=hP,bD=hP,gD=hP,wD=gP.setThickness(6).setHighlightThicknessMultiplier(1),pD=wD.setThickness(5),kD=pP.setThickness(1),xD=FP,MD=MP,AD=wP,FD=MP.setThickness(2),TD=MP,CD=MP,BD=MP,LD=xP,ID=wP.setThickness(1),OD=wP,PD=wP,DD=ir,_D=MP,RD=TP,zD=RD.getDefaultHighlightStyle(),ED=CP,ND=ED.getDefaultHighlightStyle(),VD=ir,GD=wP.setThickness(1),HD=ir,jD=ir,WD=ir,UD=ir,YD=ir,XD=ir,ZD=ir,KD=MP,qD=MP,JD=AP,QD=ir,$D=pP.setThickness(1),t_=pP.setThickness(1),i_=MP.setThickness(1),n_=FP.setThickness(1),e_=FP.setThickness(1),r_=MP,s_=MP,o_=MP,h_=or(ou.sunset2,10),u_=new nr({thickness:1}),a_={x:u_.setFillStyle(uP),y:u_.setFillStyle(uP),z:u_.setFillStyle(uP)},f_=new nr({thickness:2,fillStyle:uP}),c_=new ch.Triangulated({fillStyle:zP}),l_=new ch.Pixelated({fillStyle:zP}),d_=new nr({fillStyle:zP,thickness:5}),v_=new yh({gridStrokeLength:1,gridStrokeStyle:ir,tickStyle:BP.setThickness(1),tickLength:50,tickPadding:-14,labelFillStyle:hP}),y_=new yh({gridStrokeLength:1,gridStrokeStyle:BP.setThickness(1),tickLength:7,tickStyle:wP.setThickness(1),tickPadding:0,labelFont:iP,labelPadding:0,labelFillStyle:hP}),S_=new yh({gridStrokeLength:1,gridStrokeStyle:LP.setThickness(1),tickLength:4,tickStyle:wP.setThickness(1),tickPadding:5,labelFont:nP,labelFillStyle:hP,labelPadding:0}),m_=new Eh({extremeTickStyle:mh,majorTickStyle:y_,minorTickStyle:S_}),b_=new Oh({greatTickStyle:v_,majorTickStyle:y_,minorTickStyle:S_}),g_=new Kh({majorTickStyle:y_,minorTickStyle:S_}),w_=Re,p_=pP,k_={lcjsBackgroundFillStyle:Re,lcjsBackgroundStrokeStyle:ir,dashboardBackgroundFillStyle:EP,dashboardBackgroundStrokeStyle:pD,dashboardSplitterStyle:wD,panelBackgroundFillStyle:NP,chartTitleFillStyle:ZP,seriesBackgroundFillStyle:VP,panelBackgroundStrokeStyle:VD,chartTitleFont:QO,seriesBackgroundStrokeStyle:GD,sliceChartStrokeStyle:HD,sliceLabelFont:tP,chartXYZoomingRectangleFillStyle:HP,chartXYFittingRectangleFillStyle:jP,axisTitleFillStyle:GP,axisTitleFont:$O,bandStrokeStyle:DD,segmentSeriesStyle:_D,OHLCBarPositiveStyle:RD,OHLCBarPositiveHighlightStyle:zD,OHLCBarNegativeStyle:ED,OHLCBarNegativeHighlightStyle:ND,candleStickPositiveStyle:KP,candleStickPositiveStyleHighlight:KP.getDefaultHighlightStyle(),candleStickPositiveStrokeStyle:jD,candleStickPositiveStrokeStyleHighlight:WD,candleStickNegativeStyle:qP,candleStickNegativeStyleHighlight:qP.getDefaultHighlightStyle(),candleStickNegativeStrokeStyle:UD,candleStickNegativeStrokeStyleHighlight:YD,boxFigureStrokeStyle:CD,boxFigureLineStyle:TD,boxFigureMedianLineStyle:BD,pointMarkerFillStyle:JP,uiFont:QO,spiderSeriesFillStyle:YP,spiderWebStyle:AD,spiderAxisStyle:AD,spiderAxisNibStyle:FD,spiderSeriesStrokeStyle:MD,spiderScaleLabelFillStyle:$P,spiderScaleLabelFont:iP,spiderAxisLabelFillStyle:QP,spiderAxisLabelFont:iP,sliceChartRadialFillStylePalette:h_,sliceChartStackedFillStylePalette:h_,sliceLabelFillStyle:tD,sliceLabelConnectorStyle:LD,gaugeSliceFillStyle:WP,gaugeBackgroundFillStyle:UP,gaugeBackgroundStrokeStyle:XD,chartXYZoomingRectangleStrokeStyle:PD,chartXYFittingRectangleStrokeStyle:OD,mapChartFillStyle:IP,mapChartStrokeStyle:OP,mapChartOutlierRegionFillStyle:PP,mapChartOutlierRegionStrokeStyle:DP,mapChartSeparateRegionFillStyle:_P,mapChartSeparateRegionStrokeStyle:RP,axisLabelFillStyle:iD,axisLabelFont:iP,axisStyle:ID,axisOverlayStyle:XP,numericTickStrategy:m_,dateTimeTickStrategy:b_,timeTickStrategy:g_,axisNibStyle:ZD,axisNibOverlayStyle:nD,customTickGridStrokeStyle:kD,customTickMarkerFont:y_.getLabelFont(),customTickPointerLength:y_.getTickLength(),bandFillStyle:eD,constantLineStrokeStyle:KD,seriesFillStyle:zP,seriesStrokeStyle:r_,seriesPointFillStyle:rD,seriesStrokeStyle3D:d_,seriesTriangulatedPointStyle3D:c_,seriesNonTriangulatedPointStyle3D:l_,mountainsStrokeStyle:qD,mountainsFillStyle:sD,mountainsInvertedStrokeStyle:JD,mountainsInvertedFillStyle:oD,candleStickStyle:xD,candleStickStyleHighlight:xD.getDefaultHighlightStyle(),boxFigureStyle:hD,pointMarkerStrokeStyle:QD,pointMarkerHorizontalGridStrokeStyle:$D,pointMarkerVerticalGridStrokeStyle:t_,customTickMarkerFillStyle:uD,customTickMarkerTextFillStyle:aD,customTickMarkerStrokeStyle:i_,pointMarkerTextFillStyle:fD,resultTableFillStyle:cD,resultTableStrokeStyle:n_,resultTableTextFillStyle:lD,uiBackgroundFillStyle:dD,uiBackgroundStrokeStyle:e_,uiTextFillStyle:vD,uiButtonFillStyle:yD,uiButtonSize:12,axesStyles3D:a_,boundingBoxStyle3D:f_,surfaceSeriesFillStyle:SD,boxSeriesFillStyle:mD,onScreenMenuButtonBackgroundColor:yD.getColor(),onScreenMenuButtonIconSet:Jh,polarRadialAxisTickStyle:y_,polarRadialAxisStyle:s_,polarRadialAxisTitleStyle:bD,polarAmplitudeAxisStyle:o_,polarAmplitudeAxisTitleStyle:gD,heatmapFillStyle:undefined,heatmapWireframeStyle:undefined,heatmapGridSeriesFillStyle:w_,heatmapGridSeriesWireframeStyle:p_,rectangleSeriesStrokeStyle:ir,polygonSeriesStrokeStyle:ir},x_=function(t,i){this.ur=t,this.ar=i,this.cr=i.rows*yz,this.lr=i.columns*Sz};t.OnScreenMenuButtonType=void 0,($h=t.OnScreenMenuButtonType||(t.OnScreenMenuButtonType={}))[$h.ZoomIn=0]="ZoomIn",$h[$h.ZoomInX=1]="ZoomInX",$h[$h.ZoomInY=2]="ZoomInY",$h[$h.ZoomOut=3]="ZoomOut",$h[$h.ZoomOutX=4]="ZoomOutX",$h[$h.ZoomOutY=5]="ZoomOutY",$h[$h.ZoomToFit=6]="ZoomToFit",$h[$h.ToggleAnimations=7]="ToggleAnimations",t.OnScreenMenuButtonShape=void 0,(tu=t.OnScreenMenuButtonShape||(t.OnScreenMenuButtonShape={}))[tu.Circle=0]="Circle",tu[tu.Rectangle=1]="Rectangle",tu[tu.RoundedRectangle=2]="RoundedRectangle";var M_,A_=function(i){function e(t,n,e,r){var s=i.call(this,t,e)||this;return s.dr=n,s.vr=r,s.yr=wr.document.createElement("button"),s.Sr=wr.document.createElement("div"),s.mr=wr.document.createElement("label"),s.ar=e,s}return n(e,i),e.prototype.br=function(t,i,n,e){this.gr(t,e),this.wr(),this.pr(i),this.kr(),this.mr.textContent=n||"";var r=wr.document.createElement("div");this.Mr(r),this.yr.onclick=this.onClick.bind(this),r.appendChild(this.Sr),r.appendChild(this.mr),this.yr.appendChild(r)},e.prototype.kr=function(){this.yr.style.cursor="pointer"},e.prototype.Mr=function(t){t.style.display="flex",t.style.justifyContent="center",t.style.alignContent="center",t.style.flexDirection="column"},e.prototype.pr=function(t){"string"==typeof t?(this.Sr.style.backgroundImage="url("+t+")",this.Sr.style.backgroundSize="100%",this.Sr.style.backgroundRepeat="no-repeat",this.Sr.style.backgroundPosition="center",this.Sr.style.width="20px",this.Sr.style.height="20px"):this.applyStyleForSprite(t),this.Sr.style.margin="auto"},e.prototype.wr=function(){switch(this.dr){case t.OnScreenMenuButtonShape.RoundedRectangle:this.yr.style.borderRadius="10px";break;case t.OnScreenMenuButtonShape.Rectangle:this.yr.style.borderRadius="0px";break;case t.OnScreenMenuButtonShape.Circle:default:this.yr.style.borderRadius="31px"}},e.prototype.gr=function(t,i){this.yr.style.width=this.lr.toString()+"px",this.yr.style.height=this.cr.toString()+"px",this.yr.style.backgroundColor=t,this.yr.style.opacity=i||mz,this.yr.style.alignItems="center",this.yr.style.border="2px solid #707070",this.yr.style.transition="background-color .8s ease"},e.prototype.applyStyleForSprite=function(t){this.Sr.style.backgroundImage="url("+this.ur+"/"+bz+")",this.Sr.style.backgroundPositionX=t.x+"px",this.Sr.style.backgroundPositionY=t.y+"px",this.Sr.style.backgroundSize="1600%",this.Sr.style.backgroundRepeat="no-repeat",this.Sr.style.width="20px",this.Sr.style.height="20px"},e.prototype.Ar=function(t){return t.appendChild(this.yr),t},e.prototype.Fr=function(){return this.yr},e}(x_),F_=function(t){function i(i,n,e,r){var s=t.call(this,i,n,e,r)||this;return s.vr=r,s.Tr="",s.Cr="",s.Br=!1,s}return n(i,t),i.prototype.Lr=function(){this.Ir(),this.onToggledStateAction()},i.prototype.Or=function(){this.Pr(),this.onInitialStateAction()},i.prototype.Pr=function(){this.Dr(this.Tr)},i.prototype.Ir=function(){this.Dr(this.Cr)},i.prototype.Dr=function(t){"string"==typeof t?this.Sr.style.background=t:(this.Sr.style.backgroundImage="url("+this.ur+"/"+bz+")",this.Sr.style.backgroundPositionX=t.x+"px",this.Sr.style.backgroundPositionY=t.y+"px")},i.prototype.onClick=function(){this.Br?this.Or():this.Lr(),this.Br=!this.Br},i}(A_),T_=function(t){function i(i,n,e){var r=t.call(this,i,e,{rows:1,columns:1},n)||this;r.vr=n;var s=r.vr.getTheme();return r.br(s.onScreenMenuButtonBackgroundColor.toRGBAString(),s.onScreenMenuButtonIconSet.ZoomIn),r}return n(i,t),i.prototype.onClick=function(){var t=this.vr._r();t&&this.vr.zoom(t,{x:-1,y:-1})},i}(A_),C_=function(t){function i(i,n,e){var r=t.call(this,i,e,{rows:1,columns:1},n)||this;r.vr=n;var s=r.vr.getTheme();return r.br(s.onScreenMenuButtonBackgroundColor.toRGBAString(),s.onScreenMenuButtonIconSet.ZoomInX),r}return n(i,t),i.prototype.onClick=function(){var t=this.vr._r();t&&this.vr.zoom(t,{x:-1,y:0})},i}(A_),B_=function(t){function i(i,n,e){var r=t.call(this,i,e,{rows:1,columns:1},n)||this;r.vr=n;var s=r.vr.getTheme();return r.br(s.onScreenMenuButtonBackgroundColor.toRGBAString(),s.onScreenMenuButtonIconSet.ZoomInY),r}return n(i,t),i.prototype.onClick=function(){var t=this.vr._r();t&&this.vr.zoom(t,{x:0,y:-1})},i}(A_),L_=function(t){function i(i,n,e){var r=t.call(this,i,e,{rows:1,columns:1},n)||this;r.vr=n;var s=r.vr.getTheme();return r.br(s.onScreenMenuButtonBackgroundColor.toRGBAString(),s.onScreenMenuButtonIconSet.ZoomOut),r}return n(i,t),i.prototype.onClick=function(){var t=this.vr._r();t&&this.vr.zoom(t,{x:1,y:1})},i}(A_),I_=function(t){function i(i,n,e){var r=t.call(this,i,e,{rows:1,columns:1},n)||this;r.vr=n;var s=r.vr.getTheme();return r.br(s.onScreenMenuButtonBackgroundColor.toRGBAString(),s.onScreenMenuButtonIconSet.ZoomOutX),r}return n(i,t),i.prototype.onClick=function(){var t=this.vr._r();t&&this.vr.zoom(t,{x:1,y:0})},i}(A_),O_=function(t){function i(i,n,e){var r=t.call(this,i,e,{rows:1,columns:1},n)||this;r.vr=n;var s=r.vr.getTheme();return r.br(s.onScreenMenuButtonBackgroundColor.toRGBAString(),s.onScreenMenuButtonIconSet.ZoomOutY),r}return n(i,t),i.prototype.onClick=function(){var t=this.vr._r();t&&this.vr.zoom(t,{x:0,y:1})},i}(A_),P_=function(t){function i(i,n,e){var r=t.call(this,i,e,{rows:1,columns:1},n)||this;r.vr=n;var s=r.vr.getTheme();return r.Tr=s.onScreenMenuButtonIconSet.EnableAnimation,r.Cr=s.onScreenMenuButtonIconSet.DisableAnimation,r.br(s.onScreenMenuButtonBackgroundColor.toRGBAString(),r.Tr),r}return n(i,t),i.prototype.onToggledStateAction=function(){this.vr.setAnimationsEnabled(!1)},i.prototype.onInitialStateAction=function(){this.vr.setAnimationsEnabled(!0)},i}(F_),D_=function(t){function i(i,n,e){var r=t.call(this,i,e,{rows:1,columns:1},n)||this;r.vr=n;var s=r.vr.getTheme();return r.br(s.onScreenMenuButtonBackgroundColor.toRGBAString(),s.onScreenMenuButtonIconSet.ZoomToFit),r}return n(i,t),i.prototype.onClick=function(){this.vr.forEachAxis((function(t){t.fit(!0)}))},i}(A_),__=function(t){function i(i,n,e){var r=t.call(this,i,n.shape||gz,n.dimensions||{rows:1,columns:1},e)||this,s=e.getTheme(),o=n.color||s.onScreenMenuButtonBackgroundColor.toRGBAString(),h=n.icon||"",u=n.label||"",a=n.opacity||"";return r.br(o,h,u,a),r.Rr=n.action,r}return n(i,t),i.prototype.onClick=function(){this.Rr(this.vr)},i}(A_),R_=function(t){function i(i,n,e,r){var s=t.call(this,i,n,{rows:1,columns:1},e)||this;s.vr=e,s.zr=r;var o=e.getTheme();return s.Tr=o.onScreenMenuButtonIconSet.ShowMenu,s.Cr=o.onScreenMenuButtonIconSet.CollapseMenu,s.br(wz,s.Tr),s}return n(i,t),i.prototype.Pr=function(){this.Dr(this.Tr),this.yr.style.backgroundColor=wz,this.yr.style.border="2px solid #707070",this.yr.style.margin="0px"},i.prototype.Ir=function(){this.Dr(this.Cr),this.yr.style.background="#FECC00 0% 0% no-repeat padding-box",this.yr.style.border="10px solid #BCBCBC12",this.yr.style.margin="1px"},i.prototype.onToggledStateAction=function(){var t;null===(t=this.zr)||void 0===t||t.style.setProperty("display","block")},i.prototype.onInitialStateAction=function(){var t;null===(t=this.zr)||void 0===t||t.style.setProperty("display","none")},i}(F_),z_=new sh({size:16}),E_=new sh({size:16}),N_=new sh({size:16}),V_=new Ee({color:Fe("#ffffff")}),G_=new Ee({color:Ae(46,204,113)}),H_=new Ee({color:Ae(242,67,79)}),j_=new nr({fillStyle:V_,thickness:1}),W_=new Ee({color:Fe("#FFDCDC")}),U_=new Ee({color:Fe("#FFA8A8")}),Y_=new Ee({color:Fe("#F88686")}),X_=new Ee({color:Fe("#F56F6F")}),Z_=new Ee({color:Fe("#EE5F5F")}),K_=new Ee({color:Fe("#DC5656")}),q_=new Ee({color:Fe("#CE4848")}),J_=new Ee({color:Fe("#C13636")}),Q_=new Ee({color:Fe("#B22020")}),$_=new Ee({color:Fe("#9F0E0E")}),tR=new Ee({color:Fe("#FFA8A8")}),iR=new Ee({color:Fe("#EE5F5F50")}),nR=new nr({fillStyle:$_,thickness:1}),eR=new Ee({color:Ae(54,54,54,.7)}),rR=new nr({fillStyle:U_,thickness:1}),sR=W_,oR=rR,hR=iR,uR=ir,aR=V_,fR=rR,cR=new nr({fillStyle:$_,thickness:3}),lR=new nr({fillStyle:$_,thickness:3}),dR=new nr({fillStyle:$_,thickness:5}),vR=new nr({fillStyle:U_,thickness:6,highlightThicknessMultiplier:1}),yR=new nr({fillStyle:X_,thickness:2}),SR=new nr({fillStyle:X_,thickness:2}),mR=new nr({fillStyle:J_,thickness:1}),bR=new sh({size:15}),gR=new sh({size:11}),wR=new nr({fillStyle:Y_,thickness:3}),pR=new yh({gridStrokeLength:1,gridStrokeStyle:ir,tickStyle:new nr({thickness:2,fillStyle:new Ee(iR)}),tickLength:50,tickPadding:-14,labelFillStyle:$_}),kR=new yh({gridStrokeLength:1,gridStrokeStyle:new nr({fillStyle:Y_,thickness:1}),tickLength:7,tickStyle:new nr({fillStyle:$_,thickness:1}),tickPadding:0,labelFont:bR,labelPadding:0,labelFillStyle:$_}),xR=new yh({gridStrokeLength:1,gridStrokeStyle:new nr({fillStyle:new Ee({color:Fe("#fff0f0")}),thickness:1}),tickLength:4,tickStyle:new nr({fillStyle:$_,thickness:1}),tickPadding:5,labelFont:gR,labelFillStyle:$_,labelPadding:0}),MR=new Eh({extremeTickStyle:mh,majorTickStyle:kR,minorTickStyle:xR}),AR=new Oh({greatTickStyle:pR,majorTickStyle:kR,minorTickStyle:xR}),FR=new Kh({majorTickStyle:kR,minorTickStyle:xR}),TR=ir,CR=iR,BR=new nr({fillStyle:iR,thickness:5}),LR=new nr({fillStyle:$_,thickness:1}),IR=new nr({fillStyle:$_,thickness:2}),OR=$_.setA(80),PR=new nr({fillStyle:$_,thickness:2}),DR=new nr({fillStyle:$_,thickness:2}),_R=$_,RR=$_,zR=new nr({fillStyle:$_,thickness:1}),ER=nR,NR=nR,VR=new nr({fillStyle:$_,thickness:1}),GR=new nr({fillStyle:J_,thickness:1}),HR=new nr({fillStyle:J_}),jR=X_,WR=J_,UR=new nr({fillStyle:WR}),YR=new nr({fillStyle:jR}),XR=new nr({fillStyle:J_}),ZR=new nr({fillStyle:G_}),KR=ZR.getDefaultHighlightStyle(),qR=new nr({fillStyle:H_}),JR=qR.getDefaultHighlightStyle(),QR=new nr({fillStyle:Z_}),$R=W_,tz=new nr({thickness:2}),iz={x:tz.setFillStyle($_),y:tz.setFillStyle($_),z:tz.setFillStyle($_)},nz=new nr({thickness:2,fillStyle:new Ee($_)}),ez=new ch.Triangulated({fillStyle:J_}),rz=new ch.Pixelated({fillStyle:J_}),sz=new nr({fillStyle:J_,thickness:5}),oz=[W_,U_,Y_,X_,Z_,K_,q_,J_,Q_,$_],hz=function(t){return oz[t%oz.length]},uz=Re,az=new nr({fillStyle:G_}),fz={lcjsBackgroundFillStyle:Re,lcjsBackgroundStrokeStyle:ir,dashboardBackgroundFillStyle:V_,dashboardBackgroundStrokeStyle:ir,dashboardSplitterStyle:vR.setFillStyle(tR),panelBackgroundFillStyle:V_,chartTitleFillStyle:$_,seriesBackgroundFillStyle:V_,panelBackgroundStrokeStyle:ir,chartTitleFont:z_,seriesBackgroundStrokeStyle:new nr({fillStyle:J_,thickness:1}),sliceChartStrokeStyle:j_,sliceLabelFont:N_,chartXYZoomingRectangleFillStyle:Re,chartXYFittingRectangleFillStyle:Re,axisTitleFont:E_,bandStrokeStyle:TR,segmentSeriesStyle:XR,OHLCBarPositiveStyle:ZR,OHLCBarPositiveHighlightStyle:KR,OHLCBarNegativeStyle:qR,OHLCBarNegativeHighlightStyle:JR,candleStickPositiveStyle:G_,candleStickPositiveStyleHighlight:G_.getDefaultHighlightStyle(),candleStickPositiveStrokeStyle:ir,candleStickPositiveStrokeStyleHighlight:ir,candleStickNegativeStyle:H_,candleStickNegativeStyleHighlight:H_.getDefaultHighlightStyle(),candleStickNegativeStrokeStyle:ir,candleStickNegativeStrokeStyleHighlight:ir,boxFigureStrokeStyle:cR,boxFigureLineStyle:lR,boxFigureMedianLineStyle:dR,pointMarkerFillStyle:V_,uiFont:z_,spiderSeriesFillStyle:OR,spiderWebStyle:LR,spiderAxisStyle:LR,spiderAxisNibStyle:new nr({fillStyle:$_,thickness:2}),spiderSeriesStrokeStyle:IR,spiderScaleLabelFillStyle:$_,spiderScaleLabelFont:bR,spiderAxisLabelFillStyle:$_,spiderAxisLabelFont:bR,sliceChartRadialFillStylePalette:hz,sliceChartStackedFillStylePalette:hz,sliceLabelFillStyle:$_,sliceLabelConnectorStyle:QR,gaugeSliceFillStyle:J_,gaugeBackgroundFillStyle:$R,gaugeBackgroundStrokeStyle:ir,chartXYZoomingRectangleStrokeStyle:SR,chartXYFittingRectangleStrokeStyle:yR,axisTitleFillStyle:Z_,axisLabelFillStyle:Z_,axisLabelFont:bR,axisStyle:mR,axisOverlayStyle:Z_.setA(80),numericTickStrategy:MR,dateTimeTickStrategy:AR,timeTickStrategy:FR,axisNibStyle:ir,axisNibOverlayStyle:Z_.setA(80),customTickGridStrokeStyle:wR,customTickMarkerFont:kR.getLabelFont(),customTickPointerLength:kR.getTickLength(),bandFillStyle:CR,constantLineStrokeStyle:BR,seriesFillStyle:J_,seriesStrokeStyle:GR,seriesPointFillStyle:$_,seriesStrokeStyle3D:sz,seriesTriangulatedPointStyle3D:ez,seriesNonTriangulatedPointStyle3D:rz,mountainsStrokeStyle:UR,mountainsFillStyle:WR.setA(175),mountainsInvertedStrokeStyle:YR,mountainsInvertedFillStyle:jR.setA(175),candleStickStyle:HR,candleStickStyleHighlight:HR.getDefaultHighlightStyle(),boxFigureStyle:J_,pointMarkerStrokeStyle:NR,pointMarkerHorizontalGridStrokeStyle:VR,pointMarkerVerticalGridStrokeStyle:VR,customTickMarkerFillStyle:V_,customTickMarkerTextFillStyle:$_,customTickMarkerStrokeStyle:nR,pointMarkerTextFillStyle:$_,resultTableFillStyle:V_.setA(200),resultTableStrokeStyle:ER,resultTableTextFillStyle:$_,uiBackgroundFillStyle:V_,uiBackgroundStrokeStyle:zR,uiTextFillStyle:$_,uiButtonFillStyle:$_,uiButtonSize:12,axesStyles3D:iz,boundingBoxStyle3D:nz,boxSeriesFillStyle:J_,onScreenMenuButtonBackgroundColor:eR.getColor(),onScreenMenuButtonIconSet:Jh,surfaceSeriesFillStyle:J_,polarRadialAxisTickStyle:kR,polarRadialAxisStyle:PR,polarRadialAxisTitleStyle:_R,polarAmplitudeAxisStyle:DR,polarAmplitudeAxisTitleStyle:RR,heatmapFillStyle:undefined,heatmapWireframeStyle:undefined,heatmapGridSeriesFillStyle:uz,heatmapGridSeriesWireframeStyle:az,mapChartFillStyle:sR,mapChartStrokeStyle:oR,mapChartOutlierRegionFillStyle:hR,mapChartOutlierRegionStrokeStyle:uR,mapChartSeparateRegionFillStyle:aR,mapChartSeparateRegionStrokeStyle:fR,rectangleSeriesStrokeStyle:ir,polygonSeriesStrokeStyle:ir};t.MouseStyles=void 0,(M_=t.MouseStyles||(t.MouseStyles={})).Move="move",M_.ResizeColumn="col-resize",M_.ResizeRow="row-resize",M_.Horizontal="ew-resize",M_.Vertical="ns-resize",M_.NorthWest="nw-resize",M_.NorthEast="ne-resize",M_.Copy="copy",M_.CrossHair="crosshair",M_.Default="default",M_.Help="help",M_.Restricted="not-allowed",M_.None="none",M_.Point="pointer",M_.Text="text",M_.Wait="wait",M_.ZoomIn="zoom-in",M_.ZoomOut="zoom-out";var cz,lz={LeftBottom:l(-1,-1),CenterBottom:l(0,-1),RightBottom:l(1,-1),LeftCenter:l(-1,0),Center:l(0,0),RightCenter:l(1,0),LeftTop:l(-1,1),CenterTop:l(0,1),RightTop:l(1,1)},dz=new Ee({color:Ae(255,255,255,0)}),vz=new nr({thickness:1,fillStyle:dz}),yz=60,Sz=60,mz="1.0",bz="osm/osm-sprite-transparent.png",gz=t.OnScreenMenuButtonShape.Circle,wz="#363636";t.OSMPosition=void 0,(cz=t.OSMPosition||(t.OSMPosition={}))[cz.TopRight=0]="TopRight",cz[cz.TopLeft=1]="TopLeft",cz[cz.BottomLeft=2]="BottomLeft",cz[cz.BottomRight=3]="BottomRight";var pz=function(t){var i;return function(){return i||(i=t())}},kz=pz((function(){return eu({masterHueDeg:60,sliceHueStep:-28,seriesBackgroundTint:Ae(40,40,40),gaugeValueColor:Te(50,1,1),mapColor:Te(50,1,1)})})),xz=pz((function(){return eu({masterHueDeg:120,sliceHueStep:52,seriesBackgroundTint:Ae(40,40,40),mapColor:Te(120,1,.9),gaugeValueColor:Te(120,1,1)})})),Mz=pz((function(){return eu({masterHueDeg:80,sliceHueStep:68,seriesBackgroundTint:Ae(40,40,40),mapColor:Te(80,1,.9),gaugeValueColor:Te(80,.8,1)})})),Az=pz((function(){return eu({masterHueDeg:310,sliceHueStep:-44,seriesBackgroundTint:Ae(40,40,40),mapColor:Te(310,1,.9),gaugeValueColor:Te(310,1,1)})})),Fz=pz((function(){return eu({masterHueDeg:-5,sliceHueStep:41,seriesBackgroundTint:Ae(40,40,40),mapColor:Te(-5,.8,.7),gaugeValueColor:Te(-5,.8,.8)})})),Tz=pz((function(){return eu({masterHueDeg:180,sliceHueStep:61,seriesBackgroundTint:Ae(10,50,50,200),seriesBGStops:[{color:Ae(10,50,50,200),offset:0},{color:Ae(0,0,0,255),offset:1}],mapColor:Te(180,1,.7),gaugeValueColor:Te(180,1,1),useFullHSVPalette:!1,customPaletteSteps:[Te(180,1,1),Te(240,1,1),Te(300,1,1)]})})),Cz=pz((function(){return eu({masterHueDeg:180,sliceHueStep:61,dashRadialFillCenterX:.5,dashRadialFillCenterY:1,seriesBackgroundTint:Ae(10,50,50,200),dashBGStops:[{color:Ae(3,0,75),offset:0},{color:Ae(20,40,70),offset:.5},{color:Ae(0,0,60),offset:1}],panelBGStops:[{color:Ae(30,200,200,100),offset:0},{color:Ae(30,250,200,0),offset:1}],mapColor:Te(180,.8,.8).setA(100),gaugeValueColor:Te(180,1,1),useFullHSVPalette:!1,customPaletteSteps:[Te(180,1,1),Te(240,1,1),Te(330,1,1)]})})),Bz=pz((function(){return eu({isDarkTheme:!1,masterHueDeg:200,sliceHueStep:97,seriesBackgroundTint:Ae(150,150,150),colorStrength:1,colorSaturation:.7,dashRadialFillCenterX:.5,dashRadialFillCenterY:1.5,dashBGStops:[{color:Ae(100,150,255),offset:0},{color:Ae(255,255,255),offset:.2},{color:Ae(80,150,210),offset:.3},{color:Ae(255,255,255),offset:.7},{color:Ae(100,200,255),offset:1}],panelBGStops:[{color:Ae(255,255,255,150),offset:0},{color:Ae(150,150,255,0),offset:1}],seriesBGStops:[{color:Ae(255,255,255,255),offset:0},{color:Ae(255,255,255,100),offset:1}],axisColorStops:[{color:Ae(100,100,255),offset:0},{color:Ae(10,80,200),offset:1}],cursorSolverColor:Ae(255,255,255),mapColor:Te(210,.8,1),gaugeValueColor:Te(220,.8,.8),gradientStrength:.5,useFullHSVPalette:!1,customPaletteSteps:[Te(200,1,1),Te(205,.5,.1),Te(240,1,1)]})})),Lz=pz((function(){return eu({masterHueDeg:0,sliceHueStep:44,colorStrength:.8,colorSaturation:1,darkLightBlendColor:Ae(0,0,0),isDarkTheme:!1,dashBGStops:[{color:Ae(255,255,240),offset:0},{color:Ae(240,255,255),offset:.5},{color:Ae(255,240,255),offset:1}],panelBGStops:[{color:Ae(255,255,255,200),offset:0},{color:Ae(255,255,255,0),offset:1}],axisColorStops:[{color:Ae(100,100,100),offset:0},{color:Ae(150,150,150),offset:1}],seriesBGStops:[{color:Ae(255,255,255,200),offset:0},{color:Ae(245,245,245,255),offset:1}],explicitMasterColor:Ae(255,255,255),gradientStrength:.3,seriesBackgroundTint:Ae(255,255,255),cursorSolverColor:Ae(255,255,255,255),mapColor:Ae(150,200,255),gaugeValueColor:Ae(255,100,100),useFullHSVPalette:!1,customPaletteSteps:[Te(-10,1,1),Te(210,1,1),Te(150,1,1),Te(330,1,1)]})})),Iz=pz((function(){return eu({isDarkTheme:!1,masterHueDeg:60,sliceHueStep:74,seriesBackgroundTint:Ae(240,200,100),colorStrength:.6,dashBGStops:[{color:Te(40,.08,.95),offset:0},{color:Te(60,.15,.9),offset:.5},{color:Te(80,.12,.95),offset:1}],panelBGStops:[{color:Ae(200,168,120,100),offset:0},{color:Ae(150,150,150,20),offset:1}],seriesBGStops:[{color:Ae(255,255,255,100),offset:0},{color:Ae(150,110,60,100),offset:1}],axisColorStops:[{color:Ae(100,100,100),offset:0},{color:Ae(40,40,40),offset:1}],mapColor:Te(60,.6,.6),gaugeValueColor:Te(60,.6,.6),gradientStrength:.5,cursorSolverColor:Te(60,.1,.99)})})),Oz=pz((function(){return eu({masterHueDeg:100,sliceHueStep:74,seriesBackgroundTint:Te(100,.2,.2),colorStrength:.7,dashBGStops:[{color:Ae(80,81,82),offset:0},{color:Ae(54,55,56),offset:.5},{color:Ae(30,30,31),offset:1}],panelBGStops:[{color:Ae(200,168,120,100),offset:0},{color:Ae(0,1,1,20),offset:1}],mapColor:Te(100,.8,.8),gaugeValueColor:Te(100,.8,.8),useFullHSVPalette:!1,customPaletteSteps:[Te(100,1,1),Te(180,1,1),Te(60,1,1),Te(240,1,1)]})})),Pz=pz((function(){return eu({masterHueDeg:-10,sliceHueStep:77,colorStrength:.9,colorSaturation:.9,seriesBackgroundTint:Ae(20,20,100,150),dashRadialFillCenterX:.5,dashRadialFillCenterY:1,dashBGStops:[{color:Ae(224,64,87),offset:0},{color:Ae(40,26,153),offset:.5},{color:Ae(20,13,100),offset:1}],panelBGStops:[{color:Ae(255,255,255,100),offset:0},{color:Ae(30,150,180,0),offset:1}],seriesBGStops:[{color:Ae(20,20,100,170),offset:0},{color:Ae(0,0,80,220),offset:1}],spiderWebStops:[{color:Ae(100,100,100,100),offset:0},{color:Ae(255,255,255,100),offset:.5},{color:Ae(200,200,200,100),offset:1}],forceLabelsWhite:!0,mapColor:Te(-10,.8,.8).setA(150),gaugeValueColor:Te(-10,.8,.8),useFullHSVPalette:!1,customPaletteSteps:[Te(-10,.9,1),Te(180,1,1),Te(60,1,1),Te(310,1,1)]})})),Dz=pz((function(){return eu({masterHueDeg:170,sliceHueStep:52,colorStrength:.9,dashRadialFillCenterX:.8,dashRadialFillCenterY:0,seriesBackgroundTint:Ae(5,27,51,150),dashBGStops:[{color:Ae(50,100,50),offset:0},{color:Ae(5,27,51),offset:.3},{color:Ae(40,150,110),offset:.5},{color:Ae(80,52,90),offset:.65},{color:Ae(5,27,51),offset:.8},{color:Ae(53,208,142),offset:1.3}],panelBGStops:[{color:Ae(30,150,200,100),offset:0},{color:Ae(30,150,180,0),offset:1}],seriesBGStops:[{color:Ae(40,40,100,150),offset:0},{color:Ae(0,0,40,200),offset:1}],axisColorStops:[{color:Ae(100,80,100),offset:0},{color:Ae(53,208,142),offset:1}],gaugeValueColor:Te(180,.9,.9),mapColor:Te(250,.5,.8).setA(0)})})),_z=pz((function(){return eu({masterHueDeg:200,sliceHueStep:62,colorStrength:1,colorSaturation:1,seriesBackgroundTint:Ae(20,20,100,150),dashBGStops:[{color:Ae(236,22,255),offset:0},{color:Ae(20,180,182),offset:.7},{color:Ae(4,38,136),offset:1}],panelBGStops:[{color:Ae(200,200,200,100),offset:0},{color:Ae(30,150,180,0),offset:1}],seriesBGStops:[{color:Ae(20,20,100,170),offset:0},{color:Ae(0,0,80,220),offset:1}],spiderWebStops:[{color:Ae(100,100,100,100),offset:0},{color:Ae(255,255,255,100),offset:.5},{color:Ae(200,200,200,100),offset:1}],axisColorStops:[{color:Ae(200,0,200),offset:0},{color:Ae(255,255,255,100),offset:1}],forceLabelsWhite:!0,gaugeValueColor:Te(300,.5,.9),mapColor:Te(250,1,1),useFullHSVPalette:!1,customPaletteSteps:[Te(180,1,1),Te(300,1,1),Te(240,1,1)]})})),Rz={dark:Qa,light:Ac,darkGradient:zS,lightGradient:ig,auroraBorealis:Kd,sunset:k_,blueSciFi:dS,monochrome:kA,lavender:Fb,lavenderGradient:Gb,classic:xS,night:UT,raspberry:xk,lipstick:Zk,green:gb,lightGreen:Bw,red:JO,lightRed:fz,purple:TB,lightPurple:ek,rainbow:vI};Object.defineProperty(Rz,"darkGold",{get:kz,enumerable:!0}),Object.defineProperty(Rz,"darkGreen",{get:xz,enumerable:!0}),Object.defineProperty(Rz,"darkLime",{get:Mz,enumerable:!0}),Object.defineProperty(Rz,"darkMagenta",{get:Az,enumerable:!0}),Object.defineProperty(Rz,"darkRed",{get:Fz,enumerable:!0}),Object.defineProperty(Rz,"darkTurquoise",{get:Tz,enumerable:!0}),Object.defineProperty(Rz,"blueSciFiNew",{get:Cz,enumerable:!0}),Object.defineProperty(Rz,"glacier",{get:Bz,enumerable:!0}),Object.defineProperty(Rz,"lightNew",{get:Lz,enumerable:!0}),Object.defineProperty(Rz,"lightNature",{get:Iz,enumerable:!0}),Object.defineProperty(Rz,"darkNature",{get:Oz,enumerable:!0}),Object.defineProperty(Rz,"duskInLapland",{get:Pz,enumerable:!0}),Object.defineProperty(Rz,"auroraBorealisNew",{get:Dz,enumerable:!0}),Object.defineProperty(Rz,"cyberSpace",{get:_z,enumerable:!0});var zz,Ez,Nz,Vz=Rz,Gz=Vz.darkGold;!function(t){t[t.click=0]="click",t[t.dbclick=1]="dbclick",t[t.mouseDown=2]="mouseDown",t[t.mouseUp=3]="mouseUp",t[t.contextmenu=4]="contextmenu",t[t.wheel=5]="wheel"}(zz||(zz={})),function(t){t[t.touchStart=0]="touchStart",t[t.touchMove=1]="touchMove",t[t.touchEnd=2]="touchEnd"}(Ez||(Ez={})),function(t){t[t.osm=0]="osm"}(Nz||(Nz={}));var Hz,jz,Wz,Uz=Ms("lcjs-html-container"),Yz=[],Xz=function(){if(void 0!==Hz){var t=wr.getComputedStyle(wr.document.body),i=Number(t.getPropertyValue("margin-top").replace("px",""))+Number(t.getPropertyValue("margin-bottom").replace("px",""));Hz.style.height=wr.innerHeight-i+"px",function(){for(var t=0;t<Yz.length;t+=1)Yz[t]()}()}},Zz=new Ee({color:Ae(255,255,255)}),Kz={font:dh(oh),fillStyle:Zz,lineStyle:new nr({fillStyle:Zz,thickness:1}),pointStyle3D:new ch.Triangulated},qz=function(){function t(t,i){var n=this;this.an=new qe,this.Rt=er.d2({scaleXYConstructor:Vo}),this.Er=new Map,this.Nr=th((function(){return n.xn()}),60),this.Vr=l(0,0),this.Gr=void 0,this.Hr=function(){},this.jr=function(){},this.Wr=function(){},this.Ur=-1,this.Yr=[],this.Xr=!0,this.Zr=function(){var t=n.Kr().getBoundingClientRect(),i=t.bottom,e=t.left;return n.Vr=l(e,i),n},this.qr=function(){n.Jr&&n.Jr()},this.Qr=function(t,i){if(!i){n.$r.style.cursor=t;var e=n.Ur;return n.Ur+=1,n.Yr.push([e,t]),e}return n.ts(i),n.Qr(t)},this.ts=function(t){var i=t?n.Yr.findIndex((function(i){return i[0]===t})):-1;i>=0?(n.Yr.splice(i,1),n.Yr.length>0?n.$r.style.cursor=n.Yr[n.Yr.length-1][1]:n.$r.style.cursor="default"):(n.Yr.push([0,"default"]),n.$r.style.cursor="default")},this.ns=function(t){return n.es.l(t),n},this.rs=function(){return n.es.S()},this.ss=function(){n.Hr&&n.Hr(),n.os(),n.jr&&n.jr()},this.hs=function(t){return n.Er.set(t.us(),t),n.Er=new Map(u([],h(n.Er.entries())).sort((function(t,i){return t[0]-i[0]}))),t},this.fs=function(t){return n.Er.delete(t),n},this.bi=function(){return n.es.t=!1,n},this.gi=function(){return n.es.t=!0,n},this.cs=function(t){if(n.Xr){var i=n.ls;n.ls=t;var e=n.ds(t.clientX,t.clientY);n.vs=e;var r=Array.from(n.Er.values()).reverse().reduce((function(t,i){return t||(void 0!==i.ys()?i:void 0)}),void 0);Array.from(n.Er.values()).reverse().reduce((function(n,s){return void 0===r||s===r?s.cs(t,i,e.x,e.y,n):n}),!0)}},this.Ss=function(t){var i,e;n.Xr=!1,n.vs=void 0,n.ls=t;try{for(var r=o(n.Er.values()),s=r.next();!s.done;s=r.next()){s.value.Ss(t)}}catch(t){i={error:t}}finally{try{s&&!s.done&&(e=r.return)&&e.call(r)}finally{if(i)throw i.error}}},this.bs=function(t){n.Xr=!0,n.ls=t},this.gs=function(){return n.vs},this.ws=function(){return Array.from(n.Er.values()).reduce((function(t,i){return t||void 0!==i.ys()}),!1)},this.ps={overrideInteractionMouseButtons:t&&t.overrideInteractionMouseButtons?t.overrideInteractionMouseButtons:void 0,resourcesBaseUrl:t&&void 0!==t.resourcesBaseUrl&&null!==t.resourcesBaseUrl?t.resourcesBaseUrl:"resources",warnings:!t||!("warnings"in t)||"boolean"!=typeof t.warnings||t.warnings},this.ks=this.xs();var e=i?i.container:void 0;if(e){if("string"==typeof e){var r=wr.document.getElementById(e);if(!r)throw new Error('Container "'+e+"\" doesn't exist.");this.$r=r}else this.$r=e;wr.addEventListener("resize",this.qr),this.Wr=function(){wr.removeEventListener("resize",n.qr)}}else{if(void 0===Hz){var s=wr.document.createElement("div");s.id="lcjs-auto-flexbox",s.style.position="relative",s.style.width="100%",s.style.display="flex",s.style.flexDirection="column",wr.document.body.appendChild(s),Hz=s,wr.addEventListener("resize",Xz)}for(var a=1;null!==wr.document.getElementById("chart-"+a);)a+=1;this.$r=wr.document.createElement("div"),this.$r.id="chart-"+a,this.$r.style.flex="1",Hz.appendChild(this.$r),Xz(),Yz.push(this.qr),this.Wr=function(){Hz&&Hz.removeChild(n.$r),Yz.includes(n.qr)&&Yz.splice(Yz.indexOf(n.qr),1),0===Yz.length&&Hz&&(wr.document.body.removeChild(Hz),Hz=void 0,wr.removeEventListener("resize",Xz))}}if(wr.ResizeObserver){this.Ms=new wr.ResizeObserver(function(t){var i,e;try{for(var r=o(t),s=r.next();!s.done;s=r.next()){s.value.target===n.$r&&n.qr()}}catch(t){i={error:t}}finally{try{s&&!s.done&&(e=r.return)&&e.call(r)}finally{if(i)throw i.error}}}.bind(this)),this.Ms.observe(this.$r)}this.$r.style.position="relative",this.$r.style.boxSizing="content-box",this.$r.addEventListener("fullscreenchange",this.qr),this.$r.addEventListener("webkitfullscreenchange",this.qr);var f=i?i.maxFps:void 0;this.As=f?-1===f?-1:0!==f?1e3/f:0:0;var c=new Map,d=!1;var v,y=function(t,i){return function(e){var r=function(t){return{x:t.clientX,y:t.clientY}}(e);switch(e.type){case"pointerover":case"pointerenter":case"pointermove":case"pointerdown":c.set(e.pointerId,r);break;default:c.delete(e.pointerId),d=!1}e.interactions=Array.from(c.values()),n.Fs(Nz.osm)>0&&n.handleOsmPointerEvent(e);var s=n.Ts(e);switch(e.pointerType){case"pen":case"mouse":t&&t(e);break;case"touch":!s&&i&&i(e);break;default:t&&t(e)}e.defaultPrevented&&(d=!0)}};if(this.$r.onwheel=this.Cs(zz.wheel),this.$r.oncontextmenu=this.Cs(zz.contextmenu),this.$r.onclick=this.Cs(zz.click),this.$r.ondblclick=this.Cs(zz.dbclick),this.$r.onlostpointercapture=function(){d=!1},this.$r.ontouchmove=function(t){d&&t.preventDefault()},this.$r.onpointerover=y(),this.$r.onpointerenter=y(this.bs),this.$r.onpointerdown=y(this.Cs(zz.mouseDown),this.Bs(Ez.touchStart)),this.$r.onpointermove=y(this.cs,this.Bs(Ez.touchMove)),this.$r.onpointerup=y(this.Cs(zz.mouseUp),this.Bs(Ez.touchEnd)),this.$r.onpointercancel=y(),this.$r.onpointerout=y(),this.$r.onpointerleave=y(this.Ss,this.Bs(Ez.touchEnd)),!wr.requestAnimationFrame||!wr.cancelAnimationFrame)throw new Error("LightningChart JS depends on requestAnimationFrame. Make sure to load a polyfill in older browsers.");wr.addEventListener("scroll",this.Zr),this.es=w(new xe({r:0,g:0,b:0,a:0})),this.Ls={container:(v=this).$r,scale:v.Rt,xn:function(t){return v.xn(t)},gs:function(){return v.gs()},ws:function(){return v.ws()},Is:function(t){return v.Is(t)},setMouseStyle:function(t,i){return v.Qr(t,i)},restoreMouseStyle:function(t){return v.ts(t)},clientLocation2Engine:function(t,i){return v.ds(t,i)},engineLocation2Client:function(t,i){return v.Os(t,i)},captureFrame:function(t,i){return v.Ps(t,i)},renderFrame:function(t,i,n){return void 0===n&&(n=!1),v.Ds(t,i,n)},layout:function(){return v.qr()},setBackgroundFillStyle:function(t){return v.setBackgroundFillStyle(t),this},setBackgroundStrokeStyle:function(t){return v.setBackgroundStrokeStyle(t),this},getBackgroundFillStyle:function(){return v.getBackgroundFillStyle()},getBackgroundStrokeStyle:function(){return v.getBackgroundStrokeStyle()}}}return t.prototype._s=function(){return this.ls},t.prototype.Rs=function(t){var i;(null===(i=this.ks.get(t.it))||void 0===i?void 0:i.delete(t.zs))&&this.$r.removeChild(t.Es)},t.prototype.Fs=function(t){return this.ks.get(t).size},t.prototype.xs=function(){var t=new Map;for(var i in Nz)({}).hasOwnProperty.call(Nz,i)&&(Number.isNaN(Number(i))||t.set(Number(i),new Map));return t},t.prototype.handleOsmPointerEvent=function(t){this.Ts(t)?this.Xr&&(this.Ss(t),"touch"===t.pointerType&&(t.forceTouchEnd=!0,this.Ns(Ez.touchEnd,t))):this.Xr||this.bs(t)},t.prototype.Is=function(t){var i,n=this.Vs(t);return this.$r.appendChild(n.Es),null===(i=this.ks.get(t))||void 0===i||i.set(n.zs,n),n},t.prototype.Vs=function(t){var i=this,n={zs:Uz(),it:t,Es:wr.document.createElement("div"),dispose:function(){return i.Rs(n)}};return n.Es.id=n.zs,n},t.prototype.Gs=function(){return this.Hs},t.prototype.js=function(){return this.Ws},t.prototype.setBackgroundFillStyle=function(t){return this.Us.$n(t),this},t.prototype.getBackgroundFillStyle=function(){return this.Us.Qn()},t.prototype.setBackgroundStrokeStyle=function(t){return this.Us.Ys(t),this},t.prototype.getBackgroundStrokeStyle=function(){return this.Us.Xs()},t.prototype.Zs=function(t){return this.jr=t,this},t.prototype.Ks=function(t){return this.Hr=t,this},t.prototype.qs=function(t){return this.Er.get(t)},t.prototype.Js=function(){return Array.from(this.Er.keys()).reverse().reduce((function(t,i){return i!==Number.MAX_SAFE_INTEGER&&i>t?i:t}),0)+1},t.prototype.Cs=function(t){var i=this;return function(n){return i.Qs(t,n)}},t.prototype.Qs=function(t,i){Array.from(this.Er.values()).reverse().reduce((function(n,e){return e.Qs(i,n,t)}),!0)},t.prototype.Bs=function(t){var i=this;return function(n){return i.Ns(t,n)}},t.prototype.Ns=function(t,i){for(var n=i.interactions.length,e=this.ds(i.clientX,i.clientY),r=new Array(n),s=0;s<n;s+=1)r[s]=this.ds(i.interactions[s].x,i.interactions[s].y);Array.from(this.Er.values()).reverse().reduce((function(n,s){return n?s.Ns(r,i,t,e.x,e.y):n}),!0)},t.prototype.Ts=function(t){var i,n,e=this.ks.get(Nz.osm).values();try{for(var r=o(e),s=r.next();!s.done;s=r.next()){var h=s.value.Es.getBoundingClientRect();if(this.$s(h,t))return!0}}catch(t){i={error:t}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return!1},t.prototype.$s=function(t,i){var n=!1;return t&&(n=i.clientX>=t.left&&i.clientX<=t.right&&i.clientY>=t.top&&i.clientY<=t.bottom),n},t.prototype.io=function(t){return this.an.on("resize",t)},t.prototype.no=function(t){return this.an.off(t,"resize")},t.prototype.eo=function(){return this.an.topicOff("resize"),this},t.prototype.ro=function(){var t,i;if(this.Er)try{for(var n=o(this.Er.values()),e=n.next();!e.done;e=n.next()){e.value.ro()}}catch(i){t={error:i}}finally{try{e&&!e.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}this.Hr=void 0,this.jr=void 0,wr.removeEventListener("scroll",this.Zr),this.$r.removeEventListener("fullscreenchange",this.qr),this.$r.removeEventListener("webkitfullscreenchange",this.qr),this.so(),this.Ms&&this.Ms.disconnect(),this.Wr(),this.Gr&&wr.cancelAnimationFrame(this.Gr)},t.prototype.so=function(){var t,i,n,e;try{for(var r=o(this.ks.values()),s=r.next();!s.done;s=r.next()){var h=s.value;try{for(var u=(n=void 0,o(h.values())),a=u.next();!a.done;a=u.next()){a.value.dispose()}}catch(t){n={error:t}}finally{try{a&&!a.done&&(e=u.return)&&e.call(u)}finally{if(n)throw n.error}}}}catch(i){t={error:i}}finally{try{s&&!s.done&&(i=r.return)&&i.call(r)}finally{if(t)throw t.error}}},t.prototype.ds=function(t,i){return l(t-this.Vr.x,this.Vr.y-i)},t.prototype.Os=function(t,i){return l(t+this.Vr.x,this.Vr.y-i)},t}(),Jz=function(t){return void 0===t&&(t=1),{type:"horizontalProgressive",packager:function(i,n,e){if(i.length>1){for(var r=ao(n,e*t),s=Math.abs(r.x),o=i.length,h=[],u=0,a=0,f=i[0].x+s;a<o;){var c=i[a];if(h[u]=c,u+=1,a+=1,c.x<f&&a<o){for(var d=a,v=c.y,y=c.y;a<o&&i[a].x<=f;)i[a].y>v&&(v=i[a].y),i[a].y<y&&(y=i[a].y),a+=1;if(d!==a){var S=(h[u-1].x+i[a-1].x)/2;h[u+0]=l(S,y),h[u+1]=l(S,v),h[u+2]=i[a-1],u+=3}}f+=s}return h}return i.slice()}}},Qz=function(t){return void 0===t&&(t=1),{type:"horizontalRegressive",packager:function(i,n,e){if(i.length>1){for(var r=ao(n,e*t),s=Math.abs(r.x),o=i.length,h=[],u=0,a=0,f=i[0].x-s;a<o;){var c=i[a];if(h[u]=c,u+=1,a+=1,c.x>f&&a<o){for(var d=a,v=c.y,y=c.y;a<o&&i[a].x>=f;)i[a].y>v&&(v=i[a].y),i[a].y<y&&(y=i[a].y),a+=1;if(d!==a){var S=(h[u-1].x+i[a-1].x)/2;h[u+0]=l(S,y),h[u+1]=l(S,v),h[u+2]=i[a-1],u+=3}}f-=s}return h}return i.slice()}}},$z=function(t){return void 0===t&&(t=1),{type:"verticalProgressive",packager:function(i,n,e){if(i.length>1){for(var r=ao(n,e*t),s=Math.abs(r.y),o=i.length,h=[],u=0,a=0,f=i[0].y+s;a<o;){var c=i[a];if(h[u]=c,u+=1,a+=1,c.y<f&&a<o){for(var d=a,v=c.x,y=c.x;a<o&&i[a].y<=f;)i[a].x>v&&(v=i[a].x),i[a].x<y&&(y=i[a].x),a+=1;if(d!==a){var S=(h[u-1].y+i[a-1].y)/2;h[u+0]=l(y,S),h[u+1]=l(v,S),h[u+2]=i[a-1],u+=3}}f+=s}return h}return i.slice()}}},tE=function(t){return void 0===t&&(t=1),{type:"verticalRegressive",packager:function(i,n,e){if(i.length>1){for(var r=ao(n,e*t),s=Math.abs(r.y),o=i.length,h=[],u=0,a=0,f=i[0].y-s;a<o;){var c=i[a];if(h[u]=c,u+=1,a+=1,c.y>f&&a<o){for(var d=a,v=c.x,y=c.x;a<o&&i[a].y>=f;)i[a].x>v&&(v=i[a].x),i[a].x<y&&(y=i[a].x),a+=1;if(d!==a){var S=(h[u-1].y+i[a-1].y)/2;h[u+0]=l(y,S),h[u+1]=l(v,S),h[u+2]=i[a-1],u+=3}}f-=s}return h}return i.slice()}}},iE=function(){return{type:"disabled",packager:function(t,i,n){return t.slice()}}};t.PointShape=void 0,(jz=t.PointShape||(t.PointShape={}))[jz.Square=0]="Square",jz[jz.Circle=1]="Circle",jz[jz.Triangle=2]="Triangle",function(t){t[t.Nearest=0]="Nearest",t[t.NearestX=1]="NearestX",t[t.NearestY=2]="NearestY"}(Wz||(Wz={}));var nE=function(t){var i="nearest"===t?Wz.Nearest:"nearest-x"===t?Wz.NearestX:"nearest-y"===t?Wz.NearestY:void 0;return void 0!==i?i:Wz.NearestX},eE=function(t,i,n,e,r,s,o,h,u,a){var f=t.length;if(0!==f){var c=e?1:0,l=f-(r?2:1);if(n===Wz.Nearest)return rE(t,i,s,o,c,l);if(n===Wz.NearestX||n===Wz.NearestY){if("boolean"==typeof a&&("x"===u&&n===Wz.NearestX||"y"===u&&n===Wz.NearestY))return hE(t,sr(i,o,s),u,a,c,l);if(n===Wz.NearestX)return sE(t,sr(i,o,s),h,c,l);if(n===Wz.NearestY)return oE(t,sr(i,o,s),h,c,l)}}},rE=function(t,i,n,e,r,s){for(var o,h=Number.MAX_VALUE,u=r;u<=s;u+=1){var a=t[u],f=sr(a,n,e),c=Math.pow(f.x-i.x,2)+Math.pow(f.y-i.y,2);c<h&&(h=c,o=u)}return o},sE=function(t,i,n,e,r){if(!(i.x<n.min.x||i.x>n.max.x)){for(var s,o=Number.MAX_VALUE,h=e;h<=r;h+=1){var u=t[h],a=u.x>i.x?u.x-i.x:i.x-u.x;a<o&&(o=a,s=h)}return s}},oE=function(t,i,n,e,r){if(!(i.y<n.min.y||i.y>n.max.y)){for(var s,o=Number.MAX_VALUE,h=e;h<=r;h+=1){var u=t[h],a=u.y>i.y?u.y-i.y:i.y-u.y;a<o&&(o=a,s=h)}return s}},hE=function(t,i,n,e,r,s){var o="x"===n,h=o?i.x:i.y,u=t[r],a=t[s],f=u.x<a.x?u.x:a.x,c=u.y<a.y?u.y:a.y,l=u.x>a.x?u.x:a.x,d=u.y>a.y?u.y:a.y;if(!(o&&(h<f||h>l)||!o&&(h<c||h>d)))for(var v=r,y=Math.floor((r+s)/2),S=s,m=-1;;){var b=h-(o?t[y].x:t[y].y);if(b*(e?-1:1)>0)v=Math.min(y+1,S),m=Math.floor((v+S)/2);else{if(0===Math.abs(b))return y;S=Math.max(y-1,v),m=Math.floor((v+S)/2)}if(m===y){var g=y>r?Math.abs(h-(o?t[y-1].x:t[y-1].y)):Is,w=y<s?Math.abs(h-(o?t[y+1].x:t[y+1].y)):Is,p=Math.abs(b);switch(Math.min(p,g,w)){case g:return y-1;case w:return y+1;default:return y}}else y=m}},uE=function(t,i,n,e,r,s){var o="x"===n,h=o?i.x:i.y,u=t[r],a=t[s],f=u.x<a.x?u.x:a.x,c=u.y<a.y?u.y:a.y,l=u.x>a.x?u.x:a.x,d=u.y>a.y?u.y:a.y;if(!(o&&(h<f||h>l)||!o&&(h<c||h>d)))for(var v=r,y=Math.floor((r+s)/2),S=s,m=-1;;){var b=h-(o?t[y].x:t[y].y);if(b*(e?-1:1)>0)v=Math.min(y+1,S),m=Math.floor((v+S)/2);else{if(0===Math.abs(b))return{a:y,b:y,lerpAmount:0};S=Math.max(y-1,v),m=Math.floor((v+S)/2)}if(m===y){if(b*(e?-1:1)<0&&y>r){var g=t[y-1],w=t[y];return{a:y-1,b:y,lerpAmount:o?(i.x-g.x)/(w.x-g.x):(i.y-g.y)/(w.y-g.y)}}if(y<s){g=t[y],w=t[y+1];return{a:y,b:y+1,lerpAmount:o?(i.x-g.x)/(w.x-g.x):(i.y-g.y)/(w.y-g.y)}}return{a:y,b:y,lerpAmount:0}}y=m}},aE=function(){function t(t){this.oo=t}return t.prototype.ho=function(){return this.oo.ho(),this},t.prototype.os=function(){return this.oo.os(),this},t}(),fE=function(t){function i(i,n,e,r){var s=t.call(this,i)||this;return s.oo=i,s.uo=n,s.ao=e,s.fo=r,s.co=!0,s.lo=w(!0),s.do=!1,s.vo=!1,s.yo=!1,s.So=!1,s.mo=void 0,s.bo=void 0,s.wo=void 0,s.po=void 0,s.ko=void 0,s.xo=void 0,s.Mo=void 0,s.Ao=void 0,s.Fo=void 0,s.To=void 0,s.Co=void 0,s.Bo=void 0,s.Lo=void 0,s.Io=void 0,s.Oo=void 0,s.Po=void 0,s}return n(i,t),i.prototype.Do=function(t){return void 0!==this.fo.find((function(i){return i.type===t}))},i.prototype._o=function(t,i){var n;return!!this.Do(t)&&!0===i(null===(n=this.fo.find((function(i){return i.type===t})))||void 0===n?void 0:n.args)},i.prototype.dispose=function(){if(!this.So&&(this.vo&&this.po&&this.po(this),this.So=!0,this.uo(this),this.vo&&this.po)){var t=this.oo._s();t&&this.po(this,t)}return this.co=!1,this},i.prototype.restore=function(){return this.So&&(this.So=!1,this.co=!0,this.ao(this)),this},i.prototype.isDisposed=function(){return this.So},i.prototype.setMouseInteractions=function(t){var i=this.lo.S();return this.lo.l(t),t||(i&&this.vo&&this.po&&this.po(this),this.vo=!1),this},i.prototype.getMouseInteractions=function(){return this.lo.S()},i.prototype.getIsUnderMouse=function(){return this.vo},i.prototype.getIsGrabbed=function(){return this.yo},i.prototype.setIsUnderMouse=function(t){return this.vo=t,this},i.prototype.Ro=function(t,i,n){void 0===i&&(i=!1),i?this.vo?this.bo&&(!n||n.clientX===t.clientX&&n.clientY===t.clientY||this.bo(this,t)):(this.vo=!0,this.wo&&this.wo(this,t)):this.vo&&(this.vo=!1,this.po&&this.po(this,t))},i.prototype.zo=function(t){this.vo&&(this.vo=!1,this.po&&this.po(this,t))},i.prototype.setMouseMoveEventHandler=function(t){return this.bo=t,this},i.prototype.setMouseEnterEventHandler=function(t){return this.wo=t,this},i.prototype.setMouseLeaveEventHandler=function(t){return this.po=t,this},i.prototype.setMouseClickEventHandler=function(t){return this.ko=t,this},i.prototype.setMouseDoubleClickEventHandler=function(t){return this.Ao=t,this},i.prototype.setMouseDownEventHandler=function(t){return this.Fo=t,this},i.prototype.setMouseUpEventHandler=function(t){return this.To=t,this},i.prototype.setMouseWheelEventHandler=function(t){return this.xo=t,this},i.prototype.setMouseContextMenuEventHandler=function(t){return this.Mo=t,this},i.prototype.setMouseDragEventHandler=function(t){return this.Bo=t,this},i.prototype.setMouseDragStartEventHandler=function(t){return this.Co=t,this},i.prototype.setMouseDragStopEventHandler=function(t){return this.Lo=t,this},i.prototype.setTouchStartEventHandler=function(t){return this.Io=t,this},i.prototype.setTouchMoveEventHandler=function(t){return this.Oo=t,this},i.prototype.setTouchEndEventHandler=function(t){return this.Po=t,this},i.prototype.Eo=function(t){return this.mo=t,this},i.prototype.No=function(){return this.mo?this.mo:cE},i}(aE),cE=b(l(0,0),l(0,0)),lE=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return n(i,t),i}(fE),dE=function(t){function i(i,n,e,r,s){var o=t.call(this,i,e,r,s)||this;return o.oo=i,o.Rt=n,o.Vo=!0,o}return n(i,t),i.prototype.t=function(){return this.Vo||this.co},i.prototype.Go=function(){this.Vo=!1,this.co=!1},i}(lE),vE=function(t,i,n){if(n instanceof Vo){var e=n.tn(),r=lo(i,{x:Math.abs(e.x),y:Math.abs(e.y)});return b(l(t.min.x-r.x,t.min.y-r.y),l(t.max.x+r.x,t.max.y+r.y))}return b(n.Li(l(t.min.x,t.min.y),ao(i,-1)),n.Li(l(t.max.x,t.max.y),i))},yE=function(t,i){return"function"==typeof i?i(t):i},SE=function(t,i){return!t||t!==i},mE=function(t,i){return t===Re&&i!==Re},bE=function(t){return t!==Re},gE=function(t){function i(i,n,e,r,s){var o=t.call(this,i,n,e,r,s)||this;return o.oo=i,o.Ho=Kz.fillStyle,o}return n(i,t),i.prototype.$n=function(t){return this.Ho=yE(this.Ho,t),this},i.prototype.Qn=function(){return this.Ho},i.prototype.jo=function(){return SE(this.Wo,this.Ho)},i.prototype.Uo=function(){return mE(this.Wo,this.Ho)},i.prototype.Yo=function(){return bE(this.Ho)},i.prototype.Xo=function(t){this.Wo=t},i}(dE),wE=function(t){function i(i,n,e,r,s){var o=t.call(this,i,n,e,r,s)||this;return o.oo=i,o.Zo=Kz.lineStyle,o}return n(i,t),i.prototype.Ys=function(t){return this.Zo=t instanceof $e?t:t(this.Zo),this},i.prototype.Xs=function(){return this.Zo},i.prototype.Ko=function(){return!this.qo||!1===this.qo.equals(this.Zo)},i.prototype.Jo=function(t){return!this.qo||this.qo.getThickness()!==t},i.prototype.Yo=function(){return this.Zo!==ir||t.prototype.Yo.call(this)},i.prototype.Uo=function(){return(this.Zo!==ir||this.Ho!==Re)&&this.qo===ir&&this.Wo===Re},i.prototype.Qo=function(t){this.qo=t},i}(gE),pE=function(t){function i(i,n,e,r,s,o){void 0===o&&(o=w(5));var h=t.call(this,i,n,e,r,s)||this;return h.size=o,h}return n(i,t),i.prototype.oi=function(t){return this.size.l(t),this},i}(gE),kE=function(t){function i(i,n,e,r,s,o){void 0===o&&(o=w(Kz.font));var h=t.call(this,i,n,e,r,s)||this;return h.font=o,h.$o=w(""),h.th=w(l(0,0)),h.ih=w(0),h.eh=w(0),h.rh=w(l(0,0)),h.sh=w(0),h.oh=w(oh),h.st=l(0,0),h.Qt=w(p(1,1,1,1)),h.hh=w(k(4,4,4,4)),h.uh=!1,h}return n(i,t),i.prototype.Yo=function(){return bE(this.Ho)&&this.$o.S().length>0},i.prototype.Uo=function(){return!1===this.uh&&this.Yo()},i.prototype.Jn=function(t){return this.$o.l(t),this},i.prototype.Kn=function(){return this.$o.S()},i.prototype.ie=function(t){return t instanceof sh?this.oh.l(t):this.oh.l(t(this.oh.S())),this},i.prototype.te=function(){return this.oh.S()},i.prototype.ah=function(t){return this.oh.l(this.oh.S().setFamily(t)),this},i.prototype.fh=function(){return this.oh.S().getFamily()},i.prototype.lh=function(t){return this.oh.l(this.oh.S().setSize(t)),this},i.prototype.dh=function(){return this.oh.S().getSize()},i.prototype.yh=function(t){return this.oh.l(this.oh.S().setWeight(t)),this},i.prototype.Sh=function(){return this.oh.S().getWeight()},i.prototype.mh=function(t){return this.oh.l(this.oh.S().setStyle(t)),this},i.prototype.bh=function(){return this.oh.S().getStyle()},i.prototype.gh=function(t){return this.oh.l(this.oh.S().setVariant(t)),this},i.prototype.wh=function(){return this.oh.S().getVariant()},i.prototype.ph=function(t){return this.th.l(t),this},i.prototype.kh=function(){return this.th.S()},i.prototype.ne=function(t){return this.sh.l(t),this},i.prototype.ee=function(){return this.sh.S()},i.prototype.xh=function(t,i){return this.rh.l(l(t,i)),this},i.prototype.Mh=function(){return this.rh.S()},i.prototype.Ah=function(t){return this.eh.l(t),this},i.prototype.Fh=function(){return this.eh.S()},i.prototype.Th=function(t){return this.ih.l(t),this},i.prototype.Ch=function(){return this.ih.S()},i.prototype.Bh=function(t){return this.eh.l(t.x),this.ih.l(t.y),this},i.prototype.Lh=function(t){return this.Qt.l(t),this},i.prototype.Ih=function(){return this.Qt.S()},i.prototype.Oh=function(t){return this.hh.l(t),this},i.prototype.Ph=function(){return this.hh.S()},i}(gE),xE=function(i){function e(n,e,r,s,o,h){void 0===h&&(h=5);var u=i.call(this,n,e,r,s,o,w(h))||this;return u.Dh=[],u._h=w(t.PointShape.Square),u.sh=w(0),u.Rh=w(!1),u.zh=w(!1),u.Eh=w(!1),u.Nh=Ps,u.Vh=0,u.Gh=[],u.Hh=0,u.jh=Ps,u.Wh=Wz.Nearest,u}return n(e,i),e.prototype.Uh=function(t){return this.Wh=t,this},e.prototype.Yh=function(){return this.Gh},e.prototype.Xh=function(){return this.Dh},e.prototype.Zh=function(t){return this._h.l(t),this},e.prototype.ne=function(t){return this.sh.l(t),this},e.prototype.Kh=function(t){return this.Rh.l(t),this},e.prototype.qh=function(t){return this.zh.l(t),this},e.prototype.Jh=function(t){return this.Eh.l(t),this},e.prototype.Qh=function(t,i){return Array.isArray(t)||(t=[t]),this.Hh+=t.length,this.Gh=ps(this.Gh,t,{canReturnB:!0}),this.jh&&(this.jh=i?Js(this.jh,i):void 0),this},e.prototype.$h=function(){return this.Vo=!0,this.Dh.length=0,this.Vh=0,this.Nh=Ps,this.Gh=[],this.Hh=0,this},e.prototype.tu=function(){return this.Vh},e.prototype.iu=function(){return this.Hh},e}(pE),ME=function(t){function i(i,n,e,r,s){var o=t.call(this,i,n,e,r,s)||this;return o.th=w(l(0,0)),o.hi=w(l(100,100)),o.sh=w(0),o.st=w(l(0,0)),o.nu=!1,o}return n(i,t),i.prototype.Fe=function(){return this.eu(),this},i.prototype.ph=function(t){var i=this.th.S();return t.x===i.x&&t.y===i.y||(this.th.l(t),this.eu()),this},i.prototype.kh=function(){return this.th.S()},i.prototype.ru=function(t){var i=this.th.S();return t!==i.x&&(this.th.l(l(t,i.y)),this.eu()),this},i.prototype.su=function(t){var i=this.th.S();return t!==i.y&&(this.th.l(l(i.x,t)),this.eu()),this},i.prototype.oi=function(t){var i=this.hi.S();return t.x===i.x&&t.y===i.y||(this.hi.l(l(t.x,t.y)),this.eu()),this},i.prototype.vi=function(){return this.hi.S()},i.prototype.ou=function(t){var i=this.hi.S();return t!==i.x&&(this.hi.l(l(t,i.y)),this.eu()),this},i.prototype.hu=function(t){var i=this.hi.S();return t!==i.x&&(this.hi.l(l(i.x,t)),this.eu()),this},i.prototype.ne=function(t){return this.sh.l(t),this},i.prototype.ee=function(){return this.sh.S()},i.prototype.uu=function(t){var i=this.st.S();return t===i&&i.x===t.x&&i.y===t.y||(void 0===t?(this.nu=!1,this.eu()):(this.nu=!0,this.st.l(t))),this},i.prototype.eu=function(){if(!this.nu){var t=this.th.S(),i=this.hi.S(),n=l(t.x+i.x/2,t.y+i.y/2),e=this.st.S();n.x===e.x&&n.y===e.y||this.st.l(n)}},i}(wE),AE=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.Dh=[],i.th=w(l(0,0)),i.Nh=Ps,i}return n(i,t),i.prototype.au=function(t){return t=Ss(t),this.Dh=t,this.Vo=!0,this},i.prototype.fu=function(){return this.Dh},i.prototype.Et=function(){return this.Nh.max.x},i.prototype.zt=function(){return this.Nh.min.x},i.prototype.Vt=function(){return this.Nh.max.y},i.prototype.Nt=function(){return this.Nh.min.y},i.prototype.cu=function(){return 0},i.prototype.lu=function(){return 0},i}(wE),FE=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return n(i,t),i}(AE),TE=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return n(i,t),i}(AE);!function(t){function i(){return null!==t&&t.apply(this,arguments)||this}n(i,t)}(AE);var CE,BE=function(t){function i(i,n,e,r,s){var o=t.call(this,i,n,e,r,s)||this;return o.du=new Array,o.vu=new Array,o.yu=w(iE()),o.Nh=Ps,o.jh=Ps,o.Su=0,o.mu=!1,o.Gh=[Array(),Array()],o.bu=!1,o.gu=(new Ee).setColor(Ae(42,171,240)),o.wu=!1,o.pu=!1,o}return n(i,t),i.prototype.Qh=function(t,i){var n=this.Su-1,e=h(n>0&&!this.bu?[[this.du[n]],[this.vu[n]]]:[[],[]],2),r=e[0],s=e[1];if(t instanceof Array){var o=h(m(t),2),u=o[0],a=o[1];r=ps(r,u,{canReturnB:!0}),s=ps(s,a,{canReturnB:!0})}else{var f=t.position;r.push(l(f,t.high)),s.push(l(f,t.low))}return this.bu?(this.Gh[0]=ps(this.Gh[0],r,{canReturnB:!0}),this.Gh[1]=ps(this.Gh[1],s,{canReturnB:!0})):(this.Gh=[r,s],this.bu=!0),this.jh&&(this.jh=i?Js(this.jh,i):void 0),this},i.prototype.$h=function(){return this.Vo=!0,this.du.length=0,this.vu.length=0,this.Su=0,this.Nh=Ps,this},i.prototype.Xh=function(){return[this.du,this.vu]},i.prototype.Yh=function(){return[this.Gh[0],this.Gh[1]]},i.prototype.ku=function(t){return this.yu.l(t),this},i.prototype.xu=function(){return this.yu.S()},i.prototype.Mu=function(t){return this.gu="function"==typeof t?t(this.gu):t,this},i.prototype.Au=function(){return this.gu},i.prototype.tu=function(){return this.Su-(Number(this.wu)+Number(this.pu))},i.prototype.iu=function(){return this.Gh.length},i.prototype.Fu=function(t){return this.wu=t,this},i.prototype.Tu=function(){return this.wu},i.prototype.Cu=function(t){return this.pu=t,this},i.prototype.Bu=function(){return this.pu},i.prototype.Uo=function(){return this.Wo===Re&&this.Lu===Re&&(this.Ho!==Re||this.gu!==Re)},i.prototype.Iu=function(t){this.Lu=t},i.prototype.Yo=function(){return this.gu!==Re||t.prototype.Yo.call(this)},i.prototype.jo=function(){return t.prototype.jo.call(this)||!this.Lu||this.Lu!==this.gu},i}(gE),LE=function(t){function i(i,n,e,r,s){var o=t.call(this,i,n,e,r,s)||this;return o.th=w(l(0,0)),o.Ou=w(0),o.bt=w(360),o.Pu=w(100),o.Du=w(100),o._u=w(0),o.Ru=w(void 0),o.zu=l(0,0),o.Eu=l(0,0),o.Nu=l(0,0),o}return n(i,t),i.prototype.Vu=function(){return this.Pu.S()},i.prototype.Gu=function(){return this.Du.S()},i.prototype.kh=function(){return this.th.S()},i.prototype.Hu=function(){return this.Ou.S()},i.prototype.Hi=function(){return this.bt.S()},i.prototype.ju=function(){return this._u.S()},i.prototype.Wu=function(){return this.Ru.S()},i.prototype.Uu=function(){return this.zu},i.prototype.Yu=function(){return this.Eu},i.prototype.Xu=function(){return this.Nu},i.prototype.ph=function(t){return this.th.l(t),this},i.prototype.Zu=function(t){return this.Ou.l(t),this},i.prototype.Ku=function(t){return this.bt.l(t),this},i.prototype.qu=function(t){return this.Du.l(t),this.Pu.l(t),this},i.prototype.Ju=function(t){return this.Pu.l(t),this},i.prototype.Qu=function(t){return this.Du.l(t),this},i.prototype.$u=function(t){return this._u.l(t<0?0:t),this},i.prototype.ta=function(t){return this.Ru.l(void 0!==t&&t<=0?void 0:t),this},i}(wE);!function(t){t[t.Complex=0]="Complex",t[t.Simple=1]="Simple",t[t.Convex=2]="Convex"}(CE||(CE={}));var IE,OE=function(t,i){return"function"==typeof i?i(t):i},PE=function(t,i){return!t||!1===t.equals(i)},DE=function(t,i){return!t||t.thickness!==i},_E=function(t,i){return t===ir&&i!==ir},RE=function(t){return t!==ir},zE=function(t){function i(i,n,e,r,s){var o=t.call(this,i,n,e,r,s)||this;return o.engine=i,o.ia=Kz.lineStyle,o}return n(i,t),i.prototype.na=function(t){return this.ia=OE(this.ia,t),this},i.prototype.ea=function(){return this.ia},i.prototype.Ko=function(){return PE(this.ra,this.ia)},i.prototype.sa=function(t){return DE(this.ra,t)},i.prototype.Uo=function(){return _E(this.ra,this.ia)},i.prototype.Yo=function(){return RE(this.ia)},i.prototype.oa=function(t){this.ra=t},i}(dE),EE=function(t){function i(i,n,e,r,s){var o=t.call(this,i,n,e,r,s)||this;return o.St=l(0,0),o.bt=l(0,0),o}return n(i,t),i.prototype.l=function(t){var i=t.min,n=t.max;return this.Vo=!0,this.St=i,this.bt=n,this},i.prototype.ji=function(){return this.St},i.prototype.Hi=function(){return this.bt},i.prototype.ha=function(t){return this.Vo=!0,this.St=t,this},i.prototype.Ku=function(t){return this.Vo=!0,this.bt=t,this},i}(zE),NE=function(t){function i(i,n,e,r,s){var o=t.call(this,i,n,e,r,s)||this;return o.ua=[],o}return n(i,t),i.prototype.Qh=function(t,i){return this.ua.push(t),this.ua.push(i),this.Vo=!0,this},i.prototype.$h=function(){return this.ua.length=0,this.Vo=!0,this},i}(zE),VE=function(t){function i(i,n,e,r,s){var o=t.call(this,i,n,e,r,s)||this;return o.aa=[],o.Nh=Ps,o.Gh=new Array,o.Vh=0,o.Wh=Wz.NearestX,o.fa=w(void 0),o.wu=!1,o.pu=!1,o}return n(i,t),i.prototype.ca=function(t){return this.fa.l(t),this},i.prototype.la=function(){return this.fa.S()},i.prototype.Yh=function(){return this.Gh},i.prototype.Xh=function(){return this.aa},i.prototype.Uh=function(t){return this.Wh=t,this},i.prototype.$h=function(){return this.Vo=!0,this.aa.length=0,this.Vh=0,this.Gh=[],this.Nh=Ps,this},i.prototype.tu=function(){return this.Vh-(Number(this.wu)+Number(this.pu))},i.prototype.iu=function(){return this.Gh.length},i.prototype.Fu=function(t){return this.wu=t,this},i.prototype.Tu=function(){return this.wu},i.prototype.Cu=function(t){return this.pu=t,this},i.prototype.Bu=function(){return this.pu},i}(zE),GE=function(t){function i(i,n,e,r,s){var o=t.call(this,i,n,e,r,s)||this;return o.engine=i,o.Su=0,o.da=0,o.hi=w({x:0,y:0}),o.va=w({x:0,y:0}),o.ya=w({x:0,y:0}),o.St={x:0,y:0},o.bt={x:0,y:0},o.Sa=!0,o.ma=!0,o.ba=!0,o.Nh=Ps,o.ga=!0,o.wa=Re,o}return n(i,t),i.prototype.pa=function(t){return this.wa=yE(this.wa,t),this},i.prototype.ka=function(){return this.wa},i.prototype.l=function(t){return HE.l(this,t,(function(t,i){return{x:t,y:i}})),this},i.prototype.xa=function(){return HE.xa(this)},i.prototype.Ma=function(){return HE.Ma(this)},i.prototype.kh=function(){return HE.kh(this)},i.prototype.iu=function(){return HE.iu(this)},i.prototype.Aa=function(t,i,n){return HE.Aa(this,t,i,n),this},i.prototype.Fa=function(t,i,n){return HE.Fa(this,t,i,n),this},i.prototype.Ta=function(t,i){return HE.Ta(this,t,i),this},i.prototype.Ca=function(t,i){return HE.Ca(this,t,i),this},i.prototype.Ba=function(t,i){return HE.Ba(this,t,i),this},i.prototype.$h=function(){return HE.$h(this,(function(t,i){return{x:t,y:i}})),this},i.prototype.La=function(){return HE.La(this)},i.prototype.Ia=function(){return HE.Ia(this)},i.prototype.Oa=function(){return HE.Oa(this)},i.prototype.tu=function(){return HE.tu(this)},i.prototype.Uo=function(){return HE.Uo(this)},i.prototype.Yo=function(){return HE.Yo(this)},i.prototype.Pa=function(){return this.Da},i.prototype._a=function(){return this.Ra},i}(gE),HE={l:function(t,i,n){t.Vo=!0,t.Sa=!0,t.ma=!0,t.ba=!0;var r=i.start,s=i.end,o=i.rows,h=i.columns;t.ga=i.pixelate;var u={x:i.pixelate&&h>=1||!i.pixelate&&h>1?h:0,y:i.pixelate&&o>=1||!i.pixelate&&o>1?o:0};t.va.l(u),t.St=e({},r),t.bt=e({},s),t.hi.l(co(s,r)),HE.za(t,n)},za:function(t,i){var n=t.va.S();if(n.x>0&&n.y>0){t.Da?t.Da.length=0:t.Da=[];var e=t.ga?fo(n,{x:1,y:1}):{x:n.x,y:n.y};t.ya.l(e),t.Da=Array.from(Array(e.y)).map((function(){return Array(e.x)})),t.Ra=Array.from(Array(n.y)).map((function(){return Array(n.x)})),HE.Ea(t,n,e,i),t.Su=e.x*e.y,t.da=n.x*n.y}else t.Da=void 0,t.ya.l({x:0,y:0})},Ea:function(t,i,n,e){var r,s,h=t.St,u=t.bt,a=t.Da,f=t.Ra;if(a){for(var c=n.x,l=n.y,d=t.hi.S(),v={x:d.x/(c-1),y:d.y/(l-1)},y=0;y<l;y+=1)for(var S=0;S<c;S+=1)a[y][S]=e(v.x*S,v.y*y);var m=e(0,0),g=e(u.x-h.x,u.y-h.y),w={},p={};try{for(var k=o(Object.keys(m)),x=k.next();!x.done;x=k.next()){var M=x.value;w[M]=Math.min(m[M],g[M]),p[M]=Math.max(m[M],g[M])}}catch(t){r={error:t}}finally{try{x&&!x.done&&(s=k.return)&&s.call(k)}finally{if(r)throw r.error}}t.Nh=b(w,p)}if(f)for(c=i.x,l=i.y,y=0;y<l;y+=1)for(S=0;S<c;S+=1)f[y][S]={intensity:0}},xa:function(t){return t.va.t||t.ya.t},Ma:function(t){var i=t.va.S();return{columns:i.x,rows:i.y}},kh:function(t){var i=t.St,n=t.bt;return{start:{x:i.x,y:i.y},end:{x:n.x,y:n.y}}},iu:function(t){throw new Error("Method not implemented.")},Aa:function(t,i,n,r){var s="geometry"===n||"y"===n?t.Da:t.Ra;if(s){var o=t.ya.S();if("y"===n)for(var h=_r(s),u=0;u<o.y;u+=1){for(var a=u-i;a<0;)a+=o.y;for(var f=0;f<o.x;f+=1)s[a][f]=e(e({},h[a][f]),{y:h[u][f].y})}else Dr(s,i);var c=s===t.Da?t.ya.S():t.va.S(),l={column:{start:0,end:c.x},row:{start:c.y-i,end:c.y}};HE.Na(t,n,r,l)}},Fa:function(t,i,n,r){var s="geometry"===n||"y"===n?t.Da:t.Ra;if(s){var o=t.ya.S();if("y"===n)for(var h=_r(s),u=0;u<o.x;u+=1){for(var a=u-i;a<0;)a+=o.x;for(var f=0;f<o.y;f+=1)s[f][a]=e(e({},h[f][a]),{y:h[f][u].y})}else s.forEach((function(t){return Dr(t,i)}));var c=s===t.Da?t.ya.S():t.va.S(),l={column:{start:c.x-i,end:c.x},row:{start:0,end:c.y}},d=function(t){for(var i=t.length,n=i>0?t[0].length:0,e=Array.from(Array(n)).map((function(){return Array(i)})),r=0;r<n;r+=1)for(var s=0;s<i;s+=1)e[r][s]=t[s][r];return e}(r);HE.Na(t,n,d,l)}},Na:function(t,i,n,e){"color"===i&&HE.Ta(t,n,e),"value"===i&&HE.Ca(t,n,e),"geometry"===i&&HE.Ba(t,n,e),"y"===i&&HE.Va(t,n,e)},Ta:function(t,i,n){var e=t.Ra;if(e){var r=h(Pr(t.va.S(),n),4),s=r[0],o=r[1],u=r[2],a=r[3];if("function"==typeof i)for(var f=s;f<o;f+=1)for(var c=u;c<a;c+=1){var l=e[f][c],d=i(f,c,{intensity:l.intensity,color:l.color});e[f][c].color=d||l.color}else for(var v=i.length,y=v>0?i[0].length:0,S=(f=s,0);f<o&&S<v;f+=1,S+=1){c=u;for(var m=0;c<a&&m<y;c+=1,m+=1){(d=i[S][m])&&(e[f][c].color=d)}}t.Vo=!0,t.Sa=!0}},Ca:function(t,i,n){var e=t.Ra;if(e){var r=h(Pr(t.va.S(),n),4),s=r[0],o=r[1],u=r[2],a=r[3];if("function"==typeof i)for(var f=s;f<o;f+=1)for(var c=u;c<a;c+=1){((S=i(f,c,{intensity:e[f][c].intensity}))||0===S)&&(e[f][c].intensity=S)}else for(var l=i.length,d=l>0?i[0].length:0,v=(f=s,0);f<o&&v<l;f+=1,v+=1){c=u;for(var y=0;c<a&&y<d;c+=1,y+=1){var S;((S=i[v][y])||0===S)&&(e[f][c].intensity=S)}}t.Vo=!0,t.ma=!0}},Ba:function(t,i,n){var r=t.Da;if(r){var s=h(Pr(t.ya.S(),n),4),o=s[0],u=s[1],a=s[2],f=s[3];if("function"==typeof i)for(var c=o;c<u;c+=1)for(var l=a;l<f;l+=1){var d=r[c][l];void 0!==(b=i(c,l,e({},d)))&&(r[c][l]=e({},b))}else for(var v=i.length,y=v>0?i[0].length:0,S=(c=o,0);c<u&&S<v;c+=1,S+=1){l=a;for(var m=0;l<f&&m<y;l+=1,m+=1){var b;void 0!==(b=i[S][m])&&(r[c][l]=e({},b))}}t.Vo=!0,t.ba=!0}},Va:function(t,i,n){var r=t.Da;if(r){var s=h(Pr(t.ya.S(),n),4),o=s[0],u=s[1],a=s[2],f=s[3];if("function"==typeof i)for(var c=o;c<u;c+=1)for(var l=a;l<f;l+=1){void 0!==(m=i(c,l,(b=r[c][l]).y))&&(r[c][l]=e(e({},b),{y:m}))}else for(var d=i.length,v=d>0?i[0].length:0,y=(c=o,0);c<u&&y<d;c+=1,y+=1){l=a;for(var S=0;l<f&&S<v;l+=1,S+=1){var m,b=r[c][l];void 0!==(m=i[y][S])&&(r[c][l]=e(e({},b),{y:m}))}}t.Vo=!0,t.ba=!0}},$h:function(t,i){t.Vo=!0,t.Sa=!0,t.ma=!0,t.ba=!0,t.Da=void 0,t.Ra=void 0,t.Su=0,t.da=0,t.va.l({x:0,y:0}),t.ya.l({x:0,y:0}),t.St={x:0,y:0},t.bt={x:0,y:0},t.Nh=b(i(Is,Is),i(Os,Os))},La:function(t){var i=t.ya.S();return{x:i.x,y:i.y}},Ia:function(t){var i=t.va.S();return{x:i.x,y:i.y}},Oa:function(t){return t.Su},tu:function(t){return t.da},Uo:function(t){return mE(t.Wo,t.Ho)||mE(t.Ga,t.wa)},Yo:function(t){return bE(t.Ho)||bE(t.wa)}},jE=function(t){var i=t.length;if(i>0){for(var n=0,e=0,r=0;r<i;r+=1)n+=t[r].x,e+=t[r].y;return l(n/i,e/i)}return l(0,0)},WE=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var n=t.length,e=new Array(n).fill(!1),r=function(i,r){for(var s=0;s<n;s+=1){var o=t[s],h=o.Ha(i,r);h?o.Fe(i,r,!0):e[s]&&e[s]&&o.Fe(i,r,!1),e[s]=h}return!1};return{onTouchStart:r,onTouchMove:r,onTouchEnd:r}},UE={Poke:function(){function t(t,i){void 0===i&&(i=300),this.ja=t,this.Wa=i,this.Ua=!1,this.Ya=[]}return t.prototype.Ha=function(t,i){for(var n=wr.performance.now(),e=!1,r=0;r<this.Ya.length;r+=1)n-this.Ya[r].time>=this.Wa?(this.Ya.splice(r,1),r-=1):this.Ya[r].state&&(e=!0);return this.Ua?0===i.interactions.length&&(this.Ya.push({state:!1,time:n}),this.Ua=!1):1===i.interactions.length&&"pointerdown"===i.type&&(this.Ya.push({state:!0,time:n}),e=!0,this.Ua=!0),e},t.prototype.Fe=function(t,i,n){if(n&&!this.Ua){var e=this.Ya.reduce((function(t,i){return i.state?t.on+=1:t.off+=1,t}),{on:0,off:0});e.on>=1&&e.off>=1&&(this.ja(t,i),this.Ya.length=0)}},t}(),DoublePoke:function(){function t(t,i){void 0===i&&(i=300),this.ja=t,this.Wa=i,this.Ua=!1,this.Ya=[]}return t.prototype.Ha=function(t,i){for(var n=wr.performance.now(),e=!1,r=0;r<this.Ya.length;r+=1)n-this.Ya[r].time>=this.Wa?(this.Ya.splice(r,1),r-=1):this.Ya[r].state&&(e=!0);return this.Ua?0===i.interactions.length&&(this.Ya.push({state:!1,time:n}),this.Ua=!1):1===i.interactions.length&&"pointerdown"===i.type&&(this.Ya.push({state:!0,time:n}),e=!0,this.Ua=!0),e},t.prototype.Fe=function(t,i,n){if(n){var e=this.Ya.reduce((function(t,i){return i.state?t.on+=1:t.off+=1,t}),{on:0,off:0});e.on>=2&&e.off>=1&&(this.ja(t,i),this.Ya.length=0)}},t}(),Drag:function(){function t(t,i,n,e,r){void 0===e&&(e=1),void 0===r&&(r=100),this.Xa=t,this.Za=i,this.Ka=n,this.qa=e,this.Ja=r}return t.prototype.Ha=function(t,i){var n=i.interactions.length;if(n===this.qa){if(void 0!==this.Qa)return!0;if("pointerdown"===i.type&&(1===n||function(t){var i=t.length;if(i>0){for(var n=jE(t),e=0,r=0;r<i;r+=1)e=Math.max(e,Hs(n,l(t[r].x,t[r].y)));return e}return Is}(i.interactions)<=this.Ja))return this.Qa=jE(i.interactions),!0}return!1},t.prototype.Fe=function(t,i,n){var e=this.$a;if(!n||i.forceTouchEnd||"pointerup"===i.type)this.Ka&&this.Ka(t,this.Qa,e,i),this.Qa=void 0,this.$a=void 0;else{var r=jE(i.interactions);"pointerdown"===i.type?this.Xa&&this.Xa(t,this.Qa,i):"pointermove"===i.type&&this.Za&&this.Za(t,this.Qa,r,l(r.x-e.x,e.y-r.y),i),this.$a=r}},t}(),Pinch:function(){function t(t,i,n){this.Xa=t,this.Za=i,this.Ka=n,this.tf=!1}return t.prototype.Ha=function(t,i){this.tf?2!==i.interactions.length&&(this.tf=!1):2===i.interactions.length&&"pointerdown"===i.type&&(this.tf=!0);return this.tf},t.prototype.Fe=function(t,i,n){var e,r;if(n&&"pointerup"!==i.type){if("pointerdown"===i.type){e=(a=i.interactions)[0],r=a[1],this.Xa(t,e,r,i)}else if("pointermove"===i.type){e=i.interactions[0],r=i.interactions[1];var s=this.if,o=this.nf,h=l(e.x-s.x,s.y-e.y),u=l(r.x-o.x,o.y-r.y);this.Za(t,e,r,h,u,i)}}else{var a=i.interactions;this.Ka(t,a[0],a[1],i)}this.if=e,this.nf=r},t}()},YE=function(i){var n=i.getDraggingMode();return void 0!==n&&n!==t.UIDraggingModes.notDraggable?n===t.UIDraggingModes.draggable?t.MouseStyles.Move:n===t.UIDraggingModes.onlyHorizontal?t.MouseStyles.Horizontal:t.MouseStyles.Vertical:void 0},XE=function(){function t(){var t=this;this.an=new qe,this.ef=0,this.rf=function(i,n){0===t.ef&&t.an.emit("mouseEnter",t,n),t.ef+=1},this.sf=function(i,n){t.ef-=1,t.ef<1&&(t.an.emit("mouseLeave",t,n),t.ef=0)},this.hf=function(i,n){t.an.emit("mouseClick",t,n)},this.uf=function(i,n){t.an.emit("mouseDoubleClick",t,n)},this.af=function(i,n){t.an.emit("mouseDown",t,n)},this.ff=function(i,n){t.an.emit("mouseUp",t,n)},this.cf=function(i,n){t.an.emit("mouseMove",t,n)},this.lf=function(i,n,e){t.an.emit("mouseDragStart",t,n,e)},this.df=function(i,n,e,r,s){t.an.emit("mouseDrag",t,n,e,r,s)},this.vf=function(i,n,e,r){t.an.emit("mouseDragStop",t,n,n,e,r)},this.yf=function(i,n){t.an.emit("mouseWheel",t,n)},this.Sf=function(i,n){t.an.emit("touchStart",t,n)},this.mf=function(i,n){t.an.emit("touchMove",t,n)},this.bf=function(i,n){t.an.emit("touchEnd",t,n)},this.gf=function(i){return i instanceof dE?i.setMouseEnterEventHandler(t.rf).setMouseLeaveEventHandler(t.sf).setMouseClickEventHandler(t.hf).setMouseDoubleClickEventHandler(t.uf).setMouseDownEventHandler(t.af).setMouseUpEventHandler(t.ff).setMouseMoveEventHandler(t.cf).setMouseDragEventHandler(t.df).setMouseDragStartEventHandler(t.lf).setMouseDragStopEventHandler(t.vf).setMouseWheelEventHandler(t.yf).setTouchStartEventHandler(t.Sf).setTouchMoveEventHandler(t.mf).setTouchEndEventHandler(t.bf):(i.onMouseEnter(t.rf),i.onMouseLeave(t.sf),i.onMouseClick(t.hf),i.onMouseDoubleClick(t.uf),i.onMouseDown(t.af),i.onMouseUp(t.ff),i.onMouseMove(t.cf),i.onMouseDrag(t.df),i.onMouseDragStart(t.lf),i.onMouseDragStop(t.vf),i.onMouseWheel(t.yf),i.onTouchStart(t.Sf),i.onTouchMove(t.mf),i.onTouchEnd(t.bf)),i}}return t.prototype.onMouseEnter=function(t){return this.an.on("mouseEnter",t)},t.prototype.onMouseLeave=function(t){return this.an.on("mouseLeave",t)},t.prototype.onMouseClick=function(t){return this.an.on("mouseClick",t)},t.prototype.onMouseDoubleClick=function(t){return this.an.on("mouseDoubleClick",t)},t.prototype.onMouseDown=function(t){return this.an.on("mouseDown",t)},t.prototype.onMouseUp=function(t){return this.an.on("mouseUp",t)},t.prototype.onMouseMove=function(t){return this.an.on("mouseMove",t)},t.prototype.onMouseDragStart=function(t){return this.an.on("mouseDragStart",t)},t.prototype.onMouseDrag=function(t){return this.an.on("mouseDrag",t)},t.prototype.onMouseDragStop=function(t){return this.an.on("mouseDragStop",t)},t.prototype.onMouseWheel=function(t){return this.an.on("mouseWheel",t)},t.prototype.onTouchStart=function(t){return this.an.on("touchStart",t)},t.prototype.onTouchMove=function(t){return this.an.on("touchMove",t)},t.prototype.onTouchEnd=function(t){return this.an.on("touchEnd",t)},t.prototype.offMouseEnter=function(t){return this.an.off(t,"mouseEnter")},t.prototype.offMouseLeave=function(t){return this.an.off(t,"mouseLeave")},t.prototype.offMouseClick=function(t){return this.an.off(t,"mouseClick")},t.prototype.offMouseDoubleClick=function(t){return this.an.off(t,"mouseDoubleClick")},t.prototype.offMouseDown=function(t){return this.an.off(t,"mouseDown")},t.prototype.offMouseUp=function(t){return this.an.off(t,"mouseUp")},t.prototype.offMouseMove=function(t){return this.an.off(t,"mouseMove")},t.prototype.offMouseDragStart=function(t){return this.an.off(t,"mouseDragStart")},t.prototype.offMouseDrag=function(t){return this.an.off(t,"mouseDrag")},t.prototype.offMouseDragStop=function(t){return this.an.off(t,"mouseDragStop")},t.prototype.offMouseWheel=function(t){return this.an.off(t,"mouseWheel")},t.prototype.offTouchStart=function(t){return this.an.off(t,"touchStart")},t.prototype.offTouchMove=function(t){return this.an.off(t,"touchMove")},t.prototype.offTouchEnd=function(t){return this.an.off(t,"touchEnd")},t.prototype.getIsUnderMouse=function(){return this.ef>0},t}(),ZE=function(i,n,e){var r=i.getDraggingMode();if(r!==t.UIDraggingModes.notDraggable){var s=i.scale.Li(i.getPosition(),{x:r!==t.UIDraggingModes.onlyVertical?n.x:0,y:r!==t.UIDraggingModes.onlyHorizontal?n.y:0}),o=i.scale,h=i.getSize(),u=i.getOrigin(),a=o.Li({x:o.x.getInnerStart(),y:o.y.getInnerStart()},lo({x:(1+u.x)/2,y:(1+u.y)/2},h)),f=o.Li({x:o.x.getInnerEnd(),y:o.y.getInnerEnd()},lo({x:(u.x-1)/2,y:(u.y-1)/2},h)),c={x:Math.min(Math.max(s.x,a.x),f.x),y:Math.min(Math.max(s.y,a.y),f.y)};i.setPosition(c),ss(e)}},KE=function(t,i,n,e,r){ZE(t,r,i)},qE=function(t,i,n,e,r){ZE(t,e,r)},JE=function(i){function e(t,n,e,r,s,o){var h=i.call(this)||this;h.wf=t,h.renderingScale=n,h.scale=e,h.uo=r,h.ao=s,h.theme=o,h.position=l(50,50),h.origin=l(0,0),h.size=l(0,0),h.So=!1,h.pf=void 0,h.kf=void 0,h.xf=YE,h.Mf=void 0,h.Af=function(){var t="function"==typeof h.xf?h.xf(h):h.xf;t&&(h.kf=h.wf.oo.Qr(t))},h.Ff=function(){h.wf.oo.ts(h.kf)},h.Qt=p(0,0,0,0),h.wf.xn(),h.onMouseEnter(h.Af),h.onMouseLeave(h.Ff),h.onMouseDrag(KE);var u=WE(new UE.Drag(Cr,qE,Cr));return h.onTouchStart(u.onTouchStart),h.onTouchMove(u.onTouchMove),h.onTouchEnd(u.onTouchEnd),h.vn=o,h}return n(e,i),e.prototype.setAutoDispose=function(t){return this.Mf=t,this.wf.xn(),this},e.prototype.getAutoDispose=function(){return this.Mf},e.prototype.getSize=function(i){return void 0===i&&(i=t.UISpace.Everything),i===t.UISpace.Everything?l(this.size.x+(this.Qt.left+this.Qt.right),this.size.y+(this.Qt.bottom+this.Qt.top)):this.size},e.prototype.setContentSize=function(t){this.size=t},e.prototype.setMargin=function(t){return this.Qt="object"==typeof t?x(this.Qt,t):{left:t,top:t,right:t,bottom:t},this.wf.xn(),this},e.prototype.getMargin=function(){return this.Qt},e.prototype.Tf=function(){if(this.Mf){var t=this.size,i=this.renderingScale.vi(),n={x:t.x/i.x,y:t.y/i.y};("max-width"===this.Mf.type&&n.x>=this.Mf.maxWidth||"max-height"===this.Mf.type&&n.y>=this.Mf.maxHeight)&&this.dispose()}return this},e.prototype.Fe=function(){return this},e.prototype.dispose=function(){return this.wf.xn(),this.So=!0,this.uo(this),this},e.prototype.restore=function(){return this.So=!1,this.wf.xn(),this.ao(this),this},e.prototype.isDisposed=function(){return this.So},e.prototype.setPosition=function(t){return this.position=t,this.wf.xn(),this},e.prototype.getPosition=function(i,n){void 0===i&&(i=this.origin),void 0===n&&(n=t.UISpace.Everything);var e=this.getSize(t.UISpace.Everything),r=this.scale.Li(this.position,lo({x:-(this.origin.x+1)/2,y:-(this.origin.y+1)/2},e));if(n===t.UISpace.Everything)return this.scale.Li(r,lo({x:(i.x+1)/2,y:(i.y+1)/2},e));var s=this.scale.Li(r,{x:this.Qt.left,y:this.Qt.bottom}),o=this.getSize(t.UISpace.Content);return this.scale.Li(s,lo({x:(i.x+1)/2,y:(i.y+1)/2},o))},e.prototype.setOrigin=function(t){return this.origin=t,this.wf.xn(),this},e.prototype.getOrigin=function(){return this.origin},e.prototype.setDraggingMode=function(i){return void 0===i&&(i=t.UIDraggingModes.notDraggable),this.pf=i,this.wf.xn(),this},e.prototype.getDraggingMode=function(){return void 0!==this.pf?this.pf:t.UIDraggingModes.notDraggable},e.prototype.setMouseStyle=function(t){return this.xf=t,this},e.prototype.getMouseStyle=function(){return this.xf},e}(XE),QE=function(i){function e(t,n,e,r,s,o,h){var u=i.call(this,t,n,e,s,o,h)||this;return u.wf=t,u.Cf=r,u.hh=p(),u.Bf=!1,u.backgroundElement=new u.Cf(u.wf,u.renderingScale,u.scale,Cr,Cr,h),u.gf(u.backgroundElement),u}return n(e,i),e.prototype.onHighlight=function(t){return this.an.on("highlight",t)},e.prototype.offHighlight=function(t){return this.an.off(t)},e.prototype.setBackground=function(t){return t(this.backgroundElement),this},e.prototype.getBackground=function(){return this.backgroundElement},e.prototype.Tf=function(){return i.prototype.Tf.call(this),i.prototype.isDisposed.call(this)||this.backgroundElement.setOrigin(this.origin).setPosition(this.getPosition(this.origin,t.UISpace.PaddedBackground)).Tf(),this},e.prototype.Fe=function(){var n=this.getSize(t.UISpace.PaddedContent);return this.backgroundElement.Lf(n).Fe(),i.prototype.Fe.call(this)},e.prototype.dispose=function(){return i.prototype.dispose.call(this),this.backgroundElement.dispose(),this},e.prototype.restore=function(){return i.prototype.restore.call(this),this.backgroundElement.restore(),this},e.prototype.isDisposed=function(){return i.prototype.isDisposed.call(this)&&this.backgroundElement.isDisposed()},e.prototype.setPadding=function(t){return this.hh="object"==typeof t?x(this.hh,t):{left:t,top:t,right:t,bottom:t},this.wf.xn(),this},e.prototype.getPadding=function(){return this.hh},e.prototype.getSize=function(n){void 0===n&&(n=t.UISpace.Everything);var e=i.prototype.getSize.call(this,n);return n>=t.UISpace.PaddedContent&&(e=l(e.x+this.hh.left+this.hh.right,e.y+this.hh.bottom+this.hh.top)),n>=t.UISpace.PaddedBackground&&(e=l(e.x+this.backgroundElement.If()+this.backgroundElement.Of(),e.y+this.backgroundElement.Pf()+this.backgroundElement.Df())),e},e.prototype.getPosition=function(n,e){if(void 0===n&&(n=this.origin),void 0===e&&(e=t.UISpace.Everything),e===t.UISpace.Everything)return i.prototype.getPosition.call(this,n,e);var r=i.prototype.getPosition.call(this,l(-1,-1),t.UISpace.Everything),s=this.getMargin(),o=this.scale.Li(r,{x:s.left,y:s.bottom});if(e===t.UISpace.PaddedBackground){var h=this.getSize(t.UISpace.PaddedBackground);return this.scale.Li(o,lo({x:(n.x+1)/2,y:(n.y+1)/2},h))}var u=this.scale.Li(o,{x:this.backgroundElement.If(),y:this.backgroundElement.Pf()});if(e===t.UISpace.PaddedContent){var a=this.getSize(t.UISpace.PaddedContent);return this.scale.Li(u,lo({x:(n.x+1)/2,y:(n.y+1)/2},a))}var f=this.getPadding(),c=this.scale.Li(u,{x:f.left,y:f.bottom}),d=this.getSize(t.UISpace.Content);return this.scale.Li(c,lo({x:(n.x+1)/2,y:(n.y+1)/2},d))},e.prototype.setMouseInteractions=function(t){return this.backgroundElement.setMouseInteractions(t),this},e.prototype.getMouseInteractions=function(){return this.backgroundElement.getMouseInteractions()},e.prototype.getHighlighted=function(){return this.Bf},e.prototype.setHighlighted=function(t){return this.Bf=t,this.backgroundElement.setHighlighted(t),this.an.emit("highlight",t),this},e}(JE),$E=function(t){function i(i,n,e,r,s,o,h,u,a,f,c,l){var d=t.call(this)||this;return d._f=n,d.Rf=e,d.axisScale=r,d.renderingScale=s,d.zf=h,d.Ef=u,d.Nf=a,d.uo=f,d.ao=c,d.Vf=d.gf(d._f.Gf(d.renderingScale)),d.u=0,d.Hf=1,d.jf=!1,d.Wf=new sh,d.Uf=!0,d.vn=l,d.Yf=d.gf(d.Nf.Xf(d.Rf,d.renderingScale,o,Cr,Cr,d.vn,!1).setOrigin(es(d.Ef)).setDirection(d.Ef)),d.axis=i,d.setMouseInteractions(!1),d.Vf.na(l.customTickGridStrokeStyle),d}return n(i,t),i.prototype.setValue=function(t){return this.u=t,this.Rf.xn(),this.an.emit("valueChange",this.u),this},i.prototype.getValue=function(){return this.u},i.prototype.setTextFormatter=function(t){return this.Zf=t,this.Rf.xn(),this},i.prototype.setTickLength=function(t){return this.Yf.setPointerLength(t),this._f.xn(),this},i.prototype.getTickLength=function(){return this.Yf.getPointerLength()},i.prototype.setTickLabelPadding=function(t){return this.Yf.setTickLabelPadding(t),this._f.xn(),this},i.prototype.setTickLabelRotation=function(t){return this.Yf.setTextRotation(t),this._f.xn(),this},i.prototype.getTickLabelRotation=function(){return this.Yf.getTextRotation()},i.prototype.getTickLabelPadding=function(){return this.Yf.getTickLabelPadding()},i.prototype.setGridStrokeLength=function(t){return this.Hf=t,this._f.xn(),this},i.prototype.getGridStrokeLength=function(){return this.Hf},i.prototype.setGridStrokeStyle=function(t){return this.Vf.na(t),this._f.xn(),this},i.prototype.getGridStrokeStyle=function(){return this.Vf.ea()},i.prototype.restore=function(){return this.Vf.restore(),this.jf||this.Yf.restore(),this.ao(this),this._f.oo.xn(),this},i.prototype.dispose=function(){return this.Vf.dispose(),this.Yf.dispose(),this.uo(this),this._f.oo.xn(),this},i.prototype.isDisposed=function(){return this.Vf.isDisposed()&&this.Yf.isDisposed()},i.prototype.disposeMarker=function(){return this.jf=!0,this.Yf.dispose(),this.Rf.xn(),this},i.prototype.restoreMarker=function(){return this.jf=!1,this.isDisposed()||this.Yf.restore(),this.Rf.xn(),this},i.prototype.isDisposedMarker=function(){return this.jf},i.prototype.setMarker=function(t){return t(this.Yf),this.Rf.xn(),this},i.prototype.getMarker=function(){return this.Yf},i.prototype.setMouseInteractions=function(t){return this.Yf.setMouseInteractions(t),this.Vf.setMouseInteractions(t),this},i.prototype.getMouseInteractions=function(){return this.Vf.getMouseInteractions()},i.prototype.setAllocatesAxisSpace=function(t){return this.Uf=t,this.Rf.xn(),this},i.prototype.getAllocatesAxisSpace=function(){return this.Uf},i.prototype.isInScale=function(){return Gs(this.u,this.axisScale.getInnerStart(),this.axisScale.getInnerEnd())},i.prototype.onValueChange=function(t){return this.an.on("valueChange",t)},i.prototype.offValueChange=function(t){return this.an.off(t,"valueChange")},i}(XE),tN=function(t){function i(i,n,e,r,s,o,h,u,a,f,c,l){var d=t.call(this,i,n,e,r,s,o,h,u,l,f,a,c)||this;return d._f=n,d.Rf=e,d.Qh=a,d.uo=f,d.vn=c,d.Kf=!1,d}return n(i,t),i.prototype.isDisposed=function(){return!this.Kf&&t.prototype.isDisposed.call(this)},i.prototype.dispose=function(){return this.Kf=!1,t.prototype.dispose.call(this)},i.prototype.update=function(){return this},i.prototype.plot=function(t,i,n,e){if(this.isInScale()){this.Kf=!1;var r=rr(this.u,this.axisScale,this.zf.getWidth(this.renderingScale));this.Vf.restore().ha(this.zf.toPoint(r,t)).Ku(this.zf.toPoint(r,t-(n+i*this.Hf))),this.jf||(this.Zf&&this.Yf.setText(this.Zf(this.u,this)),this.Yf.restore().setPosition(this.zf.toPoint(r,e)).Fe().Tf())}else this.Vf.dispose(),this.Yf.dispose();return this},i.prototype.qf=function(){var t=this.Yf.Fe().getSize();return this.zf.getHeight(t)},i}($E);t.HighlightModes=void 0,(IE=t.HighlightModes||(t.HighlightModes={}))[IE.noHighlighting=0]="noHighlighting",IE[IE.onHover=1]="onHover",IE[IE.onHoverIndividual=2]="onHoverIndividual";var iN,nN=function(){function i(i,n,e,r){var s=this;this.vr=i,this.Jf=n,this.Qf=e,this.vn=r,this.$f=!0,this.Bf=!1,this.tc=t.HighlightModes.noHighlighting,this.ic=[],this.So=!1,this.nc=0,this.an=new qe,this.rc=this.$f,this.sc=[],this.oc=function(t,i){i?s.restore():s.dispose()},this.onEntryMouseEnter=function(){return s.setHighlighted(!0)},this.onEntryMouseLeave=function(){return s.setHighlighted(!1)},this.onMouseEnter=function(t){return s.an.on("mouseEnter",t)},this.onMouseLeave=function(t){return s.an.on("mouseLeave",t)},this.onMouseClick=function(t){return s.an.on("mouseClick",t)},this.onMouseDoubleClick=function(t){return s.an.on("mouseDoubleClick",t)},this.onMouseDown=function(t){return s.an.on("mouseDown",t)},this.onMouseUp=function(t){return s.an.on("mouseUp",t)},this.onMouseMove=function(t){return s.an.on("mouseMove",t)},this.offMouseEnter=function(t){return s.an.off(t,"mouseEnter")},this.offMouseLeave=function(t){return s.an.off(t,"mouseLeave")},this.offMouseClick=function(t){return s.an.off(t,"mouseClick")},this.offMouseDoubleClick=function(t){return s.an.off(t,"mouseDoubleClick")},this.offMouseDown=function(t){return s.an.off(t,"mouseDown")},this.offMouseUp=function(t){return s.an.off(t,"mouseUp")},this.offMouseMove=function(t){return s.an.off(t,"mouseMove")},this.offMouseDragStart=function(t){return s.an.off(t,"mouseDragStart")},this.offMouseDrag=function(t){return s.an.off(t,"mouseDrag")},this.offMouseDragStop=function(t){return s.an.off(t,"mouseDragStop")},this.offMouseWheel=function(t){return s.an.off(t,"mouseWheel")},this.hc=function(t,i){0===s.nc&&s.an.emit("mouseEnter",s,i);var n=l(i.clientX,i.clientY);s.uc(t,n)},this.ac=function(t,i){1===s.nc&&s.an.emit("mouseLeave",s,i),s.fc(t)},this.cc=function(t,i){s.an.emit("mouseMove",s,i),s.lc(t,l(i.clientX,i.clientY))},this.dc=function(t,i){return s.an.emit("mouseClick",s,i)},this.vc=function(t,i){return s.an.emit("mouseDoubleClick",s,i)},this.yc=function(t,i){return s.an.emit("mouseDown",s,i)},this.Sc=function(t,i){return s.an.emit("mouseUp",s,i)},this.mc=function(t,i,n){s.an.emit("mouseDragStart",s,i,n)},this.bc=function(t,i,n,e,r){s.an.emit("mouseDrag",s,i,n,e,r)},this.gc=function(t,i,n,e){s.an.emit("mouseDragStop",s,i,n,e)},this.wc=function(t,i){s.an.emit("mouseWheel",s,i)},this.kc=function(t,i){s.an.emit("touchStart",s,i),s.uc(t,l(i.clientX,i.clientY))},this.xc=function(t,i){s.an.emit("touchMove",s,i),s.lc(void 0,l(i.clientX,i.clientY))},this.Mc=function(t,i){s.an.emit("touchEnd",s,i),s.fc(t)}}return i.prototype.onHighlight=function(t){return this.an.on("highlight",t)},i.prototype.offHighlight=function(t){return this.an.off(t)},i.prototype.setName=function(t){var i=this;return this.Mt=t,this.sc.forEach((function(t){return t.setText(i.Mt)})),this},i.prototype.getName=function(){return this.Mt},i.prototype.isDisposed=function(){return this.So},i.prototype.dispose=function(){this.So=!0;var t=this.ic.slice();return t.forEach(Tr),this.ic=t,this.sc.forEach((function(t){return t.getOn()?t.setOn(!1):void 0})),this.Jf(this),this.vr.engine.xn(),this},i.prototype.restore=function(){return this.So=!1,this.ic.forEach(Fr),this.sc.forEach((function(t){return t.getOn()?void 0:t.setOn(!0)})),this.Qf(this),this.vr.engine.xn(),this},i.prototype.setHighlighted=function(t){var i=this;return this.Bf=t,this.ic.forEach((function(n){return i.Ac(n,t)})),this.an.emit("highlight",t),this.vr.engine.xn(),this},i.prototype.getHighlighted=function(){return this.Bf},i.prototype.Fc=function(t){this.$f=t;for(var i=0;i<this.ic.length;i+=1)this.ic[i].setMouseInteractions(t);return this},i.prototype.Tc=function(){this.$f=this.rc;for(var t=0;t<this.ic.length;t+=1)this.ic[t].setMouseInteractions(this.rc);return this},i.prototype.setMouseInteractions=function(t){this.$f=t,this.rc=t;for(var i=0;i<this.ic.length;i+=1)this.ic[i].setMouseInteractions(t);return this},i.prototype.getMouseInteractions=function(){return this.$f},i.prototype.getIsUnderMouse=function(){return this.nc>0},i.prototype.setHighlightOnHover=function(i){return this.tc=i?t.HighlightModes.onHover:t.HighlightModes.noHighlighting,!1===i&&this.Bf&&this.setHighlighted(!1),this},i.prototype.getHighlightOnHover=function(){return this.tc!==t.HighlightModes.noHighlighting},i.prototype.Cc=function(t,i){return void 0===i&&(i=this.ic),i.includes(t)||(i.push(t),t.setIsUnderMouse(this.nc>0).setMouseInteractions(this.$f).setMouseEnterEventHandler(this.hc).setMouseLeaveEventHandler(this.ac).setMouseClickEventHandler(this.dc).setMouseDoubleClickEventHandler(this.vc).setMouseDownEventHandler(this.yc).setMouseUpEventHandler(this.Sc).setMouseMoveEventHandler(this.cc).setMouseDragStartEventHandler(this.mc).setMouseDragEventHandler(this.bc).setMouseDragStopEventHandler(this.gc).setMouseWheelEventHandler(this.wc).setTouchStartEventHandler(this.kc).setTouchMoveEventHandler(this.xc).setTouchEndEventHandler(this.Mc)),t},i.prototype.attach=function(t,i){void 0===i&&(i=!0),t.setText(this.Mt),t.setButtonOffStrokeStyle(t.getButtonOffStrokeStyle().set("thickness",1)),t.setButtonOnStrokeStyle(t.getButtonOnStrokeStyle().set("thickness",1));var n=t.getLocked();return t.setLocked(!1).setOn(!this.isDisposed()).setLocked(n),i&&t.onSwitch(this.oc),t.setLocked(!i),t.onMouseEnter(this.onEntryMouseEnter),t.onMouseLeave(this.onEntryMouseLeave),this.onMouseEnter((function(){return t.setHighlighted(!0)})),this.onMouseLeave((function(){return t.setHighlighted(!1)})),this.onTouchStart((function(){return t.setHighlighted(!0)})),this.onTouchEnd((function(){return t.setHighlighted(!1)})),this.sc.push(t),this},i.prototype.onMouseDragStart=function(t){return this.an.on("mouseDragStart",t)},i.prototype.onMouseDrag=function(t){return this.an.on("mouseDrag",t)},i.prototype.onMouseDragStop=function(t){return this.an.on("mouseDragStop",t)},i.prototype.onMouseWheel=function(t){return this.an.on("mouseWheel",t)},i.prototype.onTouchStart=function(t){return this.an.on("touchStart",t)},i.prototype.onTouchMove=function(t){return this.an.on("touchMove",t)},i.prototype.onTouchEnd=function(t){return this.an.on("touchEnd",t)},i.prototype.offTouchStart=function(t){return this.an.off(t,"touchStart")},i.prototype.offTouchMove=function(t){return this.an.off(t,"touchMove")},i.prototype.offTouchEnd=function(t){return this.an.off(t,"touchEnd")},i.prototype.uc=function(i,n,e){void 0===e&&(e=1),this.nc+=e,this.tc===t.HighlightModes.onHoverIndividual&&this.Ac(i,!0),this.nc===e&&this.tc===t.HighlightModes.onHover&&this.setHighlighted(!0)},i.prototype.fc=function(i,n){void 0===n&&(n=1),this.nc=Math.max(0,this.nc-n),this.tc===t.HighlightModes.onHoverIndividual&&this.Ac(i,!1),0===this.nc&&this.tc===t.HighlightModes.onHover&&this.setHighlighted(!1)},i.prototype.lc=function(t,i){},i}(),eN=function(t){function i(i,n,e,r,s,o,h,u){var a=t.call(this,n,e,r,u)||this;return a.wf=i,a.axis=s,a.Rt=o,a.Bc=h,a.Lc(),a}return n(i,t),i.prototype.lc=function(){},i}(nN),rN=function(i){function e(){var t=null!==i&&i.apply(this,arguments)||this;return t.Mt="Band",t.Ic=0,t.Oc=0,t.Ho=new c(t.vn.bandFillStyle),t.Zo=new c(t.vn.bandStrokeStyle),t.Ut=t.Cc(t.wf.Pc(t.Rt)).$n(t.Ho.L()).Ys(t.Zo.L()),t}return n(e,i),e.prototype.setValueStart=function(t){return this.Ic=t,this.an.emit("valueChange",this,this.Ic,this.Oc),this.wf.xn(),this},e.prototype.getValueStart=function(){return this.Ic},e.prototype.setValueEnd=function(t){return this.Oc=t,this.an.emit("valueChange",this,this.Ic,this.Oc),this.wf.xn(),this},e.prototype.getValueEnd=function(){return this.Oc},e.prototype.setFillStyle=function(t){this.Ho.C(t);var i=this.Ho.D(this.Bf);return this.Ut.$n(i),this.wf.xn(),this},e.prototype.getFillStyle=function(){return this.Ho.L()},e.prototype.setFillStyleHighlight=function(t){if(this.Ho.I(t),this.getHighlighted()){var i=this.Ho.D(!0);this.Ut.$n(i)}return this.wf.xn(),this},e.prototype.getFillStyleHighlight=function(){return this.Ho.D(!0)},e.prototype.setStrokeStyle=function(t){this.Zo.C(t);var i=this.Zo.D(this.Bf);return this.Ut.Ys(i),this.wf.xn(),this},e.prototype.getStrokeStyle=function(){return this.Zo.L()},e.prototype.setStrokeStyleHighlight=function(t){if(this.Zo.I(t),this.getHighlighted()){var i=this.Zo.D(!0);this.Ut.Ys(i)}return this.wf.xn(),this},e.prototype.getStrokeStyleHighlight=function(){return this.Zo.D(!0)},e.prototype.onValueChange=function(t){return this.an.on("valueChange",t)},e.prototype.offValueChange=function(t){return this.an.off(t,"valueChange")},e.prototype.Tf=function(){return this.Ut.ph(this.Bc.toVec2(this.Ic,this.Bc.getHeight(this.Rt).getInnerStart())).oi(this.Bc.toVec2(this.Oc-this.Ic,this.Bc.getHeight(this.Rt).getInnerInterval())),this},e.prototype.attach=function(t,n){return i.prototype.attach.call(this,t,n),ks(t,this.vn,{fill:this.Ho,stroke:this.Zo}),this},e.prototype.Ac=function(t,i){t.$n(this.Ho.D(i)),this.wf.xn()},e.prototype.Lc=function(){var i,n,e=this,r=function(t,r){var s=sr(e.wf.oo.ds(r.x,r.y),e.wf.oo.Rt,e.Rt),o=e.Bc.getWidth(s),h=e.axis.Rt._t(e.Ic),u=e.axis.Rt._t(e.Oc),a=(e.axis.Rt._t(o)-h)/(u-h);!1===(i=!(a<.1||a>.9))&&(n=a<.5)},s=function(t,r,s,o,h){var u=e.Bc.getWidth(o);i?(e.Ic=e.axis.Rt.Li(e.Ic,u),e.Oc=e.axis.Rt.Li(e.Oc,u)):n?e.Ic=e.axis.Rt.Li(e.Ic,u):e.Oc=e.axis.Rt.Li(e.Oc,u),ss(h),e.an.emit("valueChange",e,e.Ic,e.Oc),e.wf.xn()};this.onMouseMove((function(n,s){r(0,l(s.clientX,s.clientY));var o=i?t.MouseStyles.Point:e.Bc.getWidth({x:t.MouseStyles.Horizontal,y:t.MouseStyles.Vertical});e.Dc=e.vr.engine.setMouseStyle(o,e.Dc)})),this.onMouseLeave((function(){e.vr.engine.restoreMouseStyle(e.Dc),e.Dc=void 0})),this.onMouseDrag((function(t,i,n,e,r){0===n&&s(0,0,0,r,i)}));var o=WE(new UE.Drag(r,s));this.onTouchStart(o.onTouchStart),this.onTouchMove(o.onTouchMove),this.onTouchEnd(o.onTouchEnd)},e}(eN),sN=function(i){function e(){var t=null!==i&&i.apply(this,arguments)||this;return t.Mt="Constant Line",t.u=0,t.Zo=new c(t.vn.constantLineStrokeStyle),t.Wt=t.Cc(t.wf.Gf(t.Rt)).na(t.Zo.L()),t}return n(e,i),e.prototype.setValue=function(t){return this.u=t,this.an.emit("valueChange",this,this.u),this.wf.xn(),this},e.prototype.getValue=function(){return this.u},e.prototype.setStrokeStyle=function(t){this.Zo.C(t);var i=this.Zo.D(this.Bf);return this.Wt.na(i),this.wf.xn(),this},e.prototype.getStrokeStyle=function(){return this.Zo.L()},e.prototype.setStrokeStyleHighlight=function(t){if(this.Zo.I(t),this.getHighlighted()){var i=this.Zo.D(!0);this.Wt.na(i)}return this.wf.xn(),this},e.prototype.getStrokeStyleHighlight=function(){return this.Zo.D(!0)},e.prototype.onValueChange=function(t){return this.an.on("valueChange",t)},e.prototype.offValueChange=function(t){return this.an.off(t,"valueChange")},e.prototype.Tf=function(){return this.Wt.ha(this.Bc.toVec2(this.u,this.Bc.getHeight(this.Rt).getInnerStart())).Ku(this.Bc.toVec2(this.u,this.Bc.getHeight(this.Rt).getInnerEnd())),this},e.prototype.attach=function(t,n){return i.prototype.attach.call(this,t,n),ks(t,this.vn,{stroke:this.Zo}),this},e.prototype.Ac=function(t,i){t.na(this.Zo.D(i)),this.wf.xn()},e.prototype.Lc=function(){var i=this,n=function(t,n,e,r){i.u=i.axis.Rt.Li(i.u,i.Bc.getWidth(r)),i.an.emit("valueChange",i,i.u),i.wf.xn()};this.onMouseMove((function(){var n=i.Bc.getWidth({x:t.MouseStyles.Horizontal,y:t.MouseStyles.Vertical});i.Dc=i.vr.engine.setMouseStyle(n,i.Dc)})),this.onMouseLeave((function(){i.vr.engine.restoreMouseStyle(i.Dc),i.Dc=void 0})),this.onMouseDrag((function(t,i,e,r,s){0===e&&n(0,0,0,s)}));var e=WE(new UE.Drag(void 0,n));this.onTouchStart(e.onTouchStart),this.onTouchMove(e.onTouchMove),this.onTouchEnd(e.onTouchEnd)},e}(eN),oN=function(t,i){return t.setTextFillStyle(i.uiTextFillStyle).setTextFont(i.uiFont)},hN=function(t,i){return ks(t.setButtonOffSize(i.uiButtonSize).setButtonOnSize(i.uiButtonSize),i,{fill:i.uiButtonFillStyle}),t},uN=function(t,i,n){n&&"setBackground"in t&&t.setBackground((function(t){return t.setFillStyle(i.uiBackgroundFillStyle).setStrokeStyle(i.uiBackgroundStrokeStyle)}))},aN={uiElement:void 0,stylers:dn(),addStyler:function(t){return e(e({},this),{stylers:this.stylers.push(t)})},applyStylers:function(t,i){return this.stylers.forEach((function(n){return void 0!==n?n(t,i):void 0})),t}},fN={background:void 0,setBackground:function(t){return e(e({},this),{background:t})}},cN={Xf:function(t,i,n,e,r,s,o){var h=this.applyStylers(new this.uiElement(t,i,n,e,r,s),s);return uN(h,s,o),h}},lN={Xf:function(t,i,n,e,r,s,o){var h=this.applyStylers(new this.uiElement(t,i,n,this.background,e,r,s),s);return uN(h,s,o),h}},dN=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i._c=!0,i}return n(i,t),i.prototype.Tf=function(){return t.prototype.Tf.call(this),this},i.prototype.setMouseInteractions=function(t){return this._c=t,this},i.prototype.getMouseInteractions=function(){return this._c},i}(JE),vN=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return n(i,t),i.prototype.onHighlight=function(t){return this.an.on("highlight",t)},i.prototype.offHighlight=function(t){return this.an.off(t)},i.prototype.Lf=function(t){return this.size=t,this},i.prototype.If=function(){return 0},i.prototype.Of=function(){return 0},i.prototype.Df=function(){return 0},i.prototype.Pf=function(){return 0},i.prototype.getHighlighted=function(){return!1},i.prototype.setHighlighted=function(){return this},i.prototype.setFillStyleHighlight=function(){return this},i.prototype.getFillStyleHighlight=function(){return Re},i.prototype.setFillStyle=function(){return this},i.prototype.getFillStyle=function(){return Re},i.prototype.setStrokeStyle=function(){return this},i.prototype.getStrokeStyle=function(){return ir},i.prototype.setStrokeThickness=function(){return this},i.prototype.getStrokeThickness=function(){return 0},i}(dN),yN=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.setSize=i.Lf.bind(i),i}return n(i,t),i}(vN),SN=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.Ho=new c(Re),i.an=new qe,i.Bf=!1,i}return n(i,t),i.prototype.onHighlight=function(t){return this.an.on("highlight",t)},i.prototype.offHighlight=function(t){return this.an.off(t)},i.prototype.setFillStyle=function(t){return this.Ho.C(t),this._h.$n(this.Ho.D(this.Bf)),this.wf.xn(),this},i.prototype.getFillStyle=function(){return this.Ho.L()},i.prototype.setFillStyleHighlight=function(t){return this.Ho.I(t),this._h.$n(this.Ho.D(this.Bf)),this},i.prototype.getFillStyleHighlight=function(){return this.Ho.P()},i.prototype.getHighlighted=function(){return this.Bf},i.prototype.setHighlighted=function(t){return this.Bf=t,this._h.$n(this.Ho.D(t)),this.an.emit("highlight",t),this.wf.xn(),this},i.prototype.setMouseInteractions=function(t){return this._h.setMouseInteractions(t),this},i.prototype.getMouseInteractions=function(){return this._h.getMouseInteractions()},i.prototype.dispose=function(){return t.prototype.dispose.call(this),this._h.dispose(),this},i.prototype.restore=function(){return t.prototype.restore.call(this),this._h.restore(),this},i.prototype.isDisposed=function(){return t.prototype.isDisposed.call(this)&&this._h.isDisposed()},i}(JE),mN=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.Zo=new c(ir),i}return n(i,t),i.prototype.setStrokeStyle=function(t){return this.Zo.C(t),this._h.Ys(this.Zo.D(this.getHighlighted())),this.wf.xn(),this},i.prototype.getStrokeStyle=function(){return this.Zo.L()},i.prototype.setStrokeStyleHighlight=function(t){return this.Zo.I(t),this._h.Ys(this.Zo.D(this.getHighlighted())),this},i.prototype.getStrokeStyleHighlight=function(){return this.Zo.P()},i.prototype.setHighlighted=function(i){return t.prototype.setHighlighted.call(this,i),this._h.Ys(this.Zo.D(i)),this},i}(SN),bN=function(t){function i(i,n,e,r,s,o,h){var u=t.call(this,i,n,e,s,o,h)||this;return u.wf=i,u._h=u.wf.Rc(u.renderingScale,r).Ys(u.getStrokeStyle()).$n(u.getFillStyle()),u.gf(u._h),u}return n(i,t),i.prototype.zc=function(){var t=this,i=this.Ec();if(i.length>2){var n=Ks(i),e=l(n.max.x-n.min.x,n.max.y-n.min.y);this.setContentSize(e);var r=i.map((function(i){var r=fo(i,ao(n.min,-1));return t.scale.Li(t.position,fo(r,lo(ao(fo(t.origin,l(1,1)),-.5),e)))})).map((function(i){return sr(i,t.scale,t.renderingScale)}));this._h.au(r)}else this._h&&this._h.dispose(),this.setContentSize(l(0,0))},i.prototype.Tf=function(){return t.prototype.Tf.call(this),t.prototype.isDisposed.call(this)||this.zc(),this},i.prototype.Fe=function(){return this.zc(),t.prototype.Fe.call(this)},i}(mN),gN=function(i){function e(t,n,e,r,s,o){var h=i.call(this,t,n,e,r,s,o)||this;return h.$o="label",h._h=h.wf.$e(h.renderingScale).$n(h.Ho.D(h.getHighlighted())).Jn(h.$o),h.gf(h._h),h}return n(e,i),e.prototype.Tf=function(){var i=this.getPosition(l(0,0),t.UISpace.Content),n=sr(i,this.scale,this.renderingScale);return this._h.ph(n),this},e.prototype.Fe=function(){this._h.Fe();var t=0===this.$o.length?l(0,0):this._h.Nc();return this.setContentSize(t),i.prototype.Fe.call(this)},e.prototype.setText=function(t){return this.$o=t,this._h.Jn(this.$o),this.wf.xn(),this},e.prototype.getText=function(){return this.$o},e.prototype.setFont=function(t){return this._h.ie(t),this.wf.xn(),this},e.prototype.getFont=function(){return this._h.te()},e.prototype.setTextRotation=function(t){return this._h.ne(t),this.wf.xn(),this},e.prototype.getTextRotation=function(){return this._h.ee()},e}(SN),wN=e(e(e({},aN),cN),{uiElement:gN}),pN=function(i){function e(t,n,e,r,s,o){var h=i.call(this,t,n,e,r,s,o)||this;return h.fitTo=h.Lf.bind(h),h.setSize=h.fitTo,h._h=h.wf.Pc(n).$n(h.Ho.D(h.getHighlighted())).Ys(h.getStrokeStyle()),h.gf(h._h),h}return n(e,i),e.prototype.Tf=function(){var i=this,n=Ks([this.getPosition(l(-1,-1),t.UISpace.Content),this.getPosition(l(1,1),t.UISpace.Content)].map((function(t){return sr(t,i.scale,i.renderingScale)}))),e={x:n.max.x-n.min.x,y:n.max.y-n.min.y};return this._h.oi(e).ph(sr(this.getPosition(l(-1,-1),t.UISpace.Content),this.scale,this.renderingScale)).Fe(),this},e.prototype.Lf=function(t){return this.setContentSize(t),this.wf.xn(),this},e.prototype.If=function(){return 0},e.prototype.Of=function(){return 0},e.prototype.Df=function(){return 0},e.prototype.Pf=function(){return 0},e}(mN),kN=function(i){function e(t,n,e,r,s,o){var h=i.call(this,t,n,e,r,s,o)||this;return h.Vc=l(0,0),h.setSize=h.fitTo.bind(h),h._h=t.Gc(n).Zu(0).Ku(360).$n(h.Ho.D(h.getHighlighted())).Ys(h.getStrokeStyle()),h.gf(h._h),h}return n(e,i),e.prototype.Tf=function(){var i=this.getSize(t.UISpace.Content).x/2;return this._h.Ju(i*this.renderingScale.tn().x).Qu(i*this.renderingScale.tn().y).ph(sr(this.getPosition(l(0,0),t.UISpace.Content),this.scale,this.renderingScale)).ta(255).Fe(),this},e.prototype.Lf=function(t){var i=Math.sqrt(t.x*t.x/4+t.y*t.y/4);return this.setContentSize(l(2*i,2*i)),this.Vc=t,this.wf.xn(),this},e.prototype.If=function(){return(this.getSize(t.UISpace.Content).x-this.Vc.x)/2},e.prototype.Of=function(){return(this.getSize(t.UISpace.Content).x-this.Vc.x)/2},e.prototype.Df=function(){return(this.getSize(t.UISpace.Content).y-this.Vc.y)/2},e.prototype.Pf=function(){return(this.getSize(t.UISpace.Content).y-this.Vc.y)/2},e.prototype.fitTo=function(t){var i=Math.min(t.x,t.y);return this.setContentSize(l(i,i)),this.Vc=t,this},e}(mN),xN=function(i){function e(t,n,e,r,s,o){var h=i.call(this,t,n,e,CE.Convex,r,s,o)||this;return h.wf=t,h.Hc=w(l(0,0)),h.jc=!1,h.setSize=h.fitTo.bind(h),h.zc(),h}return n(e,i),e.prototype.Ec=function(){var t=this.Hc.S();if(this.jc){var i=Math.min(t.x,t.y);return[l(0,0),l(i/2,i/2),l(0,i),l(-i/2,i/2)]}var n=2*Math.sqrt(this.Hc.S().x*this.Hc.S().x/4+this.Hc.S().y*this.Hc.S().y/4),e=l(Math.cos(Math.PI/4)*n,0),r=l(0,Math.sin(Math.PI/4)*n),s=l(0,0),o=fo(s,fo(e,r)),h=fo(o,fo(r,ao(e,-1)));return[s,o,h,co(h,fo(e,r))]},e.prototype.Lf=function(t){return this.Hc.l(t),this.jc=!1,this.wf.xn(),this},e.prototype.If=function(){return this.jc?0:(this.getSize(t.UISpace.Content).x-this.Hc.S().x)/2},e.prototype.Of=function(){return this.jc?0:(this.getSize(t.UISpace.Content).x-this.Hc.S().x)/2},e.prototype.Df=function(){return this.jc?0:(this.getSize(t.UISpace.Content).y-this.Hc.S().y)/2},e.prototype.Pf=function(){return this.jc?0:(this.getSize(t.UISpace.Content).y-this.Hc.S().y)/2},e.prototype.fitTo=function(t){return this.Hc.l(t),this.jc=!0,this.wf.xn(),this},e}(bN),MN=function(i){function e(n,e,r,s,o,h){var u=i.call(this,n,e,r,CE.Simple,s,o,h)||this;return u.Wc=w(l(0,0)),u.Uc=w(10),u.Yc=w(void 0),u.Ef=w(t.UIDirections.Right),u.zc(),u}return n(e,i),e.prototype.setDirection=function(t){return this.Ef.l(t),this.wf.xn(),this},e.prototype.getDirection=function(){return this.Ef.S()},e.prototype.setPointerLength=function(t){return this.Uc.l(t),this.wf.xn(),this},e.prototype.getPointerLength=function(){return this.Uc.S()},e.prototype.setPointerAngle=function(t){return this.Yc.l(t),this.wf.xn(),this},e.prototype.getPointerAngle=function(){var t=this.Yc.S();if(void 0===t){var i=this.Xc();if(0===i)return 0;t=0!==i?180*Math.atan(2*this.getPointerLength()/i)/Math.PI:0}return Math.min(Math.max(t,1),89)},e.prototype.Lf=function(t){return this.Wc.l(t),this.wf.xn(),this},e.prototype.Zc=function(){var t=this.getPointerAngle();return 0===t?0:2*this.getPointerLength()/Math.tan(t*Math.PI/180)},e.prototype.Kc=function(){return rs(this.Ef.S())?this.Wc.S().x:this.Wc.S().y},e.prototype.Xc=function(){return rs(this.Ef.S())?this.Wc.S().y:this.Wc.S().x},e.prototype.If=function(){switch(this.Ef.S()){case t.UIDirections.Right:return 0;case t.UIDirections.Left:return this.getPointerLength();case t.UIDirections.Up:case t.UIDirections.Down:return Math.max(0,this.Zc()-this.Xc());default:return 0}},e.prototype.Of=function(){switch(this.Ef.S()){case t.UIDirections.Right:return this.getPointerLength();case t.UIDirections.Left:return 0;case t.UIDirections.Up:case t.UIDirections.Down:return Math.max(0,this.Zc()-this.Xc());default:return 0}},e.prototype.Df=function(){switch(this.Ef.S()){case t.UIDirections.Right:case t.UIDirections.Left:return Math.max(0,this.Zc()-this.Xc());case t.UIDirections.Up:return this.getPointerLength();case t.UIDirections.Down:default:return 0}},e.prototype.Pf=function(){switch(this.Ef.S()){case t.UIDirections.Right:case t.UIDirections.Left:return Math.max(0,this.Zc()-this.Xc());case t.UIDirections.Up:return 0;case t.UIDirections.Down:return this.getPointerLength();default:return 0}},e.prototype.Ec=function(){var t=es(this.Ef.S()),i=ho(l(0,0),t),n=this.getPointerLength(),e=this.Zc(),r=this.Kc(),s=this.Xc();if(!(0!==n&&0!==e||0!==r&&0!==s))return[];var o=l(0,0),h=fo(fo(o,ao(t,-n)),ao(i,e/2)),u=fo(h,ao(i,(s-e)/2)),a=fo(u,ao(t,-r)),f=fo(fo(o,ao(t,-n)),ao(i,-e/2)),c=fo(f,ao(i,-(s-e)/2)),d=fo(c,ao(t,-r));return 0===r||0===s?[o,h,f]:0===n||0===e?[u,a,d,c]:Br(s,e)?[o,h,a,d,f]:[o,h,u,a,d,c,f]},e}(bN),AN=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return n(i,t),i.prototype.setSize=function(t){return this.setContentSize(t),this.wf.xn(),this},i}(dN),FN=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.qc=[],i.Jc=0,i.Qc=function(t){var n=i.qc.indexOf(t);n>=0&&i.qc.splice(n,1)},i.$c=function(t){i.qc.includes(t)||i.qc.push(t)},i}return n(i,t),i.prototype.getMembers=function(){return this.qc},i.prototype.getMemberCount=function(){return this.qc.length},i.prototype.setMinimumSize=function(t){return this.tl=t,this.wf.xn(),this},i.prototype.getMinimumSize=function(){return this.tl},i.prototype.addElement=function(t,i){void 0===i&&(i=-1);var n=t.Xf(this.wf,this.renderingScale,this.scale,this.Qc,this.$c,this.vn,!1);return n.setMouseInteractions(this.getMouseInteractions()),i>=0?this.qc.splice(i,0,n):this.qc.push(n),this.gf(n),Jr(!this.isDisposed())(n),n},i.prototype.dispose=function(){t.prototype.dispose.call(this);var i=this.qc.slice();return i.slice().forEach(Tr),this.qc=i,this},i.prototype.restore=function(){return t.prototype.restore.call(this),this.qc.forEach(Fr),this},i.prototype.isDisposed=function(){return this.qc.reduce((function(t,i){return!!t&&i.isDisposed()}),t.prototype.isDisposed.call(this))},i.prototype.setMouseInteractions=function(i){t.prototype.setMouseInteractions.call(this,i);for(var n=0;n<this.qc.length;n+=1)this.qc[n].setMouseInteractions(i);return this},i.prototype.getMouseInteractions=function(){if(t.prototype.getMouseInteractions.call(this))return!0;for(var i=0;i<this.qc.length;i+=1)if(this.qc[i].getMouseInteractions())return!0;return!1},i.prototype.setHighlighted=function(i){t.prototype.setHighlighted.call(this,i);for(var n=0;n<this.qc.length;n+=1){var e=this.qc[n];"getHighlighted"in(r=e)&&"setHighlighted"in r&&e.setHighlighted(i)}var r;return this},i}(QE),TN=function(i){function e(){return null!==i&&i.apply(this,arguments)||this}return n(e,i),e.prototype.Tf=function(){var n=this;i.prototype.Tf.call(this);var e=this.getPosition(l(-1,0),t.UISpace.Content),r=this.qc.reduce((function(t,i){return t+ +(i instanceof AN)}),0),s=r>0?(this.size.x-this.Jc)/r:0;return this.qc.reduce((function(t,i){return i instanceof AN?n.scale.Li({x:t,y:e.y},{x:s+i.getSize().x,y:0}).x:i.setOrigin(l(-1,0)).setPosition(l(t,e.y)).Tf().getPosition(l(1,0)).x}),e.x),this},e.prototype.Fe=function(){for(var t=0;t<this.qc.length;t+=1){(r=this.qc[t])instanceof CN&&r.setMinimumSize(0),r.Fe()}var n=this.qc.reduce(this.il.bind(this),d(0,0));this.Jc=n.x;var e=void 0===this.tl?n:l(Math.max(n.x,this.tl),n.y);this.setContentSize(e);for(t=0;t<this.qc.length;t+=1){var r;(r=this.qc[t])instanceof CN&&r.setMinimumSize(e.y).Fe()}return i.prototype.Fe.call(this)},e.prototype.il=function(t,i){var n=i.getSize();return t.x+=n.x,t.y=Math.max(t.y,n.y),t},e.prototype.addGap=function(t,i){return void 0===t&&(t=0),void 0===i&&(i=-1),this.addElement(BN,i).setSize(l(0,t))},e}(FN),CN=function(i){function e(){return null!==i&&i.apply(this,arguments)||this}return n(e,i),e.prototype.Tf=function(){var n=this;i.prototype.Tf.call(this);var e=this.getPosition(l(0,1),t.UISpace.Content),r=this.qc.reduce((function(t,i){return t+ +(i instanceof AN)}),0),s=r>0?(this.size.y-this.Jc)/r:0;return this.qc.reduce((function(t,i){return i instanceof AN?n.scale.Li({x:e.x,y:t},{x:0,y:-(s+i.getSize().y)}).y:i.setOrigin(l(0,1)).setPosition(l(e.x,t)).Tf().getPosition(l(0,-1)).y}),e.y),this},e.prototype.Fe=function(){for(var t=0;t<this.qc.length;t+=1){(r=this.qc[t])instanceof TN&&r.setMinimumSize(0),r.Fe()}var n=this.qc.reduce(this.il.bind(this),d(0,0));this.Jc=n.y;var e=void 0===this.tl?n:l(n.x,Math.max(n.y,this.tl));this.setContentSize(e);for(t=0;t<this.qc.length;t+=1){var r;(r=this.qc[t])instanceof TN&&r.setMinimumSize(e.x).Fe()}return i.prototype.Fe.call(this)},e.prototype.il=function(t,i){var n=i.getSize();return t.y+=n.y,t.x=Math.max(t.x,n.x),t},e.prototype.addGap=function(t,i){return void 0===t&&(t=0),void 0===i&&(i=-1),this.addElement(BN,i).setSize(l(0,t))},e}(FN),BN=e(e(e({},aN),cN),{uiElement:AN}),LN=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.qc=[],i}return n(i,t),i.prototype.addColumn=function(){return this.addElement(PN,void 0)},i.prototype.getColumn=function(t,i){return void 0===i&&(i=!1),i&&this.qc.length<=t?(this.addColumn(),this.getColumn(t,!0)):this.qc[t]},i}(TN),IN=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.qc=[],i}return n(i,t),i.prototype.addRow=function(){return this.addElement(DN,void 0)},i.prototype.getRow=function(t,i){return void 0===i&&(i=!1),i&&this.qc.length<=t?(this.addRow(),this.getRow(t,!0)):this.qc[t]},i}(CN),ON=e(e(e({},aN),fN),lN),PN=e(e({},ON),{uiElement:CN,background:pN}),DN=e(e({},ON),{uiElement:TN,background:pN}),_N={setTextLabel:null,setText:function(t){return this.setTextLabel.setText(t),this},getText:function(){return this.setTextLabel.getText()}},RN=function(t,i){var n={},e="stylable"+t+"s";return n[e]=i,n["set"+t+"FillStyle"]=function(t){return this[e].forEach((function(i){return i.setFillStyle(t)})),this},n["get"+t+"FillStyle"]=function(){return this[e][0].getFillStyle()},n["set"+t+"FillStyleHighlight"]=function(t){return this[e].forEach((function(i){return i.setFillStyleHighlight(t)})),this},n["get"+t+"FillStyleHighlight"]=function(){return this[e][0].getFillStyleHighlight()},n["set"+t+"Font"]=function(t){return this[e].forEach((function(i){return i.setFont(t)})),this},n["get"+t+"Font"]=function(){return this[e][0].getFont()},n["set"+t+"Rotation"]=function(t){return this[e].forEach((function(i){return i.setTextRotation(t)})),this},n["get"+t+"Rotation"]=function(){return this[e][0].getTextRotation()},n},zN=RN("Text",[]),EN={button:void 0,isLocked:!1,setOn:function(t){return this.isLocked||(this.button.setOn(t),this.an.emit("switch",t)),this},getOn:function(){return this.button.getOn()},setLocked:function(t){return this.isLocked=t,this},getLocked:function(){return this.isLocked},onSwitch:function(t){var i=this;return this.an.on("switch",(function(n){return t(i,n)}))},offSwitch:function(t){return this.an.off(t,"switch")},setButtonOffFillStyle:function(t){return this.button.setOffFillStyle(t),this},getButtonOffFillStyle:function(){return this.button.getOffFillStyle()},setButtonOffFillStyleHighlight:function(t){return this.button.setOffFillStyleHighlight(t),this},getButtonOffFillStyleHighlight:function(){return this.button.getOffFillStyleHighlight()},setButtonOffStrokeStyle:function(t){return this.button.setOffStrokeStyle(t),this},getButtonOffStrokeStyle:function(){return this.button.getOffStrokeStyle()},setButtonOffSize:function(t){return this.button.setOffSize(t),this},getButtonOffSize:function(){return this.button.getOffSize()},setButtonOnFillStyle:function(t){return this.button.setOnFillStyle(t),this},getButtonOnFillStyle:function(){return this.button.getOnFillStyle()},setButtonOnFillStyleHighlight:function(t){return this.button.setOnFillStyleHighlight(t),this},getButtonOnFillStyleHighlight:function(){return this.button.getOnFillStyleHighlight()},setButtonOnStrokeStyle:function(t){return this.button.setOnStrokeStyle(t),this},getButtonOnStrokeStyle:function(){return this.button.getOnStrokeStyle()},setButtonOnSize:function(t){return this.button.setOnSize(t),this},getButtonOnSize:function(){return this.button.getOnSize()}},NN={pointable:void 0,setDirection:function(t){return this.pointable.setDirection(t),this},getDirection:function(){return this.pointable.getDirection()},setPointerLength:function(t){return this.pointable.setPointerLength(t),this},getPointerLength:function(){return this.pointable.getPointerLength()}},VN=e(e(e({},aN),fN),{background:pN,Xf:function(t,i,n,e,r,s,o){var h=new TN(t,i,n,this.background,e,r,s),u=h.addElement(wN,void 0),a=Object.assign(h,_N,{setTextLabel:u},zN,{stylableTexts:[u]});return uN(a,s,o),this.applyStylers(a,s)}}).addStyler(oN),GN=e(e(e({},aN),fN),{background:MN,Xf:function(i,n,e,r,s,o,h){var u=new TN(i,n,e,this.background,r,s,o),a=u.addElement(wN,void 0),f=u.getBackground(),c=Object.assign(u,_N,{setTextLabel:a},zN,{stylableTexts:[a]},NN,{pointable:f},{setTickLabelPadding:function(i){return this.getDirection()===t.UIDirections.Up?this.setPadding({top:i}):this.getDirection()===t.UIDirections.Down?this.setPadding({bottom:i}):this.getDirection()===t.UIDirections.Right?this.setPadding({right:i}):this.getDirection()===t.UIDirections.Left&&this.setPadding({left:i}),this},getTickLabelPadding:function(){return this.getDirection()===t.UIDirections.Up?this.getPadding().top:this.getDirection()===t.UIDirections.Down?this.getPadding().bottom:this.getDirection()===t.UIDirections.Right?this.getPadding().right:this.getPadding().left}});return c.setPointerLength(o.numericTickStrategy.majorTickStyle.getTickLength()).setTickLabelPadding(o.numericTickStrategy.majorTickStyle.getTickPadding()).setTextFont(o.customTickMarkerFont||o.uiPointableTextBoxFont||oh).setTextFillStyle(o.customTickMarkerTextFillStyle||o.uiPointableTextBoxTextFillStyle||Re).setBackground((function(t){return t.setFillStyle(o.customTickMarkerFillStyle||o.uiPointableTextBoxFillStyle||Re).setStrokeStyle(o.customTickMarkerStrokeStyle||o.uiPointableTextBoxStrokeStyle||ir)})),c.dispose().restore(),uN(c,o,h),this.applyStylers(c,o)}}),HN=function(i){function e(t,n,e,r,s,o,h,u){var a=i.call(this,t,n,e,o,h,u)||this;return a.Ua=!1,a.an=new qe,a.getOn=function(){return a.Ua},a.nl=a.gf(new r(a.wf,a.renderingScale,a.scale,Cr,Cr)),a.el=a.gf(new s(a.wf,a.renderingScale,a.scale,Cr,Cr)),a}return n(e,i),e.prototype.onHighlight=function(t){return this.an.on("highlight",t)},e.prototype.offHighlight=function(t){return this.an.off(t)},e.prototype.setOn=function(t){return this.Ua=t,this.wf.xn(),this},e.prototype.setOffFillStyle=function(t){return this.nl.setFillStyle(t),this},e.prototype.getOffFillStyle=function(){return this.nl.getFillStyle()},e.prototype.setOffFillStyleHighlight=function(t){return this.nl.setFillStyleHighlight(t),this},e.prototype.getOffFillStyleHighlight=function(){return this.nl.getFillStyleHighlight()},e.prototype.setOffStrokeStyle=function(t){return this.nl.setStrokeStyle(t),this},e.prototype.getOffStrokeStyle=function(){return this.nl.getStrokeStyle()},e.prototype.setOffSize=function(t){return this.nl.fitTo("number"==typeof t?l(t,t):t),this},e.prototype.getOffSize=function(){return this.nl.getSize()},e.prototype.setOnFillStyle=function(t){return this.el.setFillStyle(t),this},e.prototype.getOnFillStyle=function(){return this.el.getFillStyle()},e.prototype.setOnFillStyleHighlight=function(t){return this.el.setFillStyleHighlight(t),this},e.prototype.getOnFillStyleHighlight=function(){return this.el.getFillStyleHighlight()},e.prototype.setOnStrokeStyle=function(t){return this.el.setStrokeStyle(t),this},e.prototype.getOnStrokeStyle=function(){return this.el.getStrokeStyle()},e.prototype.setOnSize=function(t){return this.el.fitTo("number"==typeof t?l(t,t):t),this},e.prototype.getOnSize=function(){return this.el.getSize()},e.prototype.Tf=function(){return i.prototype.Tf.call(this),i.prototype.isDisposed.call(this)||(this.Ua?(this.nl.dispose(),this.el.restore().setPosition(this.getPosition(l(0,0),t.UISpace.Content)).Tf()):(this.nl.restore().setPosition(this.getPosition(l(0,0),t.UISpace.Content)).Tf(),this.el.dispose())),this},e.prototype.Fe=function(){var t=this.nl.Fe().getSize(),n=this.el.Fe().getSize();return this.setContentSize(l(Math.max(t.x,n.x),Math.max(t.y,n.y))),i.prototype.Fe.call(this)},e.prototype.restore=function(){return i.prototype.restore.call(this),this.nl.restore(),this.el.restore(),this},e.prototype.dispose=function(){return i.prototype.dispose.call(this),this.nl.dispose(),this.el.dispose(),this},e.prototype.isDisposed=function(){return i.prototype.isDisposed.call(this)&&this.nl.isDisposed()&&this.el.isDisposed()},e.prototype.setMouseInteractions=function(t){return this.el.setMouseInteractions(t),this.nl.setMouseInteractions(t),this},e.prototype.getMouseInteractions=function(){return this.el.getMouseInteractions()},e.prototype.getHighlighted=function(){return this.el.getHighlighted()},e.prototype.setHighlighted=function(t){return this.el.setHighlighted(t),this.nl.setHighlighted(t),this.an.emit("highlight",t),this.wf.xn(),this},e}(JE),jN=e(e({},aN),{uiElement:HN,pictureOff:kN,pictureOn:kN,setPictureOff:function(t){return e(e({},this),{pictureOff:t})},setPictureOn:function(t){return e(e({},this),{pictureOn:t})},Xf:function(t,i,n,e,r,s,o){var h=this.applyStylers(new this.uiElement(t,i,n,this.pictureOff,this.pictureOn,e,r,s),s);return uN(h,s,o),h}}),WN=e(e(e({},aN),fN),{background:pN,buttonBuilder:jN,setPictureOff:function(t){return e(e({},this),{buttonBuilder:this.buttonBuilder.setPictureOff(t)})},setPictureOn:function(t){return e(e({},this),{buttonBuilder:this.buttonBuilder.setPictureOn(t)})},Xf:function(i,n,e,r,s,o,h){var u=new TN(i,n,e,this.background,r,s,o),a=u.addElement(PN);a.addGap();var f=a.addElement(this.buttonBuilder);a.addGap();var c=u.addElement(PN);c.addGap();var l=c.addElement(wN);c.addGap(),u.addGap();var d=Object.assign(u,_N,{setTextLabel:l},zN,{stylableTexts:[l]},EN,{button:f});d.setPadding({left:5});var v=function(){d.setOn(!d.getOn())};d.onMouseClick(v),d.onMouseEnter((function(){return d.setHighlighted(!0)})),d.onMouseLeave((function(){return d.setHighlighted(!1)})),d.setMouseStyle(t.MouseStyles.Point);var y=WE(new UE.Poke(v));return d.onTouchStart(y.onTouchStart),d.onTouchMove(y.onTouchMove),d.onTouchEnd(y.onTouchEnd),uN(d,o,h),this.applyStylers(d,o)}}).addStyler(oN).addStyler(hN),UN=function(i){function e(t,n,e,r,s,o,h){var u=i.call(this,t,n,e,r,s,o)||this;return u.wf=t,u.rl=h,u.sl=[],u.ol=2,u.hl="",u.ul=function(t,i){return void 0!==t.label?t.label:Do(t.value,i.min,i.max)},u.al=10,u.fl=0,u.cl=u.gf(t.Pc(n).Ys(ir)),u.ll=u.gf(t.$e(n).$n(o.uiTextFillStyle).ie(o.uiFont)),"vertical"===h?(u.dl=140,u.vl=25):(u.dl=160,u.vl=15),u}return n(e,i),e.prototype.yl=function(t){this.Sl=t;var i=function(t,i){var n=t.getSteps(),e=t.min,r=t.max-e;if(!0===t.getInterpolation())return new Qe({angle:i,stops:n.map((function(i,n){return{offset:(i.value-e)/r,color:i.color||t.color}}))});for(var s=[],o=0;o<n.length;o+=1){var h=n[o];s.push({offset:.9*(h.value-e)/r,color:h.color||t.color});var u=o<n.length-1?n[o+1]:void 0;s.push({offset:u?.9*(u.value-e)/r:1,color:h.color||t.color})}return new Qe({angle:i,stops:s})}(t,"vertical"===this.rl?0:90);return this.cl.$n(i),this.wf.xn(),this},e.prototype.ml=function(){return this.Sl},e.prototype.bl=function(t){return this.dl=t,this.wf.xn(),this},e.prototype.wl=function(){return this.dl},e.prototype.pl=function(t){return this.vl=t,this.wf.xn(),this},e.prototype.kl=function(){return this.vl},e.prototype.xl=function(t){return this.hl=t,this.wf.xn(),this},e.prototype.Ml=function(){return this.hl},e.prototype.Al=function(t){return this.ul=t,this.wf.xn(),this},e.prototype.setFillStyle=function(t){return this.ll.$n(t),this.wf.xn(),this},e.prototype.getFillStyle=function(){return this.ll.Qn()},e.prototype.setFillStyleHighlight=function(t){return this},e.prototype.getFillStyleHighlight=function(){},e.prototype.setFont=function(t){return this.ll.ie(t),this.wf.xn(),this},e.prototype.getFont=function(){return this.ll.te()},e.prototype.setTextRotation=function(t){return this.fl=t,this.ll.ne(t),this.wf.xn(),this},e.prototype.getTextRotation=function(){return this.ll.ee()},e.prototype.Tf=function(){var n=this;if(i.prototype.Tf.call(this),i.prototype.isDisposed.call(this))return this;var e=this.Sl;if(e){var r=this.renderingScale.tn();if("vertical"===this.rl){var s={x:(a=fo(f=this.getPosition({x:-1,y:-1},t.UISpace.Content),{x:this.cl.vi().x+this.ol*r.x,y:0})).x,y:a.y+(this.hl.length>0?this.al*r.y+this.ll.vi().y:0)+.5*this.sl[0].vi().y},o={x:s.x,y:this.getPosition({x:-1,y:1},t.UISpace.Content).y-.5*this.sl[this.sl.length-1].vi().y};this.cl.ph({x:f.x,y:s.y}),this.ll.Bh({x:-1,y:-1}).ph(a);var h=e.min,u=e.max;e.getSteps().forEach((function(t,i){var r=Us(s,o,!0===e.getInterpolation()?(t.value-h)/(u-h):.9*(t.value-h)/(u-h));n.sl[i].Bh({x:-1,y:0}).ph(r)}))}else{var a,f=this.getPosition({x:-1,y:-1},t.UISpace.Content),c=this.getPosition({x:1,y:1},t.UISpace.Content),l=this.sl.reduce((function(t,i){return Math.max(t,i.vi().y)}),0),d=fo(f,{x:.5*this.sl[0].vi().x,y:l}),v={x:(a={x:c.x,y:d.y}).x-(.5*this.sl[this.sl.length-1].vi().x+(this.hl.length>0?this.al*r.x+this.ll.vi().x:0)),y:d.y},y={x:d.x,y:d.y+this.ol*r.y};this.cl.ph(y),this.ll.Bh({x:1,y:1}).ph(a);var S=e.min,m=e.max;e.getSteps().forEach((function(t,i){var r=Us(d,v,!0===e.getInterpolation()?(t.value-S)/(m-S):.9*(t.value-S)/(m-S));n.sl[i].Bh({x:0,y:1}).ph(r)}))}}return this},e.prototype.Fe=function(){if(this.Sl){this.ll.restore(),this.cl.restore();for(var t=this.Sl.getSteps(),n=this.sl.length;n<t.length;n+=1)this.sl.push(this.gf(this.wf.$e(this.renderingScale)));for(n=0;n<t.length;n+=1)this.sl[n].$n(this.ll.Qn()).ie(this.ll.te()).Jn(this.ul(t[n],this.Sl)).ne(this.fl);for(n=t.length;n<this.sl.length;n+=1)this.sl[n].dispose();if(this.sl.length=t.length,this.ll.Jn(this.hl),"vertical"===this.rl){var e=this.vl,r=this.dl;this.cl.oi({x:e*this.renderingScale.x.getPixelSize(),y:r*this.renderingScale.y.getPixelSize()});var s=e+Math.max(this.sl.reduce((function(t,i){return Math.max(t,i.Fe().Nc().x)}),0),this.ll.Fe().Nc().x),o=(this.hl.length>0?this.al+this.ll.Fe().Nc().y:0)+r+.5*this.sl[0].Fe().Nc().y+.5*this.sl[this.sl.length-1].Fe().Nc().y;this.setContentSize({x:s,y:o})}else{e=this.dl,r=this.vl;this.cl.oi({x:e*this.renderingScale.x.getPixelSize(),y:r*this.renderingScale.y.getPixelSize()});s=(this.hl.length>0?this.al+this.ll.Fe().Nc().x:0)+e+.5*this.sl[0].Fe().Nc().x+.5*this.sl[this.sl.length-1].Fe().Nc().x,o=r+this.ol+this.sl.reduce((function(t,i){return Math.max(t,i.Fe().Nc().y)}),0);this.setContentSize({x:s,y:o})}}else this.sl.forEach((function(t){return t.dispose()})),this.sl.length=0,this.ll.dispose(),this.cl.dispose(),this.setContentSize({x:0,y:0});return i.prototype.Fe.call(this)},e.prototype.restore=function(){return i.prototype.restore.call(this),this.cl.restore(),this.sl.forEach(Fr),this.ll.restore(),this},e.prototype.dispose=function(){return i.prototype.dispose.call(this),this.cl.dispose(),this.sl.forEach(Tr),this.ll.dispose(),this},e.prototype.isDisposed=function(){return i.prototype.isDisposed.call(this)&&this.cl.isDisposed()},e.prototype.setMouseInteractions=function(t){return this.cl.setMouseInteractions(t),this.sl.forEach((function(i){return i.setMouseInteractions(t)})),this},e.prototype.getMouseInteractions=function(){return this.cl.getMouseInteractions()},e}(JE),YN={lutElement:{},setLUT:function(t){return this.lutElement.yl(t),this},getLUT:function(){return this.lutElement.ml()},setLUTLength:function(t){return this.lutElement.bl(t),this},getLUTLength:function(){return this.lutElement.wl()},setLUTThickness:function(t){return this.lutElement.pl(t),this},getLUTThickness:function(){return this.lutElement.kl()},setLookUpUnit:function(t){return this.lutElement.xl(t),this},getLookUpUnit:function(){return this.lutElement.Ml()},setLUTStepValueFormatter:function(t){return this.lutElement.Al(t),this}},XN=e(e(e({},aN),fN),{background:pN,alignment:"horizontal",setAlignment:function(t){return e(e({},this),{alignment:t})},Xf:function(t,i,n,e,r,s,o){var h=this,u=new CN(t,i,n,this.background,e,r,s),a=u.addElement({Xf:function(){return new UN(t,i,n,Cr,Cr,s,h.alignment)}}),f=Object.assign(u,zN,{stylableTexts:[a]},YN,{lutElement:a});return uN(f,s,o),this.applyStylers(f,s)}}).addStyler(oN),ZN=e(e(e({},aN),fN),{background:pN,buttonBuilder:jN,setPictureOff:function(t){return e(e({},this),{buttonBuilder:this.buttonBuilder.setPictureOff(t)})},setPictureOn:function(t){return e(e({},this),{buttonBuilder:this.buttonBuilder.setPictureOn(t)})},alignment:"horizontal",setAlignment:function(t){return e(e({},this),{alignment:t})},Xf:function(i,n,e,r,s,o){var h=this,u=new CN(i,n,e,this.background,r,s,o),a=u.addElement(DN),f=a.addElement(PN);f.addGap();var c=f.addElement(this.buttonBuilder);f.addGap();var l=a.addElement(PN);l.addGap();var d=l.addElement(wN);l.addGap(),a.addGap();var v=u.addElement(DN);v.addGap();var y=v.addElement({Xf:function(){return new UN(i,n,e,Cr,Cr,o,h.alignment)}});v.addGap(),u.addGap();var S=Object.assign(u,_N,{setTextLabel:d},zN,{stylableTexts:[d,y]},RN("LUTText",[y]),EN,{button:c},YN,{lutElement:y}),m=function(){S.setOn(!S.getOn())};S.onMouseClick(m),S.onMouseEnter((function(){return S.setHighlighted(!0)})),S.onMouseLeave((function(){return S.setHighlighted(!1)})),S.setMouseStyle(t.MouseStyles.Point);var b=WE(new UE.Poke(m));return S.onTouchStart(b.onTouchStart),S.onTouchMove(b.onTouchMove),S.onTouchEnd(b.onTouchEnd),this.applyStylers(S,o)}}).addStyler(oN).addStyler(hN),KN={alignment:null,title:null,entryStylers:null,entries:[],add:function(t,i){var n=!i||"object"!=typeof i||void 0===i.disposeOnClick||i.disposeOnClick,e=i&&"object"==typeof i&&void 0!==i.builder?i.builder:void 0;return t instanceof mV?this.addChart(t,n,e):"attach"in t?this.addAttachable(t,n,e):t&&this.addDashboard(t,n,e),this},addAttachable:function(t,i,n){var e=t.ml&&t.ml(),r=n;r||(r=e?ZN.setAlignment(this.alignment):WN);var s=this.addElement(r);if(e&&"setLUT"in s){s.setLUT(e.lut);var o=e.lut.getUnits(),h=e.lookUpProperty,u=o.length>0?o:"x"===h?"x":"y"===h?"y":"z"===h?"z":"";s.setLookUpUnit(u)}return this.entryStylers.forEach((function(t){return t(s)})),this.entries.push({entry:s,component:t}),t.attach(s,i),this},addChart:function(t,i,n){var e=this;return t.Fl().forEach((function(t){return e.addAttachable(t,i,n)})),this},addDashboard:function(t,i,n){var e=this;return t.forEachChart((function(t){return e.addChart(t,i,n)})),this},setTitle:function(t){return this.title.setText(t),this},getTitle:function(){return this.title.getText()},setTitleFillStyle:function(t){return this.title.setTextFillStyle(t),this},getTitleFillStyle:function(){return this.title.getTextFillStyle()},setTitleFont:function(t){return this.title.setTextFont(t),this},getTitleFont:function(){return this.title.getTextFont()},setTitleRotation:function(t){return this.title.setTextRotation(t),this},getTitleRotation:function(){return this.title.getTextRotation()},setEntries:function(t){return this.entries.forEach((function(i){return t(i.entry,i.component)})),this}},qN={alignment:"vertical",layoutBuilder:PN,setAlignment:function(t){return e(e({},this),{alignment:t,layoutBuilder:"horizontal"===t?DN:PN})},getAlignment:function(){return this.alignment},titleBuilder:VN,styleTitle:function(t){return e(e({},this),{titleBuilder:this.titleBuilder.addStyler(t)})},entryStylers:[],styleEntries:function(t){return e(e({},this),{entryStylers:u(u([],h(this.entryStylers)),[t])})}},JN=e(e(e(e({},aN),fN),qN),{background:pN,Xf:function(t,i,n,e,r,s,o){var h=Object.assign(this.layoutBuilder.setBackground(this.background).Xf(t,i,n,e,r,s,!1),KN,{alignment:this.alignment,entryStylers:this.entryStylers}),u=h.addElement("horizontal"===this.alignment?PN:DN),a=u.addElement(this.titleBuilder).setText("Legend").setMargin({right:6});return u.addGap(),h=Object.assign(h,{title:a}),uN(h,s,o),this.applyStylers(h,s)}}).addStyler((function(t,i){return t.setPadding(5).setMargin(3)})).styleEntries((function(t){return t.setPadding({left:3,right:3})})),QN=function(i){function e(n,e,r,s,o,h){var u=i.call(this,n,e,r,s,o,h)||this;return u.Tl=10,u.Cl=t.UIDirections.Up,u.Bl=0,u.$o=u.gf(n.$e(u.renderingScale)),u.Wt=u.gf(n.Gf(u.renderingScale)),u}return n(e,i),e.prototype.Tf=function(){if(i.prototype.Tf.call(this),i.prototype.isDisposed.call(this))return this;var n=sr(this.getPosition(),this.scale,this.renderingScale),e=this.renderingScale.Li(n,{x:this.Cl===t.UIDirections.Right?-this.Tl:this.Cl===t.UIDirections.Left?this.Tl:0,y:this.Cl===t.UIDirections.Up?-this.Tl:this.Cl===t.UIDirections.Down?this.Tl:0}),r=this.renderingScale.Li(e,{x:this.Cl===t.UIDirections.Right?-this.Bl:this.Cl===t.UIDirections.Left?this.Bl:0,y:this.Cl===t.UIDirections.Up?-this.Bl:this.Cl===t.UIDirections.Down?this.Bl:0});return this.Wt.ha(n).Ku(e),this.$o.ph(r).Bh(this.Cl===t.UIDirections.Up?{x:0,y:1}:this.Cl===t.UIDirections.Down?{x:0,y:-1}:this.Cl===t.UIDirections.Right?{x:1,y:0}:{x:-1,y:0}),this},e.prototype.Fe=function(){var n=this.Wt.ea(),e=n instanceof nr?n.getThickness():0;return this.size=this.Cl===t.UIDirections.Left||this.Cl===t.UIDirections.Right?{x:this.Tl+this.Bl+this.$o.Fe().Nc().x,y:e}:{y:this.Tl+this.Bl+this.$o.Fe().Nc().y,x:e},i.prototype.Fe.call(this)},e.prototype.dispose=function(){return i.prototype.dispose.call(this),this.$o.dispose(),this.Wt.dispose(),this},e.prototype.restore=function(){return i.prototype.restore.call(this),this.$o.restore(),this.Wt.restore(),this},e.prototype.setMouseInteractions=function(t){return this.$o.setMouseInteractions(t),this.Wt.setMouseInteractions(t),this},e.prototype.getMouseInteractions=function(){return this.$o.getMouseInteractions()},e.prototype.getText=function(){return this.$o.Kn()},e.prototype.setTextFillStyle=function(t){return this.$o.$n(t),this.wf.xn(),this},e.prototype.getTextFillStyle=function(){return this.$o.Qn()},e.prototype.setTextFont=function(t){return this.$o.ie(t),this},e.prototype.setTextRotation=function(t){return this.$o.ne(t),this},e.prototype.getTextRotation=function(){return this.$o.ee()},e.prototype.getTextFont=function(){return this.$o.te()},e.prototype.setText=function(t){return this.$o.Jn(t),this.wf.xn(),this},e.prototype.setDirection=function(t){return this.Cl=t,this.wf.xn(),this},e.prototype.getDirection=function(){return this.Cl},e.prototype.setPointerLength=function(t){return this.Tl=t,this.wf.xn(),this},e.prototype.getPointerLength=function(){return this.Tl},e.prototype.setTickLabelPadding=function(t){return this.Bl=t,this.wf.xn(),this},e.prototype.getTickLabelPadding=function(){return this.Bl},e.prototype.setTickStyle=function(t){return this.Wt.na(t),this.wf.xn(),this},e.prototype.getTickStyle=function(){return this.Wt.ea()},e}(JE),$N=e(e({},aN),{Xf:function(t,i,n,e,r,s,o){var h=new QN(t,i,n,e,r,s);return uN(h,s,o),this.applyStylers(h,s)}}).addStyler(oN).addStyler((function(t,i){return t.setPointerLength(i.numericTickStrategy.majorTickStyle.getTickLength()).setTickLabelPadding(i.numericTickStrategy.majorTickStyle.getTickPadding()).setTickStyle(i.uiTickStrokeStyle||i.numericTickStrategy.majorTickStyle.getTickStyle()).setTextFont(i.customTickMarkerFont||i.uiTickFont||oh).setTextFillStyle(i.customTickMarkerTextFillStyle||i.uiTickTextFillStyle||Re)})),tV=WN.addStyler((function(t){return t.onSwitch((function(i,n){return!0===n?setTimeout((function(){return t.setOn(!1)}),300):void 0}))})),iV=JN.setAlignment("horizontal"),nV=JN.setAlignment("vertical"),eV={TextBox:VN,CheckBox:WN,ButtonBox:tV,PointableTextBox:GN,AxisTick:$N,LUTRange:XN},rV={HorizontalLegendBox:iV,VerticalLegendBox:nV},sV=function(t){function i(i,n,e,r,s,o,h,u,a){var f=t.call(this,i,n,e,r,s,o,a)||this;return f.Ll=h,f.Il=u,f}return n(i,t),i}(rh),oV=function(t,i,n){return Lr(t+.1*(i-t)+.5*n.getPixelSize()*Math.sign(i-t),t,i)},hV=function(t,i,n){var e=n._t(t),r=n._t(i);return Lr(n.Dt(e+.1*(r-e)+.5*Math.sign(r-e)),t,i)},uV=function(i){function e(n,e,r,s,o,h,u,a,f,c,d,v,y,S,m,b,g){var w,p=i.call(this,c,f,u,m,b,{numeric:m.numericTickStrategy,datetime:m.dateTimeTickStrategy,time:m.timeTickStrategy},g)||this;p.Ll=n,p.Ol=e,p.Pl=r,p.Rf=s,p.Dl=o,p._l=h,p.chart=c,p.Rl=v,p.zl=y,p.El=new Map,p.Nl=void 0,p.Vl=0,p.Gl=[],p.Hl=[],p.wn=Ho.fitting,p.jl=!0,p.Wl=0,p.Ul=8,p.Yl=void 0,p.Xl=void 0,p.Zl=20,p.Kl=1,p.ql=!0,p.Jl=!0,p.Ql=!0,p.$l=!0,p.td=!0,p.nd=!0,p.ed=!0,p.rd=!0,p.sd=!0,p.od=!0,p.hd=p.dn.defaultDragMouseStyle,p.ud=p.dn.defaultDragMouseStyle,p.ad=p.dn.defaultDragMouseStyle,p.fd=p.dn.defaultDragMouseStyle,p.ld=p.dn.defaultDragMouseStyle,p.an=new qe,p.dd=[],p.vd=function(t){var i=p.Hl.indexOf(t);i>=0&&p.Hl.splice(i,1)},p.yd=function(t){return p.Hl.indexOf(t)<0&&p.Hl.push(t),p.vd},p.kc=function(t,i){return p.an.emit("axisAreaTouch",p,i)},p.Sd=ds(p.dd),p.md=vs(p.dd),p.onAxisInteractionAreaMouseClick=function(t){return p.an.on("axisAreaMouseClick",t)},p.onAxisInteractionAreaMouseDoubleClick=function(t){return p.an.on("axisAreaDoubleClick",t)},p.onAxisInteractionAreaMouseDown=function(t){return p.an.on("axisAreaMouseDown",t)},p.onAxisInteractionAreaMouseUp=function(t){return p.an.on("axisAreaMouseUp",t)},p.onAxisInteractionAreaMouseEnter=function(t){return p.an.on("axisAreaMouseEnter",t)},p.onAxisInteractionAreaMouseLeave=function(t){return p.an.on("axisAreaMouseLeave",t)},p.onAxisInteractionAreaMouseMove=function(t){return p.an.on("axisAreaMouseMove",t)},p.onAxisInteractionAreaMouseWheel=function(t){return p.an.on("axisAreaMouseWheel",t)},p.onAxisInteractionAreaMouseDragStart=function(t){return p.an.on("axisAreaMouseDragStart",t)},p.onAxisInteractionAreaMouseDrag=function(t){return p.an.on("axisAreaMouseDrag",t)},p.onAxisInteractionAreaMouseDragStop=function(t){return p.an.on("axisAreaMouseDragStop",t)},p.onAxisInteractionAreaTouchStart=function(t){return p.an.on("axisAreaTouchStart",t)},p.onAxisInteractionAreaTouch=function(t){return p.an.on("axisAreaTouch",t)},p.onAxisInteractionAreaTouchStop=function(t){return p.an.on("axisAreaTouchEnd",t)},p.onAxisAreaMouseDragStart=function(t){return p.an.on("axisAreaMouseDragStart",t)},p.onAxisAreaMouseDrag=function(t){return p.an.on("axisAreaMouseDrag",t)},p.onAxisAreaMouseDragStop=function(t){return p.an.on("axisAreaMouseDragStop",t)},p.onAxisInteractionAreaMouseTouchStart=function(t){return p.an.on("axisAreaTouchStart",t)},p.onAxisInteractionAreaMouseTouch=function(t){return p.an.on("axisAreaTouch",t)},p.onAxisInteractionAreaMouseTouchStop=function(t){return p.an.on("axisAreaTouchEnd",t)},p.offAxisInteractionAreaMouseClick=function(t){return p.an.off(t,"axisAreaMouseClick")},p.offAxisInteractionAreaMouseDoubleClick=function(t){return p.an.off(t,"axisAreaDoubleClick")},p.offAxisInteractionAreaMouseDown=function(t){return p.an.off(t,"axisAreaMouseDown")},p.offAxisInteractionAreaMouseUp=function(t){return p.an.off(t,"axisAreaMouseUp")},p.offAxisInteractionAreaMouseEnter=function(t){return p.an.off(t,"axisAreaMouseEnter")},p.offAxisInteractionAreaMouseLeave=function(t){return p.an.off(t,"axisAreaMouseLeave")},p.offAxisInteractionAreaMouseMove=function(t){return p.an.off(t,"axisAreaMouseMove")},p.offAxisInteractionAreaMouseWheel=function(t){return p.an.off(t,"axisAreaMouseWheel")},p.offAxisInteractionAreaMouseDragStart=function(t){return p.an.off(t,"axisAreaMouseDragStart")},p.offAxisInteractionAreaMouseDrag=function(t){return p.an.off(t,"axisAreaMouseDrag")},p.offAxisInteractionAreaMouseDragStop=function(t){return p.an.off(t,"axisAreaMouseDragStop")},p.offAxisInteractionAreaTouchStart=function(t){return p.an.off(t,"axisAreaTouchStart")},p.offAxisInteractionAreaTouch=function(t){return p.an.off(t,"axisAreaTouch")},p.offAxisInteractionAreaTouchStop=function(t){return p.an.off(t,"axisAreaTouchEnd")},p.offAxisInteractionAreaMouseTouchStart=function(t){return p.an.off(t,"axisAreaTouchStart")},p.offAxisInteractionAreaMouseTouch=function(t){return p.an.off(t,"axisAreaTouch")},p.offAxisInteractionAreaMouseTouchStop=function(t){return p.an.off(t,"axisAreaTouchEnd")},p.bd=function(t,i){return i.getAllocatesAxisSpace()?Math.max(t,i.update().qf()):t},p.gd=function(t){var i=p.Gl.indexOf(t);-1!==i&&p.Gl.splice(i,1)},p.wd=function(t){p.Gl.includes(t)||p.Gl.push(t)},p.pd=function(t,i){p.$l&&(p.an.emit("axisAreaDoubleClick",p,i),p.release(),ss(i))},p.kd=function(t){(p.Jl||p.ql||p.Ql||p.$l)&&(p.an.emit("axisAreaMouseEnter",p),p.xd(t))},p.Md=function(t){p.Ad(t),p.an.emit("axisAreaMouseLeave",p)},p.Fd=function(t,i,n){var e,r,s=Rr(null===(e=p.chart.ps.overrideInteractionMouseButtons)||void 0===e?void 0:e.axisXYZoomMouseButton,0),o=Rr(null===(r=p.chart.ps.overrideInteractionMouseButtons)||void 0===r?void 0:r.axisXYPanMouseButton,2),h=l(i.clientX,i.clientY);n===o&&p.Jl?(p.an.emit("axisAreaMouseDragStart",p,i,n),p.Td(t),ss(i)):n===s&&p.ql&&(p.an.emit("axisAreaMouseDragStart",p,i,n),p.Cd(t,h),ss(i))},p.Bd=function(t,i,n,e,r){var s,o,h=Rr(null===(s=p.chart.ps.overrideInteractionMouseButtons)||void 0===s?void 0:s.axisXYZoomMouseButton,0),u=Rr(null===(o=p.chart.ps.overrideInteractionMouseButtons)||void 0===o?void 0:o.axisXYPanMouseButton,2),a=l(i.clientX,i.clientY);n===u&&p.Jl?(p.an.emit("axisAreaMouseDrag",p,i,n,e,r),p.Ld(t,r),ss(i)):n===h&&p.ql&&(p.an.emit("axisAreaMouseDrag",p,i,n,e,r),p.Id(t,e,a,r),ss(i))},p.Od=function(t,i,n,e){var r,s,o=Rr(null===(r=p.chart.ps.overrideInteractionMouseButtons)||void 0===r?void 0:r.axisXYZoomMouseButton,0),h=Rr(null===(s=p.chart.ps.overrideInteractionMouseButtons)||void 0===s?void 0:s.axisXYPanMouseButton,2),u=l(i.clientX,i.clientY);n===h&&p.Jl?(p.Pd(t),p.an.emit("axisAreaMouseDragStop",p,i,n,e),ss(i)):n===o&&p.ql&&(p.an.emit("axisAreaMouseDragStop",p,i,n,e),p.Dd(t,e,u),ss(i)),t.getIsUnderMouse()&&(p.Jl||p.ql||p.Ql||p.$l)&&p.xd(t)},p._d=function(t,i){if(p.Ql){p.an.emit("axisAreaMouseWheel",p,i),p.stop();var n=p.dn.getWidth(p.Rf.oo.ds(i.clientX,i.clientY)),e=p.Rt.Dt(n);p.zoom(e,Cs(i)),ss(i)}},p.Rd=function(t,i){return p.an.emit("axisAreaMouseClick",p,i)},p.zd=function(t,i){return p.an.emit("axisAreaMouseDown",p,i)},p.Ed=function(t,i){return p.an.emit("axisAreaMouseUp",p,i)},p.Nd=function(t,i){return p.an.emit("axisAreaMouseMove",p,i)},p.Vd=function(t,i,n){p.ql&&(p.an.emit("axisAreaTouchStart",p,n),p.xd(t),p.Cd(t,i),ss(n))},p.Gd=function(t,i,n,e,r){p.ql&&(p.an.emit("axisAreaTouch",p,r),p.Id(t,i,n,e),ss(r))},p.Hd=function(t,i,n,e){p.ql&&(p.an.emit("axisAreaTouchEnd",p,e),p.Dd(t,i,n),p.Ad(t),ss(e))},p.jd=function(t,i,n,e){(p.Jl||p.Ql)&&(p.xd(t),p.Td(t),ss(e))},p.Wd=function(t,i,n,e,r,s){if(p.Jl){var o=l((e.x+r.x)/2,(e.y+r.y)/2);p.Ld(t,o),ss(s)}if(p.Ql){var h=p.Rf.oo.ds(i.x,i.y),u=p.Rf.oo.ds(n.x,n.y),a=Math.abs(p.dn.getWidth(co(h,e))-p.dn.getWidth(co(u,r)))-Math.abs(p.dn.getWidth(h)-p.dn.getWidth(u)),f=p.Rt.Li(p.Xn,-a),c=p.Rt.Li(p.Zn,a);p.Wn(f,c),ss(s)}},p.Ud=function(t,i,n,e){(p.Jl||p.Ql)&&(p.Pd(t),p.Ad(t),ss(e))},p.Yd=function(t,i){(p.td||p.nd)&&p.Xd(t)},p.Zd=function(t,i){p.Kd(t)},p.qd=function(t,i,n){var e=l(i.clientX,i.clientY);p.td&&p.Jd(t,e)},p.Qd=function(t,i,n,e,r){var s=l(i.clientX,i.clientY);p.td&&p.$d(t,s,e,r)},p.tv=function(t,i,n,e,r){var s=l(i.clientX,i.clientY);p.td&&p.nv(t,s,e,r)},p.ev=function(t,i,n,e){var r=l(i.clientX,i.clientY);(p.td||p.nd)&&p.rv(t,r,e),(p.td||p.nd)&&p.Xd(t)},p.sv=function(t,i){p.nd&&(p.stop(),p.zoom(p.Xn,Cs(i)),ss(i))},p.ov=function(t,i){p.nd&&(p.stop(),p.zoom(p.Zn,Cs(i)),ss(i))},p.hv=function(t,i,n){p.td&&(p.Xd(t),p.Jd(t,i),ss(n))},p.uv=function(t,i,n,e,r){p.td&&(p.$d(t,i,n,e),ss(r))},p.av=function(t,i,n,e,r){p.td&&(p.nv(t,i,n,e),ss(r))},p.fv=function(t,i,n,e){p.td&&(p.rv(t,i,n),p.Kd(t),ss(e))},S(p,p.yd),u.cv=p,p.lv=d,p.dv=p.lv>50?1:-1,p.vv=(w=p.dn.toPoint(0,-p.dv),Math.abs(w.x)>=Math.abs(w.y)?w.x>=0?t.UIDirections.Right:t.UIDirections.Left:w.y>=0?t.UIDirections.Up:t.UIDirections.Down),p.yv=a,p.Sv=p.Rt instanceof zo?(new Vo).Xi(p.dn.toVec2(p.Rt,p.yv)):(new Go).Xi(p.dn.toVec2(p.Rt,p.yv)),p.mv=p.chart.pixelScale,p.bv=(new Vo).Xi(p.dn.toVec2(p.dn.getWidth(p.mv),p.yv)),p.gv=p.Pl.Gf(p.Sv).setMouseInteractions(!1),p.wv=p.Pl.Gf(p.Sv).setMouseInteractions(!1),p.pv=p.Pl.Gf(p.Sv).setMouseInteractions(!1),p.kv=p.Rf.Pc(p.mv).$n(dz).Ys(ir),p.xv=p.Rf.Pc(p.mv).$n(dz).Ys(ir),p.Mv=p.Rf.Pc(p.mv).$n(dz).Ys(ir),p.qn=p.Pl.$e(p.Sv).setMouseInteractions(!1).ne(p.dn.getTitleTextRotation(p.dv));var k=WE(new UE.Drag(p.Vd,p.Gd,p.Hd,1),new UE.Pinch(p.jd,p.Wd,p.Ud),new UE.DoublePoke(p.pd)),x=WE(new UE.Drag(p.hv,p.uv,p.fv)),M=WE(new UE.Drag(p.hv,p.av,p.fv));return p.kv.setMouseEnterEventHandler(p.kd).setMouseLeaveEventHandler(p.Md).setMouseDragStartEventHandler(p.Fd).setMouseDragEventHandler(p.Bd).setMouseDragStopEventHandler(p.Od).setMouseWheelEventHandler(p._d).setMouseDoubleClickEventHandler(p.pd).setMouseClickEventHandler(p.Rd).setMouseDownEventHandler(p.zd).setMouseUpEventHandler(p.Ed).setMouseMoveEventHandler(p.Nd).setTouchStartEventHandler(k.onTouchStart).setTouchMoveEventHandler(k.onTouchMove).setTouchEndEventHandler(k.onTouchEnd),p.xv.setMouseEnterEventHandler(p.Yd).setMouseLeaveEventHandler(p.Zd).setMouseDragStartEventHandler(p.qd).setMouseDragEventHandler(p.Qd).setMouseDragStopEventHandler(p.ev).setMouseWheelEventHandler(p.sv).setTouchStartEventHandler(x.onTouchStart).setTouchMoveEventHandler(x.onTouchMove).setTouchEndEventHandler(x.onTouchEnd),p.Mv.setMouseEnterEventHandler(p.Yd).setMouseLeaveEventHandler(p.Zd).setMouseDragStartEventHandler(p.qd).setMouseDragEventHandler(p.tv).setMouseDragStopEventHandler(p.ev).setMouseWheelEventHandler(p.ov).setTouchStartEventHandler(M.onTouchStart).setTouchMoveEventHandler(M.onTouchMove).setTouchEndEventHandler(M.onTouchEnd),p.gv.na(m.axisStyle),p.wv.na(m.axisNibStyle),p.pv.na(m.axisNibStyle),p.Av=m.axisOverlayStyle,p.Fv=m.axisNibOverlayStyle,p.qn.$n(p.vn.axisTitleFillStyle).ie(p.vn.axisTitleFont),p}return n(e,i),e.prototype.Je=function(){return this.Tn},e.prototype.Qe=function(){return void 0!==this.ce},e.prototype.addBand=function(t){void 0===t&&(t=!0);var i=t?this._l:this.Dl,n=new rN(i,this.chart,this.Sd,this.md,this,this.Sv,this.dn,this.vn);return this.md(n),n},e.prototype.addConstantLine=function(t){void 0===t&&(t=!0);var i=t?this._l:this.Dl,n=new sN(i,this.chart,this.Sd,this.md,this,this.Sv,this.dn,this.vn);return this.md(n),n},e.prototype.Tv=function(t){this.dd.forEach(t)},e.prototype.Cv=function(t){return this.dd.map(t)},e.prototype.getHighlighters=function(){return this.dd},e.prototype.setThickness=function(t){return"number"==typeof t?(this.Bv=t,this.Lv=t):"object"==typeof t&&(this.Bv=t.min,this.Lv=t.max),this.Ll.xn(),this},e.prototype.getThickness=function(){return{min:this.Bv,max:this.Lv}},e.prototype.setMouseInteractions=function(t){return this.setAxisInteractionPanByDragging(t).setAxisInteractionReleaseByDoubleClicking(t).setAxisInteractionZoomByDragging(t).setAxisInteractionZoomByWheeling(t).setNibInteractionScaleByDragging(t).setNibInteractionScaleByWheeling(t)},e.prototype.Ge=function(){return this.Hl},e.prototype.Be=function(t,i,n,e){return new sV(i,t,n,e,this.Pl,this.Sv,this.Ll,this.Sv)},e.prototype.re=function(){var t,n;if(this.El){try{for(var e=o(this.El),r=e.next();!r.done;r=e.next()){var s=r.value;s[1].grid.dispose(),s[1].tick.dispose()}}catch(i){t={error:i}}finally{try{r&&!r.done&&(n=e.return)&&n.call(e)}finally{if(t)throw t.error}}this.El.clear()}i.prototype.re.call(this)},e.prototype.Le=function(t,i){var n=i.tickStart,e=t.tickLevel.Ce,r=n+e.getTickLength()*this.dv+e.getTickPadding()*this.dv;t.label.ph(this.dn.toPoint(t.value,r)).Bh(this.dn.toPoint(e.getLabelAlignment(),-this.dv)).ne(e.labelRotation)},e.prototype.Iv=function(t,i){var n=i.startPosition,e=i.gridStrokeLen,r=i.gridStrokeStart,s=i.tickStart,o=t.tickLevel.Ce,h=n-e*o.getGridStrokeLength(),u=s+o.getTickLength()*this.dv;return{gridStroke:{start:this.dn.toPoint(t.value,r),end:this.dn.toPoint(t.value,h)},tickStroke:{start:this.dn.toPoint(t.value,s),end:this.dn.toPoint(t.value,u)}}},e.prototype.Ov=function(t,i,n,e){return this.Ll.Gf(this.Sv).na(new nr({fillStyle:new Ee({color:Te(360*(1-e))}),thickness:5})).ha(this.dn.toVec2(t,0)).Ku(this.dn.toVec2(t,this.dv*(50*e)))},e.prototype.Ze=function(t,i){return"linear"===this.Un.type?oV(t,i,this.Rt):hV(t,i,this.Rt)},e.prototype.Pv=function(t,i){return i instanceof zo?oV:hV},e.prototype.qe=function(t,i,n){if("linear"===this.Un.type){var e=this.Rt.Yi(i-t);return{min:t-n*e,max:i+n*e}}var r=this.Rt;return{min:r.Li(t,-n),max:r.Li(i,n)}},e.prototype.Tf=function(t,i,n){var e,r,s,u,a,f,c,l,d,v,y,S,m,b=this.gv.ea(),g=this.Rt.getInnerStart()<this.Rt.getInnerEnd()?this.Rt.getInnerStart():this.Rt.getInnerEnd(),w=this.Rt.getInnerEnd()>this.Rt.getInnerStart()?this.Rt.getInnerEnd():this.Rt.getInnerStart(),p=this.Rt.li(),k=this.yv.getInnerInterval(),x=b instanceof nr?b.getThickness()*this.dv/2:0,M=this.lv/100*k,A=M+t,F=A+x,T=k*this.dv,C=F+x,B=this.Gl.reduce(this.bd,0),L=0;if(this.Sn!==Uo){var I=this.Rt.li();this.ve({physicalAxisSize:I,startPosition:M,gridStrokeLen:T,gridStrokeStart:A,tickStart:C});try{for(var O=o(this.bn),P=O.next();!P.done;P=O.next()){var D=h(P.value,2),_=D[0],R=D[1],z=this.El.get(_);if(!z)if(_.en)z={grid:this.Ll.Dv(this.Sv).setMouseInteractions(!1),tick:this.Ll.Dv(this.Sv).setMouseInteractions(!1)};else if("hr"in _){var E=Array.from(this.bn.keys()).filter((function(t){return"hr"in t})).reverse().indexOf(_),N=this.Ol[E];if(!N)throw new Error("Not enough tick layers. This is an internal LCJS error - if you see this, please contact Arction support.");z={grid:N.Dv(this.Sv).setMouseInteractions(!1),tick:N.Dv(this.Sv).setMouseInteractions(!1)}}if(z){z.grid.$h(),z.tick.$h();try{for(var V=(s=void 0,o(R)),G=V.next();!G.done;G=V.next()){var H=h(G.value,2),j=(H[0],H[1]),W=this.Iv(j,{physicalAxisSize:I,startPosition:M,gridStrokeLen:T,gridStrokeStart:A,tickStart:C});j.label.isDisposed()||(z.grid.Qh(W.gridStroke.start,W.gridStroke.end),z.tick.Qh(W.tickStroke.start,W.tickStroke.end))}}catch(t){s={error:t}}finally{try{G&&!G.done&&(u=V.return)&&u.call(V)}finally{if(s)throw s.error}}z.grid.na(_.Ce.getGridStrokeStyle()),z.tick.na(_.Ce.getTickStyle()),this.El.set(_,z)}}}catch(t){e={error:t}}finally{try{P&&!P.done&&(r=O.return)&&r.call(O)}finally{if(e)throw e.error}}try{for(var U=o(this.bn.values()),Y=U.next();!Y.done;Y=U.next()){_=Y.value;var X=Os;try{for(var Z=(c=void 0,o(_.values())),K=Z.next();!K.done;K=Z.next()){var q=(j=K.value).tickLevel.Ce,J=this.dn.getHeight(j.label.vi()),Q=q.getTickLength()+q.getTickPadding()+J+q.getLabelPadding();X=Math.max(X,Q)}}catch(t){c={error:t}}finally{try{K&&!K.done&&(l=Z.return)&&l.call(Z)}finally{if(c)throw c.error}}L=Math.max(L,X)}}catch(t){a={error:t}}finally{try{Y&&!Y.done&&(f=U.return)&&f.call(U)}finally{if(a)throw a.error}}m=C+Math.max(L,B)*this.dv}else L=0,m=C+B*this.dv;this.gv.ha(this.dn.toPoint(g,F)).Ku(this.dn.toPoint(w,F)),this.wv.ha(this.dn.toPoint(this.Rt.Li(this.Rt.getInnerStart(),this.Ul),F)).Ku(this.dn.toPoint(this.Rt.getInnerStart(),F)),this.pv.ha(this.dn.toPoint(this.Rt.Li(this.Rt.getInnerEnd(),-this.Ul),F)).Ku(this.dn.toPoint(this.Rt.getInnerEnd(),F));var $=this.qn&&this.qn.Kn().length>0?this.dn.getHeight(this.qn.Fe().vi()):0,tt=m+.5*$*this.dv;this.qn.ph(this.dn.toPoint(this.Rt.Li(this.Rt.getInnerStart(),p/2),tt));var it,nt=C,et=nt+this.dv*this.Vl,rt=Math.min(this.Zl,.25*p);if(this.Nl){var st=this.lv/100*k+t,ot=-this.dv*k-t;it={start:this.dn.toVec2(this.Nl.min,C+this.dv*this.Vl),end:this.dn.toVec2(this.Nl.max,st+ot)}}else it={start:this.dn.toVec2(this.Rt.Li(this.Rt.getInnerStart(),rt),nt),end:this.dn.toVec2(this.Rt.Li(this.Rt.getInnerEnd(),-rt),et)};var ht=sr(this.dn.toVec2(this.Rt.getInnerStart(),et),this.Sv,this.mv),ut=sr(it.start,this.Sv,this.mv),at=sr(it.end,this.Sv,this.mv),ft=sr(this.dn.toVec2(this.Rt.getInnerEnd(),nt),this.Sv,this.mv);this.kv.ph(ut).oi(co(at,ut)),this.xv.ph(ht).oi(co(ut,ht)),this.Mv.ph(at).oi(co(ft,at));try{for(var ct=o(this.Gl),lt=ct.next();!lt.done;lt=ct.next()){(j=lt.value).update().plot(A,T,t,C)}}catch(t){d={error:t}}finally{try{lt&&!lt.done&&(v=ct.return)&&v.call(ct)}finally{if(d)throw d.error}}try{for(var dt=o(this.dd),vt=dt.next();!vt.done;vt=dt.next()){vt.value.Tf()}}catch(t){y={error:t}}finally{try{vt&&!vt.done&&(S=dt.return)&&S.call(dt)}finally{if(y)throw y.error}}var yt=(b instanceof nr?b.getThickness():0)+Math.max(L,B)+(this.qn&&this.qn.Kn().length>0?$+this.Wl:0);return this.Vl=Lr(yt,void 0!==this.Bv?this.Bv:0,void 0!==this.Lv?this.Lv:Is),this},e.prototype._v=function(t){var i,n,e,r,s=this.gv.ea(),h=s instanceof nr?s.getThickness()*this.dv/2:0,u=this.yv.getInnerInterval(),a=this.lv/100*u+t,f=a+h,c=u*this.dv,l=f+h;try{for(var d=o(this.Gl),v=d.next();!v.done;v=d.next()){v.value.update().plot(a,c,t,l)}}catch(t){i={error:t}}finally{try{v&&!v.done&&(n=d.return)&&n.call(d)}finally{if(i)throw i.error}}try{for(var y=o(this.dd),S=y.next();!S.done;S=y.next()){S.value.Tf()}}catch(t){e={error:t}}finally{try{S&&!S.done&&(r=y.return)&&r.call(y)}finally{if(e)throw e.error}}},e.prototype.getHeight=function(){return this.Vl},e.prototype.Rv=function(t,i){i=i||eV.PointableTextBox;var n=new tN(this,t?this.Ll:this.Pl,this.Rf,this.Rt,this.bv,this.bv,this.dn,this.vv,this.wd,this.gd,this.vn,i).setTextFormatter(this.formatValue);return this.Gl.push(n),n},e.prototype.xd=function(t){t.$n(this.Av).oo.xn(),this.Yl=t.oo.Qr(this.hd,this.Yl)},e.prototype.Ad=function(t){t.$n(dz).oo.xn(),t.oo.ts(this.Yl)},e.prototype.Td=function(t){this.stop(),t.oo.ts(this.Yl)},e.prototype.Ld=function(t,i){var n=-this.dn.getWidth(i);this.pan(n),this.Yl=t.oo.Qr(this.ud,this.Yl)},e.prototype.pan=function(t){var i=this.Xn,n=this.Zn,e=this.Rt.Li(i,t),r=this.Rt.Li(n,t);this.Wn(e,r,{allowClamping:!1})},e.prototype.zoom=function(t,i){var n=this.Rt._t(this.Xn),e=this.Rt._t(this.Zn),r=this.Rt._t(t),s=Lr((r-n)/(e-n),0,1),o=.2*this.Rt.li(),h=s*this.Kl*o*-i,u=(1-s)*this.Kl*o*i,a=this.Rt.Li(this.Xn,h),f=this.Rt.Li(this.Zn,u);this.Wn(a,f)},e.prototype.Pd=function(t){this.Nl=void 0,t.oo.ts(this.Yl)},e.prototype.Cd=function(t,i){this.stop(),t.oo.ts(this.Yl)},e.prototype.Id=function(t,i,n,e){var r=sr(this.Rf.oo.ds(n.x,n.y),this.Rf.oo.Rt,this.Sv),s=Lr(this.dn.getWidth(r),this.Xn,this.Zn),o=this.dn.getWidth(sr(this.Rf.oo.ds(i.x,i.y),this.Rf.oo.Rt,this.Sv)),h=Gs(this.dn.getHeight(r),this.dn.getHeight(sr(this.kv.kh(),this.mv,this.Sv)),this.dn.getHeight(sr(fo(this.kv.kh(),this.kv.vi()),this.mv,this.Sv)));Math.abs(this.Rt._t(s)-this.Rt._t(o))>10&&h?(this.Nl=b(Math.min(s,o),Math.max(s,o)),this.Yl=t.oo.Qr(this.ad,this.Yl)):(this.Nl=void 0,this.Yl=t.oo.Qr(this.hd,this.Yl)),this.Rf.xn()},e.prototype.Dd=function(t,i,n){if(this.Nl){var e=this.Nl.min,r=this.Nl.max,s=this.Zn<this.Xn;this.ue(s?r:e,s?e:r,!0,!0,"interactionSetInterval")}this.Nl=void 0,t.oo.ts(this.Yl)},e.prototype.Xd=function(t){t.$n(this.Fv).oo.xn(),this.Xl=t.oo.Qr(this.fd,this.Xl)},e.prototype.Kd=function(t){t.$n(dz).oo.xn().ts(this.Xl)},e.prototype.Jd=function(t,i){this.stop(),this.Xl=t.oo.Qr(this.ld,this.Xl)},e.prototype.$d=function(t,i,n,e){var r=this.dn.getWidth(e);this.Wn(this.Rt.Li(this.Xn,r),this.Zn)},e.prototype.nv=function(t,i,n,e){var r=this.dn.getWidth(e);this.Wn(this.Xn,this.Rt.Li(this.Zn,r))},e.prototype.rv=function(t,i,n){t.oo.ts(this.Xl),t.$n(t.getIsUnderMouse()?this.Fv:dz),t.getIsUnderMouse()&&(this.Xl=t.oo.Qr(this.fd)),this.Rf.xn()},e.prototype.addCustomTick=function(t){return this.Rv(!0,t)},e.prototype.getUiPosition=function(){return this.lv},e.prototype.setStrokeStyle=function(t){return this.gv.na(t),this.Rf.xn(),this},e.prototype.getStrokeStyle=function(){return this.gv.ea()},e.prototype.getOverlayStyle=function(){return this.Av},e.prototype.setOverlayStyle=function(t){return this.Av=t instanceof Function?t(this.Fv):t,this.Rf.xn(),this},e.prototype.setAxisInteractionZoomByDragging=function(t){return this.ql=t,this},e.prototype.getAxisInteractionZoomByDragging=function(){return this.ql},e.prototype.setAxisInteractionPanByDragging=function(t){return this.Jl=t,this},e.prototype.getAxisInteractionPanByDragging=function(){return this.Jl},e.prototype.setAxisInteractionZoomByWheeling=function(t){return this.Ql=t,this},e.prototype.getAxisInteractionZoomByWheeling=function(){return this.Ql},e.prototype.setAxisInteractionReleaseByDoubleClicking=function(t){return this.$l=t,this},e.prototype.getAxisInteractionReleaseByDoubleClicking=function(){return this.$l},e.prototype.setAxisMouseHoverStyle=function(t){return void 0===t&&(t=this.dn.defaultDragMouseStyle),this.hd=t,this},e.prototype.getAxisMouseHoverStyle=function(){return this.hd},e.prototype.setAxisMousePanStyle=function(t){return void 0===t&&(t=this.dn.defaultDragMouseStyle),this.ud=t,this},e.prototype.getAxisMousePanStyle=function(){return this.ud},e.prototype.setAxisMouseZoomStyle=function(t){return void 0===t&&(t=this.dn.defaultDragMouseStyle),this.ad=t,this},e.prototype.getAxisMouseZoomStyle=function(){return this.ad},e.prototype.getTitleMargin=function(){return this.Wl},e.prototype.setTitleMargin=function(t){return this.Wl=t,this.Rf.xn(),this},e.prototype.getNibLength=function(){return this.Ul},e.prototype.setNibLength=function(t){return this.Ul=t,this.Rf.xn(),this},e.prototype.getNibStyle=function(){return this.wv.ea()},e.prototype.setNibStyle=function(t){return this.wv.na(t),this.pv.na(t),this.Rf.xn(),this},e.prototype.getNibOverlayStyle=function(){return this.Fv},e.prototype.setNibOverlayStyle=function(t){return this.Fv=t instanceof Function?t(this.Fv):t,this.Rf.xn(),this},e.prototype.setNibMousePickingAreaSize=function(t){return this.Zl=t,this.Rf.xn(),this},e.prototype.getNibMousePickingAreaSize=function(){return this.Zl},e.prototype.setNibInteractionScaleByDragging=function(t){return this.td=t,this},e.prototype.getNibInteractionScaleByDragging=function(){return this.td},e.prototype.setNibInteractionScaleByWheeling=function(t){return this.nd=t,this},e.prototype.getNibInteractionScaleByWheeling=function(){return this.nd},e.prototype.setNibMouseHoverStyle=function(t){return void 0===t&&(t=this.dn.defaultDragMouseStyle),this.fd=t,this},e.prototype.getNibMouseHoverStyle=function(){return this.fd},e.prototype.setNibMouseScaleStyle=function(t){return void 0===t&&(t=this.dn.defaultDragMouseStyle),this.ld=t,this},e.prototype.getNibMouseScaleStyle=function(){return this.ld},e.prototype.setChartInteractions=function(t){return this.setChartInteractionFitByDrag(t),this.setChartInteractionPanByDrag(t),this.setChartInteractionZoomByDrag(t),this.setChartInteractionZoomByWheel(t),this},e.prototype.setChartInteractionPanByDrag=function(t){return this.ed=t,this},e.prototype.getChartInteractionPanByDrag=function(){return this.ed},e.prototype.setChartInteractionZoomByWheel=function(t){return this.rd=t,this},e.prototype.getChartInteractionZoomByWheel=function(){return this.rd},e.prototype.setChartInteractionZoomByDrag=function(t){return this.sd=t,this},e.prototype.getChartInteractionZoomByDrag=function(){return this.sd},e.prototype.setChartInteractionFitByDrag=function(t){return this.od=t,this},e.prototype.getChartInteractionFitByDrag=function(){return this.od},e.prototype.bi=function(){return this.Rt.bi(),this},e.prototype.gi=function(){return this.Rt.gi(),this},e.prototype.dispose=function(){var t,i;this.wv.dispose(),this.pv.dispose(),this.gv.dispose(),this.kv.dispose(),this.xv.dispose(),this.Mv.dispose(),this.qn.dispose(),this.Pe(Tr);try{for(var n=o(this.El.values()),e=n.next();!e.done;e=n.next()){var r=e.value;r.grid.dispose(),r.tick.dispose()}}catch(i){t={error:i}}finally{try{e&&!e.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}var s=this.Hl.slice();s.forEach(Tr),this.Hl=s;var h,u,a=this.dd.slice();return a.forEach(Tr),h=this.dd,u=a,h.length=0,h.push.apply(h,u),this.Rl(this),this},e.prototype.isDisposed=function(){return this.wv.isDisposed()&&this.pv.isDisposed()&&this.gv.isDisposed()&&this.kv.isDisposed()&&this.xv.isDisposed()&&this.Mv.isDisposed()&&this.qn.isDisposed()&&(t=this.bn,Array.from(t.values()).map((function(t){return Array.from(t.values())})).reduce((function(t,i){var n,e;if(!1===t)return!1;try{for(var r=o(i),s=r.next();!s.done;s=r.next())if(!1===s.value.isDisposed())return!1}catch(t){n={error:t}}finally{try{s&&!s.done&&(e=r.return)&&e.call(r)}finally{if(n)throw n.error}}return!0}),!0));var t},e.prototype.restore=function(){return this.wv.restore(),this.pv.restore(),this.gv.restore(),this.qn.restore(),this.kv.restore(),this.xv.restore(),this.Mv.restore(),this.Pe(Fr),this.Hl.forEach(Fr),this.zl(this),this},e}(eh),aV=function(t,i){return t instanceof Co||i instanceof Co?(new Go).Xi(t,i):(new Vo).Xi(t,i)},fV=function(t,i,n,e){void 0===n&&(n="image/png"),i+="."+n.slice(n.indexOf("image/")+6);var r=t.captureFrame(n,e);if("image/png"!==n&&r.type.includes("image/png"))throw new Error("saveToFile | type not supported by browser: "+n+"\nCheck support table for HTMLCanvasElement.toDataURL");if(wr.navigator.msSaveBlob)wr.navigator.msSaveBlob(r,i);else{var s=wr.document.createElement("a");wr.document.body.appendChild(s);var o=wr.URL.createObjectURL(r);s.href=o,s.download=i,s.click(),setTimeout((function(){wr.URL.revokeObjectURL(o),wr.document.body.removeChild(s)}),0)}},cV=function(i,n,e,r,s,o,h){var u=i.Xf(n,e,r,s,o,h,!0);return u.setDraggingMode(t.UIDraggingModes.draggable),u},lV=function(t){if(t instanceof No)return t;var i=t.x instanceof uV?t.x.Rt:t.x.x,n=t.y instanceof uV?t.y.Rt:t.y.y;return aV(i,n)},dV=function(){function t(t,i,n,e,r,s,o){var h=this;this.zv=n,this._f=e,this.removePanel=r,this.Ev=[],this.Nv=[],this.an=new qe,this.Vv=void 0,this.Gv=void 0,this.Hv=void 0,this.Qt=p(0,0,0,0),this.jv=function(){h.Wv=!0,h._f.xn()},this.Uv=function(t){var i=h.Ev.indexOf(t);-1!==i&&h.Ev.splice(i,1),h.engine.xn()},this.Yv=function(t){var i=h.Nv.indexOf(t);-1!==i&&h.Nv.splice(i,1),h.engine.xn()},this.Xv=function(t){h.Ev.includes(t)||h.Ev.push(t),h.engine.xn()},this.Zv=function(t){h.Kv(t)},this.Wv=!0,this.onResize=function(t){return h.an.on("resize",t)},this.offResize=function(t){return h.an.off(t,"resize")},this.onDispose=function(t){return h.an.on("dispose",t)},this.offDispose=function(t){return h.an.off(t,"dispose")},this.ps=t,this.vn=o||Gz;var u=i.oo.vi();this.uiScale=n.d2({scaleXYConstructor:Vo}).qi(0,100).Ji(0,100).oi(u),this.pixelScale=n.d2({scaleXYConstructor:Vo}).qi(0,this.uiScale.x.getCellSize()).Ji(0,this.uiScale.y.getCellSize()).oi(u),this.engine=i.oo.Ls,this.qv=i.Jv,this.Qv=i.oo.$v(Number.MAX_SAFE_INTEGER-1),this.ty=this._f.Pc(this.uiScale).ph(l(0,0)).oi(l(100,100)).$n(this.vn.panelBackgroundFillStyle).Ys(this.vn.panelBackgroundStrokeStyle).setMouseMoveEventHandler((function(t,i){return h.an.emit("mouseMovePanelBackground",h,i)})).setMouseEnterEventHandler((function(t,i){return h.an.emit("mouseEnterPanelBackground",h,i)})).setMouseLeaveEventHandler((function(t,i){return h.an.emit("mouseLeavePanelBackground",h,i)})).setMouseDownEventHandler((function(t,i){return h.an.emit("mouseDownPanelBackground",h,i)})).setMouseUpEventHandler((function(t,i){return h.an.emit("mouseUpPanelBackground",h,i)})).setMouseClickEventHandler((function(t,i){return h.an.emit("mouseClickPanelBackground",h,i)})).setMouseDoubleClickEventHandler((function(t,i){return h.an.emit("mouseDoubleClickPanelBackground",h,i)})).setMouseWheelEventHandler((function(t,i){return h.an.emit("mouseWheelPanelBackground",h,i)})).setMouseDragStartEventHandler((function(t,i,n){return h.an.emit("mouseDragStartPanelBackground",h,i,n)})).setMouseDragEventHandler((function(t,i,n,e,r){return h.an.emit("mouseDragPanelBackground",h,i,n,e,r)})).setMouseDragStopEventHandler((function(t,i,n,e){return h.an.emit("mouseDragStopPanelBackground",h,i,n,e)})).setTouchStartEventHandler((function(t,i){return h.an.emit("touchStartPanelBackground",h,i)})).setTouchMoveEventHandler((function(t,i){return h.an.emit("touchMovePanelBackground",h,i)})).setTouchEndEventHandler((function(t,i){return h.an.emit("touchEndPanelBackground",h,i)}));var a=i.oo.io(this.jv);if(this.iy=i.oo.no.bind(i.oo,a),s){var f=s.on(this.jv);this.ny=function(){return s.off(f)}}this.Vv=r}return t.prototype.getTheme=function(){return this.vn},t.prototype.setBackgroundFillStyle=function(t){return this.ty.$n(t),this._f.xn(),this},t.prototype.getBackgroundFillStyle=function(){return this.ty.Qn()},t.prototype.setBackgroundStrokeStyle=function(t){return this.ty.Ys(t),this._f.xn(),this},t.prototype.getBackgroundStrokeStyle=function(){return this.ty.Xs()},t.prototype.ey=function(t){return this.Ev.push(t),this.engine.xn(),t},t.prototype.Kv=function(t){return this.Nv.push(t),this.engine.xn(),t},t.prototype.addUIElement=function(t,i){return void 0===t&&(t=VN),void 0===i&&(i=this.uiScale),i=lV(i),this.ey(cV(t,this.qv(),this.uiScale,i,this.Uv,this.Xv,this.vn))},t.prototype.addLegendBox=function(t,i){void 0===t&&(t=JN),void 0===i&&(i=this.uiScale),i=lV(i);var n=this.Kv(cV(t,this.Qv,this.uiScale,i,this.Yv,this.Zv,this.vn));return void 0!==i&&i!==this.uiScale||(void 0===t||"vertical"===t.getAlignment()?n.setOrigin(lz.RightCenter).setPosition({x:100,y:50}):n.setOrigin(lz.CenterBottom).setPosition({x:50,y:0})),n},t.prototype.dispose=function(){return this.iy&&this.iy(),this.ny&&this.ny(),vV(this.uiScale),vV(this.pixelScale),this.Gv&&this.Gv(),this.Ev.slice().forEach(Tr),this.Nv.slice().forEach(Tr),this._f.ro(),this.engine.xn(),this.Vv&&this.Vv(this),this.an.emit("dispose"),this},t.prototype.saveToFile=function(t,i,n){return fV(this.engine,t,i,n),this},t.prototype.Lh=function(t){this.Qt=t,this.jv()},t.prototype.bi=function(){return this.pixelScale.bi(),this.uiScale.bi(),this},t.prototype.gi=function(){return this.pixelScale.gi(),this.uiScale.gi(),this},t.prototype.Tf=function(){if(this.Wv){var t=this._f.oo.vi(),i=t.x,n=t.y;this.uiScale.oi(i,n),this.pixelScale.oi(i,n);var e=[this.Qt.left,this.Qt.right],r=[this.Qt.bottom,this.Qt.top];this.uiScale.Zi(e),this.uiScale.Ki(r);var s=this.uiScale.getInnerIntervalPixels();this.pixelScale.qi(0,s.x).Zi(e).Ji(0,s.y).Ki(r),this.an.emit("resize",this,s.x,s.y,i,n)}this.Wv=!1},t.prototype.sy=function(){for(var t=0;t<this.Ev.length;t+=1)this.Ev[t].Fe().Tf();for(t=0;t<this.Nv.length;t+=1)this.Nv[t].Fe().Tf();this.Hv&&this.Hv()},t.prototype.oy=function(t,i){if(t){var n=t(i);this.onResize(n.Fe.bind(n)),this.Gv=n.ro.bind(n),this.Hv=n.Fe.bind(n)}},t.prototype.onBackgroundMouseEnter=function(t){return this.an.on("mouseEnterPanelBackground",t)},t.prototype.offBackgroundMouseEnter=function(t){return this.an.off(t,"mouseEnterPanelBackground")},t.prototype.onBackgroundMouseMove=function(t){return this.an.on("mouseMovePanelBackground",t)},t.prototype.offBackgroundMouseMove=function(t){return this.an.off(t,"mouseMovePanelBackground")},t.prototype.onBackgroundMouseLeave=function(t){return this.an.on("mouseLeavePanelBackground",t)},t.prototype.offBackgroundMouseLeave=function(t){return this.an.off(t,"mouseLeavePanelBackground")},t.prototype.onBackgroundMouseDown=function(t){return this.an.on("mouseDownPanelBackground",t)},t.prototype.offBackgroundMouseDown=function(t){return this.an.off(t,"mouseDownPanelBackground")},t.prototype.onBackgroundMouseUp=function(t){return this.an.on("mouseUpPanelBackground",t)},t.prototype.offBackgroundMouseUp=function(t){return this.an.off(t,"mouseUpPanelBackground")},t.prototype.onBackgroundMouseClick=function(t){return this.an.on("mouseClickPanelBackground",t)},t.prototype.offBackgroundMouseClick=function(t){return this.an.off(t,"mouseClickPanelBackground")},t.prototype.onBackgroundMouseDoubleClick=function(t){return this.an.on("mouseDoubleClickPanelBackground",t)},t.prototype.offBackgroundMouseDoubleClick=function(t){return this.an.off(t,"mouseDoubleClickPanelBackground")},t.prototype.onBackgroundMouseDragStart=function(t){return this.an.on("mouseDragStartPanelBackground",t)},t.prototype.offBackgroundMouseDragStart=function(t){return this.an.off(t,"mouseDragStartPanelBackground")},t.prototype.onBackgroundMouseDrag=function(t){return this.an.on("mouseDragPanelBackground",t)},t.prototype.offBackgroundMouseDrag=function(t){return this.an.off(t,"mouseDragPanelBackground")},t.prototype.onBackgroundMouseDragStop=function(t){return this.an.on("mouseDragStopPanelBackground",t)},t.prototype.offBackgroundMouseDragStop=function(t){return this.an.off(t,"mouseDragStopPanelBackground")},t.prototype.onBackgroundMouseWheel=function(t){return this.an.on("mouseWheelPanelBackground",t)},t.prototype.offBackgroundMouseWheel=function(t){return this.an.off(t,"mouseWheelPanelBackground")},t.prototype.onBackgroundTouchStart=function(t){return this.an.on("touchStartPanelBackground",t)},t.prototype.offBackgroundMouseTouchStart=function(t){return this.an.off(t,"touchStartPanelBackground")},t.prototype.onBackgroundTouchMove=function(t){return this.an.on("touchMovePanelBackground",t)},t.prototype.offBackgroundTouchMove=function(t){return this.an.off(t,"touchMovePanelBackground")},t.prototype.onBackgroundTouchEnd=function(t){return this.an.on("touchEndPanelBackground",t)},t.prototype.offBackgroundTouchEnd=function(t){return this.an.off(t,"touchEndPanelBackground")},t}(),vV=function(t){t.ri&&t.ri()},yV=function(t){function i(i,n,e,r,s,o,h){var u=t.call(this,i,n,e,n.qs(0),r,o,h)||this;return u.oy(s,u.pixelScale),u}return n(i,t),i.prototype.dispose=function(){return t.prototype.dispose.call(this),this},i.prototype.setMinimumSize=function(t){return this.tl=t,this.engine.xn(),this},i.prototype.getMinimumSize=function(){return this.tl},i.prototype.Tf=function(){t.prototype.Tf.call(this),t.prototype.sy.call(this)},i}(dV),SV=p(10,10,10,10),mV=function(t){function i(i,n,e,r,s,o,h,u){var a=t.call(this,i,n,e,r,o,h,u)||this;return a.Rf=s,a.hy=a.Rf.$e(a.uiScale).Jn("Chart").ph(l(50,100)).Bh(l(0,1)),a.uy=10,a.ly=0,a.hh=SV,a.hy.ie(a.vn.chartTitleFont).$n(a.vn.chartTitleFillStyle),a}return n(i,t),i.prototype.setTitle=function(t){return this.hy.Jn(t),this.engine.xn(),this},i.prototype.getTitle=function(){return this.hy.Kn()},i.prototype.setTitleFillStyle=function(t){return this.hy.$n(t),this.jv(),this},i.prototype.getTitleFillStyle=function(){return this.hy.Qn()},i.prototype.setTitleFont=function(t){return this.hy.ie(t),this.jv(),this},i.prototype.getTitleFont=function(){return this.hy.te()},i.prototype.setTitleRotation=function(t){return this.hy.ne(t),this.engine.xn(),this},i.prototype.getTitleRotation=function(){return this.hy.ee()},i.prototype.setTitleMarginTop=function(t){return this.uy=t,this.jv(),this},i.prototype.getTitleMarginTop=function(){return this.uy},i.prototype.setTitleMarginBottom=function(t){return this.ly=t,this.jv(),this},i.prototype.getTitleMarginBottom=function(){return this.ly},i.prototype.setPadding=function(t){return this.hh="object"==typeof t?x(this.hh,t):{left:t,top:t,right:t,bottom:t},this.jv(),this},i.prototype.getPadding=function(){return this.hh},i.prototype.Tf=function(){t.prototype.Tf.call(this),this.hy.ph(this.vy())},i.prototype.vy=function(){return l(50,100-this.uy*this.uiScale.tn().y)},i.prototype.yy=function(){return this.hy.isDisposed()||this.hy.Qn()===Re||0===this.hy.Kn().length?0:this.hy.Fe().vi().y/this.uiScale.tn().y+this.uy+this.ly},i.prototype.Sy=function(t){var i=t.my(),n=null==i?void 0:i.height,e=null==i?void 0:i.width;if(void 0!==n&&void 0!==e)return{x:n/2,y:e/2}},i.prototype.dispose=function(){return this.Rf.ro(),t.prototype.dispose.call(this)},i}(dV);t.LayerIndices=void 0,function(t){t[t.bg=0]="bg",t[t.bottom=1]="bottom",t[t.top=2]="top",t[t.ui=3]="ui"}(t.LayerIndices||(t.LayerIndices={})),t.SliceLabelIndices=void 0,(iN=t.SliceLabelIndices||(t.SliceLabelIndices={}))[iN.LabelsInsideSlices=0]="LabelsInsideSlices",iN[iN.LabelsOnSides=1]="LabelsOnSides";var bV,gV={SortByName:function(t,i){return t.getName().localeCompare(i.getName(),void 0,{numeric:!0})},SortByValueAscending:function(t,i){return t.getAnimatedValue()-i.getAnimatedValue()},SortByValueDescending:function(t,i){return i.getAnimatedValue()-t.getAnimatedValue()},None:function(){return 0}},wV={Name:function(t){return""+t.getName()},NamePlusValue:function(t){return t.getName()+": "+Math.round(t.getAnimatedValue())},NamePlusRelativeValue:function(t,i){return t.getName()+": "+(100*i).toFixed(2)+"%"}},pV=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.Mt="Slice",i.u=0,i}return n(i,t),i}(nN),kV=function(t,i){ss(i),t.setExploded(!t.getExploded())},xV=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return n(i,t),i}(pV),MV=function(t){function i(i,n,e,r,s,o,h,u){var a=t.call(this,r,o,h,u)||this;return a.vr=r,a.scale=s,a.Jf=o,a.Qf=h,a.by=!1,a.gy=Re,a.wy=Re,a.py=a.u,a.ky=a.by?1:0,a.xy=!1,a.My=th((function(){return a.vr.engine.xn()})),a.Ay=th((function(){return a.vr.engine.xn()})),a.Fy=function(){a.Ty=void 0},a.Cy=function(){a.By=void 0},a.index=i,a.Ly=a.Cc(n.Gc(s)),a.sr=a.Cc(e.$e(s)),a.onMouseClick(kV),a.onTouchEnd(kV),a}return n(i,t),i.prototype.setValue=function(t){return this.vr.getAnimationsEnabled()?this.xy||this.Iy(this.py,t):this.py=t,this.u=t,this.vr.engine.xn(),this},i.prototype.getValue=function(){return this.u},i.prototype.setExploded=function(t){var i=this;if(t&&!1===this.vr.getMultipleSliceExplosion())for(var n=this.vr.getSlices(),e=0;e<n.length;e+=1)n[e]!==this&&n[e].getExploded()&&n[e].setExploded(!1);return this.vr.getAnimationsEnabled()?(this.By&&this.By.finish(),this.By=this.Ay(300,Qo.ease)([[this.ky,t?1:0]],(function(t){var n=h(t,1)[0];i.ky=n,i.vr.engine.xn()})),this.By.onEveryAnimationEnd(this.Cy),this.by=!this.by):!1!==this.vr.getMultipleSliceExplosion()||t?(this.ky=this.by?0:1,this.by=!this.by):(this.ky=0,this.by=!this.by),this.vr.engine.xn(),this},i.prototype.getExploded=function(){return this.by},i.prototype.dispose=function(){var i=this;return this.vr.getAnimationsEnabled()&&this.py>0?(this.Ty&&(this.Ty.finish(!1),this.Ty=void 0),this.Iy(this.py,0,(function(){return t.prototype.dispose.call(i)}))):t.prototype.dispose.call(this),this.xy=!0,this},i.prototype.restore=function(){if(this.vr.getAnimationsEnabled()&&(this.Ty&&(this.Ty.finish(!1),this.Ty=void 0),this.Iy(this.py,this.u)),this.getExploded()&&!this.vr.getMultipleSliceExplosion())for(var i=this.vr.getSlices(),n=0;n<i.length;n+=1){var e=i[n];e!==this&&e.getExploded()&&e.setExploded(!1)}return t.prototype.restore.call(this),this.xy=!1,this},i.prototype.Iy=function(t,i,n){var e=this;this.Ty=this.My(300,Qo.ease)([[t,i]],(function(t){var i=h(t,1)[0];e.py=i,e.vr.engine.xn()})),this.Ty.onEveryAnimationEnd(this.Fy),n&&this.Ty.onAnimationEnd(n)},i.prototype.setStyle=function(t,i,n,e){this.gy=t,this.wy=n,this.Ly.$n(this.Bf?this.gy.getDefaultHighlightStyle():this.gy).Ys(i),this.sr.$n(this.Bf?this.wy.getDefaultHighlightStyle():this.wy).ie(e);for(var r=0;r<this.sc.length;r+=1)this.styleAttachedEntry(this.sc[r])},i.prototype.getAnimatedValue=function(){return this.py},i.prototype.getAnimatedExplosion=function(){return this.ky},i.prototype.Ac=function(t,i){t===this.Ly?t.$n(i?this.gy.getDefaultHighlightStyle():this.gy):t===this.sr&&t.$n(i?this.wy.getDefaultHighlightStyle():this.wy),this.vr.engine.xn()},i.prototype.attach=function(i,n){return void 0===n&&(n=!0),t.prototype.attach.call(this,i,n),this.styleAttachedEntry(i),this},i.prototype.setHighlighted=function(i){t.prototype.setHighlighted.call(this,i);for(var n=0;n<this.sc.length;n+=1)this.styleAttachedEntry(this.sc[n]);return this},i.prototype.styleAttachedEntry=function(t){ks(t,this.vn,{fill:this.gy,stroke:this.Ly.Xs()})},i}(xV),AV=function(t,i,n){return fo(i,ao(ko(.5*(t.Hu()+t.Hi())*Math.PI/180),n))},FV=function(t,i,n,e,r,s){for(var o=t.length,h=90,u=0;u<o;u+=1){var a=t[u],f=h-360*i[u],c=a.getAnimatedExplosion();if(0===c||1===o)a.Ly.ph(n);else{var l=fo(n,ao(ko(.5*(h+f)*Math.PI/180),s*c));a.Ly.ph(l)}a.Ly.Zu(h).Ku(f).Ju(e).Qu(e).$u(r),h=f}},TV=function(t){for(var i=t.getSlices(),n=0;n<i.length;n+=1)i[n].setExploded(!1)},CV=function(i){function e(n,e,r,s,o,h,u,a){var f=i.call(this,n,e,r,e.qs(t.LayerIndices.bg),e.qs(t.LayerIndices.ui),s,h,u)||this;f.Oy=[],f.Py=gV.SortByName,f._u=0,f.Dy=f.vn.sliceChartRadialFillStylePalette,f._y=f.vn.sliceChartStrokeStyle,f.Ry=!0,f.zy=f.vn.sliceLabelFont,f.Ey=f.vn.sliceLabelFillStyle,f.Ny=0,f.Vy=!1,f.Gy=20,f.Mn=!0,f.Hy=function(t){var i=f.Oy.indexOf(t);i>=0&&(f.Oy.splice(i,1),f.jy())},f.Wy=function(t){f.Oy.indexOf(t)<0&&(f.Oy.push(t),f.jy(),t.setHighlightOnHover(f.Ry))},u&&(f.vn=u),f.Uy=e.qs(t.LayerIndices.bottom),f.Yy=e.qs(t.LayerIndices.top),f.hy.Jn("Pie Chart"),f.oy(o,f.pixelScale),f.onBackgroundMouseDoubleClick(TV);var c=WE(new UE.DoublePoke(TV));return f.onBackgroundTouchStart(c.onTouchStart),f.onBackgroundTouchMove(c.onTouchMove),f.onBackgroundTouchEnd(c.onTouchEnd),a&&f.setAnimationsEnabled(!1),f}return n(e,i),e.prototype.addSlice=function(t,i){var n=new MV(this.Ny,this.Uy,this.Yy,this,this.pixelScale,this.Hy,this.Wy,this.vn);this.Ny+=1,n.setName(t);var e=this.Mn;return this.Mn=!1,n.setValue(i),this.Mn=e,this.Xy(n),this.Oy.push(n),this.jy(),n.setHighlightOnHover(this.Ry),n},e.prototype.addSlices=function(t){for(var i=[],n=0;n<t.length;n+=1)i.push(this.addSlice(t[n].name,t[n].value));return i},e.prototype.getSlices=function(){return this.Oy},e.prototype.setMultipleSliceExplosion=function(t){return this.Vy=t,this},e.prototype.getMultipleSliceExplosion=function(){return this.Vy},e.prototype.setInnerRadius=function(t){return this._u=t,this.engine.xn(),this},e.prototype.getInnerRadius=function(){return this._u},e.prototype.setSliceExplosionOffset=function(t){return this.Gy=t,this.engine.xn(),this},e.prototype.getSliceExplosionOffset=function(){return this.Gy},e.prototype.setLUT=function(t){return this.Sl=t,this.engine.xn(),this},e.prototype.setSliceFillStyle=function(t){this.Dy=t;for(var i=0;i<this.Oy.length;i+=1)this.Xy(this.Oy[i]);return this.engine.xn(),this},e.prototype.getSliceFillStyle=function(){return this.Dy},e.prototype.setSliceStrokeStyle=function(t){this._y="function"==typeof t?t(this._y):t;for(var i=0;i<this.Oy.length;i+=1)this.Xy(this.Oy[i]);return this.engine.xn(),this},e.prototype.getSliceStrokeStyle=function(){return this._y},e.prototype.setSliceSorter=function(t){return this.Py=t,this.Oy=this.Oy.sort(this.Py),this.engine.xn(),this},e.prototype.getSliceSorter=function(){return this.Py},e.prototype.setLabelFillStyle=function(t){this.Ey="function"==typeof t?t(this.Ey):t;for(var i=0;i<this.Oy.length;i+=1)this.Xy(this.Oy[i]);return this.engine.xn(),this},e.prototype.getLabelFillStyle=function(){return this.Ey},e.prototype.setLabelFont=function(t){this.zy="function"==typeof t?t(this.zy):t;for(var i=0;i<this.Oy.length;i+=1)this.Xy(this.Oy[i]);return this.engine.xn(),this},e.prototype.getLabelFont=function(){return this.zy},e.prototype.setLabelFormatter=function(t){return this.Zy=t,this.engine.xn(),this},e.prototype.getLabelFormatter=function(){return this.Zy},e.prototype.setAnimationsEnabled=function(t){return this.Mn=t,this},e.prototype.getAnimationsEnabled=function(){return this.Mn},e.prototype.disableAnimations=function(){return this.setAnimationsEnabled(!1),this},e.prototype.setSliceHighlightOnHover=function(t){return this.Ry=t,this.Oy.forEach((function(i){return i.setHighlightOnHover(t)})),this},e.prototype.Tf=function(){var t=this;i.prototype.Tf.call(this),i.prototype.sy.call(this);var n=this.yy(),e=l(this.pixelScale.x.getInnerInterval()-(this.hh.left+this.hh.right),this.pixelScale.y.getInnerInterval()-(this.hh.bottom+this.hh.top+n)),r=l(this.hh.left+e.x/2,this.hh.bottom+e.y/2);if(this.Sl){var s=this.Sl;this.Oy.forEach((function(i){t.Xy(i,new Ee({color:s.getColors(i.getAnimatedValue())}))}))}for(var o=0;o<this.Oy.length;o+=1)0===this.Oy[o].getAnimatedValue()?this.Oy[o].Ly.dispose():this.Oy[o].Ly.restore();this.Oy=this.Oy.sort(this.Py);var h=this.Oy.filter((function(t){return t.getAnimatedValue()>0})),u=0;for(o=0;o<h.length;o+=1)u+=h[o].getAnimatedValue();var a,f,c=[];for(o=0;o<h.length;o+=1)c.push((a=h[o].getAnimatedValue(),f=u,a>0?a/f:0));for(o=0;o<h.length;o+=1){var d=h[o];d.sr.Jn(this.Zy(d,c[o])).Fe()}this.Ky(h,c,r,e)},e.prototype.Xy=function(t,i){void 0===i&&(i=this.Dy(t.index)),t.setStyle(i,this._y,this.Ey,this.zy)},e.prototype.jy=function(){this.Oy=this.Oy.sort(this.Py),this.engine.xn()},e.prototype.Fl=function(){return this.Oy},e}(mV),BV=function(t){return!("object"!=typeof t||!t||!("pattern"in t))},LV={UserSeries:{type:"ApplicationType",args:{type:"UserSeries"}},InternalUI:{type:"ApplicationType",args:{type:"InternalUI"}}},IV=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var n=[];return t.forEach((function(t){t&&BV(t)&&n.push({type:"DataPattern",args:t})})),n};!function(t){t[t.TopRight=0]="TopRight",t[t.TopLeft=1]="TopLeft",t[t.BottomLeft=2]="BottomLeft",t[t.BottomRight=3]="BottomRight"}(bV||(bV={}));var OV,PV=function(t){var i=.5*(t.Ly.Hu()+t.Ly.Hi());for(i%=360;i<0;)i+=360;return i<=90?bV.TopRight:i<180?bV.TopLeft:i<270?bV.BottomLeft:bV.BottomRight},DV=function(t,i,n,e,r,s,o,h,u){if(0!==t.length)for(var a,f=e.x+i*r.x*.5,c=1===n?Math.max:Math.min,d=0;d<t.length;d+=1){var v=t[d],y=void 0;a&&(y=a.sr.kh().y+n*(a.sr.vi().y+10));var S=AV(v.Ly,e,s+h+o+u).y,m=void 0===y?S:c(S,y);v.sr.ph(l(f,m)).Ah(i).Th(0),a=v}},_V=function(t,i,n,e,r,s){var o=r*t.getAnimatedExplosion(),h=t.Ly,u=t.sr,a=AV(h,n,e+s+o),f=bo(u.kh().y,a,n);return[a,f,l(u.kh().x-i*(s+u.vi().x),f.y)]},RV=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return function(i){var n=PV(i);return t.includes(n)}},zV=RV(bV.BottomLeft,bV.TopLeft),EV=RV(bV.BottomRight,bV.TopRight),NV=RV(bV.TopLeft,bV.TopRight),VV=RV(bV.BottomLeft,bV.BottomRight),GV=function(t){function i(i,n,e,r,s,o,h,u){var a=t.call(this,i,n,e,r,s,o,h,u)||this;return a.Zy=wV.NamePlusValue,a.qy=5,a.Jy=5,a.Qy=[],a.$y=a.vn.sliceLabelConnectorStyle,a.setPadding({bottom:50}),a}return n(i,t),i.prototype.setLabelConnectorStyle=function(t){this.$y=t;for(var i=0;i<this.Qy.length;i+=1)this.Qy[i].na(this.$y);return this.engine.xn(),this},i.prototype.getLabelConnectorStyle=function(){return this.$y},i.prototype.setLabelConnectorLength=function(t){return this.Jy=t,this.engine.xn(),this},i.prototype.getLabelConnectorLength=function(){return this.Jy},i.prototype.setLabelConnectorGap=function(t){return this.qy=t,this.engine.xn(),this},i.prototype.getLabelConnectorGap=function(){return this.qy},i.prototype.Ky=function(t,i,n,e){var r=this.Gy,s=this.qy,o=this.Jy,h=this.zy.getSize(),u=0;if(1===t.length)u=t[0].sr.vi().x;else for(var a=0;a<t.length;a+=1)u=Math.max(u,t[1].sr.vi().x);var f=Math.max(0,.5*Math.min(e.x-2*u,e.y-2*h)-(s+r+o));FV(t,i,n,f,this._u,r);var c=t.filter(zV),l=t.filter(EV),d=c.filter(NV),v=c.filter(VV).reverse(),y=l.filter(NV).reverse(),S=l.filter(VV);DV(v,-1,-1,n,e,f,r,s,o),DV(d,-1,1,n,e,f,r,s,o),DV(S,1,-1,n,e,f,r,s,o),DV(y,1,1,n,e,f,r,s,o);for(a=0;a<this.Qy.length;a+=1)this.Qy[a].$h().dispose();for(a=0;a<c.length;a+=1)this.tS(_V(c[a],-1,n,f,r,s));for(a=0;a<l.length;a+=1)this.tS(_V(l[a],1,n,f,r,s))},i.prototype.getMinimumSize=function(){return l(500,300)},i.prototype.tS=function(t){for(var i,n=0;n<this.Qy.length;n+=1)if(this.Qy[n].isDisposed()){i=this.Qy[n].restore();break}void 0===i&&(i=this.Yy.iS(this.pixelScale,void 0,[LV.InternalUI]).na(this.$y),this.Qy.push(i)),i.Qh(t)},i}(CV),HV=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.Zy=wV.Name,i.nS=.5,i}return n(i,t),i.prototype.Ky=function(t,i,n,e){var r=this.Gy,s=Math.max(0,.5*Math.min(e.x,e.y)-r);FV(t,i,n,s,this._u,r);for(var o=0;o<t.length;o+=1){var h=t[o],u=h.Ly,a=h.sr,f=this._u/100,c=((1-f)*this.nS+f)*s+h.getAnimatedExplosion()*r,l=AV(u,n,c);a.ph(l).Ah(0).Th(0)}},i.prototype.getMinimumSize=function(){return l(200,200)},i.prototype.setLabelPosition=function(t){return this.nS=t,this.engine.xn(),this},i.prototype.getLabelPosition=function(){return this.nS},i}(CV),jV={LabelsOnSides:GV,LabelsInsideSlices:HV},WV={je:function(t){return t.getXMin()},We:function(t){return t.getXMax()},Ye:function(t){return t.eS().x},rS:function(t){return t.x},sS:function(t,i){return{x:t.x,y:i.y,z:i.z}},Cl:y(0,-1,0),oS:function(t){var i={x:t.x>=0?1:-1,y:t.y>=0?1:-1,z:t.z>=0?1:-1};return{gridlinePositionA:y(0,i.y,i.z),gridlinePositionB:y(0,i.y,-i.z),gridlinePositionC:y(0,-i.y,-i.z)}}},UV={je:function(t){return t.getYMin()},We:function(t){return t.getYMax()},Ye:function(t){return t.eS().y},rS:function(t){return t.y},sS:function(t,i){return{x:i.x,y:t.y,z:i.z}},Cl:y(-1,0,0),oS:function(t){var i={x:t.x>=0?1:-1,y:t.y>=0?1:-1,z:t.z>=0?1:-1};return{gridlinePositionA:y(i.x,0,i.z),gridlinePositionB:y(i.x,0,-i.z),gridlinePositionC:y(-i.x,0,-i.z)}}},YV={je:function(t){return t.getZMin()},We:function(t){return t.getZMax()},Ye:function(t){return t.eS().z},rS:function(t){return t.z},sS:function(t,i){return{x:i.x,y:i.y,z:t.z}},Cl:y(1,0,0),oS:function(t){var i={x:t.x>=0?1:-1,y:t.y>=0?1:-1,z:t.z>=0?1:-1};return{gridlinePositionA:y(i.x,-i.y,0),gridlinePositionB:y(i.x,i.y,0),gridlinePositionC:y(-i.x,i.y,0)}}},XV=function(t){if(t instanceof nr){var i=t.getThickness(),n=t.getFillStyle();if(n instanceof Ee)return 1===i?uh:new ah({size:i,fillStyle:n,shape:"sphere"})}return uh},ZV=function(t){function i(i,n,e,r,s,o,h,u){var a=t.call(this,i,n,e,r,u,{numeric:r.numericTickStrategy,datetime:r.dateTimeTickStrategy,time:r.timeTickStrategy},{type:"linear"})||this;return a.hS=s,a.uS=o,a.aS=h,a.fS=a.hS.Rt,a.cS=a.hS.iS([LV.InternalUI]).na(a.dn.rS(a.vn.axesStyles3D)).lS(XV(a.dn.rS(a.vn.axesStyles3D))).setMouseInteractions(!1),a.qn=a.uS.$e(a.aS).setMouseInteractions(!1).$n(a.vn.axisTitleFillStyle).ie(a.vn.axisTitleFont),a.El=new Map,a.dS=function(){},a.vS=function(){},a.yS=function(){},a.SS=function(){},a.cS.setMouseEnterEventHandler(a.dS).setMouseLeaveEventHandler(a.vS).setMouseDragEventHandler(a.yS).setMouseDragStopEventHandler(a.SS),e.cv=a,a}return n(i,t),i.prototype.setStrokeStyle=function(t){return this.cS.na(t).lS(XV(this.cS.ea())),this.chart.engine.xn(),this},i.prototype.getStrokeStyle=function(){return this.cS.ea()},i.prototype.setAnimationScroll=function(i){return t.prototype.setAnimationScroll.call(this,i),this},i.prototype.setMouseInteractions=function(t){return this},i.prototype.Ge=function(){return this.chart.getSeries()},i.prototype.mS=function(t){return Math.abs(this.Rt.bS(t)*this.hS.gS(1))},i.prototype.qe=function(t,i,n){var e=Math.abs(this.Rt.bS(i-t)*this.hS.gS(1));return{min:t-n*e,max:i+n*e}},i.prototype.Be=function(t,i,n,e){return new KV(i,t,n,e,this.uS,this.aS,this.hS)},i.prototype.Le=function(t,i){var n=i.wuSize,e=i.start,r=i.end,s=i.tickDirection3D,o=i.tickDirection2D,h=t.tickLevel.Ce,u=(t.value-this.Rt.getInnerStart())/(this.Rt.getInnerEnd()-this.Rt.getInnerStart()),a=Ls.addVec(Ys(e,r,u),Ls.multiplyVec(Ls.multiply(s,this.hS.gS(.5*this.cS.ea().thickness)),n)),f=Ls.addVec(a,Ls.multiplyVec(Ls.multiply(s,this.hS.gS(h.tickLength)),n)),c=this.hS.wS(f)||l(0,0),d=fo(sr(c,this.chart.engine.scale,this.aS),ao(o,h.tickPadding));return t.label.ph(d).Bh({x:-o.x,y:-o.y}),{posTickEnd3D:f,posTickStart3D:a,tickPositionRelative:u}},i.prototype.Ov=function(t,i,n){var e=i.wuSize,r=i.start,s=i.end,o=i.tickDirection3D,h=(t-this.Rt.getInnerStart())/(this.Rt.getInnerEnd()-this.Rt.getInnerStart()),u=Ls.addVec(Ys(r,s,h),Ls.multiplyVec(Ls.multiply(o,this.hS.gS(.5*this.cS.ea().thickness)),e)),a=Ls.addVec(u,Ls.multiplyVec(Ls.multiply(o,this.hS.gS(10)),e)),f=this.hS.wS(u)||l(0,0),c=this.hS.wS(a)||l(0,0);return this.uS.Gf(this.aS).ha(f).Ku(c).na(new nr({fillStyle:new Ee({color:Te(120*n)}),thickness:1}))},i.prototype.Ze=function(t,i){return qV(t,i,this.Rt)},i.prototype.Tf=function(t){var i,n,e,r,s,u,a=this,f=this.fS,c=y(f.x.pS(),f.y.pS(),f.z.pS());this.dn===YV?(s=y(f.x.getInnerEnd(),f.y.getInnerStart(),f.z.getInnerStart()),u=y(f.x.getInnerEnd(),f.y.getInnerStart(),f.z.getInnerEnd())):(s=y(f.x.getInnerStart(),f.y.getInnerStart(),f.z.getInnerStart()),u=this.dn.sS(y(f.x.getInnerEnd(),f.y.getInnerEnd(),f.z.getInnerEnd()),s));var d=this.dn.Cl,v=this.hS.wS(s)||l(0,0),S=this.hS.wS(u)||l(0,0),m=Ys(s,u,.5),b=Ls.addVec(m,Ls.multiplyVec(Ls.multiply(d,-1),c)),g=this.hS.wS(m)||l(0,0),w=this.hS.wS(b)||l(0,0),p=oo(co(sr(g,this.chart.engine.scale,this.aS),sr(w,this.chart.engine.scale,this.aS)));this.cS.$h().Qh([s,u]);var k=this.dn.oS(t),x=k.gridlinePositionA,M=k.gridlinePositionB,A=k.gridlinePositionC,F=function(t){return{x:-1===t.x?a.fS.x.getInnerStart():1===t.x?a.fS.x.getInnerEnd():0,y:-1===t.y?a.fS.y.getInnerStart():1===t.y?a.fS.y.getInnerEnd():0,z:-1===t.z?a.fS.z.getInnerStart():1===t.z?a.fS.z.getInnerEnd():0}},T=F(x),C=F(M),B=F(A),L={physicalAxisSize:uo(co(v,S)),wuSize:c,start:s,end:u,tickDirection3D:d,tickDirection2D:p,gridlinePositionA:T,gridlinePositionB:C,gridlinePositionC:B},I=this.ve(L);try{for(var O=o(this.bn),P=O.next();!P.done;P=O.next()){var D=h(P.value,2),_=D[0],R=D[1],z=this.El.get(_);z||(z={grid:this.hS.Dv().setMouseInteractions(!1),tick:this.hS.Dv().setMouseInteractions(!1)}),z.grid.$h(),z.tick.$h();try{for(var E=(e=void 0,o(R)),N=E.next();!N.done;N=E.next()){var V=h(N.value,2)[1],G=this.Iv(V,L,I);G.gridStroke&&z.grid.Qh(G.gridStroke),z.tick.Qh([G.tickStroke.start,G.tickStroke.end])}}catch(t){e={error:t}}finally{try{N&&!N.done&&(r=E.return)&&r.call(E)}finally{if(e)throw e.error}}z.grid.na(_.Ce.getGridStrokeStyle()),z.tick.na(_.Ce.getTickStyle()),this.El.set(_,z)}}catch(t){i={error:t}}finally{try{P&&!P.done&&(n=O.return)&&n.call(O)}finally{if(i)throw i.error}}var H=this.De((function(t,i){var n=i.label.vi();return t.x=Math.max(t.x,n.x),t.y=Math.max(t.y,n.y),t}),l(0,0)),j=Math.atan((S.y-v.y)/(S.x-v.x));this.qn.Bh({x:0,y:0}).ne(180*-j/Math.PI);var W=Ls.addVec(m,Ls.multiplyVec(Ls.multiply(d,this.hS.gS(.5*this.cS.ea().thickness+this.Ve((function(t,i){return Math.max(t,i.tickLength)}),0))),c)),U=this.hS.wS(W)||l(0,0),Y=fo(sr(U,this.chart.engine.scale,this.aS),fo(fo(lo(H,p),ao(p,this.Ve((function(t,i){return Math.max(t,i.labelPadding)}),0))),lo(ao(this.qn.Fe().vi(),.5),p)));this.qn.ph(Y);this.cS.kS={overrideFollowing:!1,skipMousePicking:!1}},i.prototype.Iv=function(t,i,n){var r,s=i.gridlinePositionA,o=i.gridlinePositionB,h=i.gridlinePositionC,u=n.get(t),a=u.posTickStart3D,f=u.posTickEnd3D,c=u.tickPositionRelative;Br(c,0)||Br(c,1)||(r=[this.isX()?e(e({},s),{x:a.x}):this.isY()?e(e({},s),{y:a.y}):this.isZ()?e(e({},s),{z:a.z}):{x:0,y:0,z:0},this.isX()?e(e({},o),{x:a.x}):this.isY()?e(e({},o),{y:a.y}):this.isZ()?e(e({},o),{z:a.z}):{x:0,y:0,z:0},this.isX()?e(e({},h),{x:a.x}):this.isY()?e(e({},h),{y:a.y}):this.isZ()?e(e({},h),{z:a.z}):{x:0,y:0,z:0}]);return{gridStroke:r,tickStroke:{start:a,end:f}}},i.prototype.re=function(){var i,n;if(this.El){try{for(var e=o(this.El),r=e.next();!r.done;r=e.next()){var s=r.value;s[1].grid.dispose(),s[1].tick.dispose()}}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=e.return)&&n.call(e)}finally{if(i)throw i.error}}this.El.clear()}t.prototype.re.call(this)},i.prototype.isX=function(){return this.dn===WV},i.prototype.isY=function(){return this.dn===UV},i.prototype.isZ=function(){return this.dn===YV},i}(eh),KV=function(t){function i(i,n,e,r,s,o,h,u){var a=t.call(this,i,n,e,r,s,o,u)||this;return a.Ll=h,a}return n(i,t),i}(rh),qV=function(t,i,n){return Lr(t+.1*(i-t)+Math.abs(n.pS())/100*Math.sign(i-t),Math.min(t,i),Math.max(t,i))},JV=function(){this.type="simple"},QV=new JV,$V=function(t){this.type="phong",this.ambientReflection=1,this.specularReflection=.1,this.diffuseReflection=1,this.ambientColor=Fe("#000"),this.specularColor=Fe("#fff"),this.shininess=32,t&&(this.ambientReflection=Number.isNaN(Number(t.ambientReflection))?this.ambientReflection:Number(t.ambientReflection),this.specularReflection=Number.isNaN(Number(t.specularReflection))?this.specularReflection:Number(t.specularReflection),this.diffuseReflection=Number.isNaN(Number(t.diffuseReflection))?this.diffuseReflection:Number(t.diffuseReflection),this.ambientColor=t.ambientColor||this.ambientColor,this.specularColor=t.specularColor||this.specularColor,this.shininess=t.shininess||this.shininess)},tG=new $V,iG={Simple:JV,Phong:$V},nG=function(t){function i(i,n,e,r,s){var o=t.call(this,i,n,e,s)||this;return o.vr=i,o.hS=r,o.xS=tG,o.MS=!0,o.AS=!0,o.setMouseInteractions(!1),o}return n(i,t),i.prototype.setAutoScrollingEnabled=function(t){return this.MS=t,this.vr.engine.xn(),this},i.prototype.getAutoScrollingEnabled=function(){return this.MS},i.prototype.setColorShadingStyle=function(t){return this.xS=t,this.ic.forEach((function(i){return i.FS(t)})),this.hS.xn(),this},i.prototype.getColorShadingStyle=function(){return this.xS},i.prototype.setDepthTestEnabled=function(t){return this.AS=t,this.ic[0].TS(t),this.hS.xn(),this},i.prototype.getDepthTestEnabled=function(){return this.AS},i.prototype.CS=function(){},i.prototype.Tf=function(){},i.prototype.BS=function(){},i.prototype.getXMax=function(){var t=this.ic[0];return t?t.Et():void 0},i.prototype.getXMin=function(){var t=this.ic[0];return t?t.zt():void 0},i.prototype.getYMax=function(){var t=this.ic[0];return t?t.Vt():void 0},i.prototype.getYMin=function(){var t=this.ic[0];return t?t.Nt():void 0},i.prototype.getZMax=function(){var t=this.ic[0];return t?t.Ht():void 0},i.prototype.getZMin=function(){var t=this.ic[0];return t?t.Gt():void 0},i.prototype.eS=function(){var t=this.ic[0];return t?y(t.cu(),t.lu(),t.LS()):y(0,0,0)},i.prototype.IS=function(t){return this},i.prototype.OS=function(){return this},i}(nN),eG=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.aa=[],i}return n(i,t),i.prototype.add=function(t){return Array.isArray(t)?this.PS(t):this.PS([t]),this},i.prototype.clear=function(){var t,i;this.aa.length=0;try{for(var n=o(this.ic),e=n.next();!e.done;e=n.next()){e.value.$h().dispose()}}catch(i){t={error:i}}finally{try{e&&!e.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}return this.ic.length=0,this.nc=0,this},i.prototype.getPointAmount=function(){return this.ic.reduce((function(t,i){return t+i.tu()+i.iu()}),this.aa.length)},i.prototype.CS=function(){},i.prototype.Tf=function(){this.aa.length>0&&this.DS(this.aa)},i.prototype.BS=function(){this._S=void 0,this.aa.length=0},i.prototype.He=function(){return this.MS&&this.getPointAmount()>0},i.prototype.PS=function(t){0!==t.length&&(this._S?this._S=Qs(this._S,qs(t)):this._S=qs(t),this.aa=ps(this.aa,t,{canReturnB:!1}),this.vr.engine.xn())},i.prototype.getXMax=function(){return Kr(this.ic,Er,Math.max,Wr,this._S)},i.prototype.getXMin=function(){return Kr(this.ic,zr,Math.min,jr,this._S)},i.prototype.getYMax=function(){return Kr(this.ic,Vr,Math.max,Yr,this._S)},i.prototype.getYMin=function(){return Kr(this.ic,Nr,Math.min,Ur,this._S)},i.prototype.getZMax=function(){return Kr(this.ic,Hr,Math.max,Zr,this._S)},i.prototype.getZMin=function(){return Kr(this.ic,Gr,Math.min,Xr,this._S)},i.prototype.eS=function(){var t,i,n=y(0,0,0);try{for(var e=o(this.ic),r=e.next();!r.done;r=e.next()){var s=r.value;n.x=Math.max(n.x,s.cu()),n.y=Math.max(n.y,s.lu()),n.z=Math.max(n.z,s.LS())}}catch(i){t={error:i}}finally{try{r&&!r.done&&(i=e.return)&&i.call(e)}finally{if(t)throw t.error}}return n},i}(nG),rG=function(t){function i(i,n,e,r,s){var o=t.call(this,i,n,e,r,s)||this;o.Mt="Box Series 3D",o.RS=.25,o.ml=function(){return xs(o.Ho)};var h=o.vr.getSeries().length;o.Ho=new c(Fs(o.vn.boxSeriesFillStyle,h));var u=o.hS.ES().TS(o.AS).$n(o.Ho.L()).zS(o.RS);return o.Cc(u),o}return n(i,t),i.prototype.invalidateData=function(t){var i=t.length;if(0===i)return this;var n,e=t[0];if(!e)return this;if("xMin"in e||"yMin"in e||"zMin"in e||"xMax"in e||"yMax"in e||"zMax"in e){n=[];for(var r=0;r<i;r+=1){var s=t[r],o="xMin"in s&&"xMax"in s,h="yMin"in s&&"yMax"in s,u="zMin"in s&&"zMax"in s;n[r]={color:s.color,value:s.value,id:s.id,xCenter:o?(s.xMin+s.xMax)/2:void 0,yCenter:h?(s.yMin+s.yMax)/2:void 0,zCenter:u?(s.zMin+s.zMax)/2:void 0,xSize:o?s.xMax-s.xMin:void 0,ySize:h?s.yMax-s.yMin:void 0,zSize:u?s.zMax-s.zMin:void 0}}}else n=t;return this.ic[0].NS(n.slice()),this.vr.engine.xn(),this},i.prototype.setFillStyle=function(t){(this.Ho.C(t),this.Bf)||(this.ic[0].$n(t),this.vr.engine.xn());return this},i.prototype.getFillStyle=function(){return this.Ho.L()},i.prototype.setRoundedEdges=function(t){var i,n;void 0!==t&&isNaN(t)&&(console.error("'BoxSeries3D.setRoundedEdges | NaN was supplied.'"),t=void 0),this.RS=void 0!==t?Lr(t,0,1):void 0;try{for(var e=o(this.ic),r=e.next();!r.done;r=e.next()){r.value.zS(this.RS)}}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=e.return)&&n.call(e)}finally{if(i)throw i.error}}return this.hS.xn(),this},i.prototype.getRoundedEdges=function(){return this.RS},i.prototype.He=function(){return this.MS},i.prototype.Ac=function(t,i){t.$n(this.Ho.D(i)),this.vr.engine.xn()},i.prototype.Tf=function(){t.prototype.Tf.call(this),this.ic[0].Fe(!1)},i.prototype.attach=function(i,n){return t.prototype.attach.call(this,i,n),ks(i,this.vn,{fill:this.Ho}),this},i}(nG),sG=function(t){function i(i,n,e,r,s){var o=t.call(this,i,n,e,r,s)||this;return o.ml=function(){return xs(o.ia.L().getFillStyle())},o}return n(i,t),i.prototype.setStrokeStyle=function(t){var i,n;this.ia.C(t);var e=this.ia.D(this.Bf);try{for(var r=o(this.ic),s=r.next();!s.done;s=r.next()){s.value.na(e)}}catch(t){i={error:t}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return this.hS.xn(),this},i.prototype.getStrokeStyle=function(){return this.ia.L()},i.prototype.setStrokeStyleHighlight=function(t){var i,n;if(this.ia.I(t),this.getHighlighted()){var e=this.ia.D(!0);try{for(var r=o(this.ic),s=r.next();!s.done;s=r.next()){s.value.na(e)}}catch(t){i={error:t}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}}return this.hS.xn(),this},i.prototype.getStrokeStyleHighlight=function(){return this.ia.D(!0)},i.prototype.setLineStyle=function(t){return this.setStrokeStyle(t),this},i.prototype.getLineStyle=function(){return this.getStrokeStyle()},i.prototype.setLineStyleHighlight=function(t){return this.setStrokeStyleHighlight(t),this},i.prototype.getLineStyleHighlight=function(){return this.getStrokeStyleHighlight()},i.prototype.add=function(t){return(t=Array.isArray(t)?t:[t])?(this.ic[0].Qh(t.slice()),this.hS.xn(),this):this},i.prototype.clear=function(){return this.ic[0].$h(),this.nc=0,this},i.prototype.getPointAmount=function(){var t=this.ic[0];return t.tu()+t.iu()},i.prototype.He=function(){return this.MS&&this.getPointAmount()>0},i.prototype.Ac=function(t,i){t.na(this.ia.D(i)).lS(this.VS.D(i)),this.hS.xn()},i.prototype.attach=function(i,n){return t.prototype.attach.call(this,i,n),ks(i,this.vn,{stroke:this.ia}),this},i.prototype.lc=function(t,i){},i}(nG),oG=function(t){function i(i,n,e,r,s){var o=t.call(this,i,n,e,r,s)||this;o.Mt="Line Series 3D";var h=o.vr.getSeries().length;return o.ia=new c(Ts(s.lineSeries3DStrokeStyle,h,s.seriesStrokeStyle3D)),o.VS=new c(Kz.pointStyle3D),o.GS(o.ia.L(),o.ia.O()),o.Cc(o.hS.iS([LV.UserSeries]).TS(o.AS).na(o.ia.D(o.Bf)).lS(o.VS.D(o.Bf))),o}return n(i,t),i.prototype.setStrokeStyle=function(i){t.prototype.setStrokeStyle.call(this,i),this.GS(this.ia.L(),this.ia.O());var n=this.VS.D(this.getHighlighted());return this.ic[0].lS(n),this},i.prototype.setStrokeStyleHighlight=function(i){t.prototype.setStrokeStyleHighlight.call(this,i),this.GS(this.ia.L(),this.ia.O());var n=this.VS.D(this.getHighlighted());return this.ic[0].lS(n),this},i.prototype.GS=function(t,i){var n=new ch.Triangulated({shape:"sphere",fillStyle:t.getFillStyle(),size:t.getThickness()}),e=new ch.Triangulated({shape:"sphere",fillStyle:i.getFillStyle(),size:i.getThickness()});this.VS.C(n).I(e)},i}(sG),hG=function(t){function i(i,n,e,r,s){var o=t.call(this,i,n,e,r,s)||this;o.Mt="Point Line Series 3D";var h=o.vr.getSeries().length;return o.ia=new c(Ts(s.pointLineSeries3DStrokeStyle,h,s.seriesStrokeStyle3D)),o.VS=new c(Ts(s.pointLineSeries3DPointStyle,h,s.seriesTriangulatedPointStyle3D)),o.HS(),o.Cc(o.hS.iS([LV.UserSeries]).TS(o.AS).na(o.ia.D(o.Bf)).lS(o.VS.D(o.Bf))),o}return n(i,t),i.prototype.setPointStyle=function(t){this.VS.C(t),this.HS();var i=this.VS.D(this.Bf);return this.ic[0].lS(i),this.hS.xn(),this},i.prototype.getPointStyle=function(){return this.VS.L()},i.prototype.setPointStyleHighlight=function(t){if(this.VS.I(t),this.getHighlighted()){var i=this.VS.D(!0);this.ic[0].lS(i)}return this.hS.xn(),this},i.prototype.getPointStyleHighlight=function(){return this.VS.D(!0)},i.prototype.setStrokeStyle=function(i){t.prototype.setStrokeStyle.call(this,i);var n=this.ia.L(),e=Math.abs(n.getThickness()),r=this.VS.L();e>r.getSize()&&this.VS.C(r.setSize(e)),this.HS();var s=this.VS.D(this.Bf);return this.ic[0].lS(s),this.hS.xn(),this},i.prototype.setStrokeStyleHighlight=function(i){return t.prototype.setStrokeStyleHighlight.call(this,i),this.HS(),this.hS.xn(),this},i.prototype.setLineStyle=function(t){return this.setStrokeStyle(t),this},i.prototype.HS=function(){var t=this.VS.L(),i=this.ia.L(),n=t.getSize();"number"==typeof n?this.VS.I(t.setSize(n*i.highlightThicknessMultiplier)):this.VS.I(t.setSize(Ls.multiply(n,i.highlightThicknessMultiplier)))},i.prototype.Ac=function(t,i){t.na(this.ia.D(i)).lS(this.VS.D(i)),this.hS.xn()},i}(sG),uG=function(t){function i(i,n,e,r,s,o){return t.call(this,i,n,e,r,s)||this}return n(i,t),i.prototype.add=function(t){return(t=Array.isArray(t)?t:[t])?(this.ic[0].Qh(t.slice()),this.hS.xn(),this):this},i.prototype.clear=function(){return this.ic[0].$h(),this.nc=0,this},i.prototype.getPointAmount=function(){var t=this.ic[0];return t.tu()+t.iu()},i.prototype.He=function(){return this.MS&&this.getPointAmount()>0},i.prototype.Ac=function(t,i){t.jS(this.WS.D(i)),this.hS.xn()},i.prototype.attach=function(i,n){return t.prototype.attach.call(this,i,n),ks(i,this.vn,{point3D:this.WS}),this},i.prototype.lc=function(t,i){},i}(nG),aG=function(t){function i(i,n,r,s,o,h){var u=t.call(this,i,n,r,s,o,h)||this;u.Mt="Point Series 3D",u.ml=function(){return xs(u.WS.L().getFillStyle())};var a=u.vr.getSeries().length;u.WS=new c(Ts(o.pointSeries3DPointStyle,a,o.seriesTriangulatedPointStyle3D));var f=e({individualPointColorEnabled:!1,individualPointSizeEnabled:!1,individualLookupValuesEnabled:!1,individualPointSizeAxisEnabled:!1},h);return u.Cc(u.hS.US(f).TS(u.AS).jS(u.WS.D(u.Bf))),u}return n(i,t),i.prototype.setPointStyle=function(t){var i,n;this.WS.C(t);var e=this.WS.D(this.Bf);try{for(var r=o(this.ic),s=r.next();!s.done;s=r.next()){s.value.jS(e)}}catch(t){i={error:t}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return this.hS.xn(),this},i.prototype.getPointStyle=function(){return this.WS.L()},i.prototype.setPointStyleHighlight=function(t){var i,n;if(this.WS.I(t),this.getHighlighted()){var e=this.WS.D(!0);try{for(var r=o(this.ic),s=r.next();!s.done;s=r.next()){s.value.jS(e)}}catch(t){i={error:t}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}}return this.hS.xn(),this},i.prototype.getPointStyleHighlight=function(){return this.WS.D(!0)},i}(uG),fG=function(t){function i(i,n,r,s,o,h){var u=t.call(this,i,n,r,s,o,h)||this;u.Mt="Point Cloud Series 3D",u.ml=function(){return xs(u.WS.L().getFillStyle())};var a=u.vr.getSeries().length;u.WS=new c(Fs(o.seriesNonTriangulatedPointStyle3D,a));var f=e({individualPointColorEnabled:!1,individualPointSizeEnabled:!1,individualLookupValuesEnabled:!1,individualPointSizeAxisEnabled:!1},h);return u.Cc(u.hS.US(f).jS(u.WS.D(u.Bf))),u}return n(i,t),i.prototype.setPointStyle=function(t){var i,n;this.WS.C(t);var e=this.WS.D(this.Bf);try{for(var r=o(this.ic),s=r.next();!s.done;s=r.next()){s.value.jS(e)}}catch(t){i={error:t}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return this.hS.xn(),this},i.prototype.getPointStyle=function(){return this.WS.L()},i.prototype.setPointStyleHighlight=function(t){var i,n;if(this.WS.I(t),this.getHighlighted()){var e=this.WS.D(!0);try{for(var r=o(this.ic),s=r.next();!s.done;s=r.next()){s.value.jS(e)}}catch(t){i={error:t}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}}return this.hS.xn(),this},i.prototype.getPointStyleHighlight=function(){return this.WS.D(!0)},i}(uG),cG={Triangulated:aG,Pixelated:fG},lG=function(t){function i(i,n,e,r,s,o){var h=t.call(this,i,n,e,r,o)||this;h.ml=function(){return xs(h.Ho)};var u=h.vr.getSeries().length;return h.Ho=new c(Fs(h.vn.surfaceSeriesFillStyle,u)),h.Cc(h.YS(s).TS(h.AS)),h}return n(i,t),i.prototype.reset=function(t){return this.ic[0].l(dG(t)),this.hS.xn(),this},i.prototype.setFillStyle=function(t){var i,n;this.Ho.C(t);var e=this.Ho.D(this.Bf);try{for(var r=o(this.ic),s=r.next();!s.done;s=r.next()){s.value.$n(e)}}catch(t){i={error:t}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return this.hS.xn(),this},i.prototype.getFillStyle=function(){return this.Ho.L()},i.prototype.setWireframeStyle=function(t){return this.ic[0].pa(t),this.hS.xn(),this},i.prototype.getWireframeStyle=function(){return this.ic[0].ka()},i.prototype.Aa=function(t,i,n){return this.ic[0].Aa(t,i,n),this.hS.xn(),this},i.prototype.Fa=function(t,i,n){return this.ic[0].Fa(t,i,n),this.hS.xn(),this},i.prototype.invalidateColorsOnly=function(t,i){return this.ic[0].Ta(t,i),this.vr.engine.xn(),this},i.prototype.invalidateValuesOnly=function(t,i){return this.ic[0].Ca(t,i),this.vr.engine.xn(),this},i.prototype.YS=function(t){return this.hS.XS().l(dG(t)).$n(this.Ho.D(this.Bf))},i.prototype.He=function(){return this.MS},i.prototype.CS=function(){},i.prototype.Tf=function(){},i.prototype.BS=function(){},i.prototype.Ac=function(t,i){t.$n(this.Ho.D(i)),this.hS.xn()},i.prototype.attach=function(i,n){return t.prototype.attach.call(this,i,n),ks(i,this.vn,{fill:this.Ho}),this},i}(nG),dG=function(t){var i={x:t.start.x,y:t.start.z},n={x:t.end.x,y:t.end.z};return e(e({},t),{start:i,end:n})},vG=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.Mt="Surface Grid Series 3D",i}return n(i,t),i.prototype.addRow=function(i,n,e){return t.prototype.Aa.call(this,i,n,e)},i.prototype.addColumn=function(i,n,e){return t.prototype.Fa.call(this,i,n,e)},i.prototype.invalidateYOnly=function(t,i){return this.ic[0].Va(t,i),this.hS.xn(),this},i.prototype.Tf=function(){t.prototype.Tf.call(this),this.ic[0].Fe(!1)},i}(lG),yG=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.Mt="Surface Mesh Series 3D",i}return n(i,t),i.prototype.invalidateGeometryOnly=function(t,i){return this.ic[0].Ba(t,i),this.hS.xn(),this},i.prototype.Tf=function(){t.prototype.Tf.call(this),this.ic[0].Fe(!1)},i}(lG),SG={Grid:vG,Mesh:yG},mG=function(t,i){var n,e,r,s,h=0,u=0;t.forEachAxis((function(t){h+=t.Je()?1:0,u+=t.Qe()?1:0}));var a=function(t){return"getMouseInteractionsWhileScrolling"in t}(t)?t.getMouseInteractionsWhileScrolling():void 0,f=function(t){return"getMouseInteractionsWhileZooming"in t}(t)?t.getMouseInteractionsWhileZooming():void 0;if(!1===a&&u>0||!1===f&&h>0)try{for(var c=o(i),l=c.next();!l.done;l=c.next()){l.value.IS(!1).Fc(!1)}}catch(t){n={error:t}}finally{try{l&&!l.done&&(e=c.return)&&e.call(c)}finally{if(n)throw n.error}}else try{for(var d=o(i),v=d.next();!v.done;v=d.next()){v.value.OS().Tc()}}catch(t){r={error:t}}finally{try{v&&!v.done&&(s=d.return)&&s.call(d)}finally{if(r)throw r.error}}},bG=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.ZS=[],i.KS=0,i.qS=!1,i.JS=function(t){var n=i.ZS.indexOf(t);n>=0&&(i.ZS.splice(n,1),i.an.emit("seriesDispose",i,t))},i.QS=function(t){i.ZS.includes(t)||(i.ZS.push(t),t.setHighlightOnHover(i.qS))},i.$S=function(){i.KS+=1},i.tm=function(){i.KS-=1},i}return n(i,t),i.prototype.im=function(t){this.ZS.push(t),t.onMouseEnter(this.$S),t.onMouseLeave(this.tm),t.setHighlightOnHover(this.qS),this.an.emit("seriesRestore",this,t)},i.prototype.Fl=function(){return this.ZS},i.prototype.nm=function(){return this.KS},i.prototype.setSeriesHighlightOnHover=function(t){return this.qS=t,this.ZS.forEach((function(i){return i.setHighlightOnHover(t)})),this},i}(mV),gG=Ls.normalize({x:-.5610788649579117,y:-.35242840511865414,z:-1.1349149375849081}),wG=function(){function t(t,i,n,e,r){this.rm=t,this.sm=i,this.om=n,this.wS=e,this.hm=r,this.um=!0,this.am=!0,this.fm=2*-Math.PI/2160,this.lm=2*Math.PI/2160,this.dm=.1,this.vm=1*Math.PI/180}return t.prototype.getDefaultCameraConfiguration=function(t){var i={direction:gG,location:Ls.multiply(gG,-1)};return this.cameraLocationChanged({boundingBox:t,cameraDirection:i.direction,cameraLocation:i.location})||i},t.prototype.applyCameraInteractions=function(t,i){var n=this,e={direction:t.cameraDirection,location:t.cameraLocation};return i.forEach((function(t){"rotate"===t.type?e=n.ym(e,t):"wheel-zoom"===t.type?e=n.Sm(e,t):"rotate+zoom"===t.type?e=n.bm(e,t):"fixed-rotate"===t.type?e=n.gm(e,t):"move"===t.type&&(e=n.wm(e,t))})),this.um?e=this.pm(t.boundingBox,e):this.am&&(e=this.km(t.boundingBox,e)),e},t.prototype.ym=function(t,i){var n=i.rotation,e=t.location,r=Ls.multiply(Ls.normalize(t.location),-1),s=this.xm(r),o=s.Right,h=s.Up,u=e,a=this.Mm(r),f=n.x*this.fm*a;u=Ls.rotateAroundAxis(u,h,f);var c=(n.y>0?1:-1)*Math.min(Math.abs(n.y)*this.lm,a-this.vm);return 0!==c&&(u=Ls.rotateAroundAxis(u,o,c)),{location:u,direction:Ls.multiply(Ls.normalize(u),-1)}},t.prototype.Sm=function(t,i){var n=i.deltaY;this.um&&this.Am(!1);var e=t.location,r=Ls.multiply(Ls.normalize(e),-1),s=n*this.dm,o=Ls.length(e)*-s;return{direction:r,location:Ls.addVec(e,Ls.multiply(r,o))}},t.prototype.bm=function(t,i){var n=i.rotation,e=i.cameraDistance;this.um&&this.Am(!1);var r=this.ym(t,{type:"rotate",rotation:n}),s=r.location,o=Ls.multiply(Ls.normalize(s),-1),h=Ls.multiply(o,-e);return r={direction:Ls.multiply(Ls.normalize(h),-1),location:h}},t.prototype.gm=function(t,i){this.um&&this.Am(!1);var n=i.rotation,e=t.location,r=t.direction,s=this.xm(r),o=s.Right,h=s.Up,u=n.x*this.fm,a=Ls.normalize(Ls.rotateAroundAxis(r,h,u)),f=n.y*this.lm;return{location:e,direction:a=Ls.normalize(Ls.rotateAroundAxis(a,o,f))}},t.prototype.wm=function(t,i){this.um&&this.Am(!1),this.am=!1;var n=i.amountRight,e=i.amountForward,r=t.location,s=t.direction,o=this.xm(s).Right;return{location:Ls.addVec(r,Ls.multiply(s,.01*e),Ls.multiply(o,.01*n)),direction:s}},t.prototype.boundingBoxChanged=function(t){var i={location:t.cameraLocation,direction:Ls.multiply(Ls.normalize(t.cameraLocation),-1)};return this.um?this.pm(t.boundingBox,i):this.km(t.boundingBox,i)},t.prototype.cameraLocationChanged=function(t){var i={location:t.cameraLocation,direction:Ls.multiply(Ls.normalize(t.cameraLocation),-1)};return this.um?this.pm(t.boundingBox,i):this.km(t.boundingBox,i)},t.prototype.viewportChanged=function(t){var i={location:t.cameraLocation,direction:Ls.multiply(Ls.normalize(t.cameraLocation),-1)};if(this.um)return this.pm(t.boundingBox,i)},t.prototype.pm=function(t,i,n){var e=i;n=void 0!==n?n:0,e=this.Fm(t,e,100,20,1,n,5);var r=this.Mm(e.direction);return e=this.Tm(e,this.Cm(t,e,100,1),r)},t.prototype.Fm=function(t,i,n,e,r,s,o){var h=this;return pG(s,o,(function(t){return{direction:i.direction,location:Ls.multiply(i.direction,-t)}}),(function(i){return h.Bm(t,i)}),n,r,"linear",e)},t.prototype.Cm=function(t,i,n,e){var r=this,s=this.xm(i.direction),o=s.Right,h=s.Left,u=s.Up,a=s.Down,f=this.Lm(t,!1,i),c=i,l=e,d=.1;return Math.abs(f.bottom-f.top)>l&&(c=f.bottom<f.top?kG(0,d,(function(t){return{location:c.location,direction:Ls.normalize(Ls.lerp(c.direction,a,t))}}),(function(i){return r.Im(t,i)}),0,l,!0,n):kG(0,d,(function(t){return{location:c.location,direction:Ls.normalize(Ls.lerp(c.direction,u,t))}}),(function(i){return r.Im(t,i)}),0,l,!0,n)),Math.abs(f.left-f.right)>l&&(c=f.left<f.right?kG(0,d,(function(t){return{location:c.location,direction:Ls.normalize(Ls.lerp(c.direction,h,t))}}),(function(i){return r.Om(t,i)}),0,l,!0,n):kG(0,d,(function(t){return{location:c.location,direction:Ls.normalize(Ls.lerp(c.direction,o,t))}}),(function(i){return r.Om(t,i)}),0,l,!0,n)),c},t.prototype.Bm=function(t,i){var n=this.Lm(t,!0,i);return Math.min(n.left+n.right,n.top+n.bottom)},t.prototype.Om=function(t,i){var n=this.Lm(t,!1,i);return Math.abs(n.left-n.right)},t.prototype.Im=function(t,i){var n=this.Lm(t,!1,i);return Math.abs(n.top-n.bottom)},t.prototype.Lm=function(t,i,n){var e=this,r=Ks(this.Pm(t,i,n).map((function(t){return sr(t,e.rm,e.sm)})));return{left:r.min.x,right:this.sm.x.getInnerEnd()-r.max.x,top:this.sm.y.getInnerEnd()-r.max.y,bottom:r.min.y}},t.prototype.Pm=function(t,i,n){var e=this,r=this.om,s=y(r.x.getInnerStart(),r.y.getInnerStart(),r.z.getInnerStart()),o=y(r.x.getInnerEnd(),r.y.getInnerEnd(),r.z.getInnerEnd()),h=[],u=i?16:4,a=(s.x+o.x)/2,f=(s.z+o.z)/2,c=Math.sqrt(2)*(o.x-a),l=Math.sqrt(2)*(o.z-f);return[s.y,o.y].forEach((function(t){for(var i=0;i<u;i+=1){var n=Math.PI/4+2*Math.PI*i/u,e=a+Math.cos(n)*c,r=f+Math.sin(n)*l;h.push({x:e,y:t,z:r})}})),h.map((function(t){return e.wS(t,n)})).filter((function(t){return void 0!==t}))},t.prototype.km=function(t,i){var n=Ls.length(i.location),e=this.Dm(t);return n<e?{direction:i.direction,location:Ls.multiply(i.direction,-e)}:i},t.prototype.Dm=function(t){return.8*Math.sqrt(Math.pow(t.x,2)+Math.pow(t.y,2)+Math.pow(t.z,2))},t.prototype.xm=function(t){var i=y(0,1,0),n=Ls.normalize(Ls.cross(i,Ls.multiply(t,-1))),e=Ls.cross(n,t);return e.y=Math.abs(e.y),{Right:n,Up:e=Ls.normalize(e),Down:Ls.multiply(e,-1),Left:Ls.multiply(n,-1)}},t.prototype.Mm=function(t){var i={x:0,y:1,z:0},n=Ls.angle(t,i),e=Ls.angle(t,Ls.multiply(i,-1));return Math.min(n,e)},t.prototype.Tm=function(t,i,n){return{location:Ls.lerp(t.location,i.location,n),direction:Ls.normalize(Ls.lerp(t.direction,i.direction,n))}},t.prototype.Am=function(t){return this.um=t,this},t.prototype._m=function(){return this.um},t}(),pG=function(t,i,n,e,r,s,o,h){var u,a=0,f=(i+t)/2;do{var c=n(f);if(u={value:f,result:c,score:e(c)},Math.abs(u.score-r)<=s)break;var l=u.score>r;l&&"linear"===o||!l&&"reversed"===o?(f=(u.value+t)/2,i=u.value):(f=(u.value+i)/2,t=u.value),a+=1}while(a<h);return u.result},kG=function(t,i,n,e,r,s,o,h){var u,a=0,f=t;do{var c=n(f),l=e(c);if(void 0===u||Math.abs(l-r)<Math.abs(u.score-r)){if(u={value:f,result:c,score:e(c)},Math.abs(u.score-r)<=s)break}else if(o)break;a+=1,f=f+1/(h-1)*(i-t)}while(a<h);return u.result},xG=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.pi=0,i.ki=10,i.hi=1,i}return n(i,t),i.prototype.bi=function(){return this.t=!1,this},i.prototype.gi=function(){return this.t=!0,this},i.prototype.getInnerStart=function(){return this.pi},i.prototype.getInnerEnd=function(){return this.ki},i.prototype.getInnerInterval=function(){return Math.abs(this.getInnerEnd()-this.getInnerStart())},i.prototype.xi=function(t,i){return this.pi=t,this.ki=i,this._i(),this},i.prototype.oi=function(t){return this.hi=t,this._i(),this},i.prototype.bS=function(t){return t/this.hi},i.prototype._i=function(){var t=this.bS(this.ki-this.pi),i=this.hi;void 0!==this.Rm&&!1!==Br(t,this.Rm)||(this.t=!0,this.zm=i,this.Rm=t)},i.prototype.pS=function(){return this.Rm},i.prototype.Em=function(){return this.zm},i.prototype.Nm=function(){return this.ki<this.pi},i.prototype.Ti=function(t,i){return!0},i}(a),MG=function(t){function i(i,n,e,r,s,o){var h=t.call(this,i,n,e,r,o)||this;h.Mt="Surface Grid Series 3D",h.ml=function(){return xs(h.Ho)},h.xS=QV;var u=h.vr.getSeries().length;h.Ho=new c(Fs(h.vn.surfaceSeriesFillStyle,u)),h.wa=new c(Ts(h.vn.surfaceSeriesWireframeStyle,u,ir));var a=s.start||{x:0,z:0},f=s.end?{x:(s.end.x-a.x)/s.columns,z:(s.end.z-a.z)/s.rows}:s.step||{x:1,z:1},l={heatmapDataType:"intensity",dataOrder:s.dataOrder||"columns",columns:s.columns,rows:s.rows,start:a,step:f};return h.Vm=l,h.Cc(h.hS.Gm(l)).$n(h.Ho.D(h.Bf)).pa(h.wa.D(h.Bf)).FS(h.xS),h}return n(i,t),i.prototype.setFillStyle=function(t){return this.Ho.C(t),this.ic[0].$n(this.Ho.D(this.Bf)),this.hS.xn(),this},i.prototype.getFillStyle=function(){return this.Ho.L()},i.prototype.setWireframeStyle=function(t){return this.wa.C(t),this.ic[0].pa(this.wa.D(this.Bf)),this.hS.xn(),this},i.prototype.getWireframeStyle=function(){return this.ic[0].ka()},i.prototype.setIntensityInterpolation=function(t){return t=t||"disabled",this.ic[0].Hm(t),this.hS.xn(),this},i.prototype.getIntensityInterpolation=function(){return this.ic[0].jm()},i.prototype.invalidateIntensityValues=function(t){if(Array.isArray(t)){if(0===t.length||0===t[0].length)return this;var i={x:t.length,y:t[0].length,columns:"columns"===this.Vm.dataOrder?t.length:t[0].length,rows:"rows"===this.Vm.dataOrder?t.length:t[0].length},n="columns"===this.Vm.dataOrder?this.Vm.columns:this.Vm.rows,e="columns"===this.Vm.dataOrder?this.Vm.rows:this.Vm.columns;if(i.x>n||i.y>e){if(!0===this.vr.ps.warnings){var r="NewSurfaceGridSeries3D.invalidateIntensityValues intensity matrix overflow.\n Grid "+this.Vm.columns+"x"+this.Vm.rows+", input "+i.columns+"x"+i.rows+".\n Excess data will be automatically clipped. This can result in sub-optimal performance.";wr.console.warn(r)}for(var s=[],o=0;o<n;o+=1)s[o]=t[o].slice(0,e);t=s}this.ic[0].Wm({type:"intensity",lengthPrimary:t.length,lengthSecondary:t[0].length,startPrimary:0,startSecondary:0,values:t})}else if("iColumn"in t&&"iRow"in t&&"values"in t){if(0===t.values.length||0===t.values[0].length)return this;i={primary:t.values.length,secondary:t.values[0].length,columns:"columns"===this.Vm.dataOrder?t.values.length:t.values[0].length,rows:"rows"===this.Vm.dataOrder?t.values.length:t.values[0].length};var h="columns"===this.Vm.dataOrder?t.iColumn:t.iRow,u=h+i.primary-1,a="columns"===this.Vm.dataOrder?t.iRow:t.iColumn,f=a+i.secondary-1,c=("columns"===this.Vm.dataOrder?this.Vm.columns:this.Vm.rows)-1,l=("columns"===this.Vm.dataOrder?this.Vm.rows:this.Vm.columns)-1;if(h<0||a<0||u>c||f>l){if(!0===this.vr.ps.warnings){r="NewSurfaceGridSeries3D.invalidateIntensityValues intensity matrix overflow.\n Grid "+this.Vm.columns+"x"+this.Vm.rows+", input "+i.columns+"x"+i.rows+" starting at ["+t.iColumn+","+t.iRow+"].\n Out of bounds data will be automatically clipped. This can result in sub-optimal performance.";wr.console.warn(r)}var d=Math.max(-h,0),v=Math.max(-a,0),y=Math.max(u-c,0),S=Math.max(f-l,0),m=i.primary-(d+y);s=[];if(0===v&&0===S)for(o=0;o<m;o+=1)s[o]=t.values[d+o];else for(o=0;o<m;o+=1)s[o]=t.values[d+o].slice(v,0===S?void 0:-S);if(0===s.length||0===s[0].length)return this;t={iColumn:t.iColumn,iRow:t.iRow,values:s},h=Math.max(h,0),a=Math.max(a,0)}this.ic[0].Wm({type:"intensity",lengthPrimary:t.values.length,lengthSecondary:t.values[0].length,startPrimary:h,startSecondary:a,values:t.values})}return this.hS.xn(),this},i.prototype.invalidateHeightMap=function(t){if(Array.isArray(t)){if(0===t.length||0===t[0].length)return this;var i={x:t.length,y:t[0].length,columns:"columns"===this.Vm.dataOrder?t.length:t[0].length,rows:"rows"===this.Vm.dataOrder?t.length:t[0].length},n="columns"===this.Vm.dataOrder?this.Vm.columns:this.Vm.rows,e="columns"===this.Vm.dataOrder?this.Vm.rows:this.Vm.columns;if(i.x>n||i.y>e){if(!0===this.vr.ps.warnings){var r="NewSurfaceGridSeries3D.invalidateHeightMap height matrix overflow.\n Grid "+this.Vm.columns+"x"+this.Vm.rows+", input "+i.columns+"x"+i.rows+".\n Excess data will be automatically clipped. This can result in sub-optimal performance.";wr.console.warn(r)}for(var s=[],o=0;o<n;o+=1)s[o]=t[o].slice(0,e);t=s}this.ic[0].Um({type:"y",lengthPrimary:t.length,lengthSecondary:t[0].length,startPrimary:0,startSecondary:0,values:t})}else if("iColumn"in t&&"iRow"in t&&"values"in t){if(0===t.values.length||0===t.values[0].length)return this;i={primary:t.values.length,secondary:t.values[0].length,columns:"columns"===this.Vm.dataOrder?t.values.length:t.values[0].length,rows:"rows"===this.Vm.dataOrder?t.values.length:t.values[0].length};var h="columns"===this.Vm.dataOrder?t.iColumn:t.iRow,u=h+i.primary-1,a="columns"===this.Vm.dataOrder?t.iRow:t.iColumn,f=a+i.secondary-1,c=("columns"===this.Vm.dataOrder?this.Vm.columns:this.Vm.rows)-1,l=("columns"===this.Vm.dataOrder?this.Vm.rows:this.Vm.columns)-1;if(h<0||a<0||u>c||f>l){if(!0===this.vr.ps.warnings){r="NewSurfaceGridSeries3D.invalidateHeightMap height matrix overflow.\n Grid "+this.Vm.columns+"x"+this.Vm.rows+", input "+i.columns+"x"+i.rows+" starting at ["+t.iColumn+","+t.iRow+"].\n Out of bounds data will be automatically clipped. This can result in sub-optimal performance.";wr.console.warn(r)}var d=Math.max(-h,0),v=Math.max(-a,0),y=Math.max(u-c,0),S=Math.max(f-l,0),m=i.primary-(d+y);s=[];if(0===v&&0===S)for(o=0;o<m;o+=1)s[o]=t.values[d+o];else for(o=0;o<m;o+=1)s[o]=t.values[d+o].slice(v,0===S?void 0:-S);if(0===s.length||0===s[0].length)return this;t={iColumn:t.iColumn,iRow:t.iRow,values:s},h=Math.max(h,0),a=Math.max(a,0)}this.ic[0].Um({type:"y",lengthPrimary:t.values.length,lengthSecondary:t.values[0].length,startPrimary:h,startSecondary:a,values:t.values})}return this.hS.xn(),this},i.prototype.setCullMode=function(t){return this.ic[0].Ym("boolean"==typeof t?t?"cull-back":"disabled":t),this},i.prototype.getCullMode=function(){return this.ic[0].Xm()},i.prototype.CS=function(){},i.prototype.Tf=function(){},i.prototype.BS=function(){},i.prototype.He=function(){return this.MS},i.prototype.Ac=function(t,i){t.$n(this.Ho.D(i)).pa(this.wa.D(i)),this.hS.xn()},i}(nG),AG=function(t){function i(i,n,e,r,s,o){var h=t.call(this,i,n,e,r,o)||this;h.Mt="Surface Grid Series 3D",h.ml=function(){return xs(h.Ho)},h.xS=QV;var u=h.vr.getSeries().length;h.Ho=new c(Fs(h.vn.surfaceSeriesFillStyle,u)),h.wa=new c(Ts(h.vn.surfaceSeriesWireframeStyle,u,ir));var a=s.start||{x:0,z:0},f=s.step||{x:1,z:1},l={heatmapDataType:"intensity",scrollDimension:s.scrollDimension||"columns",columns:s.columns,rows:s.rows,start:a,step:f};return h.Vm=l,h.Cc(h.hS.Zm(l).$n(h.Ho.D(h.Bf)).pa(h.wa.D(h.Bf)).FS(h.xS)),h}return n(i,t),i.prototype.setFillStyle=function(t){return this.Ho.C(t),this.ic[0].$n(this.Ho.D(this.Bf)),this.hS.xn(),this},i.prototype.getFillStyle=function(){return this.Ho.L()},i.prototype.setWireframeStyle=function(t){return this.wa.C(t),this.ic[0].pa(this.wa.D(this.Bf)),this.hS.xn(),this},i.prototype.getWireframeStyle=function(){return this.ic[0].ka()},i.prototype.setIntensityInterpolation=function(t){return t=t||"disabled",this.ic[0].Hm(t),this.hS.xn(),this},i.prototype.getIntensityInterpolation=function(){return this.ic[0].jm()},i.prototype.clear=function(){return this.ic[0].$h(),this.hS.xn(),this},i.prototype.addValues=function(t){if(!t)return this;var i=t.yValues,n=t.intensityValues;if(!i&&!n)return this;if(i&&0===i.length&&(i=void 0),n&&0===n.length&&(n=void 0),i){var e=i[0].length;if(0+e-1>(h="columns"===this.Vm.scrollDimension?this.Vm.rows:this.Vm.columns)-1){if(!0===this.vr.ps.warnings){var r="SurfaceScrollingGridSeries3D.addValues input yValues overflow.\nGrid was created with "+h+" "+("columns"===this.Vm.scrollDimension?"rows":"columns")+", input yValues have "+e+".\nExcess data will be automatically clipped. This can result in sub-optimal performance.";wr.console.warn(r)}for(var s=[],o=0;o<i.length;o+=1)s[o]=i[o].slice(0,h+1);i=s}}if(n){var h,u=n[0].length;if(0+u-1>(h="columns"===this.Vm.scrollDimension?this.Vm.rows:this.Vm.columns)-1){if(!0===this.vr.ps.warnings){r="SurfaceScrollingGridSeries3D.addValues intensityValues overflow.\nGrid was created with "+h+" "+("columns"===this.Vm.scrollDimension?"rows":"columns")+", input intensityValues have "+u+".\nExcess data will be automatically clipped. This can result in sub-optimal performance.";wr.console.warn(r)}for(s=[],o=0;o<n.length;o+=1)s[o]=n[o].slice(0,h+1);n=s}}if(i&&n){var a=i.length,f=n.length;if(a!==f){if(!0===this.vr.ps.warnings){r="SurfaceScrollingGridSeries3D.addValues input yValues and intensityValues size does not match.\nyValues: "+a+"\nintensityValues: "+f+"\nData will be automatically clipped according to the smaller supplied sample. This can result in sub-optimal performance.";wr.console.warn(r)}a>f?i=i.slice(0,f):n=n.slice(0,a)}}var c=i?i.length:null==n?void 0:n.length,l=i?i[0].length:null==n?void 0:n[0].length;return this.ic[0].Km({startPrimary:0,startSecondary:0,lengthPrimary:c,lengthSecondary:l,heightMapValues:i,intensityValues:n}),this.hS.xn(),this},i.prototype.setCullMode=function(t){return this.ic[0].Ym("boolean"==typeof t?t?"cull-back":"disabled":t),this},i.prototype.getCullMode=function(){return this.ic[0].Xm()},i.prototype.CS=function(){},i.prototype.Tf=function(){},i.prototype.BS=function(){},i.prototype.He=function(){return this.MS},i.prototype.Ac=function(t,i){t.$n(this.Ho.D(i)).pa(this.wa.D(i)),this.hS.xn()},i}(nG);!function(t){t[t.bg=0]="bg",t[t.seriesBackground=1]="seriesBackground",t[t.layer3D=2]="layer3D",t[t.axesUi=3]="axesUi",t[t.ui=4]="ui"}(OV||(OV={}));var FG=function(t){function i(i,n,e,r,s,o,h){var u=t.call(this,i,n,e,n.qs(OV.bg),n.qs(OV.ui),r,o,h?h.theme:void 0)||this;u.qm=1,u.Jm=[],u.Qm={x:(new xG).xi(-1,1),y:(new xG).xi(-1,1),z:(new xG).xi(-1,1)},u.$m=2,u.tb=!0,u.ib=!0,u.nb=!0,u.eb=0,u.axes={id:"axes",chart:u},u.world={id:"world",chart:u},u.Jr=function(){var t={x:u.pixelScale.x.fi(),y:u.pixelScale.y.fi(),width:u.pixelScale.x.getInnerInterval(),height:u.pixelScale.y.getInnerInterval()};u.hS.sb(t).rb(t);var i=u.ob.viewportChanged(u.hb());i&&u.ub(i),u.ab.rb(t),u.fb.rb(t),u.engine.xn()},u.cb=!1,u.hy.Jn("Chart3D");var a,f={x:u.pixelScale.x.fi(),y:u.pixelScale.y.fi(),width:u.pixelScale.x.getInnerInterval(),height:u.pixelScale.y.getInnerInterval()};u.fb=n.qs(OV.seriesBackground).rb(f),u.hS=n.lb(OV.layer3D,u.Qm).sb(f).rb(f),u.ab=n.qs(OV.axesUi),u.ab.rb(f),u.vb={x:new ZV(u,WV,u.Qm.x,u.vn,u.hS,u.ab,u.pixelScale,!1),y:new ZV(u,UV,u.Qm.y,u.vn,u.hS,u.ab,u.pixelScale,!1),z:new ZV(u,YV,u.Qm.z,u.vn,u.hS,u.ab,u.pixelScale,!1)},u.yb=u.hS.iS([LV.InternalUI]).setMouseInteractions(!1),u.setBoundingBoxStrokeStyle(u.vn.boundingBoxStyle3D),u.Sb=u.fb.Rc(u.engine.scale,CE.Convex).$n(u.vn.seriesBackgroundFillStyle).Ys(u.vn.seriesBackgroundStrokeStyle).setMouseInteractions(!1),u.mb({x:1,y:1,z:1},!0),u.ob=new wG(u.engine.scale,u.pixelScale,u.Qm,(function(t,i){return i&&u.ub(i),u.hS.wS(t)}),(function(t,i){return i&&u.ub(i),u.hS.hm(t)})),u.bb=u.ob.getDefaultCameraConfiguration(u.gb(u.wb)),u.ub(u.bb);var c=WE(new UE.Pinch((function(t,i,n){a={locationOne:i,locationTwo:n,cameraLocation:u.hS.getCameraLocation()}}),(function(t,i,n,e,r,s){if(u.nb||u.ib){var o=Math.pow(a.locationOne.x-a.locationTwo.x,2)+Math.pow(a.locationOne.y-a.locationTwo.y,2),h=Math.pow(i.x-n.x,2)+Math.pow(i.y-n.y,2),f=Ls.length(a.cameraLocation),c=o/h*f,d=l((e.x+r.x)/2,(e.y+r.y)/2);u.Jm.push({type:"rotate+zoom",rotation:u.nb?d:{x:0,y:0},cameraDistance:u.ib?c:f}),u.engine.xn(),ss(s)}}),(function(t){})),new UE.Drag((function(t){}),(function(t,i,n,e,r){if(u.nb){var s=e;u.Jm.push({type:"rotate",rotation:s}),u.engine.xn(),ss(r)}}),(function(t){})));return u.onBackgroundTouchStart(c.onTouchStart),u.onBackgroundTouchMove(c.onTouchMove),u.onBackgroundTouchEnd(c.onTouchEnd),u.onBackgroundMouseDrag((function(t,i,n,e,r){if(u.nb){var s=r;u.Jm.push({type:"rotate",rotation:s}),u.engine.xn(),ss(i)}})),u.onBackgroundMouseDown((function(t,i){ss(i)})),u.onBackgroundMouseWheel((function(t,i){if(u.ib){if(u.tb)u.eb=5*Math.sign(i.deltaY),i.ctrlKey&&(u.eb=2*Math.sign(i.deltaY));else{var n=Cs(i);u.Jm.push({type:"wheel-zoom",deltaY:n})}u.engine.xn(),ss(i)}})),h&&!0===h.disableAnimations&&u.setAnimationsEnabled(!1),u.onResize(u.Jr),u.oy(s,u.pixelScale),u}return n(i,t),i.prototype.addPointSeries=function(t){var i=new(t&&t.type||aG)(this,this.JS,this.QS,this.hS,this.vn,t);return this.im(i),i},i.prototype.addLineSeries=function(){var t=new oG(this,this.JS,this.QS,this.hS,this.vn);return this.im(t),t},i.prototype.addPointLineSeries=function(){var t=new hG(this,this.JS,this.QS,this.hS,this.vn);return this.im(t),t},i.prototype.addSurfaceSeries=function(t){var i=new(t&&t.type||vG)(this,this.JS,this.QS,this.hS,e({},t),this.vn);return this.im(i),i},i.prototype.addSurfaceGridSeries=function(t){var i=new MG(this,this.JS,this.QS,this.hS,t,this.vn);return this.im(i),i},i.prototype.addSurfaceScrollingGridSeries=function(t){var i=new AG(this,this.JS,this.QS,this.hS,t,this.vn);return this.im(i),i},i.prototype.addSurfaceMeshSeries=function(t){var i=new yG(this,this.JS,this.QS,this.hS,e({},t),this.vn);return this.im(i),i},i.prototype.addBoxSeries=function(){var t=new rG(this,this.JS,this.QS,this.hS,this.vn);return this.im(t),t},i.prototype.getDefaultAxisX=function(){return this.vb.x},i.prototype.getDefaultAxisY=function(){return this.vb.y},i.prototype.getDefaultAxisZ=function(){return this.vb.z},i.prototype.getDefaultAxes=function(){return[this.vb.x,this.vb.y,this.vb.z]},i.prototype.setCameraLocation=function(t){var i={location:t,direction:Ls.normalize(Ls.multiply(t,-1))},n=this.ob.cameraLocationChanged(this.hb(i));return n&&(i=n),this.ub(i),this.engine.xn(),this},i.prototype.getCameraLocation=function(){return this.hS.getCameraLocation()},i.prototype.getCameraDirection=function(){return this.hS.getCameraDirection()},i.prototype.setCameraAutomaticFittingEnabled=function(t){this.ob.Am(t);var i=this.ob.cameraLocationChanged(this.hb());return i&&this.ub(i),this},i.prototype.getCameraAutomaticFittingEnabled=function(){return this.ob._m()},i.prototype.onCameraChange=function(t){return this.an.on("cameraChange",t)},i.prototype.offCameraChange=function(t){return this.an.off(t,"cameraChange")},i.prototype.setSeriesBackgroundFillStyle=function(t){return this.Sb.$n(t),this._f.xn(),this},i.prototype.getSeriesBackgroundFillStyle=function(){return this.Sb.Qn()},i.prototype.setSeriesBackgroundStrokeStyle=function(t){return this.Sb.Ys(t),this._f.xn(),this},i.prototype.getSeriesBackgroundStrokeStyle=function(){return this.Sb.Xs()},i.prototype.setBoundingBoxStrokeStyle=function(t){return this.yb.na(t).lS(XV(this.yb.ea())),this.hS.xn(),this},i.prototype.getBoundingBoxStrokeStyle=function(){return this.yb.ea()},i.prototype.setBoundingBox=function(t){return this.mb(t,!1),this},i.prototype.mb=function(t,i){this.wb=t;var n=this.gb(t);if(this.Qm.x.oi(n.x),this.Qm.y.oi(n.y),this.Qm.z.oi(-n.z),!i){var e=this.ob.boundingBoxChanged(this.hb());e&&this.ub(e)}this.engine.xn()},i.prototype.getBoundingBox=function(){return this.wb},i.prototype.Tf=function(){var i=this;this.tb&&0!==this.eb&&(this.Jm.push({type:"wheel-zoom",deltaY:.1*this.eb}),this.eb-=Math.sign(this.eb),0!==this.eb&&this.engine.xn(!0));var n=this.getCameraDirection();if(this.Jm.length>0){var e=this.ob.applyCameraInteractions(this.hb(),this.Jm);e&&this.ub(e),this.Jm.length=0}this.pb&&Ls.equals(this.pb.location,this.bb.location)&&Ls.equals(this.pb.direction,this.bb.direction)||this.an.emit("cameraChange",this,this.getCameraLocation()),this.pb=this.bb,t.prototype.Tf.call(this);for(var r=0;r<this.ZS.length;r+=1)this.ZS[r].CS();for(r=0;r<this.ZS.length;r+=1)this.ZS[r].Tf();this.vb.x.Xe(),this.vb.y.Xe(),this.vb.z.Xe(),this.vb.x.Tf(n),this.vb.y.Tf(n),this.vb.z.Tf(n),t.prototype.sy.call(this);var s=this.Qm,o=y(s.x.getInnerStart(),s.y.getInnerStart(),s.z.getInnerStart()),h=y(s.x.getInnerEnd(),s.y.getInnerEnd(),s.z.getInnerEnd());this.yb.$h().Qh([y(h.x,o.y,o.z),y(h.x,h.y,o.z),y(h.x,h.y,h.z),y(h.x,o.y,h.z),y(o.x,o.y,h.z),y(o.x,h.y,h.z),y(h.x,h.y,h.z),y(h.x,h.y,o.z),y(o.x,h.y,o.z),y(o.x,h.y,h.z),y(o.x,o.y,h.z),y(o.x,o.y,o.z)]);var u=[y(o.x,o.y,o.z),y(h.x,o.y,o.z),y(o.x,h.y,o.z),y(h.x,h.y,o.z),y(o.x,o.y,h.z),y(h.x,o.y,h.z),y(o.x,h.y,h.z),y(h.x,h.y,h.z)].map((function(t){return i.hS.wS(t)})),a=this.hS.wS(y((o.x+h.x)/2,(o.y+h.y)/2,(o.z+h.z)/2)),f=ws(u,a),c=[];for(r=0;r<f.length;r+=1){var l=f[r];$s(l,a,f[r>0?r-1:f.length-1],f[r<f.length-1?r+1:0])||c.push(l)}this.Sb.au(ws(c,a));for(r=0;r<this.ZS.length;r+=1)this.ZS[r].BS()},i.prototype.dispose=function(){return this.hS.ro(),this.ab.ro(),this.fb.ro(),t.prototype.dispose.call(this)},i.prototype.bi=function(){return this.Qm.x.bi(),this.Qm.y.bi(),this.Qm.z.bi(),t.prototype.bi.call(this)},i.prototype.gi=function(){return t.prototype.gi.call(this)},i.prototype.ub=function(t){this.hS.setCameraLocation(t.location).setCameraDirection(t.direction).setLightLocation(Ls.addVec(t.location,Ls.multiply(t.direction,-this.$m))),this.bb=t,this.engine.xn()},i.prototype.gb=function(t){return Ls.divide(t,Ls.length(t)/this.qm)},i.prototype.hb=function(t){return void 0===t&&(t=this.bb),{boundingBox:this.gb(this.wb),cameraLocation:t.location,cameraDirection:t.direction}},i.prototype.setMouseInteractions=function(t){return this.setMouseInteractionZoom(t).setMouseInteractionRotate(t)},i.prototype.setMouseInteractionZoom=function(t){return this.ib=t,this},i.prototype.getMouseInteractionZoom=function(){return this.ib},i.prototype.setMouseInteractionRotate=function(t){return this.nb=t,this},i.prototype.getMouseInteractionRotate=function(){return this.nb},i.prototype.setMouseInteractionsWhileScrolling=function(t){return this.cb=t,this},i.prototype.getMouseInteractionsWhileScrolling=function(){return this.cb},i.prototype.forEachAxis=function(t){t(this.vb.x),t(this.vb.y),t(this.vb.z)},i.prototype.le=function(){mG(this,this.ZS)},i.prototype.getMinimumSize=function(){},i.prototype.getSeries=function(){return this.ZS},i.prototype.setAnimationsEnabled=function(t){return this.setAnimationZoom(t),this.forEachAxis((function(i){return i.setAnimationsEnabled(t)})),this},i.prototype.getAnimationsEnabled=function(){return this.getAnimationZoom()&&this.getDefaultAxisX().getAnimationsEnabled()&&this.getDefaultAxisY().getAnimationsEnabled()&&this.getDefaultAxisZ().getAnimationsEnabled()},i.prototype.disableAnimations=function(){return this.setAnimationsEnabled(!1),this},i.prototype.setAnimationZoom=function(t){return this.tb=!!t,this},i.prototype.getAnimationZoom=function(){return this.tb},i}(bG),TG={Column:PN,Row:DN},CG=function(t){function i(i,n,e,r,s,o,h){var u=t.call(this,i,n,e,r,s,o,h)||this;return u.kb=new Map,u.xb=u.addUIElement(TG.Row).setPosition({x:0,y:100}).setOrigin(lz.LeftTop).setBackground((function(t){return t.setFillStyle(Re).setStrokeStyle(ir)})),u}return n(i,t),i.prototype.add=function(t,i){var n=this;return(t instanceof mV?[t]:t instanceof $U?t.mapCharts((function(t){return t})):[]).forEach((function(t){var e=n.xb.addElement(rV.VerticalLegendBox).setBackground((function(t){return t.setFillStyle(Re).setStrokeStyle(ir)})).add(t,i).setTitle(t.getTitle());n.kb.set(t,e)})),this.engine.xn(),this},i.prototype.setLegendBoxes=function(t){return this.kb.forEach((function(i,n){return t(i,n)})),this},i}(yV),BG=function(){function t(t,i){this.Mb=t,this.Ab=i}return t.prototype.alter=function(t){this.Fb=void 0!==this.Fb?this.Fb:this.Ab(),this.Tb=t,this.Mb(t)},t.prototype.resetValue=function(){void 0!==this.Tb&&(void 0!==this.Fb&&this.isAltered()&&this.Mb(this.Fb),this.Fb=void 0,this.Tb=void 0)},t.prototype.getNormalValue=function(){return void 0!==this.Fb?this.Fb:this.Ab()},t.prototype.isAltered=function(){return void 0!==this.Tb&&this.Ab()===this.Tb},t}(),LG=function(){function i(t,i){this.Cb=t,this.Rt=i,this.Bb=[]}return i.prototype.update=function(){return this.Cb.isDisposed()?(this.Lb()&&this.resetTable(),!0):!this.Ib()||(!(!this.Lb()||(this.resetTable(),this.Cb.Fe(),this.Ib()))||(this.Ob(),this.Cb.Fe(),!this.Ib()||(this.resetTable(),this.Cb.Fe(),!1)))},i.prototype.Lb=function(){for(var t=0;t<this.Bb.length;t+=1)if(this.Bb[t].isAltered())return!0;return!1},i.prototype.resetTable=function(){for(var t=0;t<this.Bb.length;t+=1)this.Bb[t].resetValue();return this},i.prototype.Ib=function(){return i=this.Cb,n=this.Rt,e=sr(i.getPosition(l(-1,-1),t.UISpace.PaddedBackground),i.scale,n),r=sr(i.getPosition(l(1,1),t.UISpace.PaddedBackground),i.scale,n),e.x<n.x.getInnerStart()||r.x>n.x.getInnerEnd()||e.y<n.y.getInnerStart()||r.y>n.y.getInnerEnd();var i,n,e,r},i.prototype.Pb=function(){return i=this.Cb,n=this.Rt,e=sr(i.getPosition(l(-1,-1),t.UISpace.PaddedBackground),i.scale,n),r=sr(i.getPosition(l(1,1),t.UISpace.PaddedBackground),i.scale,n),e.x<n.x.getInnerStart()||r.x>n.x.getInnerEnd();var i,n,e,r},i.prototype.Db=function(){return i=this.Cb,n=this.Rt,e=sr(i.getPosition(l(-1,-1),t.UISpace.PaddedBackground),i.scale,n),r=sr(i.getPosition(l(1,1),t.UISpace.PaddedBackground),i.scale,n),e.y<n.y.getInnerStart()||r.y>n.y.getInnerEnd();var i,n,e,r},i.prototype._b=function(t){return this.Bb.push(t),t},i}(),IG=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.st=i._b(new BG((function(t){return i.Cb.setOrigin(t)}),(function(){return i.Cb.getOrigin()}))),i}return n(i,t),i.prototype.Ob=function(){var t=this.st.getNormalValue(),i=l(this.Pb()?-t.x:t.x,this.Db()?-t.y:t.y);this.st.alter(i)},i}(LG),OG=function(t){function i(i,n,e,r){var s=t.call(this,i,n)||this;return s.Rb=e,s.zb=r,s.Eb=s._b(new BG((function(t){return s.Cb.setTextFont((function(i){return i.setSize(t)}))}),(function(){return s.Cb.getTextFont().getSize()}))),s}return n(i,t),i.prototype.Ob=function(){var t=this.Eb.getNormalValue(),i=this.Rb;if(i<t)for(var n=1;n<=this.zb;n+=1){var e=t-(t-i)*(n/this.zb);if(this.Eb.alter(e),this.Cb.Fe(),!this.Ib())return}},i}(LG),PG={Flip:function(t,i){return new IG(t,i)},FontSize:function(t,i){return void 0===t&&(t=5),void 0===i&&(i=5),function(n,e){return new OG(n,e,t,i)}}},DG=function(){function t(){this.Nb=[]}return t.prototype.addRow=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return this.Nb.push(t),this},t}(),_G=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return n(i,t),i.prototype.Xf=function(){var t=this.Nb;return this.Nb=[],t},i.prototype.Vb=function(){return this.Nb.length=0,this},i}(DG),RG=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.Wf=Ts(i.vn.resultTableTextFont,0,oh),i.fl=0,i.Gb=i.vn.resultTableTextFillStyle,i}return n(i,t),i.prototype.setContent=function(t){for(var i=0;i<t.length;i+=1){for(var n=t[i],e=!1,r=0;r<n.length;r+=1){var s=n[r];if(void 0===s||0===s.length){e=!0;break}}e||(n.unshift(""),n.push(""))}this.Hb();for(var o=t.length,h=this.getMembers().length,u=0;u<Math.max(o,h);u+=1){n=this.getRow(u,!0);if(u>=o)this.getMembers()[u].dispose(),u-=1,h-=1;else for(var a=t[u].length,f=n.getMembers().length,c=0;c<Math.max(a,f);c+=1){var l=t[u][c],d=n.getMembers();if(c>=a)n.getMembers()[c].dispose(),c-=1,f-=1;else if(void 0!==l&&l.length>0){for(i=d.length;i<c;i+=1)n.addGap(void 0,void 0);var v=void 0;if(c>=d.length)v=n.addElement(wN,void 0);else(y=d[c])instanceof AN?(n.getMembers()[c].dispose(),v=n.addElement(wN,c)):v=y;v.setFont(this.Wf).setFillStyle(this.Gb).setText(l).setTextRotation(this.fl)}else{for(i=d.length;i<c;i+=1)n.addGap(void 0,void 0);var y;if(c>=d.length)n.addGap(void 0,void 0);else(y=d[c])instanceof gN&&(n.getMembers()[c].dispose(),n.addGap(void 0,c))}}}return this.wf.xn(),this},i.prototype.restore=function(){return this.dispose(),t.prototype.restore.call(this),this},i.prototype.setTextFillStyle=function(t){this.Gb="function"==typeof t?t(this.Gb):t;for(var i=0;i<this.getMemberCount();i+=1)for(var n=this.getRow(i),e=0;e<n.getMembers().length;e+=1){var r=n.getMembers()[e];r instanceof gN&&r.setFillStyle(this.Gb)}return this.wf.xn(),this},i.prototype.getTextFillStyle=function(){return this.Gb},i.prototype.setTextFont=function(t){return this.Wf=t instanceof sh?t:t(this.Wf),this.wf.xn(),this},i.prototype.getTextFont=function(){return this.Wf},i.prototype.setTextRotation=function(t){return this.fl=t,this.wf.xn(),this},i.prototype.getTextRotation=function(){return this.fl},i.prototype.Hb=function(){for(var t=0;t<this.qc.length;t+=1)for(var i=0;i<this.qc[t].getMembers().length;i+=1)this.qc[t].getMembers()[i].dispose()},i.prototype.Fe=function(){for(var i=0;i<this.qc.length;i+=1)this.qc[i].setMinimumSize(void 0);t.prototype.Fe.call(this);for(i=0;i<this.qc.length;i+=1)this.qc[i].setMinimumSize(this.size.x);return t.prototype.Fe.call(this),this},i}(IN),zG=function(){function t(t,i,n,e,r,s){this.wf=t,this.renderingScale=i,this.scale=n,this.jb=e,this.Wb=r,this.Ub=!1,this.Yb=!1,this.Xb=!1,this.th=l(0,0),this.Zb=new this.jb(this.wf,this.renderingScale,this.scale,Cr,Cr,s).setMouseInteractions(!1).setFillStyle(s.pointMarkerFillStyle).setStrokeStyle(s.pointMarkerStrokeStyle),this.Cb=new RG(this.wf,this.renderingScale,this.scale,this.Wb,Cr,Cr,s).setMouseInteractions(!1).setBackground((function(t){return t.setFillStyle(s.resultTableFillStyle).setStrokeStyle(s.resultTableStrokeStyle)})).setTextFillStyle(s.resultTableTextFillStyle),this.Kb=PG.Flip(this.Cb,this.scale)}return t.prototype.pointAt=function(t){return this.th=t.series.scale===this.scale?t.location:sr(t.location,t.series.scale,this.scale),this.Zb.setPosition(this.th),this.Cb.setPosition(this.th).setContent(t.resultTableContent),this.wf.xn(),this},t.prototype.getPosition=function(){return this.th},t.prototype.dispose=function(){return this.Zb.dispose(),this.Cb.dispose(),this.wf.oo.xn(),this},t.prototype.restore=function(){return this.Ub||this.Zb.restore(),this.Yb||this.Cb.restore(),this.wf.oo.xn(),this},t.prototype.isDisposed=function(){return this.Zb.isDisposed()&&this.Cb.isDisposed()},t.prototype.disposePointMarker=function(){return this.Ub=!0,this.Zb.dispose(),this.wf.xn(),this},t.prototype.restorePointMarker=function(){return this.Ub=!1,this.Zb.restore(),this.wf.xn(),this},t.prototype.isDisposedPointMarker=function(){return this.Ub},t.prototype.setPointMarker=function(t){return t(this.Zb),this.wf.xn(),this},t.prototype.getPointMarker=function(){return this.Zb},t.prototype.restoreResultTable=function(){return this.Yb=!1,this.Cb.restore(),this.wf.xn(),this},t.prototype.disposeResultTable=function(){return this.Yb=!0,this.Cb.dispose(),this.wf.xn(),this},t.prototype.isDisposeResultTable=function(){return this.Yb},t.prototype.setResultTable=function(t){return t(this.Cb),this.wf.xn(),this},t.prototype.getResultTable=function(){return this.Cb},t.prototype.setAutoFitStrategy=function(t){return this.Kb&&this.Kb.resetTable(),this.Kb=t?t(this.Cb,this.wf.oo.Rt):void 0,this.wf.xn(),this},t.prototype.getAutoFitStrategy=function(){return void 0!==this.Kb},t.prototype.Tf=function(){return this.Kb&&this.Kb.update(),Jr(!this.isDisposed()&&this.Xb&&!this.Ub)(this.Zb),Jr(!this.isDisposed()&&this.Xb&&!this.Yb)(this.Cb),this.Zb.Tf(),this.Cb.Tf(),this},t.prototype.Fe=function(){return this.Zb.Fe(),this.Cb.Fe(),this.Xb=function(t,i,n){void 0===n&&(n=i);var e=i!==n?sr(t,i,n):t;return e.x>=n.x.getInnerStart()&&e.x<=n.x.getInnerEnd()&&e.y>=n.y.getInnerStart()&&e.y<=n.y.getInnerEnd()}(this.th,this.scale),this},t}(),EG=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.qb=!1,i}return n(i,t),i.prototype.pointAt=function(i){return this.Jb(i.fillStyle),t.prototype.pointAt.call(this,i)},i.prototype.Jb=function(t){t&&this.qb&&this.Cb.setTextFillStyle(t)},i.prototype.setResultTableAutoTextStyle=function(t){return this.qb=t,this.wf.xn(),this},i.prototype.getResultTableAutoTextStyle=function(){return this.qb},i}(zG),NG=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return n(i,t),i.prototype.setPosition=function(t){return this.th=t,this.Zb.setPosition(t),this.Cb.setPosition(t),this.wf.xn(),this},i}(zG),VG=function(t,i,n){var e=this;void 0===n&&(n=[]),this.jb=t,this.Wb=i,this.Qb=n,this.$b=function(t){return e.Qb.forEach((function(i){return i(t)})),t}},GG=function(t){function i(){var n=null!==t&&t.apply(this,arguments)||this;return n.tg=function(t,i,e,r){return n.$b(new EG(t,i,e,n.jb,n.Wb,r))},n.addStyler=function(t){return new i(n.jb,n.Wb,n.Qb.map((function(t){return t})).concat(t))},n.setPointMarker=function(t){return new i(t,n.Wb,n.Qb.map((function(t){return t})))},n.setResultTableBackground=function(t){return new i(n.jb,t,n.Qb.map((function(t){return t})))},n}return n(i,t),i}(VG),HG=function(t){function i(){var n=null!==t&&t.apply(this,arguments)||this;return n.ig=function(t,i,e,r){return n.$b(new NG(t,i,e,n.jb,n.Wb,r))},n.addStyler=function(t){return new i(n.jb,n.Wb,n.Qb.map((function(t){return t})).concat(t))},n.setPointMarker=function(t){return new i(t,n.Wb,n.Qb.map((function(t){return t})))},n.setResultTableBackground=function(t){return new i(n.jb,t,n.Qb.map((function(t){return t})))},n}return n(i,t),i}(VG),jG=function(t){return t.setPointMarker((function(t){return t.setSize(l(5,5)).setOrigin(l(0,0))})).setResultTable((function(t){return t.setOrigin(l(-1,-1)).setMargin(5)}))},WG=function(t){return t.setPointMarker((function(t){return t.setSize(l(20,20)).setOrigin(l(0,0))})).setResultTable((function(t){return t.setBackground((function(t){return t})).setOrigin(l(-1,-1)).setMargin(10)}))};new GG(pN,pN,[jG]);var UG=new GG(pN,MN,[jG,function(i){return i.disposePointMarker().setResultTable((function(i){return i.setOrigin(l(0,-1)).setMargin(0).setBackground((function(i){i instanceof MN&&i.setDirection(t.UIDirections.Down).setPointerLength(10).setPointerAngle(60)}))}))}]),YG=UG;new HG(xN,pN,[WG,function(t){return t.disposeResultTable()}]);var XG,ZG=new HG(yN,pN,[WG,function(t){return t.setResultTable((function(t){return t.setOrigin(lz.LeftBottom)}))}]),KG=function(t,i,n,e,r){return{location:t,scale:i,resultTableContent:n,series:e,fillStyle:r}},qG={World:"World",USA:"USA",NorthAmerica:"NorthAmerica",SouthAmerica:"SouthAmerica",Canada:"Canada",Europe:"Europe",Asia:"Asia",Africa:"Africa",Australia:"Australia"},JG=function(t,i){var n;if(t===qG.World)n="countries_world.json";else if(t===qG.NorthAmerica)n="countries_northAmerica.json";else if(t===qG.SouthAmerica)n="countries_southAmerica.json";else if(t===qG.Africa)n="countries_africa.json";else if(t===qG.Europe)n="countries_europe.json";else if(t===qG.Asia)n="countries_asia.json";else if(t===qG.USA)n="states_usa.json";else if(t===qG.Canada)n="territoriesProvinces_canada.json";else{if(t!==qG.Australia){var e="LCJS MapChart unidentified `type`: "+t;throw wr.alert(e),new Error(e)}n="territories_australia.json"}var r=i+"/maps/"+n;return wr.fetch(r).then((function(t){return t.json()})).catch((function(t){var n='LightningChart JS Map data request failed.\nresourcesBaseUrl: "'+i+'"\nPlease see API documentation of MapChart to learn more about this.\nThe latest documentation can be found at arction.com.';throw wr.alert(n),new Error(n)}))},QG=function(t,i){return!(!i.name||t.name.toLowerCase()!==i.name.toLowerCase())||"ISO_A3"in t&&"ISO_A3"in i&&t.ISO_A3.toLowerCase()===i.ISO_A3.toLowerCase()},$G=function(t,i,n){if(t===qG.Asia){for(var e=[],r=0;r<n.length;r+=1){e[r]=[];for(var s=n[r],o=e[r],h=0;h<s.length;h+=1){var u=s[h];u.x<-100?o[h]={x:u.x+360,y:u.y}:o[h]=u}}return e}return n},tH=function(t,i,n){var r,s=i.name.toLowerCase();if(t===qG.USA&&("alaska"===s?r={translate:{x:55,y:-25},scale:{x:.16,y:.16}}:"hawaii"===s&&(r={translate:{x:48,y:7},scale:{x:1,y:1}})),r){for(var o=r.translate,h=r.scale,u=Ks(Ir(n)),a=[],f=0;f<n.length;f+=1){a[f]=[];for(var c=n[f],l=a[f],d=0;d<c.length;d+=1){var v=c[d],y=v.x;"alaska"===s&&1===Math.sign(y)&&(y=-180-(180-y)),l[d]={x:o.x+(y-u.min.x)*h.x+u.min.x,y:o.y+(v.y-u.min.y)*h.y+u.min.y}}}return i.outlier=!0,i.transform=e(e({},r),{vertexBoundaries:u}),a}return n},iH={World:{min:{x:-180,y:-90},max:{x:180.0000000000002,y:83.63410065300012}},Europe:{min:{x:-25,y:34},max:{x:40,y:70}},Africa:{min:{x:-17,y:-40},max:{x:52,y:37.37549753800012}},Asia:{min:{x:27,y:-10.922621351999808},max:{x:180.0000000000002,y:81.85871002800009}},NorthAmerica:{min:{x:-179.1435033839999,y:5.515082098000121},max:{x:-50,y:83.11652252800009}},SouthAmerica:{min:{x:-85,y:-55.9185042229998},max:{x:-35,y:15}},USA:{min:{x:-125,y:24},max:{x:-68,y:50}},Canada:{min:{x:-141.0181,y:41.7297},max:{x:-52.6194,y:75}},Australia:{min:{x:111,y:-43.6586},max:{x:155,y:-9.2199}}},nH={World:.6,Europe:1/1.4,Africa:1.3,Asia:.8,NorthAmerica:.9,SouthAmerica:1.5,USA:3/4,Canada:6/8,Australia:11/12};t.AutoCursorModes=void 0,(XG=t.AutoCursorModes||(t.AutoCursorModes={}))[XG.disabled=0]="disabled",XG[XG.snapToClosest=1]="snapToClosest",XG[XG.onHover=2]="onHover";var eH,rH=function(i){function e(){var n=null!==i&&i.apply(this,arguments)||this;return n.ng=t.AutoCursorModes.snapToClosest,n.QS=function(t){n.ZS.includes(t)||(n.ZS.push(t),n.an.emit("seriesRestore",n,t))},n.eg=function(t,i){t.getCursorEnabled()&&!n.engine.ws()&&n.rg(i,!0)},n.onSeriesBackgroundMouseEnter=function(t){return n.an.on("mouseEnterSeriesBackground",t)},n.onSeriesBackgroundMouseLeave=function(t){return n.an.on("mouseLeaveSeriesBackground",t)},n.onSeriesBackgroundMouseMove=function(t){return n.an.on("mouseMoveSeriesBackground",t)},n.onSeriesBackgroundMouseDown=function(t){return n.an.on("mouseDownSeriesBackground",t)},n.onSeriesBackgroundMouseUp=function(t){return n.an.on("mouseUpSeriesBackground",t)},n.onSeriesBackgroundMouseClick=function(t){return n.an.on("mouseClickSeriesBackground",t)},n.onSeriesBackgroundMouseDoubleClick=function(t){return n.an.on("mouseDoubleClickSeriesBackground",t)},n.onSeriesBackgroundMouseDragStart=function(t){return n.an.on("mouseDragStartSeriesBackground",t)},n.onSeriesBackgroundMouseDrag=function(t){return n.an.on("mouseDragSeriesBackground",t)},n.onSeriesBackgroundMouseDragStop=function(t){return n.an.on("mouseDragStopSeriesBackground",t)},n.onSeriesBackgroundMouseWheel=function(t){return n.an.on("mouseWheelSeriesBackground",t)},n.onSeriesBackgroundTouchStart=function(t){return n.an.on("touchStartSeriesBackground",t)},n.onSeriesBackgroundTouchMove=function(t){return n.an.on("touchMoveSeriesBackground",t)},n.onSeriesBackgroundTouchEnd=function(t){return n.an.on("touchEndSeriesBackground",t)},n.offSeriesBackgroundMouseEnter=function(t){return n.an.off(t,"mouseEnterSeriesBackground")},n.offSeriesBackgroundMouseLeave=function(t){return n.an.off(t,"mouseLeaveSeriesBackground")},n.offSeriesBackgroundMouseMove=function(t){return n.an.off(t,"mouseMoveSeriesBackground")},n.offSeriesBackgroundMouseDown=function(t){return n.an.off(t,"mouseDownSeriesBackground")},n.offSeriesBackgroundMouseUp=function(t){return n.an.off(t,"mouseUpSeriesBackground")},n.offSeriesBackgroundMouseClick=function(t){return n.an.off(t,"mouseClickSeriesBackground")},n.offSeriesBackgroundMouseDoubleClick=function(t){return n.an.off(t,"mouseDoubleClickSeriesBackground")},n.offSeriesBackgroundMouseDragStart=function(t){return n.an.off(t,"mouseDragStartSeriesBackground")},n.offSeriesBackgroundMouseDrag=function(t){return n.an.off(t,"mouseDragSeriesBackground")},n.offSeriesBackgroundMouseDragStop=function(t){return n.an.off(t,"mouseDragStopSeriesBackground")},n.offSeriesBackgroundMouseWheel=function(t){return n.an.off(t,"mouseWheelSeriesBackground")},n.offSeriesBackgroundTouchStart=function(t){return n.an.off(t,"touchStartSeriesBackground")},n.offSeriesBackgroundTouchMove=function(t){return n.an.off(t,"touchMoveSeriesBackground")},n.offSeriesBackgroundTouchEnd=function(t){return n.an.off(t,"touchEndSeriesBackground")},n}return n(e,i),e.prototype.sg=function(t){var i=this;return t.setMouseMoveEventHandler((function(t,n){i.an.emit("mouseMoveSeriesBackground",i,n),i.rg(void 0,!1)})).setMouseEnterEventHandler((function(t,n){return i.an.emit("mouseEnterSeriesBackground",i,n)})).setMouseLeaveEventHandler((function(t,n){i.an.emit("mouseLeaveSeriesBackground",i,n),i.rg(void 0,!1)})).setMouseDownEventHandler((function(t,n){return i.an.emit("mouseDownSeriesBackground",i,n)})).setMouseUpEventHandler((function(t,n){return i.an.emit("mouseUpSeriesBackground",i,n)})).setMouseClickEventHandler((function(t,n){return i.an.emit("mouseClickSeriesBackground",i,n)})).setMouseDoubleClickEventHandler((function(t,n){return i.an.emit("mouseDoubleClickSeriesBackground",i,n)})).setMouseWheelEventHandler((function(t,n){return i.an.emit("mouseWheelSeriesBackground",i,n)})).setMouseDragStartEventHandler((function(t,n,e){return i.an.emit("mouseDragStartSeriesBackground",i,n,e)})).setMouseDragEventHandler((function(t,n,e,r,s){return i.an.emit("mouseDragSeriesBackground",i,n,e,r,s)})).setMouseDragStopEventHandler((function(t,n,e,r){return i.an.emit("mouseDragStopSeriesBackground",i,n,e,r)})).setTouchStartEventHandler((function(t,n){return i.an.emit("touchStartSeriesBackground",i,n)})).setTouchMoveEventHandler((function(t,n){return i.an.emit("touchMoveSeriesBackground",i,n)})).setTouchEndEventHandler((function(t,n){return i.an.emit("touchEndSeriesBackground",i,n)})),t},e.prototype.setAutoCursor=function(t){return this.og&&t(this.og),this.engine.xn(),this},e.prototype.getAutoCursor=function(){return this.og},e.prototype.setAutoCursorMode=function(t){return this.ng=t,this.engine.xn(),this},e.prototype.getAutoCursorMode=function(){return this.ng},e.prototype.setSeriesBackgroundFillStyle=function(t){return this.hg.$n(t),this._f.xn(),this},e.prototype.getSeriesBackgroundFillStyle=function(){return this.hg.Qn()},e.prototype.setSeriesBackgroundStrokeStyle=function(t){return this.hg.Ys(t),this._f.xn(),this},e.prototype.getSeriesBackgroundStrokeStyle=function(){return this.hg.Xs()},e.prototype.solveNearest=function(t){var i,n;if(void 0===t&&(t=this.engine.gs()),!(void 0===t||t.x<this.uiScale.x.fi()||t.x>this.uiScale.x.ci()||t.y<this.uiScale.y.fi()||t.y>this.uiScale.y.ci())){var e,r=Number.MAX_VALUE;try{for(var s=o(this.ZS),h=s.next();!h.done;h=s.next()){var u=h.value;if(u.getCursorEnabled()){var a=u.solveNearestFromScreen(t);if(a){var f=sr(a.location,a.scale,this.engine.scale),c=Hs(t,f);Number.isNaN(c)||e&&!(c<r)||(e=a,r=c)}}}}catch(t){i={error:t}}finally{try{h&&!h.done&&(n=s.return)&&n.call(s)}finally{if(i)throw i.error}}return e||void 0}},e.prototype.ug=function(){this.ng===t.AutoCursorModes.snapToClosest&&this.hg.getIsUnderMouse()&&this.rg(void 0,!1),this.ag?(this.og.pointAt(this.ag).restore(),this.ag=void 0):this.og.dispose(),this.og.Fe().Tf()},e.prototype.rg=function(i,n){if(n||!this.ag){var e=!this.og.isDisposed();this.ng===t.AutoCursorModes.onHover?i&&(this.ag=i):this.ng===t.AutoCursorModes.snapToClosest&&(i&&void 0===this.engine.gs()?this.ag=i:!this.engine.ws()&&(this.hg.getIsUnderMouse()||this.nm()>0)?this.ag=this.solveNearest():this.ag=void 0),(void 0!==this.ag||e)&&this.engine.xn()}},e.prototype.im=function(t){t.onHover(this.eg),i.prototype.im.call(this,t)},e.prototype.cg=function(t){return this.an.on("seriesRestore",t)},e.prototype.lg=function(t){return this.an.off(t)},e.prototype.dg=function(t){return this.an.on("seriesDispose",t)},e.prototype.vg=function(t){return this.an.off(t)},e.prototype.dispose=function(){return this.ZS.slice().forEach(Tr),i.prototype.dispose.call(this)},e}(bG),sH=function(i){function h(n,e,r,s,o,h,u){var a=i.call(this,n,e,r,e.qs(eH.bg),e.qs(eH.ui),s,u,h?h.theme:void 0)||this;a.yg=[],a.Sg=[],a.mg=[],a.Rt=a.zv.d2({scaleXYConstructor:Vo}),a.$f=!0,a.Ho=new c(a.vn.mapChartFillStyle),a.Zo=new c(a.vn.mapChartStrokeStyle),a.gg=a.vn.mapChartOutlierRegionFillStyle,a.wg=a.vn.mapChartOutlierRegionStrokeStyle,a.pg=a.vn.mapChartSeparateRegionFillStyle,a.kg=a.vn.mapChartSeparateRegionStrokeStyle,a.Bf=!1,a.xg=t.AutoCursorModes.onHover,a.Mg=hH,a.Mn=!1,a.onMouseEnter=function(t){return a.an.on("mouseEnter",t)},a.onMouseLeave=function(t){return a.an.on("mouseLeave",t)},a.onMouseClick=function(t){return a.an.on("mouseClick",t)},a.onMouseDoubleClick=function(t){return a.an.on("mouseDoubleClick",t)},a.onMouseDown=function(t){return a.an.on("mouseDown",t)},a.onMouseUp=function(t){return a.an.on("mouseUp",t)},a.onMouseMove=function(t){return a.an.on("mouseMove",t)},a.offMouseEnter=function(t){return a.an.off(t,"mouseEnter")},a.offMouseLeave=function(t){return a.an.off(t,"mouseLeave")},a.offMouseClick=function(t){return a.an.off(t,"mouseClick")},a.offMouseDoubleClick=function(t){return a.an.off(t,"mouseDoubleClick")},a.offMouseDown=function(t){return a.an.off(t,"mouseDown")},a.offMouseUp=function(t){return a.an.off(t,"mouseUp")},a.offMouseMove=function(t){return a.an.off(t,"mouseMove")},a.offMouseDragStart=function(t){return a.an.off(t,"mouseDragStart")},a.offMouseDrag=function(t){return a.an.off(t,"mouseDrag")},a.offMouseDragStop=function(t){return a.an.off(t,"mouseDragStop")},a.offMouseWheel=function(t){return a.an.off(t,"mouseWheel")},a.onMapDataReady=function(t){var i=a.an.on("mapDataReady",t);return a.Ag&&wr.setTimeout((function(){return t()})),i},a.onViewChange=function(t){return a.an.on("viewChange",t)},a.Fg=function(t,i,n,e,r){a.Rt.x.oi(e).ai([a.Qt.left+a.hh.left,a.Qt.right+a.hh.right]),a.Rt.y.oi(r).ai([a.Qt.bottom+a.hh.bottom,a.Qt.top+a.hh.top+a.yy()]),a.Tg&&a.Cg(a.Bg,a.Rt,a.Tg)},a.hc=function(i,n,e,r){a.xg!==t.AutoCursorModes.disabled&&(a.Lg(i,e,r),ss(n)),a.an.emit("mouseEnter",a,n)},a.ac=function(t,i,n,e){a.Ig(t,n,e),a.an.emit("mouseLeave",a,i),i&&ss(i)},a.cc=function(i,n,e,r){a.xg!==t.AutoCursorModes.disabled&&(a.Lg(i,e,r),ss(n)),a.an.emit("mouseMove",a,n)},a.dc=function(t,i){return a.an.emit("mouseClick",a,i)},a.vc=function(t,i){return a.an.emit("mouseDoubleClick",a,i)},a.yc=function(t,i){return a.an.emit("mouseDown",a,i)},a.Sc=function(t,i){return a.an.emit("mouseUp",a,i)},a.mc=function(t,i,n){a.an.emit("mouseDragStart",a,i,n)},a.bc=function(t,i,n,e,r){a.an.emit("mouseDrag",a,i,n,e,r)},a.gc=function(t,i,n,e){a.an.emit("mouseDragStop",a,i,n,e)},a.wc=function(t,i){a.an.emit("mouseWheel",a,i)},a.kc=function(t,i,n,e){a.Og=a.engine.clientLocation2Engine(i.clientX,i.clientY),a.Lg(t,n,e),a.an.emit("touchStart",a,i),ss(i)},a.xc=function(t,i,n,e){a.Og=a.engine.clientLocation2Engine(i.clientX,i.clientY),a.Lg(t,n,e),a.an.emit("touchMove",a,i),ss(i)},a.Mc=function(t,i,n,e){a.Og=void 0,a.Ig(t,n,e),a.an.emit("touchEnd",a,i),ss(i)},a.Pg=e.qs(eH.plotting),a.onResize(a.Fg),a.hy.Jn("Map Chart");var f=Rr(h?h.autoCursorBuilder:void 0,ZG);a.Dg=f.ig(a.Rf,a.Rt,a.Rt,a.vn).dispose(),a.oy(o,a.uiScale);var l=Rr(h&&h.type,qG.World);return a.Bg=l,a._g(l).then((function(){a.an.emit("mapDataReady")})),a}return n(h,i),h.prototype.setFillStyle=function(t){return this.Ho.C(t),this.Rg(),this},h.prototype.getFillStyle=function(){return this.Ho.L()},h.prototype.setStrokeStyle=function(t){return this.Zo.C(t),this.Rg(),this},h.prototype.getStrokeStyle=function(){return this.Zo.L()},h.prototype.setOutlierRegionFillStyle=function(t){var i=this;return this.gg="function"==typeof t?t(this.gg):t,this.Sg.forEach((function(t){return t.$n(i.gg)})),this.engine.xn(),this},h.prototype.getOutlierRegionFillStyle=function(){return this.gg},h.prototype.setOutlierRegionStrokeStyle=function(t){var i=this;return this.wg="function"==typeof t?t(this.wg):t,this.Sg.forEach((function(t){return t.Ys(i.wg)})),this.engine.xn(),this},h.prototype.getOutlierRegionStrokeStyle=function(){return this.wg},h.prototype.setSeparateRegionFillStyle=function(t){var i=this;return this.pg="function"==typeof t?t(this.pg):t,this.mg.forEach((function(t){return t.$n(i.pg)})),this.engine.xn(),this},h.prototype.getSeparateRegionFillStyle=function(){return this.pg},h.prototype.setSeparateRegionStrokeStyle=function(t){var i=this;return this.kg="function"==typeof t?t(this.kg):t,this.mg.forEach((function(t){return t.Ys(i.kg)})),this.engine.xn(),this},h.prototype.getSeparateRegionStrokeStyle=function(){return this.kg},h.prototype.invalidateRegionValues=function(t){var i,n;if(!this.Ag||!this.zg)return this.Eg=this.Eg||[],this.Eg.push(t),this;var r=this.Ho.D(!1),s=r instanceof Ve;if("function"==typeof t)for(var h=0;h<this.Ag.regions.length;h+=1){var u=this.Ag.regions[h],a=this.zg[h],f=t(e(e({},u),{geometry:void 0}),a);void 0!==f&&f!==a&&(this.zg[h]=f,s&&this.Ng(this.yg[h],f,r.getPalette()))}else try{for(var c=o(t),l=c.next();!l.done;l=c.next()){var d=l.value;if(d)for(h=0;h<this.Ag.regions.length;h+=1){u=this.Ag.regions[h],a=this.zg[h];void 0!==d.value&&d.value!==a&&QG(u,d)&&(this.zg[h]=d.value,s&&this.Ng(this.yg[h],d.value,r.getPalette()))}}}catch(t){i={error:t}}finally{try{l&&!l.done&&(n=c.return)&&n.call(c)}finally{if(i)throw i.error}}return this.engine.xn(),this},h.prototype.setAutoCursor=function(t){return this.Dg&&t(this.Dg),this.engine.xn(),this},h.prototype.getAutoCursor=function(){return this.Dg},h.prototype.setAutoCursorMode=function(t){return this.xg=t,this.engine.xn(),this},h.prototype.getAutoCursorMode=function(){return this.xg},h.prototype.setCursorResultTableFormatter=function(t){return this.Mg=t,this.engine.xn(),this},h.prototype.getCursorResultTableFormatter=function(){return this.Mg},h.prototype.onMouseDragStart=function(t){return this.an.on("mouseDragStart",t)},h.prototype.onMouseDrag=function(t){return this.an.on("mouseDrag",t)},h.prototype.onMouseDragStop=function(t){return this.an.on("mouseDragStop",t)},h.prototype.onMouseWheel=function(t){return this.an.on("mouseWheel",t)},h.prototype.onTouchStart=function(t){return this.an.on("touchStart",t)},h.prototype.onTouchMove=function(t){return this.an.on("touchMove",t)},h.prototype.onTouchEnd=function(t){return this.an.on("touchEnd",t)},h.prototype.offTouchStart=function(t){return this.an.off(t,"touchStart")},h.prototype.offTouchMove=function(t){return this.an.off(t,"touchMove")},h.prototype.offTouchEnd=function(t){return this.an.off(t,"touchEnd")},h.prototype.setMouseInteractions=function(t){var i=this;return this.$f=t,this.Vg((function(t){return t.setMouseInteractions(i.$f)})),this},h.prototype.getMouseInteractions=function(){return this.$f},h.prototype.offMapDataReady=function(t){return this.an.off(t,"mapDataReady")},h.prototype.offViewChange=function(t){return this.an.off(t,"viewChange")},h.prototype._g=function(t){return r(this,void 0,void 0,(function(){var i,n,e,r,h,u,a,f,c,l,d,v,y,S,m,b,g,w,p,k,x,M,A=this;return s(this,(function(s){switch(s.label){case 0:return[4,JG(t,this.ps.resourcesBaseUrl)];case 1:if(i=s.sent(),this.zg=new Array(i.regions.length).map((function(t){})).fill(void 0),!(n=iH[t]))throw new Error("Unidentified map type.");try{for(e=o(i.outliers),r=e.next();!r.done;r=e.next()){h=r.value;try{for(p=void 0,u=o(h.geometry),a=u.next();!a.done;a=u.next())f=a.value,c=this.Pg.Rc(this.Rt,CE.Simple).au(f).setMouseInteractions(this.$f).$n(this.gg).Ys(this.wg),this.Sg.push(c)}catch(t){p={error:t}}finally{try{a&&!a.done&&(k=u.return)&&k.call(u)}finally{if(p)throw p.error}}}}catch(t){g={error:t}}finally{try{r&&!r.done&&(w=e.return)&&w.call(e)}finally{if(g)throw g.error}}for(t===qG.USA&&(l=25.8,29.7,this.mg.push(this.Pg.Pc(this.Rt).setMouseInteractions(!1).$n(this.pg).Ys(this.kg).ph({x:-126,y:l}).oi({x:10,y:29.7-l}),this.Pg.Pc(this.Rt).setMouseInteractions(!1).$n(this.pg).Ys(this.kg).ph({x:-113,y:l}).oi({x:7,y:29.7-l}))),d=function(e){var r,s,h=i.regions[e],u=[],a=function(t,i){var n=i.geometry;return n=$G(t,i,n),tH(t,i,n)}(t,h),f=function(t){var i=v.Pg.Rc(v.Rt,CE.Simple).au(t);i.setMouseInteractions(v.$f).Eo(n).setMouseEnterEventHandler((function(t,n){return A.hc(i,n,h,e)})).setMouseLeaveEventHandler((function(t,n){return A.ac(i,n,h,e)})).setMouseClickEventHandler(v.dc).setMouseDoubleClickEventHandler(v.vc).setMouseDownEventHandler(v.yc).setMouseUpEventHandler(v.Sc).setMouseMoveEventHandler((function(t,n){return A.cc(i,n,h,e)})).setMouseDragStartEventHandler(v.mc).setMouseDragEventHandler(v.bc).setMouseDragStopEventHandler(v.gc).setMouseWheelEventHandler(v.wc).setTouchStartEventHandler((function(t,n){return A.kc(i,n,h,e)})).setTouchMoveEventHandler((function(t,n){return A.xc(i,n,h,e)})).setTouchEndEventHandler((function(t,n){return A.Mc(i,n,h,e)})),u.push(i)};try{for(var c=(r=void 0,o(a)),l=c.next();!l.done;l=c.next()){f(l.value)}}catch(t){r={error:t}}finally{try{l&&!l.done&&(s=c.return)&&s.call(c)}finally{if(r)throw r.error}}v.yg.push(u)},v=this,y=0;y<i.regions.length;y+=1)d(y);if(this.Rg(),this.Tg=n,this.Cg(t,this.Rt,n),this.Ag=i,this.Eg){try{for(S=o(this.Eg),m=S.next();!m.done;m=S.next())b=m.value,this.invalidateRegionValues(b)}catch(t){x={error:t}}finally{try{m&&!m.done&&(M=S.return)&&M.call(S)}finally{if(x)throw x.error}}this.Eg=void 0}return this.Tf(),[2]}}))}))},h.prototype.Cg=function(t,i,n){var e=nH[t],r=i.x.getCellSize(),s=i.y.getCellSize()/r,o={min:{x:n.min.x,y:n.min.y},max:{x:n.max.x,y:n.max.y}};if(s<e){var h=(o.max.x-o.min.x)*(e/s-1);o.min.x-=h/2,o.max.x+=h/2}else if(s>e){h=(o.max.y-o.min.y)*(s/e-1);o.min.y-=h/2,o.max.y+=h/2}i.x.xi(o.min.x,o.max.x),i.y.xi(o.min.y,o.max.y);var u=this.Rt.x.Si(),a=this.Rt.y.Si();this.an.emit("viewChange",{latitudeRange:{start:o.min.y,end:o.max.y},longitudeRange:{start:o.min.x,end:o.max.x},margin:{top:a[1],bottom:a[0],left:u[0],right:u[1]}})},h.prototype.Vg=function(t){for(var i,n,e=0;e<this.yg.length;e+=1)try{for(var r=(i=void 0,o(this.yg[e])),s=r.next();!s.done;s=r.next()){t(s.value,e)}}catch(t){i={error:t}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}},h.prototype.Rg=function(){var t,i,n=this.Ho.D(this.Bf),e=this.Zo.D(this.Bf);if(n instanceof Ve&&"value"===n.getLookUpProperty()&&this.zg)for(var r=n.getPalette(),s=0;s<this.zg.length;s+=1){this.Ng(this.yg[s],this.zg[s],r);try{for(var h=(t=void 0,o(this.yg[s])),u=h.next();!u.done;u=h.next()){u.value.Ys(e)}}catch(i){t={error:i}}finally{try{u&&!u.done&&(i=h.return)&&i.call(h)}finally{if(t)throw t.error}}}else this.Vg((function(t){return t.$n(n).Ys(e)}));this.engine.xn()},h.prototype.Ng=function(t,i,n){var e,r,s=void 0!==i?n.getColors(i):n.getFallbackColor(),h=new Ee({color:s});try{for(var u=o(t),a=u.next();!a.done;a=u.next()){a.value.$n(h)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=u.return)&&r.call(u)}finally{if(e)throw e.error}}},h.prototype.Lg=function(t,i,n){this.Gg={polygon:t,region:i,iRegion:n},this.engine.xn()},h.prototype.Ig=function(t,i,n){this.Gg&&t===this.Gg.polygon&&(this.Gg=void 0,this.engine.xn())},h.prototype.setAnimationsEnabled=function(t){return this.Mn=!t,this},h.prototype.getAnimationsEnabled=function(){return this.Mn},h.prototype.disableAnimations=function(){return this},h.prototype.getMinimumSize=function(){},h.prototype.Fl=function(){return[this]},h.prototype.Tf=function(){i.prototype.Tf.call(this),i.prototype.sy.call(this);var t=g(this.Rt.x.fi(),this.Rt.y.fi(),this.Rt.x.li(),this.Rt.y.li());this.Pg.rb(t);var n=this.engine.gs()||this.Og;if(this.Gg&&n){var e=this.zg&&this.zg[this.Gg.iRegion],r=sr(n,this.engine.scale,this.Rt),s=(r={x:Lr(r.x,this.Rt.x.getInnerStart(),this.Rt.x.getInnerEnd()),y:Lr(r.y,this.Rt.y.getInnerStart(),this.Rt.y.getInnerEnd())}).x,o=r.y,h=this.Gg.region.transform;this.Gg.region.outlier&&h&&(s=(s-h.translate.x-h.vertexBoundaries.min.x)/h.scale.x+h.vertexBoundaries.min.x,o=(o-h.translate.y-h.vertexBoundaries.min.y)/h.scale.y+h.vertexBoundaries.min.y),this.Dg.setPosition(r).restore().getResultTable().setContent(this.Mg(new _G,this.Gg.region,e,s,o,this).Xf())}else this.Dg.dispose();return this.Dg.Fe().Tf(),this},h.prototype.dispose=function(){return this.Pg.ro(),vV(this.Rt),i.prototype.dispose.call(this)},h.prototype.bi=function(){return i.prototype.bi.call(this),this.Rt.bi(),this},h.prototype.gi=function(){return i.prototype.gi.call(this),this.Rt.gi(),this},h.prototype.ml=function(){return xs(this.Ho)},h.prototype.attach=function(t,i){return t.setText(this.getTitle()),t.setButtonOffStrokeStyle(t.getButtonOffStrokeStyle().set("thickness",1)),t.setButtonOnStrokeStyle(t.getButtonOnStrokeStyle().set("thickness",1)),t.setOn(!0).setLocked(!0),t.onMouseEnter((function(){})),t.onMouseLeave((function(){})),this.onMouseEnter((function(){return t.setHighlighted(!0)})),this.onMouseLeave((function(){return t.setHighlighted(!1)})),this.onTouchStart((function(){return t.setHighlighted(!0)})),this.onTouchEnd((function(){return t.setHighlighted(!1)})),ks(t,this.vn,{fill:this.Ho}),this},h}(mV);!function(t){t[t.bg=0]="bg",t[t.plotting=1]="plotting",t[t.ui=2]="ui"}(eH||(eH={}));var oH,hH=function(t,i,n,e,r,s){return t.addRow(""+i.name).addRow(uH(e,r)),void 0!==n&&t.addRow("Region value: "+n.toFixed(1)),t},uH=function(t,i){var n=t>0,e=i>0;return[As(Math.abs(0|t),2),"° ",As(Math.abs(0|(t<0?t=-t:t)%1*60),2),"' "].join("")+(n?"E":"W")+", "+([As(Math.abs(0|i),2),"° ",As(Math.abs(0|(i<0?i=-i:i)%1*60),2),"' "].join("")+(e?"N":"S"))},aH=function(t){function i(i,n,e,r,s,o,h,u){var a=t.call(this,i,n,n.Hg(e),r,s,{numeric:r.numericTickStrategy,datetime:r.dateTimeTickStrategy,time:r.timeTickStrategy},{type:"linear"})||this;return a.jg=o,a.Wg=h,a.Ug=u,a.Yg=e,a.qn=u.$e(e).setMouseInteractions(!1).ie(r.axisTitleFont),a}return n(i,t),i.prototype.setStrokeStyle=function(t){return this.Xg="function"==typeof t?t(this.Xg):t,this.Wg.xn(),this},i.prototype.getStrokeStyle=function(){return this.Xg},i.prototype.Be=function(t,i,n,e){return new fH(i,t,n,e,this.Yg,this.Ug,this.Ug,this.Zg(this.jg,this.Yg),this.Ug.Gf(this.Yg).setMouseInteractions(!1))},i.prototype.Le=function(t,i){var n=this.Kg(this.Yg,t);this.qg&&!1===this.qg(t)?t.label.dispose():t.label.restore().ph(fo(this.Jg(this.Yg,t.value),n.padding)).Bh(n.alignment).ne(n.rotation).xh(n.offset.x,n.offset.y),this.Qg(this.Yg,t.gridline,t.tickline,t)},i.prototype.setMouseInteractions=function(t){return this},i.prototype.Tf=function(){var t=this;this.ve({physicalAxisSize:0});var i=this.De((function(i,n){var e=n.tickLevel.Ce,r=.5*t.Xg.thickness+e.tickLength+e.tickPadding+Math.abs(n.label.Fe().vi().y/t.Yg.tn().y)+e.labelPadding;return Math.max(i,r)}),0);return this.$g(this.Yg,this.Xg,i),this.tw(this.Yg,this.qn,i),i},i}(eh),fH=function(t){function i(i,n,e,r,s,o,h,u,a,f){var c=t.call(this,i,n,e,r,o,s,h,s,f)||this;return c.gridline=u,c.tickline=a,u.setMouseInteractions(!1),c}return n(i,t),i.prototype.restore=function(){return t.prototype.restore.call(this),this.gridline.restore(),this.tickline.restore(),this},i.prototype.dispose=function(){return t.prototype.dispose.call(this),this.gridline.dispose(),this.tickline.dispose(),this},i.prototype.isDisposed=function(){return t.prototype.isDisposed.call(this)&&this.gridline.isDisposed()&&this.tickline.isDisposed()},i}(sV),cH=function(t){function i(i,n,e,r,s,o,h,u){var a=t.call(this,i,lH,n,e,r,s,o,h)||this;return a.iw=u,a.Xg=a.vn.polarAmplitudeAxisStyle,a.cS=a.Wg.Gf(a.Yg).setMouseInteractions(!1),a.setScrollStrategy(Ho.expansion),a.setTickStrategy(jo.Numeric),a.qn.$n(e.polarAmplitudeAxisTitleStyle),a.setTitle("Amplitude"),a}return n(i,t),i.prototype.Ge=function(){return this.iw()},i.prototype.Ze=function(t,i){return oV(t,i,this.Yg.y)},i.prototype.qe=function(t,i,n){var e=2*(i-t),r=this.Yg.x.Yi(e);return{min:t-n*r,max:i+n*r}},i.prototype.Jg=function(t,i){return{x:t.nw()?i-t.ew().start:t.ew().start-i,y:0}},i.prototype.Zg=function(t,i){return t.Gc(i)},i.prototype.Qg=function(t,i,n,e){var r=e.tickLevel.Ce,s=t.nw()?e.value-t.ew().start:t.ew().start-e.value;Br(e.value,t.ew().start)||Br(e.value,t.ew().end)?i.dispose():i.restore().Zu(0).Ku(360).ta(void 0).$u(0).qu(s).ta(60).$n(Re).Ys(r.gridStrokeStyle);var o=.5*this.Xg.thickness;n.ha({x:s,y:-o*t.tn().y}).Ku({x:s,y:-(o+r.tickLength)*t.tn().y}).na(r.tickStyle)},i.prototype.Kg=function(t,i){var n=i.tickLevel.Ce;return{alignment:{x:0,y:1},padding:{x:0,y:t.tn().y*-(.5*this.Xg.thickness+n.tickLength+n.tickPadding)},rotation:0,offset:{x:0,y:0}}},i.prototype.$g=function(t,i,n){var e=t.nw()?t.ew().end-t.ew().start:t.ew().start-t.ew().end;this.cS.ha({x:0,y:0}).Ku({x:e,y:0}).na(i)},i.prototype.tw=function(t,i,n){var e=t.nw()?(t.ew().start+t.ew().end)/2-t.ew().start:t.ew().start-(t.ew().start+t.ew().end)/2;i.Bh({x:0,y:1}).ph({x:e,y:-n*t.tn().y})},i}(aH),lH={je:function(t){return t.getAmplitudeMin()},We:function(t){return t.getAmplitudeMax()},Ye:function(t){},Hg:function(t){return{getInnerStart:function(){return t.ew().start},getInnerEnd:function(){return t.ew().end},xi:function(i,n){return t.rw(i,n)},Ti:function(i,n,e,r,s){return t.y.Ti(i,n,e,r,s)}}}},dH=function(t){function i(i,n,e,r,s,o,h){var u=t.call(this,i,yH,n,e,r,s,o,h)||this;return u.Xg=u.vn.polarRadialAxisStyle,u.sw=90,u.ow=12,u.hw=vH,u.cS=u.Wg.Gc(u.Yg).setMouseInteractions(!1),u.qg=function(t){for(var i=180*(t.value-u.Yg.uw())/Math.PI%360;i<0;)i+=360;for(;i>360;)i-=360;if(i>=0&&i<=20||i>=340&&i<=360)return!1},u.wn=void 0,u.setTickStyle(e.polarRadialAxisTickStyle),u.qn.$n(e.polarRadialAxisTitleStyle),u.setTitle("Degrees"),u.setNorth(u.sw),u}return n(i,t),i.prototype.setTickStyle=function(t){return this.aw="function"==typeof t?t(this.aw):t,this.fw(),this.Wg.xn(),this},i.prototype.getTickStyle=function(){return this.aw},i.prototype.setTickFormattingFunction=function(t){return this.hw=t,this.fw(),this.Wg.xn(),this},i.prototype.getTickFormattingFunction=function(){return this.hw},i.prototype.setClockwise=function(t){this.Yg.cw(t);var i=this.sw*Math.PI/180;return t?this.Yg.lw(i+Math.PI/2):this.Yg.lw(i-Math.PI/2),this.Wg.xn(),this},i.prototype.getClockwise=function(){return!this.Yg.dw()},i.prototype.setNorth=function(t){for(;t<0;)t+=360;t%=360,this.sw=t;var i=t*Math.PI/180;return this.getClockwise()?this.Yg.lw(i+Math.PI/2):this.Yg.lw(i-Math.PI/2),this.Wg.xn(),this},i.prototype.getNorth=function(){return 180*this.Yg.uw()/Math.PI},i.prototype.setDivision=function(t){return this.ow=t,this.fw(),this.Wg.xn(),this},i.prototype.getDivision=function(){return this.ow},i.prototype.Ge=function(){return[]},i.prototype.Ze=function(t,i){return i},i.prototype.qe=function(t,i,n){return{min:t,max:i}},i.prototype.Jg=function(t,i){var n=t.dw()?1:-1,e=t.uw(),r=t.nw()?t.ew().end-t.ew().start:t.ew().start-t.ew().end;return{x:Math.cos((i-e)*n)*r,y:Math.sin((i-e)*n)*r}},i.prototype.Zg=function(t,i){return t.Gf(i)},i.prototype.Qg=function(t,i,n,e){var r=this.aw,s=t.dw()?1:-1,o=t.uw(),h=(e.value-o)*s,u=Math.cos(h),a=Math.sin(h),f=t.nw()?t.ew().end-t.ew().start:t.ew().start-t.ew().end,c={x:u*f,y:a*f};i.ha({x:0,y:0}).Ku(c);var l={x:c.x+u*r.tickLength*t.tn().x,y:c.y+a*r.tickLength*t.tn().y};n.ha(c).Ku(l),i.na(r.gridStrokeStyle),n.na(r.tickStyle)},i.prototype.Kg=function(t,i){for(var n,e=this.aw,r=t.dw()?1:-1,s=t.uw(),o=(i.value-s)*r;o<0;)o+=2*Math.PI;for(;o>=2*Math.PI;)o-=2*Math.PI;n=o>0&&o<=Math.PI?-o+Math.PI/2:-o-Math.PI/2;var h=e.tickLength+e.tickPadding,u=Math.cos(o)*h*t.tn().x,a=Math.sin(o)*h*t.tn().y;return{alignment:{x:0,y:0},padding:{x:u,y:a},rotation:180*n/Math.PI,offset:{x:u,y:a}}},i.prototype.$g=function(t,i,n){var e=t.nw()?t.ew().end-t.ew().start:t.ew().start-t.ew().end;this.cS.Zu(0).Ku(360).$u(0).qu(e+.5*i.thickness*t.tn().x).ta(60).$n(Re).Ys(i)},i.prototype.tw=function(t,i,n){var e=t.uw(),r=this.Kg(t,{value:0+e}),s=t.nw()?t.ew().end-t.ew().start:t.ew().start-t.ew().end;i.Bh(r.alignment).ne(r.rotation).xh(r.offset.x,r.offset.y).ph(fo({x:s,y:0},r.padding))},i.prototype.fw=function(){var t=this;this.he({cn:[],ln:[{sr:"Radial ticks",hr:0,Ce:this.aw,Ae:this.hw,pe:function(i,n,e,r){for(var s=[],o=2*Math.PI/t.ow,h=0;h<2*Math.PI;h+=o)s.push(h);return s},Gn:{Oe:function(){},Hn:function(){return!1}},xe:void 0}],rn:vH,ae:void 0,fe:void 0})},i}(aH),vH=function(t,i,n){return(180*t/Math.PI).toFixed(0)},yH={je:function(t){},We:function(t){},Ye:function(t){},Hg:function(t){return{getInnerStart:function(){return 0},getInnerEnd:function(){return 2*Math.PI},xi:function(t,i){},Ti:function(i,n,e,r,s){return t.x.Ti(i,n,e,r,s)}}}},SH=function(t){function i(i,n,e,r,s,o){var h=t.call(this,n,e,r,o)||this;return h.wf=i,h.Yg=s,h.Mt="Sector",h.yw=0,h.Sw=1*Math.PI/2,h.mw=void 0,h.bw=void 0,h.Ly=h.Cc(h.wf.Gc(h.Yg)),h.Ho=new c(o.bandFillStyle),h.Zo=new c(o.bandStrokeStyle),h.setMouseInteractions(!1),h}return n(i,t),i.prototype.setAngleStart=function(t){return this.yw=Lr(t,0,360),this.wf.xn(),this},i.prototype.getAngleStart=function(){return this.yw},i.prototype.setAngleEnd=function(t){return this.Sw=Lr(t,0,360),this.wf.xn(),this},i.prototype.getAngleEnd=function(){return this.Sw},i.prototype.setAmplitudeStart=function(t){return this.mw=t,this.wf.xn(),this},i.prototype.getAmplitudeStart=function(){return this.mw},i.prototype.setAmplitudeEnd=function(t){return this.bw=t,this.wf.xn(),this},i.prototype.getAmplitudeEnd=function(){return this.bw},i.prototype.setFillStyle=function(t){return this.Ho.C(t),this.wf.xn(),this},i.prototype.getFillStyle=function(){return this.Ho.L()},i.prototype.setFillStyleHighlighted=function(t){return this.Ho.I(t),this.wf.xn(),this},i.prototype.getFillStyleHighlighted=function(){return this.Ho.P()},i.prototype.setStrokeStyle=function(t){return this.Zo.C(t),this.wf.xn(),this},i.prototype.getStrokeStyle=function(){return this.Zo.L()},i.prototype.setStrokeStyleHighlight=function(t){return this.Zo.I(t),this.wf.xn(),this},i.prototype.getStrokeStyleHighlight=function(){return this.Zo.D(!0)},i.prototype.Tf=function(){var t=this.Yg.ew(),i=180*this.Yg.uw()/Math.PI,n=void 0!==this.mw?Lr(this.mw,t.start,t.end):t.start,e=void 0!==this.bw?Lr(this.bw,t.start,t.end):t.end,r=this.Yg.nw()?n-t.start:t.start-n,s=this.Yg.nw()?e-t.start:t.start-e,o=Math.min(r,s),h=Math.max(r,s),u=this.Yg.dw()?1:-1,a=Math.abs(this.Sw-this.yw);this.Ly.Zu((this.yw-i)*u).Ku((this.Sw-i)*u).$u(100*o/h).qu(h).$n(this.Ho.D(this.Bf)).Ys(this.Zo.D(this.Bf)).ta(Math.ceil(a/2))},i.prototype.Ac=function(t,i){},i.prototype.attach=function(i,n){return void 0===n&&(n=!0),t.prototype.attach.call(this,i,n),ks(i,this.vn,{fill:this.Ho,stroke:this.Zo}),this},i}(nN),mH=function(i,n,e){if(e instanceof rH&&(e.getAutoCursorMode()!==t.AutoCursorModes.disabled&&!0===i||n.listeners("hover").size>1))return!0;return n.listeners("hover").size>0},bH=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.MS=!0,i.gw=!0,i.ww=!0,i.onHover=function(t){return i.an.on("hover",t)},i.offHover=function(t){return i.an.off(t,"hover")},i}return n(i,t),i.prototype.setAutoScrollingEnabled=function(t){return this.MS=t,this.vr.engine.xn(),this},i.prototype.getAutoScrollingEnabled=function(){return this.MS},i.prototype.CS=function(){this.pw&&mH(this.ww,this.an,this.vr)&&this.an.emit("hover",this,void 0===this.kw?this.solveNearestFromScreen(this.pw):this.solveNearestFromSegment(this.pw,this.kw))},i.prototype.Tf=function(){},i.prototype.BS=function(){},i.prototype.IS=function(t){return this.ww=t,this},i.prototype.OS=function(){return this.ww=this.gw,this},i.prototype.setCursorEnabled=function(t){return this.ww=t,this.gw=t,this},i.prototype.getCursorEnabled=function(){return this.ww},i.prototype.uc=function(i,n,e){void 0===e&&(e=1),t.prototype.uc.call(this,i,n,e),this.kw=i,this.pw=this.vr.engine.clientLocation2Engine(n.x,n.y),mH(this.ww,this.an,this.vr)&&this.an.emit("hover",this,this.solveNearestFromSegment(this.pw,this.kw))},i.prototype.fc=function(i,n){void 0===n&&(n=1),t.prototype.fc.call(this,i,n),this.kw=void 0,this.pw=void 0,mH(this.ww,this.an,this.vr)&&this.an.emit("hover",this,void 0)},i.prototype.lc=function(i,n){t.prototype.lc.call(this,i,n),this.kw=i,this.pw=this.vr.engine.clientLocation2Engine(n.x,n.y),mH(this.ww,this.an,this.vr)&&this.an.emit("hover",this,void 0===this.kw?this.solveNearestFromScreen(this.pw):this.solveNearestFromSegment(this.pw,this.kw))},i}(nN),gH=function(t){function i(i,n,e,r,s,o){var h=t.call(this,n,e,r,o)||this;return h.wf=i,h.vr=n,h.Mg=wH,h.scale=s,h}return n(i,t),i.prototype.getAmplitudeMin=function(){return this.xw?this.xw.min:void 0},i.prototype.getAmplitudeMax=function(){return this.xw?this.xw.max:void 0},i.prototype.setCursorResultTableFormatter=function(t){return this.Mg=t,this.vr.engine.xn(),this},i.prototype.getCursorResultTableFormatter=function(){return this.Mg},i}(bH),wH=function(t,i,n,e,r){return t.addRow(i.getName()).addRow("Angle:","",Math.round(n).toString()).addRow("Amplitude","",r(e))},pH=function(t,i){var n,e,r=[],s=i.ew().start,h=i.ew().end,u=i.nw(),a=i.dw()?1:-1,f=i.uw(),c=Math.abs(h-s),l=Math.min(s,h)+.001*c,d=Math.max(s,h)-.001*c;try{for(var v=o(t),y=v.next();!y.done;y=v.next()){var S=y.value,m=Lr(S.amplitude,l,d),b=S.angle*Math.PI/180-f,g=Math.cos(b*a)*(u?m-s:s-m),w=Math.sin(b*a)*(u?m-s:s-m),p=S.color;r.push({x:g,y:w,color:p})}}catch(t){n={error:t}}finally{try{y&&!y.done&&(e=v.return)&&e.call(v)}finally{if(n)throw n.error}}return r},kH=function(t){var i,n,e={min:Is,max:Os};try{for(var r=o(t),s=r.next();!s.done;s=r.next()){var h=s.value;e.min=Math.min(e.min,h.amplitude),e.max=Math.max(e.max,h.amplitude)}}catch(t){i={error:t}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return e},xH=function(t){return t.slice().map((function(t){return t.angle>=0&&t.angle<=360?t:e(e({},t),{angle:t.angle%360})}))},MH=function(t,i){var n=po(t);for(i.dw()||(n*=-1),n+=180*i.uw()/Math.PI;n<0;)n+=360;n%=360;var e=uo(t),r=i.ew(),s=Math.abs(r.end-r.start);return{angle:n,amplitude:ru(r.start,r.end,e/s)}},AH=function(t){function i(i,n,e,r,s,o){var h=t.call(this,i,n,e,r,s,o)||this;h.Mt="Line Series",h.Mw=[],h.Aw=!1,h.Fw=!1;var u=h.vr.getSeries().length;return h.ia=new c(Fs(h.vn.seriesStrokeStyle,u)),h.Tw=h.Cc(i.iS(s,void 0,[LV.UserSeries]).na(h.ia.D(h.Bf))).Uh(Wz.Nearest),h}return n(i,t),i.prototype.setData=function(t){return this.Mw=xH(t),this.Aw=!0,this.xw=kH(this.Mw),this.wf.xn(),this},i.prototype.setStrokeStyle=function(t){var i,n;this.ia.C(t);var e=this.ia.D(this.Bf);try{for(var r=o(this.ic),s=r.next();!s.done;s=r.next()){s.value.na(e)}}catch(t){i={error:t}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return this.wf.xn(),this},i.prototype.getStrokeStyle=function(){return this.ia.L()},i.prototype.setStrokeStyleHighlight=function(t){var i,n;if(this.ia.I(t),this.getHighlighted()){var e=this.ia.D(!0);try{for(var r=o(this.ic),s=r.next();!s.done;s=r.next()){s.value.na(e)}}catch(t){i={error:t}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}}return this.wf.xn(),this},i.prototype.getStrokeStyleHighlight=function(){return this.ia.D(!0)},i.prototype.setConnectDataAutomaticallyEnabled=function(t){return this.Fw=t,this.wf.xn(),this},i.prototype.getConnectDataAutomaticallyEnabled=function(){return this.Fw},i.prototype.He=function(){return this.MS&&this.Mw.length>0},i.prototype.Ac=function(t,i){t.na(this.ia.D(i)),this.wf.xn()},i.prototype.solveNearestFromScreen=function(t){return this.solveNearestFromSegment(t,this.Tw)},i.prototype.solveNearestFromSegment=function(t,i){var n=i.Cw(t);if(n){var e=MH(n,this.scale),r=e.angle,s=e.amplitude;return KG(n,this.scale,this.Mg(new _G,this,r,s,this.vr.getAmplitudeAxis().formatValue).Xf(),this,this.ia.L().getFillStyle())}},i.prototype.Tf=function(){if(this.Aw||this.scale.Bw()){var t=pH(this.Mw,this.scale),i=Ks(t);this.Fw?(t.push(e({},t[0])),this.Tw.Cu(!0)):this.Tw.Cu(!1),this.Tw.$h().Qh(t).Eo(i),this.Aw=!1,this.Tw.Fe()}},i.prototype.attach=function(i,n){return void 0===n&&(n=!0),t.prototype.attach.call(this,i,n),ks(i,this.vn,{stroke:this.ia}),this},i}(gH),FH=function(i){function r(n,e,r,s,o,h){var u=i.call(this,n,e,r,s,o,h)||this;u.Mt="Point Line Series",u.Mw=[],u.Aw=!1,u.Fw=!1,u.Lw=3,u.sh=0,u.Iw=t.PointShape.Circle;var a=u.vr.getSeries().length;return u.Ho=new c(Fs(u.vn.seriesPointFillStyle,a)),u.ia=new c(Fs(u.vn.seriesStrokeStyle,a)),u.Tw=u.Cc(n.iS(o,void 0,[LV.UserSeries]).na(u.ia.D(u.Bf))).Uh(Wz.Nearest),u.Ow=u.Cc(n.US(o).$n(u.Ho.D(u.Bf)).Zh(u.Iw).oi(u.Lw)).Uh(Wz.Nearest),u}return n(r,i),r.prototype.setData=function(t){return this.Mw=xH(t),this.Aw=!0,this.xw=kH(this.Mw),this.wf.xn(),this},r.prototype.setStrokeStyle=function(t){this.ia.C(t);var i=this.ia.D(this.Bf);return this.Tw.na(i),this.wf.xn(),this},r.prototype.getStrokeStyle=function(){return this.ia.L()},r.prototype.setStrokeStyleHighlight=function(t){if(this.ia.I(t),this.getHighlighted()){var i=this.ia.D(!0);this.Tw.na(i)}return this.wf.xn(),this},r.prototype.getStrokeStyleHighlight=function(){return this.ia.D(!0)},r.prototype.setPointFillStyle=function(t){this.Ho.C(t);var i=this.Ho.D(this.Bf);return this.Ow.$n(i),this.wf.xn(),this},r.prototype.getPointFillStyle=function(){return this.Ho.L()},r.prototype.setPointFillStyleHighlight=function(t){if(this.Ho.I(t),this.getHighlighted()){var i=this.Ho.D(!0);this.Ow.$n(i)}return this.wf.xn(),this},r.prototype.getPointFillStyleHighlight=function(){return this.Ho.D(!0)},r.prototype.setPointSize=function(t){return this.Lw=t,this.Ow.oi(t),this.wf.xn(),this},r.prototype.getPointSize=function(){return this.Lw},r.prototype.setPointShape=function(t){return this.Iw=t,this.Ow.Zh(this.Iw),this},r.prototype.getPointShape=function(){return this.Iw},r.prototype.setPointRotation=function(t){return this.sh=t,this.Ow.ne(t),this.wf.xn(),this},r.prototype.getPointRotation=function(){return this.sh},r.prototype.setConnectDataAutomaticallyEnabled=function(t){return this.Fw=t,this.wf.xn(),this},r.prototype.getConnectDataAutomaticallyEnabled=function(){return this.Fw},r.prototype.He=function(){return this.MS&&this.Mw.length>0},r.prototype.Ac=function(t,i){t instanceof VE?t.na(this.ia.D(i)):t.$n(this.Ho.D(i)),this.wf.xn()},r.prototype.solveNearestFromScreen=function(t){return this.solveNearestFromSegment(t,this.Tw)},r.prototype.solveNearestFromSegment=function(t,i){var n=i instanceof xE?i.Pw(t):i.Cw(t);if(n){var e=MH(n,this.scale),r=e.angle,s=e.amplitude;return KG(n,this.scale,this.Mg(new _G,this,r,s,this.vr.getAmplitudeAxis().formatValue).Xf(),this,"color"in n&&this.Ho.L()instanceof Ne?new Ee({color:n.color}):this.Ho.L())}},r.prototype.Tf=function(){if(this.Aw||this.scale.Bw()){var t=pH(this.Mw,this.scale),i=Ks(t);this.Fw?(t.push(e({},t[0])),this.Tw.Cu(!0)):this.Tw.Cu(!1),this.Tw.$h().Qh(t).Eo(i),this.Ow.$h().Qh(t).Eo(i),this.Aw=!1,this.Tw.Fe(),this.Ow.Fe()}},r}(gH),TH=function(i){function e(n,e,r,s,o,h){var u=i.call(this,n,e,r,s,o,h)||this;u.Mt="Point Series",u.Mw=[],u.Aw=!1,u.Lw=3,u.sh=0,u.Iw=t.PointShape.Circle;var a=u.vr.getSeries().length;return u.Ho=new c(Fs(u.vn.seriesPointFillStyle,a)),u.Ow=u.Cc(n.US(o).$n(u.Ho.D(u.Bf)).Zh(u.Iw).oi(u.Lw)).Uh(Wz.Nearest),u}return n(e,i),e.prototype.setData=function(t){return this.Mw=xH(t),this.Aw=!0,this.xw=kH(this.Mw),this.wf.xn(),this},e.prototype.setPointFillStyle=function(t){var i,n;this.Ho.C(t);var e=this.Ho.D(this.Bf);try{for(var r=o(this.ic),s=r.next();!s.done;s=r.next()){s.value.$n(e)}}catch(t){i={error:t}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return this.wf.xn(),this},e.prototype.getPointFillStyle=function(){return this.Ho.L()},e.prototype.setPointFillStyleHighlight=function(t){var i,n;if(this.Ho.I(t),this.getHighlighted()){var e=this.Ho.D(!0);try{for(var r=o(this.ic),s=r.next();!s.done;s=r.next()){s.value.$n(e)}}catch(t){i={error:t}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}}return this.wf.xn(),this},e.prototype.getPointFillStyleHighlight=function(){return this.Ho.D(!0)},e.prototype.setPointSize=function(t){var i,n;this.Lw=t;try{for(var e=o(this.ic),r=e.next();!r.done;r=e.next()){r.value.oi(t)}}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=e.return)&&n.call(e)}finally{if(i)throw i.error}}return this.wf.xn(),this},e.prototype.getPointSize=function(){return this.Lw},e.prototype.setPointShape=function(t){var i,n;this.Iw=t;try{for(var e=o(this.ic),r=e.next();!r.done;r=e.next()){r.value.Zh(this.Iw)}}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=e.return)&&n.call(e)}finally{if(i)throw i.error}}return this},e.prototype.getPointShape=function(){return this.Iw},e.prototype.setPointRotation=function(t){var i,n;this.sh=t;try{for(var e=o(this.ic),r=e.next();!r.done;r=e.next()){r.value.ne(t)}}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=e.return)&&n.call(e)}finally{if(i)throw i.error}}return this.wf.xn(),this},e.prototype.getPointRotation=function(){return this.sh},e.prototype.He=function(){return this.MS&&this.Mw.length>0},e.prototype.Ac=function(t,i){t.$n(this.Ho.D(i)),this.wf.xn()},e.prototype.solveNearestFromScreen=function(t){var i=this.Ow.Pw(t);if(i){var n=MH(i,this.scale),e=n.angle,r=n.amplitude;return KG(i,this.scale,this.Mg(new _G,this,e,r,this.vr.getAmplitudeAxis().formatValue).Xf(),this,"color"in i&&this.Ho.L()instanceof Ne?new Ee({color:i.color}):this.Ho.L())}},e.prototype.solveNearestFromSegment=function(t,i){return this.solveNearestFromScreen(t)},e.prototype.Tf=function(){if(this.Aw||this.scale.Bw()){var t=pH(this.Mw,this.scale),i=Ks(t);this.Ow.$h().Qh(t).Eo(i),this.Aw=!1,this.Ow.Fe()}},e.prototype.attach=function(t,n){return void 0===n&&(n=!0),i.prototype.attach.call(this,t,n),ks(t,this.vn,{fill:this.Ho}),this},e}(gH),CH=function(){function t(t,i,n,e,r){this.vr=t,this.Dw=i,this._w=n,this.ZS=e,this.Rw=!1,this._h=r}return t.prototype.setGeometry=function(t){return this.zw=t,this.Rw=!0,this.vr.engine.xn(),this},t.prototype.getGeometry=function(){return this.zw},t.prototype.setMouseInteractions=function(t){return this._h.setMouseInteractions(t),this},t.prototype.dispose=function(){return this._h.dispose(),this.Dw(this),this},t.prototype.isDisposed=function(){return this._h.isDisposed()},t.prototype.restore=function(){return this._h.restore(),this._w(this),this},t}(),BH=function(t,i,n){var e=i.Rt,r=n.Rt,s=(t.x-e.getInnerStart())/(e.getInnerEnd()-e.getInnerStart()),o=(t.y-r.getInnerStart())/(r.getInnerEnd()-r.getInnerStart());return 1===n.dv&&(s=1-s),1===i.dv&&(o=1-o),l(o,s)},LH=function(t){function i(i,n,e,r,s,o,h,u,a){var f=t.call(this,i,n,aV(e.Rt,r.Rt),s,o,a)||this;return f.axisX=e,f.axisY=r,f.Ew=h,f.Nw=u,f.vn=a,f.Vw=f.axisX.Rv(!1,f.Ew).setMouseInteractions(!1).setAllocatesAxisSpace(!1),f.Gw=!1,f.Hw=f.axisY.Rv(!1,f.Nw).setMouseInteractions(!1).setAllocatesAxisSpace(!1),f.jw=!1,f.Ww=!0,f.Uw=!0,f.Yw=!1,f.Xw=!1,f.setGridStrokeYStyle=function(t){return f.Hw.setGridStrokeStyle(t),f},f.getGridStrokeYStyle=function(){return f.Hw.getGridStrokeStyle()},f}return n(i,t),i.prototype.pointAt=function(i){return t.prototype.pointAt.call(this,i),this.setPosition(sr(i.location,i.scale,this.scale)),this},i.prototype.setPosition=function(i){t.prototype.setPosition.call(this,i),this.Vw.setValue(i.x),this.Hw.setValue(i.y);var n=BH(l(this.Vw.getValue(),this.Hw.getValue()),this.axisX,this.axisY);return this.Vw.setGridStrokeLength(this.Yw?n.x:1),this.Hw.setGridStrokeLength(this.Xw?n.y:1),this},i.prototype.Tf=function(){!this.isDisposed()&&this.Xb?(this.Vw.restore(),this.Hw.restore()):(this.Vw.dispose(),this.Hw.dispose());var i=BH(l(this.Vw.getValue(),this.Hw.getValue()),this.axisX,this.axisY);return this.Vw.setGridStrokeLength(this.Yw?i.x:1),this.Hw.setGridStrokeLength(this.Xw?i.y:1),t.prototype.Tf.call(this)},i.prototype.dispose=function(){return t.prototype.dispose.call(this),this.Vw.dispose(),this.Hw.dispose(),this},i.prototype.restore=function(){return t.prototype.restore.call(this),this.Vw.restore(),this.Hw.restore(),this},i.prototype.setGridStrokeXCut=function(t){return this.Yw=t,this.wf.xn(),this},i.prototype.getGridStrokeXCut=function(){return this.Yw},i.prototype.setGridStrokeYCut=function(t){return this.Xw=t,this.wf.xn(),this},i.prototype.getGridStrokeYCut=function(){return this.Xw},i.prototype.setGridStrokeXStyle=function(t){return this.Vw.setGridStrokeStyle(t),this},i.prototype.getGridStrokeXStyle=function(){return this.Vw.getGridStrokeStyle()},i.prototype.disposeTickMarkerX=function(){return this.Vw.disposeMarker(),this.wf.xn(),this},i.prototype.restoreTickMarkerX=function(){return this.Vw.restoreMarker(),this.wf.xn(),this},i.prototype.isDisposedTickMarkerX=function(){return this.Vw.isDisposedMarker()},i.prototype.disposeTickMarkerY=function(){return this.Hw.disposeMarker(),this.wf.xn(),this},i.prototype.restoreTickMarkerY=function(){return this.Hw.restoreMarker(),this.wf.xn(),this},i.prototype.isDisposedTickMarkerY=function(){return this.Hw.isDisposedMarker()},i.prototype.setTickMarkerX=function(t){return this.Vw.setMarker(t),this},i.prototype.setTickMarkerY=function(t){return this.Hw.setMarker(t),this},i.prototype.getTickMarkerX=function(){return this.Vw.getMarker()},i.prototype.getTickMarkerY=function(){return this.Hw.getMarker()},i}(NG),IH=function(t){function i(i,n,e,r,s,o,h,u){var a=t.call(this,i,n,e,r,s,u)||this;return a.jb=r,a.Wb=s,a.Ew=o,a.Nw=h,a.vn=u,a.Yw=!1,a.Xw=!1,a.Zw=a.vn.customTickGridStrokeStyle,a.Kw=a.vn.customTickGridStrokeStyle,a.qw=!1,a.Jw=!1,a.Qw=new Map,a.$w=new Map,a.tp=!1,a.ip=!1,a.vn.pointMarkerHorizontalGridStrokeStyle&&a.setGridStrokeXStyle(a.vn.pointMarkerHorizontalGridStrokeStyle),a.vn.pointMarkerVerticalGridStrokeStyle&&a.setGridStrokeYStyle(a.vn.pointMarkerVerticalGridStrokeStyle),a}return n(i,t),i.prototype.Tf=function(){return this.np&&this.ep&&(!this.isDisposed()&&this.Xb?(this.ep.restore(),this.np.restore()):(this.ep.dispose(),this.np.dispose())),t.prototype.Tf.call(this)},i.prototype.restore=function(){return t.prototype.restore.call(this),this.np&&this.np.restore(),this.ep&&this.ep.restore(),this},i.prototype.dispose=function(){return this.isDisposed()||(t.prototype.dispose.call(this),this.np&&this.np.dispose(),this.ep&&this.ep.dispose()),this},i.prototype.pointAt=function(i){var n=i.location,e=i.series,r=e.axisX,s=e.axisY,o=this.Rn(r,!0),h=this.Rn(s,!1);o!==this.np&&this.np&&(this.np.dispose(),o.restore()),h!==this.ep&&this.ep&&(this.ep.dispose(),h.restore()),o.setValue(n.x),h.setValue(n.y);var u=BH(l(n.x,n.y),r,s);return o.setGridStrokeLength(this.Yw?u.x:1),h.setGridStrokeLength(this.Xw?u.y:1),this.np=o,this.ep=h,t.prototype.pointAt.call(this,i)},i.prototype.Jb=function(i){if(t.prototype.Jb.call(this,i),i){var n=function(t){return t.setTextFillStyle(i)};this.np&&this.qw&&this.np.setMarker(n),this.ep&&this.Jw&&this.ep.setMarker(n)}},i.prototype.Rn=function(t,i){var n=(i?this.Qw:this.$w).get(t);return n||(i?(n=t.Rv(!1,this.Ew),this.Qw.set(t,n)):(n=t.Rv(!1,this.Nw),this.$w.set(t,n)),this.Te(n,i),n.setMouseInteractions(!1).setAllocatesAxisSpace(!1)),n},i.prototype.Te=function(t,i){var n=i?this.Zw:this.Kw;return t.setGridStrokeStyle(n),t.setMouseInteractions(!1),(i?this.tp:this.ip)?t.disposeMarker():t.restoreMarker(),t},i.prototype.setGridStrokeXCut=function(t){return this.Yw=t,this.wf.xn(),this},i.prototype.getGridStrokeXCut=function(){return this.Yw},i.prototype.setGridStrokeYCut=function(t){return this.Xw=t,this.wf.xn(),this},i.prototype.getGridStrokeYCut=function(){return this.Xw},i.prototype.setGridStrokeXStyle=function(t){var i=this;return this.Zw=t instanceof Function?t(this.getGridStrokeXStyle()):t,this.Qw.forEach((function(t){return t.setGridStrokeStyle(i.Zw)})),this},i.prototype.getGridStrokeXStyle=function(){return this.Zw},i.prototype.setGridStrokeYStyle=function(t){var i=this;return this.Kw=t instanceof Function?t(this.getGridStrokeYStyle()):t,this.$w.forEach((function(t){return t.setGridStrokeStyle(i.Kw)})),this},i.prototype.getGridStrokeYStyle=function(){return this.Kw},i.prototype.disposeTickMarkerX=function(){return this.Qw.forEach((function(t){return t.disposeMarker()})),this.tp=!0,this},i.prototype.restoreTickMarkerX=function(){return this.Qw.forEach((function(t){return t.restoreMarker()})),this.tp=!1,this},i.prototype.isDisposedTickMarkerX=function(){return this.tp},i.prototype.disposeTickMarkerY=function(){return this.$w.forEach((function(t){return t.disposeMarker()})),this.ip=!0,this},i.prototype.restoreTickMarkerY=function(){return this.$w.forEach((function(t){return t.restoreMarker()})),this.ip=!1,this},i.prototype.isDisposedTickMarkerY=function(){return this.ip},i.prototype.setTickMarkerX=function(t){return this.Qw.forEach((function(i){return i.setMarker(t)})),this.Ew=this.Ew.addStyler(t),this.wf.xn(),this},i.prototype.setTickMarkerY=function(t){return this.$w.forEach((function(i){return i.setMarker(t)})),this.Nw=this.Nw.addStyler(t),this.wf.xn(),this},i.prototype.setTickMarkerXAutoTextStyle=function(t){return this.qw=t,this.wf.xn(),this},i.prototype.getTickMarkerXAutoTextStyle=function(){return this.qw},i.prototype.setTickMarkerYAutoTextStyle=function(t){return this.Jw=t,this.wf.xn(),this},i.prototype.getTickMarkerYAutoTextStyle=function(){return this.Jw},i}(EG),OH=function(t){function i(i,n,e,r,s){var o=t.call(this,i,n,s)||this;return o.jb=i,o.Wb=n,o.Ew=e,o.Nw=r,o.Qb=s,o}return n(i,t),i}(VG),PH=function(t){function i(){var n=null!==t&&t.apply(this,arguments)||this;return n.tg=function(t,i,e,r){return n.$b(new IH(t,i,e,n.jb,n.Wb,n.Ew,n.Nw,r))},n.addStyler=function(t){return new i(n.jb,n.Wb,n.Ew,n.Nw,n.Qb.map((function(t){return t})).concat(t))},n.setPointMarker=function(t){return new i(t,n.Wb,n.Ew,n.Nw,n.Qb.map((function(t){return t})))},n.setResultTableBackground=function(t){return new i(n.jb,t,n.Ew,n.Nw,n.Qb.map((function(t){return t})))},n}return n(i,t),i}(OH),DH=function(t){function i(){var n=null!==t&&t.apply(this,arguments)||this;return n.ig=function(t,i,e,r,s){return n.$b(new LH(t,i,e,r,n.jb,n.Wb,n.Ew,n.Nw,s))},n.addStyler=function(t){return new i(n.jb,n.Wb,n.Ew,n.Nw,n.Qb.map((function(t){return t})).concat(t))},n.setPointMarker=function(t){return new i(t,n.Wb,n.Ew,n.Nw,n.Qb.map((function(t){return t})))},n.setResultTableBackground=function(t){return new i(n.jb,t,n.Ew,n.Nw,n.Qb.map((function(t){return t})))},n}return n(i,t),i}(OH),_H=WG,RH=new PH(pN,pN,eV.PointableTextBox,eV.PointableTextBox,[function(t){jG(t)}]),zH=new DH(xN,pN,eV.PointableTextBox,eV.PointableTextBox,[_H]),EH=function(i,n,e){switch(i){case t.UIVisibilityModes.always:return!0;case t.UIVisibilityModes.never:return!1;case t.UIVisibilityModes.whenDragged:return e;case t.UIVisibilityModes.whenHovered:return n&&!e;case t.UIVisibilityModes.whenHoveredOrDragged:return e||n;case t.UIVisibilityModes.whenNotDragged:return!e;default:return!1}},NH=function(t,i){return Math.min(Math.max(t,i.getInnerStart()),i.getInnerEnd())},VH=function(){function i(i,n,e,r,s,o){var h=this;this.wf=i,this.renderingScale=n,this.scale=e,this.Dg=r,this.rp=s,this.sp=o,this.op=t.UIVisibilityModes.always,this.hp=t.UIVisibilityModes.always,this.lo=!0,this.up=!1,this.ap=!1,this.th=l(0,0),this.pf=t.UIDraggingModes.draggable,this.kf=void 0,this.an=new qe,this.fp=function(i,n,e){h.up=!0,h.wf.xn();var r=h.pf===t.UIDraggingModes.notDraggable?h.pf:e||h.pf;h.kf=h.wf.oo.Qr(r===t.UIDraggingModes.notDraggable?t.MouseStyles.Restricted:r===t.UIDraggingModes.draggable?t.MouseStyles.Move:r===t.UIDraggingModes.onlyHorizontal?t.MouseStyles.Horizontal:t.MouseStyles.Vertical)},this.cp=function(){h.up=!1,h.wf.xn(),h.wf.oo.ts(h.kf)},this.lp=function(t,i){h.ap=!0,ss(i),h.wf.xn()},this.dp=function(i,n){if(h.pf!==t.UIDraggingModes.notDraggable){var e=n||h.pf,r=sr(h.wf.oo.ds(i.x,i.y),h.wf.oo.Rt,h.scale),s=l(e!==t.UIDraggingModes.onlyVertical?NH(r.x,h.scale.x):h.th.x,e!==t.UIDraggingModes.onlyHorizontal?NH(r.y,h.scale.y):h.th.y);return h.setPosition(s),!0}return!1},this.vp=function(t,i){h.ap=!1,ss(i),h.wf.xn()};var u=r.getPointMarker().setMouseInteractions(!0);u.onMouseEnter(this.fp),u.onMouseLeave(this.cp),u.onMouseDragStart(this.lp),u.onMouseDrag((function(t,i){return h.dp(l(i.clientX,i.clientY))&&ss(i)})),u.onMouseDragStop(this.vp),u.onTouchStart(this.lp),u.onTouchMove((function(t,i){return h.dp(l(i.clientX,i.clientY))&&ss(i)})),u.onTouchEnd(this.vp),r.getResultTable().setMouseInteractions(!0),this.setPosition(this.th)}return i.prototype.setPosition=function(t){return this.th=t,this.Dg.setPosition(t),this.an.emit("positionChange",this,this.th),this},i.prototype.getPosition=function(){return this.th},i.prototype.onPositionChange=function(t){return this.an.on("positionChange",t)},i.prototype.offPositionChange=function(t){return this.an.off(t,"positionChange")},i.prototype.setPointMarkerVisibility=function(t){return this.op=t,this.wf.xn(),this},i.prototype.getPointMarkerVisibility=function(){return this.op},i.prototype.setResultTableVisibility=function(t){return this.hp=t,this.wf.xn(),this},i.prototype.getResultTableVisibility=function(){return this.hp},i.prototype.setMouseInteractions=function(t){return this.lo=t,this.Dg.getPointMarker().setMouseInteractions(t),this.Dg.getResultTable().setMouseInteractions(t),this},i.prototype.getMouseInteractions=function(){return this.lo},i.prototype.setAutoFitStrategy=function(t){return this.Dg.setAutoFitStrategy(t),this},i.prototype.getAutoFitStrategy=function(){return this.Dg.getAutoFitStrategy()},i.prototype.isAttached=function(){return!0},i.prototype.Tf=function(){var t=this.isAttached();return EH(this.op,this.up,this.ap)?this.Dg.restorePointMarker():this.Dg.disposePointMarker(),t&&EH(this.hp,this.up,this.ap)?this.Dg.restoreResultTable():this.Dg.disposeResultTable(),this.Dg.Tf(),this},i.prototype.Fe=function(){return this.Dg.Fe(),this},i.prototype.pointAt=function(t){return this.Dg.pointAt(t),this},i.prototype.dispose=function(){return this.rp(this),this.Dg.dispose(),this},i.prototype.restore=function(){return this.sp(this),this.Dg.restore(),this},i.prototype.isDisposed=function(){return this.Dg.isDisposed()},i.prototype.setPointMarker=function(t){return this.Dg.setPointMarker(t),this},i.prototype.getPointMarker=function(){return this.Dg.getPointMarker()},i.prototype.setResultTable=function(t){return this.Dg.setResultTable(t),this},i.prototype.getResultTable=function(){return this.Dg.getResultTable()},i.prototype.setDraggingMode=function(i){return void 0===i&&(i=t.UIDraggingModes.notDraggable),this.pf=i,this.wf.xn(),this},i.prototype.getDraggingMode=function(){return this.pf},i}(),GH=function(t){function i(i,n,e,r,s,o,h){var u=t.call(this,i,n,e,r.ig(i,n,e,h),s,o)||this;return u.wf=i,u.rp=s,u.sp=o,u.vn=h,u}return n(i,t),i}(VH),HH=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return n(i,t),i}(function(i){function e(n,e,r,s,o,h,u,a){var f=i.call(this,n,e,aV(r.Rt,s.Rt),o.ig(n,e,r,s,a),h,u)||this;f.wf=n,f.axisX=r,f.axisY=s,f.rp=h,f.sp=u,f.yp=t.UIVisibilityModes.always,f.Sp=t.UIVisibilityModes.always,f.mp=t.UIVisibilityModes.always,f.bp=t.UIVisibilityModes.always,f.gridStrokeStyleX=f.Dg.getGridStrokeXStyle(),f.gridStrokeStyleY=f.Dg.getGridStrokeYStyle(),f.vn=a;var c=f.Dg.getTickMarkerX().setMouseInteractions(!0);c.onMouseEnter((function(i,n){return f.fp(i,n,t.UIDraggingModes.onlyHorizontal)})),c.onMouseLeave(f.cp),c.onMouseDragStart(f.lp),c.onMouseDrag((function(i,n){return f.dp(l(n.clientX,n.clientY),t.UIDraggingModes.onlyHorizontal)&&ss(n)})),c.onMouseDragStop(f.vp),c.onTouchStart(f.lp),c.onTouchMove((function(i,n){return f.dp(l(n.clientX,n.clientY),t.UIDraggingModes.onlyHorizontal)&&ss(n)}));var d=f.Dg.getTickMarkerY().setMouseInteractions(!0);return d.onMouseEnter((function(i,n){return f.fp(i,n,t.UIDraggingModes.onlyVertical)})),d.onMouseLeave(f.cp),d.onMouseDragStart(f.lp),d.onMouseDrag((function(i,n){return f.dp(l(n.clientX,n.clientY),t.UIDraggingModes.onlyVertical)&&ss(n)})),d.onMouseDragStop(f.vp),d.onTouchStart(f.lp),d.onTouchMove((function(i,n){return f.dp(l(n.clientX,n.clientY),t.UIDraggingModes.onlyVertical)&&ss(n)})),a.pointMarkerTextFillStyle&&(d.setTextFillStyle(a.pointMarkerTextFillStyle),c.setTextFillStyle(a.pointMarkerTextFillStyle)),f}return n(e,i),e.prototype.Tf=function(){var t=this.isAttached();return!this.isDisposed()&&t&&EH(this.mp,this.up,this.ap)?this.Dg.restoreTickMarkerX():this.Dg.disposeTickMarkerX(),!this.isDisposed()&&t&&EH(this.bp,this.up,this.ap)?this.Dg.restoreTickMarkerY():this.Dg.disposeTickMarkerY(),this.Dg.setGridStrokeXStyle(!this.isDisposed()&&t&&EH(this.yp,this.up,this.ap)?this.gridStrokeStyleX:ir),this.Dg.setGridStrokeYStyle(!this.isDisposed()&&t&&EH(this.Sp,this.up,this.ap)?this.gridStrokeStyleY:ir),i.prototype.Tf.call(this)},e.prototype.setGridStrokeXVisibility=function(t){return this.yp=t,this.wf.xn(),this},e.prototype.getGridStrokeXVisibility=function(){return this.yp},e.prototype.setGridStrokeYVisibility=function(t){return this.Sp=t,this.wf.xn(),this},e.prototype.getGridStrokeYVisibility=function(){return this.Sp},e.prototype.setTickMarkerXVisibility=function(t){return this.mp=t,this.wf.xn(),this},e.prototype.getTickMarkerXVisibility=function(){return this.mp},e.prototype.setTickMarkerYVisibility=function(t){return this.bp=t,this.wf.xn(),this},e.prototype.getTickMarkerYVisibility=function(){return this.bp},e.prototype.setGridStrokeXCut=function(t){return this.Dg.setGridStrokeXCut(t),this},e.prototype.getGridStrokeXCut=function(){return this.Dg.getGridStrokeXCut()},e.prototype.setGridStrokeYCut=function(t){return this.Dg.setGridStrokeYCut(t),this},e.prototype.getGridStrokeYCut=function(){return this.Dg.getGridStrokeYCut()},e.prototype.setGridStrokeXStyle=function(t){return this.gridStrokeStyleX=t instanceof $e?t:t(this.gridStrokeStyleX),this},e.prototype.getGridStrokeXStyle=function(){return this.Dg.getGridStrokeXStyle()},e.prototype.setGridStrokeYStyle=function(t){return this.gridStrokeStyleY=t instanceof $e?t:t(this.gridStrokeStyleY),this},e.prototype.getGridStrokeYStyle=function(){return this.Dg.getGridStrokeYStyle()},e.prototype.setTickMarkerX=function(t){return this.Dg.setTickMarkerX(t),this},e.prototype.getTickMarkerX=function(){return this.Dg.getTickMarkerX()},e.prototype.setTickMarkerY=function(t){return this.Dg.setTickMarkerY(t),this},e.prototype.getTickMarkerY=function(){return this.Dg.getTickMarkerY()},e.prototype.setMouseInteractions=function(t){return i.prototype.setMouseInteractions.call(this,t),this.Dg.getTickMarkerX().setMouseInteractions(t),this.Dg.getTickMarkerY().setMouseInteractions(t),this},e}(VH)),jH=function(t){function i(i,n,e,r,s,o,h){var u=t.call(this,i,n,e.axisX,e.axisY,r,s,o,h)||this;return u.wf=i,u.owningSeries=e,u.rp=s,u.sp=o,u.gp=!1,u.vn=h,u}return n(i,t),i.prototype.setPosition=function(i){return t.prototype.setPosition.call(this,i),this.gp=!1,this.wf.xn(),this},i.prototype.Fe=function(){if(!this.gp){var i=this.owningSeries.solveNearestFromScreen(sr(this.th,this.scale,this.wf.oo.Rt));i?(this.th=sr(i.location,this.owningSeries.scale,this.scale),this.Dg.pointAt(i),this.gp=!0):this.Dg.setPosition(this.th)}return t.prototype.Fe.call(this)},i.prototype.isAttached=function(){return this.gp},i}(HH),WH=function(t){function i(i,n,e,r,s,o,h,u,a,f){var c=t.call(this,i,n,e,f)||this;return c.chart=i,c.wf=r,c.axisX=s,c.axisY=o,c.axisXAttachHandler=h,c.axisYAttachHandler=u,c.qv=a,c.wp=[],c.addMarker=function(t){void 0===t&&(t=zH);var i=new jH(c.qv(),c.vr.uiScale,c,t,c.removeMarker,c.restoreMarker,c.vn);return c.wp.push(i),i},c.removeMarker=function(t){var i=c.wp.indexOf(t);-1!==i&&c.wp.splice(i,1)},c.restoreMarker=function(t){c.wp.includes(t)||c.wp.push(t)},c.vn=f,c.scale=aV(s.Rt,o.Rt),c.pp(c.scale),c.attacheAxis(),c}return n(i,t),i.prototype.attacheAxis=function(){this.kp=this.axisXAttachHandler(this),this.xp=this.axisYAttachHandler(this)},i.prototype.Tf=function(){t.prototype.Tf.call(this);for(var i=0;i<this.wp.length;i+=1)this.wp[i].Fe().Tf()},i.prototype.dispose=function(){t.prototype.dispose.call(this);var i=this.wp.slice();return i.forEach(Tr),this.wp=i,this.kp(this),this.xp(this),this},i.prototype.restore=function(){return this.attacheAxis(),this.wp.forEach(Fr),t.prototype.restore.call(this)},i.prototype.Mp=function(){for(var t=0;t<this.wp.length;t+=1)this.wp[t].setPosition(this.wp[t].getPosition());this.wf.xn()},i.prototype.getBoundaries=function(){return b(l(this.getXMin()||0,this.getYMin()||0),l(this.getXMax()||0,this.getYMax()||0))},i}(bH),UH=function(t,i,n,e){var r=t.length,s=0;if(void 0!==i){var o=n-i;if(o>0){var h=t.slice(s,o);s+=o,e(h,!0)}}for(;s<r;){var u=t.slice(s,s+n);s+=n,e(u,!1)}},YH=function(t,i){void 0===i&&(i=function(t){return t});for(var n,e=[],r=0;r<t.length;r+=1){var s=i((n=t[r]).Xh()),o=n.Yh(),h=o?i(o):[],u=!1,a=!1;"Tu"in n&&(u=n.Tu(),a=n.Bu()),e.push.apply(e,s.slice(u?1:0,s.length-(a&&0===h.length?1:0))),e.push.apply(e,h.slice(u&&0===s.length?1:0,h.length-(a?1:0)))}return e},XH=function(t,i,n){void 0===i&&(i=1);for(var e=void 0!==n?n:0,r=new Array(t.length),s=0;s<t.length;s+=1)r[s]={x:e+i*s,y:t[s]};return r},ZH=function(t,i,n,e){return t.addRow(i.getName()).addRow("X",i.axisX.formatValue(n)).addRow("Y",i.axisY.formatValue(e))},KH=function(i){function e(n,e,r,s,o,h,u,a,f,c,l){var d=i.call(this,n,e,r,s,o,h,u,a,f,l)||this;return d.Ap=c,d.aa=[],d.Fp=0,d.vo=!1,d.tc=t.HighlightModes.onHover,d.Mg=ZH,d}return n(e,i),e.prototype.setDataCleaning=function(t){return this.setMaxPointCount(t&&t.minDataPointCount),this.wf.xn(),this},e.prototype.add=function(t){if(Array.isArray(t)?this.PS(t):this.PS([t]),this.aa.length>0){var i=this.aa[this.aa.length-1];this.Tp={x:i.x,y:i.y}}return this},e.prototype.addArrayX=function(t,i,n){void 0===i&&(i=1);var e=n;return e||(e=this.Tp?this.Tp.y+i:0),this.add(function(t,i,n){void 0===i&&(i=1);for(var e=void 0!==n?n:0,r=new Array(t.length),s=0;s<t.length;s+=1)r[s]={x:t[s],y:e+i*s};return r}(t,i,e)),this},e.prototype.addArrayY=function(t,i,n){void 0===i&&(i=1),void 0===n&&(n=0);var e=n;return e||(e=this.Tp?this.Tp.x+i:0),this.add(XH(t,i,e)),this},e.prototype.addArraysXY=function(t,i){if(t.length!==i.length)throw new Error("arrayX and arrayY lengths are not equal");return this.add(function(t,i){for(var n=new Array(t.length),e=0;e<t.length;e+=1)n[e]={x:t[e],y:i[e]};return n}(t,i)),this},e.prototype.setCursorResultTableFormatter=function(t){return this.Mg=t,this.vr.engine.xn(),this},e.prototype.getCursorResultTableFormatter=function(){return this.Mg},e.prototype.setMaxPointCount=function(t){return this.Fp=void 0!==t&&t>0?t:0,this.wf.xn(),this},e.prototype.getMaxPointCount=function(){return this.Fp>0?this.Fp:void 0},e.prototype.getPointAmount=function(){return this.ic.reduce((function(t,i){return t+i.tu()+i.iu()}),this.aa.length)},e.prototype.clear=function(){this._S=void 0;for(var t=0;t<this.ic.length;t+=1)this.ic[t].$h();return this.aa.length=0,this.nc=0,this.Tp=void 0,this.wf.xn(),this.an.emit("dataClear",this),this},e.prototype.getLastPoint=function(){return this.Tp},e.prototype.He=function(){return this.MS&&this.getPointAmount()>0},e.prototype.getXMax=function(){return this.Ap.getXMax(this.ic,this._S)||0},e.prototype.getXMin=function(){return this.Ap.getXMin(this.ic,this._S)||0},e.prototype.getYMax=function(){return this.Ap.getYMax(this.ic,this._S)||0},e.prototype.getYMin=function(){return this.Ap.getYMin(this.ic,this._S)||0},e.prototype.eS=function(){var t,i,n=l(0,0);try{for(var e=o(this.ic),r=e.next();!r.done;r=e.next()){var s=r.value;n.x=Math.max(n.x,s.cu()),n.y=Math.max(n.y,s.lu())}}catch(i){t={error:i}}finally{try{r&&!r.done&&(i=e.return)&&i.call(e)}finally{if(t)throw t.error}}return n},e.prototype.Cp=function(t,i,n,e){this.Ap.Cp(t,i,n,e,this.scale)},e.prototype.CS=function(){i.prototype.CS.call(this);var t=this.ic.length;this.Bp&&this.Cp(this.ic,this.getPointAmount(),this.Bp,this.Fp),t!==this.ic.length&&this.Mp()},e.prototype.Tf=function(){var t,n;i.prototype.Tf.call(this);var e=this.getBoundaries();this.aa.length>0&&(this.DS(this.aa),this.aa=[]);try{for(var r=o(this.ic),s=r.next();!s.done;s=r.next()){s.value.Eo(e)}}catch(i){t={error:i}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return i.prototype.Tf.call(this)},e.prototype.BS=function(){this._S=void 0,this.aa.length=0},e.prototype.PS=function(t){0!==t.length&&(this._S?this._S=Js(this._S,Ks(t)):this._S=Ks(t),this.an.emit("dataAdd",this,t,this._S),this.aa=ps(this.aa,t,{canReturnB:!1}),this.wf.xn())},e.prototype.Lp=function(){return YH(this.ic)},e.prototype.Ip=function(t){return this.an.on("dataAdd",t)},e.prototype.Op=function(t){return this.an.off(t)},e.prototype.Pp=function(t){return this.an.on("dataClear",t)},e.prototype.Dp=function(t){return this.an.off(t)},e}(WH),qH=function(t,i,n,e){for(var r,s,o=Number.MAX_VALUE,h=0;h<i.length;h+=1){var u=i[h],a=n(u,t);if(a){var f=e(t,a);(void 0===r||f<o)&&(r=a,s=u,o=f)}}return r&&s?[r,s]:void 0},JH=function(t){function i(i,n,e,r,s,o){var h=t.call(this,i,n,e,r,s,o)||this;h.Mt="Polygon Series",h._p=[],h.Rp=function(t){var i=h._p.indexOf(t);i>=0&&h._p.splice(i,1),h.wf.xn()},h.zp=function(t){h._p.indexOf(t)<0&&h._p.push(t),h.wf.xn()};var u=h.vr.getSeries().length;return h.Ho=new c(Fs(h.vn.mountainsFillStyle,u)),h.Zo=new c(Fs(h.vn.mountainsStrokeStyle,u)),h}return n(i,t),i.prototype.addPolygon=function(){var t=new CH(this.vr,this.Rp,this.zp,this,this.Ep());return this._p.push(t),t},i.prototype.setFillStyle=function(t){var i,n;this.Ho.C(t);var e=this.Ho.D(this.Bf);try{for(var r=o(this.ic),s=r.next();!s.done;s=r.next()){s.value.$n(e)}}catch(t){i={error:t}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return this.wf.xn(),this},i.prototype.getFillStyle=function(){return this.Ho.L()},i.prototype.setFillStyleHighlight=function(t){var i,n;if(this.Ho.I(t),this.getHighlighted()){var e=this.Ho.D(!0);try{for(var r=o(this.ic),s=r.next();!s.done;s=r.next()){s.value.$n(e)}}catch(t){i={error:t}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}}return this.wf.xn(),this},i.prototype.getFillStyleHighlight=function(){return this.Ho.D(!0)},i.prototype.setStrokeStyle=function(t){var i,n;this.Zo.C(t);var e=this.Zo.D(this.Bf);try{for(var r=o(this.ic),s=r.next();!s.done;s=r.next()){s.value.Ys(e)}}catch(t){i={error:t}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return this.wf.xn(),this},i.prototype.getStrokeStyle=function(){return this.Zo.L()},i.prototype.setStrokeStyleHighlight=function(t){var i,n;if(this.Zo.I(t),this.getHighlighted()){var e=this.Zo.D(!0);try{for(var r=o(this.ic),s=r.next();!s.done;s=r.next()){s.value.Ys(e)}}catch(t){i={error:t}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}}return this.wf.xn(),this},i.prototype.getStrokeStyleHighlight=function(){return this.Zo.D(!0)},i.prototype.He=function(){return this.MS&&void 0!==this._p.find((function(t){return void 0!==t.Np}))},i.prototype.Tf=function(){var t=this;this._p.forEach((function(i){(i.Rw||t.scale.Bw())&&i.Vp&&(i._h.au(pH(i.Vp,t.scale)),i.Rw=!1,i._h.Fe())}))},i.prototype.CS=function(){t.prototype.CS.call(this);var i=b(Is,Os);this._p.forEach((function(t){if(t.zw){var n=!t.Rw&&t.Vp?t.Vp:xH(t.zw);t.Vp=n;var e=!t.Rw&&t.Np?t.Np:kH(n);t.Np=e,i.min=Math.min(i.min,e.min),i.max=Math.max(i.max,e.max)}})),this.xw=i},i.prototype.Ac=function(t,i){t.$n(this.Ho.D(i)).Ys(this.Zo.D(i)),this.wf.xn()},i.prototype.solveNearestFromScreen=function(t){var i=this,n=qH(t,this.ic,(function(t,n){var e=t.Pw(n);if(e)return sr(e,i.scale,t.oo.Rt)}),Hs);if(n){var e=sr(n[0],n[1].oo.Rt,this.scale),r=this.Gp(n[1]);if(r){var s=MH(e,this.scale),o=s.angle,h=s.amplitude;return{location:e,scale:this.scale,resultTableContent:this.Mg(new _G,this,o,h,this.vr.getAmplitudeAxis().formatValue).Xf(),series:this,fillStyle:this.Ho.L(),polarPolygon:r}}}},i.prototype.solveNearestFromSegment=function(t,i){var n=this.Gp(i);if(n){var e=i.Pw(t);if(e){var r=MH(e,this.scale),s=r.angle,o=r.amplitude;return{location:e,scale:this.scale,resultTableContent:this.Mg(new _G,this,s,o,this.vr.getAmplitudeAxis().formatValue).Xf(),series:this,fillStyle:this.Ho.L(),polarPolygon:n}}}},i.prototype.attach=function(i,n){return void 0===n&&(n=!0),t.prototype.attach.call(this,i,n),ks(i,this.vn,{fill:this.Ho,stroke:this.Zo}),this},i.prototype.Ep=function(){return this.Cc(this.wf.Rc(this.scale,CE.Simple).$n(this.Ho.D(this.Bf)).Ys(this.Zo.D(this.Bf)))},i.prototype.Gp=function(t){return this._p.find((function(i){return i._h===t}))},i}(gH),QH=function(t){function i(i,n,e,r,s,o){var h=t.call(this,i,n,e,r,s,o)||this;h.Mt="Area Series",h.Mw=[],h.Aw=!1,h.Fw=!1,h.Hp=!1;var u=h.vr.getSeries().length;return h.Ho=new c(Ts(h.vn.polarAreaSeriesFillStyle,u,h.vn.mountainsFillStyle)),h.Zo=new c(Ts(h.vn.polarAreaSeriesStrokeStyle,u,h.vn.mountainsStrokeStyle)),h}return n(i,t),i.prototype.setData=function(t){var i=function(t){for(var i,n,e=[],r=!1,s=0;s<t.length;s+=1){var o=t[s],h=!0;if(i){h=!1;var u=o.angle-i.angle;if(Br(u,0))h=!0;else{var a=Math.sign(u);void 0===n?(n=a,h=!0):n===a&&(h=!0)}}h?e.push(o):r=!0,i=o}return{progressivePoints:e,userDataModified:r}}(t);return i.userDataModified&&!1===this.Hp&&(console.warn(this.Mt+" setData data format is faulty. Consecutive 'angle' values should progress in the same direction! Invalid data points have been removed."),this.Hp=!0),this.Mw=i.progressivePoints,this.Aw=!0,this.xw=kH(this.Mw),this.wf.xn(),this},i.prototype.setFillStyle=function(t){return this.Ho.C(t),this.wf.xn(),this},i.prototype.getFillStyle=function(){return this.Ho.L()},i.prototype.setFillStyleHighlight=function(t){return this.Ho.I(t),this.wf.xn(),this},i.prototype.getFillStyleHighlight=function(){return this.Ho.D(!0)},i.prototype.setStrokeStyle=function(t){return this.Zo.C(t),this.wf.xn(),this},i.prototype.getStrokeStyle=function(){return this.Zo.L()},i.prototype.setStrokeStyleHighlight=function(t){return this.Zo.I(t),this.wf.xn(),this},i.prototype.getStrokeStyleHighlight=function(){return this.Zo.D(!0)},i.prototype.setConnectDataAutomaticallyEnabled=function(t){return this.Fw=t,this.wf.xn(),this},i.prototype.getConnectDataAutomaticallyEnabled=function(){return this.Fw},i.prototype.He=function(){return this.MS&&this.Mw.length>0},i.prototype.attach=function(i,n){return void 0===n&&(n=!0),t.prototype.attach.call(this,i,n),ks(i,this.vn,{fill:this.Ho,stroke:this.Zo}),this},i}(gH),$H=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.jp=i.Cc(i.wf.Rc(i.scale,CE.Simple)),i}return n(i,t),i.prototype.Tf=function(){if(this.Aw||this.scale.Bw()){var t=this.Mw,i=!0===this.Fw?pH(t.concat(function(t){if(0===t.length)return t;var i=t[0],n=t[t.length-1];if(Br(i.angle,n.angle))return t;for(var e=1*Math.sign(n.angle-i.angle),r=0,s=[],o=n.angle+e;!Br(o%360,i.angle%360);o+=e)if(s.push({angle:o,amplitude:0}),(r+=1)>360)return[];for(var h=0;h<s.length;h+=1)s[h].amplitude=ru(n.amplitude,i.amplitude,(h+1)/(s.length+1));return s}(t)),this.scale):u(u([],h(pH(t,this.scale))),[{x:0,y:0}]);this.jp.au(i).$n(this.Ho.D(this.Bf)).Ys(this.Zo.D(this.Bf)),this.Aw=!1,this.jp.Fe()}},i.prototype.Ac=function(t,i){t.$n(this.Ho.D(i)).Ys(this.Zo.D(i)),this.wf.xn()},i.prototype.solveNearestFromScreen=function(t){var i=this.jp.Pw(t);if(i){var n=MH(i,this.scale),e=n.angle,r=n.amplitude;return KG(i,this.scale,this.Mg(new _G,this,e,r,this.vr.getAmplitudeAxis().formatValue).Xf(),this,this.Ho.L())}},i.prototype.solveNearestFromSegment=function(t,i){return this.solveNearestFromScreen(t)},i}(QH),tj=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.$i="RadialScale",i.Wp={start:0,end:1},i.Yp=!1,i.Xp=0,i.hi=l(0,0),i.Zp=[0,0],i.Kp=[0,0],i.t=!0,i.Ii=!0,i.qp=!0,i.Jp=!0,i.Qp={x:0,y:0},i.Ai={x:{displacement:0,scaling:0,highPrecisionOffset:0},y:{displacement:0,scaling:0,highPrecisionOffset:0}},i}return n(i,t),i.prototype.rw=function(t,i){return t===this.Wp.start&&i===this.Wp.end||(this.Wp={start:t,end:i},this.qp=!0,this.$p()),this},i.prototype.ew=function(){return this.Wp},i.prototype.nw=function(){return this.Wp.end>=this.Wp.start},i.prototype.cw=function(t){this.Yp=t,this.Jp=!0},i.prototype.dw=function(){return!1===this.Yp},i.prototype.lw=function(t){this.Xp=t,this.Jp=!0},i.prototype.uw=function(){return this.Xp},i.prototype.Ei=function(){return!1},i.prototype.Pt=function(t,i,n,e){return this.x=new zo(t.x,i.x,n.x,e?e.x:void 0),this.y=new zo(t.y,i.y,n.y,e?e.y:void 0),this},i.prototype.Oi=function(){return this.Ai},i.prototype.Bw=function(){return this.qp},i.prototype.tk=function(){return this.Jp},i.prototype.Qi=function(){return this.Ii},i.prototype.tn=function(){return this.Qp},i.prototype.bi=function(){return this.t=!1,this.Ii=!1,this.qp=!1,this.Jp=!1,this},i.prototype.gi=function(){return this.t=!0,this.Ii=!0,this.qp=!0,this.Jp=!0,this},i.prototype.oi=function(t,i){return"object"==typeof t?(this.hi.x=t.x,this.hi.y=t.y):(this.hi.x=t,this.hi.y=i),this.$p(),this},i.prototype.Zi=function(t){return this.Zp=t,this.$p(),this},i.prototype.Ki=function(t){return this.Kp=t,this.$p(),this},i.prototype.di=function(){return l(this.Zp[0]+this.Zp[1],this.Kp[0]+this.Kp[1])},i.prototype.vi=function(){return this.hi},i.prototype.$p=function(){var t=this.Wp,i=l(this.x.yi(this.hi.x),this.y.yi(this.hi.y)),n=this.Zp[0]+this.Zp[1],e=this.Kp[0]+this.Kp[1],r=Math.max(i.x-n,0),s=Math.max(i.y-e,0),o=.5*(r>s?s:r),h=[this.Zp[0]+Math.max((r-2*o)/2,0),this.Zp[1]+Math.max((r-2*o)/2,0)],u=[this.Kp[0]+Math.max((s-2*o)/2,0),this.Kp[1]+Math.max((s-2*o)/2,0)],a=Math.abs(t.end-t.start);this.x.oi(this.hi.x).ai(h).xi(-a,a),this.y.oi(this.hi.y).ai(u).xi(-a,a),this.Qp={x:this.x.getPixelSize(),y:this.y.getPixelSize()},this.Ai={x:this.x.Oi(),y:this.y.Oi()},this.gi()},i.prototype.Li=function(t,i){var n=this.tn();return{x:t.x+i.x*n.x,y:t.y+i.y*n.y}},i.prototype.nn=function(t,i,n,e){var r=this.tn(),s=ho(t,i);return s.x*=e,s.y*=e,{x:t.x+n*r.x*s.x,y:t.y+n*r.y*s.y}},i}(No),ij=function(i){function e(n,e,r,s,o,h,u){var a=i.call(this,n,e,r,e.qs(oH.bg),e.qs(oH.ui),s,u,h?h.theme:void 0)||this;a.ng=t.AutoCursorModes.snapToClosest,a.dd=[],a.Mn=!0,a.lo=!0,a.ik=function(t,i,n,e,r){a.Yg.oi(e,r)},a.Sd=ds(a.dd),a.md=vs(a.dd),a.nk=function(){return a.ZS},a.ek=e.qs(oH.gridLines),a.rk=e.qs(oH.series),a.sk=e.qs(oH.axisLines),a.hk=e.qs(oH.axisTicks),a.Yg=r.d2({scaleXYConstructor:tj}),a.onResize(a.ik),a.hy.Jn("Polar Chart");var f=Rr(h?h.autoCursorBuilder:void 0,YG);return a.og=f.tg(a.Rf,a.uiScale,a.uiScale,a.vn),a.hg=i.prototype.sg.call(a,a._f.Gc(a.Yg).$n(a.vn.seriesBackgroundFillStyle).Ys(a.vn.seriesBackgroundStrokeStyle)).Zu(0).Ku(360).$u(0),h&&!0===h.disableAnimations&&a.setAnimationsEnabled(!1),a.oy(o,a.pixelScale),a.uk=new cH(a,a.Yg,a.vn,!(!h||!0!==h.disableAnimations),a.ek,a.sk,a.hk,a.nk),a.ak=new dH(a,a.Yg,a.vn,!(!h||!0!==h.disableAnimations),a.ek,a.sk,a.hk),a}return n(e,i),e.prototype.addLineSeries=function(){var t=new AH(this.rk,this,this.JS,this.QS,this.Yg,this.vn);return this.im(t),t},e.prototype.addPointSeries=function(){var t=new TH(this.rk,this,this.JS,this.QS,this.Yg,this.vn);return this.im(t),t},e.prototype.addPointLineSeries=function(){var t=new FH(this.rk,this,this.JS,this.QS,this.Yg,this.vn);return this.im(t),t},e.prototype.addAreaSeries=function(){var t=new $H(this.rk,this,this.JS,this.QS,this.Yg,this.vn);return this.im(t),t},e.prototype.addPolygonSeries=function(){var t=new JH(this.rk,this,this.JS,this.QS,this.Yg,this.vn);return this.im(t),t},e.prototype.getSeries=function(){return this.ZS},e.prototype.addSector=function(){var t=new SH(this.rk,this,this.Sd,this.md,this.Yg,this.vn);return this.md(t),t},e.prototype.getAmplitudeAxis=function(){return this.uk},e.prototype.getRadialAxis=function(){return this.ak},e.prototype.Tf=function(){var t,n,e,r,s,h,u,a,f,c;i.prototype.Tf.call(this);try{for(var l=o(this.ZS),d=l.next();!d.done;d=l.next()){d.value.CS()}}catch(i){t={error:i}}finally{try{d&&!d.done&&(n=l.return)&&n.call(l)}finally{if(t)throw t.error}}this.uk.Xe(),this.ak.Xe();try{for(var v=o(this.ZS),y=v.next();!y.done;y=v.next()){y.value.Tf()}}catch(t){e={error:t}}finally{try{y&&!y.done&&(r=v.return)&&r.call(v)}finally{if(e)throw e.error}}for(var S=1;S<=2;S+=1){var m=this.uk.Tf(),b=this.ak.Tf(),g=this.yy(),w=[this.hh.left+b,this.hh.right+b],p=[this.hh.bottom+b,this.hh.top+b+g];this.Yg.Zi(w).Ki(p);if(!(!this.fk||Math.abs(this.fk.amplitude-m)>=4||Math.abs(this.fk.radial-b)>=4)||1!==S){this.fk={amplitude:m,radial:b};break}}var k=this.Yg.ew().start,x=this.Yg.ew().end;this.hg.qu(this.Yg.nw()?((null===(f=this.fk)||void 0===f?void 0:f.radial)||0)*this.Yg.x.getPixelSize()+x-k:((null===(c=this.fk)||void 0===c?void 0:c.radial)||0)*this.Yg.x.getPixelSize()+k-x).ta(360);try{for(var M=o(this.dd),A=M.next();!A.done;A=M.next()){A.value.Tf()}}catch(t){s={error:t}}finally{try{A&&!A.done&&(h=M.return)&&h.call(M)}finally{if(s)throw s.error}}this.ug();try{for(var F=o(this.ZS),T=F.next();!T.done;T=F.next()){T.value.BS()}}catch(t){u={error:t}}finally{try{T&&!T.done&&(a=F.return)&&a.call(F)}finally{if(u)throw u.error}}return i.prototype.sy.call(this),this.le(),this},e.prototype.setAnimationsEnabled=function(t){return this.Mn=!!t,this.uk.setAnimationsEnabled(t),this.ak.setAnimationsEnabled(t),this},e.prototype.getAnimationsEnabled=function(){return this.Mn},e.prototype.disableAnimations=function(){return this.setAnimationsEnabled(!1),this},e.prototype.setMouseInteractions=function(t){return this.lo=t,this},e.prototype.getMouseInteractions=function(){return this.lo},e.prototype.getMinimumSize=function(){return l(nj,nj)},e.prototype.le=function(){},e.prototype.forEachAxis=function(t){t(this.uk),t(this.ak)},e.prototype.dispose=function(){return this.ek.ro(),this.rk.ro(),this.sk.ro(),this.hk.ro(),i.prototype.dispose.call(this)},e.prototype.Fl=function(){return u(u([],h(this.ZS)),h(this.dd))},e}(rH),nj=300;!function(t){t[t.bg=0]="bg",t[t.gridLines=1]="gridLines",t[t.series=2]="series",t[t.axisLines=3]="axisLines",t[t.axisTicks=4]="axisTicks",t[t.ui=5]="ui"}(oH||(oH={}));var ej,rj,sj=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return n(i,t),i}(pV),oj=function(t){function i(i,n,e,r,s,o,h,u){var a=t.call(this,r,o,h,u)||this;return a.vr=r,a.scale=s,a.Jf=o,a.Qf=h,a.Mt="Slice",a.u=0,a.by=!1,a.ck=Re,a.wy=Re,a.py=a.u,a.xy=!1,a.My=th((function(){return a.vr.engine.xn()})),a.Fy=function(){a.Ty=void 0},a.index=i,a.jp=a.Cc(n.Rc(s,CE.Convex)),a.sr=a.Cc(e.$e(s)),a}return n(i,t),i.prototype.setValue=function(t){return this.vr.getAnimationsEnabled()?this.xy||this.Iy(this.py,t):this.py=t,this.u=t,this.vr.engine.xn(),this},i.prototype.getValue=function(){return this.u},i.prototype.dispose=function(){var i=this;return this.vr.getAnimationsEnabled()&&this.py>0?(this.Ty&&(this.Ty.finish(!1),this.Ty=void 0),this.Iy(this.py,0,(function(){return t.prototype.dispose.call(i)}))):t.prototype.dispose.call(this),this.xy=!0,this},i.prototype.restore=function(){return this.vr.getAnimationsEnabled()&&(this.Ty&&(this.Ty.finish(!1),this.Ty=void 0),this.Iy(this.py,this.u)),t.prototype.restore.call(this),this.xy=!1,this},i.prototype.Iy=function(t,i,n){var e=this;this.Ty=this.My(300,Qo.ease)([[t,i]],(function(t){var i=h(t,1)[0];e.py=i,e.vr.engine.xn()})),this.Ty.onEveryAnimationEnd(this.Fy),n&&this.Ty.onAnimationEnd(n)},i.prototype.setStyle=function(t,i,n,e){this.ck=t,this.wy=n,this.jp.$n(this.Bf?this.ck.getDefaultHighlightStyle():this.ck).Ys(i),this.sr.$n(this.Bf?this.wy.getDefaultHighlightStyle():this.wy).ie(e);for(var r=0;r<this.sc.length;r+=1)this.styleAttachedEntry(this.sc[r])},i.prototype.getAnimatedValue=function(){return this.py},i.prototype.Ac=function(t,i){return t===this.jp?t.$n(i?this.ck.getDefaultHighlightStyle():this.ck):t===this.sr&&t.$n(i?this.wy.getDefaultHighlightStyle():this.wy),this.vr.engine.xn(),this},i.prototype.attach=function(i,n){return void 0===n&&(n=!0),t.prototype.attach.call(this,i,n),this.styleAttachedEntry(i),this},i.prototype.setHighlighted=function(i){t.prototype.setHighlighted.call(this,i);for(var n=0;n<this.sc.length;n+=1)this.styleAttachedEntry(this.sc[n]);return this},i.prototype.styleAttachedEntry=function(t){ks(t,this.vn,{fill:this.ck,stroke:this.jp.Xs()})},i}(sj);t.FunnelSliceModes=void 0,(ej=t.FunnelSliceModes||(t.FunnelSliceModes={}))[ej.VariableHeight=0]="VariableHeight",ej[ej.VariableWidth=1]="VariableWidth",function(t){t[t.bg=0]="bg",t[t.bottom=1]="bottom",t[t.top=2]="top",t[t.ui=3]="ui"}(rj||(rj={}));var hj,uj=function(t,i){return t=t<=0?0:i*((t>=100?100:t)/100)},aj=function(i,n,e,r,s,o,h,u){void 0===o&&(o=0),void 0===h&&(h=t.FunnelSliceModes.VariableHeight),n=uj(n,r.x),e=uj(e,r.x);var a,f=i.length,c=0;a=i.reduce((function(t,i){return t+i.getAnimatedValue()}),0);var l={x:u-n/2,y:r.y+s.bottom},d={x:u+n/2,y:r.y+s.bottom},v={x:0,y:s.bottom},y={x:0,y:s.bottom},S=0,m=0;if(o)for(var b=0;b<i.length;b+=1){m+=(p=i[b]).getAnimatedValue();var g=h===t.FunnelSliceModes.VariableWidth?(r.y-o*f)/f:r.y+s.bottom-m/a*r.y;if(h===t.FunnelSliceModes.VariableWidth){o=g-o<10?Math.max(20,g-10):o;break}0!==S&&S-g-o<10&&(o=Math.max(0,S-g-10)),S=g}var w=(n-e)/2/r.y;for(b=0;b<f;b+=1){var p;c+=(p=i[b]).getAnimatedValue();var k,x=h===t.FunnelSliceModes.VariableWidth?(r.y-o*f)/f:r.y+s.bottom-c/a*r.y;b>0&&(l={x:v.x+w*o,y:v.y-o},d={x:y.x-w*o,y:y.y-o}),v={x:u-(k=(n+c/a*(e-n))/2),y:parseInt(""+(h===t.FunnelSliceModes.VariableWidth?l.y-x:x),10)},y={x:u+k,y:parseInt(""+(h===t.FunnelSliceModes.VariableWidth?d.y-x:x),10)},d.x>=l.x&&y.x>v.x&&p.jp.au([v,l,d,y])}},fj=function(i){function e(n,e,r,s,o,h,u,a){var f=i.call(this,n,e,r,e.qs(rj.bg),e.qs(rj.ui),s,h,u)||this;return f.Oy=[],f.Py=gV.None,f.Ry=!0,f.Ny=0,f.lk=80,f.dk=20,f.vk=0,f.yk=t.FunnelSliceModes.VariableHeight,f.Mn=!0,f.Hy=function(t){var i=f.Oy.indexOf(t);i>=0&&(f.Oy.splice(i,1),f.jy())},f.Wy=function(t){f.Oy.indexOf(t)<0&&(f.Oy.push(t),f.jy(),t.setHighlightOnHover(f.Ry))},f.Uy=e.qs(rj.bottom),f.Yy=e.qs(rj.top),f.hy.Jn("Funnel Chart"),f.Dy=f.vn.sliceChartStackedFillStylePalette,f._y=f.vn.sliceChartStrokeStyle,f.zy=f.vn.sliceLabelFont,f.Ey=f.vn.sliceLabelFillStyle,a&&f.setAnimationsEnabled(!1),f.oy(o,f.pixelScale),f}return n(e,i),e.prototype.addSlice=function(t,i){var n=new oj(this.Ny,this.Uy,this.Yy,this,this.pixelScale,this.Hy,this.Wy,this.vn);return this.Ny+=1,n.setName(t),n.setValue(i),this.Oy.push(n),this.engine.xn(),n.setHighlightOnHover(this.Ry),n},e.prototype.addSlices=function(t){for(var i=[],n=0;n<t.length;n+=1)i.push(this.addSlice(t[n].name,t[n].value));return i},e.prototype.getSlices=function(){return this.Oy},e.prototype.setHeadWidth=function(t){return this.lk=t,this.engine.xn(),this},e.prototype.getHeadWidth=function(){return this.lk},e.prototype.setNeckWidth=function(t){return this.dk=t,this.engine.xn(),this},e.prototype.getNeckWidth=function(){return this.dk},e.prototype.setSliceGap=function(t){return this.vk=Math.min(Math.max(t,0),20),this.engine.xn(),this},e.prototype.setSliceMode=function(t){return this.yk=t,this.engine.xn(),this},e.prototype.getFunnelSliceMode=function(){return this.yk},e.prototype.setLUT=function(t){return this.Sl=t,this.engine.xn(),this},e.prototype.setSliceFillStyle=function(t){return this.Dy=t,this.engine.xn(),this},e.prototype.getSliceFillStyle=function(){return this.Dy},e.prototype.setSliceStrokeStyle=function(t){return this._y="function"==typeof t?t(this._y):t,this.engine.xn(),this},e.prototype.getSliceStrokeStyle=function(){return this._y},e.prototype.setSliceSorter=function(t){return this.Py=t,this.Oy=this.Oy.sort(this.Py),this.engine.xn(),this},e.prototype.getSliceSorter=function(){return this.Py},e.prototype.setLabelFillStyle=function(t){return this.Ey="function"==typeof t?t(this.Ey):t,this.engine.xn(),this},e.prototype.getLabelFillStyle=function(){return this.Ey},e.prototype.setLabelFont=function(t){return this.zy="function"==typeof t?t(this.zy):t,this.engine.xn(),this},e.prototype.getLabelFont=function(){return this.zy},e.prototype.setLabelFormatter=function(t){return this.Zy=t,this.engine.xn(),this},e.prototype.getLabelFormatter=function(){return this.Zy},e.prototype.setAnimationsEnabled=function(t){return this.Mn=t,this.engine.xn(),this},e.prototype.getAnimationsEnabled=function(){return this.Mn},e.prototype.disableAnimations=function(){return this.setAnimationsEnabled(!1),this},e.prototype.setSliceHighlightOnHover=function(t){return this.Ry=t,this.Oy.forEach((function(i){return i.setHighlightOnHover(t)})),this},e.prototype.Tf=function(){i.prototype.Tf.call(this),i.prototype.sy.call(this);var t=this.yy(),n=l(this.pixelScale.x.getInnerInterval()-(this.hh.left+this.hh.right),this.pixelScale.y.getInnerInterval()-(this.hh.bottom+this.hh.top+t)),e=l(this.hh.left+n.x/2,this.hh.bottom+n.y/2);this.Oy=this.Oy.sort(this.Py);for(var r=0,s=this.Oy.length;r<s;r+=1)this.Xy(this.Oy[r],r);var o=this.Oy.filter((function(t){return t.getAnimatedValue()>0})),h=0;for(r=0;r<o.length;r+=1)h+=o[r].getAnimatedValue();var u,a,f=[];for(r=0;r<o.length;r+=1)f.push((u=o[r].getAnimatedValue(),a=h,u>0?u/a:0));for(r=0;r<o.length;r+=1){var c=o[r];c.sr.Jn(this.Zy(c,f[r])).Fe()}f.push(h),this.Ky(o,f,e,n)},e.prototype.Xy=function(t,i){t.setStyle(this.Sl?new Ee({color:this.Sl.getColors(t.getAnimatedValue())}):this.Dy(i),this._y,this.Ey,this.zy)},e.prototype.jy=function(){this.Oy=this.Oy.sort(this.Py),this.engine.xn()},e.prototype.Fl=function(){return this.Oy},e.prototype.dispose=function(){return this.Uy.ro(),this.Yy.ro(),i.prototype.dispose.call(this)},e}(mV),cj=function(i,n,e){var r=i.fu();if(r.length>0){var s=(r[1].y-r[0].y)/2+r[0].y;return{x:n===t.FunnelLabelSide.Left?(r[0].x-r[1].x)/2+r[1].x-e:(r[2].x-(4===r.length?r[3].x:r[1].x))/2+(4===r.length?r[3].x:r[1].x)+e,y:s}}},lj=function(t){var i=t.fu();if(i.length>0)return{x:(i[2].x-i[1].x)/2+i[1].x,y:(i[1].y-i[0].y)/2+i[0].y}},dj=function(i){function e(){var n=null!==i&&i.apply(this,arguments)||this;return n.Zy=wV.NamePlusValue,n.qy=10,n.Sk=t.FunnelLabelSide.Left,n.mk=t.SliceLabelIndices.LabelsOnSides,n.Qy=[],n.$y=n.vn.sliceLabelConnectorStyle,n}return n(e,i),e.prototype.setLabelConnectorStyle=function(t){this.$y=t;for(var i=0;i<this.Qy.length;i+=1)this.Qy[i].na(this.$y);return this.engine.xn(),this},e.prototype.getLabelConnectorStyle=function(){return this.$y},e.prototype.setLabelConnectorGap=function(t){return this.qy=t,this.engine.xn(),this},e.prototype.getLabelConnectorGap=function(){return this.qy},e.prototype.setLabelSide=function(t){return this.Sk=t,this.engine.xn(),this},e.prototype.getLabelSide=function(){return this.Sk},e.prototype.Ky=function(i,n,e,r){for(var s=this.qy,o=0,h=0;h<i.length;h+=1)o=Math.max(o,i[h].sr.vi().x);var u=r.x+this.hh.left+this.hh.right,a=this.Sk===t.FunnelLabelSide.Right?(this.hh.left+(u-(this.hh.right+o)))/2:(this.hh.left+o+(u-this.hh.right))/2,f=r.x-o,c=l(f,r.y);aj(i,this.lk,this.dk,c,this.hh,this.vk,this.yk,a),this.bk(i,this.Sk===t.FunnelLabelSide.Left?-1:1,-1,e,r);for(h=0;h<this.Qy.length;h+=1)this.Qy[h].$h().dispose();for(h=0;h<i.length;h+=1)this.tS(this.gk(i[h],-1,e,s))},e.prototype.getMinimumSize=function(){return l(500,300)},e.prototype.bk=function(t,i,n,e,r){if(0!==t.length)for(var s,o=e.x+i*r.x*.5,h=1===n?Math.max:Math.min,u=0;u<t.length;u+=1){var a=t[u];if(0===a.jp.fu().length)a.sr.dispose();else{a.sr.restore();var f=void 0;s&&(f=s.sr.kh().y+n*(s.sr.vi().y+10));var c=(cj(a.jp,this.Sk,0)||l(0,0)).y,d=void 0===f?c:h(c,f);a.sr.ph(l(o,d)).Ah(i).Th(0),s=a}}},e.prototype.gk=function(i,n,e,r){var s=i.jp,o=i.sr,h=cj(s,this.Sk,r);if(h){var u={x:mo(this.Sk===t.FunnelLabelSide.Left?o.kh().x-n*(r+o.vi().x):o.kh().x+n*(r+o.vi().x),h,e).x,y:bo(o.kh().y,h,e).y};return[h,u,l(this.Sk===t.FunnelLabelSide.Left?o.kh().x-n*(r+o.vi().x):o.kh().x+n*(r+o.vi().x),u.y)]}},e.prototype.tS=function(t){if(t){for(var i=void 0,n=0;n<this.Qy.length;n+=1)if(this.Qy[n].isDisposed()){i=this.Qy[n].restore();break}void 0===i&&(i=this.Yy.iS(this.pixelScale,void 0,[LV.InternalUI]).na(this.$y),this.Qy.push(i)),i.Qh(t)}},e}(fj),vj=function(i){function e(){var n=null!==i&&i.apply(this,arguments)||this;return n.Zy=wV.Name,n.mk=t.SliceLabelIndices.LabelsInsideSlices,n}return n(e,i),e.prototype.Ky=function(t,i,n,e){var r=this.hh.left+e.x/2;aj(t,this.lk,this.dk,e,this.hh,this.vk,this.yk,r);for(var s=0;s<t.length;s+=1){var o=t[s],h=o.jp,u=o.sr,a=lj(h);a&&u.ph(a).Ah(0).Th(0)}},e.prototype.getMinimumSize=function(){return l(200,200)},e}(fj),yj={LabelsOnSides:dj,LabelsInsideSlices:vj};t.FunnelLabelSide=void 0,(hj=t.FunnelLabelSide||(t.FunnelLabelSide={}))[hj.Right=0]="Right",hj[hj.Left=1]="Left";var Sj=function(i){function e(n,e,r,s,o,h,u,a){var f=i.call(this,n,e,r,e.qs(t.LayerIndices.bg),e.qs(t.LayerIndices.ui),s,h,u)||this;f.Oy=[],f.Mn=!0,f.Hy=function(t){var i=f.Oy.indexOf(t);i>=0&&f.Oy.splice(i,1)},f.Wy=function(t){f.Oy.indexOf(t)<0&&f.Oy.push(t)},f.wf=e.qs(t.LayerIndices.bottom),f.Yy=e.qs(t.LayerIndices.top),f.hy.Jn("Gauge Chart"),f.oy(o,f.pixelScale);var c=WE();return f.onBackgroundTouchStart(c.onTouchStart),f.onBackgroundTouchMove(c.onTouchMove),f.onBackgroundTouchEnd(c.onTouchEnd),a&&f.setAnimationsEnabled(!1),f}return n(e,i),e.prototype.setAnimationsEnabled=function(t){return this.Mn=t,this},e.prototype.getAnimationsEnabled=function(){return this.Mn},e.prototype.disableAnimations=function(){return this.setAnimationsEnabled(!1),this},e.prototype.dispose=function(){return this.wf.ro(),this.Yy.ro(),i.prototype.dispose.call(this)},e}(mV),mj=function(i){function e(n,e,r,s,o,h,u,a){var f=i.call(this,n,e,r,s,o,h,u,a)||this;f.Eu=90,f.Nu=-270,f.wk={min:f.Eu,max:f.Nu},f.pk=th((function(){return f.wf.xn()})),f.kk=function(){f.xk=void 0};var c=e.qs(t.LayerIndices.bottom);return e.qs(t.LayerIndices.top),f.Mk=c.Gc(f.pixelScale).$n(f.vn.gaugeBackgroundFillStyle).Ys(f.vn.gaugeBackgroundStrokeStyle),f}return n(e,i),e.prototype.setAngleInterval=function(t,i){t===i?i-=360:Math.abs(i-t)>360&&(i-=(i-t)%360);var n=this.Eu,e=this.Nu,r=this.wk;return this.getAnimationsEnabled()?this.Ak(r,{min:t,max:i}):(r.min=t,r.max=i,this.Eu=t,this.Nu=i),this.an.emit("angleIntervalChange",this,{min:n,max:e},{min:t,max:i}),this.engine.xn(),this},e.prototype.getAngleInterval=function(){return{min:this.Eu,max:this.Nu}},e.prototype.setGaugeFillStyle=function(t){return this.Mk.$n(t),this.engine.xn(),this},e.prototype.setGaugeStrokeStyle=function(t){return this.Mk.Ys(t),this.engine.xn(),this},e.prototype.Ak=function(t,i,n){var e=this;this.xk=this.pk(1e3,Qo.ease)([[t.min,i.min],[t.max,i.max]],(function(t){var i=h(t,2),n=i[0],r=i[1];e.wk={min:n,max:r},e.Eu=n,e.Nu=r,e.wf.xn()})),this.xk.onEveryAnimationEnd(this.kk),n&&this.xk.onAnimationEnd(n)},e.prototype.onAngleIntervalChange=function(t){return this.an.on("angleIntervalChange",t)},e.prototype.offAngleIntervalChange=function(t){return this.an.off(t,"angleIntervalChange")},e}(Sj),bj=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return n(i,t),i.prototype.Fk=function(t){return this.an.on("valueChange",t)},i.prototype.Tk=function(t){return this.an.on("valueIntervalChange",t)},i.prototype.offValueChange=function(t){return this.an.off(t,"valueChange")},i.prototype.offIntervalChange=function(t){return this.an.off(t,"valueIntervalChange")},i.prototype.attach=function(i,n){return void 0===n&&(n=!0),t.prototype.attach.call(this,i,n),this.styleAttachedEntry(i),this},i.prototype.setHighlighted=function(i){t.prototype.setHighlighted.call(this,i);for(var n=0;n<this.sc.length;n+=1)this.styleAttachedEntry(this.sc[n]);return this},i.prototype.styleAttachedEntry=function(t){ks(t,this.vn,{fill:this.Ck})},i}(pV),gj=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return n(i,t),i.prototype.onValueChange=function(t){return this.Fk(t)},i.prototype.onIntervalChange=function(t){return this.Tk(t)},i}(bj),wj=function(t){function i(i,n,e,r,s,o,h){var u=t.call(this,e,s,o,h)||this;return u.Bk=i,u.nr=n,u.vr=e,u.scale=r,u.Eu=0,u.Nu=0,u.Lk=0,u.Ik=0,u.Ok=0,u.Pk=100,u.Dk=!0,u.py=u.u,u.My=th((function(){return u.vr.engine.xn()})),u.Fy=function(){u.Ty=void 0},u.wy=new c(u.vn.sliceLabelFillStyle),u.Ck=new c(u.vn.gaugeSliceFillStyle),u.arc=u.Cc(i.Gc(r).$n(u.Ck.L()).Ys(ir)),u.minLabel=u.Cc(n.$e(r)),u.maxLabel=u.Cc(n.$e(r)),u.label=u.Cc(n.$e(r)),u.minLabel.$n(u.wy.L()),u.maxLabel.$n(u.wy.L()),u.label.$n(u.wy.L()),u.setName("Gauge Slice"),u}return n(i,t),i.prototype.Tf=function(){var t=this.vr.getDataLabelFormatter(),i=this.Eu/90<this.Nu/90?1:-1,n=this.vr.getAnimationsEnabled()?this.py:this.u,e=h(this.Ok<this.Pk?[this.Ok,this.Pk]:[this.Pk,this.Ok],2),r=e[0],s=e[1];n<r?n=r:n>s&&(n=s);var o=this.Nu-i*this.Ik,u=this.Eu+i*this.Lk,a=this.Pk-this.Ok,f=(0!==a?(o-u)/a:1/0)*(n-this.Ok);this.arc.Zu(u).Ku(u+f);var c="function"==typeof t?t(n,{getInnerStart:function(){return r},getInnerEnd:function(){return s}}):t.format(n);this.label.Jn(c)},i.prototype._k=function(){var t=this,i=this.vr.getIntervalLabelFormatter(),n="function"==typeof i?i(this.Ok,{getInnerStart:function(){return t.Ok},getInnerEnd:function(){return t.Pk}}):i.format(this.Ok);return this.minLabel.Jn(n).Fe(),this.minLabel.vi()},i.prototype.Rk=function(){var t=this,i=this.vr.getIntervalLabelFormatter(),n="function"==typeof i?i(this.Pk,{getInnerStart:function(){return t.Ok},getInnerEnd:function(){return t.Pk}}):i.format(this.Pk);return this.maxLabel.Jn(n).Fe(),this.maxLabel.vi()},i.prototype.setName=function(i){return t.prototype.setName.call(this,i),this.vr.engine.xn(),this},i.prototype.setValue=function(t){var i=this.u;return this.py=i,this.vr.getAnimationsEnabled()?this.isDisposed()||this.Iy(this.py,t):this.py=t,this.u=t,this.an.emit("valueChange",this,i,t),this.vr.engine.xn(),this},i.prototype.getValue=function(){return this.u},i.prototype.dispose=function(){var i=this;return this.vr.getAnimationsEnabled()&&this.py>0?(this.Ty&&(this.Ty.finish(!1),this.Ty=void 0),this.Iy(this.py,0,(function(){return t.prototype.dispose.call(i)}))):t.prototype.dispose.call(this),this},i.prototype.restore=function(){return this.vr.getAnimationsEnabled()&&(this.Ty&&(this.Ty.finish(!1),this.Ty=void 0),this.Iy(0,this.u)),t.prototype.restore.call(this),this},i.prototype.setInterval=function(t,i){var n=this.Ok,e=this.Pk;return this.an.emit("valueIntervalChange",this,{min:n,max:e},{min:t,max:i}),this.Ok=t,this.Pk=i,this.vr.engine.xn(),this},i.prototype.setIntervalLabelsFont=function(t){return this.minLabel.ie(t),this.maxLabel.ie(t),this.vr.engine.xn(),this},i.prototype.getIntervalLabelsFont=function(){return this.minLabel.te()},i.prototype.setIntervalLabelsVisible=function(t){return t?(this.minLabel.restore(),this.maxLabel.restore()):(this.minLabel.dispose(),this.maxLabel.dispose()),this.Dk=t,this},i.prototype.getIntervalLabelsVisible=function(){return this.Dk},i.prototype.setAngleInterval=function(t,i){return this.Eu=t,this.Nu=i,this.vr.engine.xn(),this},i.prototype.setMinAngle=function(t){return this.Eu=t,this.vr.engine.xn(),this},i.prototype.setMaxAngle=function(t){return this.Nu=t,this.vr.engine.xn(),this},i.prototype.setMarginInDegrees=function(t,i){return void 0===t&&(t=this.Lk),void 0===i&&(i=this.Ik),t!==this.Lk&&(this.Lk=t),i!==this.Ik&&(this.Ik=i),this.vr.engine.xn(),this},i.prototype.setFillStyle=function(t){this.Ck.C(t);var i=this.Ck.D(this.Bf);this.arc.$n(i);for(var n=0;n<this.sc.length;n+=1)this.styleAttachedEntry(this.sc[n]);return this.vr.engine.xn(),this},i.prototype.zk=function(t){return this.label.$n(t),this.maxLabel.$n(t),this.minLabel.$n(t),this.wy.C(t),this.nr.xn(),this},i.prototype.Ek=function(){return this.wy.D(this.Bf)},i.prototype.setFillStyleHighlight=function(t){if(this.Ck.I(t),this.Bf){var i=this.Ck.D(this.Bf);this.arc.$n(i)}return this.vr.engine.xn(),this},i.prototype.getAnimatedValue=function(){return this.py},i.prototype.Ac=function(t,i){return t===this.arc&&t.$n(this.Ck.D(i)),t===this.minLabel&&t.$n(this.wy.D(i)),t===this.maxLabel&&t.$n(this.wy.D(i)),t===this.label&&t.$n(this.wy.D(i)),this},i.prototype.Iy=function(t,i,n){var e=this;this.Ty=this.My(1e3,Qo.ease)([[t,i]],(function(t){var i=h(t,1)[0];e.py=i,e.vr.engine.xn()})),this.Ty.onEveryAnimationEnd(this.Fy),n&&this.Ty.onAnimationEnd(n)},i}(gj);function pj(t,i,n,e,r,s){void 0===s&&(s=Math.floor(Math.sqrt(e>r?25*e:25*r)));var o=Array(s+2),h=Math.PI,u=0,a=0,f=i*h/180,c=(n*h/180-f)/s;for(o[u]=l(t.x,t.y),u+=1;u<=s+1;)o[u]=l(t.x+e*Math.cos(f+a*c),t.y+r*Math.sin(f+a*c)),u+=1,a+=1;return[o,s]}var kj,xj,Mj=function(t){function i(i,n,e,r,s,o,h,u){var a=t.call(this,i,n,e,r,s,o,h,u)||this;a.vl=20,a.Nk=new Intl.NumberFormat,a.Vk=new Intl.NumberFormat,a.Gk=!1,a.Hk=5;var f=new wj(a.wf,a.Yy,a,a.pixelScale,a.Hy,a.Wy,a.vn);return a.jk=f,a.Oy.push(f),a.setPadding(10),a}return n(i,t),i.prototype.Tf=function(){t.prototype.Tf.call(this),t.prototype.sy.call(this);var i=this.yy(),n=Ks([this.jk._k(),this.jk.Rk()]),e=l(this.pixelScale.x.getInnerInterval()-(this.hh.left+this.hh.right+2*n.max.x),this.pixelScale.y.getInnerInterval()-(this.hh.bottom+this.hh.top+2*n.max.y+i)),r=Math.max(.5*Math.min(e.x,e.y),0),s=l(this.hh.left+n.max.x+.5*e.x,this.hh.bottom+n.max.y+.5*e.y),o=this.Gk?this.Wk(s,r):s,h=this.Mk.Zo.thickness,u=r-.5*h,a=r-this.vl,f=a/r*100;f=f>100||f<0?99:f;var c=100*(1-(this.vl-h)/r);this.Uk(o,a)&&(this.Mk.qu(r).$u(f),this.jk.arc.qu(u).$u(c));var d,v,y=.5*(d=r,(v=this.Nu-this.Eu)/(2*Math.PI*d*(v/360))*h);this.Mk.Zu(this.Eu).Ku(this.Nu).ph(o),this.jk.arc.ph(o),this.jk.label.ph(o),this.Sl&&this.jk.setFillStyle(new Ee({color:this.Sl.getColors(this.jk.getAnimatedValue())})),this.jk.setMinAngle(this.Eu).setMaxAngle(this.Nu).setMarginInDegrees(y,y).Tf();var S=this.Mk.Vu();if(this.jk.getIntervalLabelsVisible()){this.Yk(this.Eu,this.Nu,o,S+this.Hk);var m=this.jk.minLabel.Fe().fn(),b=this.jk.maxLabel.Fe().fn();zs(m,b)&&this.Xk(m,b,o,S+this.Hk)}},i.prototype.Uk=function(t,i){var n=ao(this.jk.label.Fe().vi(),.5),e=t.x+i,r=t.x-i,s=t.y+i,o=t.y-i;return!(t.x+n.x>e||t.x-n.x<r||t.y+n.y>s||t.y-n.y<o)},i.prototype.Xk=function(t,i,n,e){var r=Es(t,i),s=h([xo(go(this.Eu)),xo(go(this.Nu))],2),o=s[0],u=h(o!==s[1]||1!==o&&3!==o?[co(r.min,n),co(r.max,n)]:[co(l(r.min.x,r.max.y),n),co(l(r.max.x,r.min.y),n)],2),a=u[0],f=u[1],c=a.x*f.x+a.y*f.y,d=uo(a)*uo(f),v=.7*wo(Math.acos(c/d)),y=h(this.Zk(),2),S=y[0],m=y[1];this.Yk(this.Eu-S*v,this.Nu-m*v,n,e)},i.prototype.Zk=function(){var t=this.Nu-this.Eu,i=Math.sign(t),n=Math.sign(this.Eu),e=Math.sign(this.Nu);return n===e&&(i>=0?n=-e:e=-n),[n,e]},i.prototype.Wk=function(t,i){var n=Ks(h(pj(t,this.Eu,this.Nu,i,i),1)[0]),e=.5*(n.max.x-n.min.x),r=.5*(n.max.y-n.min.y);return fo(co(t,l(n.min.x+e,n.min.y+r)),t)},i.prototype.Yk=function(t,i,n,e){var r=go(t),s=go(i);this.jk.minLabel.ph(ro(l(n.x+e,n.y),n,-r)),this.jk.maxLabel.ph(ro(l(n.x+e,n.y),n,-s)),this.jk.minLabel.Bh(l(-Math.cos(r),-Math.sin(r))),this.jk.maxLabel.Bh(l(-Math.cos(s),-Math.sin(s)))},i.prototype.getDefaultSlice=function(){return this.jk},i.prototype.setAutoScaling=function(t){return this.Gk=t,this.engine.xn(),this},i.prototype.getAutoScaling=function(){return this.Gk},i.prototype.setDataLabelFormatter=function(t){return this.Vk=t,this.engine.xn(),this},i.prototype.getDataLabelFormatter=function(){return this.Vk},i.prototype.setIntervalLabelFormatter=function(t){return this.Nk=t,this.engine.xn(),this},i.prototype.getIntervalLabelFormatter=function(){return this.Nk},i.prototype.setIntervalLabelPadding=function(t){return this.Hk=t,this.engine.xn(),this},i.prototype.getIntervalLabelPadding=function(){return this.Hk},i.prototype.setThickness=function(t){return this.vl=t,this},i.prototype.setLUT=function(t){return this.Sl=t,this.engine.xn(),this},i.prototype.setDataLabelFont=function(t){return this.jk.label.ie(t),this.engine.xn(),this},i.prototype.getDataLabelFont=function(){return this.jk.label.te()},i.prototype.getMinimumSize=function(){return l(500,300)},i.prototype.setDataLabelFillStyle=function(t){return this.jk.zk(t),this.engine.xn(),this},i.prototype.getDataLabelFillStyle=function(){return this.jk.Ek()},i.prototype.Fl=function(){return this.Oy},i.prototype.dispose=function(){return this.jk.dispose(),t.prototype.dispose.call(this)},i}(mj),Aj=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return n(i,t),i}(pV),Fj=function(t){function i(i,n,e,r,s,o,h,u){var a=t.call(this,r,o,h,u)||this;return a.vr=r,a.scale=s,a.Jf=o,a.Qf=h,a.Mt="Slice",a.u=0,a.by=!1,a.ck=Re,a.wy=Re,a.py=a.u,a.xy=!1,a.My=th((function(){return a.vr.engine.xn()})),a.Fy=function(){a.Ty=void 0},a.index=i,a.jp=a.Cc(n.Rc(s,CE.Convex)),a.sr=a.Cc(e.$e(s)),a}return n(i,t),i.prototype.setValue=function(t){return this.vr.getAnimationsEnabled()?this.xy||this.Iy(this.py,t):this.py=t,this.u=t,this.vr.engine.xn(),this},i.prototype.getValue=function(){return this.u},i.prototype.dispose=function(){var i=this;return this.vr.getAnimationsEnabled()&&this.py>0?(this.Ty&&(this.Ty.finish(!1),this.Ty=void 0),this.Iy(this.py,0,(function(){return t.prototype.dispose.call(i)}))):t.prototype.dispose.call(this),this.xy=!0,this},i.prototype.restore=function(){return this.vr.getAnimationsEnabled()&&(this.Ty&&(this.Ty.finish(!1),this.Ty=void 0),this.Iy(this.py,this.u)),t.prototype.restore.call(this),this.xy=!1,this},i.prototype.Iy=function(t,i,n){var e=this;this.Ty=this.My(300,Qo.ease)([[t,i]],(function(t){var i=h(t,1)[0];e.py=i,e.vr.engine.xn()})),this.Ty.onEveryAnimationEnd(this.Fy),n&&this.Ty.onAnimationEnd(n)},i.prototype.setStyle=function(t,i,n,e){this.ck=t,this.wy=n,this.jp.$n(this.Bf?this.ck.getDefaultHighlightStyle():this.ck).Ys(i),this.sr.$n(this.Bf?this.wy.getDefaultHighlightStyle():this.wy).ie(e);for(var r=0;r<this.sc.length;r+=1)this.styleAttachedEntry(this.sc[r])},i.prototype.getAnimatedValue=function(){return this.py},i.prototype.Ac=function(t,i){return t===this.jp?t.$n(i?this.ck.getDefaultHighlightStyle():this.ck):t===this.sr&&(t.$n(i?this.wy.getDefaultHighlightStyle():this.wy),this.vr.engine.xn()),this},i.prototype.attach=function(i,n){return void 0===n&&(n=!0),t.prototype.attach.call(this,i,n),this.styleAttachedEntry(i),this},i.prototype.setHighlighted=function(i){t.prototype.setHighlighted.call(this,i);for(var n=0;n<this.sc.length;n+=1)this.styleAttachedEntry(this.sc[n]);return this},i.prototype.styleAttachedEntry=function(t){ks(t,this.vn,{fill:this.ck,stroke:this.jp.Xs()})},i}(Aj);t.PyramidSliceModes=void 0,(kj=t.PyramidSliceModes||(t.PyramidSliceModes={}))[kj.VariableHeight=0]="VariableHeight",kj[kj.VariableWidth=1]="VariableWidth",function(t){t[t.bg=0]="bg",t[t.bottom=1]="bottom",t[t.top=2]="top",t[t.ui=3]="ui"}(xj||(xj={}));var Tj,Cj=function(t,i){return t=t<=0?0:i*((t>=100?100:t)/100)},Bj=function(i,n,e,r,s,o,h,u){void 0===o&&(o=0),void 0===h&&(h=t.PyramidSliceModes.VariableHeight),n=Cj(n,r.x),e=Cj(e,r.x);var a,f=i.length,c=0;a=i.reduce((function(t,i){return t+i.getAnimatedValue()}),0);var l={x:u-n/2,y:r.y+s.bottom},d={x:u+n/2,y:r.y+s.bottom},v={x:0,y:s.bottom},y={x:0,y:s.bottom},S=0,m=0;if(o)for(var b=0;b<i.length;b+=1){m+=i[b].getAnimatedValue();var g=h===t.PyramidSliceModes.VariableWidth?(r.y-o*f)/f:r.y+s.bottom-m/a*r.y;if(h===t.PyramidSliceModes.VariableWidth){o=g-o<10?Math.max(20,g-10):o;break}0!==S&&S-g-o<10&&(o=Math.max(0,S-g-10)),S=g}var w=(n-e)/2/r.y;for(b=0;b<f;b+=1){var p=i[b];c+=p.getAnimatedValue();var k,x=h===t.PyramidSliceModes.VariableWidth?(r.y-o*f)/f:r.y+s.bottom-c/a*r.y;b>0&&(l={x:v.x+w*o,y:v.y-o},d={x:y.x-w*o,y:y.y-o}),v={x:u-(k=(n+c/a*(e-n))/2),y:parseInt(""+(h===t.PyramidSliceModes.VariableWidth?l.y-x:x),10)},y={x:u+k,y:parseInt(""+(h===t.PyramidSliceModes.VariableWidth?d.y-x:x),10)},d.x>=l.x&&y.x>=v.x&&p.jp.au([v,l,d,y])}},Lj=function(i){function e(n,e,r,s,o,h,u,a){var f=i.call(this,n,e,r,e.qs(xj.bg),e.qs(xj.ui),s,h,u)||this;return f.Oy=[],f.Py=gV.None,f.Dy=f.vn.sliceChartStackedFillStylePalette,f._y=f.vn.sliceChartStrokeStyle,f.Ry=!1,f.zy=f.vn.sliceLabelFont,f.Ey=f.vn.sliceLabelFillStyle,f.Ny=0,f.lk=0,f.dk=80,f.vk=0,f.yk=t.PyramidSliceModes.VariableHeight,f.Mn=!0,f.Hy=function(t){var i=f.Oy.indexOf(t);i>=0&&(f.Oy.splice(i,1),f.jy())},f.Wy=function(t){f.Oy.indexOf(t)<0&&(f.Oy.push(t),f.jy(),t.setHighlightOnHover(f.Ry))},f.Uy=e.qs(xj.bottom),f.Yy=e.qs(xj.top),f.hy.Jn("Pyramid Chart"),a&&f.setAnimationsEnabled(!1),f.oy(o,f.pixelScale),f}return n(e,i),e.prototype.addSlice=function(t,i){var n=new Fj(this.Ny,this.Uy,this.Yy,this,this.pixelScale,this.Hy,this.Wy,this.vn);return this.Ny+=1,n.setName(t),n.setValue(i),this.Oy.push(n),this.engine.xn(),n},e.prototype.addSlices=function(t){for(var i=[],n=0;n<t.length;n+=1)i.push(this.addSlice(t[n].name,t[n].value));return i},e.prototype.getSlices=function(){return this.Oy},e.prototype.setNeckWidth=function(t){return this.dk=t,this.engine.xn(),this},e.prototype.getNeckWidth=function(){return this.dk},e.prototype.setSliceGap=function(t){return this.vk=Math.min(Math.max(t,0),20),this.engine.xn(),this},e.prototype.setSliceMode=function(t){return this.yk=t,this.engine.xn(),this},e.prototype.getPyramidSliceMode=function(){return this.yk},e.prototype.setLUT=function(t){return this.Sl=t,this.engine.xn(),this},e.prototype.setSliceFillStyle=function(t){return this.Dy=t,this.engine.xn(),this},e.prototype.getSliceFillStyle=function(){return this.Dy},e.prototype.setSliceStrokeStyle=function(t){return this._y="function"==typeof t?t(this._y):t,this.engine.xn(),this},e.prototype.getSliceStrokeStyle=function(){return this._y},e.prototype.setSliceSorter=function(t){return this.Py=t,this.Oy=this.Oy.sort(this.Py),this.engine.xn(),this},e.prototype.getSliceSorter=function(){return this.Py},e.prototype.setLabelFillStyle=function(t){return this.Ey="function"==typeof t?t(this.Ey):t,this.engine.xn(),this},e.prototype.getLabelFillStyle=function(){return this.Ey},e.prototype.setLabelFont=function(t){return this.zy="function"==typeof t?t(this.zy):t,this.engine.xn(),this},e.prototype.getLabelFont=function(){return this.zy},e.prototype.setLabelFormatter=function(t){return this.Zy=t,this.engine.xn(),this},e.prototype.getLabelFormatter=function(){return this.Zy},e.prototype.setAnimationsEnabled=function(t){return this.Mn=t,this.engine.xn(),this},e.prototype.getAnimationsEnabled=function(){return this.Mn},e.prototype.disableAnimations=function(){return this.setAnimationsEnabled(!1),this},e.prototype.setSliceHighlightOnHover=function(t){return this.Ry=t,this.Oy.forEach((function(i){return i.setHighlightOnHover(t)})),this},e.prototype.Tf=function(){i.prototype.Tf.call(this),i.prototype.sy.call(this);var t=this.yy(),n=l(this.pixelScale.x.getInnerInterval()-(this.hh.left+this.hh.right),this.pixelScale.y.getInnerInterval()-(this.hh.bottom+this.hh.top+t)),e=l(this.hh.left+n.x/2,this.hh.bottom+n.y/2);this.Oy=this.Oy.sort(this.Py);for(var r=0,s=this.Oy.length;r<s;r+=1)this.Xy(this.Oy[r],r);var o=this.Oy.filter((function(t){return t.getAnimatedValue()>0})),h=0;for(r=0;r<o.length;r+=1)h+=o[r].getAnimatedValue();var u,a,f=[];for(r=0;r<o.length;r+=1)f.push((u=o[r].getAnimatedValue(),a=h,u>0?u/a:0));for(r=0;r<o.length;r+=1){var c=o[r];c.sr.Jn(this.Zy(c,f[r])).Fe()}f.push(h),this.Ky(o,f,e,n)},e.prototype.Xy=function(t,i){t.setStyle(this.Sl?new Ee({color:this.Sl.getColors(t.getAnimatedValue())}):this.Dy(i),this._y,this.Ey,this.zy)},e.prototype.jy=function(){this.Oy=this.Oy.sort(this.Py),this.engine.xn()},e.prototype.Fl=function(){return this.Oy},e.prototype.dispose=function(){return this.Uy.ro(),this.Yy.ro(),i.prototype.dispose.call(this)},e}(mV),Ij=function(i,n,e){var r=i.fu();if(r.length>0){var s=(r[1].y-r[0].y)/2+r[0].y;return{x:n===t.PyramidLabelSide.Left?(r[0].x-r[1].x)/2+r[1].x-e:(r[2].x-(4===r.length?r[3].x:r[1].x))/2+(4===r.length?r[3].x:r[1].x)+e,y:s}}},Oj=function(t){var i=t.fu();if(i.length>0)return{x:(i[2].x-i[1].x)/2+i[1].x,y:(i[1].y-i[0].y)/2+i[0].y}},Pj=function(i){function e(){var n=null!==i&&i.apply(this,arguments)||this;return n.Zy=wV.NamePlusValue,n.qy=10,n.Sk=t.PyramidLabelSide.Left,n.mk=t.SliceLabelIndices.LabelsOnSides,n.Qy=[],n.$y=n.vn.sliceLabelConnectorStyle,n}return n(e,i),e.prototype.setLabelConnectorStyle=function(t){this.$y=t;for(var i=0;i<this.Qy.length;i+=1)this.Qy[i].na(this.$y);return this.engine.xn(),this},e.prototype.getLabelConnectorStyle=function(){return this.$y},e.prototype.setLabelConnectorGap=function(t){return this.qy=t,this.engine.xn(),this},e.prototype.getLabelConnectorGap=function(){return this.qy},e.prototype.setLabelSide=function(t){return this.Sk=t,this.engine.xn(),this},e.prototype.getLabelSide=function(){return this.Sk},e.prototype.Ky=function(i,n,e,r){for(var s=this.qy,o=0,h=0;h<i.length;h+=1)o=Math.max(o,i[h].sr.vi().x);var u=r.x+this.hh.left+this.hh.right,a=this.Sk===t.PyramidLabelSide.Right?(this.hh.left+(u-(this.hh.right+o)))/2:(this.hh.left+o+(u-this.hh.right))/2,f=r.x-o,c=l(f,r.y);Bj(i,this.lk,this.dk,c,this.hh,this.vk,this.yk,a),this.bk(i,this.Sk===t.PyramidLabelSide.Left?-1:1,-1,e,r);for(h=0;h<this.Qy.length;h+=1)this.Qy[h].$h().dispose();for(h=0;h<i.length;h+=1){var d=this.gk(i[h],-1,e,s);d&&this.tS(d)}},e.prototype.getMinimumSize=function(){return l(500,300)},e.prototype.bk=function(t,i,n,e,r){if(0!==t.length)for(var s,o=e.x+i*r.x*.5,h=1===n?Math.max:Math.min,u=0;u<t.length;u+=1){var a=t[u];0===a.jp.fu().length?a.sr.dispose():a.sr.isDisposed()&&a.sr.restore();var f=void 0;s&&(f=s.sr.kh().y+n*(s.sr.vi().y+10));var c=Ij(a.jp,this.Sk,0);if(c){var d=c.y,v=void 0===f?d:h(d,f);a.sr.ph(l(o,v)).Ah(i).Th(0)}s=a}},e.prototype.gk=function(i,n,e,r){var s=i.jp,o=i.sr,h=Ij(s,this.Sk,r);if(h){var u={x:mo(this.Sk===t.PyramidLabelSide.Left?o.kh().x-n*(r+o.vi().x):o.kh().x+n*(r+o.vi().x),h,e).x,y:bo(o.kh().y,h,e).y};return[h,u,l(this.Sk===t.PyramidLabelSide.Left?o.kh().x-n*(r+o.vi().x):o.kh().x+n*(r+o.vi().x),u.y)]}},e.prototype.tS=function(t){for(var i,n=0;n<this.Qy.length;n+=1)if(this.Qy[n].isDisposed()){i=this.Qy[n].restore();break}void 0===i&&(i=this.Yy.iS(this.pixelScale,void 0,[LV.InternalUI]).na(this.$y),this.Qy.push(i)),i.Qh(t)},e}(Lj),Dj=function(i){function e(){var n=null!==i&&i.apply(this,arguments)||this;return n.Zy=wV.Name,n.mk=t.SliceLabelIndices.LabelsInsideSlices,n}return n(e,i),e.prototype.Ky=function(t,i,n,e){var r=this.hh.left+e.x/2;Bj(t,this.lk,this.dk,e,this.hh,this.vk,this.yk,r);for(var s=0;s<t.length;s+=1){var o=t[s].jp,h=t[s].sr,u=Oj(o);u&&h.ph(u).Ah(0).Th(0)}},e.prototype.getMinimumSize=function(){return l(200,200)},e}(Lj),_j={LabelsOnSides:Pj,LabelsInsideSlices:Dj};t.PyramidLabelSide=void 0,(Tj=t.PyramidLabelSide||(t.PyramidLabelSide={}))[Tj.Right=0]="Right",Tj[Tj.Left=1]="Left";var Rj,zj=function(t,i,n,e,r,s){return t.alignmentX=(r+Math.PI/2)%(2*Math.PI)<=Math.PI?-1:1,t.alignmentY=r%(2*Math.PI)<=Math.PI?-1:1,t.paddingX=Math.cos(r)*s,t.paddingY=Math.sin(r)*s,t},Ej=function(t,i,n,e,r,s,o,h){if(0===i)return t.paddingX=h,t.alignmentX=-1,t};t.SpiderWebMode=void 0,(Rj=t.SpiderWebMode||(t.SpiderWebMode={}))[Rj.Normal=0]="Normal",Rj[Rj.Circle=1]="Circle";var Nj,Vj=function(){function i(t,i,n,e,r,s,o,h,u){this.gridLayer=t,this.labelLayer=i,this.scale=n,this.chart=e,this.tag=r,this.axisScale=s,this.Kk=o,this.uo=h,this.ao=u,this.shapeAxis=this.gridLayer.Gf(this.scale).setMouseInteractions(!1),this.shapeTag=this.labelLayer.$e(this.scale).Jn(this.tag).setMouseInteractions(!1),this.shapeNib=this.Kk(this,this.labelLayer.iS(this.scale,void 0,[LV.InternalUI])).na(this.chart.getNibStyle())}return i.prototype.Ky=function(i,n,e,r,s,o,h){var u=n.length,a=n[e>0?e-1:u-1],f=n[e],c=n[e<u-1?e+1:0],d=this.chart.getNibLength();this.shapeAxis.ha(i).Ku(f).na(this.chart.getAxisStyle()),this.shapeNib.$h().Qh(o===t.SpiderWebMode.Normal?[Us(f,a,Lr(.5*d/uo(co(a,f)),0,1)),f,Us(f,c,Lr(.5*d/uo(co(c,f)),0,1))]:function(t,i,n,e,r){void 0===r&&(r=2);for(var s=e/n,o=[],h=-e/2;h<=e/2;h+=r){var u=s*(h/e)+i,a=l(t.x+Math.cos(u)*n,t.y+Math.sin(u)*n);o.push(a)}return o}(i,r,s,d)),h?this.shapeTag.restore().ph(fo(f,l(h.paddingX,h.paddingY))).Ah(h.alignmentX).Th(h.alignmentY):this.shapeTag.dispose()},i.prototype.getLabelSize=function(){return this.shapeTag.ie(this.chart.getAxisLabelFont()).$n(this.chart.getAxisLabelStyle()).Fe().vi()},i.prototype.dispose=function(){this.shapeAxis&&this.shapeAxis.dispose(),this.shapeTag&&this.shapeTag.dispose(),this.shapeNib&&this.shapeNib.dispose(),this.uo(this)},i.prototype.restore=function(){this.shapeAxis.restore(),this.shapeTag.restore(),this.shapeNib.restore(),this.ao(this)},i.prototype.isDisposed=function(){return this.shapeAxis.isDisposed()&&this.shapeTag.isDisposed()&&this.shapeNib.isDisposed()},i}(),Gj=function(t,i,n,e,r){return t.addRow(i.getName()).addRow("Axis:","",e).addRow("Value:","",r(n))},Hj=function(i){function e(n,e,r,s,o,h,u,a,f,l,d){var v=i.call(this,n,f,l,d)||this;v.vr=n,v.wf=e,v.Iw=s,v.qk=o,v.vb=h,v.Jk=u,v.Qk=a,v.Mt="Spider Series",v.aa=new Map,v.tc=t.HighlightModes.onHover,v.Mg=Gj,v.$k=1,v.Lw=8,v.sh=0,v.tx=[],v.ix=v.wf.oo.Nr(void 0,Qo.easeOut),v.nx=v.wf.oo.Nr(void 0,Qo.ease),v.sx=function(){i.prototype.dispose.call(v),v.jp&&v.jp.dispose(),v.Ow&&v.Ow.dispose(),v.wf.xn()},v.scale=r;var y=v.vr.getSeries().length;return v.ox=new c(Fs(d.spiderSeriesFillStyle,y)),v.hx=new c(Fs(d.spiderSeriesStrokeStyle,y)),v.ux=new c(Fs(d.seriesPointFillStyle,y)),v.lx=d.uiTextFillStyle,v}return n(e,i),e.prototype.He=function(){return this.MS&&this.aa.size>0},e.prototype.addPoints=function(){for(var t=this,i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];i=i.filter((function(t){return void 0!==t.axis}));for(var e=0;e<i.length;e+=1)this.qk(i[e].axis);if(this.vr.getAnimationsEnabled()&&void 0!==this.ix){this.tx.forEach((function(t){var n=t[2];i.forEach((function(t){return n.delete(t.axis)}))}));var r=new Map(this.aa),s=new Map;i.forEach((function(t){return s.set(t.axis,t.value)}));var o=this.ix([[0,1]],(function(i){var n=i[0];s.forEach((function(i,e){var s=r.get(e)||0;t.aa.set(e,s+n*(i-s))})),t.wf.xn()}));o.onAnimationEnd((function(){t.tx.forEach((function(i,n){return i[0]===o?t.tx.splice(n,1):void 0}))})),this.tx.push([o,r,s])}else{for(e=0;e<i.length;e+=1){var h=i[e].axis;this.aa.set(h,i[e].value)}this.wf.xn()}return this},e.prototype.getValue=function(t,i){void 0===i&&(i=!1);var n=this.aa.get(t),e=this.vr.getOriginValue();if(void 0!==n)return i?e+this.$k*(n-e):n},e.prototype.setAnimationAddPoints=function(t,i){return this.ix=t?this.wf.oo.Nr(i,t):void 0,this},e.prototype.setDisposeAnimation=function(t,i){return this.nx=t?this.wf.oo.Nr(i,t):void 0,this},e.prototype.setCursorResultTableFormatter=function(t){return this.Mg=t,this.vr.engine.xn(),this},e.prototype.getCursorResultTableFormatter=function(){return this.Mg},e.prototype.setFillStyle=function(t){return this.ox.C(t),this.jp&&(this.jp.$n(this.ox.D(this.Bf)),this.wf.xn()),this},e.prototype.getFillStyle=function(){return this.ox.L()},e.prototype.setFillStyleHighlight=function(t){return this.ox.I(t),this.jp&&(this.jp.$n(this.ox.D(this.Bf)),this.wf.xn()),this},e.prototype.getFillStyleHighlight=function(){return this.ox.P()},e.prototype.setStrokeStyle=function(t){return this.hx.C(t),this.jp&&(this.jp.Ys(this.hx.L()),this.wf.xn()),this},e.prototype.getStrokeStyle=function(){return this.hx.L()},e.prototype.setStrokeStyleHighlight=function(t){return this.hx.I(t),this.jp&&(this.jp.Ys(this.hx.D(this.Bf)),this.wf.xn()),this},e.prototype.getStrokeStyleHighlight=function(){return this.hx.P()},e.prototype.setPointFillStyle=function(t){return this.ux.C(t),this.Ow&&(this.Ow.$n(this.ux.D(this.Bf)),this.wf.xn()),this},e.prototype.getPointFillStyle=function(){return this.ux.L()},e.prototype.setPointFillStyleHighlight=function(t){return this.ux.I(t),this.Ow&&(this.Ow.$n(this.ux.D(this.Bf)),this.wf.xn()),this},e.prototype.getPointFillStyleHighlight=function(){return this.ux.P()},e.prototype.setPointSize=function(t){return this.Lw=t,this.Ow&&this.Ow.oi(t),this},e.prototype.getPointSize=function(){return this.Lw},e.prototype.getPointShape=function(){return this.Iw},e.prototype.setPointRotation=function(t){return this.sh=t,this.Ow&&this.Ow.ne(t),this.wf.xn(),this},e.prototype.getPointRotation=function(){return this.sh},e.prototype.Tf=function(){if(i.prototype.Tf.call(this),!this.isDisposed()){for(var t=new Array(this.vb.length),n=this.vr.getOriginValue(),e=0;e<this.vb.length;e+=1){var r=this.aa.get(this.vb[e].tag);t[e]=void 0!==r?this.Jk(this.vb[e].tag,n+this.$k*(r-n)):this.Jk(this.vb[e].tag,n)}Ss(t),t.length>=3&&(this.jp||(this.jp=this.Cc(this.wf.Rc(this.scale,CE.Simple).Ys(this.hx.D(this.Bf)).$n(this.ox.D(this.Bf)))),this.jp.au(t),this.Ow||(this.Ow=this.Cc(this.wf.US(this.scale).oi(this.Lw).Zh(this.Iw).ne(this.sh).$n(this.ux.D(this.Bf)))),this.Ow.$h().Qh(t))}},e.prototype.attach=function(t,n){return void 0===n&&(n=!0),i.prototype.attach.call(this,t,n),ks(t,this.vn,{fill:this.ox,stroke:this.hx}),this},e.prototype.vx=function(){for(var t=0;t<this.sc.length;t+=1)ks(this.sc[t],this.vn,{fill:this.ox,stroke:this.hx})},e.prototype.solveNearestFromScreen=function(t){if(this.jp){var i=this.Qk(t);if(void 0!==i&&this.aa.has(i.tag)){var n=this.aa.get(i.tag),e=this.Jk(i.tag,n);return KG(e,this.scale,this.Mg(new _G,this,n,i.tag,this.vr.formatValue).Xf(),this,this.ox.L())}}},e.prototype.solveNearestFromSegment=function(t){return this.solveNearestFromScreen(t)},e.prototype.Ac=function(t,i){return t instanceof AE?t.$n(this.ox.D(i)).Ys(this.hx.D(i)):t.$n(this.ux.D(i)),this.wf.xn(),this},e.prototype.yx=function(t){var i=this;if(this.vr.getAnimationsEnabled()&&this.nx){this.Sx&&this.Sx.finish(!1);var n=this.$k,e=t;return this.Sx=this.nx([[0,1]],(function(t){i.$k=n+t[0]*(e-n),i.wf.xn()})),this.Sx.onAnimationEnd((function(){i.Sx=void 0})),this.Sx}},e.prototype.dispose=function(){var t=this.yx(0);return t?t.onAnimationEnd(this.sx):(this.$k=0,this.sx()),this},e.prototype.restore=function(){return this.yx(1),i.prototype.restore.call(this),this.jp&&this.jp.restore(),this.Ow&&this.Ow.restore(),this.wf.xn(),this},e.prototype.setHighlighted=function(t){return i.prototype.setHighlighted.call(this,t),this.vx(),this},e}(bH),jj=function(t,i){var n=Math.PI/2-2*t*Math.PI/i;return n>=0?n:n+2*Math.PI},Wj=function(t){return Ks(t.shapeTag.fn())},Uj=function(t){return Ks(t.fn())},Yj=function(i,n,e,r){return i.$u(0).ph(e).Zu(90).Ku(-270).ta(n===t.SpiderWebMode.Circle?void 0:r.length)},Xj={alignmentX:0,alignmentY:0,paddingX:0,paddingY:0},Zj={alignmentX:0,alignmentY:0,paddingX:0,paddingY:0},Kj=function(){Zj.alignmentX=0,Zj.alignmentY=0,Zj.paddingX=0,Zj.paddingY=0};!function(t){t[t.bg=0]="bg",t[t.axisBg=1]="axisBg",t[t.plotting=2]="plotting",t[t.fg=3]="fg",t[t.ui=4]="ui"}(Nj||(Nj={}));var qj,Jj=function(i){function e(n,e,r,s,u,a,f){var d=i.call(this,n,e,r,e.qs(Nj.bg),e.qs(Nj.ui),s,f,a?a.theme:void 0)||this;d.ng=t.AutoCursorModes.onHover,d.hh=p(20,20,20,20),d.axisScale=er.d1({scale1DConstructor:zo,dimension:"x"}).xi(0,1),d.vb=[],d.mx=[],d.bx=[],d.gx=Ho.expansion,d.wx=!0,d.kx=Ej,d.xx=zj,d.Mn=!0,d.lo=!0,d.Mx=t.SpiderWebMode.Normal,d.Ax=4,d.Fx=d.vn.spiderWebStyle,d.Tx=d.vn.spiderScaleLabelFillStyle,d.Cx=d.vn.spiderScaleLabelFont,d.Bx=5,d.Lx=d.vn.spiderAxisLabelFillStyle,d.Ix=d.vn.spiderAxisLabelFont,d.Ox=5,d.Px=d.vn.spiderAxisStyle,d.Dx=new c(d.vn.spiderAxisNibStyle),d.Ul=10,d._x=l(0,0),d.Rx=p(),d.removeAxis=function(t){for(var i=0;i<d.vb.length;i+=1){var n=d.vb[i];if(n===t||n.tag===t){d.vb.slice(i,1),d.Rf.xn();break}}return d},d.restoreAxis=function(t){return d.vb.push(t),d.engine.xn(),d},d.hasAxis=function(t){return d.vb.reduce((function(i,n){return i||n.tag===t}),!1)},d.formatValue=function(t){return d.axisScale.Wi(t,_o.Numeric)},d.zx=function(){return function(t){for(var i=t.length,n=0;n<i;n+=1)for(var e=n+1;e<i;e+=1)if(Rs(t[n],t[e]))return!0;return!1}(d.vb.map(Wj).concat(d.bx.map(Uj)))},d.Ex=function(){return d._f.Gc(d.pixelScale).setMouseInteractions(!1)},d.Nx=function(t){return t.dispose()},d.Vx=function(){return d.Pl.$e(d.pixelScale).setMouseInteractions(!1)},d.Gx=function(t){return t.dispose()},d.Hx=function(t){return d.formatValue(d.axisScale.getInnerStart()+t*(d.axisScale.getInnerEnd()-d.axisScale.getInnerStart()))},d.jx=function(t,i){var n,e,r=function(){void 0!==d.Wx&&d.Wx.finish(),n=b(d.axisScale.getInnerStart(),d.axisScale.getInnerEnd()),e=d.gx,d.gx=void 0},s=function(i,e,r,s,o){var h=l(r.x-e.x,e.y-r.y),u=d.vb.findIndex((function(i){return i===t}));if(u>=0&&void 0!==n){var a=jj(u,d.vb.length),f=l(Math.cos(a),Math.sin(a)),c=h.x*f.x+h.y*f.y,v=uo(co(t.shapeAxis.ji(),t.shapeAxis.Hi())),y=n.min+(n.max-n.min)*Math.max(1+c/v,.01);d.axisScale.xi(n.min,y),ss(o),d.engine.xn()}},o=function(){if(n=void 0,void 0!==e)if(d.Mn){var t=b(d.axisScale.getInnerStart(),d.axisScale.getInnerEnd()),i=d.Ux(),r=e;if(void 0!==i){var s=r.start(t.min,t.max,i.min,i.max),o=r.end(t.min,t.max,i.min,i.max);d.Wx=d._f.oo.Nr(300,Qo.ease)([[0,1]],(function(i){var n=h(i,1)[0];d.axisScale.xi(t.min+n*(s-t.min),t.max+n*(o-t.max))})),d.Wx.onAnimationEnd((function(){d.Wx=void 0,d.gx=r}))}else d.gx=e}else d.gx=e;e=void 0};i.setMouseEnterEventHandler(d.Yx).setMouseLeaveEventHandler(d.Xx).setMouseDragStartEventHandler(r).setMouseDragEventHandler((function(t,i,n,e,r){return s(0,l(i.clientX,i.clientY),e,0,i)})).setMouseDragStopEventHandler(o);var u=WE(new UE.Drag((function(t,i,n){d.Yx(t),r(),ss(n)}),s,(function(t,i,n,e){d.Xx(t),o(),ss(e)})));return i.setTouchStartEventHandler(u.onTouchStart).setTouchMoveEventHandler(u.onTouchMove).setTouchEndEventHandler(u.onTouchEnd)},d.Zx=function(t){d.wx&&!d.hasAxis(t)&&d.addAxis(t)},d.Jk=function(t,i){var n,e;try{for(var r=o(d.vb),s=r.next();!s.done;s=r.next()){var h=s.value;if(h.tag===t){var u=Math.max(Math.min((i-d.axisScale.getInnerStart())/(d.axisScale.getInnerEnd()-d.axisScale.getInnerStart()),1),0);return Us(h.shapeAxis.ji(),h.shapeAxis.Hi(),u)}}}catch(t){n={error:t}}finally{try{s&&!s.done&&(e=r.return)&&e.call(r)}finally{if(n)throw n.error}}},d.Qk=function(t){var i,n;if(0!==d.vb.length){var e,r=co(sr(t,d.engine.scale,d.pixelScale),d.vb[0].shapeAxis.ji()),s=Math.atan2(r.y,r.x),h=Is;try{for(var u=o(d.vb),a=u.next();!a.done;a=u.next()){var f=a.value,c=co(f.shapeAxis.Hi(),f.shapeAxis.ji()),l=Math.atan2(c.y,c.x),v=Math.abs(s-l);v<h&&(e=f,h=v)}}catch(t){i={error:t}}finally{try{a&&!a.done&&(n=u.return)&&n.call(u)}finally{if(i)throw i.error}}return e}},d.Yx=function(t){d.lo&&(t.na(d.Dx.O()),d.Rf.xn())},d.Xx=function(t){t.na(d.Dx.L()),d.Rf.xn()},d.Kx=e.qs(Nj.axisBg),d.Pg=e.qs(Nj.plotting),d.Pl=e.qs(Nj.fg),d.hy.Jn("Spider Chart");var v=Rr(a?a.autoCursorBuilder:void 0,UG);return d.og=v.tg(d.Rf,d.uiScale,d.uiScale,d.vn),d.hg=i.prototype.sg.call(d,d._f.Gc(d.pixelScale)).$n(d.vn.seriesBackgroundFillStyle).Ys(d.vn.seriesBackgroundStrokeStyle).Zu(90).Ku(-270).$u(0),a&&!0===a.disableAnimations&&d.setAnimationsEnabled(!1),d.oy(u,d.pixelScale),d}return n(e,i),e.prototype.addAxis=function(t){if("string"==typeof t){if(!this.hasAxis(t)){var i=new Vj(this.Kx,this.Pl,this.pixelScale,this,t,this.axisScale,this.jx,this.removeAxis,this.restoreAxis);this.vb.push(i)}}else t&&this.vb.push(t);return this.Rf.xn(),this},e.prototype.addSeries=function(i){void 0===i&&(i=t.PointShape.Circle);var n=new Hj(this,this.Pg,this.pixelScale,i,this.Zx,this.vb,this.Jk,this.Qk,this.JS,this.QS,this.vn);return this.im(n),n},e.prototype.getSeriesCount=function(){return this.ZS.length},e.prototype.getSeries=function(){return this.ZS},e.prototype.setWebMode=function(t){return this.Mx=t,this.Rf.xn(),this},e.prototype.getWebMode=function(){return this.Mx},e.prototype.setWebCount=function(t){return this.Ax=t,this.Rf.xn(),this},e.prototype.getWebCount=function(){return this.Ax},e.prototype.setWebStyle=function(t){return this.Fx="function"==typeof t?t(this.Fx):t,this.Rf.xn(),this},e.prototype.getWebStyle=function(){return this.Fx},e.prototype.setScaleLabelStyle=function(t){return this.Tx="function"==typeof t?t(this.Tx):t,this.Rf.xn(),this},e.prototype.getScaleLabelStyle=function(){return this.Tx},e.prototype.setScaleLabelFont=function(t){return this.Cx="function"==typeof t?t(this.Cx):t,this.Rf.xn(),this},e.prototype.getScaleLabelFont=function(){return this.Cx},e.prototype.setScaleLabelPadding=function(t){return this.Bx=t,this.Rf.xn(),this},e.prototype.getScaleLabelPadding=function(){return this.Bx},e.prototype.setScaleLabelStrategy=function(t){return this.kx=t,this.Rf.xn(),this},e.prototype.setScaleLabelFormatter=function(t){return this.formatValue=t,this.Rf.xn(),this},e.prototype.setAxisLabelStyle=function(t){return this.Lx="function"==typeof t?t(this.Lx):t,this.Rf.xn(),this},e.prototype.getAxisLabelStyle=function(){return this.Lx},e.prototype.setAxisLabelFont=function(t){return this.Ix="function"==typeof t?t(this.Ix):t,this.Rf.xn(),this},e.prototype.getAxisLabelFont=function(){return this.Ix},e.prototype.setAxisLabelPadding=function(t){return this.Ox=t,this.Rf.xn(),this},e.prototype.getAxisLabelPadding=function(){return this.Ox},e.prototype.setAxisLabelStrategy=function(t){return this.xx=t,this.Rf.xn(),this},e.prototype.setAxisStyle=function(t){return this.Px="function"==typeof t?t(this.Px):t,this.Rf.xn(),this},e.prototype.getAxisStyle=function(){return this.Px},e.prototype.setNibStyle=function(t){return this.Dx.C(t),this.Rf.xn(),this},e.prototype.getNibStyle=function(){return this.Dx.L()},e.prototype.setNibLength=function(t){return this.Ul=t,this.Rf.xn(),this},e.prototype.getNibLength=function(){return this.Ul},e.prototype.setAutoAxis=function(t){return this.wx=t,this},e.prototype.getAutoAxis=function(){return this.wx},e.prototype.setAnimationsEnabled=function(t){return this.Mn=t,this},e.prototype.getAnimationsEnabled=function(){return this.Mn},e.prototype.disableAnimations=function(){return this.setAnimationsEnabled(!1),this},e.prototype.setMouseInteractions=function(t){return this.lo=t,this},e.prototype.getMouseInteractions=function(){return this.lo},e.prototype.setAxisScrollStrategy=function(t){return this.gx=t,this.Rf.xn(),this},e.prototype.getAxisScrollStrategy=function(){return this.gx},e.prototype.setAxisInterval=function(t,i){return void 0===i&&(i=0),this.axisScale.xi(i,t),this.Rf.xn(),this},e.prototype.getOriginValue=function(){return this.axisScale.getInnerStart()},e.prototype.getEdgeValue=function(){return this.axisScale.getInnerEnd()},e.prototype.Tf=function(){var t,n,e,r,s,h;i.prototype.Tf.call(this);var u,a,f,c,d=this.vb.length,v=this.yy(),y=l(this.pixelScale.x.getInnerInterval()-(this.hh.left+this.hh.right),this.pixelScale.y.getInnerInterval()-(this.hh.bottom+this.hh.top+v)),S=(void 0===(u=0)&&(u=0),void 0===(a=0)&&(a=0),void 0===(f=0)&&(f=0),void 0===(c=0)&&(c=0),{left:u,top:a,right:f,bottom:c});if(void 0!==this.xx)for(var m=Math.min(y.x,y.y)/2,b=0;b<d;b+=1){var g=jj(b,d),w=Math.cos(g),k=Math.sin(g),x=this.vb[b].getLabelSize();Kj();var M=this.xx(Zj,b,d,this.vb[b].tag,g,this.Ox),A=l(w*m+M.paddingX,k*m+M.paddingY);w>0?S.right=Math.max(S.right,A.x+.5*(1-M.alignmentX)*x.x-m):S.left=Math.max(S.left,-A.x+.5*(M.alignmentX+1)*x.x-m),k>0?S.top=Math.max(S.top,A.y+.5*(1-M.alignmentY)*x.y-m):S.bottom=Math.max(S.bottom,-A.y+.5*(M.alignmentY+1)*x.y-m)}if(this.gx){var F=this.Ux();if(void 0!==F){var T=this.gx.start(this.axisScale.getInnerStart(),this.axisScale.getInnerEnd(),F.min,F.max),C=this.gx.end(this.axisScale.getInnerStart(),this.axisScale.getInnerEnd(),F.min,F.max);this.axisScale.xi(T,C)}}var B=l(this.pixelScale.x.getInnerStart()+(S.left+this.pixelScale.x.getInnerInterval()-S.right)/2,this.pixelScale.y.getInnerStart()+(S.bottom+this.pixelScale.y.getInnerInterval()-S.top)/2),L=Math.min(y.x/2-(S.left+S.right)/2,y.y/2-(S.bottom+S.top)/2);this._x=l(Math.max(y.x-(2*L+S.left+S.right),0),Math.max(y.y-(2*L+S.bottom+S.top),0)),this.Rx=p(this.Qt.left+this.hh.left+S.left,this.Qt.top+this.hh.top+v+S.top,this.Qt.right+this.hh.right+S.right,this.Qt.bottom+this.hh.bottom+S.bottom),this.Ky(B,L);try{for(var I=o(this.ZS),O=I.next();!O.done;O=I.next()){O.value.CS()}}catch(i){t={error:i}}finally{try{O&&!O.done&&(n=I.return)&&n.call(I)}finally{if(t)throw t.error}}try{for(var P=o(this.ZS),D=P.next();!D.done;D=P.next()){D.value.Tf()}}catch(t){e={error:t}}finally{try{D&&!D.done&&(r=P.return)&&r.call(P)}finally{if(e)throw e.error}}i.prototype.sy.call(this),this.ug();try{for(var _=o(this.ZS),R=_.next();!R.done;R=_.next()){R.value.BS()}}catch(t){s={error:t}}finally{try{R&&!R.done&&(h=_.return)&&h.call(_)}finally{if(s)throw s.error}}},e.prototype.dispose=function(){return this.Kx.ro(),this.Pg.ro(),this.Pl.ro(),i.prototype.dispose.call(this)},e.prototype.getMinimumSize=function(){return l(this.Rx.left+this.Rx.right+100,this.Rx.bottom+this.Rx.top+100)},e.prototype.Ky=function(t,i){for(var n,e,r,s,h=this.vb.length,u=[],a=0;a<h;a+=1){var f=jj(a,h),c=l(t.x+Math.cos(f)*i,t.y+Math.sin(f)*i);u.push(c)}Yj(this.hg,this.Mx,t,u),this.hg.qu(i),function(t,i,n,e,r,s,o,h){for(var u=t.length,a=s.length,f=i>0&&a>1,c=0;c<Math.max(i,u);c+=1)if(f&&c<i){c>=u&&t.push(o());var l=t[c];Yj(l,n,e,s);var d=r*((c+1)/i);l.qu(d)}else c<t.length&&h(t[c]);t.length=f?i:0}(this.mx,this.Ax,this.Mx,t,i,u,this.Ex,this.Nx);try{for(var d=o(this.mx),v=d.next();!v.done;v=d.next()){v.value.$n(Re).Ys(this.Fx)}}catch(t){n={error:t}}finally{try{v&&!v.done&&(e=d.return)&&e.call(d)}finally{if(n)throw n.error}}for(a=0;a<h;a+=1){var y=this.vb[a],S=jj(a,h);Kj();var m=void 0!==this.xx?this.xx(Zj,a,h,this.vb[a].tag,S,this.Ox):void 0;y.Ky(t,u,a,S,i,this.Mx,m)}!function(t,i,n,e,r,s,o,h,u,a){var f=r.length,c=t.length,d=0;if(void 0!==i)for(var v=0;v<f;v+=1)for(var y=r[v].tag,S=jj(v,f),m=0;m<n+ +(0===v);m+=1){Xj.alignmentX=0,Xj.alignmentY=0,Xj.paddingX=0,Xj.paddingY=0;var b=i(Xj,v,f,y,S,m,n,e);if(void 0!==b){d>=c&&t.push(h());var g=t[d];d+=1;var w=(n-m)/n,p=Us(s,o[v],w);g.ph(fo(p,l(b.paddingX,b.paddingY))).Ah(b.alignmentX).Th(b.alignmentY).Jn(a(w))}}for(var k=d;k<c;k+=1)u(t[k]);t.length=d}(this.bx,this.kx,this.Ax,this.Bx,this.vb,t,u,this.Vx,this.Gx,this.Hx);try{for(var b=o(this.bx),g=b.next();!g.done;g=b.next()){g.value.$n(this.Tx).ie(this.Cx)}}catch(t){r={error:t}}finally{try{g&&!g.done&&(s=b.return)&&s.call(b)}finally{if(r)throw r.error}}},e.prototype.Ux=function(){var t,i,n,e,r,s,h=this.getSeriesCount()>1;try{for(var u=o(this.vb),a=u.next();!a.done;a=u.next()){var f=a.value;try{for(var c=(n=void 0,o(this.ZS)),l=c.next();!l.done;l=c.next()){var d=l.value.getValue(f.tag,h);void 0!==d&&(r=void 0===r?d:Math.min(r,d),s=void 0===s?d:Math.max(s,d))}}catch(t){n={error:t}}finally{try{l&&!l.done&&(e=c.return)&&e.call(c)}finally{if(n)throw n.error}}}}catch(i){t={error:i}}finally{try{a&&!a.done&&(i=u.return)&&i.call(u)}finally{if(t)throw t.error}}if(void 0!==r&&void 0!==s)return b(r,s)},e}(rH),Qj={getWidth:function(t){return t.x},getHeight:function(t){return t.y},toVec2:function(t,i){return{x:t,y:i}},toPoint:function(t,i){return l(t,i)}},$j={getWidth:function(t){return t.y},getHeight:function(t){return t.x},toVec2:function(t,i){return{x:i,y:t}},toPoint:function(t,i){return l(i,t)}},tW={defaultDragMouseStyle:t.MouseStyles.Horizontal,getTitleTextRotation:function(){return 0},je:function(t){return t.getXMin()},We:function(t){return t.getXMax()},Ye:function(t){return t.eS().x}},iW={defaultDragMouseStyle:t.MouseStyles.Vertical,getTitleTextRotation:function(t){return 90*t},je:function(t){return t.getYMin()},We:function(t){return t.getYMax()},Ye:function(t){return t.eS().y}},nW=e(e({},Qj),tW),eW=e(e({},$j),iW),rW=function(t){function i(i,n,e,r,s){var o=t.call(this)||this;return o.wf=i,o.scale=n,o.qx=e,o.Jx=r,o.Qx=[],o.Bf=!1,o._c=!0,o.an=new qe,o.$x=function(t){return o.Qx.push(t),o.gf(t),t.setMouseInteractions(o._c),t},o.getHighlighted=function(){return o.Bf},o.vn=s,o}return n(i,t),i.prototype.onHighlight=function(t){return this.an.on("highlight",t)},i.prototype.offHighlight=function(t){return this.an.off(t)},i.prototype.dispose=function(){return this.Qx.forEach(Tr),this.qx&&this.qx(this),this.wf.oo.xn(),this},i.prototype.isDisposed=function(){return this.Qx.reduce((function(t,i){return function(t,i){return!!t&&i.isDisposed()}(t,i)}),!0)},i.prototype.restore=function(){return this.Jx&&this.Jx(this),this.Qx.forEach(Fr),this.wf.oo.xn(),this},i.prototype.setHighlighted=function(t){return this.Bf=t,this.an.emit("highlight",t),this.wf.xn(),this},i.prototype.setMouseInteractions=function(t){this._c=t;for(var i=0;i<this.Qx.length;i+=1)this.Qx[i].setMouseInteractions(this._c);return this},i.prototype.getMouseInteractions=function(){return this._c},i}(XE),sW=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.qx=function(t){var n=i.ic.findIndex((function(i){return i===t}));n>=0&&i.ic.splice(n,1),i.wf.xn()},i.Jx=function(t){i.ic.findIndex((function(i){return i===t}))<0&&i.ic.push(t),i.wf.xn()},i}return n(i,t),i.prototype.clear=function(){return this.ic.slice().forEach(Tr),this.ic.length=0,this.nc=0,this.wf.xn(),this},i.prototype.tM=function(t,i){void 0!==i?this.ic.splice(i,0,t):this.ic.push(t),Jr(!this.isDisposed())(t),t.setMouseInteractions(this.$f),this.Ac(t,this.getHighlighted()),t.onMouseEnter(this.hc),t.onMouseLeave(this.ac),t.onMouseClick(this.dc),t.onMouseDoubleClick(this.vc),t.onMouseDown(this.yc),t.onMouseUp(this.Sc),t.onMouseMove(this.cc),t.onMouseDragStart(this.mc),t.onMouseDrag(this.bc),t.onMouseDragStop(this.gc),t.onMouseWheel(this.wc),t.onTouchStart(this.kc),t.onTouchMove(this.xc),t.onTouchEnd(this.Mc),this.wf.xn()},i.prototype.Ac=function(t,i){t.setHighlighted(i)},i}(WH),oW=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return n(i,t),i}(rW),hW=function(i){function e(){var t=null!==i&&i.apply(this,arguments)||this;return t.iM=void 0,t.nM=function(){t.iM=void 0},t}return n(e,i),e.prototype.He=function(){return this.MS&&this.ic.length>0},e.prototype.setDefaultStyle=function(t){this.eM=t,this.ic.forEach(t),t(this.rM);for(var i=0;i<this.sc.length;i+=1)this.sM(this.sc[i]);return this},e.prototype.setHighlightMode=function(t){return this.tc=t,this.wf.xn(),this},e.prototype.getHighlightMode=function(){return this.tc},e.prototype.setCursorResultTableFormatter=function(t){return this.Mg=t,this.vr.engine.xn(),this},e.prototype.getCursorResultTableFormatter=function(){return this.Mg},e.prototype.solveNearestFromScreen=function(t){var i=qH(t,this.ic,this.oM,Hs);if(void 0!==i)return{location:sr(i[0],this.wf.oo.Rt,this.scale),scale:this.scale,resultTableContent:this.Mg(new _G,this,i[1]).Xf(),series:this,fillStyle:i[1].getDominantStyle(),figure:i[1]}},e.prototype.solveNearestFromSegment=function(t,i){var n=this.oM(i,t);if(void 0!==n)return{location:sr(n,this.wf.oo.Rt,this.scale),scale:this.scale,resultTableContent:this.Mg(new _G,this,i).Xf(),series:this,fillStyle:i.getDominantStyle(),figure:i}},e.prototype.tM=function(t){i.prototype.tM.call(this,t),this.eM&&this.eM(t)},e.prototype.clear=function(){return this.iM=void 0,i.prototype.clear.call(this)},e.prototype.getXMax=function(){return this.iM||(this.iM=this.hM()),this.iM.max.x},e.prototype.getXMin=function(){return this.iM||(this.iM=this.hM()),this.iM.min.x},e.prototype.getYMax=function(){return this.iM||(this.iM=this.hM()),this.iM.max.y},e.prototype.getYMin=function(){return this.iM||(this.iM=this.hM()),this.iM.min.y},e.prototype.eS=function(){return l(0,0)},e.prototype.hM=function(){for(var t=b(d(Is,Is),d(Os,Os)),i=0;i<this.ic.length;i+=1)if(!this.ic[i].isDisposed()){var n=this.ic[i].getBoundaries();t.min.x=Math.min(t.min.x,n.min.x),t.min.y=Math.min(t.min.y,n.min.y),t.max.x=Math.max(t.max.x,n.max.x),t.max.y=Math.max(t.max.y,n.max.y)}return t},e.prototype.attach=function(t,n){return void 0===n&&(n=!0),i.prototype.attach.call(this,t,n),this.sM(t),this},e.prototype.sM=function(t){ks(t,this.vn,{fill:this.rM.getDominantStyle()})},e.prototype.setHighlightOnHover=function(n){return i.prototype.setHighlightOnHover.call(this,n),n&&(this.tc=t.HighlightModes.onHoverIndividual),this},e}(sW),uW=function(t){function i(i,n,e,r,s,o,h,u,a,f,c,l,d){var v=t.call(this,i,n,e,r,d)||this;return v.wf=i,v.scale=n,v.dimensionStrategy=s,v.start=o,v.end=h,v.lowerExtreme=u,v.lowerQuartile=a,v.median=f,v.upperQuartile=c,v.upperExtreme=l,v.vn=d,v.boundaries=b(v.dimensionStrategy.toPoint(o,u),v.dimensionStrategy.toPoint(h,l)),v}return n(i,t),i.prototype.getBoundaries=function(){return this.boundaries},i}(oW),aW=function(t){function i(i,n,e,r,s,o,h,u,a,f,l,d,v){var y=t.call(this,i,n,e,r,s,o,h,u,a,f,l,d,v)||this;return y.wf=i,y.scale=n,y.dimensionStrategy=s,y.start=o,y.end=h,y.lowerExtreme=u,y.lowerQuartile=a,y.median=f,y.upperQuartile=l,y.upperExtreme=d,y.uM=1,y.aM=1,y.fM=y.$x(y.wf.Pc(y.scale)),y.cM=y.$x(y.wf.Gf(y.scale)),y.lM=y.$x(y.wf.Gf(y.scale)),y.dM=y.$x(y.wf.Gf(y.scale)),y.vM=y.$x(y.wf.Gf(y.scale)),y.yM=y.$x(y.wf.Gf(y.scale)),y.vn=v,y.SM=new c(y.vn.boxFigureStyle),y.mM=new c(y.vn.boxFigureStrokeStyle),y.ia=new c(y.vn.boxFigureLineStyle),y.bM=new c(y.vn.boxFigureMedianLineStyle),y.fM.$n(y.SM.D(!1)).Ys(y.mM.D(!1)),y.cM.na(y.mM.L()),y.lM.na(y.mM.L()),y.dM.na(y.mM.L()),y.vM.na(y.mM.L()),y.yM.na(y.mM.L()),y.Fe(),y}return n(i,t),i.prototype.setBodyWidth=function(t){return this.uM=t,this.Fe(),this},i.prototype.getBodyWidth=function(){return this.uM},i.prototype.setBodyFillStyle=function(t){return this.SM.C(t),this.fM.$n(this.SM.D(this.Bf)),this.wf.xn(),this},i.prototype.getBodyFillStyle=function(){return this.SM.L()},i.prototype.setBodyFillStyleHighlight=function(t){return this.SM.I(t),this.fM.$n(this.SM.D(this.Bf)),this},i.prototype.getBodyFillStyleHighlight=function(){return this.SM.P()},i.prototype.setBodyStrokeStyle=function(t){return this.mM.C(t),this.fM.Ys(this.mM.D(this.Bf)),this.wf.xn(),this},i.prototype.getBodyStrokeStyle=function(){return this.mM.L()},i.prototype.setBodyStrokeStyleHighlight=function(t){return this.mM.I(t),this.fM.Ys(this.mM.D(this.Bf)),this.wf.xn(),this},i.prototype.getBodyStrokeStyleHighlight=function(){return this.mM.P()},i.prototype.setTailWidth=function(t){return this.aM=t,this.Fe(),this},i.prototype.getTailWidth=function(){return this.aM},i.prototype.setStrokeStyle=function(t){this.ia.C(t);var i=this.ia.D(this.Bf);return this.cM.na(i),this.lM.na(i),this.dM.na(i),this.vM.na(i),this.wf.xn(),this},i.prototype.getStrokeStyle=function(){return this.ia.L()},i.prototype.setStrokeStyleHighlight=function(t){this.ia.I(t);var i=this.ia.D(this.Bf);return this.cM.na(i),this.lM.na(i),this.dM.na(i),this.vM.na(i),this.wf.xn(),this},i.prototype.getStrokeStyleHighlight=function(){return this.ia.P()},i.prototype.setMedianStrokeStyle=function(t){return this.bM.C(t),this.yM.na(this.bM.D(this.Bf)),this.wf.xn(),this},i.prototype.getMedianStrokeStyle=function(){return this.bM.L()},i.prototype.setMedianStrokeStyleHighlight=function(t){return this.bM.I(t),this.yM.na(this.bM.D(this.Bf)),this.wf.xn(),this},i.prototype.getMedianStrokeStrokeHighlight=function(){return this.bM.P()},i.prototype.Fe=function(){this.fM.ph(this.dimensionStrategy.toPoint((this.start+this.end-this.uM*(this.end-this.start))/2,this.lowerQuartile)).oi(this.dimensionStrategy.toPoint((this.end-this.start)*this.uM,this.upperQuartile-this.lowerQuartile)),this.cM.ha(this.dimensionStrategy.toPoint((this.start+this.end)/2,this.lowerQuartile)).Ku(this.dimensionStrategy.toPoint((this.start+this.end)/2,this.lowerExtreme)),this.lM.ha(this.dimensionStrategy.toPoint((this.start+this.end)/2,this.upperQuartile)).Ku(this.dimensionStrategy.toPoint((this.start+this.end)/2,this.upperExtreme)),this.dM.ha(this.dimensionStrategy.toPoint((this.start+this.end-this.aM*(this.end-this.start))/2,this.lowerExtreme)).Ku(this.dimensionStrategy.toPoint((this.start+this.end+this.aM*(this.end-this.start))/2,this.lowerExtreme)),this.vM.ha(this.dimensionStrategy.toPoint((this.start+this.end-this.aM*(this.end-this.start))/2,this.upperExtreme)).Ku(this.dimensionStrategy.toPoint((this.start+this.end+this.aM*(this.end-this.start))/2,this.upperExtreme)),this.yM.ha(this.dimensionStrategy.toPoint((this.start+this.end-this.uM*(this.end-this.start))/2,this.median)).Ku(this.dimensionStrategy.toPoint((this.start+this.end+this.uM*(this.end-this.start))/2,this.median)),this.wf.xn()},i.prototype.getDominantStyle=function(){return this.fM.Qn()},i.prototype.setHighlighted=function(i){this.fM.$n(this.SM.D(i)),this.fM.Ys(this.mM.D(i));var n=this.ia.D(i);return this.yM.na(this.bM.D(i)),this.cM.na(n),this.lM.na(n),this.dM.na(n),this.vM.na(n),this.wf.xn(),t.prototype.setHighlighted.call(this,i)},i}(uW),fW=function(t){function i(i,n,e,r,s,o){var h=t.call(this,i,n,e,r,o)||this;return h.wf=i,h.scale=n,h.positive=s,h.th=0,h.gM=0,h.wM=0,h.pM=0,h.kM=0,h.xM=0,h.MM=-1,h.vn=o,h}return n(i,t),i.prototype.AM=function(t,i,n,e,r,s){return this.th=t,this.gM=i,this.wM=n,this.pM=e,this.kM=r,this.MM=s,this.Fe(),this.wf.xn(),this},i.prototype.ou=function(t){return this.xM=t,this.Fe(),this.wf.xn(),this},i.prototype.getPosition=function(){return this.th},i.prototype.getOpen=function(){return this.gM},i.prototype.getHigh=function(){return this.wM},i.prototype.getLow=function(){return this.pM},i.prototype.getClose=function(){return this.kM},i.prototype.FM=function(){return this.xM},i.prototype.getDataIndices=function(){return this.MM},i}(rW),cW=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.ia=new c(i.vn.candleStickStyle,i.vn.candleStickStyleHighlight),i.SM=new c(i.positive?i.vn.candleStickPositiveStyle:i.vn.candleStickNegativeStyle),i.mM=new c(i.positive?i.vn.candleStickPositiveStrokeStyle:i.vn.candleStickNegativeStrokeStyle),i.TM=i.$x(i.wf.Gf(i.scale)),i.fM=i.$x(i.wf.Pc(i.scale)),i.CM=i.$x(i.wf.Gf(i.scale)),i}return n(i,t),i.prototype.setStrokeStyle=function(t){return this.ia.C(t),this.Fe(),this},i.prototype.getStrokeStyle=function(){return this.ia.L()},i.prototype.setStrokeStyleHighlight=function(t){return this.ia.I(t),this.Fe(),this},i.prototype.getStrokeStyleHighlight=function(){return this.ia.P()},i.prototype.setBodyFillStyle=function(t){return this.SM.C(t),this.Fe(),this},i.prototype.getBodyFillStyle=function(){return this.SM.L()},i.prototype.setBodyFillStyleHighlight=function(t){return this.SM.I(t),this.Fe(),this},i.prototype.getBodyFillStyleHighlight=function(){return this.SM.P()},i.prototype.setBodyStrokeStyle=function(t){return this.mM.C(t),this.Fe(),this},i.prototype.getBodyStrokeStyle=function(){return this.mM.L()},i.prototype.setBodyStrokeStyleHighlight=function(t){return this.mM.I(t),this.Fe(),this},i.prototype.getBodyStrokeStyleHighlight=function(){return this.mM.P()},i.prototype.getDominantStyle=function(){return this.SM.D(this.Bf)},i.prototype.Fe=function(){this.TM.ha(l(this.th,this.pM)).Ku(l(this.th,Math.min(this.kM,this.gM))).na(this.ia.D(this.Bf)),this.fM.ph(l(this.th-this.xM/2,Math.min(this.kM,this.gM))).oi(l(this.xM,Math.abs(this.kM-this.gM))).$n(this.SM.D(this.Bf)).Ys(this.mM.D(this.Bf)),this.CM.ha(l(this.th,Math.max(this.kM,this.gM))).Ku(l(this.th,this.wM)).na(this.ia.D(this.Bf)),this.wf.xn()},i.prototype.setHighlighted=function(i){return t.prototype.setHighlighted.call(this,i),this.Fe(),this},i}(fW),lW=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.BM=new c(i.positive?i.vn.OHLCBarPositiveStyle:i.vn.OHLCBarNegativeStyle),i.LM=i.$x(i.wf.Gf(i.scale)),i.IM=i.$x(i.wf.Gf(i.scale)),i.OM=i.$x(i.wf.Gf(i.scale)),i}return n(i,t),i.prototype.setStrokeStyle=function(t){return this.BM.C(t),this.Fe(),this},i.prototype.getStrokeStyle=function(){return this.BM.L()},i.prototype.setStrokeStyleHighlight=function(t){return this.BM.I(t),this.Fe(),this},i.prototype.getStrokeHighlight=function(){return this.BM.P()},i.prototype.getDominantStyle=function(){var t=this.BM.D(this.Bf);return t instanceof nr?t.getFillStyle():Re},i.prototype.Fe=function(){this.LM.ha(l(this.th-this.xM/2,this.gM)).Ku(l(this.th,this.gM)).na(this.BM.D(this.Bf)),this.OM.ha(l(this.th,this.kM)).Ku(l(this.th+this.xM/2,this.kM)).na(this.BM.D(this.Bf)),this.IM.ha(l(this.th,this.pM)).Ku(l(this.th,this.wM)).na(this.BM.D(this.Bf)),this.wf.xn()},i.prototype.setHighlighted=function(i){return t.prototype.setHighlighted.call(this,i),this.Fe(),this},i}(fW),dW={Candlestick:cW,Bar:lW};t.StepOptions=void 0,(qj=t.StepOptions||(t.StepOptions={}))[qj.before=0]="before",qj[qj.middle=.5]="middle",qj[qj.after=1]="after";var vW=function(t,i){var n=[],e=t.length,r=i;if(e>0){var s=0,o=t[0];n[s]=o,s+=1;for(var h=1;h<e;h+=1){var u=t[h];if(r<=0)n[s]=l(o.x,u.y),s+=1;else{var a=o.x*(1-r)+u.x*r;n[s]=l(a,o.y),n[s+=1]=l(a,u.y),s+=1}n[s]=u,s+=1,o=u}}return n},yW=function(t,i){void 0===i&&(i=32);for(var n,e,r,s,o,h,u,a=function(t){var i=1e-5,n=t.length-1,e=Array(n);if(n>1)for(var r=l(0,0),s=l(0,0),o=l(0,0),h=oo(co(t[1],t[0])),u=0,a=0,f=0;f<n;f+=1){var c=Array(4);if(c[0]=t[f],c[1]=t[f],c[3]=t[f+1],c[2]=t[f+1],o=h,r=s,f+1<n?(h=t[f+2]===t[f+1]?l(0,0):oo(co(t[f+2],t[f+1])),s=oo(fo(o,h))):s=l(0,0),t[f+1].y===t[f].y)u=0,a=0;else{var d=t[f+1].x-t[f].x;u=Math.abs(r.x)>i?Math.abs(d/(3*r.x)):1,a=Math.abs(s.x)>i?Math.abs(d/(3*s.x)):1}c[1]=fo(ao(r,u),c[1]),c[2]=co(c[2],ao(s,a)),e[f]=c}return e.length>0?e:[]}(t),f=a.length,c=Array(f*i),d=0,v=0;v<f;v+=1)for(var y=0;y<=i;y+=1)c[d]=(n=y/i,e=a[v],r=void 0,s=void 0,o=void 0,h=void 0,u=void 0,s=(r=n*n)*n,l((u=(h=(o=1-n)*o)*o)*e[0].x+3*n*h*e[1].x+3*r*o*e[2].x+s*e[3].x,u*e[0].y+3*n*h*e[1].y+3*r*o*e[2].y+s*e[3].y)),d+=1;return c},SW=function(t){function i(i,n,e,r,s,o,h,u,a,f,d,v,y,S){var m=t.call(this,i,n,e,r,s,o,h,u,a,f,v)||this;return m.Iw=d,m.PM=y,m.Mt="Point Line series",m.Bp=1e5,m.Lw=5,m.sh=0,m.Rh=!1,m.zh=!1,m.Eh=!1,m.DM=!0,m._M="nearest-x",m.RM=1,m.zM=[],m.EM=function(t){if(m.ic.length>0){var i=m.ic[m.ic.length-1];if(t.length>0){var n=i.Xh(),e=i.Yh(),r=n.length+e.length-+i.Tu();if(r>=m.Bp){var s=e.length>0?e[e.length-1]:n[i.Tu()?r:r-1],o=l((s.x+t[0].x)/2,(s.y+t[0].y)/2);i.Qh(o,b(l(o.x,o.y),l(o.x,o.y))).Cu(!0),m.Cc(m.NM([o].concat(t)).Fu(!0))}else i.Qh(t,m._S)}}else t.length>0&&m.Cc(m.NM(t))},m.VM=function(t){if(m.zM.length>0){var i=m.zM[m.zM.length-1];if(t.length>0)(i.Xh().length+i.Yh().length)*m.RM>=m.Bp?m.Cc(m.GM(t),m.zM):i.Qh(t)}else t.length>0&&m.Cc(m.GM(t),m.zM)},m.HM=function(t,i){var n=t.Cw(i);if(n)return sr(n,m.scale,m.wf.oo.Rt)},m.jM=function(t,i){var n=t.WM(i);if(n)return sr(n,m.scale,m.wf.oo.Rt)},m.vn=v,m.UM=new c(Fs(v.seriesPointFillStyle,S)),m.ia=new c(Fs(m.vn.seriesStrokeStyle,S)),m}return n(i,t),i.prototype.add=function(i){return t.prototype.add.call(this,i),this},i.prototype.Lp=function(){return YH(this.zM)},i.prototype.setStrokeStyle=function(t){this.ia.C(t);for(var i=this.ia.D(this.Bf),n=0;n<this.ic.length;n+=1)this.ic[n].na(i);return this.wf.xn(),this},i.prototype.getStrokeStyle=function(){return this.ia.L()},i.prototype.setStrokeStyleHighlight=function(t){if(this.ia.I(t),this.getHighlighted())for(var i=this.ia.D(!0),n=0;n<this.ic.length;n+=1)this.ic[n].na(i);return this.wf.xn(),this},i.prototype.getStrokeStyleHighlight=function(){return this.ia.D(!0)},i.prototype.setPointFillStyle=function(t){this.UM.C(t);for(var i=this.UM.D(this.Bf),n=0;n<this.zM.length;n+=1)this.zM[n].$n(i);return this.wf.xn(),this},i.prototype.getPointFillStyle=function(){return this.UM.L()},i.prototype.setPointFillStyleHighlight=function(t){if(this.UM.I(t),this.getHighlighted())for(var i=this.UM.D(!0),n=0;n<this.zM.length;n+=1)this.zM[n].$n(i);return this.wf.xn(),this},i.prototype.getPointFillStyleHighlight=function(){return this.UM.D(!0)},i.prototype.setPointSize=function(t){this.Lw=t;for(var i=0;i<this.zM.length;i+=1)this.zM[i].oi(t);return this.wf.xn(),this},i.prototype.getPointSize=function(){return this.Lw},i.prototype.getPointShape=function(){return this.Iw},i.prototype.setPointRotation=function(t){this.sh=t;for(var i=0;i<this.zM.length;i+=1)this.zM[i].ne(t);return this.wf.xn(),this},i.prototype.getPointRotation=function(){return this.sh},i.prototype.setIndividualPointSizeEnabled=function(t){this.Rh=t;for(var i=0;i<this.zM.length;i+=1)this.zM[i].Kh(t);return this.wf.xn(),this},i.prototype.getIndividualPointSizeEnabled=function(){return this.Rh},i.prototype.setIndividualPointRotationEnabled=function(t){this.zh=t;for(var i=0;i<this.zM.length;i+=1)this.zM[i].qh(t);return this.wf.xn(),this},i.prototype.getIndividualPointRotationEnabled=function(){return this.zh},i.prototype.setIndividualPointValueEnabled=function(t){this.Eh=t;for(var i=0;i<this.zM.length;i+=1)this.zM[i].Jh(t);return this.wf.xn(),this},i.prototype.getIndividualPointValueEnabled=function(){return this.Eh},i.prototype.setCursorInterpolationEnabled=function(t){return this.DM=t,this.wf.oo.xn(),this},i.prototype.getCursorInterpolationEnabled=function(){return this.DM},i.prototype.setCursorSolveBasis=function(t){return this._M=t,this.ic.forEach((function(i){return i.Uh(nE(t))})),this.zM.forEach((function(i){return i.Uh(nE(t))})),this.wf.xn(),this},i.prototype.getCursorSolveBasis=function(){return this._M},i.prototype.ml=function(){return xs(this.UM)||xs(this.ia.L().getFillStyle())},i.prototype.pp=function(t){},i.prototype.Ac=function(t,i){t instanceof VE?t.na(this.ia.D(i)):t.$n(this.UM.D(i)),this.wf.xn()},i.prototype.DS=function(t){var i=this.ic.length>0?this.ic[this.ic.length-1].Xh().length+this.ic[this.ic.length-1].Yh().length-+this.ic[this.ic.length-1].Tu():void 0;UH(t,i,this.Bp,this.EM),UH(t,i,this.Bp,this.VM)},i.prototype.GM=function(t,i){return this.wf.US(this.scale).Qh(t,i).setMouseInteractions(this.$f).$n(this.UM.D(this.Bf)).Zh(this.Iw).oi(this.Lw).ne(this.sh).Kh(this.Rh).qh(this.zh).Jh(this.Eh).Uh(nE(this._M))},i.prototype.NM=function(t,i){return this.wf.iS(this.scale,void 0,u([LV.UserSeries],h(this.PM))).Qh(t,i).setMouseInteractions(this.$f).na(this.ia.D(this.Bf)).Uh(nE(this._M))},i.prototype.attach=function(i,n){return void 0===n&&(n=!0),ks(i,this.vn,{stroke:this.ia,fill:this.UM}),t.prototype.attach.call(this,i,n)},i.prototype.getPointAmount=function(){return this.zM.reduce((function(t,i){return t+i.tu()+i.iu()}),this.aa.length)},i.prototype.setHighlighted=function(i){for(var n=this.UM.D(i),e=0;e<this.zM.length;e+=1)this.zM[e].$n(n);return t.prototype.setHighlighted.call(this,i),this},i.prototype.clear=function(){t.prototype.clear.call(this);for(var i=0;i<this.ic.length;i+=1)this.ic[i].dispose();this.ic.length=0;for(i=0;i<this.zM.length;i+=1)this.zM[i].dispose();return this.zM.length=0,this},i.prototype.dispose=function(){t.prototype.dispose.call(this);for(var i=0;i<this.zM.length;i+=1)this.zM[i].dispose();return this},i.prototype.restore=function(){t.prototype.restore.call(this);for(var i=0;i<this.zM.length;i+=1)this.zM[i].restore();return this},i.prototype.Cp=function(i,n,e,r){t.prototype.Cp.call(this,i,n,e,r),this.Ap.Cp(this.zM,n,e,r,this.scale)},i.prototype.solveNearestFromScreen=function(t,i){void 0===i&&(i=this.DM);var n=qH(t,this.ic,i?this.jM:this.HM,"nearest-x"===this._M?function(t,i){return Math.abs(t.x-i.x)}:"nearest-y"===this._M?function(t,i){return Math.abs(t.y-i.y)}:function(t,i){return Math.pow(t.x-i.x,2)+Math.pow(t.y-i.y,2)});if(void 0!==n){var e=sr(n[0],this.wf.oo.Rt,this.scale),r=n[1].ea();return KG(e,this.scale,this.Mg(new _G,this,e.x,e.y,e).Xf(),this,r instanceof nr?r.getFillStyle():void 0)}},i.prototype.solveNearestFromSegment=function(t,i,n){if(void 0===n&&(n=this.DM),i instanceof VE){var e=n?i.WM(t):i.Cw(t),r=i.ea();if(e)return KG(e,this.scale,this.Mg(new _G,this,e.x,e.y,e).Xf(),this,r instanceof nr?r.getFillStyle():void 0)}else{if(e=i.Pw(t))return KG(e,this.scale,this.Mg(new _G,this,e.x,e.y,e).Xf(),this,this.UM.D(this.Bf))}},i}(KH),mW=32,bW=function(t,i){return t.Yh().length>=i?t.Yh().slice(-i):Array.prototype.concat(t.Xh(),t.Yh()).slice(-i)},gW=function(t,i,n){var e=Array.prototype.concat(t.Xh(),t.Yh()).slice(0,-n-1).concat(i.slice(n+1,2*n+2));t.$h().Qh(e).Fe()},wW=function(t){function i(i,n,e,r,s,o,h,u,a,f,c,l,d,v){var y=t.call(this,i,n,e,r,s,o,h,u,a,f,c,l,d,v)||this;return y.Mt="Spline Series",y.RM=mW,y.Bp=8e3,y.YM=function(t){if(0!==t.length){var i=y.zM.length;if(i>0){var n=i>1,e=y.zM[i-1];if(n){if((v=(d=Array.prototype.concat(e.Xh(),e.Yh())).length)*mW>=y.Bp){var r=bW(e,3),s=Array.prototype.concat(r,t),o=yW(s,mW);gW(y.ic[i-1],o,mW),y.Cc(y.NM(o.slice(66)))}else if(v<5){var h=y.zM[i-2],u=(r=bW(h,3),s=Array.prototype.concat(r,d,t),o=yW(s,mW),y.ic[i-1]),a=o.slice(66);u.$h().Qh(a).Fe()}else{u=y.ic[i-1];var f=Array.prototype.concat(u.Xh(),u.Yh()),c=bW(e,4),l=(s=Array.prototype.concat(c,t),o=yW(s,mW),f.slice(0,-66).concat(o.slice(33)));u.$h().Qh(l).Fe()}}else{var d,v=(d=Array.prototype.concat(e.Xh(),e.Yh())).length;u=y.ic[i-1];if(v*mW>=y.Bp){r=bW(e,3),s=Array.prototype.concat(r,t),o=yW(s,mW);gW(y.ic[0],o,mW),y.Cc(y.NM(o.slice(66)))}else if(v+t.length>2){s=Array.prototype.concat(d,t),o=yW(s,mW);u.$h().Qh(o).Fe()}else u.Qh(t)}}else{var S=t.length>2?yW(t,mW):t,m=Ks(S);y.Cc(y.NM(S,m))}y.VM(t)}},y.XM=function(t,i){var n=t.Pw(i);if(n)return sr(n,y.scale,y.wf.oo.Rt)},y.vn=l,y}return n(i,t),i.prototype.setCursorInterpolationEnabled=function(i){return t.prototype.setCursorInterpolationEnabled.call(this,i)},i.prototype.DS=function(t){var i=this.zM.length,n=this.zM.length>0?this.zM[i-1].Xh().length+this.zM[i-1].Yh().length:void 0;UH(t,n,Math.ceil(this.Bp/this.RM),this.YM)},i.prototype.solveNearestFromScreen=function(i,n){if(void 0===n&&(n=this.DM),n)return t.prototype.solveNearestFromScreen.call(this,i,n);var e=qH(i,this.zM,this.XM,"nearest-x"===this._M?function(t,i){return Math.abs(t.x-i.x)}:"nearest-y"===this._M?function(t,i){return Math.abs(t.y-i.y)}:function(t,i){return Math.pow(t.x-i.x,2)+Math.pow(t.y-i.y,2)});if(void 0!==e){var r=sr(e[0],this.wf.oo.Rt,this.scale);return KG(r,this.scale,this.Mg(new _G,this,r.x,r.y,r).Xf(),this,e[1].Qn())}},i.prototype.solveNearestFromSegment=function(i,n,e){if(void 0===e&&(e=this.DM),e||n instanceof xE)return t.prototype.solveNearestFromSegment.call(this,i,n,e);var r=qH(i,this.zM,this.XM,"nearest-x"===this._M?function(t,i){return Math.abs(t.x-i.x)}:"nearest-y"===this._M?function(t,i){return Math.abs(t.y-i.y)}:function(t,i){return Math.pow(t.x-i.x,2)+Math.pow(t.y-i.y,2)});if(void 0!==r){var s=sr(r[0],this.wf.oo.Rt,this.scale),o=n.ea();return KG(s,this.scale,this.Mg(new _G,this,s.x,s.y,s).Xf(),this,o instanceof nr?o.getFillStyle():void 0)}},i.prototype.setMaxPointCount=function(i){return t.prototype.setMaxPointCount.call(this,void 0!==i&&i>0?33*i:0),this},i}(SW),pW=function(){function t(){this.$i="FreeformPattern",this.yu=iE()}return t.prototype.Cp=function(t,i,n,e,r){if(e>0){var s=Math.trunc((i-e)/n);if(s>0&&t.length>1)for(var o=t.splice(0,s),h=0;h<o.length;h+=1)o[h].dispose()}},t.prototype.ZM=function(t,i){var n=t.x-i.x,e=t.y-i.y;return Math.sqrt(n*n+e*e)},t.prototype.getXMax=function(t,i){return void 0===t&&(t=[]),Kr(t,Er,Math.max,Wr,i)},t.prototype.getXMin=function(t,i){return void 0===t&&(t=[]),Kr(t,zr,Math.min,jr,i)},t.prototype.getYMax=function(t,i){return void 0===t&&(t=[]),Kr(t,Vr,Math.max,Yr,i)},t.prototype.getYMin=function(t,i){return void 0===t&&(t=[]),Kr(t,Nr,Math.min,Ur,i)},t}(),kW=function(t){switch(t){case"normal":return 1;case"high":return.25;default:return 1}},xW=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return n(i,t),i.prototype.Cp=function(t,i,n,e,r){if(e>0){var s=Math.ceil(e/n),o=t.length-s;if(o>0){var h=this.KM(t,r);if(h>0){var u=o-h>0?h:o;if(u>0){for(var a=0;a<u;a+=1)t[a].dispose();t.splice(0,u)}}}}},i}(me({yu:iE()})),MW=function(t,i){var n=i.Nt();return t?Math.min(n,t):n},AW=function(t,i){var n=i.Vt();return t?Math.max(n,t):n},FW=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return n(i,t),i.prototype.ZM=function(t,i){return Math.abs(t.x-i.x)},i.prototype.getYMax=function(t,i){return void 0===t&&(t=[]),t.reduce(AW,i?i.max.y:void 0)},i.prototype.getYMin=function(t,i){return void 0===t&&(t=[]),t.reduce(MW,i?i.min.y:void 0)},i}(xW),TW=function(t){function i(){var i=t.call(this,{yu:Jz()})||this;return i.$i="HorizontalProgressivePattern",i}return n(i,t),i.prototype.KM=function(t,i){var n=t.length,e=Math.min(i.x.getInnerStart(),i.x.getInnerEnd()),r=0;if(n>1)for(var s=0;s<n-1;s+=1)i.x.Li(t[s].Et(),t[s].cu())<e&&(r+=1);return r},i.prototype.getXMax=function(t,i){return void 0===t&&(t=[]),void 0!==i?i?i.max.x:void 0:t.length>0?t[t.length-1].Et():void 0},i.prototype.getXMin=function(t,i){return void 0===t&&(t=[]),t.length>0&&t[0].tu()>0?t[0].zt():i?i.min.x:void 0},i.prototype.setPrecision=function(t){return this.set("_columnPackaging",Jz(kW(t)))},i}(FW),CW=function(t){function i(){var i=t.call(this,{yu:Qz()})||this;return i.$i="HorizontalRegressivePattern",i}return n(i,t),i.prototype.KM=function(t,i){var n=t.length,e=Math.max(i.x.getInnerStart(),i.x.getInnerEnd()),r=0;if(n>1)for(var s=0;s<n-1;s+=1)e<i.x.Li(t[s].zt(),-t[s].cu())&&(r+=1);return r},i.prototype.getXMax=function(t,i){return void 0===t&&(t=[]),t.length>0&&t[0].tu()>0?t[0].Et():i?i.max.x:void 0},i.prototype.getXMin=function(t,i){return void 0===t&&(t=[]),void 0!==i?i?i.min.x:void 0:t.length>0?t[t.length-1].zt():void 0},i.prototype.setPrecision=function(t){return this.set("_columnPackaging",Qz(kW(t)))},i}(FW),BW=function(t,i){var n=i.zt();return t?Math.min(n,t):n},LW=function(t,i){var n=i.Et();return t?Math.max(n,t):n},IW=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return n(i,t),i.prototype.ZM=function(t,i){return Math.abs(t.y-i.y)},i.prototype.getXMax=function(t,i){return void 0===t&&(t=[]),t.reduce(LW,i?i.max.x:void 0)},i.prototype.getXMin=function(t,i){return void 0===t&&(t=[]),t.reduce(BW,i?i.min.x:void 0)},i}(xW),OW=function(t){function i(){var i=t.call(this,{yu:$z()})||this;return i.$i="VerticalProgressivePattern",i}return n(i,t),i.prototype.KM=function(t,i){var n=t.length,e=Math.min(i.y.getInnerStart(),i.y.getInnerEnd()),r=0;if(n>1)for(var s=0;s<n-1;s+=1)i.y.Li(t[s].Vt(),t[s].lu())<e&&(r+=1);return r},i.prototype.getYMax=function(t,i){return void 0===t&&(t=[]),void 0!==i?i?i.max.y:void 0:t.length>0?t[t.length-1].Vt():void 0},i.prototype.getYMin=function(t,i){return void 0===t&&(t=[]),t.length>0&&t[0].tu()>0?t[0].Nt():i?i.min.y:void 0},i.prototype.setPrecision=function(t){return this.set("_columnPackaging",$z(kW(t)))},i}(IW),PW=function(t){function i(){var i=t.call(this,{yu:tE()})||this;return i.$i="VerticalRegressivePattern",i}return n(i,t),i.prototype.KM=function(t,i){var n=t.length,e=Math.max(i.y.getInnerStart(),i.y.getInnerEnd()),r=0;if(n>1)for(var s=0;s<n-1;s+=1)e<i.y.Li(t[s].Nt(),-t[s].lu())&&(r+=1);return r},i.prototype.getYMax=function(t,i){return void 0===t&&(t=[]),t.length>0&&t[0].tu()>0?t[0].Vt():i?i.max.y:void 0},i.prototype.getYMin=function(t,i){return void 0===t&&(t=[]),void 0!==i?i?i.min.y:void 0:t.length>0?t[t.length-1].Nt():void 0},i.prototype.setPrecision=function(t){return this.set("_columnPackaging",tE(kW(t)))},i}(IW),DW={horizontalProgressive:new TW,horizontalRegressive:new CW,verticalProgressive:new OW,verticalRegressive:new PW,freeform:new pW},_W=function(t){function i(i,n,e,r,s,o,h,u,a,f,c,d,v,y){var S=t.call(this,i,n,e,r,s,o,h,u,a,DW.horizontalProgressive,f,d,v,y)||this;return S.Mt="Step Series",S.EM=function(t){var i=S.ic.length>0?S.ic[S.ic.length-1].Xh().length+S.ic[S.ic.length-1].Yh().length:void 0;UH(t,i,S.Bp,S.qM)},S.qM=function(t){var i=t.length;if(S.ic.length>0){var n=S.ic[S.ic.length-1];if(i>0){var e=n.Xh(),r=n.Yh(),s=r.length>0?r[r.length-1]:e[e.length-1],o=vW([s].concat(t),S.wt);o.shift();var h=l((s.x+o[0].x)/2,(s.y+o[0].y)/2),u=Array.prototype.concat(h,o);(r.length>0?e.length+r.length:e.length)>=S.Bp?(n.Qh(h,b(l(h.x,h.y),l(h.x,h.y))).Cu(!0),S.Cc(S.NM(u).Fu(!0)),S.zM.push(S.GM(t))):n.Qh(u)}}else i>0&&S.Cc(S.NM(vW(t,S.wt)));S.VM(t)},S.vn=d,S.wt=c,void 0===S.PM.find((function(t){return"DataPattern"===t.type}))&&S.PM.push({type:"DataPattern",args:{pattern:"ProgressiveX"}}),S}return n(i,t),i}(SW),RW=function(t){function i(i,n,e,r,s,o,h,u,a,f,l,d,v,y){var S=t.call(this,i,n,e,r,s,o,h,u,a,f,l)||this;return S.PM=d,S.Mt="Line Series",S.DM=!0,S.Bp=void 0,S._M="nearest-x",S.fa=void 0,S.ml=function(){return xs(S.ia.L().getFillStyle())},S.HM=function(t,i){var n=t.Cw(i);if(n)return sr(n,S.scale,S.wf.oo.Rt)},S.jM=function(t,i){var n=t.WM(i);if(n)return sr(n,S.scale,S.wf.oo.Rt)},S.ia=new c(Fs(S.vn.seriesStrokeStyle,v)),S.JM={individualLookupValuesEnabled:void 0!==(null==y?void 0:y.individualLookupValuesEnabled)&&y.individualLookupValuesEnabled},S.setMouseInteractions(!1),S}return n(i,t),i.prototype.add=function(i){return t.prototype.add.call(this,i),this},i.prototype.setMouseInteractions=function(i){return t.prototype.setMouseInteractions.call(this,i)},i.prototype.setStrokeStyle=function(t){this.ia.C(t);for(var i=this.ia.D(this.Bf),n=0;n<this.ic.length;n+=1)this.ic[n].na(i);return this.wf.xn(),this},i.prototype.getStrokeStyle=function(){return this.ia.L()},i.prototype.setStrokeStyleHighlight=function(t){if(this.ia.I(t),this.getHighlighted())for(var i=this.ia.D(!0),n=0;n<this.ic.length;n+=1)this.ic[n].na(i);return this.wf.xn(),this},i.prototype.getStrokeStyleHighlight=function(){return this.ia.D(!0)},i.prototype.setDataCleaning=function(t){var i=this;return this.fa=t,this.ic.forEach((function(t){return t.ca(i.fa)})),this.wf.xn(),this},i.prototype.setDataCleaningThreshold=function(t){var i=this;return this.fa=void 0!==t?{progressiveDataCleaningThreshold:t}:void 0,this.ic.forEach((function(t){return t.ca(i.fa)})),this.wf.xn(),this},i.prototype.getDataCleaningThreshold=function(){return this.fa&&"progressiveDataCleaningThreshold"in this.fa?this.fa.progressiveDataCleaningThreshold:void 0},i.prototype.setCursorInterpolationEnabled=function(t){return this.DM=t,this.wf.oo.xn(),this},i.prototype.getCursorInterpolationEnabled=function(){return this.DM},i.prototype.setCursorSolveBasis=function(t){return this._M=t,this.ic.forEach((function(i){return i.Uh(nE(t))})),this.wf.xn(),this},i.prototype.getCursorSolveBasis=function(){return this._M},i.prototype.pp=function(t){},i.prototype.DS=function(t){var i=this.ic[0];i||(i=this.Cc(this.NM())),i.Qh(t)},i.prototype.NM=function(){return this.wf.iS(this.scale,this.JM,u([LV.UserSeries],h(this.PM))).setMouseInteractions(this.$f).na(this.ia.D(this.Bf)).ca(this.fa).Uh(nE(this._M))},i.prototype.attach=function(i,n){return void 0===n&&(n=!0),ks(i,this.vn,{stroke:this.ia}),t.prototype.attach.call(this,i,n)},i.prototype.Ac=function(t,i){t.na(this.ia.D(i)),this.wf.xn()},i.prototype.setMaxPointCount=function(i){return t.prototype.setMaxPointCount.call(this,i),this.setDataCleaning({minDataPointCount:i}),this},i.prototype.Cp=function(t,i,n,e){},i.prototype.solveNearestFromScreen=function(t,i){void 0===i&&(i=this.DM);var n=qH(t,this.ic,i?this.jM:this.HM,"nearest-x"===this._M?function(t,i){return Math.abs(t.x-i.x)}:"nearest-y"===this._M?function(t,i){return Math.abs(t.y-i.y)}:function(t,i){return Math.pow(t.x-i.x,2)+Math.pow(t.y-i.y,2)});if(void 0!==n){var e=sr(n[0],this.wf.oo.Rt,this.scale),r=n[1].ea();return KG(e,this.scale,this.Mg(new _G,this,e.x,e.y,e).Xf(),this,r instanceof nr?r.getFillStyle():void 0)}},i.prototype.solveNearestFromSegment=function(t,i,n){void 0===n&&(n=this.DM);var e=n?i.WM(t):i.Cw(t),r=i.ea();if(e)return KG(e,this.scale,this.Mg(new _G,this,e.x,e.y,e).Xf(),this,r instanceof nr?r.getFillStyle():void 0)},i}(KH),zW=function(t){function i(i,n,e,r,s,o,h){var u=t.call(this,i,n,e,r,o)||this;return u.wf=i,u.scale=n,u.nM=s,u.QM={x:0,y:0,width:0,height:0},u.$M={x1:0,y1:0,x2:0,y2:0},u.Nh=b(l(0,0),l(0,0)),u.Ho=new c(Ts(o.rectangleSeriesFillStyle,h,o.seriesFillStyle)),u.Zo=new c(Ts(o.rectangleSeriesStrokeStyle,h,ir)),u.Ut=u.$x(u.wf.Pc(u.scale)).$n(u.Ho.L()).Ys(u.Zo.L()),u}return n(i,t),i.prototype.getBoundaries=function(){return this.Nh},i.prototype.setDimensions=function(t){return"x"in t?(this.QM=t,this.$M={x1:t.x,y1:t.y,x2:t.x+t.width,y2:t.y+t.height}):(this.$M=t,this.QM={x:t.x1,y:t.y1,width:t.x2-t.x1,height:t.y2-t.y1}),this.Ut.ph(l(this.QM.x,this.QM.y)).oi(l(this.QM.width,this.QM.height)),this.Nh=Ks([this.QM,l(this.QM.x+this.QM.width,this.QM.y+this.QM.height)]),this.nM(),this.wf.xn(),this},i.prototype.getDimensionsPositionAndSize=function(){return this.QM},i.prototype.getDimensionsTwoPoints=function(){return this.$M},i.prototype.setFillStyle=function(t){return this.Ho.C(t),this.Ut.$n(this.Ho.D(this.Bf)),this.wf.xn(),this},i.prototype.getFillStyle=function(){return this.Ho.L()},i.prototype.setFillStyleHighlight=function(t){return this.Ho.I(t),this.Ut.$n(this.Ho.D(this.Bf)),this.wf.xn(),this},i.prototype.getFillStyleHighlight=function(){return this.Ho.P()},i.prototype.setStrokeStyle=function(t){return this.Zo.C(t),this.Ut.Ys(this.Zo.D(this.Bf)),this.wf.xn(),this},i.prototype.getStrokeStyle=function(){return this.Zo.L()},i.prototype.setStrokeStyleHighlight=function(t){return this.Zo.I(t),this.Ut.Ys(this.Zo.D(this.Bf)),this.wf.xn(),this},i.prototype.getStrokeStyleHighlight=function(){return this.Zo.P()},i.prototype.setHighlighted=function(i){return this.Ut.$n(this.Ho.D(i)),this.Ut.Ys(this.Zo.D(i)),this.wf.xn(),t.prototype.setHighlighted.call(this,i)},i.prototype.getDominantStyle=function(){return this.Ut.Qn()},i}(oW),EW=function(t){function i(i,n,e,r,s,o,h,u,a,f,c){var d=t.call(this,i,n,e,r,s,o,h,u,a,f)||this;return d.Mt="Rectangle Series",d.Mg=function(t,i,n){var e=n.getDimensionsPositionAndSize();return t.addRow(i.Mt).addRow("X",i.axisX.formatValue(e.x)).addRow("Y",i.axisX.formatValue(e.y)).addRow("Width",i.axisX.formatValue(e.width)).addRow("Height",i.axisX.formatValue(e.height))},d.oM=function(t){var i=t.getDimensionsPositionAndSize(),n=l(i.x+i.width/2,i.y+i.height/2);return sr(n,d.scale,d.wf.oo.Rt)},d.tA=c,d.rM=new zW(d.wf,d.scale,Cr,Cr,Cr,d.vn,d.tA).dispose(),d}return n(i,t),i.prototype.pp=function(t){},i.prototype.add=function(t){var i=new zW(this.wf,this.scale,this.qx,this.Jx,this.nM,this.vn,this.tA).setDimensions(t);return this.tM(i),i},i}(hW),NW=function(t){function i(i,n,e,r,s,o,h){var u=t.call(this,i,n,e,r,o)||this;return u.wf=i,u.scale=n,u.nM=s,u.iA=[],u.Nh=Ps,u.Ho=new c(Ts(o.rectangleSeriesFillStyle,h,o.seriesFillStyle)),u.Zo=new c(Ts(o.polygonSeriesStrokeStyle,h,ir)),u.jp=u.$x(u.wf.Rc(u.scale,CE.Simple)).Ys(u.Zo.L()).$n(u.Ho.L()),u}return n(i,t),i.prototype.getBoundaries=function(){return this.Nh},i.prototype.setDimensions=function(t){return this.iA=t,this.jp.au(this.iA),this.Nh=Ks(this.iA),this.nM(),this.wf.xn(),this},i.prototype.getDimensions=function(){return this.iA},i.prototype.setFillStyle=function(t){return this.Ho.C(t),this.jp.$n(this.Ho.D(this.Bf)),this.wf.xn(),this},i.prototype.getFillStyle=function(){return this.Ho.L()},i.prototype.setFillStyleHighlight=function(t){return this.Ho.I(t),this.jp.$n(this.Ho.D(this.Bf)),this.wf.xn(),this},i.prototype.getFillStyleHighlight=function(){return this.Ho.P()},i.prototype.setStrokeStyle=function(t){return this.Zo.C(t),this.jp.Ys(this.Zo.D(this.Bf)),this.wf.xn(),this},i.prototype.getStrokeStyle=function(){return this.Zo.L()},i.prototype.setStrokeStyleHighlight=function(t){return this.Zo.I(t),this.jp.Ys(this.Zo.D(this.Bf)),this.wf.xn(),this},i.prototype.getStrokeStyleHighlight=function(){return this.Zo.P()},i.prototype.setHighlighted=function(i){return this.jp.$n(this.Ho.D(i)),this.jp.Ys(this.Zo.D(i)),this.wf.xn(),t.prototype.setHighlighted.call(this,i)},i.prototype.getDominantStyle=function(){return this.jp.Qn()},i}(oW),VW=function(t){function i(i,n,e,r,s,o,h,u,a,f,c){var d=t.call(this,i,n,e,r,s,o,h,u,a,f)||this;return d.Mt="Polygon Series",d.Mg=function(t,i,n){return t.addRow(i.getName())},d.oM=function(t){var i=t.getBoundaries(),n=l((i.min.x+i.max.x)/2,(i.min.y+i.max.y)/2);return sr(n,d.scale,d.wf.oo.Rt)},d.tA=c,d.rM=new NW(d.wf,d.scale,Cr,Cr,Cr,d.vn,d.tA).dispose(),d}return n(i,t),i.prototype.pp=function(t){if(!(t instanceof Vo))throw new Error("PolygonSeries can only be attached to a pair of Linear Axes.")},i.prototype.add=function(t){var i=new NW(this.wf,this.scale,this.qx,this.Jx,this.nM,this.vn,this.tA).setDimensions(t);return this.tM(i),i},i}(hW),GW=function(t){function i(i,n,e,r,s,o,h){var u=t.call(this,i,n,e,r,o)||this;return u.wf=i,u.scale=n,u.nM=s,u.dimensions={startX:0,startY:0,endX:0,endY:0},u.Nh=b(l(0,0),l(0,0)),u.Wt=u.$x(u.wf.Gf(u.scale)),u.vn=o,u.Ho=new c(Fs(o.segmentSeriesStyle,h)),u.Wt.na(u.Ho.L()),u}return n(i,t),i.prototype.getBoundaries=function(){return this.Nh},i.prototype.setDimensions=function(t){return this.dimensions=t,this.Wt.ha(l(t.startX,t.startY)).Ku(l(t.endX,t.endY)),this.Nh=b(l(Math.min(t.startX,t.endX),Math.min(t.startY,t.endY)),l(Math.max(t.startX,t.endX),Math.max(t.startY,t.endY))),this.nM(),this.wf.xn(),this},i.prototype.getDimensions=function(){return this.dimensions},i.prototype.setStrokeStyle=function(t){return this.Ho.C(t),this.Wt.na(this.Ho.D(this.Bf)),this.wf.xn(),this},i.prototype.getStrokeStyle=function(){return this.Ho.L()},i.prototype.setStrokeStyleHighlight=function(t){return this.Ho.I(t),this.Wt.na(this.Ho.D(this.Bf)),this.wf.xn(),this},i.prototype.getStrokeStyleHighlight=function(){return this.Ho.P()},i.prototype.setHighlighted=function(i){return this.Wt.na(this.Ho.D(i)),this.wf.xn(),t.prototype.setHighlighted.call(this,i)},i.prototype.getDominantStyle=function(){var t=this.Wt.ea();return t instanceof nr?t.getFillStyle():Re},i}(oW),HW=function(t){function i(i,n,e,r,s,o,h,u,a,f,c){var d=t.call(this,i,n,e,r,s,o,h,u,a,f)||this;return d.Mt="Segment Series",d.Mg=function(t,i,n){return t.addRow(i.Mt).addRow("Start",i.axisX.formatValue(n.getDimensions().startX),",",i.axisY.formatValue(n.getDimensions().startY)).addRow("End",i.axisX.formatValue(n.getDimensions().endX),",",i.axisY.formatValue(n.getDimensions().endY))},d.oM=function(t){var i=t.getDimensions(),n=l((i.startX+i.endX)/2,(i.startY+i.endY)/2);return sr(n,d.scale,d.wf.oo.Rt)},d.tA=c,d.rM=new GW(d.wf,d.scale,Cr,Cr,Cr,d.vn,d.tA).dispose(),d}return n(i,t),i.prototype.pp=function(t){},i.prototype.add=function(t){var i=new GW(this.wf,this.scale,this.qx,this.Jx,this.nM,this.vn,this.tA).setDimensions(t);return this.tM(i),i},i}(hW),jW=function(t){function i(i,n,e,r,s,o,h){var u=t.call(this,i,n,e,r,o)||this;return u.wf=i,u.scale=n,u.nM=s,u.dimensions={x:0,y:0,radiusX:0,radiusY:0},u.Nh=b(l(0,0),l(0,0)),u.Zo=new c(ir),u.nA=u.$x(u.wf.Gc(u.scale)).Ys(u.Zo.L()).ta(50),u.vn=o,u.Ho=new c(Fs(o.seriesFillStyle,h)),u.nA.$n(u.Ho.L()),u}return n(i,t),i.prototype.getBoundaries=function(){return this.Nh},i.prototype.setDimensions=function(t){return this.dimensions=t,this.nA.ph(l(t.x,t.y)).Ju(t.radiusX).Qu(t.radiusY),this.Nh=b(l(t.x-t.radiusX,t.y-t.radiusY),l(t.x+t.radiusX,t.y+t.radiusY)),this.nM(),this.wf.xn(),this},i.prototype.getDimensions=function(){return this.dimensions},i.prototype.setFillStyle=function(t){return this.Ho.C(t),this.nA.$n(this.Ho.D(this.Bf)),this.wf.xn(),this},i.prototype.getFillStyle=function(){return this.Ho.L()},i.prototype.setFillStyleHighlight=function(t){return this.Ho.I(t),this.nA.$n(this.Ho.D(this.Bf)),this.wf.xn(),this},i.prototype.getFillStyleHighlight=function(){return this.Ho.P()},i.prototype.setStrokeStyle=function(t){return this.Zo.C(t),this.nA.Ys(this.Zo.D(this.Bf)),this.wf.xn(),this},i.prototype.getStrokeStyle=function(){return this.Zo.L()},i.prototype.setStrokeStyleHighlight=function(t){return this.Zo.I(t),this.nA.Ys(this.Zo.D(this.Bf)),this.wf.xn(),this},i.prototype.getStrokeStyleHighlight=function(){return this.Zo.P()},i.prototype.setHighlighted=function(i){return this.nA.$n(this.Ho.D(i)),this.nA.Ys(this.Zo.D(i)),this.wf.xn(),t.prototype.setHighlighted.call(this,i)},i.prototype.getDominantStyle=function(){return this.nA.Qn()},i}(oW),WW=function(t){function i(i,n,e,r,s,o,h,u,a,f,c){var d=t.call(this,i,n,e,r,s,o,h,u,a,f)||this;return d.Mt="Ellipse Series",d.Mg=function(t,i,n){return t.addRow(i.Mt).addRow("X",i.axisX.formatValue(n.getDimensions().x)).addRow("Y",i.axisY.formatValue(n.getDimensions().y)).addRow("Radius X",i.axisX.formatValue(n.getDimensions().radiusX)).addRow("Radius Y",i.axisY.formatValue(n.getDimensions().radiusY))},d.oM=function(t){var i=t.getDimensions(),n=l(i.x,i.y);return sr(n,d.scale,d.wf.oo.Rt)},d.tA=c,d.rM=new jW(d.wf,d.scale,Cr,Cr,Cr,d.vn,d.tA).dispose(),d}return n(i,t),i.prototype.pp=function(t){if(!(t instanceof Vo||t instanceof Go))throw new Error("EllipseSeries only supports Linear Axes")},i.prototype.add=function(t){var i=new jW(this.wf,this.scale,this.qx,this.Jx,this.nM,this.vn,this.tA).setDimensions(t);return this.tM(i),i},i}(hW);function UW(t,i){return t===i?0:t<i?-1:1}function YW(t,i){return t===i}var XW,ZW=function(){function t(t){this.left=null,this.right=null,this.length=1,this.value=t}return t.prototype.eA=function(t,i,n,e,r){if(this.left){var s=this.left.length;i=this.left.eA(t,i,n,e,r),n+=s}return i=t.call(e,i,this.value,n,r),n+=1,this.right&&(i=this.right.eA(t,i,n,e,r)),i},t.prototype.rA=function(t,i,n,e,r){return this.right&&(i=this.right.rA(t,i,n,e,r),n-=this.right.length),i=t.call(e,i,this.value,n,r),n-=1,this.left&&(i=this.left.rA(t,i,n,e,r)),i},t.prototype.sA=function(){this.length=1+(this.left?this.left.length:0)+(this.right?this.right.length:0)},t.prototype.Ee=function(){var t=this;if(t.right){for(t=t.right;t.left;)t=t.left;return t}},t.prototype.ze=function(){var t=this;if(t.left){for(t=t.left;t.right;)t=t.right;return t}},t}(),KW=function(){function t(t,i,n){var e=this;void 0===i&&(i=YW),void 0===n&&(n=UW),this.root=null,this.length=0,this.contentEquals=i,this.contentCompare=n,t&&(t instanceof Array?t.forEach((function(t){return e.Qh(t)})):this.Qh(t))}return t.prototype.oA=function(t){return!!this.root&&(this.hA(t),this.contentEquals(t,this.root.value))},t.prototype.uA=function(t,i){return this.eA((function(n,e){return n&&t.call(i,e)}),!0)},t.prototype.aA=function(t,i){return this.eA((function(n,e){t.call(i,e)}),void 0)},t.prototype.S=function(t){if(this.root&&(this.hA(t),this.contentEquals(t,this.root.value)))return this.root},t.prototype.Qh=function(t){var i=new ZW(t);if(!this.root)return this.root=i,this.length+=1,i;if(this.hA(t),!this.contentEquals(t,this.root.value)){var n=this.contentCompare(t,this.root.value);if(0===n)throw new Error("SortedSet cannot contain incomparable but inequal values: "+t+" and "+this.root.value);return n<0?(i.right=this.root,i.left=this.root.left,this.root.left=null,this.root.sA()):(i.left=this.root,i.right=this.root.right,this.root.right=null,this.root.sA()),i.sA(),this.root=i,this.length+=1,i}},t.prototype.fA=function(t){if(this.root&&(this.hA(t),this.contentEquals(t,this.root.value))){if(this.root.left){var i=this.root.right;this.root=this.root.left,this.hA(t),this.root.right=i}else this.root=this.root.right;return this.length-=1,this.root&&this.root.sA(),!0}return!1},t.prototype.cA=function(){if(this.root){for(var t=this.root;t.right;)t=t.right;return t}},t.prototype.lA=function(){if(this.root){for(var t=this.root;t.left;)t=t.left;return t}},t.prototype.dA=function(t){if(this.root)return this.hA(t),this.contentCompare(this.root.value,t)>0?this.root.ze():this.root},t.prototype.vA=function(t){if(this.root)return this.hA(t),this.contentCompare(this.root.value,t)>=0?this.root.ze():this.root},t.prototype.yA=function(t){if(this.root)return this.hA(t),this.contentCompare(this.root.value,t)>=0?this.root:this.root.Ee()},t.prototype.SA=function(t){if(this.root)return this.hA(t),this.contentCompare(this.root.value,t)<=0?this.root.Ee():this.root},t.prototype.mA=function(t){var i=this;t instanceof Array?t.forEach((function(t){return i.Qh(t)})):this.Qh(t)},t.prototype.hA=function(t){var i,n,e,r,s,o;if(this.root){for(n=i=new ZW,e=i,o=new ZW,s=this.root;;){var h=this.contentCompare(t,s.value);if(h<0){if(!s.left)break;if(this.contentCompare(t,s.left.value)<0&&(r=s.left,s.left=r.right,s.sA(),r.right=s,r.sA(),!(s=r).left))break;(r=new ZW).right=s,r.left=o.left,o.left=r,e.left=s,e.sA(),e=s,s=s.left}else{if(!(h>0))break;if(!s.right)break;if(this.contentCompare(t,s.right.value)>0&&(r=s.right,s.right=r.left,s.sA(),r.left=s,r.sA(),!(s=r).right))break;(r=new ZW).left=s,r.right=o.right,o.right=r,n.right=s,n.sA(),n=s,s=s.right}}for(n.right=s.left,n.sA(),e.left=s.right,e.sA(),s.left=i.right,s.right=i.left;o.left;)o.left.right.sA(),o.left=o.left.left;for(;o.right;)o.right.left.sA(),o.right=o.right.right;s.sA(),this.root=s}},t.prototype.eA=function(t,i,n){return this.root&&(i=this.root.eA(t,i,0,n,this)),i},t.prototype.rA=function(t,i,n){return this.root&&(i=this.root.rA(t,i,this.length-1,n,this)),i},t.prototype.$h=function(){this.root=null,this.length=0},t.prototype.bA=function(t,i){for(var n,e=this.lA();e;){var r=this.SA(e.value);t.call(i,n?n.value:void 0,e.value,r?r.value:void 0),n=e,e=r}},t.prototype.gA=function(t,i,n){for(var e,r=this.lA(),s=0;r;){var o=this.SA(r.value);i=t.call(n,i,e?e.value:void 0,r.value,o?o.value:void 0,s++,this),e=r,r=o}return i},t}(),qW=function(){function t(t,i){this.key=t,this.value=i}return t.prototype.equals=function(t){return YW(this.key,t.key)&&YW(this.value,t.value)},t.prototype.compare=function(t){return UW(this.key,t.key)},t}(),JW=function(){function t(t,i,n){var e=this;void 0===i&&(i=YW),void 0===n&&(n=UW),this.length=0,this.contentEquals=i,this.contentCompare=n,this.store=new KW(void 0,(function(t,n){return i(t.key,n.key)}),(function(t,i){return n(t.key,i.key)})),t&&(Array.isArray(t)?t.forEach((function(t){return e.Qh(t.key,t.value)})):this.Qh(t.key,t.value))}return t.prototype.S=function(t){var i=this.store.S(new qW(t,void 0));return i?i.value.value:void 0},t.prototype.l=function(t,i){var n=new qW(t,i),e=this.store.S(n);if(e)return e.value.value=i,e;var r=this.store.Qh(n);return this.length+=1,r},t.prototype.Qh=function(t,i){return this.l(t,i)},t.prototype.oA=function(t){return this.store.oA(new qW(t,void 0))},t.prototype.$h=function(){this.store.$h(),this.length=0},t.prototype.eA=function(t,i,n){var e=this;return this.store.eA((function(i,r){return t.call(n,i,r.value,r.key,e)}),i,this.store)},t.prototype.rA=function(t,i,n){var e=this;return this.store.rA((function(i,r){return t.call(n,i,r.value,r.key,e)}),i,this.store)},t.prototype.fA=function(t){var i=new qW(t,void 0);return!!this.store.oA(i)&&(this.store.fA(i),this.length--,!0)},t.prototype.aA=function(t,i){return this.eA((function(n,e,r){t.call(i,e,r)}),void 0)},t.prototype.wA=function(t){return this.store.S(new qW(t,void 0))||void 0},t.prototype.bA=function(t,i){for(var n,e=this.store.lA();e;){var r=this.store.SA(e.value);t.call(i,n?n.value.value:void 0,e.value.value,r?r.value.value:void 0),n=e,e=r}},t.prototype.gA=function(t,i,n){for(var e,r=this.store.lA(),s=0;r;){var o=this.store.SA(r.value);i=t.call(n,i,e?e.value.value:void 0,r.value.value,o?o.value.value:void 0,s++,this),e=r,r=o}return i},t.prototype.cA=function(){return this.store.cA()},t.prototype.lA=function(){return this.store.lA()},t.prototype.dA=function(t){return this.store.dA(new qW(t,void 0))},t.prototype.vA=function(t){return this.store.vA(new qW(t,void 0))},t.prototype.yA=function(t){return this.store.yA(new qW(t,void 0))},t.prototype.SA=function(t){return this.store.SA(new qW(t,void 0))},t}(),QW={minGapNew:1.75,minGapSplit:2,maxGapFuse:1.5},$W=function(t,i){return Math.min(t,i[3])},tU=function(t,i){return Math.max(t,i[2])},iU=function(t,i){var n=t.length;if(!(n<2))return[i,t[0].y,t.reduce(Mr,Os),t.reduce(xr,Is),t[n-1].y]},nU=function(t,i){var n=[],e=t.getDataIndices(),r=i.getDataIndices();return Array.isArray(e)?n=n.concat(e):n.push(e),Array.isArray(r)?n=n.concat(r):n.push(r),n},eU=function(t,i){if(t.length>0)return i>0?t[t.length-1]:t[0]},rU=function(t,i,n){return t.addRow(i.getName()).addRow("X",i.axisX.formatValue(n.getPosition())).addRow("Open",n.getOpen().toFixed(2)).addRow("High",n.getHigh().toFixed(2)).addRow("Low",n.getLow().toFixed(2)).addRow("Close",n.getClose().toFixed(2))},sU=function(i){function e(n,e,r,s,o,h,u,a,f,c,l,v,y){var S=i.call(this,n,e,r,s,o,h,u,a,f,v)||this;return S.pA=c,S.kA=l,S.Mt="OHLC Series",S.xA=new JW,S.iM=b(d(Is,Is),d(Os,Os)),S.MA=0,S.AA=5,S.FA=QW,S.fa=void 0,S.TA=void 0,S.CA=void 0,S.BA=!0,S.tc=t.HighlightModes.onHover,S.Mg=rU,S.LA=new S.pA(S.wf,S.scale,Cr,Cr,!0,S.vn).dispose(),S.IA=new S.kA(S.wf,S.scale,Cr,Cr,!1,S.vn).dispose(),S}return n(e,i),e.prototype.pp=function(t){if(!(t.x instanceof zo))throw new Error("OHLCSeries must be attached to a Linear X Axis.");this.OA=t.x},e.prototype.setStyle=function(t){return this.PA=t,this.DA(),this.wf.xn(),this},e.prototype.setPositiveStyle=function(t){return this._A=t,this.DA(),this.wf.xn(),this},e.prototype.setNegativeStyle=function(t){return this.RA=t,this.DA(),this.wf.xn(),this},e.prototype.setFigureWidth=function(t){return this.AA=t,this.wf.xn(),this},e.prototype.getFigureWidth=function(){return this.AA},e.prototype.setFigureAutoFitting=function(t){return this.FA=t?QW:void 0,this.wf.xn(),this},e.prototype.getFigureAutoFitting=function(){return void 0!==this.FA},e.prototype.zA=function(t,i){return t-i/2<=this.scale.x.getInnerEnd()+.1*this.scale.x.getInnerInterval()&&this.scale.x.getInnerStart()-.1*this.scale.x.getInnerInterval()<=t+i/2},e.prototype.EA=function(t,i,n,e){var r=function(t){return t[4]>=t[1]}(t),s=new(r?this.pA:this.kA)(this.wf,this.scale,this.qx,this.Jx,r,this.vn);return this.tM(s,e),this.NA(s),this.Ac(s,this.Bf),s.AM(t[0],t[1],t[2],t[3],t[4],i).ou(n),s},e.prototype.VA=function(t){var i=this.MA;return this.MA+=1,this.xA.l(i,t),this.BA=!0,this.an.emit("dataAdd",this,[t],void 0),i},e.prototype.DA=function(){var t=this;this.ic.forEach((function(i){t.PA&&t.PA(i),i.positive&&t._A?t._A(i):!i.positive&&t.RA&&t.RA(i)}))},e.prototype.NA=function(t){this.PA&&this.PA(t),t.positive&&this._A?this._A(t):!t.positive&&this.RA&&this.RA(t)},e.prototype.GA=function(t){return t*this.OA.getPixelSize()},e.prototype.HA=function(t){return t/this.OA.getPixelSize()},e.prototype.jA=function(t){if(!Array.isArray(t))return this.xA.S(t);if(this.xA.S(t[0])&&this.xA.S(t[t.length-1])){for(var i=0,n=this.xA.S(t[0])[1],e=Os,r=Is,s=this.xA.S(t[t.length-1])[4],o=0;o<t.length;o+=1){var h=this.xA.S(t[o]);i+=h[0]/t.length,e=Math.max(e,h[2]),r=Math.min(r,h[3])}return[i,n,e,r,s]}},e.prototype.WA=function(t,i,n){if(0!==this.ic.length){if(this.ic.length>1){var e=t>0?this.ic.length-1:0;this.ic[e].dispose()}var r;do{r=!1;var s=eU(this.ic,t);if(s){for(var o=s.getPosition(),h=s.getDataIndices(),u=("number"==typeof h?h:h[t>0?h.length-1:0])+t,a=void 0,f=[],c=[];;){var l=this.xA.S(u);if(!l)break;if(!this.zA(l[0],i))break;if(a){if(Math.abs(o-l[0])>=1.5*n)break;t>0?a[4]=l[4]:a[1]=l[1],a[2]=Math.max(a[2],l[2]),a[3]=Math.min(a[3],l[3])}else a=l.slice();f.push(l[0]),t>0?c.push(u):c.splice(0,0,u),u+=t}if(a){var d=t>0?void 0:0;this.EA(a,c,i,d),r=!0}}}while(r)}},e.prototype.Cp=function(t){var i;if(t&&"maxDataPointCount"in t){var n=t.maxDataPointCount;if(n&&this.xA.length>n){var e=this.MA-1;if(o=this.xA.store.lA()){for(var r=e-n;r>=o.value.key;r-=1)this.xA.fA(r);var s=!0;this.iM.min.y=Is,this.iM.max.y=Os;for(r=1+e-n;r<=e;r+=1){(c=this.xA.S(r))&&(this.iM.min.y=Math.min(this.iM.min.y,c[3]),this.iM.max.y=Math.max(this.iM.max.y,c[2]),s&&(this.iM.min.x=c[0],s=!1))}}}}else if(t&&"minDataPointCount"in t&&t.minDataPointCount){var o,h=t.minDataPointCount,u=this.scale.x.getInnerStart();e=this.MA-1;if(o=this.xA.store.lA()){var a=o.value.key,f=void 0;for(r=o.value.key;r<=e;r+=1){if((null===(i=this.xA.S(r))||void 0===i?void 0:i[0])>=u)break;f=r}if(void 0!==f&&f-a>=1e3&&this.xA.length-(f-a)>=h){for(r=f;r>=a;r-=1)this.xA.fA(r);o=this.xA.store.lA();s=!0;if(this.iM.min.y=Is,this.iM.max.y=Os,o)for(r=o.value.key;r<=e;r+=1){var c;(c=this.xA.S(r))&&(this.iM.min.y=Math.min(this.iM.min.y,c[3]),this.iM.max.y=Math.max(this.iM.max.y,c[2]),s&&(this.iM.min.x=c[0],s=!1))}}}}return this},e.prototype.setDataCleaning=function(t){return this.fa=t,this.wf.xn(),this},e.prototype.setMaxPointCount=function(t){return this.setDataCleaning({maxDataPointCount:t}),this},e.prototype.BS=function(){i.prototype.BS.call(this),this.Cp(this.fa);var t=this.OA.getPixelSize(),n=this.TA,e=b(this.scale.x.getInnerStart(),this.scale.x.getInnerEnd()),r=this.CA,s=this.GA(this.AA),o=!r||e.max-e.min!=r.max-r.min,h=this.ic.length;if(!r||e.min>r.min)for(var u=0;u<this.ic.length;u+=1){var a=this.ic[u];if(this.zA(a.getPosition(),s))break;a.dispose(),u-=1}if(!r||e.max<r.max)for(u=this.ic.length-1;u>=0;u-=1){a=this.ic[u];if(this.zA(a.getPosition(),s))break;a.dispose()}if(0===this.ic.length&&this.xA.length>0)for(u=0;u<this.MA;u+=1){var f=this.xA.S(u);if(f&&this.zA(f[0],s)){this.EA(f,u,s);break}}if(this.ic.length>0){var c=this.FA?s*this.FA.minGapNew:0;if((o||!r||e.min<r.min)&&(this.WA(-1,s,c),this.BA=!0),(o||!r||this.BA||e.max>r.max)&&(this.WA(1,s,c),this.BA=!0),this.FA){var l=s*this.FA.maxGapFuse,d=s*this.FA.minGapSplit;if(void 0===n||t!==n||this.BA){var v=void 0;do{v=!1;for(u=0;u<this.ic.length;u+=1){var y=(a=this.ic[u]).getDataIndices();if("number"!=typeof y&&y.length>1){var S=a.getPosition(),m=u>0?this.ic[u-1]:void 0,g=u<this.ic.length-1?this.ic[u+1]:void 0;if((!m||S-m.getPosition()>=1.5*d)&&(!g||g.getPosition()-S>=1.5*d)){v=!0,a.dispose();var w=y.length,p=Math.round(w/2),k=y.splice(p,w-p),x=this.jA(y),M=this.jA(k);void 0!==x&&this.EA(x,y,s,u),void 0!==M&&this.EA(M,k,s,u+1),u+=1}}}}while(v);var A=void 0;do{A=!1;for(u=0;u<this.ic.length;u+=1){a=this.ic[u];var F=u<this.ic.length-1?this.ic[u+1]:void 0;if(void 0!==F&&F.getPosition()-a.getPosition()<=l){A=!0;S=(a.getPosition()+F.getPosition())/2;var T=a.getOpen(),C=Math.max(a.getHigh(),F.getHigh()),B=Math.min(a.getLow(),F.getLow()),L=F.getClose(),I=nU(a,F);a.dispose(),F.dispose(),this.EA([S,T,C,B,L],I,s,u)}}}while(A)}}}if(t!==n){for(u=0;u<this.ic.length;u+=1)this.ic[u].ou(s);this.TA=t}h!==this.ic.length&&this.Mp(),this.CA=e,this.BA=!1},e.prototype.solveNearestFromScreen=function(t){var i=this.ic.length;if(i>0){for(var n=sr(t,this.wf.oo.Rt,this.scale),e=void 0,r=0;r<i;r+=1){var s=this.ic[r],o=s.getPosition();if(0===r&&o>n.x+s.FM())break;if(o>=n.x){var h=r>0?n.x-this.ic[r-1].getPosition():Number.MAX_VALUE,u=o-n.x,a=r<i-1?this.ic[r+1].getPosition()-n.x:Number.MAX_VALUE;switch(Math.min(h,u,a)){case h:e=this.ic[r-1];break;case u:e=s;break;case a:e=this.ic[r+1];break;default:e=s}break}}if(e)return this.solveNearestFromSegment(t,e)}},e.prototype.solveNearestFromSegment=function(t,i){return{location:l(i.getPosition(),i.getClose()),scale:this.scale,resultTableContent:this.Mg(new _G,this,i).Xf(),series:this,fillStyle:i.getDominantStyle(),ohlcSegment:i}},e.prototype.setCursorResultTableFormatter=function(t){return this.Mg=t,this.vr.engine.xn(),this},e.prototype.getCursorResultTableFormatter=function(){return this.Mg},e.prototype.clear=function(){return this.xA.$h(),this.BA=!0,this.iM.min.x=Is,this.iM.min.y=Is,this.iM.max.x=Os,this.iM.max.y=Os,this.an.emit("dataClear",this),i.prototype.clear.call(this)},e.prototype.getXMax=function(){return this.iM.max.x},e.prototype.getXMin=function(){return this.iM.min.x},e.prototype.getYMax=function(){return this.iM.max.y},e.prototype.getYMin=function(){return this.iM.min.y},e.prototype.eS=function(){return l(this.AA/2,0)},e.prototype.Lp=function(){var t=[];return this.xA.aA((function(i){t.push(i)})),t},e.prototype.Ip=function(t){return this.an.on("dataAdd",t)},e.prototype.Op=function(t){return this.an.off(t)},e.prototype.Pp=function(t){return this.an.on("dataClear",t)},e.prototype.Dp=function(t){return this.an.off(t)},e.prototype.attach=function(t,n){return i.prototype.attach.call(this,t,n),ks(t,this.vn,{fill:this.LA.getDominantStyle(),fill2:this.IA.getDominantStyle(),behavior:{colorStep:!0}}),this},e}(sW),oU=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return n(i,t),i.prototype.add=function(i){if(i.length>0){if(Array.isArray(i[0])){for(var n=i,e=0;e<n.length;e+=1)t.prototype.VA.call(this,n[e]);this.iM.min.x=Math.min(this.iM.min.x,n[0][0]),this.iM.max.x=Math.max(this.iM.max.x,n[n.length-1][0]),this.iM.min.y=n.reduce($W,this.iM.min.y),this.iM.max.y=n.reduce(tU,this.iM.max.y)}else{var r=i;t.prototype.VA.call(this,r),this.iM.min.x=Math.min(this.iM.min.x,r[0]),this.iM.max.x=Math.max(this.iM.max.x,r[0]),this.iM.min.y=Math.min(this.iM.min.y,r[3]),this.iM.max.y=Math.max(this.iM.max.y,r[2])}this.wf.xn()}return this},i.prototype.He=function(){return this.MS&&this.xA.length>0},i}(sU),hU=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.aa=[],i}return n(i,t),i.prototype.He=function(){return this.MS&&(this.xA.length>0||this.aa.length>0)},i.prototype.add=function(t){Array.isArray(t)?this.addPoints(t):this.addPoint(t);var i=this.aa[this.aa.length-1];return this.Tp=i?{x:i.x,y:i.y}:void 0,this},i.prototype.addPoint=function(t){return this.aa.push(t),this.wf.xn(),this.iM.min.x=Math.min(this.iM.min.x,t.x),this.iM.max.x=Math.max(this.iM.max.x,t.x),this.iM.min.y=Math.min(this.iM.min.y,t.y),this.iM.max.y=Math.max(this.iM.max.y,t.y),this},i.prototype.addPoints=function(t){return t.length>0&&(this.aa=this.aa.concat(t),this.wf.xn(),this.iM.min.x=Math.min(this.iM.min.x,t[0].x),this.iM.max.x=Math.max(this.iM.max.x,t[t.length-1].x),this.iM.min.y=t.reduce(xr,this.iM.min.y),this.iM.max.y=t.reduce(Mr,this.iM.max.y)),this},i.prototype.addArrayY=function(t,i,n){void 0===i&&(i=1),void 0===n&&(n=0);var e=n;return e||(e=this.Tp?this.Tp.x+i:0),this.add(XH(t,i,e)),this},i.prototype.BS=function(){if(this.Cp(this.fa),this.aa.length>0){var i=void 0;if(void 0!==this.UA)i=this.UA;else{var n=this.FA?this.FA.minGapNew:1;i=this.GA(this.AA*n)}var e=void 0!==this.YA?this.YA:this.aa[0].x,r=function(t,i,n){for(var e=[],r=[],s=!1;t.length>0;){for(var o=0;o<t.length;o+=1){var h=t[o];if(r.push(h),s=h.x>=n+i){var u=iU(r,n+i/2);void 0!==u&&(e.push(u),t.splice(0,r.length-1)),n+=i;break}}if(r.length=0,!s)break}return e}(this.aa,i,e);if(r.length>0){for(var s=0;s<r.length;s+=1)this.VA(r[s]);this.YA=r[r.length-1][0]+i/2}}t.prototype.BS.call(this)},i.prototype.setPackingResolution=function(t){return this.UA=t,this},i.prototype.getLastPoint=function(){return this.Tp},i}(sU),uU={Normal:oU,AutomaticPacking:hU},aU=function(t,i,n){return t.addRow(i.getName()).addRow("Lower extreme",n.lowerExtreme.toFixed(2)).addRow("Lower quartile",n.lowerQuartile.toFixed(2)).addRow("Median",n.median.toFixed(2)).addRow("Upper quartile",n.upperQuartile.toFixed(2)).addRow("Upper extreme",n.upperExtreme.toFixed(2))},fU=function(t){function i(i,n,e,r,s,o,h,u,a,f,c,l,d){var v=t.call(this,i,n,e,r,s,o,h,u,a,l)||this;return v.XA=f,v.Bc=c,v.Mt="Box Series",v.Mg=aU,v.oM=function(t){return sr(v.Bc.toPoint((t.start+t.end)/2,t.median),v.scale,v.wf.oo.Rt)},v.vn=l,v.rM=new v.XA(v.wf,v.scale,v.qx,v.Jx,v.Bc,0,0,0,0,0,0,0,v.vn).dispose(),v}return n(i,t),i.prototype.pp=function(t){if(!(t instanceof Vo||t instanceof Go))throw new Error("BoxSeries only supports Linear Axes")},i.prototype.add=function(t){var i=new this.XA(this.wf,this.scale,this.qx,this.Jx,this.Bc,t.start,t.end,t.lowerExtreme,t.lowerQuartile,t.median,t.upperQuartile,t.upperExtreme,this.vn),n=i.boundaries;return this.iM=this.iM?Js(this.iM,n):n,this.wf.xn(),this.tM(i),i},i}(hW),cU=function(i){function e(){var n=null!==i&&i.apply(this,arguments)||this;return n.aa=[],n.ZA=[],n.KA=[],n.vo=!1,n.Bp=1e3,n.Fp=0,n.tc=t.HighlightModes.onHover,n.yu=iE(),n.DM=!0,n.qA=[],n.JA=[],n.QA=!1,n.$A=function(t){var i=t.length;if(n.ic.length>0){var e=n.ic.length-1,r=n.ic[e];if(i>0){var s=h(r.Xh(),2),o=s[0],u=s[1],a=h(r.Yh(),2),f=a[0],c=a[1];if((f?o.length+f.length:o.length)>=n.Bp){var d=f&&f.length>0?f[f.length-1]:o[o.length-1],y=c&&c.length>0?c[c.length-1]:u[o.length-1],S=(d.x+t[0].position)/2,m=mo(S,d,l(t[0].position,t[0].high)).y,g=mo(S,y,l(t[0].position,t[0].low)).y,w=v(S,m,g);r.Qh(w,b(l(S,g),l(S,m))).Cu(!0),n.Cc(n.tF([w].concat(t)).Fu(!0))}else r.Qh(t)}}else i>0&&n.Cc(n.tF(t))},n.iF=function(t){var i=n.qA,e=t.length;if(n.qA.length>0){if(e>0){var r=i[i.length-1],s=r.Xh(),o=r.Yh();if(s.length+o.length>=n.Bp){var h=o.length>0?o[o.length-1]:s[s.length-1],u=(h.x+t[0].x)/2,a=mo(u,h,l(t[0].x,t[0].y)).y,f=l(u,a);r.Qh(f,b(l(u,a),l(u,a))).Cu(!0),i.push(n.nF([f].concat(t),n._S).Fu(!0))}else r.Qh(t)}}else e>0&&i.push(n.nF(t))},n.eF=function(t){var i=n.JA,e=t.length;if(n.JA.length>0){if(e>0){var r=i[i.length-1],s=r.Xh(),o=r.Yh();if(s.length+o.length>=n.Bp){var h=o.length>0?o[o.length-1]:s[s.length-1],u=(h.x+t[0].x)/2,a=mo(u,h,l(t[0].x,t[0].y)).y,f=l(u,a);r.Qh(f,b(l(u,a),l(u,a))).Cu(!0),i.push(n.rF([f].concat(t)).Fu(!0))}else r.Qh(t)}}else e>0&&i.push(n.rF(t))},n.sF=function(t,i){var e=t.Cw(i);if(e)return[sr(e[0],n.scale,n.wf.oo.Rt),sr(e[1],n.scale,n.wf.oo.Rt)]},n.oF=function(t,i){var e=t.WM(i);if(e)return[sr(e[0],n.scale,n.wf.oo.Rt),sr(e[1],n.scale,n.wf.oo.Rt)]},n}return n(e,i),e.prototype.setDataCleaning=function(t){return this.setMaxPointCount(t&&t.minDataPointCount),this},e.prototype.clear=function(){for(var t=0;t<this.ic.length;t+=1)this.ic[t].dispose();for(t=0;t<this.qA.length;t+=1)this.qA[t].dispose();for(t=0;t<this.JA.length;t+=1)this.JA[t].dispose();return this.aa.length=0,this.ZA.length=0,this.KA.length=0,this._S=void 0,this.ic.length=0,this.qA.length=0,this.JA.length=0,this.nc=0,this.wf.xn(),this.an.emit("dataClear",this),this},e.prototype.getPointAmount=function(){return this.ic.reduce((function(t,i){return t+i.tu()+i.iu()}),this.aa.length)},e.prototype.setCursorInterpolationEnabled=function(t){return this.DM=t,this.wf.oo.xn(),this},e.prototype.getCursorInterpolationEnabled=function(){return this.DM},e.prototype.setMaxPointCount=function(t){return this.Fp=void 0!==t&&t>0?t:0,this.wf.xn(),this},e.prototype.getMaxPointCount=function(){return this.Fp>0?this.Fp:void 0},e.prototype.setCursorResultTableFormatter=function(t){return this.Mg=t,this.vr.engine.xn(),this},e.prototype.getCursorResultTableFormatter=function(){return this.Mg},e.prototype.getXMax=function(){return Kr(this.ic,Er,Math.max,Wr,this._S)},e.prototype.getXMin=function(){return Kr(this.ic,zr,Math.min,jr,this._S)},e.prototype.getYMax=function(){return Kr(this.ic,Vr,Math.max,Yr,this._S)},e.prototype.getYMin=function(){return Kr(this.ic,Nr,Math.min,Ur,this._S)},e.prototype.eS=function(){var t,i,n=l(0,0);try{for(var e=o(this.ic),r=e.next();!r.done;r=e.next()){var s=r.value;n.x=Math.max(n.x,s.cu()),n.y=Math.max(n.y,s.lu())}}catch(i){t={error:i}}finally{try{r&&!r.done&&(i=e.return)&&i.call(e)}finally{if(t)throw t.error}}return n},e.prototype.He=function(){return this.MS&&this.getPointAmount()>0},e.prototype.pp=function(t){},e.prototype.PS=function(t,i,n){this.aa=ps(this.aa,t,{canReturnB:!1}),this.ZA=ps(this.ZA,i,{canReturnB:!1}),this.KA=ps(this.KA,n,{canReturnB:!1}),this.wf.xn()},e.prototype.hF=function(t,i,n,e){this.uF(i,n,e),this.PS(Array.isArray(t)?t:[t],i,n)},e.prototype.uF=function(t,i,n){var e=Js(Ks(t),Ks(i));this._S?this._S=Js(this._S,e):this._S=e,n&&(this._S=Js(this._S,n))},e.prototype.KM=function(){var t=this.ic.length,i=Math.min(this.scale.x.getInnerStart(),this.scale.x.getInnerEnd()),n=0;if(t>1)for(var e=0;e<t-1;e+=1)this.scale.x.Li(this.ic[e].Et(),this.ic[e].cu())<i&&(n+=1);return n},e.prototype.Cp=function(t,i,n,e){if(n>0){var r=Math.ceil(n/i),s=t.length-r;if(s>0&&e>0){var o=s-e>0?e:s;if(o>0){for(var h=0;h<o;h+=1)t[h].dispose();t.splice(0,o)}}}},e.prototype.aF=function(t){var i=this.ic.length>0?this.ic[this.ic.length-1]:void 0,n=i?i.Xh()[0].length+(i.Yh()[0]?i.Yh()[0].length:0):void 0;UH(t,n,this.Bp,this.$A)},e.prototype.fF=function(t){var i=this.qA.length>0?this.qA[this.qA.length-1].Xh().length+this.qA[this.qA.length-1].Yh().length:void 0;UH(t,i,this.Bp,this.iF)},e.prototype.cF=function(t,i){var n=this.qA.length>0?this.qA[this.qA.length-1].Xh().length+this.qA[this.qA.length-1].Yh().length:void 0;UH(t,n,this.Bp,this.iF),UH(i,n,this.Bp,this.eF)},e.prototype.tF=function(t,i){return this.wf.lF(this.scale).Qh(t,i).$n(this.dF.D(this.Bf)).Mu(this.vF.D(this.Bf)).ku(this.yu)},e.prototype.yF=function(t,i,n){return this.wf.iS(this.scale,void 0,[LV.UserSeries]).Qh(t,n).setMouseInteractions(!1).na(i)},e.prototype.nF=function(t,i){return this.yF(t,this.SF.D(this.Bf),i)},e.prototype.rF=function(t,i){return this.yF(t,this.mF.D(this.Bf),i)},e.prototype.bF=function(t){this.dF.C(t);for(var i=this.dF.D(this.Bf),n=0;n<this.ic.length;n+=1)this.ic[n].$n(i);this.wf.xn()},e.prototype.gF=function(t){if(this.dF.I(t),this.Bf)for(var i=this.dF.D(this.Bf),n=0;n<this.ic.length;n+=1)this.ic[n].$n(i);this.wf.xn()},e.prototype.wF=function(t){this.vF.C(t);for(var i=this.vF.D(this.Bf),n=0;n<this.ic.length;n+=1)this.ic[n].Mu(i);this.wf.xn()},e.prototype.pF=function(t){if(this.vF.I(t),this.Bf)for(var i=this.vF.D(this.Bf),n=0;n<this.ic.length;n+=1)this.ic[n].Mu(i);this.wf.xn()},e.prototype.kF=function(){return this.dF.L()},e.prototype.xF=function(){return this.dF.O()},e.prototype.MF=function(){return this.dF.P()},e.prototype.Au=function(){return this.vF.L()},e.prototype.AF=function(){return this.vF.O()},e.prototype.FF=function(){return this.vF.P()},e.prototype.TF=function(t){this.SF.C(t);for(var i=this.SF.D(this.Bf),n=0;n<this.qA.length;n+=1)this.qA[n].na(i);this.wf.xn()},e.prototype.CF=function(t){if(this.SF.I(t),this.Bf)for(var i=this.SF.D(this.Bf),n=0;n<this.qA.length;n+=1)this.qA[n].na(i);this.wf.xn()},e.prototype.BF=function(t){this.mF.C(t);for(var i=this.mF.D(this.Bf),n=0;n<this.JA.length;n+=1)this.JA[n].na(i);this.wf.xn()},e.prototype.LF=function(t){if(this.mF.I(t),this.Bf)for(var i=this.mF.D(this.Bf),n=0;n<this.JA.length;n+=1)this.JA[n].na(i);this.wf.xn()},e.prototype.IF=function(){return this.SF.L()},e.prototype.OF=function(){return this.mF.L()},e.prototype.PF=function(){return this.SF.O()},e.prototype.DF=function(){return this.SF.P()},e.prototype._F=function(){return this.mF.O()},e.prototype.RF=function(){return this.mF.P()},e.prototype.Ac=function(t,i){t.$n(this.dF.D(i)).Mu(this.vF.D(i)),this.zF(i),this.wf.xn()},e.prototype.zF=function(t){for(var i=0;i<this.qA.length;i+=1)this.qA[i].na(this.SF.D(t));for(i=0;i<this.JA.length;i+=1)this.JA[i].na(this.mF.D(t))},e.prototype.CS=function(){if(i.prototype.CS.call(this),this.QA=!1,this.Fp>0){var t=this.ic.length,n=this.KM();this.Cp(this.ic,this.Bp,this.Fp,n);var e=this.ic.length;this.qA.length>0&&this.Cp(this.qA,this.Bp,this.Fp,n),this.JA.length>0&&this.Cp(this.JA,this.Bp,this.Fp,n),t!==e&&this.Mp(),this.QA=!0}},e.prototype.Tf=function(){var t,n,e,r,s,h;if(i.prototype.Tf.call(this),this.aa.length>0&&(this.aF(this.aa),this.EF(this.ZA,this.KA),this.QA=!0),this.QA){var u=this.getBoundaries();try{for(var a=o(this.ic),f=a.next();!f.done;f=a.next()){f.value.Eo(u)}}catch(i){t={error:i}}finally{try{f&&!f.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}try{for(var c=o(this.qA),l=c.next();!l.done;l=c.next()){l.value.Eo(u)}}catch(t){e={error:t}}finally{try{l&&!l.done&&(r=c.return)&&r.call(c)}finally{if(e)throw e.error}}try{for(var d=o(this.JA),v=d.next();!v.done;v=d.next()){v.value.Eo(u)}}catch(t){s={error:t}}finally{try{v&&!v.done&&(h=d.return)&&h.call(d)}finally{if(s)throw s.error}}}},e.prototype.BS=function(){this._S=void 0,this.aa.length=0,this.ZA.length=0,this.KA.length=0},e.prototype.dispose=function(){i.prototype.dispose.call(this);for(var t=0;t<this.qA.length;t+=1)this.qA[t].dispose();for(t=0;t<this.JA.length;t+=1)this.JA[t].dispose();return this},e.prototype.restore=function(){i.prototype.restore.call(this);for(var t=0;t<this.qA.length;t+=1)this.qA[t].restore();for(t=0;t<this.JA.length;t+=1)this.JA[t].restore();return this},e.prototype.solveNearestFromScreen=function(t,i){void 0===i&&(i=this.DM);var n=function(t,i,n){for(var e,r,s=Number.MAX_VALUE,o=0;o<i.length;o+=1){var h=i[o],u=n(h,t);if(u){var a=Hs(t,u[0]),f=Hs(t,u[1]);(void 0===e||a<s||f<s)&&(e=u,r=h,a<s?s=a:f<s&&(s=f))}}return e&&r?[e,r]:void 0}(t,this.ic,i?this.oF:this.sF);if(void 0!==n&&void 0!==n[0]){var e=sr(n[0][0],this.wf.oo.Rt,this.scale),r=sr(n[0][1],this.wf.oo.Rt,this.scale);return KG(e,this.scale,this.Mg(new _G,this,e.x,e.y,r.y).Xf(),this,n[1].Qn())}},e.prototype.solveNearestFromSegment=function(t,i,n){void 0===n&&(n=this.DM);var e=n?i.WM(t):i.Cw(t);if(e)return KG(e[0],this.scale,this.Mg(new _G,this,e[0].x,e[0].y,e[1].y).Xf(),this,i.Qn())},e}(WH),lU=function(t,i,n,e,r){return t.addRow(i.getName()).addRow("Position",i.axisX.formatValue(n)).addRow("Value",i.axisY.formatValue(e)).addRow("Base",i.axisY.formatValue(r))},dU=function(t){function i(i,n,e,r,s,o,h,u,a,f,c){void 0===f&&(f=0);var l=t.call(this,i,n,e,r,s,o,h,u,a,c)||this;return l.NF=f,l.Mt="Area Series",l.Mg=lU,l}return n(i,t),i.prototype.add=function(t){var i=Array.isArray(t)?t:[t];if(i.length>0){var n=this.VF(i),e=h(this.GF(n),2),r=e[0],s=e[1];this.hF(n,r,s,b(l(Is,this.NF),l(Os,this.NF)));var o=this.aa[this.aa.length-1];this.Tp=o?{position:o.position,high:o.high,low:o.low}:void 0,this.an.emit("dataAdd",this,i,this._S)}return this},i.prototype.addArrayY=function(t,i,n){void 0===i&&(i=1),void 0===n&&(n=0);var e=n;return e||(e=this.Tp?this.Tp.position+i:0),this.add(XH(t,i,e)),this},i.prototype.Ip=function(t){return this.an.on("dataAdd",t)},i.prototype.Op=function(t){return this.an.off(t)},i.prototype.Pp=function(t){return this.an.on("dataClear",t)},i.prototype.Dp=function(t){return this.an.off(t)},i}(cU),vU=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.mF=new c(ir),i}return n(i,t),i.prototype.EF=function(t){return this.fF(t)},i.prototype.GF=function(t){for(var i=t.length,n=Array(i),e=0;e<i;e+=1){var r=t[e];n[e]=l(r.position,r.high)}return[n,[]]},i.prototype.setStrokeStyle=function(t){return this.TF(t),this},i.prototype.setStrokeStyleHighlight=function(t){return this.CF(t),this},i.prototype.getStrokeStyle=function(){return this.IF()},i.prototype.getStrokeStyleHighlight=function(){return this.PF()},i}(dU),yU=function(t){function i(i,n,e,r,s,o,h,u,a,f,l,d){var v=t.call(this,i,n,e,r,s,o,h,u,a,f,l)||this,y=d;return v.dF=new c(Fs(v.vn.mountainsFillStyle,y)),v.vF=new c(Re),v.SF=new c(Fs(v.vn.mountainsStrokeStyle,y)),v}return n(i,t),i.prototype.VF=function(t){return this.HF(t)},i.prototype.HF=function(t){var i=[];return 1===t.length?this.jF(t[0],i):this.WF(t,i),i},i.prototype.jF=function(t,i,n){void 0===n&&(n=0);var e=this.NF;return i[n]=t.y<e?v(t.x,e,e):v(t.x,t.y,e),n+=1},i.prototype.WF=function(t,i,n){void 0===n&&(n=0);for(var e=0,r=t.length-1,s=this.NF;e<r;){var o=t[e],h=t[e+=1];if(o.y>=s){var u=v(o.x,o.y,s);if(0!==n&&qr(i[n-1],u)||(i[n]=u,n+=1),h.y<s)(a=Mo(l(Os,s),l(Is,s),o,h))&&(i[n]=v(a.x,a.y,s),n+=1),i[n]=v(h.x,s,s),n+=1;else i[n]=v(h.x,h.y,s),n+=1}else{var a;u=v(o.x,s,s);if(0!==n&&qr(i[n-1],u)||(i[n]=u,n+=1),h.y>=s)(a=Mo(l(Os,s),l(Is,s),o,h))&&(i[n]=v(a.x,a.y,s),n+=1),i[n]=v(h.x,h.y,s),n+=1;else i[n]=v(h.x,s,s),n+=1}}return n},i.prototype.Lp=function(){return YH(this.ic,(function(t){return t[0]}))},i.prototype.setFillStyle=function(t){return this.bF(t),this},i.prototype.setFillStyleHighlight=function(t){return this.gF(t),this},i.prototype.getFillStyle=function(){return this.kF()},i.prototype.getFillStyleHighlight=function(){return this.xF()},i.prototype.attach=function(i,n){return void 0===n&&(n=!0),ks(i,this.vn,{fill:this.dF,stroke:this.SF}),t.prototype.attach.call(this,i,n)},i}(vU),SU=function(t){function i(i,n,e,r,s,o,h,u,a,f,l){var d=t.call(this,i,n,e,r,s,o,h,u,a,f,l)||this,v=i.getSeries().length;return d.dF=new c(Re),d.vF=new c(Fs(d.vn.mountainsInvertedFillStyle,v)),d.SF=new c(Fs(d.vn.mountainsInvertedStrokeStyle,v)),d}return n(i,t),i.prototype.VF=function(t){return this.UF(t)},i.prototype.UF=function(t){var i=[];return 1===t.length?this.jF(t[0],i):this.WF(t,i),i},i.prototype.jF=function(t,i,n){void 0===n&&(n=0);var e=this.NF;return i[n]=t.y>e?v(t.x,e,e):v(t.x,t.y,e),n+=1},i.prototype.WF=function(t,i,n){void 0===n&&(n=0);for(var e=0,r=t.length-1,s=this.NF;e<r;){var o=t[e],h=t[e+=1];if(o.y<=s){var u=v(o.x,o.y,s);if(0!==n&&qr(i[n-1],u)||(i[n]=u,n+=1),h.y>s)(a=Mo(l(Os,s),l(Is,s),o,h))&&(i[n]=v(a.x,a.y,s),n+=1),i[n]=v(h.x,s,s),n+=1;else i[n]=v(h.x,h.y,s),n+=1}else{var a;u=v(o.x,s,s);if(0!==n&&qr(i[n-1],u)||(i[n]=u,n+=1),h.y<=s)(a=Mo(l(Os,s),l(Is,s),o,h))&&(i[n]=v(a.x,a.y,s),n+=1),i[n]=v(h.x,h.y,s),n+=1;else i[n]=v(h.x,s,s),n+=1}}return n},i.prototype.Lp=function(){return YH(this.ic,(function(t){return t[1]}))},i.prototype.setFillStyle=function(t){return this.wF(t),this},i.prototype.setFillStyleHighlight=function(t){return this.pF(t),this},i.prototype.getFillStyle=function(){return this.Au()},i.prototype.getFillStyleHighlight=function(){return this.AF()},i.prototype.attach=function(i,n){return void 0===n&&(n=!0),ks(i,this.vn,{fill:this.vF,stroke:this.SF}),t.prototype.attach.call(this,i,n)},i}(vU),mU=function(t){function i(i,n,e,r,s,o,h,u,a,f,l){var d=t.call(this,i,n,e,r,s,o,h,u,a,f,l)||this,v=i.getSeries().length;return d.dF=new c(Fs(d.vn.mountainsFillStyle,v)),d.SF=new c(Fs(d.vn.mountainsStrokeStyle,v)),d.vF=new c(Fs(d.vn.mountainsInvertedFillStyle,v)),d.mF=new c(Fs(d.vn.mountainsInvertedStrokeStyle,v)),d}return n(i,t),i.prototype.VF=function(t){return this.YF(t)},i.prototype.EF=function(t,i){return this.cF(t,i)},i.prototype.YF=function(t){var i=0,n=[],e=t.length,r=this.NF;return e>0&&(this.XF&&(this.XF.y<=r&&r<=t[0].y||this.XF.y>=r&&r>=t[0].y)&&(n[i]=v(.5*(this.XF.x+t[0].x),r,r),i+=1),this.XF=t[e-1],1===e?this.jF(t[0],n,i):this.WF(t,n)),n},i.prototype.jF=function(t,i,n){return void 0===n&&(n=0),i[n]=v(t.x,t.y,this.NF),n+=1},i.prototype.WF=function(t,i){for(var n=0,e=0,r=t.length-1,s=this.NF;e<r;){var o=t[e],h=t[e+=1],u=v(o.x,o.y,s);0!==n&&qr(i[n-1],u)||(i[n]=u,n+=1),(o.y<=s&&s<=h.y||o.y>=s&&s>=h.y)&&(i[n]=v(.5*(o.x+h.x),s,s),n+=1),i[n]=v(h.x,h.y,s),n+=1}return n},i.prototype.GF=function(t){for(var i=t.length,n=Array(i),e=Array(i),r=this.NF,s=0;s<i;s+=1){var o=t[s];o.high>r?(n[s]=l(o.position,o.high),e[s]=l(o.position,r)):o.high<r?(n[s]=l(o.position,r),e[s]=l(o.position,o.high)):(n[s]=l(o.position,o.high),e[s]=l(o.position,o.high))}return[n,e]},i.prototype.Lp=function(){return YH(this.ic,(function(t){return t[0]}))},i.prototype.setPositiveFillStyle=function(t){return this.bF(t),this},i.prototype.setPositiveFillStyleHighlight=function(t){return this.gF(t),this},i.prototype.setNegativeFillStyle=function(t){return this.wF(t),this},i.prototype.setNegativeFillStyleHighlight=function(t){return this.pF(t),this},i.prototype.setPositiveStrokeStyle=function(t){return this.TF(t),this},i.prototype.setPositiveStrokeStyleHighlight=function(t){return this.CF(t),this},i.prototype.setNegativeStrokeStyle=function(t){return this.BF(t),this},i.prototype.setNegativeStrokeStyleHighlight=function(t){return this.LF(t),this},i.prototype.getPositiveFillStyle=function(){return this.kF()},i.prototype.getPositiveFillStyleHighlight=function(){return this.xF()},i.prototype.getNegativeFillStyle=function(){return this.Au()},i.prototype.getNegativeFillStyleHighlight=function(){return this.AF()},i.prototype.getPositiveStrokeStyle=function(){return this.IF()},i.prototype.getPositiveStrokeStyleHighlight=function(){return this.PF()},i.prototype.getNegativeStrokeStyle=function(){return this.OF()},i.prototype.getNegativeStrokeStyleHighlight=function(){return this._F()},i.prototype.attach=function(i,n){return void 0===n&&(n=!0),ks(i,this.vn,{fill:this.dF,fill2:this.vF,behavior:{colorStep:!0}}),t.prototype.attach.call(this,i,n)},i}(dU),bU={Positive:yU,Negative:SU,Bipolar:mU},gU=function(t,i,n,e,r){return t.addRow(i.getName()).addRow("Position",i.axisX.formatValue(n)).addRow("High",i.axisY.formatValue(e)).addRow("Low",i.axisY.formatValue(r))},wU=function(t){function i(i,n,e,r,s,o,h,u,a,f,l){var d=t.call(this,i,n,e,r,s,o,h,u,a,f)||this;d.Mt="Area Range Series",d.Mg=gU;var v=l;return d.dF=new c(Fs(d.vn.mountainsFillStyle,v)),d.SF=new c(Fs(d.vn.mountainsStrokeStyle,v)),d.vF=new c(Fs(d.vn.mountainsInvertedFillStyle,v)),d.mF=new c(Fs(d.vn.mountainsInvertedStrokeStyle,v)),d}return n(i,t),i.prototype.add=function(t){var i=Array.isArray(t)?t:[t],n=h(m(i),2),e=n[0],r=n[1];this.hF(t,e,r);var s=this.aa[this.aa.length-1];return this.Tp=s?{position:s.position,high:s.high,low:s.low}:void 0,this.an.emit("dataAdd",this,i,this._S),this},i.prototype.addArraysHighLow=function(t,i,n,e){if(void 0===n&&(n=1),void 0===e&&(e=0),t.length!==i.length)throw new Error("arrayHigh and arrayLow lengths are not equal");var r=e;return r||(r=this.Tp?this.Tp.position+n:0),this.add(function(t,i,n,e){void 0===n&&(n=1);for(var r=void 0!==e?e:0,s=new Array(t.length),o=0;o<t.length;o+=1)s[o]={position:r+n*o,high:t[o],low:i[o]};return s}(t,i,n,r)),this},i.prototype.EF=function(t,i){this.cF(t,i)},i.prototype.setHighFillStyle=function(t){return this.bF(t),this},i.prototype.setLowFillStyle=function(t){return this.wF(t),this},i.prototype.setHighFillStyleHighlight=function(t){return this.gF(t),this},i.prototype.setLowFillStyleHighlight=function(t){return this.pF(t),this},i.prototype.setHighStrokeStyle=function(t){return this.TF(t),this},i.prototype.setLowStrokeStyle=function(t){return this.BF(t),this},i.prototype.setHighStrokeStyleHighlight=function(t){return this.CF(t),this},i.prototype.setLowStrokeStyleHighlight=function(t){return this.LF(t),this},i.prototype.getHighFillStyle=function(){return this.kF()},i.prototype.getHighFillStyleHighlight=function(){return this.xF()},i.prototype.getLowFillStyle=function(){return this.Au()},i.prototype.getLowFillStyleHighlight=function(){return this.AF()},i.prototype.getHighStrokeStyle=function(){return this.IF()},i.prototype.getHighStrokeStyleHighlight=function(){return this.PF()},i.prototype.getLowStrokeStyle=function(){return this.OF()},i.prototype.getLowStrokeStyleHighlight=function(){return this._F()},i.prototype.Lp=function(){return YH(this.ic,(function(t){var i=t[0],n=t[1];if(!i||!n)return[];for(var e=[],r=i.length,s=0;s<r;s+=1)e[s]={position:i[s].x,high:i[s].y,low:n[s].y};return e}))},i.prototype.Ip=function(t){return this.an.on("dataAdd",t)},i.prototype.Op=function(t){return this.an.off(t)},i.prototype.Pp=function(t){return this.an.on("dataClear",t)},i.prototype.Dp=function(t){return this.an.off(t)},i.prototype.attach=function(i,n){return void 0===n&&(n=!0),ks(i,this.vn,{fill:this.dF,fill2:this.vF,behavior:{colorStep:!0}}),t.prototype.attach.call(this,i,n)},i}(cU),pU=function(t){function i(i,n,e,r,s,o,h,u,a,f,l,d){var v=t.call(this,i,n,e,r,s,o,h,u,a,new pW,l)||this;return v.Iw=f,v.Mt="Point series",v.Lw=5,v.sh=0,v.Rh=!1,v.zh=!1,v.Eh=!1,v.Bp=void 0,v.XM=function(t,i){var n=t.Pw(i);if(n)return sr(n,v.scale,v.wf.oo.Rt)},v.Ho=new c(Fs(l.seriesFillStyle,d)),v}return n(i,t),i.prototype.add=function(i){return t.prototype.add.call(this,i),this},i.prototype.ml=function(){return xs(this.Ho)},i.prototype.pp=function(t){},i.prototype.attach=function(i,n){return void 0===n&&(n=!0),ks(i,this.vn,{fill:this.Ho}),t.prototype.attach.call(this,i,n)},i.prototype.Ac=function(t,i){t.$n(this.Ho.D(i)),this.wf.xn()},i.prototype.setPointFillStyle=function(t){this.Ho.C(t);for(var i=this.Ho.D(this.Bf),n=0;n<this.ic.length;n+=1)this.ic[n].$n(i);return this.wf.xn(),this},i.prototype.getPointFillStyle=function(){return this.Ho.L()},i.prototype.setPointFillStyleHighlight=function(t){if(this.Ho.I(t),this.getHighlighted())for(var i=this.Ho.D(!0),n=0;n<this.ic.length;n+=1)this.ic[n].$n(i);return this.wf.xn(),this},i.prototype.getPointFillStyleHighlight=function(){return this.Ho.D(!0)},i.prototype.setPointSize=function(t){this.Lw=t;for(var i=0;i<this.ic.length;i+=1)this.ic[i].oi(t);return this.wf.xn(),this},i.prototype.getPointSize=function(){return this.Lw},i.prototype.getPointShape=function(){return this.Iw},i.prototype.setPointRotation=function(t){this.sh=t;for(var i=0;i<this.ic.length;i+=1)this.ic[i].ne(t);return this.wf.xn(),this},i.prototype.getPointRotation=function(){return this.sh},i.prototype.setIndividualPointSizeEnabled=function(t){this.Rh=t;for(var i=0;i<this.ic.length;i+=1)this.ic[i].Kh(t);return this.wf.xn(),this},i.prototype.getIndividualPointSizeEnabled=function(){return this.Rh},i.prototype.setIndividualPointRotationEnabled=function(t){this.zh=t;for(var i=0;i<this.ic.length;i+=1)this.ic[i].qh(t);return this.wf.xn(),this},i.prototype.getIndividualPointRotationEnabled=function(){return this.zh},i.prototype.setIndividualPointValueEnabled=function(t){this.Eh=t;for(var i=0;i<this.ic.length;i+=1)this.ic[i].Jh(t);return this.wf.xn(),this},i.prototype.getIndividualPointValueEnabled=function(){return this.Eh},i.prototype.DS=function(t){var i=this.ic[0];i||(i=this.Cc(this.NM())),i.Qh(t)},i.prototype.NM=function(){return this.wf.US(this.scale).Zh(this.Iw).oi(this.Lw).ne(this.sh).Kh(this.Rh).qh(this.zh).Jh(this.Eh).$n(this.Ho.D(this.Bf))},i.prototype.solveNearestFromScreen=function(t){var i=qH(t,this.ic,this.XM,Hs);if(void 0!==i){var n=sr(i[0],this.wf.oo.Rt,this.scale),e=i[1].Qn(),r=e instanceof Ne?i[0].color?new Ee({color:i[0].color}):new Ee({color:e.getFallbackColor()}):e;return KG(n,this.scale,this.Mg(new _G,this,n.x,n.y,n).Xf(),this,r)}},i.prototype.solveNearestFromSegment=function(t,i){var n=i.Pw(t);if(n){var e=i.Qn(),r=e instanceof Ne?n.color?new Ee({color:n.color}):new Ee({color:e.getFallbackColor()}):e;return KG(n,this.scale,this.Mg(new _G,this,n.x,n.y,n).Xf(),this,r)}},i}(KH),kU=function(t){function i(i,n,e,r,s,o,h,u,a,f,l,d){var v=t.call(this,i,n,e,r,s,o,h,u,a,l)||this;v.DM=!1,v.Mg=xU,v.ml=function(){return xs(v.Ho)},v.it="Intensity",v.vn=l;var y=d;return v.Ho=new c(Ts(l.heatmapFillStyle,y,l.seriesFillStyle)),v.wa=new c(Ts(l.heatmapWireframeStyle,y,Re)),v.Cc(v.YS(f)),v}return n(i,t),i.prototype.pp=function(t){if(t instanceof Go)throw new Error("IntensitySeries can not be attached to a logarithmic Axis.");if(t instanceof Vo&&t.Ei())throw new Error("IntensitySeries can not be attached to a high precision Axis.")},i.prototype.He=function(){return this.MS},i.prototype.reset=function(t){return this.ic[0].l(t),this.wf.xn(),this},i.prototype.setFillStyle=function(t){this.Ho.C(t);for(var i=this.Ho.D(this.Bf),n=0;n<this.ic.length;n+=1)this.ic[n].$n(i);return this.wf.xn(),this},i.prototype.getFillStyle=function(){return this.Ho.L()},i.prototype.setWireframeStyle=function(t){this.wa.C(t);for(var i=this.wa.D(this.Bf),n=0;n<this.ic.length;n+=1)this.ic[n].pa(i);return this.wf.xn(),this},i.prototype.getWireframeStyle=function(){return this.wa.L()},i.prototype.addRow=function(t,i,n){return this.ic[0].Aa(t,i,n),this.vr.engine.xn(),this},i.prototype.addColumn=function(t,i,n){return this.ic[0].Fa(t,i,n),this.vr.engine.xn(),this},i.prototype.invalidateColorsOnly=function(t,i){return this.ic[0].Ta(t,i),this.wf.xn(),this},i.prototype.invalidateValuesOnly=function(t,i){return this.ic[0].Ca(t,i),this.wf.xn(),this},i.prototype.solveNearestFromScreen=function(t,i){void 0===i&&(i=this.DM);var n=sr(t,this.wf.oo.Rt,this.scale),e=i?this.ic[0].ZF(n):this.ic[0].Pw(n);if(e){var r=e[0];return KG(r,this.scale,this.Mg(new _G,this,r.x,r.y,e[1]).Xf(),this)}},i.prototype.solveNearestFromSegment=function(t,i,n){void 0===n&&(n=this.DM);var e=sr(t,this.wf.oo.Rt,this.scale),r=n?i.ZF(e):i.Pw(e);if(r)return KG(r[0],this.scale,this.Mg(new _G,this,r[0].x,r[0].y,r[1]).Xf(),this)},i.prototype.setCursorInterpolationEnabled=function(t){return this.DM=t,this.wf.oo.xn(),this},i.prototype.getCursorInterpolationEnabled=function(){return this.DM},i.prototype.setCursorResultTableFormatter=function(t){return this.Mg=t,this.vr.engine.xn(),this},i.prototype.getCursorResultTableFormatter=function(){return this.Mg},i.prototype.getXMax=function(){var t=this.ic[0];return t?t.Et():void 0},i.prototype.getXMin=function(){var t=this.ic[0];return t?t.zt():void 0},i.prototype.getYMax=function(){var t=this.ic[0];return t?t.Vt():void 0},i.prototype.getYMin=function(){var t=this.ic[0];return t?t.Nt():void 0},i.prototype.eS=function(){var t,i,n=l(0,0);try{for(var e=o(this.ic),r=e.next();!r.done;r=e.next()){var s=r.value;n.x=Math.max(n.x,s.cu()),n.y=Math.max(n.y,s.lu())}}catch(i){t={error:i}}finally{try{r&&!r.done&&(i=e.return)&&i.call(e)}finally{if(t)throw t.error}}return n},i.prototype.Ac=function(t,i){t.$n(this.Ho.D(i)),this.wf.xn()},i.prototype.YS=function(t){return this.wf.KF(this.scale).setMouseInteractions(!0).l(t).$n(this.Ho.L()).pa(this.wa.L())},i.prototype.Tf=function(){return t.prototype.Tf.call(this),this.ic[0].Eo(this.getBoundaries()),this},i.prototype.attach=function(i,n){return t.prototype.attach.call(this,i,n),ks(i,this.vn,{fill:this.Ho}),this},i}(WH),xU=function(t,i,n,e,r){return t.addRow(i.getName()).addRow("X:","",n.toFixed(1)).addRow("Y:","",e.toFixed(1)).addRow("Value:","",r.toFixed(2))},MU=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.Mt="Intensity Grid",i.it="Intensity Grid",i}return n(i,t),i}(kU),AU=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.Mt="Intensity Mesh",i.it="Intensity Mesh",i}return n(i,t),i.prototype.invalidateGeometryOnly=function(t,i){return this.ic[0].Ba(t,i),this.wf.xn(),this},i.prototype.Tf=function(){return t.prototype.Tf.call(this),this.ic[0].Fe(),this},i}(kU),FU={Grid:MU,Mesh:AU},TU=function(){function i(t,i,n,e,r){this.containerObj=n,this.chart=e,this.qF=r,this.JF=!1,this.ur=t.resourcesBaseUrl,this.dr=r||gz,this.QF(n.Es),this.$F(),this.tT(),this.iT(),this.nT(i),this.chart.eT().push(this)}return i.prototype.QF=function(t){this.rT=t,this.sT=wr.document.createElement("div"),this.oT=new R_(this.ur,this.dr,this.chart,this.sT),this.hT=wr.document.createElement("table"),this.hT.style.borderSpacing="0",this.rT.appendChild(this.oT.Fr()),this.rT.appendChild(this.sT),this.sT.appendChild(this.hT)},i.prototype.tT=function(){var t=this,i=0,n=0,e=0,r=0,s=!1;this.JF=!1,this.rT.onmousedown=function(o){o=o||wr.event,e=o.clientX,r=o.clientY,s=!0,wr.document.onmouseup=function(i){t.JF?t.rT.addEventListener("click",ss,!0):t.rT.removeEventListener("click",ss,!0),s=!1,t.JF=!1,wr.document.onmouseup=null,wr.document.onmousemove=null},wr.document.onmousemove=function(o){o=o||wr.event,s&&(i=e-o.clientX,n=r-o.clientY,e=o.clientX,r=o.clientY,t.JF=!0,t.rT.style.top=t.rT.offsetTop-n+"px",t.rT.style.left=t.rT.offsetLeft-i+"px",t.rT.style.removeProperty("right"),t.rT.style.removeProperty("bottom"))}}},i.prototype.iT=function(){var t=this,i=0,n=0,e=0,r=0,s=!1;this.rT.ontouchstart=function(o){o=o||wr.event,e=o.touches[0].clientX,r=o.touches[0].clientY,s=!0,t.rT.ontouchend=function(){s=!1,wr.document.ontouchend=null,wr.document.ontouchmove=null},t.rT.ontouchmove=function(o){s&&(ss(o),o=o||wr.event,i=e-o.touches[0].clientX,n=r-o.touches[0].clientY,e=o.touches[0].clientX,r=o.touches[0].clientY,t.rT.style.top=t.rT.offsetTop-n+"px",t.rT.style.left=t.rT.offsetLeft-i+"px",t.rT.style.removeProperty("right"),t.rT.style.removeProperty("bottom"))}}},i.prototype.$F=function(){this.rT.style.setProperty("top","10px"),this.rT.style.setProperty("left","10px"),this.rT.style.position="absolute",this.rT.style.display="flex",this.rT.style.alignItems="flex-start",this.sT.style.setProperty("display","none")},i.prototype.removePositionProperty=function(){this.rT.style.removeProperty("top"),this.rT.style.removeProperty("left"),this.rT.style.removeProperty("bottom"),this.rT.style.removeProperty("right")},i.prototype.setPositionProperty=function(i){switch(this.removePositionProperty(),i){case t.OSMPosition.BottomLeft:this.rT.style.setProperty("bottom","10px"),this.rT.style.setProperty("left","10px");break;case t.OSMPosition.TopLeft:this.rT.style.setProperty("top","10px"),this.rT.style.setProperty("left","10px");break;case t.OSMPosition.BottomRight:this.rT.style.setProperty("bottom","10px"),this.rT.style.setProperty("right","10px");break;case t.OSMPosition.TopRight:default:this.rT.style.setProperty("top","10px"),this.rT.style.setProperty("right","10px")}},i.prototype.nT=function(t){for(var i=0;i<t.length;i+=1)for(var n=this.hT.insertRow(),e=0;e<t[i].length;e+=1){var r=n.insertCell(),s=t[i][e];"object"!=typeof s?this.uT(s,r):this.addCustomButton(s,r)}},i.prototype.uT=function(i,n){switch(i){case t.OnScreenMenuButtonType.ZoomIn:this.aT(new T_(this.ur,this.chart,this.dr),n);break;case t.OnScreenMenuButtonType.ZoomInX:this.aT(new C_(this.ur,this.chart,this.dr),n);break;case t.OnScreenMenuButtonType.ZoomInY:this.aT(new B_(this.ur,this.chart,this.dr),n);break;case t.OnScreenMenuButtonType.ZoomOut:this.aT(new L_(this.ur,this.chart,this.dr),n);break;case t.OnScreenMenuButtonType.ZoomOutX:this.aT(new I_(this.ur,this.chart,this.dr),n);break;case t.OnScreenMenuButtonType.ZoomOutY:this.aT(new O_(this.ur,this.chart,this.dr),n);break;case t.OnScreenMenuButtonType.ZoomToFit:this.aT(new D_(this.ur,this.chart,this.dr),n);break;case t.OnScreenMenuButtonType.ToggleAnimations:this.aT(new P_(this.ur,this.chart,this.dr),n);break;default:console.error('No predefined button like "'+t.OnScreenMenuButtonType[i]+'" exists.')}},i.prototype.aT=function(t,i){i.rowSpan=t.ar.rows,i.colSpan=t.ar.columns,t.Ar(i)},i.prototype.addCustomButton=function(t,i){var n=new __(this.ur,t,this.chart);return this.aT(n,i),this},i.prototype.dispose=function(){this.containerObj.dispose()},i}(),CU=function(t,i,n){return t.addRow(i.getName()).addRow("X:","",i.axisX.formatValue(n.x)).addRow("Y:","",i.axisY.formatValue(n.y)).addRow("Intensity:","",n.intensity.toFixed(1))},BU=function(t){function i(i,n,e,r,s,o,h,u,a,f,l,d){var v=t.call(this,i,n,e,r,s,o,h,u,a,l)||this;v.Mt="Heatmap Grid Series",v.Mg=CU,v.DM=!1,v.fT=f,v.vn=l;var y=d;v.Ho=new c(Ts(l.heatmapGridSeriesFillStyle,y,l.seriesFillStyle)),v.wa=new c(Ts(v.vn.heatmapGridSeriesWireframeStyle,y,ir));var S=f.start||{x:0,y:0},m=f.end?{x:(f.end.x-S.x)/f.columns,y:(f.end.y-S.y)/f.rows}:f.step||{x:1,y:1},b={heatmapDataType:"intensity",dataOrder:f.dataOrder||"columns",columns:f.columns,rows:f.rows,start:S,step:m};return v.Vm=b,v.Cc(v.wf.cT(v.scale,[],b).$n(v.Ho.D(v.Bf)).pa(v.wa.D(v.Bf))).dispose(),v.setMouseInteractions(!1),v}return n(i,t),i.prototype.clear=function(){return this.ic[0].$h(),this.wf.xn(),this.an.emit("dataClear",this),this},i.prototype.setWireframeStyle=function(t){return this.wa.C(t),this.ic[0].pa(this.wa.D(this.Bf)),this.wf.xn(),this.an.emit("styleChange",this),this},i.prototype.getWireframeStyle=function(){return this.wa.L()},i.prototype.setCursorInterpolationEnabled=function(t){return this.DM=t,this.wf.oo.xn(),this},i.prototype.getCursorInterpolationEnabled=function(){return this.DM},i.prototype.setIntensityInterpolation=function(t){return t=t||"disabled",this.ic[0].Hm(t),this.wf.xn(),this.an.emit("styleChange",this),this},i.prototype.getIntensityInterpolation=function(){return this.ic[0].jm()},i.prototype.setPixelInterpolationMode=function(t){return this.setIntensityInterpolation(t),this},i.prototype.getPixelInterpolationMode=function(){return this.getIntensityInterpolation()},i.prototype.He=function(){return this.MS},i.prototype.ml=function(){return xs(this.Ho)},i.prototype.attach=function(i,n){return t.prototype.attach.call(this,i,n),ks(i,this.vn,{fill:this.Ho}),this},i.prototype.lT=function(t){this.ic[0].lT().forEach((function(i){t.ic[0].Wm(i)}))},i.prototype.Dp=function(t){return this.an.off(t)},i.prototype.Pp=function(t){return this.an.on("dataClear",t)},i.prototype.dT=function(t){return this.an.on("styleChange",t)},i.prototype.vT=function(t){return this.an.off(t)},i.prototype.solveNearestFromScreen=function(t,i){void 0===i&&(i=this.DM);var n=sr(t,this.wf.oo.Rt,this.scale),e=i?this.ic[0].ZF(n):this.ic[0].Pw(n);if(e)return KG(e,this.scale,this.Mg(new _G,this,{x:e.x,y:e.y,column:e.column,row:e.column,intensity:e.cellValue}).Xf(),this)},i.prototype.solveNearestFromSegment=function(t,i,n){void 0===n&&(n=this.DM);var e=sr(t,this.wf.oo.Rt,this.scale),r=n?i.ZF(e):i.Pw(e);if(r)return KG(r,this.scale,this.Mg(new _G,this,{x:r.x,y:r.y,column:r.column,row:r.column,intensity:r.cellValue}).Xf(),this)},i.prototype.getXMax=function(){var t=this.ic[0];return t?t.Et():void 0},i.prototype.getXMin=function(){var t=this.ic[0];return t?t.zt():void 0},i.prototype.getYMax=function(){var t=this.ic[0];return t?t.Vt():void 0},i.prototype.getYMin=function(){var t=this.ic[0];return t?t.Nt():void 0},i.prototype.eS=function(){var t,i,n=l(0,0);try{for(var e=o(this.ic),r=e.next();!r.done;r=e.next()){var s=r.value;n.x=Math.max(n.x,s.cu()),n.y=Math.max(n.y,s.lu())}}catch(i){t={error:i}}finally{try{r&&!r.done&&(i=e.return)&&i.call(e)}finally{if(t)throw t.error}}return n},i.prototype.pp=function(t){if(!(t instanceof Vo))throw new Error("HeatmapGridSeries can only be attached to a pair of Linear Axes.");if(t instanceof Vo&&t.Ei())throw new Error("HeatmapGridSeries can not be attached to a high precision Axis.")},i.prototype.Ac=function(t,i){t.$n(this.Ho.D(i)).pa(this.wa.D(i)),this.wf.xn()},i.prototype.Tf=function(){return t.prototype.Tf.call(this),this.restore().ic[0].Eo(this.getBoundaries()),this},i}(WH),LU=function(t){function i(i,n,e,r,s,o,h,u,a,f,c,l){var d=t.call(this,i,n,e,r,s,o,h,u,a,f,c,l)||this;return d.Mg=CU,d}return n(i,t),i.prototype.invalidateIntensityValues=function(t){if(Array.isArray(t)){if(0===t.length)return this;var i={x:t.length,y:t[0].length,columns:"columns"===this.Vm.dataOrder?t.length:t[0].length,rows:"rows"===this.Vm.dataOrder?t.length:t[0].length},n="columns"===this.Vm.dataOrder?this.Vm.columns:this.Vm.rows,e="columns"===this.Vm.dataOrder?this.Vm.rows:this.Vm.columns;if(i.x>n||i.y>e){if(!0===this.chart.ps.warnings){var r="HeatmapGridSeries.invalidateIntensityValues intensity matrix overflow.\nGrid "+this.Vm.columns+"x"+this.Vm.rows+", input "+i.columns+"x"+i.rows+".\nExcess data will be automatically clipped. This can result in sub-optimal performance.";wr.console.warn(r)}for(var s=[],o=0;o<n;o+=1)s[o]=t[o].slice(0,e);t=s}this.ic[0].Wm({type:"intensity",lengthPrimary:i.x,lengthSecondary:i.y,startPrimary:0,startSecondary:0,values:t})}else if("iColumn"in t&&"iRow"in t&&"values"in t){if(0===t.values.length)return this;i={primary:t.values.length,secondary:t.values[0].length,columns:"columns"===this.Vm.dataOrder?t.values.length:t.values[0].length,rows:"rows"===this.Vm.dataOrder?t.values.length:t.values[0].length};var h="columns"===this.Vm.dataOrder?t.iColumn:t.iRow,u=h+i.primary-1,a="columns"===this.Vm.dataOrder?t.iRow:t.iColumn,f=a+i.secondary-1,c=("columns"===this.Vm.dataOrder?this.Vm.columns:this.Vm.rows)-1,l=("columns"===this.Vm.dataOrder?this.Vm.rows:this.Vm.columns)-1;if(h<0||a<0){if(!0===this.chart.ps.warnings){r="HeatmapGridSeries.invalidateIntensityValues invalidation start below 0 not permitted.\niColumn: "+t.iColumn+", iRow: "+t.iRow+".\nNo intensity values will be invalidated.";wr.console.warn(r)}return this}if(u>c||f>l){if(!0===this.chart.ps.warnings){r="HeatmapGridSeries.invalidateIntensityValues intensity matrix overflow.\nGrid "+this.Vm.columns+"x"+this.Vm.rows+", input "+i.columns+"x"+i.rows+" starting at ["+t.iColumn+","+t.iRow+"].\nOut of bounds data will be automatically clipped. This can result in sub-optimal performance.";wr.console.warn(r)}var d=Math.max(u-c,0),v=i.primary-d,y=Math.max(f-l,0);for(s=[],o=0;o<v;o+=1)s[o]=t.values[o].slice(0,y>0?-y:void 0);t={iColumn:t.iColumn,iRow:t.iRow,values:s}}this.ic[0].Wm({type:"intensity",lengthPrimary:t.values.length,lengthSecondary:t.values[0].length,startPrimary:h,startSecondary:a,values:t.values})}return this.an.emit("invalidateIntensity",this,t),this.wf.xn(),this},i.prototype.setFillStyle=function(t){return this.Ho.C(t),this.ic[0].$n(this.Ho.L()),this.an.emit("styleChange",this),this.wf.xn(),this},i.prototype.getFillStyle=function(){return this.Ho.L()},i.prototype.setCursorResultTableFormatter=function(t){return this.Mg=t,this.vr.engine.xn(),this},i.prototype.getCursorResultTableFormatter=function(){return this.Mg},i.prototype.yT=function(t){return this.an.on("invalidateIntensity",t)},i.prototype.ST=function(t){return this.an.off(t)},i}(BU),IU=function(t){function i(i,n,r,s,o,h,u,a,f,l,d,v){var y=t.call(this,i,n,r,s,o,h,u,a,f,d)||this;y.Mt="Scrolling Heatmap Grid Series",y.Mg=CU,y.DM=!1,y.vn=d;var S=v;y.Ho=new c(Ts(d.heatmapGridSeriesFillStyle,S,d.seriesFillStyle)),y.wa=new c(Ts(y.vn.heatmapGridSeriesWireframeStyle,S,ir));var m=e({scrollDimension:"columns",heatmapDataType:"intensity",start:{x:0,y:0},step:{x:1,y:1}},l);y.Vm=m;var b=[{type:"DataPattern",args:{pattern:"columns"===m.scrollDimension?m.step.x>0?"ProgressiveX":"RegressiveX":m.step.y>0?"ProgressiveY":"RegressiveY",regularProgressiveStep:!0}}];return y.Cc(y.wf.mT(y.scale,b,m).$n(y.Ho.D(y.Bf)).pa(y.wa.D(y.Bf))),y.setMouseInteractions(!1),y}return n(i,t),i.prototype.clear=function(){return this.ic[0].$h(),this.wf.xn(),this},i.prototype.setWireframeStyle=function(t){return this.wa.C(t),this.ic[0].pa(this.wa.D(this.Bf)),this.wf.xn(),this},i.prototype.getWireframeStyle=function(){return this.wa.L()},i.prototype.setPixelInterpolationMode=function(t){return t=t||"disabled",this.ic[0].Hm(t),this.wf.xn(),this},i.prototype.getPixelInterpolationMode=function(){return this.ic[0].jm()},i.prototype.setCursorInterpolationEnabled=function(t){return this.DM=t,this.wf.oo.xn(),this},i.prototype.getCursorInterpolationEnabled=function(){return this.DM},i.prototype.setDataCleaning=function(t){return this.ic[0].ca(t),this.wf.xn(),this},i.prototype.He=function(){return this.MS},i.prototype.ml=function(){return xs(this.Ho)},i.prototype.attach=function(i,n){return t.prototype.attach.call(this,i,n),ks(i,this.vn,{fill:this.Ho}),this},i.prototype.$n=function(t){var i=this;return this.Ho.C(t),this.ic.forEach((function(t){return t.$n(i.Ho.D(i.Bf))})),this.wf.xn(),this},i.prototype.solveNearestFromScreen=function(t,i){void 0===i&&(i=this.DM);var n=sr(t,this.wf.oo.Rt,this.scale),e=i?this.ic[0].ZF(n):this.ic[0].Pw(n);if(e)return KG(e,this.scale,this.Mg(new _G,this,{x:e.x,y:e.y,column:e.column,row:e.column,intensity:e.cellValue}).Xf(),this)},i.prototype.solveNearestFromSegment=function(t,i,n){void 0===n&&(n=this.DM);var e=sr(t,this.wf.oo.Rt,this.scale),r=n?i.ZF(e):i.Pw(e);if(r)return KG(r,this.scale,this.Mg(new _G,this,{x:r.x,y:r.y,column:r.column,row:r.column,intensity:r.cellValue}).Xf(),this)},i.prototype.pp=function(t){if(!(t instanceof Vo))throw new Error("HeatmapScrollingGridSeries can only be attached to a pair of Linear Axes.");if(t instanceof Vo&&t.Ei())throw new Error("HeatmapScrollingGridSeries can not be attached to a high precision Axis.")},i.prototype.getXMax=function(){return this.ic[0].Et()||0},i.prototype.getXMin=function(){return this.ic[0].zt()||0},i.prototype.getYMax=function(){return this.ic[0].Vt()||0},i.prototype.getYMin=function(){return this.ic[0].Nt()||0},i.prototype.eS=function(){var t,i,n=l(0,0);try{for(var e=o(this.ic),r=e.next();!r.done;r=e.next()){var s=r.value;n.x=Math.max(n.x,s.cu()),n.y=Math.max(n.y,s.lu())}}catch(i){t={error:i}}finally{try{r&&!r.done&&(i=e.return)&&i.call(e)}finally{if(t)throw t.error}}return n},i.prototype.Ac=function(t,i){t.$n(this.Ho.D(i)).pa(this.wa.D(i)),this.wf.xn()},i}(WH),OU=function(t){function i(i,n,e,r,s,o,h,u,a,f,c,l){var d=t.call(this,i,n,e,r,s,o,h,u,a,f,c,l)||this;return d.Mg=CU,d}return n(i,t),i.prototype.addIntensityValues=function(t){var i=t.length,n=t[0].length,e=("columns"===this.Vm.scrollDimension?t.length:t[0].length,"rows"===this.Vm.scrollDimension?t.length:t[0].length,0+n-1),r=this.Vm.resolution-1;if(e>r){if(!0===this.chart.ps.warnings){var s="HeatmapScrollingGridSeries.addIntensityValues intensity matrix overflow.\nGrid resolution: "+this.Vm.resolution+", input "+i+"x"+n+".\nExcess data will be automatically clipped. This can result in sub-optimal performance.";wr.console.warn(s)}for(var o=[],h=0;h<i;h+=1)o[h]=t[h].slice(0,r+1);t=o}return this.ic[0].Km(t),this.wf.xn(),this},i.prototype.setFillStyle=function(t){return this.$n(t),this},i.prototype.getFillStyle=function(){return this.Ho.L()},i.prototype.setCursorResultTableFormatter=function(t){return this.Mg=t,this.vr.engine.xn(),this},i.prototype.getCursorResultTableFormatter=function(){return this.Mg},i}(IU),PU=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return function(i,n){return t.forEach((function(t){return t.forEach((function(t){t.Rt.oi(i),t.yv.oi(n)}))}))}},DU=function(t,i){var n=t.indexOf(i);-1!==n&&t.splice(n,1)},_U=function(t){return t.getHeight()},RU=l(10,10);t.AxisPosition=void 0,(XW=t.AxisPosition||(t.AxisPosition={}))[XW.Top=0]="Top",XW[XW.Bottom=1]="Bottom",XW[XW.Left=2]="Left",XW[XW.Right=3]="Right";var zU,EU=new Set([t.AxisPosition.Top,t.AxisPosition.Bottom,t.AxisPosition.Left,t.AxisPosition.Right]),NU=function(t){return t.Xe()},VU=function(t){return t.stop()},GU=function(t){return t.getChartInteractionFitByDrag()?t.fit(!0):void 0},HU=function(t){var i=!1,n={type:"linear"};if(t&&(void 0!==t.opposite&&(i=t.opposite),t.type&&"linear-highPrecision"===t.type&&(n={type:"linear-highPrecision"}),t.type&&"logarithmic"===t.type)){var e=10;if(t.base)if("E"===t.base||"e"===t.base||"natural"===t.base)e="e";else if("number"==typeof t.base)e=t.base;else if("string"==typeof t.base)try{e=Number(t.base)}catch(i){console.warn('Unidentified logarithmic base "'+t.base+'"')}n={base:e,type:"logarithmic"}}return{opposite:i,type:n}},jU=function(t,i){var n="linear-highPrecision"===t.Un.type||"linear-highPrecision"===i.Un.type,e="logarithmic"===t.Un.type||"logarithmic"===i.Un.type;if(n&&e){var r="Invalid Axis combination | 'logarithmic' can't be combined with 'linear-highPrecision' (x: "+t.Un.type+", y: "+i.Un.type+")";throw new Error(r)}};!function(t){t[t.bg=0]="bg",t[t.gridLine0=1]="gridLine0",t[t.gridLine1=2]="gridLine1",t[t.gridLine2=3]="gridLine2",t[t.highlightersBelow=4]="highlightersBelow",t[t.plotting=5]="plotting",t[t.highlightersAbove=6]="highlightersAbove",t[t.fg=7]="fg",t[t.ui=8]="ui"}(zU||(zU={}));var WU,UU=function(i){function r(n,r,s,h,u,a,f){var c=i.call(this,n,r,s,r.qs(zU.bg),r.qs(zU.ui),h,f,a?a.theme:void 0)||this;c.bT=c.zv.d2({scaleXYConstructor:Vo}),c.gT=[],c.wT=[],c.pT=[],c.kT=[],c.xT=new Map,c.MT=!0,c.AT=!0,c.FT=!0,c.Kl=2,c.TT=!0,c.CT=!1,c.cb=!1,c.Mn=!0,c.BT=[],c.LT=c.Rf.Pc(c.bT).$n(Re).Ys(ir).setMouseInteractions(!1),c.IT=c.Rf.Gf(c.bT).na(ir).setMouseInteractions(!1),c.OT=c.Rf.Gf(c.bT).na(ir).setMouseInteractions(!1),c.PT=c.vn.chartXYZoomingRectangleFillStyle,c.DT=c.vn.chartXYZoomingRectangleStrokeStyle,c._T=c.vn.chartXYFittingRectangleFillStyle,c.RT=c.vn.chartXYFittingRectangleStrokeStyle,c.zT=t.MouseStyles.Default,c.ET=t.MouseStyles.Move,c.NT=t.MouseStyles.ZoomIn,c.VT=t.MouseStyles.Default,c.GT=void 0,c.HT=PU(c.wT,c.gT),c.jT=PU(c.pT,c.kT),c.WT=function(t,i,n,e,r){c.HT(e,r),c.jT(r,e),c.bT.oi(e,r);var s=c.wT.map(_U),o=c.gT.map(_U),h=c.pT.map(_U),u=c.kT.map(_U),a=s.reduce(Ns,c.hh.bottom+c.Qt.bottom),f=o.reduce(Ns,c.hh.top+c.Qt.top+c.yy()),d=h.reduce(Ns,c.hh.left+c.Qt.left),v=u.reduce(Ns,c.hh.right+c.Qt.right),y=c.bT.x.getCellSize()-(d+v),S=c.bT.y.getCellSize()-(a+f),m=[d,v],b=[a,f];c.bT.x.xi(0,y),c.bT.y.xi(0,S),c.bT.Zi(m),c.bT.Ki(b),c.hg.oi(l(y,S));for(var g=0;g<c.wT.length;g+=1)c.wT[g].Rt.ai(m);for(g=0;g<c.gT.length;g+=1)c.gT[g].Rt.ai(m);for(g=0;g<c.pT.length;g+=1)c.pT[g].Rt.ai(b);for(g=0;g<c.kT.length;g+=1)c.kT[g].Rt.ai(b)},c.UT=function(t,i){c.xT.set(t,i)},c.Rl=function(t){c.wT.includes(t)?DU(c.wT,t):c.gT.includes(t)?DU(c.gT,t):c.pT.includes(t)?DU(c.pT,t):c.kT.includes(t)&&DU(c.kT,t),c.xT.delete(t),c.engine.xn()},c.zl=function(t){return function(i){!function(t,i){t.includes(i)||t.push(i)}(t,i),c.engine.xn()}},c.rp=function(t){c.Uv(t)},c.sp=function(t){c.Xv(t)},c.YT=function(t){var i,n,e,r,s,h,u,a;void 0===t&&(t=!1);var f=function(t){return function(i,n,e,r){return n.Tf(i,e,r.length),i+n.getHeight()*t}},d=c.wT.reduce(f(-1),0),v=c.gT.reduce(f(1),0),y=c.pT.reduce(f(-1),0),S=c.kT.reduce(f(1),0),m=Math.abs(d)+c.hh.bottom+c.Qt.bottom,b=Math.abs(v)+c.hh.top+c.Qt.top+c.yy(),w=Math.abs(y)+c.hh.left+c.Qt.left,p=Math.abs(S)+c.hh.right+c.Qt.right,k=c.bT.x.getCellSize()-(w+p),x=c.bT.y.getCellSize()-(m+b),M=[w,p],A=[m,b];c.bT.x.xi(0,k),c.bT.y.xi(0,x),c.bT.x.ai(M),c.bT.y.ai(A);try{for(var F=o(c.wT),T=F.next();!T.done;T=F.next()){T.value.Rt.ai(M)}}catch(t){i={error:t}}finally{try{T&&!T.done&&(n=F.return)&&n.call(F)}finally{if(i)throw i.error}}try{for(var C=o(c.gT),B=C.next();!B.done;B=C.next()){B.value.Rt.ai(M)}}catch(t){e={error:t}}finally{try{B&&!B.done&&(r=C.return)&&r.call(C)}finally{if(e)throw e.error}}try{for(var L=o(c.pT),I=L.next();!I.done;I=L.next()){I.value.Rt.ai(A)}}catch(t){s={error:t}}finally{try{I&&!I.done&&(h=L.return)&&h.call(L)}finally{if(s)throw s.error}}try{for(var O=o(c.kT),P=O.next();!P.done;P=O.next()){P.value.Rt.ai(A)}}catch(t){u={error:t}}finally{try{P&&!P.done&&(a=O.return)&&a.call(O)}finally{if(u)throw u.error}}if(!(!c.fk||Math.abs(c.fk.bottom-d)>=4||Math.abs(c.fk.left-y)>=4||Math.abs(c.fk.right-S)>=4||Math.abs(c.fk.top-v)>=4)||t){c.fk={bottom:d,left:y,top:v,right:S},c.hg.oi(l(k,x));var D=c.getDefaultAxisX(),_=c.getDefaultAxisY();if(D&&_){var R=g(D.Rt.fi(),_.Rt.fi(),D.Rt.li(),_.Rt.li());c.Pg.rb(R),c.Dl.rb(R),c._l.rb(R),c.Hv&&c.Hv();var z=function(t){return function(i,n,e,r){return n._v(i),i+n.getHeight()*t}};c.wT.reduce(z(-1),0),c.gT.reduce(z(1),0),c.pT.reduce(z(-1),0),c.kT.reduce(z(1),0)}}else c.YT(!0)},c.addAreaSeries=function(t){var i=t&&t.xAxis?t.xAxis:c.getDefaultAxisX(),n=t&&t.yAxis?t.yAxis:c.getDefaultAxisY();jU(i,n);var e=t&&t.baseline?t.baseline:0,r=new(t&&t.type?t.type:bU.Positive)(c,c.JS,c.QS,c.Pg,i,n,c.XT(i),c.XT(n),c.qv,e,c.vn,void 0!==(null==t?void 0:t.automaticColorIndex)?t.automaticColorIndex:c.ZS.length);return c.im(r),r},c.addAreaRangeSeries=function(t){var i=t&&t.xAxis?t.xAxis:c.getDefaultAxisX(),n=t&&t.yAxis?t.yAxis:c.getDefaultAxisY();jU(i,n);var e=new wU(c,c.JS,c.QS,c.Pg,i,n,c.XT(i),c.XT(n),c.qv,c.vn,void 0!==(null==t?void 0:t.automaticColorIndex)?t.automaticColorIndex:c.ZS.length);return c.im(e),e},c.addHeatmapSeries=function(t){var i=t.xAxis?t.xAxis:c.getDefaultAxisX(),n=t.yAxis?t.yAxis:c.getDefaultAxisY(),r=t.type?t.type:FU.Grid;jU(i,n);var s=new r(c,c.JS,c.QS,c.Pg,i,n,c.XT(i),c.XT(n),c.qv,e({},t),c.vn,void 0!==(null==t?void 0:t.automaticColorIndex)?t.automaticColorIndex:c.ZS.length);return c.im(s),s},c.ZT=!1,c.KT=function(){(c.MT||c.AT)&&(c.GT=c.engine.setMouseStyle(c.zT))},c.qT=function(){c.ZT=!1,c.engine.restoreMouseStyle(c.GT)},c.JT=function(t,i,n){var e,r,s=Rr(null===(e=c.ps.overrideInteractionMouseButtons)||void 0===e?void 0:e.chartXYRectangleZoomFitMouseButton,0),o=Rr(null===(r=c.ps.overrideInteractionMouseButtons)||void 0===r?void 0:r.chartXYPanMouseButton,2);c.engine.restoreMouseStyle(c.GT);var h=c.Rf.oo.ds(i.clientX,i.clientY);n===s&&(c.MT||c.AT)?(c.QT(t,h),ss(i)):n===o&&c.TT&&(c.GT=c.engine.setMouseStyle(c.ET),ss(i))},c.$T=function(t,i,n,e,r){var s,o,h=l(i.clientX,i.clientY),u=Rr(null===(s=c.ps.overrideInteractionMouseButtons)||void 0===s?void 0:s.chartXYRectangleZoomFitMouseButton,0),a=Rr(null===(o=c.ps.overrideInteractionMouseButtons)||void 0===o?void 0:o.chartXYPanMouseButton,2);n===u&&(c.MT||c.AT)?(c.tC(t,e,h),ss(i)):n===a&&c.TT&&(c.iC(ao(r,-1)),ss(i)),c.Rf.xn()},c.nC=function(t,i,n,e){var r,s,o=Rr(null===(r=c.ps.overrideInteractionMouseButtons)||void 0===r?void 0:r.chartXYRectangleZoomFitMouseButton,0),h=Rr(null===(s=c.ps.overrideInteractionMouseButtons)||void 0===s?void 0:s.chartXYPanMouseButton,2);if(n===o&&(c.MT||c.AT)){var u=l(i.clientX,i.clientY);c.eC(t,e,u),ss(i)}else n===h&&c.TT&&ss(i);c.engine.restoreMouseStyle(c.GT),c.hg.getIsUnderMouse()&&(c.GT=c.engine.setMouseStyle(c.zT))},c.rC=function(t,i){if(c.FT){var n=c.Rf.oo.ds(i.clientX,i.clientY);c.zoom(n,l(Cs(i),Cs(i))),ss(i)}},c.sC=function(t,i,n,e,r,s){if(c.TT){var o=l(-(e.x+r.x)/2,-(e.y+r.y)/2);c.iC(o),ss(s)}if(c.FT){var h=c.engine.clientLocation2Engine(i.x,i.y),u=c.engine.clientLocation2Engine(n.x,n.y),a=co(l(Math.abs(h.x-e.x-(u.x-r.x)),Math.abs(h.y-e.y-(u.y-r.y))),l(Math.abs(h.x-u.x),Math.abs(h.y-u.y)));c.forEachAxisX((function(t){t.getChartInteractionZoomByWheel()&&t.ue(t.Rt.Li(t.getInterval().start,-a.x),t.Rt.Li(t.getInterval().end,a.x),!1,!0,"interactionZoom")})),c.forEachAxisY((function(t){t.getChartInteractionZoomByWheel()&&t.ue(t.Rt.Li(t.getInterval().start,-a.y),t.Rt.Li(t.getInterval().end,a.y),!1,!0,"interactionZoom")})),ss(s)}},c.oC=function(t,i,n){(c.AT||c.MT)&&(c.QT(t,i),ss(n))},c.hC=function(t,i,n,e,r){(c.AT||c.MT)&&(c.tC(t,i,n),ss(r))},c.uC=function(t,i,n,e){(c.AT||c.MT)&&(c.eC(t,i,n),ss(e))},c.setPadding({right:24}),c.aC=[zU.gridLine0,zU.gridLine1,zU.gridLine2].map((function(t){return r.qs(t)})),c.Dl=r.qs(zU.highlightersBelow),c.Pg=r.qs(zU.plotting),c._l=r.qs(zU.highlightersAbove),c.Pl=r.qs(zU.fg),c.bT.x.xi(0,c.uiScale.x.getCellSize()-(c.Qt.left+c.Qt.right+c.hh.left+c.hh.right)),c.bT.y.xi(0,c.uiScale.y.getCellSize()-(c.Qt.bottom+c.Qt.top+c.hh.bottom+c.hh.top)),c.bT.oi(c.uiScale.vi().x,c.uiScale.vi().y),c.hg=i.prototype.sg.call(c,c._f.Pc(c.bT)).$n(c.vn.seriesBackgroundFillStyle).Ys(c.vn.seriesBackgroundStrokeStyle).ph(l(0,0)).oi(l(c.bT.getInnerIntervalPixels().x,c.bT.getInnerIntervalPixels().y));var d=Rr(a?a.autoCursorBuilder:void 0,RH);c.og=d.tg(c.Rf,c.bT,c.bT,c.vn),c.addAxisX(a&&a.defaultAxisX),c.addAxisY(a&&a.defaultAxisY),c.onResize(c.WT),c.hy.Jn("ChartXY");var v=WE(new UE.Drag(c.oC,c.hC,c.uC,1),new UE.Pinch(Cr,c.sC,Cr));return c.onSeriesBackgroundMouseEnter(c.KT),c.onSeriesBackgroundMouseLeave(c.qT),c.onSeriesBackgroundMouseWheel(c.rC),c.onSeriesBackgroundMouseDragStart(c.JT),c.onSeriesBackgroundMouseDrag(c.$T),c.onSeriesBackgroundMouseDragStop(c.nC),c.onSeriesBackgroundTouchStart(v.onTouchStart),c.onSeriesBackgroundTouchMove(v.onTouchMove),c.onSeriesBackgroundTouchEnd(v.onTouchEnd),a&&!0===a.disableAnimations&&c.setAnimationsEnabled(!1),c.oy(u,c.bT),c}return n(r,i),r.prototype.getMinimumSize=function(){var t=this.bT.di(),i=this.bT.tn();return l(Math.max(t.x+RU.x,this.hy.isDisposed()?0:this.hy.Fe().vi().x/i.x),t.y+RU.y+this.yy())},r.prototype.getSeries=function(){return this.ZS},r.prototype.addChartMarkerXY=function(t,i,n){void 0===t&&(t=zH);var e=new HH(this.Rf,this.uiScale,i||this.getDefaultAxisX(),n||this.getDefaultAxisY(),t,this.rp,this.sp,this.vn);return this.ey(e),e},r.prototype.addAxisX=function(t){var i,n=HU(t),e=n.opposite,r=n.type;(i="linear"===r.type?this.zv.d1({dimension:"x",scale1DConstructor:zo}):"linear-highPrecision"===r.type?this.zv.d1({dimension:"x",scale1DConstructor:zo}).zi():this.zv.d1({dimension:"x",scale1DConstructor:Co}).Ci(r.base)).oi(this.bT.x.vi());var s=e?this.gT:this.wT,o=new uV(this._f,this.aC,this.Pl,this.Rf,this.Dl,this._l,i,this.bT.y,nW,this,e?100:0,this.Rl,this.zl(s),this.UT,this.vn,!this.Mn,r);return s.push(o),this.Rf.xn(),o},r.prototype.addAxisY=function(t){var i,n=HU(t),e=n.opposite,r=n.type;(i="linear"===r.type?this.zv.d1({dimension:"y",scale1DConstructor:zo}):"linear-highPrecision"===r.type?this.zv.d1({dimension:"y",scale1DConstructor:zo}).zi():this.zv.d1({dimension:"y",scale1DConstructor:Co}).Ci(r.base)).oi(this.bT.y.vi());var s=e?this.kT:this.pT,o=new uV(this._f,this.aC,this.Pl,this.Rf,this.Dl,this._l,i,this.bT.x,eW,this,e?100:0,this.Rl,this.zl(s),this.UT,this.vn,!this.Mn,r);return s.push(o),this.Rf.xn(),o},r.prototype.dispose=function(){return this.Pg.ro(),this.Pl.ro(),this.aC.forEach((function(t){return t.ro()})),this._l.ro(),this.Dl.ro(),this.eT().forEach((function(t){return t.dispose()})),vV(this.bT),i.prototype.dispose.call(this)},r.prototype.getDefaultAxisX=function(){return this.wT[0]?this.wT[0]:this.gT[0]},r.prototype.getDefaultAxisY=function(){return this.pT[0]?this.pT[0]:this.kT[0]},r.prototype.getDefaultAxes=function(){return[this.getDefaultAxisX(),this.getDefaultAxisY()]},r.prototype.getAxes=function(){for(var i=this,n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var r=n&&n.length>0?new Set(n):EU;return Ir(Array.from(r).map((function(n){switch(n){default:case t.AxisPosition.Top:return i.gT;case t.AxisPosition.Bottom:return i.wT;case t.AxisPosition.Left:return i.pT;case t.AxisPosition.Right:return i.kT}})))},r.prototype.fC=function(t){var i;return this.forEachAxisX((function(n){i=t===n?"x":i})),this.forEachAxisY((function(n){i=t===n?"y":i})),i},r.prototype.forEachAxisX=function(t){this.wT.forEach(t),this.gT.forEach(t)},r.prototype.forEachAxisY=function(t){this.pT.forEach(t),this.kT.forEach(t)},r.prototype.Tf=function(){var t,n,e,r,s,h;i.prototype.Tf.call(this);try{for(var u=o(this.ZS),a=u.next();!a.done;a=u.next()){a.value.CS()}}catch(i){t={error:i}}finally{try{a&&!a.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}try{for(var f=o(this.ZS),c=f.next();!c.done;c=f.next()){c.value.Tf()}}catch(t){e={error:t}}finally{try{c&&!c.done&&(r=f.return)&&r.call(f)}finally{if(e)throw e.error}}this.forEachAxis(NU),this.ug(),this.YT(),i.prototype.sy.call(this);try{for(var l=o(this.ZS),d=l.next();!d.done;d=l.next()){d.value.BS()}}catch(t){s={error:t}}finally{try{d&&!d.done&&(h=l.return)&&h.call(l)}finally{if(s)throw s.error}}this.le()},r.prototype.bi=function(){for(var t=0;t<this.wT.length;t+=1)this.wT[t].bi();for(t=0;t<this.gT.length;t+=1)this.gT[t].bi();for(t=0;t<this.pT.length;t+=1)this.pT[t].bi();for(t=0;t<this.kT.length;t+=1)this.kT[t].bi();return i.prototype.bi.call(this)},r.prototype.XT=function(t){if(this.xT.has(t))return this.xT.get(t);throw new Error("No attach handler for axis Make sure that passed axes definitely belong to this chart and that they haven't been disposed of.")},r.prototype.addLineSeries=function(t){var i=t&&t.xAxis?t.xAxis:this.getDefaultAxisX(),n=t&&t.yAxis?t.yAxis:this.getDefaultAxisY();jU(i,n);var e=DW.freeform;t&&t.dataPattern&&(e="ProgressiveX"===t.dataPattern.pattern?DW.horizontalProgressive:"ProgressiveY"===t.dataPattern.pattern?DW.verticalProgressive:"RegressiveX"===t.dataPattern.pattern?DW.horizontalRegressive:"RegressiveY"===t.dataPattern.pattern?DW.verticalRegressive:DW.freeform);var r=new RW(this,this.JS,this.QS,this.Pg,i,n,this.XT(i),this.XT(n),this.qv,e,this.vn,IV(t&&t.dataPattern),void 0!==(null==t?void 0:t.automaticColorIndex)?t.automaticColorIndex:this.ZS.length,t);return this.im(r),r},r.prototype.addPointSeries=function(i){var n=i&&i.xAxis?i.xAxis:this.getDefaultAxisX(),e=i&&i.yAxis?i.yAxis:this.getDefaultAxisY();jU(n,e);var r=i&&i.pointShape?i.pointShape:t.PointShape.Square,s=new pU(this,this.JS,this.QS,this.Pg,n,e,this.XT(n),this.XT(e),this.qv,r,this.vn,void 0!==(null==i?void 0:i.automaticColorIndex)?i.automaticColorIndex:this.ZS.length);return this.im(s),s},r.prototype.addPointLineSeries=function(i){var n=i&&i.xAxis?i.xAxis:this.getDefaultAxisX(),e=i&&i.yAxis?i.yAxis:this.getDefaultAxisY();jU(n,e);var r=i&&i.pointShape?i.pointShape:t.PointShape.Square,s=DW.freeform;i&&i.dataPattern&&(s="ProgressiveX"===i.dataPattern.pattern?DW.horizontalProgressive:"ProgressiveY"===i.dataPattern.pattern?DW.verticalProgressive:"RegressiveX"===i.dataPattern.pattern?DW.horizontalRegressive:"RegressiveY"===i.dataPattern.pattern?DW.verticalRegressive:DW.freeform);var o=new SW(this,this.JS,this.QS,this.Pg,n,e,this.XT(n),this.XT(e),this.qv,s,r,this.vn,IV(i&&i.dataPattern),void 0!==(null==i?void 0:i.automaticColorIndex)?i.automaticColorIndex:this.ZS.length);return this.im(o),o},r.prototype.addStepSeries=function(i){var n=i&&i.xAxis?i.xAxis:this.getDefaultAxisX(),e=i&&i.yAxis?i.yAxis:this.getDefaultAxisY();jU(n,e);var r=i&&i.pointShape?i.pointShape:t.PointShape.Square,s=i&&i.mode?i.mode:t.StepOptions.before,o=new _W(this,this.JS,this.QS,this.Pg,n,e,this.XT(n),this.XT(e),this.qv,r,s,this.vn,IV(i&&i.dataPattern),void 0!==(null==i?void 0:i.automaticColorIndex)?i.automaticColorIndex:this.ZS.length);return this.im(o),o},r.prototype.addSplineSeries=function(i){var n=i&&i.xAxis?i.xAxis:this.getDefaultAxisX(),e=i&&i.yAxis?i.yAxis:this.getDefaultAxisY();jU(n,e);var r=i&&i.pointShape?i.pointShape:t.PointShape.Square,s=DW.freeform;i&&i.dataPattern&&(s="ProgressiveX"===i.dataPattern.pattern?DW.horizontalProgressive:"RegressiveX"===i.dataPattern.pattern?DW.horizontalRegressive:DW.freeform);var o=new wW(this,this.JS,this.QS,this.Pg,n,e,this.XT(n),this.XT(e),this.qv,s,r,this.vn,IV(i&&i.dataPattern),void 0!==(null==i?void 0:i.automaticColorIndex)?i.automaticColorIndex:this.ZS.length);return this.im(o),o},r.prototype.addRectangleSeries=function(t){var i=t&&t.xAxis?t.xAxis:this.getDefaultAxisX(),n=t&&t.yAxis?t.yAxis:this.getDefaultAxisY();jU(i,n);var e=new EW(this,this.JS,this.QS,this.Pg,i,n,this.XT(i),this.XT(n),this.qv,this.vn,void 0!==(null==t?void 0:t.automaticColorIndex)?t.automaticColorIndex:this.ZS.length);return this.im(e),e},r.prototype.addPolygonSeries=function(t){var i=t&&t.xAxis?t.xAxis:this.getDefaultAxisX(),n=t&&t.yAxis?t.yAxis:this.getDefaultAxisY(),e=new VW(this,this.JS,this.QS,this.Pg,i,n,this.XT(i),this.XT(n),this.qv,this.vn,void 0!==(null==t?void 0:t.automaticColorIndex)?t.automaticColorIndex:this.ZS.length);return this.im(e),e},r.prototype.addSegmentSeries=function(t){var i=t&&t.xAxis?t.xAxis:this.getDefaultAxisX(),n=t&&t.yAxis?t.yAxis:this.getDefaultAxisY();jU(i,n);var e=new HW(this,this.JS,this.QS,this.Pg,i,n,this.XT(i),this.XT(n),this.qv,this.vn,void 0!==(null==t?void 0:t.automaticColorIndex)?t.automaticColorIndex:this.ZS.length);return this.im(e),e},r.prototype.addEllipseSeries=function(t){var i=t&&t.xAxis?t.xAxis:this.getDefaultAxisX(),n=t&&t.yAxis?t.yAxis:this.getDefaultAxisY();jU(i,n);var e=new WW(this,this.JS,this.QS,this.Pg,i,n,this.XT(i),this.XT(n),this.qv,this.vn,void 0!==(null==t?void 0:t.automaticColorIndex)?t.automaticColorIndex:this.ZS.length);return this.im(e),e},r.prototype.addOHLCSeries=function(t){var i=t&&t.xAxis?t.xAxis:this.getDefaultAxisX(),n=t&&t.yAxis?t.yAxis:this.getDefaultAxisY();jU(i,n);var e=t&&t.positiveFigure?t.positiveFigure:dW.Candlestick,r=t&&t.negativeFigure?t.negativeFigure:e,s=new(t&&t.seriesConstructor?t.seriesConstructor:uU.Normal)(this,this.JS,this.QS,this.Pg,i,n,this.XT(i),this.XT(n),this.qv,e,r,this.vn,void 0!==(null==t?void 0:t.automaticColorIndex)?t.automaticColorIndex:this.ZS.length);return this.im(s),s},r.prototype.addBoxSeries=function(t){var i=t&&t.xAxis?t.xAxis:this.getDefaultAxisX(),n=t&&t.yAxis?t.yAxis:this.getDefaultAxisY();jU(i,n);var e=t&&t.figure?t.figure:aW,r=t&&t.dimensionStrategy?t.dimensionStrategy:Qj,s=new fU(this,this.JS,this.QS,this.Pg,i,n,this.XT(i),this.XT(n),this.qv,e,r,this.vn,void 0!==(null==t?void 0:t.automaticColorIndex)?t.automaticColorIndex:this.ZS.length);return this.im(s),s},r.prototype.addHeatmapGridSeries=function(t){var i,n=t.xAxis?t.xAxis:this.getDefaultAxisX(),e=t.yAxis?t.yAxis:this.getDefaultAxisY();if(void 0!==t.heatmapDataType&&"intensity"!==t.heatmapDataType)throw new Error("Unsupported Heatmap Grid heatmapDataType: '"+t.heatmapDataType+"'");return i=new LU(this,this.JS,this.QS,this.Pg,n,e,this.XT(n),this.XT(e),this.qv,t,this.vn,void 0!==(null==t?void 0:t.automaticColorIndex)?t.automaticColorIndex:this.ZS.length),this.im(i),i},r.prototype.addHeatmapScrollingGridSeries=function(t){var i,n=t.xAxis?t.xAxis:this.getDefaultAxisX(),e=t.yAxis?t.yAxis:this.getDefaultAxisY();if(void 0!==t.heatmapDataType&&"intensity"!==t.heatmapDataType)throw new Error("Unsupported Heatmap Grid heatmapDataType: '"+t.heatmapDataType+"'");return i=new OU(this,this.JS,this.QS,this.Pg,n,e,this.XT(n),this.XT(e),this.qv,t,this.vn,void 0!==(null==t?void 0:t.automaticColorIndex)?t.automaticColorIndex:this.ZS.length),this.im(i),i},r.prototype.addOnScreenMenu=function(t,i){return new TU(this.ps,t,this.engine.Is(Nz.osm),this,i)},r.prototype.setMouseBackgroundStyle=function(i){return void 0===i&&(i=t.MouseStyles.Default),this.zT=i,this},r.prototype.setMouseZoomStyle=function(i){return void 0===i&&(i=t.MouseStyles.ZoomIn),this.NT=i,this},r.prototype.setMouseFitStyle=function(i){return void 0===i&&(i=t.MouseStyles.Default),this.VT=i,this},r.prototype.setMousePanStyle=function(i){return void 0===i&&(i=t.MouseStyles.Move),this.ET=i,this},r.prototype.setMouseInteractions=function(t){return this.setMouseInteractionRectangleZoom(t).setMouseInteractionRectangleFit(t).setMouseInteractionWheelZoom(t).setMouseInteractionPan(t)},r.prototype.setMouseInteractionRectangleZoom=function(t){return this.MT=t,this},r.prototype.getMouseInteractionRectangleZoom=function(){return this.MT},r.prototype.setMouseInteractionRectangleFit=function(t){return this.AT=t,this},r.prototype.getMouseInteractionRectangleFit=function(){return this.AT},r.prototype.setMouseInteractionPan=function(t){return this.TT=t,this},r.prototype.getMouseInteractionPan=function(){return this.TT},r.prototype.setMouseInteractionWheelZoom=function(t){return this.FT=t,this},r.prototype.getMouseInteractionWheelZoom=function(){return this.FT},r.prototype.setZoomingRectangleFillStyle=function(t){return this.PT="function"==typeof t?t(this.PT):t,this.Rf.xn(),this},r.prototype.getZoomingRectangleFillStyle=function(){return this.PT},r.prototype.setZoomingRectangleStrokeStyle=function(t){return this.DT="function"==typeof t?t(this.DT):t,this.Rf.xn(),this},r.prototype.getZoomingRectangleStrokeStyle=function(){return this.DT},r.prototype.setFittingRectangleFillStyle=function(t){return this._T="function"==typeof t?t(this._T):t,this.Rf.xn(),this},r.prototype.getFittingRectangleFillStyle=function(){return this._T},r.prototype.setFittingRectangleStrokeStyle=function(t){return this.RT="function"==typeof t?t(this.RT):t,this.Rf.xn(),this},r.prototype.getFittingRectangleStrokeStyle=function(){return this.RT},r.prototype.addLegendBox=function(t,n){var e=i.prototype.addLegendBox.call(this,t,n);return void 0!==n&&n!==this.uiScale||(void 0===t||"vertical"===t.getAlignment()?e.setOrigin(lz.RightCenter).setPosition({x:this.uiScale.x.Dt(this.uiScale.x.ci()-this.hh.right+2),y:rr(this.bT.y.Dt(this.bT.y.fi()+this.bT.y.li()/2),this.bT.y,this.uiScale.y)}):e.setOrigin(lz.RightTop).setPosition(sr({x:this.bT.x.getInnerEnd(),y:this.bT.y.getInnerEnd()},this.bT,this.uiScale))),e},r.prototype.QT=function(t,i){this.ZT=!0,this.forEachAxis(VU);var n=sr(this.engine.clientLocation2Engine(i.x,i.y),this.Rf.oo.Rt,this.bT);this.LT.ph(n).oi(l(0,0))},r.prototype.tC=function(t,i,n){var e=sr(this.engine.clientLocation2Engine(i.x,i.y),this.Rf.oo.Rt,this.bT),r=sr(this.engine.clientLocation2Engine(n.x,n.y),this.Rf.oo.Rt,this.bT),s=Gs(r.x,this.bT.x.getInnerStart(),this.bT.x.getInnerEnd())&&Gs(r.y,this.bT.y.getInnerStart(),this.bT.y.getInnerEnd()),o=l(Math.min(e.x,r.x),Math.min(e.y,r.y)),h=l(Math.max(e.x,r.x),Math.max(e.y,r.y));this.LT.ph(o).oi(co(h,o));var u=Math.min(h.x-o.x,h.y-o.y)>=10;s&&u&&o.x===e.x&&this.MT?(this.LT.$n(this.PT).Ys(this.DT),this.IT.na(ir),this.OT.na(ir),this.GT=this.engine.setMouseStyle(this.NT,this.GT)):s&&u&&h.x===e.x&&this.AT?(this.LT.$n(this._T).Ys(this.RT),this.IT.na(this.RT).ha(e).Ku(r),this.OT.na(this.RT).ha(l(e.x,r.y)).Ku(l(r.x,e.y)),this.GT=this.engine.setMouseStyle(this.VT,this.GT)):(this.LT.Ys(ir).$n(Re),this.IT.na(ir),this.OT.na(ir),this.engine.restoreMouseStyle(this.GT)),this.Rf.xn()},r.prototype.eC=function(t,i,n){var e=this;if(this.ZT){var r=sr(this.engine.clientLocation2Engine(i.x,i.y),this.Rf.oo.Rt,this.bT),s=sr(this.engine.clientLocation2Engine(n.x,n.y),this.Rf.oo.Rt,this.bT),o=Gs(s.x,this.bT.x.getInnerStart(),this.bT.x.getInnerEnd())&&Gs(s.y,this.bT.y.getInnerStart(),this.bT.y.getInnerEnd()),h=this.LT.kh(),u=fo(h,this.LT.vi()),a=Math.min(this.LT.vi().x,this.LT.vi().y)>=10;o&&a&&Br(h.x,r.x)&&this.MT?(this.forEachAxisX((function(t){if(t.getChartInteractionZoomByDrag()){var i=sr(h,e.bT,t.Sv).x,n=sr(u,e.bT,t.Sv).x;t.ue(i,n,!0,!0,"interactionSetInterval")}})),this.forEachAxisY((function(t){if(t.getChartInteractionZoomByDrag()){var i=sr(h,e.bT,t.Sv).y,n=sr(u,e.bT,t.Sv).y;t.ue(i,n,!0,!0,"interactionSetInterval")}}))):o&&a&&Br(u.x,r.x)&&this.AT&&this.forEachAxis(GU)}this.LT.Ys(ir).$n(Re),this.IT.na(ir),this.OT.na(ir),this.ZT=!1,this.Rf.xn()},r.prototype.pan=function(t){this.forEachAxisX((function(i){i.stop().pan(t.x)})),this.forEachAxisY((function(i){i.stop().pan(t.y)}))},r.prototype.iC=function(t){this.forEachAxisX((function(i){i.getChartInteractionPanByDrag()&&i.stop().pan(t.x)})),this.forEachAxisY((function(i){i.getChartInteractionPanByDrag()&&i.stop().pan(t.y)}))},r.prototype.zoom=function(t,i){this.forEachAxis(VU),this.forEachAxisX((function(n){n.zoom(n.Rt.Dt(t.x),i.x)})),this.forEachAxisY((function(n){n.zoom(n.Rt.Dt(t.y),i.y)}))},r.prototype.cC=function(t,i){this.forEachAxis(VU),this.forEachAxisX((function(n){n.getChartInteractionZoomByWheel()&&n.zoom(n.Rt.Dt(t.x),i.x)})),this.forEachAxisY((function(n){n.getChartInteractionZoomByWheel()&&n.zoom(n.Rt.Dt(t.y),i.y)}))},r.prototype.setAnimationsEnabled=function(t){return this.Mn=!!t,this.forEachAxis((function(i){return i.setAnimationsEnabled(t)})),this},r.prototype.getAnimationsEnabled=function(){return this.Mn},r.prototype.disableAnimations=function(){return this.setAnimationsEnabled(!1),this},r.prototype.Fl=function(){var t=[];return this.forEachAxis((function(i){return i.Tv((function(i){return t.push(i)}))})),i.prototype.Fl.call(this).concat(t)},r.prototype.eT=function(){return this.BT},r.prototype._r=function(){return this.Sy(this.Pg)},r.prototype.setMouseInteractionsWhileScrolling=function(t){return this.cb=t,this},r.prototype.getMouseInteractionsWhileScrolling=function(){return this.cb},r.prototype.setMouseInteractionsWhileZooming=function(t){return this.CT=t,this},r.prototype.getMouseInteractionsWhileZooming=function(){return this.CT},r.prototype.forEachAxis=function(t){this.forEachAxisX(t),this.forEachAxisY(t)},r.prototype.le=function(){mG(this,this.ZS)},r}(rH),YU=function(t){return t instanceof KH||t instanceof dU||t instanceof wU||t instanceof LU||t instanceof sU||t instanceof _W},XU=function(){function i(i,n,r,s,a,f,c,l,d){var v,y,S=this;this.ps=i,this.an=new qe,this.lC=new Map,this.ZS=new Map,this.dC=function(t,i){var n=t.series;S.vC&&(i instanceof wU||i instanceof _W||i instanceof LU||i instanceof KH||i instanceof dU||i instanceof sU)&&S.vC(n,i)},this.yC=function(t){var i=t.map((function(t){return t.Un.type}));if(1!==u([],h(new Set(i))).length)throw new Error("All ZoomBandChart axes must be of the same type")},this.SC=function(t,i){0!==S.ZS.size&&void 0!==u([],h(S.ZS.values())).find((function(t){return!1===t.series.isDisposed()}))||S.mC.ue(t,i,!1,!1,"zoomBandChart")},this.attachedAxes=Array.isArray(a)?a:[a],this.attachedAxis=this.attachedAxes[0],this.yC(this.attachedAxes);var m=this.attachedAxes[0].chart.fC(this.attachedAxes[0])||"x";this.bC=m,this.zf="x"===m?Qj:$j;var b=this.attachedAxes[0].onScaleChange(this.SC);this.gC=function(){return S.attachedAxes[0].offScaleChange(b)};var g,w=this.zf.toVec2("linear"===(g=this.attachedAxes[0].Un).type||"linear-highPrecision"===g.type?g:{type:"logarithmic",base:"number"==typeof g.base?g.base:"e"===g.base?"e":function(){throw new Error("Unhandled logarithmic base: "+g.base)}()},void 0),p=w.x,k=w.y;this.wC=new UU(i,n,r,s,c,e(e({},l),{defaultAxisX:p,defaultAxisY:k}),d).setTitle("Zoom Band Chart").setMouseInteractions(!1).setAutoCursorMode(t.AutoCursorModes.disabled),this.engine=this.wC.engine;var x=this.wC.getDefaultAxisX().setMouseInteractions(!1),M=this.wC.getDefaultAxisY().setMouseInteractions(!1);this.mC=this.zf.getWidth({x:x,y:M}).setScrollStrategy(Ho.fitting).setAnimationScroll(!1),this.pC(this.zf.getHeight({x:x,y:M})),this.mC.he(this.attachedAxes[0].oe()),this.band=this.mC.addBand(f),this.kC(this.band,this.attachedAxes);for(var A=0;A<this.attachedAxes.length;A+=1)try{for(var F=(v=void 0,o(this.attachedAxes[A].Ge())),T=F.next();!T.done;T=F.next()){var C=T.value;YU(C)&&this.yd(C)}}catch(t){v={error:t}}finally{try{T&&!T.done&&(y=F.return)&&y.call(F)}finally{if(v)throw v.error}}this.attachedAxes.forEach((function(t){t.chart.cg((function(t,i){var n;if(("x"===m?i.axisX:i.axisY)===S.attachedAxes[0]&&YU(i))if(S.ZS.has(i)){var e=null===(n=S.ZS.get(i))||void 0===n?void 0:n.series;e&&e.restore()}else S.yd(i)})),t.chart.dg((function(t,i){var n;if(S.ZS.has(i)){var e=null===(n=S.ZS.get(i))||void 0===n?void 0:n.series;e&&e.dispose()}}))}))}return i.prototype.disposeSeries=function(t){var i=this.ZS.get(t);if(i){(0,i.clearReferences)(),this.ZS.delete(t),i.series.dispose();var n=this.zf.getHeight({x:t.axisX,y:t.axisY}),e=this.lC.get(n);e&&0===e.Ge().length&&e!==this.zf.getHeight({x:this.wC.getDefaultAxisX(),y:this.wC.getDefaultAxisY()})&&(this.lC.delete(n),e.dispose())}return this},i.prototype.setSeriesStyle=function(t){return this.vC=t,this.ZS.forEach(this.dC),this},i.prototype.getDefaultAxisX=function(){return this.wC.getDefaultAxisX()},i.prototype.getDefaultAxisY=function(){return this.wC.getDefaultAxisY()},i.prototype.pC=function(t){t.setTickStrategy(jo.Empty).setMouseInteractions(!1).setNibStyle(ir).setStrokeStyle(ir)},i.prototype.kC=function(t,i){t.setValueStart(i[0].getInterval().start).setValueEnd(i[0].getInterval().end);var n,e,r=!1,s=!1;i.length>1&&ar.apply(void 0,u([],h(i))),i[0].onScaleChange((function(i,n){if(!r){s=!0;var o=wr.performance.now();e=o,t.setValueStart(i).setValueEnd(n),requestAnimationFrame((function(){return requestAnimationFrame((function(){e!==o||(s=!1)}))}))}})),t.onValueChange((function(t,e,o){if(!s){r=!0;var h=wr.performance.now();n=h,i[0].ue(e,o,!1,!0,"zoomBandChart"),requestAnimationFrame((function(){return requestAnimationFrame((function(){n!==h||(r=!1)}))}))}}))},i.prototype.yd=function(t){var i=this.zf.getHeight({x:t.axisX,y:t.axisY}),n=this.lC.get(i);n||(0===this.lC.size?n=this.zf.getHeight({x:this.wC.getDefaultAxisX(),y:this.wC.getDefaultAxisY()}):(n=this.zf.getHeight({x:this.wC.addAxisX.bind(this.wC),y:this.wC.addAxisY.bind(this.wC)})(),this.pC(n))),this.lC.set(i,n);var r,s,o=this.zf.getWidth({x:this.mC,y:n}),h=this.zf.getHeight({x:this.mC,y:n});if(t instanceof wU){var u=r=this.wC.addAreaRangeSeries({xAxis:o,yAxis:h});u.add(t.Lp());var a=t.Ip((function(t,i,n){return u.add(i)}));s=function(){return t.Op(a)}}else if(t instanceof _W){var f=t.wt,c=r=this.wC.addStepSeries({mode:f,xAxis:o,yAxis:h});c.add(t.Lp());var l=t.Ip((function(t,i,n){return c.add(i)}));s=function(){return t.Op(l)}}else if(t instanceof LU){var d=e(e({},t.fT),{xAxis:void 0,yAxis:void 0}),v=this.wC.addHeatmapGridSeries(d);r=v;var y=function(){v.setWireframeStyle(t.getWireframeStyle()).setPixelInterpolationMode(t.getPixelInterpolationMode()).setFillStyle(t.getFillStyle())};y();var S=t.dT(y);t.lT(v);var m=t.yT((function(t,i){v.invalidateIntensityValues(i)}));s=function(){t.vT(S),t.ST(m)}}else{var b=this.wC.addLineSeries({xAxis:this.zf.getWidth({x:this.mC,y:n}),yAxis:this.zf.getHeight({x:this.mC,y:n})});if(r=b,t instanceof sU){var g=function(t){for(var i=[],n=t.length,e=0;e<n;e+=1){var r=t[e];i.push({x:r[0],y:r[4]})}return i};b.add(g(t.Lp()));var w=t.Ip((function(t,i){b.add(g(i))}));s=function(){t.Op(w)}}else{b.add(t.Lp());var p=t.Ip((function(t,i){return b.add(i)}));s=function(){t.Op(p)}}}t.onHighlight((function(t){void 0===t&&(t=!0),r.setHighlighted(t)})),r.setMouseInteractions(!1),this.dC({series:r},t);var k=t.Pp((function(){r.clear()})),x=s;s=function(){t.Dp(k),x()},this.ZS.set(t,{series:r,clearReferences:s})},i.prototype.Lh=function(t){this.wC.Lh(t)},i.prototype.getMinimumSize=function(){return this.wC.getMinimumSize()},i.prototype.bi=function(){return this.wC.bi()},i.prototype.gi=function(){return this.wC.gi()},i.prototype.Tf=function(){var t=Array.from(new Set(this.attachedAxes.map((function(t){return t.chart}))).values());if("x"===this.bC){var i=t.reduce((function(t,i){var n=0;return i.forEachAxisY((function(t){n+=0===t.lv?t.getHeight():0})),Math.max(t,n)}),0),n=t.reduce((function(t,i){var n=0;return i.forEachAxisY((function(t){n+=100===t.lv?t.getHeight():0})),Math.max(t,n)}),0),e=t.reduce((function(t,i){return Math.max(t,i.getPadding().left)}),0),r=t.reduce((function(t,i){return Math.max(t,i.getPadding().right)}),0);this.getDefaultAxisY().setThickness(i),this.wC.setPadding({left:e,right:r+n})}else{var s=t.reduce((function(t,i){var n=0;return i.forEachAxisX((function(t){n+=0===t.lv?t.getHeight():0})),Math.max(t,n)}),0),o=t.reduce((function(t,i){var n=0;return i.forEachAxisX((function(t){n+=100===t.lv?t.getHeight():0})),Math.max(t,n)}),0),h=t.reduce((function(t,i){return Math.max(t,i.getPadding().bottom)}),0),u=t.reduce((function(t,i){return Math.max(t,i.getPadding().top)}),0);this.getDefaultAxisX().setThickness(s),this.wC.setPadding({bottom:h,top:u+o})}return this.wC.Tf()},i.prototype.getTheme=function(){return this.wC.getTheme()},i.prototype.setTitle=function(t){return this.wC.setTitle(t),this},i.prototype.getTitle=function(){return this.wC.getTitle()},i.prototype.setTitleFillStyle=function(t){return this.wC.setTitleFillStyle(t),this},i.prototype.getTitleFillStyle=function(){return this.wC.getTitleFillStyle()},i.prototype.setTitleFont=function(t){return this.wC.setTitleFont(t),this},i.prototype.getTitleFont=function(){return this.wC.getTitleFont()},i.prototype.setTitleMarginTop=function(t){return this.wC.setTitleMarginTop(t),this},i.prototype.getTitleMarginTop=function(){return this.wC.getTitleMarginTop()},i.prototype.setTitleMarginBottom=function(t){return this.wC.setTitleMarginBottom(t),this},i.prototype.getTitleMarginBottom=function(){return this.wC.getTitleMarginBottom()},i.prototype.setPadding=function(t){return this.wC.setPadding(t),this},i.prototype.getPadding=function(){return this.wC.getPadding()},i.prototype.setBackgroundFillStyle=function(t){return this.wC.setBackgroundFillStyle(t),this},i.prototype.getBackgroundFillStyle=function(){return this.wC.getBackgroundFillStyle()},i.prototype.setBackgroundStrokeStyle=function(t){return this.wC.setBackgroundStrokeStyle(t),this},i.prototype.getBackgroundStrokeStyle=function(){return this.wC.getBackgroundStrokeStyle()},i.prototype.addUIElement=function(t,i){return this.wC.addUIElement(t,i)},i.prototype.addLegendBox=function(t,i){return this.wC.addLegendBox(t,i)},i.prototype.saveToFile=function(t,i,n){return this.wC.saveToFile(t,i,n),this},i.prototype.dispose=function(){return this.wC.dispose(),this.band.dispose(),this.lC.clear(),this.ZS.clear(),this},i}(),ZU=function(t,i,n,e){void 0===i&&(i=1),void 0===n&&(n=t.Js()),void 0===e&&(e=100);var r=n+i*e;return function(e){return{oo:t,qs:function(r){var s=n+e+r*i;return t.$v(s)},lb:function(r,s){var o=n+e+r*i;return t.xC(o,s)},Jv:function(){var i=t.$v(r);return r+=1,i}}}},KU=function(){function t(t){this.u=t,this.an=new qe}return t.prototype.l=function(t){return this.u=t,this.an.emit("set",t),this},t.prototype.S=function(){return this.u},t.prototype.ni=function(t){return this.an.on("set",t)},t.prototype.si=function(t){return this.an.off(t,"set")},t}(),qU=function(t,i){return i?t.x:t.y},JU=function(t,i,n,e){return 1===i&&e+1===(n?t.columnIndex:t.rowIndex)||-1===i&&e+1===(n?t.columnIndex+t.columnSpan:t.rowIndex+t.rowSpan)},QU=function(t,i,n,e,r,s){for(var o=i.length,h=new Array(o).fill(0),u=t.map((function(t){return t.panel.getMinimumSize()})),a=Math.sign(e),f=qU(i[n].ji(),s)+e*r,c=n;c>=0&&c<o;c+=a)if(!i[c].isDisposed()){for(var l=qU(i[c].ji(),s),d=20*r,v=0;v<t.length;v+=1){var y=t[v],S=u[v];void 0!==S&&JU(y,a,s,c)&&(d=Math.max(d,qU(S,s)*r))}if(c!==n&&(1===a?l>f:l<f))break;if(1===a&&f>100-d||-1===a&&f<0+d){h.fill(0);break}h[c]=f-l,f+=d*a}return h},$U=function(){function i(i,n,e,r,s){var o=this;this.ps=i,this.MC=n,this.AC=r,this.FC=new Array,this.an=new qe,this.TC=[],this.Nv=[],this.CC=void 0,this.BC=void 0,this.LC=function(t){var i=h(t,2),n=i[0],e=i[1];o.uiScale.oi(n,e),o.engine.xn()},this.IC=function(){for(var t=function(t,i,n){var e=WE(new UE.Drag(n?o.OC:o.PC,(function(t,e,r,s,h){o.DC(s,i,n),ss(h)}),n?o._C:o.RC));t.setMouseEnterEventHandler(n?o.OC:o.PC).setMouseLeaveEventHandler(n?o._C:o.RC).setMouseDragEventHandler((function(t,e,r,s,h){o.DC(h,i,n),ss(e)})).setTouchStartEventHandler(e.onTouchStart).setTouchMoveEventHandler(e.onTouchMove).setTouchEndEventHandler(e.onTouchEnd);var r=o.zC.L();r instanceof nr&&r.fillStyle instanceof Qe&&n?t.na(r.setFillStyle(r.fillStyle.setAngle(90))):t.na(r),t.dispose()},i=0;i<o.EC-1;i+=1){t(s=o.NC.Gf(o.uiScale),i,!1),o.VC[i]=s;var n=l(0,100*(i+1)/o.EC),e=l(100,n.y);s.ha(n).Ku(e)}for(var r=0;r<o.GC-1;r+=1){var s;t(s=o.NC.Gf(o.uiScale),r,!0),o.HC[r]=s;n=l(100*(r+1)/o.GC,0),e=l(n.x,100);s.ha(n).Ku(e)}},this.OC=function(i){var n=o.zC.O();n instanceof nr&&n.fillStyle instanceof Qe?i.na(n.setFillStyle(n.fillStyle.setAngle(90))):i.na(n),o.CC=i.oo.Qr(t.MouseStyles.ResizeColumn),o.engine.xn()},this.PC=function(i){i.na(o.zC.O()),o.BC=i.oo.Qr(t.MouseStyles.ResizeRow),o.engine.xn()},this._C=function(t){var i=o.zC.O(),n=o.zC.L();i instanceof nr&&i.fillStyle instanceof Qe?t.na(n.setFillStyle(n.fillStyle.setAngle(90))):t.na(n),t.oo.ts(o.CC),o.engine.xn()},this.RC=function(t){t.na(o.zC.L()),t.oo.ts(o.BC),o.engine.xn()},this.onDispose=function(t){return o.an.on("dispose",t)},this.offDispose=function(t){return o.an.off(t,"dispose")},this.jC=function(t){for(var i=0;i<o.FC.length;i+=1)if(o.FC[i].panel===t){o.FC.splice(i,1);break}o.engine.xn()},this.WC=function(t){var i=o.TC.indexOf(t);i>=0&&o.TC.splice(i,1)},this.Yv=function(t){var i=o.Nv.indexOf(t);i>=0&&o.Nv.splice(i,1)},this.UC=function(t){o.TC.includes(t)||o.TC.push(t)},this.Zv=function(t){o.Nv.includes(t)||o.Nv.push(t)},this.YC=function(t,i,n,e,r){if(o.XC(i,n,e,r)){var s={panel:t,columnIndex:i,rowIndex:n,columnSpan:e,rowSpan:r};return o.FC.push(s),o.ZC(i,n,e,r),o.KC(s),t}throw new fr("Out of dashboard range.")},this.EC=n.numberOfRows,this.GC=n.numberOfColumns;var u=this.EC*this.GC;this.VC=new Array(this.EC-1),this.HC=new Array(this.GC-1),this.qC={x:new KU(new Array(this.GC).fill(1)),y:new KU(new Array(this.EC).fill(1))},this.vn=n.theme||Gz,this.zC=new c(this.vn.dashboardSplitterStyle),this.JC=!!n.disableAnimations,this.QC=ZU(e,u+1,1),this.NC=e.$v(0),this.$C=this.QC(u).Jv,this.Qv=e.$v(Number.MAX_SAFE_INTEGER-1);var a=e.vi();this.uiScale=er.d2({scaleXYConstructor:Vo}).qi(0,100).Ji(0,100).oi(a),this.tB=e.iB.bind(e),this.nB=e.eB.bind(e),this.rB=e.sB.bind(e),this.oB=e.hB.bind(e),this.Gs=e.Gs.bind(e),this.js=e.js.bind(e),this.engine=e.Ls,this.IC(),e.io(this.LC),e.xn(),this.uB();var f,d,v=(f=this.an,d="dashboard-resize",{on:f.on.bind(f,d),off:f.off.bind(f)});this.createChartXY=function(t){var i=tY(t,o.MC,o.JC);return o.YC(new UU(o.ps,o.QC(o.aB(t.columnIndex,t.rowIndex)),o.fB(i,o.qC),o.jC,s,i,v),i.columnIndex,i.rowIndex,i.columnSpan,i.rowSpan)},this.createSpiderChart=function(t){var i=tY(t,o.MC,o.JC);return o.YC(new Jj(o.ps,o.QC(o.aB(t.columnIndex,t.rowIndex)),o.fB(i,o.qC),o.jC,s,i,v),i.columnIndex,i.rowIndex,i.columnSpan,i.rowSpan)},this.createPolarChart=function(t){var i=tY(t,o.MC,o.JC);return o.YC(new ij(o.ps,o.QC(o.aB(t.columnIndex,t.rowIndex)),o.fB(i,o.qC),o.jC,s,i,v),i.columnIndex,i.rowIndex,i.columnSpan,i.rowSpan)},this.createPieChart=function(t){var i=tY(t,o.MC,o.JC),n=i&&i.type?i.type:GV;return o.YC(new n(o.ps,o.QC(o.aB(t.columnIndex,t.rowIndex)),o.fB(i,o.qC),o.jC,s,v,i.theme),i.columnIndex,i.rowIndex,i.columnSpan,i.rowSpan)},this.createGaugeChart=function(t){var i=tY(t,o.MC,o.JC),n=i&&i.type?i.type:Mj;return o.YC(new n(o.ps,o.QC(o.aB(t.columnIndex,t.rowIndex)),o.fB(i,o.qC),o.jC,s,v,i.theme,i.disableAnimations),i.columnIndex,i.rowIndex,i.columnSpan,i.rowSpan)},this.createFunnelChart=function(t){var i=tY(t,o.MC,o.JC),n=i&&i.type?i.type:dj;return o.YC(new n(o.ps,o.QC(o.aB(t.columnIndex,t.rowIndex)),o.fB(i,o.qC),o.jC,s,v,i.theme),i.columnIndex,i.rowIndex,i.columnSpan,i.rowSpan)},this.createPyramidChart=function(t){var i=tY(t,o.MC,o.JC),n=t&&t.type?t.type:Pj;return o.YC(new n(o.ps,o.QC(o.aB(t.columnIndex,t.rowIndex)),o.fB(i,o.qC),o.jC,s,v,i.theme),i.columnIndex,i.rowIndex,i.columnSpan,i.rowSpan)},this.createUIPanel=function(t){var i=tY(t,o.MC,o.JC);return o.YC(new yV(o.ps,o.QC(o.aB(t.columnIndex,t.rowIndex)),o.fB(i,o.qC),o.jC,s,v,i.theme),i.columnIndex,i.rowIndex,i.columnSpan,i.rowSpan)},this.createLegendBoxPanel=function(t){var i=tY(t,o.MC,o.JC);return o.YC(new CG(o.ps,o.QC(o.aB(t.columnIndex,t.rowIndex)),o.fB(i,o.qC),o.jC,s,v,i.theme),i.columnIndex,i.rowIndex,i.columnSpan,i.rowSpan)},this.createZoomBandChart=function(t){var i=tY(t,o.MC,o.JC),n=void 0===i.bandAboveSeries||i.bandAboveSeries;return o.YC(new XU(o.ps,o.QC(o.aB(t.columnIndex,t.rowIndex)),o.fB(i,o.qC),o.jC,i.axis,n,s,i,v),i.columnIndex,i.rowIndex,i.columnSpan,i.rowSpan)},this.createMapChart=function(t){var i=tY(t,o.MC,o.JC);return o.YC(new sH(o.ps,o.QC(o.aB(t.columnIndex,t.rowIndex)),o.fB(i,o.qC),o.jC,s,i,v),i.columnIndex,i.rowIndex,i.columnSpan,i.rowSpan)},this.createChart3D=function(t){var i=tY(t,o.MC,o.JC),n=new FG(o.ps,o.QC(o.aB(t.columnIndex,t.rowIndex)),o.fB(i,o.qC),o.jC,s,v,i);return o.YC(n,i.columnIndex,i.rowIndex,i.columnSpan,i.rowSpan)}}return i.prototype.aB=function(t,i){return t+i*this.GC},i.prototype.fB=function(t,i){var n=this;return{d1:function(e){return new e.scale1DConstructor("x"===e.dimension?t.columnIndex:t.rowIndex,"x"===e.dimension?t.columnSpan:t.rowSpan,"x"===e.dimension?n.GC:n.EC,"x"===e.dimension?i.x:i.y)},d2:function(e){return(new e.scaleXYConstructor).Pt({x:t.columnIndex,y:t.rowIndex},{x:t.columnSpan,y:t.rowSpan},{x:n.GC,y:n.EC},i)}}},i.prototype.setWidth=function(t){return t instanceof Array||(t=[t,t]),this.tB(t[0]),this.nB(t[1]),this},i.prototype.setHeight=function(t){return t instanceof Array||(t=[t,t]),this.rB(t[0]),this.oB(t[1]),this},i.prototype.getWidth=function(){return this.Gs()},i.prototype.getHeight=function(){return this.js()},i.prototype.setBackgroundFillStyle=function(t){return this.engine.setBackgroundFillStyle(t),this.NC.xn(),this},i.prototype.getBackgroundFillStyle=function(){return this.engine.getBackgroundFillStyle()},i.prototype.setBackgroundStrokeStyle=function(t){return this.engine.setBackgroundStrokeStyle(t),this.NC.xn(),this},i.prototype.getBackgroundStrokeStyle=function(){return this.engine.getBackgroundStrokeStyle()},i.prototype.getTheme=function(){return this.vn},i.prototype.setSplitterStyle=function(t){var i=this.zC.D(!1);return this.zC.C(t),this.cB(i),this},i.prototype.getSplitterStyle=function(){return this.zC.D(!1)},i.prototype.setSplitterStyleHighlight=function(t){var i=this.zC.D(!1);return this.zC.I(t),this.cB(i),this},i.prototype.getSplitterStyleHighlight=function(){return this.zC.D(!0)},i.prototype.cB=function(t){var i,n,e,r,s=h([this.zC.D(!1),this.zC.D(!0)],2),u=s[0],a=s[1];try{for(var f=o(this.HC),c=f.next();!c.done;c=f.next()){(v=c.value).na(v.ea()===t?u:a)}}catch(t){i={error:t}}finally{try{c&&!c.done&&(n=f.return)&&n.call(f)}finally{if(i)throw i.error}}try{for(var l=o(this.VC),d=l.next();!d.done;d=l.next()){var v;(v=d.value).na(v.ea()===t?u:a)}}catch(t){e={error:t}}finally{try{d&&!d.done&&(r=l.return)&&r.call(l)}finally{if(e)throw e.error}}this.uB()},i.prototype.setColumnWidth=function(t,i){var n=this.qC.x.S();t>=0&&t<n.length&&(n[t]=i,this.qC.x.l(n));for(var e=n.reduce((function(t,i){return t+i})),r=0;r<this.GC-1;r+=1){var s=this.HC[r],o=l(100*n.slice(0,r+1).reduce((function(t,i){return t+i}))/e,0),h=l(o.x,100);s.ha(o).Ku(h)}return this.an.emit("dashboard-resize"),this},i.prototype.getColumnWidth=function(t){var i=this.qC.x.S();if(t>=i.length)throw new fr("Column index is out of dashboard range.");return i[t]},i.prototype.setRowHeight=function(t,i){var n=this.qC.y.S();t>=0&&t<n.length&&(n[Math.abs(n.length-1-t)]=i,this.qC.y.l(n));for(var e=n.reduce((function(t,i){return t+i})),r=0;r<this.EC-1;r+=1){var s=this.VC[r],o=l(0,n.slice(0,r+1).reduce((function(t,i){return t+i}))/e*100),h=l(100,o.y);s.ha(o).Ku(h)}return this.an.emit("dashboard-resize"),this},i.prototype.getRowHeight=function(t){var i=this.qC.y.S();if(t>=i.length)throw new fr("Row index is out of dashboard range.");return i[Math.abs(i.length-1-t)]},i.prototype.DC=function(t,i,n){var e,r;n&&Math.abs(t.x)>0?this.lB(i,t.x):!n&&Math.abs(t.y)>0&&this.dB(i,t.y),this.an.emit("dashboard-resize");try{for(var s=o(this.FC),h=s.next();!h.done;h=s.next()){h.value.panel.gi()}}catch(t){e={error:t}}finally{try{h&&!h.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}this.engine.xn()},i.prototype.dB=function(t,i){var n=this,e=QU(this.FC,this.VC,t,i,this.uiScale.y.getPixelSize(),!1),r=[],s=0;e.forEach((function(t,i){var e=n.VC[i].ji();if(e){var o=e.y+t;n.VC[i].ha(l(0,o)),n.VC[i].Ku(l(100,o));var h=(o-s)/100;r[i]=h,s=o}})),r[this.EC-1]=1-s/100,this.qC.y.l(r)},i.prototype.lB=function(t,i){var n=this,e=QU(this.FC,this.HC,t,i,this.uiScale.x.getPixelSize(),!0),r=[],s=0;e.forEach((function(t,i){var e=n.HC[i].ji();if(e){var o=e.x+t;n.HC[i].ha(l(o,0)),n.HC[i].Ku(l(o,100));var h=(o-s)/100;r[i]=h,s=o}})),r[this.GC-1]=1-s/100,this.qC.x.l(r)},i.prototype.ZC=function(t,i,n,e){var r=i-1,s=i-1+e,o=t-1,h=t-1+n;r>=0&&this.VC[r].restore(),s<this.VC.length&&this.VC[s].restore(),o>=0&&this.HC[o].restore(),h<this.HC.length&&this.HC[h].restore(),this.engine.xn()},i.prototype.setAnimationsEnabled=function(t){return this.JC=!t,this.forEachChart((function(i){return i.setAnimationsEnabled(t)})),this},i.prototype.getAnimationsEnabled=function(){return this.JC},i.prototype.disableAnimations=function(){return this.setAnimationsEnabled(!1),this},i.prototype.mapCharts=function(t){return this.FC.filter((function(t){return t.panel instanceof mV})).map((function(t){return t.panel})).map(t)},i.prototype.forEachChart=function(t){return this.FC.filter((function(t){return t.panel instanceof mV})).map((function(t){return t.panel})).forEach(t)},i.prototype.dispose=function(){return this.AC(),this.an.emit("dispose"),this},i.prototype.saveToFile=function(t,i,n){return fV(this.engine,t,i,n),this},i.prototype.vB=function(){var t,i;try{for(var n=o(this.FC),e=n.next();!e.done;e=n.next()){e.value.panel.Tf()}}catch(i){t={error:i}}finally{try{e&&!e.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}return this.TC.forEach((function(t){return t.Fe()})),this.TC.forEach((function(t){return t.Tf()})),this.Nv.forEach((function(t){return t.Fe()})),this.Nv.forEach((function(t){return t.Tf()})),this},i.prototype.bi=function(){var t,i;try{for(var n=o(this.FC),e=n.next();!e.done;e=n.next()){e.value.panel.bi()}}catch(i){t={error:i}}finally{try{e&&!e.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}return this.uiScale.x.bi(),this.uiScale.y.bi(),this},i.prototype.gi=function(){var t,i;try{for(var n=o(this.FC),e=n.next();!e.done;e=n.next()){e.value.panel.gi()}}catch(i){t={error:i}}finally{try{e&&!e.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}return this.uiScale.x.gi(),this.uiScale.y.gi(),this},i.prototype.addUIElement=function(t,i){void 0===t&&(t=VN),void 0===i&&(i=this.uiScale),i=lV(i);var n=cV(t,this.$C(),this.uiScale,i,this.WC,this.UC,this.vn);return this.TC.push(n),n},i.prototype.addLegendBox=function(t,i){void 0===t&&(t=JN),void 0===i&&(i=this.uiScale),i=lV(i);var n=cV(t,this.Qv,this.uiScale,i,this.Yv,this.Zv,this.vn);return this.Nv.push(n),n},i.prototype.XC=function(t,i,n,e){return i>=0&&t>=0&&i+e<=this.EC&&t+n<=this.GC},i.prototype.KC=function(t){var i=this.zC.L(),n=i===ir?0:i.thickness/2,e={left:t.columnIndex>0?n:0,top:t.rowIndex<this.EC-1?n:0,right:t.columnIndex<this.GC-1?n:0,bottom:t.rowIndex>0?n:0};t.panel.Lh(e)},i.prototype.uB=function(){var t,i;this.uiScale.x.ai([0,0]),this.uiScale.y.ai([0,0]);try{for(var n=o(this.FC),e=n.next();!e.done;e=n.next()){var r=e.value;this.KC(r)}}catch(i){t={error:i}}finally{try{e&&!e.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}this.engine.xn()},i}(),tY=function(t,i,n){var r,s,o=e(e({},t),{columnSpan:t.columnSpan||1,rowSpan:t.rowSpan||1,theme:t.theme||i.theme,disableAnimations:void 0!==t.disableAnimations?t.disableAnimations:n});return o.rowIndex=(r=o.rowIndex,s=o.rowSpan,i.numberOfRows-(r+s)),o},iY=150,nY=31,eY="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAAAfCAMAAAAyYMTAAAAC/VBMVEUAAABcXE1CQkJDQEDg4uLb3NyOjY3a2trq7OxCQUHZ2dkvLy9BPz/R0dE/Pz9FRETHx8ejo6PX2Ng+PT1FRUWrqqrIycm5urpCQUHq6urKyspDQkLh4uLO0NDR0tJ/f3/i4+NgXl7q6+vq6urj5uZAQEDm5+fCw8OOjY2Hh4f6yQJHRUKcnJzMzMxOSz9paGiAgIDY2dlTUVFGRUXa29vY2dnr6+vW19fr6+tBQUFERETo6+vY2NhAQEA/Pz92dnaoqKjn6OjR0tLP0NCmpqaSkpLQ0dHDxMRbWlqGhobBwsKNeSlmZmZFQ0PY2dno6OixsbHb29udnZ3m5uZFREPj5OSWlpbDw8NFRENmZmbIycnb3NzWrg+KiorZ2tq1tbXCoBbT1NReVjpiWTh2aDHX2Nh2dXXZ2trMzMxEQkJZWVne399FRERNTEzf4eFISEhAQEA8PDzU1NSLi4v9ywJFREPW1tb2xgPovAiYmJjf4OB6enrftAyLi4tLSEG6u7t2dnZ6enpWUDzLzMylpqZXV1fFxcWXmJiRkZFDQ0Oenp7o6ura2tqAgIB0c3OgoaHX19fh4uLa29taWFi8vr5oZmadnZ1UU1O9vb28vLzvwAbf39+KiYl1dHTLzMyEg4PitgvMpxLIpBSampq7u7uxlBu3t7epjR9pXzXg4eGFhYXg4OCoqKi8vb2FhYX+zABiYWHDxMT8ygFaWlrFxcWnp6ff4eHExcVjZGShoqKDgoLp7Oy3t7fHx8fW2NjruwCniDV6enrT09O8nBhxcHBmXDechCOCcC2ysrJkY2NQT09wb2/R0tKbm5tcXFzm6OhJSUnr6+v9zABtYjL8ygB8fHxiYmJnZ2ehoaGtra3+zADc3d3HpRRPT0+Hh4f9ywB6enr8ywCTk5P8zAD6zABEQ0Pr7Oz+zADo6enNzc3j4+Pb29vFxcXe39/W1ta3t7dvbm7+/v7q6+u9vb1cW1tPTk7IyclFREOWlZV+fn5mZmb29vZXVlbv7+9HRka4S7StAAAA5XRSTlMAAmJE1Sn+DGhPEgciCC38BfljGQ397u1dL/VZIRz+0sycUUUcFP37+ff14dnV1dTGxKGYkFlXQTw6NjU1MSn8+/f27OLh29nX1NLAmGhNS/769vTw7+/r5+Xf3dnX0NDOy8fFwLauqZ6HhHh2cnFCPRAP/Pr49e/m4+Hg397b2dXRzczMwsC1p6eknp6ckIKAfWdkYk8oHfzy7ezr6OLi4dPRy8nIxcXDvbq1tLOrqKWjmZiOjYd3dW1jXkw9LwwF497LyMTCwLq4rqmclpORj2NdWEdDPy7o2MGypYeBenZSS0AsNPhBGgAAB1RJREFUWMPFmHVUFGEQwGc5OC7xOE/lEFBJQWyQFFQQEAW7u7u7u7u7u7u7u7tzZ/eOUux8fvvtofhO78zn74+b2Xuzb383M7vv3YIA0yYf+wNqtFTC32SSPRA0E+AnaMlaYCQVh+/ieigmZpgd/AL5zwHBPrsErOKVhbWEA/P4/hP4LnY5irYs5Dz9V7Ty/LRWe9acLAVMyesCd7qv3w8/0nIAiG0GsE+bqAZNEAAEqUkTXYRvghhSoAgK1IAiMFAhjC4xUJGh1T4xsBMowoU8HL6PhDVnxUIa+h1fwPldArCkNfgIBMTX7Zl9GhM1FZhuIwACVsGE+DLR8Qyc6b+k5+TwmLqls08DTeEhfatHiVpRgxeXdp6miFKRbRvi9RNaWehEq8zihHY14jhu0WWwpMUEzrsQXmukjlkTDWtXQXh2R4BDRVzmjdQp+4+FFiWKKr0axkXA+GjQRifAVIOo1S0uBNb4Q/xYgIZxYF0r36JGQijLcUuJYh+uy/EsNha03ObF1I/L2m5OR5LPVAWVYCb0dnbY11+uzbFdq23aF1rMVYK62yittvVM1Zi5mXZLTsZdoeMUR3Ct1ca61tHu3GFBzo+0KR+7guOOsqwFLbLybXLqYMIckrtUb69xDm14Kn5c6/nKSdlyEYZCi4EAilK9SV4zYtiRb1c+PEcEOaFd36zWtKosJTZdarDsco5wrGsPrk8WK1oOQtBWAoDE6OKwZF2s0/aeDU9BYgkGCFSLKTWZ5hvrAkCMqOVMtAJvqMjYGw4FK1qDenACTdgCNPqRSTZmf0ZL4byTcalXUwlTfPyzuvrEOoEm+3hGk6igWnDipj3YhcNen2nqgFKiVmp9e0W9mgzsndE/p2WtrsSCUuf1Qo6b1Z2mrGUtV3+qBbuy1YovKCeXy1EQoH4k2bSrjrXyD2kD28kxHChdvdaSkwAjZsYW8t8MBPWQXNVjBwhC2ecqLWr1q8NlIPg1oXNsZEULQnRizOrkRFckIpTkEiB45bTpwICyAxAYSYK8o1BtE+El/o7iug42EYJfVFGwpNXEj8tMj66Nad9ErX+HNrqDBa0aDTjKguWcyAq2SheOG8T+a609ccyPtRrN4iiHq9Sgkd6ADbiFrEnrv7B/U8ZOUZmMnWrCDfqvWpc4il9jltBYvBfp8579r1rrxbXqJz4munMZO5XPTEsjk9FV0MvCIINgmSdQ3GVq+IKHzAXM8XS/KJPtFivN0ciKCYEJ81ALM+zCERpUYUWOkdyUmmnpsSK9cZrjYsigHo4DSmWjHL7Qi377Lfaj05HgrKKV5tihT1ZidX7NiGGuAA9NayUiPOEL/EhrN85QCXG87wbIoCqfIHYCXxWHLwz3NR/9Skz1Pdi7d0FXTCaV5hRDR4b0eV3+wbtO0BnStTLxus9SMXn3lI18+zbyUyatMViJDjG37XTQj85ta2s7RYF8bduV5WFbL0yx3RJsS1itBxfbprrWJM09RgEQRiv3lEfjUC86YFKZ+7YemNxCxUQG2pG40m51VaxoOwUmjYuKybkMDvhxPb5pT5N+YsyW9OKZm+HZ00xa9bCu2JhUiQfPG5KN2CwYUwypyF9f64avKhyciKmGJCyldMcKHeuhm8GI9aFYOv8q2RvLrcYSKhBoTYpSSJGi+vPnyTxuhcKYZsDFsUk4o8IGcF02/OyWEXCFu3WZzQwdp0nr6YtvtCrjaSGUx7TpVfmaCfKKfFsZVnOyqYg7sg7GgaERTXGA0w5MLR6A1ch0izqNwmyKksaaNnJvY86qWAYoYlFSKIRIJPL66A+z0+9uxDKq2ekXQsly3Vt2ZrgcNm06IGHNoFov36e9fPryq5Yn8m2FOBErEbPi0AndJM2xEDAljTmhNrYim04+7PC5qjAWUqAhBNphtYtCk1ww+TpiM6DUpkU+quDclUuW5LGMmk+VPBrQyp53k4CASj4d4ArAj7TYd7zhZaaVd8cUifhz67ZGR4BgTPOqjeWEizow3ily0PBJcrq5s7FcMFbQAZEOwJ7CmSXUiGNBgPEmRe7o2Kmkt+ObNylYLgzTSJOAhq9Y0GI/pBozdWsb4sYwvd6+F57Wopu+kwwrQWXSqPKYTemJKVdpoyAA+6p5oxNpFACR3oLOdp22YWnohqWKeXh4uJiKSpdHn/Y6nbe3zW6sJN6IPmprWtKPwm7hu292qzBSdvF8gr0bTct4kkbBRHJReyPiMKFRpKpZGHkEZEzXtSISyMHOFJoMdzcV6dNR4FXoGHHpghBxq5X/iW/ev00mK/+mM9FyAhNnfX19O3fuPNnfNwSuzc8rTcJyntUilbBTehLgQV5pwT3SggCjpG3t8kYqt0rPgdr/rQNMnZNXauTJ4k0mp0ilG/aaimCscCiN1I2XbgaBdXlJYvlf9VODweD4MtlgePWBdQBz9DKZ7Dwmy8EqwaRyNKaFgBl//A7CnOaImJ4cx4BVCguVz4cy8Ev85huba0WKFCnaVgfWmSpUJijh1/gMHDQcrlbMjHoAAAAASUVORK5CYII=",rY=150,sY=31,oY="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAAAfCAMAAAAyYMTAAAABFFBMVEUAAACEhITm7OygnZ3c3986OjrKy8vW1tYiIiI5OTnf399DQ0Onp6fX19eHh4fOzs7j4+OWlpaRkZGrrq6kpKShoqKhoaG/v78rKyt3d3d8e3ucmpq1tbV3d3dbW1t/f3+bm5vIycmCgYG4ubmVlZWNiYl0dXXR0dGCgYHExcU+Pj6hn5+UlJRta2uDg4O5ubmvr6+8vb2oqamnqqpISEhJSUmopqa6urqSlJSxsbHo6Ohsamre3t6FhIRfX1+BgYGKiorExMSVlZWbmZmgoKCoq6u5urpTUVFzc3NgYGDm5+fHx8fAwMCurq7T1dVMS0vExMSHhoZqaWmSkpKwsLDk5OR2dnasrKyMjIyenp6SkpKloaEjfdvjAAAAXHRSTlMAJydHDgolBwMOCQgCEw4FDENAPkM1JSQGMStFODQXCi0eNyolPSclLxkXRColGwk7MCkkFRFBPjUlJCklNCYiFQ48ODEtNSIfHBpIQTQgG0Q7LiAeFgUWET0wPfWkCs4AAAXUSURBVFjDxZiJUhpBEIZ7d3bZ2+VmWYRwX3IrIKAiKIJJjPeR5P3fIz0zELSIoKlY+avc7hn/Gb7paaEEmJ6GwisaHsM/lWSyYL3FeyysUQ1elx3JZO5seId6CRZC8marKqzVA+iWAn+Usl/eq47Vj8H69CeY7CIJp/qfTXgNywBIzjAZ6Tisz39sezGjmHUvgOn1sh0w/MaiUyY7bf0dWLsFDhc5EPsSwDqsSBWslls8fYCJDJCpAVgzsHbzxRZAKRmOavVI3g09AKQE93Qyx+oJxdCDGXIAJEF9O1ZfDFM4URQLW7AWyzvZUyZlFW6LcDeEeiiNaJd2qwzwowaldBnU1NSB40OQim2Q/XOsqQG3LrRqCDuFzVjZQpiGiCh6MByIYk9Yh/V9kqlMVSuqYj5W9UOwBieOkpRH+yNJSrlQGqDr4laSrH2H5a1lb9Wv1dEh2JP2Zqxwn+FkRVSWFgsh11ar3NYArChtqBMZTozIZThhuSBd51FTKFUBzNAA8yPnrvqi5XGxgwssV92I5aE4ixjBmzwQNmAZNEhpfOg/DAjPWtrITV2CnuYGxEIGjecuPjJLLG9Rhd1Z5BI2YGGpqHpCWGTCm9x9E5Y5fgL72xHAaOyq9jiJGCfHCGpyrNskOutQz9lgheZYFTDpgjqaN2AhBdOBUBDFfp+n67HsosHi1uGkdSRjso8vVblRcU+cybbhkWKB+6MVPgeo7beGwh5QVfKnrYFG+W5gLVb2QFyI8vXYPYY3YIE8j6qmqTQ6BubyfIZGmds0WWXBUfk5DBVzQGXKa7F64gv1+XuDwLE+TqOivAYrW5jfn4cF1lO0WB+OVZ/C61i7fQ5T4O8MvKcKOJxj/R99XvQUg1n0VA+f/xNLWl4c/7jhZcri839i8WIdZDkELxbjWsWSJBYUSYeFdMnmiZf/bjm7KtMroV46YWV3nW/eZwVaQHhosbhWsJTAd5nGUlCAhSLBBE+aQRl+K4Ozq+c/C3SCwbHDnKtSGicqhvvbWtjGU/K2WiiMxXoNSyI5lcbj6PITo0k0XomA34Dfuo2uvnl/6/iig8HgiDtXJe2wz7BZq7WV5Xe4Kyx14OExmRROUc+xSuSQv4BHBeWzBzUyGyTjSXnBKgRjnpJewLmUArYnBZYHdW8C6MxZ9wZiU3YoHZ1ootugLOShi+xvGfLdMwIpcTrREKvP2mqp3ny0/bXypdv9knyGlSEuDXbAJ+vNHb8/Rs71js/vIzvOnY/4rwcWoaMT8O5cqxHi88VIBaQz5kykSNoBqoXJDOVyfkIeIUJyPiIkfSR3fQ5meFh7HIIuft4SVsWxkpUXWGfknDV3MPfQJANNviBtiUQ17Sdpqz1SNZwUqWrtHZ9hkSJckLJWI2mzGTvS5EZMa5I8MC1MYMiyXCEu9sHeHck7F2TPULFDwqWhDPf38OkVLOFqW0guLxGrRNr8uIfeTs4As+GTS6QKsB3TsJJ7wB5KJ4eVqpoN7CDEk4JpFVf6nQY/EzfZHb+jf2s2m2cIi9t8GuzRAFSOjHBeeB0redVdtDyvEl+YInkkA9ARIEMS9EUNRJORDw20c5skoXeuVVqYEiniSpwLkBqguAknsIzpdNpHEvQcOM3CUmuwhEr36hmWRcidrih43HOJjBVTQrazmIa4aUSLGaAEcg66XMA7sygOQj+SE8WkgxAJSbqu2/bc5A36ZVZoug1KIn7YhHVxRXvr6mVvRQghgUZja5toMCaB7W2Sp7cDjOAnCexioajrXOn4DSwUUGjTh84GmcFTjAQDgcDQy00zhZDtszN0lnjT6Th+3Ih12sWWvwg9x6pFqeKaG5XBcKNx/PMyizcAT3HsmnY0flSPH6Er3rajN3Acx15zbxyQmRMHGibx+OXChNvFUdxJNYtisv6/6mS3290WuqiK8ACrUiRJum/gLWyUTp2B3IrzQ76DSAWDwR3/FDYrQp25S3if/vIbG6OMasMbJFOnBu/ULxhct69nFFK8AAAAAElFTkSuQmCC";t.ImageFitMode=void 0,(WU=t.ImageFitMode||(t.ImageFitMode={}))[WU.Fill=0]="Fill",WU[WU.Fit=1]="Fit",WU[WU.Stretch=2]="Stretch",WU[WU.Center=3]="Center";var hY,uY=function(t){function i(i){var n=t.call(this,i)||this;return n.type="fillstyle",n}return n(i,t),i.prototype.setSource=function(t){return this.set("source",t)},i.prototype.getSource=function(){return this.get("source")},i.prototype.setSurroundingColor=function(t){return t instanceof xe?this.set("surroundingColor",t):this.set("surroundingColor",t(this.get("surroundingColor")))},i.prototype.getSurroundingColor=function(){return this.get("surroundingColor")},i.prototype.setSourceMissingColor=function(t){return t instanceof xe?this.set("sourceMissingColor",t):this.set("sourceMissingColor",t(this.get("sourceMissingColor")))},i.prototype.getSourceMissingColor=function(){return this.get("sourceMissingColor")},i.prototype.setFitMode=function(t){return this.set("fitMode",t)},i.prototype.getFitMode=function(){return this.get("fitMode")},i.prototype.createDefaultHighlightStyle=function(){return this.asImmutable()},i.prototype.getDefaultHighlightStyle=function(){return this.It||(this.It=this.createDefaultHighlightStyle()),this.It},i}(me({source:void 0,surroundingColor:Ae(0,0,0,0),sourceMissingColor:Ae(0,0,0,255),fitMode:t.ImageFitMode.Fill})),aY={translation:function(t,i,n){return[1,0,0,0,0,1,0,0,0,0,1,0,t,i,n,1]},xRotation:function(t){var i=Math.cos(t),n=Math.sin(t);return[1,0,0,0,0,i,n,0,0,-n,i,0,0,0,0,1]},yRotation:function(t){var i=Math.cos(t),n=Math.sin(t);return[i,0,-n,0,0,1,0,0,n,0,i,0,0,0,0,1]},zRotation:function(t){var i=Math.cos(t),n=Math.sin(t);return[i,n,0,0,-n,i,0,0,0,0,1,0,0,0,0,1]},scaling:function(t,i,n){return[t,0,0,0,0,i,0,0,0,0,n,0,0,0,0,1]},translate:function(t,i,n,e){return aY.multiply(t,aY.translation(i,n,e))},xRotate:function(t,i){return aY.multiply(t,aY.xRotation(i))},yRotate:function(t,i){return aY.multiply(t,aY.yRotation(i))},zRotate:function(t,i){return aY.multiply(t,aY.zRotation(i))},scale:function(t,i,n,e){return aY.multiply(t,aY.scaling(i,n,e))},multiply:function(t,i){var n=i[0],e=i[1],r=i[2],s=i[3],o=i[4],h=i[5],u=i[6],a=i[7],f=i[8],c=i[9],l=i[10],d=i[11],v=i[12],y=i[13],S=i[14],m=i[15],b=t[0],g=t[1],w=t[2],p=t[3],k=t[4],x=t[5],M=t[6],A=t[7],F=t[8],T=t[9],C=t[10],B=t[11],L=t[12],I=t[13],O=t[14],P=t[15],D=[];return D[0]=n*b+e*k+r*F+s*L,D[1]=n*g+e*x+r*T+s*I,D[2]=n*w+e*M+r*C+s*O,D[3]=n*p+e*A+r*B+s*P,D[4]=o*b+h*k+u*F+a*L,D[5]=o*g+h*x+u*T+a*I,D[6]=o*w+h*M+u*C+a*O,D[7]=o*p+h*A+u*B+a*P,D[8]=f*b+c*k+l*F+d*L,D[9]=f*g+c*x+l*T+d*I,D[10]=f*w+c*M+l*C+d*O,D[11]=f*p+c*A+l*B+d*P,D[12]=v*b+y*k+S*F+m*L,D[13]=v*g+y*x+S*T+m*I,D[14]=v*w+y*M+S*C+m*O,D[15]=v*p+y*A+S*B+m*P,D},inverse:function(t){var i=[],n=t[0],e=t[1],r=t[2],s=t[3],o=t[4],h=t[5],u=t[6],a=t[7],f=t[8],c=t[9],l=t[10],d=t[11],v=t[12],y=t[13],S=t[14],m=t[15],b=l*m,g=S*d,w=u*m,p=S*a,k=u*d,x=l*a,M=r*m,A=S*s,F=r*d,T=l*s,C=r*a,B=u*s,L=f*y,I=v*c,O=o*y,P=v*h,D=o*c,_=f*h,R=n*y,z=v*e,E=n*c,N=f*e,V=n*h,G=o*e,H=b*h+p*c+k*y-(g*h+w*c+x*y),j=g*e+M*c+T*y-(b*e+A*c+F*y),W=w*e+A*h+C*y-(p*e+M*h+B*y),U=x*e+F*h+B*c-(k*e+T*h+C*c),Y=1/(n*H+o*j+f*W+v*U);return i[0]=Y*H,i[1]=Y*j,i[2]=Y*W,i[3]=Y*U,i[4]=Y*(g*o+w*f+x*v-(b*o+p*f+k*v)),i[5]=Y*(b*n+A*f+F*v-(g*n+M*f+T*v)),i[6]=Y*(p*n+M*o+B*v-(w*n+A*o+C*v)),i[7]=Y*(k*n+T*o+C*f-(x*n+F*o+B*f)),i[8]=Y*(L*a+P*d+D*m-(I*a+O*d+_*m)),i[9]=Y*(I*s+R*d+N*m-(L*s+z*d+E*m)),i[10]=Y*(O*s+z*a+V*m-(P*s+R*a+G*m)),i[11]=Y*(_*s+E*a+G*d-(D*s+N*a+V*d)),i[12]=Y*(O*l+_*S+I*u-(D*S+L*u+P*l)),i[13]=Y*(E*S+L*r+z*l-(R*l+N*S+I*r)),i[14]=Y*(R*u+G*S+P*r-(V*S+O*r+z*u)),i[15]=Y*(V*l+D*r+N*u-(E*u+G*l+_*r)),i},projectionPerspective:function(t,i,n,e){var r=1/Math.tan(t*Math.PI/180/2),s=1/(n-e);return[r/i,0,0,0,0,r,0,0,0,0,(n+e)*s,-1,0,0,n*e*s*2,0]},projectionOrthographic:function(t,i,n,e,r,s){return[2/(i-t),0,0,-(i+t)/(i-t),0,2/(e-n),0,-(e+n)/(e-n),0,0,-2/(s-r),-(s+r)/(s-r),0,0,0,1]}},fY=function(t){this.yB=t},cY=function(){function t(){var t=this;this.SB=new Array,this.mB=function(i){return t.SB.push(i),i},this.bB=this.mB(new Map),this.gB=this.mB(new Map),this.wB=this.mB(new Map),this.pB=this.mB(new Map),this.kB=this.mB(new Map)}return t.prototype.xB=function(){this.SB.forEach((function(t){t.forEach((function(t){return t.xB()})),t.clear()}))},t}(),lY=function(){function t(t){this.MB=t,this.AB=new Map}return t.prototype.FB=function(t){return!!this.AB.get(t)},t.prototype.S=function(t){var i=this.AB.get(t);return i&&i.textureInfo},t.prototype.Qh=function(t){if(t instanceof De){var i=this.AB.get(t);i&&(i={textureInfo:i.textureInfo,refs:i.refs+1},this.AB.set(t,i))}else t.textureInfo&&this.AB.set(t.lut,{textureInfo:t.textureInfo,refs:1});return this},t.prototype.uo=function(t){if(!t)return this;var i=this.AB.get(t);return i&&(0===(i={textureInfo:i.textureInfo,refs:i.refs-1}).refs?(this.MB.deleteTexture(i.textureInfo.texture),this.AB.delete(t)):this.AB.set(t,i)),this},t.prototype.TB=function(t){var i=this.AB.get(t);return i?i.refs:void 0},t.prototype.dl=function(){return this.AB.size},t}(),dY=function(t){return new lY(t)},vY=function(t,i){this.st=t,this.hi=i,this.CB=!0,this.BB=null,this.LB=null},yY=function(){function t(t){this.IB=!1,this.OB=1,this.PB=t,this.DB={st:l(0,0),hi:l(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),CB:!0,BB:null,LB:null},this._B=l(64,64),this.RB=new Uint8ClampedArray(this._B.x*this._B.y*this.OB)}return t.prototype.zB=function(t,i){if(!t.CB)return null;if(t.BB&&t.LB){var n=this.zB(t.BB,i);return null!==n?n:this.zB(t.LB,i)}var e,r,s=d(t.hi.x,t.hi.y);if(t.st.x+t.hi.x>=Number.MAX_SAFE_INTEGER&&(s.x=this._B.x-t.st.x-1),t.st.y+t.hi.y>=Number.MAX_SAFE_INTEGER&&(s.y=this._B.y-t.st.y-1),t.hi.x===i.x&&t.hi.y===i.y)return t.CB=!1,t;if(s.x<i.x||s.y<i.y)return null;var o=s.x-i.x,h=s.y-i.y,u=o<h;return 0===o&&0===h&&(u=!(t.hi.x>t.hi.y)),u?(e=new vY(fo(t.st,{x:0,y:1}),l(t.hi.x,i.y)),r=new vY(fo(t.st,{x:0,y:i.y+1}),l(t.hi.x,t.hi.y-1-i.y))):(e=new vY(fo(t.st,{x:1,y:0}),l(i.x,t.hi.y)),r=new vY(fo(t.st,{x:i.x+1,y:0}),l(t.hi.x-1-i.x,t.hi.y))),t.BB=e,t.LB=r,this.zB(t.BB,i)},t.prototype.EB=function(t,i){var n={NB:!1,st:null},e=this.zB(this.DB,i);if(null===e)for(;null===e&&this._B.x<this.PB&&this._B.y<this.PB;){if(!this.VB(l(2*this._B.x,2*this._B.y)))return this.IB=!0,null;n.NB=!0,e=this.zB(this.DB,i)}if(null===e)return this.IB=!0,null;for(var r=0;r<i.y;r+=1)for(var s=0;s<i.x;s+=1){var o=e.st.y+r,h=e.st.x+s;this.RB[o*this.OB*this._B.x+h*this.OB+0]=t[r*this.OB*i.x+s*this.OB+0]}return n.st=e.st,n},t.prototype.VB=function(t){if(t.x>this.PB||t.y>this.PB)return!1;for(var i=new Uint8ClampedArray(t.x*t.y*this.OB),n=0;n<this._B.y;n+=1)for(var e=0;e<this._B.x;e+=1)i[n*t.x*this.OB+e*this.OB+0]=this.RB[n*this._B.x*this.OB+e*this.OB+0];return this._B=t,this.RB=i,!0},t}(),SY=function(){function t(t){this.GB=new Map,this.PB=t,this.GB.set(this.GB.size,new yY(this.PB))}return t.prototype.HB=function(t){return this.GB.get(t)},t.prototype.EB=function(t,i){for(var n=-1,r=Array.from(this.GB.values()),s=0;s<r.length;s+=1){var o=r[s];if(!o)break;if(!o.IB){n=s;break}}-1===n&&(n=this.GB.size,this.GB.set(this.GB.size,new yY(this.PB)));var h=this.GB.get(n);if(!h)return null;var u=h.EB(t,i);if(!u&&h.IB){var a=this.GB.size,f=new yY(this.PB);this.GB.set(a,f),n=a,u=f.EB(t,i)}return u?e({jB:n},u):null},t}();!function(t){t[t.Fail=0]="Fail",t[t.Success=1]="Success",t[t.Resize=2]="Resize"}(hY||(hY={}));var mY=Ms("font-texture"),bY=function(){function t(t){this.WB=new Map,this.UB=new Map,this.zs=mY(),this.yB=t,this.YB=new SY(this.yB.XB||4096)}return t.prototype.ZB=function(){var t=this;return this.UB.forEach((function(i){t.yB.KB(i)})),this.UB.clear(),this},t.prototype.qB=function(t,i){var n=this.WB.get(i);if(n)return n.get(t)},t.prototype.JB=function(t,i,n){var e=this.WB.get(i);if(e||(e=new Map,this.WB.set(i,e)),e.has(t.glyph))return hY.Success;var r=this.YB.EB(n,t.size);if(!r||!r.st)return hY.Fail;r.NB&&this.QB();var s=this.YB.HB(r.jB);if(!s)return hY.Fail;var o=this.UB.get(r.jB);if(!o){var h=this.yB.gl.createTexture();if(!h)throw new yr("Failed to create texture for font!");o=h,this.UB.set(r.jB,h)}var u=r.st,a=s._B.x,f=s._B.y,c=-t.offsetX,l=t.baseline-t.size.y,d=-t.offsetX+t.size.x,v=t.baseline,y=u.x/a,S=(u.y+t.size.y)/f,m=(u.x+t.size.x)/a,b=u.y/f,g=[y,S,m,S,y,b,y,b,m,S,m,b],w=[c,l,d,l,c,v,c,v,d,l,d,v],p={origin:u,size:t.size,advanceX:t.advance,baseline:t.baseline,vertices:w,texCoords:g,packerId:r.jB,texture:o};e.set(t.glyph,p);var k=this.yB.gl;return k.pixelStorei(k.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),k.bindTexture(k.TEXTURE_2D,o),k.texImage2D(k.TEXTURE_2D,0,k.LUMINANCE,s._B.x,s._B.y,0,k.LUMINANCE,k.UNSIGNED_BYTE,this.yB.$B?s.RB:new Uint8Array(s.RB)),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_MIN_FILTER,k.LINEAR),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_MAG_FILTER,k.LINEAR),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_WRAP_S,k.CLAMP_TO_EDGE),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_WRAP_T,k.CLAMP_TO_EDGE),k.bindTexture(k.TEXTURE_2D,null),r.NB?hY.Resize:hY.Success},t.prototype.QB=function(){var t=this;this.WB.forEach((function(i){i.forEach((function(n,e){var r=t.YB.HB(n.packerId);if(r){var s=n.origin,o=r._B.x,h=r._B.y,u=s.x/o,a=(s.y+n.size.y)/h,f=(s.x+n.size.x)/o,c=s.y/h,l=[u,a,f,a,u,c,u,c,f,a,f,c];n.texCoords=l,i.set(e,n)}}))}))},t}(),gY=function(t){return function(i,n){return n%2?i:i+t}},wY=function(){function t(t){this.tL=new Map,this.iL=Ms("font"),this.nL=new Map,this.eL=new Set,this.yB=t}return t.prototype.ZB=function(){return this.tL.forEach((function(t){return t.ZB()})),this.eL.clear(),this},t.prototype.rL=function(t){this.eL.add(t)},t.prototype.sL=function(t){this.eL.delete(t)},t.prototype.oL=function(t,i){var n,e,r=i.family+" - "+i.weight+" - "+i.style+" - "+i.variant,s=this.nL.get(r);s||(s=this.iL(),this.tL.set(s,new bY(this.yB)),this.nL.set(r,s));var o=this.tL.get(s);if(!o)throw new yr("Failed to get font texture!");for(var a,f=0,c=0,d=t.split(""),v=new Map,y=0,S=i.size,m=0;m<d.length;m+=1){var g=d[m],w=o.qB(g,S);if(!w){var p=this.yB.hL(g,i,this.yB.uL());if(!p)continue;var k=o.JB(p[1],S,p[0]);if(k===hY.Resize){this.eL.forEach((function(t){t.$o.t=!0})),m=-1,y=0,c=0,f=0,v.clear();continue}if(k===hY.Fail)throw new yr("Failed to create glyph");if(!(w=o.qB(g,S)))throw new yr("Failed to get glyph after creation")}if(""!==g.trim()){var x=v.get(w.texture);x||(x={vertices:[],texCoords:[]},v.set(w.texture,x)),(n=x.vertices).push.apply(n,u([],h(w.vertices.map(gY(y))))),(e=x.texCoords).push.apply(e,u([],h(w.texCoords))),c=Math.max(c,w.baseline),f=Math.min(f,w.baseline-(w.size.y-1))}y+=w.advanceX}a=y;var M=b(l(0,f),l(a,c)),A=[];return v.forEach((function(t,i){A.push({texCoords:new Float32Array(t.texCoords),vertices:new Float32Array(t.vertices),texture:i})})),[A,M]},t}(),pY=function(t){var i=t.map((function(t){return t.idVertex})).filter((function(t){return void 0!==t})).sort().join(" "),n=t.map((function(t){return t.idFragment})).filter((function(t){return void 0!==t})).sort().join(" ");return{vertexShaderID:i,fragmentShaderID:n,programID:"vert: "+i+" frag: "+n}},kY=function(t,i,n){var e,r,s=i.programID,h=i.vertexShaderID,u=i.fragmentShaderID,a=!1,f=!1,c=[],l=[],d=[];if(t.forEach((function(i){var h,u,v,y,S=i.apply(t,n);if(S.defaultVertexShader&&(a||(e=S.defaultVertexShader)),S.vertexShader){if(e&&a&&e!==S.vertexShader)throw new xY("Conflicting vertex shader templates "+e+" vs "+S.vertexShader,s,i);e=S.vertexShader,a=!0}if(S.vertexShaderModifiers)try{for(var m=o(S.vertexShaderModifiers),b=m.next();!b.done;b=m.next()){"function"==typeof(p=b.value)&&c.push(p)}}catch(t){h={error:t}}finally{try{b&&!b.done&&(u=m.return)&&u.call(m)}finally{if(h)throw h.error}}if(S.defaultFragmentShader&&(f||(r=S.defaultFragmentShader)),S.fragmentShader){if(r&&f&&r!==S.fragmentShader)throw new xY("Conflicting fragment shader templates "+r+" vs "+S.fragmentShader,s,i);r=S.fragmentShader,f=!0}if(S.fragmentShaderModifiers)try{for(var g=o(S.fragmentShaderModifiers),w=g.next();!w.done;w=g.next()){var p;"function"==typeof(p=w.value)&&l.push(p)}}catch(t){v={error:t}}finally{try{w&&!w.done&&(y=g.return)&&y.call(g)}finally{if(v)throw v.error}}S.hints&&S.hints.forEach((function(t){t&&d.push(t)}))})),!e)throw new xY("No vertex shader template defined",s);if(!r)throw new xY("Fragment shader not defined",s);return{id:s,vertexShader:{id:h,template:e,modifiers:c},fragmentShader:0===l.length?r:{id:u,template:r,modifiers:l},hints:d}},xY=function(t){function i(i,n,e){return t.call(this,"Dynamic shader generation error\n(id: "+n+")\n "+(e?"when applying feature: "+(e.idVertex?"vert: "+e.idVertex:"")+" "+(e.idFragment?"frag: "+e.idFragment:""):"")+" | "+i)||this}return n(i,t),i}(Error),MY=function(){for(var t,i,n,e,r=[],s=0;s<arguments.length;s++)r[s]=arguments[s];var h="";try{for(var u=o(r),a=u.next();!a.done;a=u.next()){var f=a.value;if("object"==typeof f)for(var c=[{prefix:"",obj:f}];c.length>0;){var l=c.shift(),d=l.prefix,v=l.obj;h+=d+":";var y=Object.keys(v).sort();try{for(var S=(n=void 0,o(y)),m=S.next();!m.done;m=S.next()){var b=m.value,g=v[b];"object"==typeof g&&g.__proto__===Object.prototype||Array.isArray(g)?c.push({prefix:b,obj:g}):h+=b+"="+String(g)+","}}catch(t){n={error:t}}finally{try{m&&!m.done&&(e=S.return)&&e.call(S)}finally{if(n)throw n.error}}}else h+=String(f)+","}}catch(i){t={error:i}}finally{try{a&&!a.done&&(i=u.return)&&i.call(u)}finally{if(t)throw t.error}}return h},AY={"2D":"\nvoid main(void) {\n gl_Position = vec4(posWorld, 0.0, 1.0 );\n}\n","3D":"\nuniform mat4 uViewProjectionMatrix;\nvoid main(void) {\n gl_Position = uViewProjectionMatrix * vec4(posWorld, 1.0);\n}\n"},FY={EmptyFragmentShader:"\nvoid main(void) {\n\n}\n"},TY=function(){function t(t){this.modifiers=[],this.modifiers=t}return t.prototype.alter=function(i){var n=new t(this.modifiers.slice());return n.modifiers.push.apply(n.modifiers,i),n},t.prototype.build=function(t){var i,n;try{for(var e=o(this.modifiers),r=e.next();!r.done;r=e.next()){t=(0,r.value)(t)}}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=e.return)&&n.call(e)}finally{if(i)throw i.error}}return t},t}(),CY=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return function(i){var n,e;t=t.reverse();try{for(var r=o(t),s=r.next();!s.done;s=r.next()){var h=s.value;"string"==typeof h&&(h=(h=h.includes("{")||h.endsWith(";")?h:h+";").trim(),i=i.replace("void main(void)",h+"\nvoid main(void)"))}}catch(t){n={error:t}}finally{try{s&&!s.done&&(e=r.return)&&e.call(r)}finally{if(n)throw n.error}}return i}},BY=function(t){return function(i){return i=i.replace("void main(void)",t+"\nvoid main(void)")}},LY=function(t){return function(i){return t=t.endsWith(";")?t:t+";",i.replace(t,"")}},IY=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return function(i){var n,e;t=t.reverse();try{for(var r=o(t),s=r.next();!s.done;s=r.next()){var h=s.value;h=(h=(h=h.includes("{")||h.endsWith(";")?h:h+";").trim()).startsWith("\t")?h:"\t"+h,i=i.replace("void main(void) {\n","void main(void) {\n"+h+"\n")}}catch(t){n={error:t}}finally{try{s&&!s.done&&(e=r.return)&&e.call(r)}finally{if(n)throw n.error}}return i}},OY=function(t){for(var i=[],n=1;n<arguments.length;n++)i[n-1]=arguments[n];return function(n){for(var e=0;e<i.length;e+=1)i[e]=i[e].endsWith(";")?i[e]:i[e]+";",i[e]=i[e].startsWith("\t")?i[e]:"\t"+i[e];var r=i.join("\n"),s=new RegExp("(.*"+t+".*)"),o=n.replace(s,r+"\n$1");return i.forEach((function(i){if(!o.includes(i))throw new Error("ShaderBefore misusage (not found: \n"+i+"\nmatch: \n"+t+"\nresult: \n"+o+"\n)")})),o}},PY=function(t){for(var i=[],n=1;n<arguments.length;n++)i[n-1]=arguments[n];return function(n){for(var e=0;e<i.length;e+=1)i[e]=i[e].endsWith(";")?i[e]:i[e]+";",i[e]=i[e].startsWith("\t")?i[e]:"\t"+i[e];var r=i.join("\n"),s=n.lastIndexOf(t),o=n.substring(s),h=o.indexOf("\n"),u=o.substring(h),a=n.substring(0,s+h)+"\n"+r+u;return i.forEach((function(i){if(!a.includes(i))throw new Error('ShaderAfter misusage (not found: "'+i+'", match: "'+t+'", result: "'+a+'")')})),a}},DY=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return function(i){var n,e;try{for(var r=o(t),s=r.next();!s.done;s=r.next()){var h=s.value;h=(h=(h=h.endsWith(";")?h:h+";").trim()).startsWith("\t")?h:"\t"+h;var u=i.lastIndexOf("}");i=i.substring(0,u-1)+"\n"+h+"\n}"}}catch(t){n={error:t}}finally{try{s&&!s.done&&(e=r.return)&&e.call(r)}finally{if(n)throw n.error}}return i}},_Y=function(t,i){return function(n){var e,r;if(t.includes("uniform")||t.includes("attribute")){var s=t.endsWith(";")?t:t+";";n=CY(s)(n),e=t.split(" ")[2].replace(";","")}else e=t;if(i.includes(" ")){var o=i.endsWith(";")?i:i+";";n=CY(o)(n),r=i.split(" ")[2].replace(";","")}else r=i;return n=DY("\t"+r+" = "+e+";")(n)}},RY=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return function(i){var n,e;t=t.reverse();try{for(var r=o(t),s=r.next();!s.done;s=r.next()){i=s.value+i}}catch(t){n={error:t}}finally{try{s&&!s.done&&(e=r.return)&&e.call(r)}finally{if(n)throw n.error}}return i}},zY="\nfloat roundUnsigned(float number) {\n return floor(number + 0.5);\n}",EY="\nfloat linearStep(float step0, float step1, float step) {\n return clamp((step - step0) / (step1 - step0), 0.0, 1.0);\n}",NY="\n // Denormalize 8-bit color channels to integers in the range 0 to 255.\n ivec4 floatsToBytes(vec4 inputFloats, bool littleEndian) {\n ivec4 bytes = ivec4(inputFloats * 255.0);\n return (\n littleEndian\n ? bytes.abgr\n : bytes\n );\n }\n \n // Break the four bytes down into an array of 32 bits.\n void bytesToBits(const in ivec4 bytes, out bool bits[32]) {\n for (int channelIndex = 0; channelIndex < 4; ++channelIndex) {\n float acc = float(bytes[channelIndex]);\n for (int indexInByte = 7; indexInByte >= 0; --indexInByte) {\n float powerOfTwo = exp2(float(indexInByte));\n bool bit = acc >= powerOfTwo;\n bits[channelIndex * 8 + (7 - indexInByte)] = bit;\n acc = mod(acc, powerOfTwo);\n }\n }\n }\n \n // Compute the exponent of the 32-bit float.\n float getExponent(bool bits[32]) {\n const int startIndex = 1;\n const int bitStringLength = 8;\n const int endBeforeIndex = startIndex + bitStringLength;\n float acc = 0.0;\n int pow2 = bitStringLength - 1;\n for (int bitIndex = startIndex; bitIndex < endBeforeIndex; ++bitIndex) {\n acc += float(bits[bitIndex]) * exp2(float(pow2--));\n }\n return acc;\n }\n \n // Compute the mantissa of the 32-bit float.\n float getMantissa(bool bits[32], bool subnormal) {\n const int startIndex = 9;\n const int bitStringLength = 23;\n const int endBeforeIndex = startIndex + bitStringLength;\n // Leading/implicit/hidden bit convention:\n // If the number is not subnormal (with exponent 0), we add a leading 1 digit.\n float acc = float(!subnormal) * exp2(float(bitStringLength));\n int pow2 = bitStringLength - 1;\n for (int bitIndex = startIndex; bitIndex < endBeforeIndex; ++bitIndex) {\n acc += float(bits[bitIndex]) * exp2(float(pow2--));\n }\n return acc;\n }\n \n // Parse the float from its 32 bits.\n float bitsToFloat(bool bits[32]) {\n float signBit = float(bits[0]) * -2.0 + 1.0;\n float exponent = getExponent(bits);\n bool subnormal = abs(exponent - 0.0) < 0.01;\n float mantissa = getMantissa(bits, subnormal);\n float exponentBias = 127.0;\n return signBit * mantissa * exp2(exponent - exponentBias - 23.0);\n }\n \n // Decode a 32-bit float from the RGBA color channels of a texel.\n float decodeUbyteRGBAEncodedFloat(vec4 rgba, bool littleEndian) {\n ivec4 rgbaBytes = floatsToBytes(rgba, littleEndian);\n bool bits[32];\n bytesToBits(rgbaBytes, bits);\n return bitsToFloat(bits);\n }\n ",VY="\nvec4 pickTexel(sampler2D textureSampler, vec2 iTexel, vec2 textureSize) {\n vec2 halfTexel = 0.5 / textureSize;\n return texture2D(textureSampler, (iTexel * 2.0 + 1.0) * halfTexel);\n}",GY="\n uvec4 pickTexelUnsigned(usampler2D textureSampler, vec2 iTexel, vec2 textureSize) {\n vec2 halfTexel = 0.5 / textureSize;\n return texture2D(textureSampler, (iTexel * 2.0 + 1.0) * halfTexel);\n }",HY=" \nint modulus(int a, int b) {\n return (a)-((a)/(b))*(b);\n}",jY="\n#extension GL_OES_standard_derivatives : enable\nfloat computeScreenSpaceWireframe (vec3 barycentric, float lineWidth) {\n vec3 dist = fwidth(barycentric);\n vec3 smoothed = smoothstep(dist * ((lineWidth * 0.5) - 0.5), dist * ((lineWidth * 0.5) + 0.5), barycentric);\n return 1.0 - min(min(smoothed.x, smoothed.y), smoothed.z);\n}",WY="posAxis",UY="posWorld",YY="normal",XY="rotatedGeo",ZY="colorDiffuse",KY="colorFragment",qY="uRatioPxClip",JY="uRatioNwuWu",QY="uColorTexture",$Y="uMaskTexture",tX="aInstanceGeo",iX="aNormal",nX="Rot",eX="\nuniform vec4 uColor;\nvoid main(void) {\n vec4 "+KY+" = uColor;\n gl_FragColor = "+KY+";\n}\n",rX="\nvarying vec2 vMaskTextureCoord;\nuniform vec4 uColor;\nuniform sampler2D "+$Y+";\nvoid main(void) {\n vec4 color0 = texture2D("+$Y+", vMaskTextureCoord);\n vec4 "+KY+" = vec4(uColor.rgb, color0.r * uColor.a);\n gl_FragColor = "+KY+";\n}\n",sX="\nvarying vec4 vColor;\nvoid main(void) {\n vec4 "+KY+" = vColor;\n gl_FragColor = "+KY+";\n}\n",oX="\nvarying vec2 vMaskTextureCoord;\nvarying vec4 vColor;\nuniform sampler2D "+$Y+";\nvoid main(void) {\n vec4 color0 = texture2D("+$Y+", vMaskTextureCoord);\n vec4 "+KY+" = vec4(vColor.rgb, vColor.a * color0.a);\n gl_FragColor = "+KY+";\n}\n",hX="\nvarying float vLookupValue;\nuniform float uLookupMin;\nuniform float uLookupMax;\nuniform float uLookupTextureHeightPx;\nuniform sampler2D uLookupTexture;\n\n"+zY+"\n\nvoid main(void) {\n float texCoordY = (vLookupValue - uLookupMin) / (uLookupMax - uLookupMin);\n texCoordY = (roundUnsigned(clamp(texCoordY, 0.0, 1.0) * uLookupTextureHeightPx) / uLookupTextureHeightPx) * (1.0 - (1.0 / uLookupTextureHeightPx)) + (0.5 / uLookupTextureHeightPx);\n vec4 "+KY+" = texture2D(uLookupTexture, vec2(0.5, texCoordY));\n gl_FragColor = "+KY+";\n}\n",uX="\nvarying float vLookupValue;\nuniform float uLookupMin;\nuniform float uLookupMax;\nuniform float uLookupTextureHeightPx;\nuniform sampler2D uLookupTexture;\nvarying vec2 vMaskTextureCoord;\nuniform sampler2D "+$Y+";\n\n"+zY+"\n\nvoid main(void) {\n float texCoordY = (vLookupValue - uLookupMin) / (uLookupMax - uLookupMin);\n texCoordY = (roundUnsigned(clamp(texCoordY, 0.0, 1.0) * uLookupTextureHeightPx) / uLookupTextureHeightPx) * (1.0 - (1.0 / uLookupTextureHeightPx)) + (0.5 / uLookupTextureHeightPx);\n vec4 color = texture2D(uLookupTexture, vec2(0.5, texCoordY));\n vec4 color0 = texture2D("+$Y+", vMaskTextureCoord);\n vec4 "+KY+" = vec4(color.rgb, color.a * color0.a);\n gl_FragColor = "+KY+";\n \n}\n",aX="\nvarying vec2 vTextureCoord;\nuniform sampler2D "+QY+";\nuniform vec4 uColor;\nvoid main(void) {\n vec4 "+KY+" = texture2D("+QY+", vTextureCoord);\n if(vTextureCoord.x < 0. || vTextureCoord.x > 1. || vTextureCoord.y < 0. || vTextureCoord.y > 1.){\n "+KY+" = uColor;\n }\n gl_FragColor = "+KY+";\n}\n",fX="\nvarying vec3 vPosWorld;\nvarying vec3 vNormal;\nuniform vec3 uCameraLoc;\nuniform vec3 uLightLoc;\nuniform vec4 uLightColor;\nuniform vec4 uAmbientColor;\nuniform float uShininess;\nuniform float uAmbientReflection;\nuniform float uDiffuseReflection;\nuniform float uSpecularReflection;\nvoid main(void) {\n}\n",cX=function(t,i,n,e,r){return void 0===n&&(n="uLookupMin"),void 0===e&&(e="uLookupMax"),void 0===r&&(r="uLookupTexture"),"\nfloat texCoordY = ("+t+" - "+n+") / ("+e+" - "+n+");\ntexCoordY = (roundUnsigned(clamp(texCoordY, 0.0, 1.0) * uLookupTextureHeightPx) / uLookupTextureHeightPx) * (1.0 - (1.0 / uLookupTextureHeightPx)) + (0.5 / uLookupTextureHeightPx);\nvec4 "+i+" = texture2D("+r+", vec2(0.5, texCoordY));\n"},lX="\nfloat ambientReflection = uAmbientReflection;\nfloat diffuseReflection = uDiffuseReflection;\nfloat specularReflection = uSpecularReflection;\n\nvec3 ambientColor = uAmbientColor.rgb;\nvec3 diffuseColor = "+ZY+".rgb;\nvec3 specularColor = uLightColor.rgb;\n\nvec3 vNormalNormalized = normalize(vNormal);\nvNormalNormalized = (float(gl_FrontFacing) * 2.0 - 1.0) * vNormalNormalized;\nvec3 lightDir = normalize( uLightLoc - vPosWorld );\n\nfloat lambertian = abs(dot(vNormalNormalized, lightDir)); \nfloat specular = 0.0;\nvec3 R = reflect(-lightDir, vNormalNormalized);\nvec3 V = normalize(uCameraLoc - vPosWorld);\n\nfloat specAngle = max(dot(R,V),0.0);\nspecular = pow(specAngle, uShininess);\n\ngl_FragColor = vec4(ambientReflection * ambientColor + diffuseReflection * lambertian * diffuseColor + specularReflection * specular * specularColor, "+ZY+".a);\n",dX="\ngl_FragColor = "+ZY+";\n",vX=new TY([CY("uniform vec4 uColorDiffuse"),DY("vec4 "+ZY+" = uColorDiffuse",lX)]).build(fX),yX=new TY([CY("uniform vec4 uColorDiffuse"),DY("vec4 "+ZY+" = uColorDiffuse",dX)]).build(fX),SX=new TY([CY("varying vec4 vColor"),DY("vec4 "+ZY+" = vColor",lX)]).build(fX),mX=new TY([CY("varying vec4 vColor"),DY("vec4 "+ZY+" = vColor",dX)]).build(fX),bX=new TY([CY("uniform float uLookupMin"),CY("uniform float uLookupMax"),CY("uniform float uLookupTextureHeightPx;"),CY("uniform sampler2D uLookupTexture"),CY("varying float vLookupValue"),CY(zY),DY(cX("vLookupValue","colorPalette")),DY("vec4 "+ZY+" = colorPalette"),DY(lX)]).build(fX),gX=new TY([CY("uniform float uLookupMin"),CY("uniform float uLookupMax"),CY("uniform sampler2D uLookupTexture"),CY("uniform float uLookupTextureHeightPx;"),CY("varying float vLookupValue"),CY(zY),DY(cX("vLookupValue","colorPalette")),DY("vec4 "+ZY+" = colorPalette"),DY(dX)]).build(fX),wX={Basic:eX,BasicTextureMask:rX,PointColor:sX,PointColorTextureMask:oX,Paletted:hX,PalettedTextureMask:uX,Phong3D:vX,Simple3D:yX,Paletted3D:bX,SimplePaletted3D:gX,PointColor3D:SX,SimplePointColor3D:mX,Textured2D:aX},pX={Basic:"\nattribute vec2 aPos;\nuniform vec2 uScale;\nuniform vec2 uDisp;\nvoid main(void) {\n gl_Position = vec4( ( aPos - uDisp ) / uScale, 0.0, 1.0 );\n}\n",BasicOffsetted:"\nattribute vec2 aPos;\nuniform vec2 uScale;\nuniform vec2 uDisp;\nuniform vec2 uOffset;\nvoid main(void) {\n gl_Position = vec4( ( (aPos + uOffset) - uDisp ) / uScale, 0.0, 1.0 );\n}\n",BasicInstanced:"\nattribute vec2 aPos;\nattribute vec2 aRot;\nattribute vec2 aGeo;\nattribute float aSize;\nuniform vec2 uScale;\nuniform vec2 uRatioPxClip;\nuniform vec2 uDisp;\nvoid main(void) {\n vec2 rotatedGeo = vec2(\n aGeo.x * aRot.y + aGeo.y * aRot.x,\n aGeo.y * aRot.y - aGeo.x * aRot.x\n );\n vec2 scaled = (rotatedGeo * aSize * uRatioPxClip);\n gl_Position = vec4( (aPos - uDisp ) / uScale + scaled, 0.0, 1.0 );\n}\n",PointSize:"\nattribute vec2 aPos;\nuniform vec2 uScale;\nuniform vec2 uDisp;\nuniform float uPointSize;\nvoid main(void) {\n gl_Position = vec4( ( aPos - uDisp ) / uScale, 0.0, 1.0 );\n gl_PointSize = uPointSize;\n}\n",Texture:"\nattribute vec2 aPos;\nattribute vec2 aMaskTextureCoord;\nuniform vec2 uScale;\nuniform vec2 uDisp;\nvarying vec2 vMaskTextureCoord;\nvoid main(void) {\n gl_Position = vec4( ( aPos - uDisp ) / uScale, 0.0, 1.0 );\n vMaskTextureCoord = aMaskTextureCoord;\n}\n",PointSizePointColor:"\nattribute vec2 aPos;\nattribute vec4 aColor;\nuniform vec2 uScale;\nuniform vec2 uDisp;\nuniform float uPointSize;\nvarying vec4 vColor;\nvoid main(void) {\n gl_Position = vec4( ( aPos - uDisp ) / uScale, 0.0, 1.0 );\n gl_PointSize = uPointSize;\n vColor = aColor;\n}\n",PointColor:"\nattribute vec2 aPos;\nattribute vec4 aColor;\nuniform vec2 uScale;\nuniform vec2 uDisp;\nvarying vec4 vColor;\nvoid main(void) {\n gl_Position = vec4( ( aPos - uDisp ) / uScale, 0.0, 1.0 );\n vColor = aColor;\n}\n",PointColorOffsetted:"\nattribute vec2 aPos;\nattribute vec4 aColor;\nuniform vec2 uScale;\nuniform vec2 uDisp;\nuniform vec2 uOffset;\nvarying vec4 vColor;\nvoid main(void) {\n gl_Position = vec4( ( (aPos + uOffset) - uDisp ) / uScale, 0.0, 1.0 );\n vColor = aColor;\n}\n",PointColorInstanced:"\nattribute vec2 aPos;\nattribute vec2 aRot;\nattribute vec2 aGeo;\nattribute vec4 aColor;\nattribute float aSize;\nuniform vec2 uScale;\nuniform vec2 uRatioPxClip;\nuniform vec2 uDisp;\nvarying vec4 vColor;\nvoid main(void) {\n vec2 rotatedGeo = vec2(\n aGeo.x * aRot.y + aGeo.y * aRot.x,\n aGeo.y * aRot.y - aGeo.x * aRot.x\n );\n vec2 scaled = (rotatedGeo * aSize * uRatioPxClip);\n gl_Position = vec4( ( aPos - uDisp ) / uScale + scaled, 0.0, 1.0 );\n vColor = aColor;\n}\n",Paletted:"\nattribute vec2 aPos;\nattribute float aIntensity;\nuniform vec2 uScale;\nuniform vec2 uDisp;\nvarying float vLookupValue;\nvoid main(void) {\n gl_Position = vec4( ( aPos - uDisp ) / uScale, 0.0, 1.0 );\n vLookupValue = aIntensity;\n}\n",PalettedOffsetted:"\nattribute vec2 aPos;\nattribute float aIntensity;\nuniform vec2 uScale;\nuniform vec2 uDisp;\nuniform vec2 uOffset;\nvarying float vLookupValue;\nvoid main(void) {\n gl_Position = vec4( ( (aPos + uOffset) - uDisp ) / uScale, 0.0, 1.0 );\n vLookupValue = aIntensity;\n}\n"},kX=function(){function t(t,i,n,e){if(this.id=t,this.shader=n,this.gl=e,!i||!n)throw new Sr("Could not find "+this.aL()+" shader source code.");if(this.gl.shaderSource(n,i),this.gl.compileShader(n),!this.gl.getShaderParameter(n,this.gl.COMPILE_STATUS)){var r=this.gl.getShaderInfoLog(n);try{var s=Number(r.match(/ERROR:\s?\d:(\d*)/)[1]);r+="...\n"+i.split("\n").filter((function(t,i){return Math.abs(s-i)<=1})).join("\n")+"\n..."}catch(t){}throw new Sr("Could not create "+this.aL()+" shader: \n\n "+r)}}return t.prototype.aL=function(){return this.id.toString()+" "+(this.gl.getShaderParameter(this.shader,this.gl.SHADER_TYPE)===this.gl.FRAGMENT_SHADER?"fragment":"vertex")},t}(),xX=function(t){function i(i,n,e){return t.call(this,i,n,e.createShader(e.VERTEX_SHADER),e)||this}return n(i,t),i}(kX),MX=function(t){function i(i,n,e){return t.call(this,i,n,e.createShader(e.FRAGMENT_SHADER),e)||this}return n(i,t),i}(kX),AX=function(){function t(t,i,n,e){if(void 0===e&&(e=n.createProgram()),this.MB=n,this.fL=e,this.cL=new Map,this.lL=new Map,this.dL=t.aL(),this.vL=i.aL(),n.attachShader(e,t.shader),n.attachShader(e,i.shader),n.bindAttribLocation(e,0,"aPos"),n.linkProgram(e),!n.getProgramParameter(e,n.LINK_STATUS))throw new Sr("Could not compile WebGL program. \n\n"+n.getProgramInfoLog(e));n.deleteShader(t.shader),n.deleteShader(i.shader)}return t.prototype.yL=function(t){var i=this.SL(t);if(void 0===i)throw new Sr("Could not get "+t+" uniform from "+this.dL+" and "+this.vL+" shaders.");return i},t.prototype.SL=function(t){var i=this.cL.get(t);if(i)return i;var n=this.MB.getUniformLocation(this.fL,t);return n?(this.cL.set(t,n),n):void 0},t.prototype.mL=function(t){var i=this.bL(t);if(void 0===i)throw new Sr("Could not get "+t+" attribute from "+this.dL+" and "+this.vL+" shaders.");return i},t.prototype.bL=function(t){var i=this.lL.get(t);if(i||0===i)return i;var n=this.MB.getAttribLocation(this.fL,t);return n||0===n?(this.lL.set(t,n),n):void 0},t.prototype.ro=function(){this.MB.deleteProgram(this.fL)},t}(),FX=function(t,i,n){return void 0===n&&(n=void 0),function(){t.gL=i,n&&n()}},TX=function(){function t(t,i){var n=this;if(this.So=!1,this.wL=0,this.pL=0,this.kL=!1,this.gL=!1,this.xL=!1,this.ML=!1,this.AL=!1,this.FL=new Set,this.TL=new Set,this.CL=i,this.MB=t,this.BL=null,this.kL=i instanceof wr.HTMLVideoElement,this.CL instanceof wr.HTMLImageElement)this.CL.addEventListener("load",(function(){n.ML=!0,n.LL()})),this.CL.addEventListener("error",(function(){n.AL=!0})),this.CL.complete&&(this.ML=!0,this.LL());else if(this.CL instanceof wr.HTMLVideoElement){var e=this;this.CL.addEventListener("canplay",(function(){e.pL=this.videoHeight,e.wL=this.videoWidth,e.ML=!0,e.LL()}),!0),this.CL.addEventListener("play",FX(this,!0,(function(){return n.LL()}))),this.CL.addEventListener("playing",FX(this,!0,(function(){return n.LL()}))),this.CL.addEventListener("pause",FX(this,!1)),this.CL.addEventListener("ended",FX(this,!1)),this.CL.readyState>=1&&(this.wL=this.CL.videoWidth,this.pL=this.CL.videoHeight,this.gL=!this.CL.paused,this.ML=!0,this.LL())}else this.ML=!0,this.LL()}return t.prototype.rL=function(t){this.TL.add(t)},t.prototype.sL=function(t){this.TL.delete(t),0===this.TL.size&&this.dispose()},t.prototype.IL=function(t){this.FL.add(t),this.xL&&(t(),this.OL(t))},t.prototype.OL=function(t){this.FL.delete(t)},t.prototype.LL=function(){var t=this;if(!(this.So||this.AL||this.xL)&&this.ML){var i=this.MB.gl;if(!this.BL&&this.CL){this.BL=i.createTexture(),i.bindTexture(i.TEXTURE_2D,this.BL),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1);var n=i.RGBA,e=i.RGBA,r=i.UNSIGNED_BYTE,s=this.CL,o=this.wL>0?this.wL:s.width,h=this.pL>0?this.pL:s.height;i.texImage2D(i.TEXTURE_2D,0,n,e,r,s),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),this.wL=o,this.pL=h,i.bindTexture(i.TEXTURE_2D,null)}this.xL=!0,this.FL&&this.FL.forEach((function(i){i(),t.OL(i)}))}},t.prototype.Fe=function(){var t=this.MB.gl;if(!this.AL&&this.xL&&this.BL&&!this.So){var i=t.RGBA,n=t.RGBA,e=t.UNSIGNED_BYTE,r=this.CL;r&&(t.bindTexture(t.TEXTURE_2D,this.BL),t.texImage2D(t.TEXTURE_2D,0,i,n,e,r))}},t.prototype.PL=function(){return this.BL},t.prototype.restore=function(){return this.So&&(this.So=!1,this.LL()),this},t.prototype.dispose=function(){return this.So||(this.BL&&(this.MB.KB(this.BL),this.BL=null),this.TL.clear(),this.So=!0,this.xL=!1),this},t.prototype.isDisposed=function(){return this.So},t}(),CX=function(){function t(t,i,n){var e,r,s=this;void 0===n&&(n=!0),this.ps=t,this.hL=function(){var t=wr.document.createElement("canvas"),i=t.getContext("2d");if(!i)throw new yr("Failed to get Text canvas rendering context");return i.fillStyle="#fff",function(n,e,r){var s=e.style+" "+e.weight+" "+e.size*r+"px "+e.family;i.font=s,i.textBaseline="alphabetic",i.textAlign="left";var o=i.measureText(n);if(0!==o.width){var h=void 0!==o.actualBoundingBoxLeft&&void 0!==o.actualBoundingBoxRight?Math.ceil(o.actualBoundingBoxLeft+o.actualBoundingBoxRight):Math.ceil(o.width),u=o.width,a=Math.round(e.size*r),f=void 0!==o.actualBoundingBoxLeft?o.actualBoundingBoxLeft:0;t.width=h>0?h:u,t.height=2*a,i.font=s,i.textBaseline="alphabetic",i.textAlign="left",i.clearRect(0,0,t.width,t.height),i.fillStyle="#fff",i.fillText(n,f,a);for(var c=i.getImageData(0,0,t.width,t.height),d=0,v=0,y=c.width,S=0;S<c.height;S+=1){for(var m=0;m<y;m+=1)if(0!==c.data[S*y*4+4*m+0]){d=S;break}if(0!==d)break}for(S=c.height-1;S>=0;S-=1){for(m=0;m<y;m+=1)if(0!==c.data[S*y*4+4*m+0]){v=S;break}if(0!==v)break}var b=i.canvas.height/2-d,g=v-d+1,w=y,p=new Uint8ClampedArray(w*g*1);for(S=0;S<g;S+=1)for(m=0;m<w;m+=1)p[1*S*w+1*m+0]=c.data[(S+d)*w*4+4*m+3];return[p,{advance:u,offsetX:f,baseline:b,glyph:n,size:l(w,g)}]}}}(),this.DL=0,this._L=new cY,this.RL=new Map,this.zL=new Map,this.EL=[],this.NL=1,this.IS_MACHINE_LITTLE_ENDIAN=(e=new Uint32Array([287454020]),68===(r=new Uint8Array(e.buffer))[0]||17!==r[0]&&(wr.console.error("Unidentified machine endianness. Some features might behave unexpectedly."),!0)),this.AS=!1,this.VL=function(t,i){var n=h(i,2),e=n[0],r=n[1];return void 0===t||s.gl.uniform2f(t,e,r),s},this.GL=function(t,i){var n=h(i,2),e=n[0],r=n[1];return void 0===t||s.gl.uniform2i(t,e,r),s},this.HL=function(t,i){var n=h(i,4),e=n[0],r=n[1],o=n[2],u=n[3];return void 0===t||s.gl.uniform4f(t,e,r,o,u),s},this.jL=function(t,i){var n=h(i,3),e=n[0],r=n[1],o=n[2];return void 0===t||s.gl.uniform3f(t,e,r,o),s},this.WL=function(t,i){return void 0===t||s.gl.uniformMatrix3fv(t,!1,i),s},this.UL=function(t,i){return void 0===t||s.gl.uniformMatrix4fv(t,!1,i),s},this.YL=function(t,i){return void 0===t||s.gl.uniform4f(t,i.r,i.g,i.b,i.a),s},this.XL=function(t,i){return void 0===t||s.gl.uniform1f(t,i),s},this.ZL=function(t,i){return s.gl.uniform1i(t,i),s},this.KL=function(t,i,n){if(void 0===t)return s;if(i){var e=s.gl.TEXTURE0+n;return s.gl.activeTexture(e),s.gl.bindTexture(s.gl.TEXTURE_2D,i),s.gl.uniform1i(t,n),s}throw new yr("Could not bind a texture.")},this.qL=function(t,i){void 0===i&&(i=!1);var n=s.gl.createBuffer();if(s.gl.bindBuffer(s.gl.ARRAY_BUFFER,n),s.gl.bufferData(s.gl.ARRAY_BUFFER,t instanceof Float32Array?t:new Float32Array(t),i?s.gl.DYNAMIC_DRAW:s.gl.STATIC_DRAW),s.gl.bindBuffer(s.gl.ARRAY_BUFFER,null),n)return n;throw new yr("Could not create vertex buffer")},this.JL=function(t,i,n){var e=n||s.gl.createBuffer();if(s.gl.bindBuffer(s.gl.ARRAY_BUFFER,e),s.gl.bufferData(s.gl.ARRAY_BUFFER,new Float32Array(t),s.gl.STATIC_DRAW),i&&s.gl.bufferSubData(s.gl.ARRAY_BUFFER,0,i instanceof Float32Array?i:new Float32Array(i)),s.gl.bindBuffer(s.gl.ARRAY_BUFFER,null),e)return e;throw new yr("Could not create vertex buffer")},this.QL=function(t,i,n){s.gl.bindBuffer(s.gl.ARRAY_BUFFER,t),s.gl.bufferSubData(s.gl.ARRAY_BUFFER,i*Float32Array.BYTES_PER_ELEMENT,n instanceof Float32Array?n:new Float32Array(n)),s.gl.bindBuffer(s.gl.ARRAY_BUFFER,null)},this.$L=function(t,i,n){void 0===n&&(n=!1),s.gl.bindBuffer(s.gl.ARRAY_BUFFER,t),s.gl.bufferData(s.gl.ARRAY_BUFFER,i,n?s.gl.DYNAMIC_DRAW:s.gl.STATIC_DRAW),s.gl.bindBuffer(s.gl.ARRAY_BUFFER,null)},this.tI=function(t){var i=s.gl.createBuffer();if(s.gl.bindBuffer(s.gl.ELEMENT_ARRAY_BUFFER,i),s.gl.bufferData(s.gl.ELEMENT_ARRAY_BUFFER,t,s.gl.STATIC_DRAW),s.gl.bindBuffer(s.gl.ARRAY_BUFFER,null),i)return i;throw new yr("Could not create vertex buffer")},this.iI=function(t){var i=s.gl.createBuffer();if(s.gl.bindBuffer(s.gl.ARRAY_BUFFER,i),s.gl.bufferData(s.gl.ARRAY_BUFFER,t instanceof Float32Array?t:new Float32Array(t),s.gl.STATIC_DRAW),s.gl.bindBuffer(s.gl.ARRAY_BUFFER,null),i)return i;throw new yr("Could not create float buffer")},this.nI=function(t,i){return void 0===t||(s.gl.bindBuffer(s.gl.ARRAY_BUFFER,i),s.gl.enableVertexAttribArray(t),s.gl.vertexAttribPointer(t,2,s.gl.FLOAT,!1,0,0)),s},this.eI=function(t,i){return void 0===t||(s.gl.bindBuffer(s.gl.ARRAY_BUFFER,i),s.gl.vertexAttribPointer(t,3,s.gl.FLOAT,!1,0,0),s.gl.enableVertexAttribArray(t)),s},this.rI=function(t,i){for(var n=[],e=2;e<arguments.length;e++)n[e-2]=arguments[e];s.gl.bindBuffer(s.gl.ARRAY_BUFFER,t);for(var r=n.length,o=0,h=0;h<r;h+=1)o+=n[h].size;for(h=0;h<r;h+=1){var u=n[h].location;void 0!==u&&u>-1&&s.gl.enableVertexAttribArray(u)}var a=0;for(h=0;h<r;h+=1){var f=n[h];void 0!==f.location&&f.location>-1&&s.gl.vertexAttribPointer(f.location,f.size,s.gl.FLOAT,!1,o*Float32Array.BYTES_PER_ELEMENT,a*Float32Array.BYTES_PER_ELEMENT),a+=f.size}if(void 0!==i)for(h=0;h<r;h+=1){var c=n[h].location;void 0!==c&&c>-1&&s.sI(c,i)}return s},this.oI=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];for(var n=t.length,e=0;e<n;e+=1){var r=t[e];0!==r&&r>-1&&s.gl.disableVertexAttribArray(r)}return s},this.hI=function(t,i){return void 0===t||(s.gl.bindBuffer(s.gl.ARRAY_BUFFER,i),s.gl.enableVertexAttribArray(t),s.gl.vertexAttribPointer(t,4,s.gl.FLOAT,!1,0,0)),s},this.uI=function(t,i){return void 0===t||(s.gl.bindBuffer(s.gl.ARRAY_BUFFER,i),s.gl.vertexAttribPointer(t,1,s.gl.FLOAT,!1,0,0),s.gl.enableVertexAttribArray(t)),s},this.aI=function(t){return s.gl.bindBuffer(s.gl.ELEMENT_ARRAY_BUFFER,t),s},this.Ky=function(t,i,n){return void 0===n&&(n=0),i>0&&s.gl.drawArrays(t,n,i),s},this.fI=function(t,i,n,e){return void 0===i&&(i=s.gl.TRIANGLES),void 0===n&&(n=0),void 0===e&&(e=s.gl.UNSIGNED_SHORT),t>0&&s.gl.drawElements(i,t,e,n),s},this.cI=function(t,i,n,e){if(e>0&&(s.gl2&&s.gl2.ctx.drawArraysInstanced(t,i,n,e),s.gl1)){if(!s.gl1.lI.ANGLE_instanced_arrays)return wr.console.warn("The browser does not support REQUIRED WebGL 1 extension: ANGLE_instanced_arrays.\nThis application will NOT work properly!"),s;s.gl1.lI.ANGLE_instanced_arrays.drawArraysInstancedANGLE(t,i,n,e)}return s},this.dI=function(t,i,n,e,r){if(void 0===r&&(r=s.gl.UNSIGNED_SHORT),e>0&&(s.gl2&&s.gl2.ctx.drawElementsInstanced(t,i,r,n,e),s.gl1)){if(!s.gl1.lI.ANGLE_instanced_arrays)return wr.console.warn("The browser does not support REQUIRED WebGL 1 extension: ANGLE_instanced_arrays.\nThis application will NOT work properly!"),s;s.gl1.lI.ANGLE_instanced_arrays.drawElementsInstancedANGLE(t,i,r,n,e)}return s},this.sI=function(t,i){if(t>-1&&(s.gl2&&s.gl2.ctx.vertexAttribDivisor(t,i),s.gl1)){if(!s.gl1.lI.ANGLE_instanced_arrays)return wr.console.warn("The browser does not support REQUIRED WebGL 1 extension: ANGLE_instanced_arrays.\nThis application will NOT work properly!"),s;s.gl1.lI.ANGLE_instanced_arrays.vertexAttribDivisorANGLE(t,i)}return s},this.vI=function(t,i,n,e){void 0===e&&(e=0);var r=s.gl.TEXTURE0+e;s.gl.activeTexture(r),s.gl.bindFramebuffer(s.gl.FRAMEBUFFER,i),s.gl.bindTexture(s.gl.TEXTURE_2D,n),s.gl.framebufferTexture2D(s.gl.FRAMEBUFFER,s.gl.COLOR_ATTACHMENT0,s.gl.TEXTURE_2D,n,0);var o=s.yI();o&&s.SI(!1),t(),o&&s.SI(!0),s.gl.bindTexture(s.gl.TEXTURE_2D,null),s.gl.bindFramebuffer(s.gl.FRAMEBUFFER,null)},this.mI=function(t,i,n){var e=wr.document.createElement("canvas").getContext("2d").createImageData(n.x,n.y),r=e.data;return s.gl.readPixels(t,i,n.x,n.y,s.gl.RGBA,s.gl.UNSIGNED_BYTE,r),e},this.$h=function(){return s.gl.clear(s.gl.COLOR_BUFFER_BIT),s.gl.clear(s.gl.DEPTH_BUFFER_BIT),s},this.bI=function(t){return s.gl.clearColor(t.r,t.g,t.b,t.a),s},this.gI=function(t,i,n,e){return s.gl.viewport(t,i,n,e),s},this.rL=function(t){return s.gl.useProgram(t.fL),s},this.wI=!1,this.gl=i.ctx,this.pI=i.antialias,this.kI=i.lineAntialias,n&&(this.gl.enable(this.gl.BLEND),this.xI());var o=[];if(this.lI={WEBGL_lose_context:this.gl.getExtension("WEBGL_lose_context")},Object.keys(this.lI).forEach((function(t){null===s.lI[t]&&o.push(t)})),"webgl2"===i.type)this.gl2={ctx:i.ctx},this.MI=!0;else{var a={ANGLE_instanced_arrays:this.gl.getExtension("ANGLE_instanced_arrays"),EXT_blend_minmax:this.gl.getExtension("EXT_blend_minmax"),OES_element_index_uint:this.gl.getExtension("OES_element_index_uint"),OES_standard_derivatives:this.gl.getExtension("OES_standard_derivatives"),OES_vertex_array_object:this.gl.getExtension("OES_vertex_array_object")};a.OES_standard_derivatives||(this.kI=!1),Object.keys(a).forEach((function(t){null===a[t]&&o.push(t)}));var f={OES_texture_float:this.gl.getExtension("OES_texture_float")};this.MI=!!f.OES_texture_float,this.gl1={ctx:i.ctx,lI:a,optional:f}}this.EL=o,this.XB=this.gl.getParameter(this.gl.MAX_TEXTURE_SIZE),this.$B=this.AI();var c,d,v,y,S,m,b,g=(d=(c=this).gl,v=new Map,y=new Map,S=new Map,m={totalMs:0,vertexShaders:0,fragmentShaders:0,programs:0},b=function(t,i,n){void 0===n&&(n=[]);var e=[],r=[];if(c.gl1){var s=t.match(/#extension.*/g);s&&r.push.apply(r,u([],h(s))),t=t.replace(/#extension.*/g,"")}else if(e.push("#version 300 es"),(t=(t=(t=t.replace(/#extension.*/g,"")).replace(/attribute/g,"in")).replace(/texture2D/g,"texture")).includes("usampler2D")&&e.push("precision highp usampler2D;"),"vertex"===i)t=t.replace(/varying/g,"out");else{t=t.replace(/varying/g,"in");var o=n.find((function(t){return"fragOutput"===t.type}));t=(t=o?"out "+o.fragOutput+" fragOutput;\n"+t:"out vec4 fragOutput;\n"+t).replace(/gl_FragColor/g,"fragOutput")}return r&&e.push.apply(e,u([],h(r))),e.push("precision highp float;"),e.push("precision highp int;"),e.join("\n")+"\n"+t},{FI:function(t,i){var n=wr.performance.now(),e=t.toString()+i.toString(),r=S.get(e);if(r)return r;var s=v.get(t);s||(o=b(o=pX[t],"vertex"),s=new xX(t,o,d),v.set(t,s),m.vertexShaders+=1);var o,h=y.get(i);h||(o=b(o=wX[i],"vertex"),h=new MX(i,o,d),y.set(i,h),m.fragmentShaders+=1);var u=new AX(s,h,d);return S.set(e,u),m.programs+=1,m.totalMs+=wr.performance.now()-n,u},TI:function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var n,e,r,s=c.gl2?"webgl2":"webgl1";try{var o=wr.performance.now();n=t.filter((function(t){return!1!==t&&void 0!==t})),e=pY(n);var h=S.get(e.programID);if(h)return h;r=kY(n,e,s);var u=e.vertexShaderID,a=v.get(u);if(!a){var f=new TY(r.vertexShader.modifiers).build(AY[r.vertexShader.template]);f=b(f,"vertex"),a=new xX(u,f,d),v.set(u,a),m.vertexShaders+=1}var l=r.fragmentShader,g=void 0;if("string"==typeof l){var w=l;(g=y.get(w))||(f=b(f=wX[w],"fragment"),g=new MX(w,f,d),y.set(w,g),m.fragmentShaders+=1)}else if(w=l.id,!(g=y.get(w))){var p=FY[l.template]||wX[l.template];f=new TY(l.modifiers).build(p),f=b(f,"fragment",r.hints),g=new MX(w,f,d),y.set(w,g),m.fragmentShaders+=1}var k=new AX(a,g,d);return S.set(e.programID,k),m.programs+=1,m.totalMs+=wr.performance.now()-o,k}catch(t){throw Bs(0,(function(){var t="Unexpected rendering error. Please contact LightningChart JS support.";wr.console.error(t),wr.alert(t)})),new Error}}});this.CI=g.FI,this.FI=g.TI,this.BI=dY(this.gl),this.LI=new IX(this)}return t.prototype.II=function(t){return t!==this.OI&&(this.OI=t,"disabled"===t?this.gl.disable(this.gl.CULL_FACE):"cull-back"===t?(this.gl.enable(this.gl.CULL_FACE),this.gl.cullFace(this.gl.BACK)):"cull-front"===t&&(this.gl.enable(this.gl.CULL_FACE),this.gl.cullFace(this.gl.FRONT))),this},t.prototype.TS=function(t){return t!==this.AS&&(this.AS=t,t?this.gl.enable(this.gl.DEPTH_TEST):this.gl.disable(this.gl.DEPTH_TEST)),this},t.prototype.DI=function(t){return this.NL=t,this},t.prototype.uL=function(){return this.NL},t.prototype._I=function(t,i,n,e,r,s,o){void 0===i&&(i=this.gl.RGBA),void 0===n&&(n=!1),void 0===s&&(s=this.gl.UNSIGNED_BYTE),void 0===o&&(o=i);var h=this.gl.createTexture();if(!h)throw new yr("Couldn't reserve Texture.");return this.gl.bindTexture(this.gl.TEXTURE_2D,h),this.gl.pixelStorei(this.gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),t&&null===r?this.gl.texImage2D(this.gl.TEXTURE_2D,0,o,i,s,t):r&&this.gl.texImage2D(this.gl.TEXTURE_2D,0,o,r.x,r.y,0,i,s,t),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,this.gl.CLAMP_TO_EDGE),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,this.gl.CLAMP_TO_EDGE),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MAG_FILTER,e?this.gl.NEAREST:this.gl.LINEAR),n?(this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MIN_FILTER,this.gl.LINEAR_MIPMAP_LINEAR),this.gl.generateMipmap(this.gl.TEXTURE_2D)):this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MIN_FILTER,e?this.gl.NEAREST:this.gl.LINEAR),this.gl.bindTexture(this.gl.TEXTURE_2D,null),h},t.prototype.KB=function(t){this.gl.deleteTexture(t)},t.prototype.RI=function(){var t=this.gl.createFramebuffer();if(!t)throw new yr("Couldn't reserve Framebuffer.");return t},t.prototype.zI=function(t){this.gl.deleteFramebuffer(t)},t.prototype.EI=function(t,i,n,e){return this.SI(!0),this.gl.scissor(Math.max(t,0),Math.max(i,0),Math.max(n,0),Math.max(e,0)),this},t.prototype.SI=function(t){return t?this.gl.enable(this.gl.SCISSOR_TEST):this.gl.disable(this.gl.SCISSOR_TEST),this.wI=t,this},t.prototype.xI=function(t,i,n,e){return t?(void 0!==t&&void 0!==i&&(void 0!==n&&void 0!==e?this.gl.blendFuncSeparate(t,i,n,e):this.gl.blendFunc(t,i)),this):(this.gl.blendFuncSeparate(this.gl.SRC_ALPHA,this.gl.ONE_MINUS_SRC_ALPHA,this.gl.ONE,this.gl.ONE_MINUS_SRC_ALPHA),this)},t.prototype.yI=function(){return this.wI},t.prototype.NI=function(t,i){var n=new OX(this,t);i(n.uniform,n.attribute,n,n.uniformOptional),n.finish()},t.prototype.VI=function(t){this.gl.deleteBuffer(t)},t.prototype.GI=function(t,i,n){this.VL(t.yL("uCenter"),i.center).VL(t.yL("uDistance"),i.distance).HL(t.yL("uBounds"),i.bounds).XL(t.yL("uAspect"),i.aspectRatio);var e=n.getColorStops();if(e.length<2)throw new Error("Minimum two color stops required");for(var r=0;r<e.length;r+=1)this.YL(t.yL("color_"+r),e[r].color).XL(t.yL("stop_"+r),e[r].offset);return this},t.prototype.HI=function(t,i,n){this.VL(t.yL("uStartPoint"),i.startPoint).VL(t.yL("uEndPoint"),i.endPoint).HL(t.yL("uBounds"),i.bounds);var e=n.getColorStops();if(e.length<2)throw new Error("Minimum two color stops required");for(var r=0;r<e.length;r+=1)this.YL(t.yL("color_"+r),e[r].color).XL(t.yL("stop_"+r),e[r].offset);return this},t.prototype.te=function(t){var i=this.RL.get(t);if(!i){var n=new wY(this);return this.RL.set(t,n),n}return i},t.prototype.jI=function(t){var i=this.zL.get(t);if(!i){var n=new TX(this,t);return this.WI(t,n),n}return i.restore(),i},t.prototype.WI=function(t,i){this.zL.set(t,i)},t.prototype.AI=function(){var t=this.gl,i=t.createTexture();t.bindTexture(t.TEXTURE_2D,i),t.texImage2D(t.TEXTURE_2D,0,t.ALPHA,1,1,0,t.ALPHA,t.UNSIGNED_BYTE,new Uint8ClampedArray([0]));var n=0===t.getError();return n||console.info("LightningChart JS - Uint8ClampedArray is not supported as texture data. The above WebGL error/warning is from the feature detection. There is nothing to worry about."),t.deleteTexture(i),n},t.prototype.UI=function(t,i,n,e){if(n)this.rI(i,e,{location:t.attribute("aPos_highpart"),size:2},{location:t.attribute("aPos_lowpart"),size:2});else{var r=t.attribute("aPos");this.nI(r,i),void 0!==e&&this.sI(r,e)}return this},t.prototype.YI=function(){this.lI.WEBGL_lose_context&&this.lI.WEBGL_lose_context.loseContext()},t.prototype.XI=function(t){if(this.ZI&&this.ZI.bufferIdsCount>=t)return this.ZI.buffer;this.ZI&&(this.VI(this.ZI.buffer),this.ZI=void 0);for(var i=t,n=new Float32Array(i),e=0;e<i;e+=1)n[e]=e;var r=this.qL(n);return this.ZI={buffer:r,bufferIdsCount:i},r},t.prototype.KI=function(){return this.gl2?void 0:"attribute"},t.prototype.qI=function(t,i){if("attribute"===this.KI()){var n=this.XI(i);this.rI(n,void 0,{location:t.attribute("aVertexID"),size:1})}return this},t.prototype.JI=function(){return this.gl2?void 0:"attribute"},t.prototype.QI=function(t,i){if("attribute"===this.JI()){var n=this.XI(i);this.rI(n,1,{location:t.attribute("aInstanceID"),size:1})}return this},t}(),BX=function(){function t(){}return t.prototype.$I=function(t){if(t instanceof Vo||t instanceof tj){var i=t.Oi();this.tO=i.x.scaling,this.iO=-i.x.displacement,this.nO=i.y.scaling,this.eO=-i.y.displacement,this.rO=i.x.highPrecisionOffset,this.sO=i.x.highPrecisionOffset-Math.fround(i.x.highPrecisionOffset),this.oO=i.y.highPrecisionOffset,this.hO=i.y.highPrecisionOffset-Math.fround(i.y.highPrecisionOffset)}else t instanceof Go&&(this.MixedScaleXY=t.Oi());return this},t.prototype.uO=function(){return[this.iO,this.eO]},t.prototype.aO=function(){return[this.tO,this.nO]},t.prototype.fO=function(){return[this.rO,this.oO]},t.prototype.cO=function(){return[this.sO,this.hO]},t}(),LX=function(){function t(){this.tO=0,this.nO=0,this.lO=0,this.iO=0,this.eO=0,this.dO=0}return t.prototype.vO=function(t){return this.tO=t.pS(),this.iO=t.getInnerStart()+.5*this.tO*t.Em(),this},t.prototype.yO=function(t){return this.nO=t.pS(),this.eO=t.getInnerStart()+.5*this.nO*t.Em(),this},t.prototype.SO=function(t){return this.lO=t.pS(),this.dO=t.getInnerStart()+.5*this.lO*t.Em(),this},t.prototype.aO=function(){return[this.tO,this.nO,this.lO]},t.prototype.uO=function(){return[this.iO,this.eO,this.dO]},t.prototype.mO=function(t,i,n,e,r){var s=l(2*(t-n.x)/(n.width-n.x)-1,2*(i-n.y)/(n.height-n.y)-1),o=aY.multiply(e,[s.x,s.y,r,1]);return y(o[0],o[1],o[2])},t}(),IX=function(){function t(t){this.yB=t}return t.prototype.vB=function(t,i,n,e,r,s,o){void 0===o&&(o=0);var h=this.yB,u=h.gl,a=void 0===e;if(!(e=e||h.RI()))throw new yr("Could not bind a framebuffer.");h.vI((function(){h.gI(0,0,n.x,n.y),u.disable(u.BLEND),t(),u.enable(u.BLEND)}),e,i,o),a&&h.zI(e),this.yB.gI(0,0,r.x*this.yB.uL(),r.y*this.yB.uL()).bI(s)},t}(),OX=function(){function t(t,i){var n=this;this.glUtils=t,this.shader=i,this.bO=[],this.uniform=function(t){return n.shader.yL(t)},this.uniformOptional=function(t){return n.shader.SL(t)},this.attribute=function(t){var i=n.shader.mL(t);return n.bO.push(i),i}}return t.prototype.finish=function(){var t,i;try{for(var n=o(this.bO),e=n.next();!e.done;e=n.next()){var r=e.value;this.glUtils.oI(r),this.glUtils.sI(r,0)}}catch(i){t={error:i}}finally{try{e&&!e.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}},t}(),PX=function(t){return void 0!==t.find((function(t){return t.idVertex&&t.idVertex.includes("3D")}))},DX=function(t){return void 0!==t.find((function(t){var i;return null===(i=t.idVertex)||void 0===i?void 0:i.match(/0=lookup,1=[x|y|z]/)}))},_X=function(t){return void 0!==t.find((function(t){var i;return null===(i=t.idVertex)||void 0===i?void 0:i.match(/0=lookup,1=value/)}))},RX=function(t,i){for(var n=[],e=2;e<arguments.length;e++)n[e-2]=arguments[e];var r=[],s=i?"vec3":"vec2",o=t.axisWorldTranslation,a=t.scaling,f=t.translation,c=t.offset,l=t.flipXY,d=t.flipXZ,v=t.splitPosAttribute,y=t.normalSource,S=[];if("attribute"===y&&r.push(CY("attribute vec3 "+iX),IY("vec3 "+YY+" = "+iX)),"linear-highPrecision"!==o)n.forEach((function(t){void 0!==t.attributeNameAxisCoord&&(!0!==v?r.push(IY(s+" "+t.variableNameAxisCoord+" = "+t.attributeNameAxisCoord)):r.push(IY(s+" "+t.variableNameAxisCoord+" = "+(i?"vec3("+t.attributeNameAxisCoord+"X, "+t.attributeNameAxisCoord+"Y, "+t.attributeNameAxisCoord+"Z)":"vec2("+t.attributeNameAxisCoord+"X, "+t.attributeNameAxisCoord+"Y)"))))}));else{if(!0===v)throw new Error("splitPosAttribute: true not supported with axisWorldTranslation: linear-highPrecision");n.forEach((function(t){r.push(IY(s+" "+t.variableNameAxisCoord+"_highpart = "+t.attributeNameAxisCoord+"_highpart"),IY(s+" "+t.variableNameAxisCoord+"_lowpart = "+t.attributeNameAxisCoord+"_lowpart"))}))}if(c&&c.rotation){var m=c.rotation.dataType,b="uniform"===m?"u":"a",g=""+b+nX;r.push(CY(m+" vec2 "+g));var w=tX;r.push(IY("vec2 "+XY+" = vec2("+w+".x * "+g+".y + "+w+".y * "+g+".x, "+w+".y * "+g+".y - "+w+".x * "+g+".x)"))}if(c&&r.push(CY("attribute "+s+" "+tX)),!0===l){if("linear-highPrecision"===o)throw new Error("Unimplemented vertex location feature combination: linear-highPrecision + flipXY");n.forEach((function(t){S.push(t.variableNameAxisCoord+" = "+(i?"vec3("+t.variableNameAxisCoord+".y, "+t.variableNameAxisCoord+".x, "+t.variableNameAxisCoord+".z)":"vec2("+t.variableNameAxisCoord+".y, "+t.variableNameAxisCoord+".x)"))}))}if(!0===d){if("linear-highPrecision"===o)throw new Error("Unimplemented vertex location feature combination: linear-highPrecision + flipXZ");n.forEach((function(t){S.push(t.variableNameAxisCoord+" = vec3("+t.variableNameAxisCoord+".z, "+t.variableNameAxisCoord+".y, "+t.variableNameAxisCoord+".x)")}))}if(a){if("linear-highPrecision"===o)throw new Error("Unimplemented vertex location feature combination: linear-highPrecision + scaling");var p="attribute"===a.dataType?"a":"u",k=p+"Scaling",x=i?"vec3":"vec2";r.push(CY(a.dataType+" "+x+" "+k)),n.forEach((function(t){S.push(t.variableNameAxisCoord+" = "+t.variableNameAxisCoord+" * "+k)}))}if(f&&"axis"===f.sizeUnit){if("linear-highPrecision"===o)throw new Error("Unimplemented vertex location feature combination: linear-highPrecision + translation (axis)");var M="attribute"===f.dataType?"a":"u",A=M+"TranslationAxis",F=i?"vec3":"vec2";r.push(CY(f.dataType+" "+F+" "+A)),n.forEach((function(t){S.push(t.variableNameAxisCoord+" = "+t.variableNameAxisCoord+" + "+A)}))}if(c&&"axis"===c.sizeUnit){if("linear-highPrecision"===o)throw new Error("Unimplemented vertex location feature combination: linear-highPrecision + offset (axis)");var T=("attribute"===c.dataType?"a":"u")+"OffsetAxis",C=!0===c.symmetric?"float":s;r.push(CY(c.dataType+" "+C+" "+T));var B=c.halved?" * 0.5":"",L=(w=c.rotation?XY:tX,"offsetGeometry");S.push(s+" "+L+" = "+T+" * "+w+B+" * sign(uScale)"),i&&"gpu-calculate"===y&&S.push(s+" "+YY+" = "+w),n.forEach((function(t){S.push(t.variableNameAxisCoord+" = "+t.variableNameAxisCoord+" + "+L)}))}if(void 0===o||"linear"===o)r.push(CY("uniform "+s+" uDisp","uniform "+s+" uScale")),n.forEach((function(t){S.push(s+" "+t.variableNameWorldCoord+" = ("+t.variableNameAxisCoord+" - uDisp) / uScale")}));else if("linear-highPrecision"===o)r.push(CY("uniform "+s+" uDisp","uniform "+s+" uScale","uniform "+s+" uScaleStart_highpart","uniform "+s+" uScaleStart_lowpart")),n.forEach((function(t){S.push(s+" "+t.variableNameAxisCoord+"_hprecision = ("+t.variableNameAxisCoord+"_highpart - uScaleStart_highpart) + ("+t.variableNameAxisCoord+"_lowpart - uScaleStart_lowpart)",s+" "+t.variableNameWorldCoord+" = ("+t.variableNameAxisCoord+"_hprecision - uDisp) / uScale",s+" "+t.variableNameAxisCoord+" = "+t.variableNameAxisCoord+"_highpart + "+t.variableNameAxisCoord+"_lowpart")}));else if("matrix"===o)r.push(CY("uniform mat3 uMatrix")),n.forEach((function(t){S.push("vec2 "+t.variableNameWorldCoord+" = (uMatrix * vec3("+t.variableNameAxisCoord+", 1.0)).xy")}));else if("logarithmic"===o[0]){r.push(CY("uniform "+s+" uScaleStart","uniform "+s+" uScaleStartLog","uniform "+s+" uScaleInterval","uniform "+s+" uScaleIntervalLog","uniform "+s+" uViewportStart","uniform "+s+" uViewportSize"));var I=i?["x","y","z"]:["x","y"],O=[];I.forEach((function(t){var i=o[1][t];if(void 0!==i){var n=i.base;if("e"===n)return;var e="float "+("cLog"+n)+" = 1.0 / log("+Lo(n).toFixed(1)+")";O.includes(e)||O.push(e)}})),r.push(CY.apply(void 0,u([],h(O)))),n.forEach((function(t,i){var n=""+i,e=[];I.forEach((function(i){var r=i.toUpperCase(),s=o[1][i];if(void 0===s)S.push("float posPercent"+r+n+" = ("+t.variableNameAxisCoord+"."+i+" - uScaleStart."+i+") / uScaleInterval."+i);else{var h=s.base,u="e"===h;S.push("float posLog"+r+n+" = log("+t.variableNameAxisCoord+"."+i+")"+(u?"":" * cLog"+h),"float posPercent"+r+n+" = (posLog"+r+n+" - uScaleStartLog."+i+") / uScaleIntervalLog."+i)}e.push("posPercent"+r+n)})),S.push(s+" "+t.variableNameWorldCoord+" = uViewportStart + "+s+"("+e.join(", ")+") * uViewportSize")}))}if(c&&"px"===c.sizeUnit){r.push(CY("uniform vec2 "+qY));T=("attribute"===c.dataType?"a":"u")+"OffsetPixels",C=!0===c.symmetric?"float":s;r.push(CY(c.dataType+" "+C+" "+T));B=c.halved?" * 0.5":"";var P=T+" * "+(w=c.rotation?XY:tX)+B;n.forEach((function(t){S.push(t.variableNameWorldCoord+" = "+t.variableNameWorldCoord+" + "+P+" * "+qY)}))}if(c&&"wu"===c.sizeUnit){T=("attribute"===c.dataType?"a":"u")+"OffsetWU",C=!0===c.symmetric?"float":s;r.push(CY(c.dataType+" "+C+" "+T));B=c.halved?" * 0.5":"",w=c.rotation?XY:tX;var D="offsetGeometry";S.push(s+" "+D+" = "+T+" * "+w+B),i&&"gpu-calculate"===y&&S.push(s+" "+YY+" = normalize("+D+")"),n.forEach((function(t){S.push(t.variableNameWorldCoord+" = "+t.variableNameWorldCoord+" + "+D)}))}if(c&&"nwu"===c.sizeUnit){r.push(CY("uniform float "+JY));T=("attribute"===c.dataType?"a":"u")+"OffsetNWU",C=!0===c.symmetric?"float":s;r.push(CY(c.dataType+" "+C+" "+T));B=c.halved?" * 0.5":"",w=c.rotation?XY:tX;var _="offsetGeometry";S.push(s+" "+_+" = "+T+" * "+w+B),i&&"gpu-calculate"===y&&S.push(s+" "+YY+" = normalize("+_+")"),n.forEach((function(t){S.push(t.variableNameWorldCoord+" = "+t.variableNameWorldCoord+" + "+_+" * "+JY)}))}return r.push(OY.apply(void 0,u(["gl_Position ="],h(S)))),r},zX=function(t,i,n,e){var r=[],s=t.axisWorldTranslation,o=i?"vec3":"vec2";if("linear"===s)r.push(PY(n,o+" "+e+" = "+n+" * uScale + uDisp"));else if("linear-highPrecision"===s)r.push(PY(n,o+" "+e+" = "+n+" * uScale + uDisp + uScaleStart_highpart + uScaleStart_lowpart"));else{if("matrix"===s)throw new Error("transformWorldCoordBackToAxis | unimplemented vertex location type");if("logarithmic"!==s[0])throw new Error("transformWorldCoordBackToAxis | unimplemented vertex location type");var a=[o+" "+n+"_percent = ("+n+" - uViewportStart) / uViewportSize"];(i?["x","y","z"]:["x","y"]).forEach((function(t){var i=t.toUpperCase(),e=s[1][t];if(void 0===e)a.push("float pos"+i+"Back = "+n+"_percent."+t+" * uScaleInterval."+t+" + uScaleStart."+t);else{var r=e.base,o="e"===r?"1.0":"cLog"+r;a.push("float pos"+i+"Back = pow(2.71828, ("+n+"_percent."+t+" * uScaleIntervalLog."+t+" + uScaleStartLog."+t+") / "+o+")")}})),a.push(o+" "+e+" = "+o+"(posXBack, posYBack"+(i?", posZBack":"")+")"),r.push(PY.apply(void 0,u([n],h(a))))}return r},EX={DebugConsole:function(t){return{idFeature:"DebugConsole"+(t?":"+t:""),idVertex:void 0,idFragment:void 0,apply:function(){return{}}}},"2D":{idFeature:"2D",idVertex:"2D",idFragment:"2D",apply:function(t){return{defaultVertexShader:"2D",defaultFragmentShader:"Basic"}}},"3D":{idFeature:"3D",idVertex:"3D",idFragment:"3D",apply:function(t){return{defaultVertexShader:"3D",defaultFragmentShader:"Basic"}}},PointSize:function(t){return{idFeature:"PointSize",idVertex:"SizePrimitive:"+MY(t),idFragment:void 0,apply:function(i){var n="uniform"===t?"u":"a";return{vertexShaderModifiers:[CY(t+" float "+n+"PointSize","uniform float uDevicePixelRatio"),DY("gl_PointSize = "+n+"PointSize * uDevicePixelRatio")]}}}},Color:function(t){var i,n,e=t&&t.dataType,r=t&&t.maskTexture;if(!0===r&&Array.isArray(e)&&"lookup"===e[0])throw new Error("ShaderFeatures.Color misusage | maskTexture and color lookup can't be used simultaneously.");var s,o=[],a=[];if("uniform"===e)i="Color:"+MY(t),r||(n="Color:"+MY(t),s="EmptyFragmentShader",a.push(CY("uniform vec4 uColor"),DY("vec4 "+KY+" = uColor","gl_FragColor = "+KY))),r&&(n=s="BasicTextureMask");else if("attribute"===e)i="Color:"+MY(t),n=s=r?"PointColorTextureMask":"PointColor",o.push(_Y("attribute vec4 aColor","varying vec4 vColor"));else if("texture"===e){if(i="Color:"+MY(t),n=s="Textured2D",r)throw new Error("ShaderFeatures.Color dataType=texture + maskTexture=true is not implemented");o.push(CY("uniform sampler2D "+QY),_Y("attribute vec2 aTextureCoord","varying vec2 vTextureCoord"))}else if(Array.isArray(e)&&"lookup"===e[0]){i="Color:"+MY(t),n=s=r?"PalettedTextureMask":"Paletted";var f=e[1],c="value"===f?"attribute float aLookupValue":WY+"."+f;o.push(_Y(c,"varying float vLookupValue"))}else if(Array.isArray(e)&&"gradient"===e[0]){n="Color:"+MY(t),s="EmptyFragmentShader";var l=e[1],d=l.getColorStops();l instanceof Je?a.push(CY("uniform vec4 uBounds","uniform vec2 uCenter","uniform vec2 uDistance","uniform float uAspect",r&&"uniform sampler2D "+$Y,r&&"varying vec2 vMaskTextureCoord"),CY.apply(void 0,u([],h(Ir(d.map((function(t,i){return["uniform vec4 color_"+i,"uniform float stop_"+i]})))))),BY(EY),IY.apply(void 0,u(["vec2 uv = vec2((((gl_FragCoord.x)-uBounds.x)/(uBounds.z))*uAspect,((gl_FragCoord.y)-uBounds.y)/(uBounds.w))","float mixVal = distance(uv/uDistance, uCenter/uDistance)","vec4 color = mix(color_0, color_1, linearStep(stop_0, stop_1, mixVal))"],h(d.map((function(t,i){return i<2?"":"color = mix(color, color_"+i+", linearStep(stop_"+(i-1)+", stop_"+i+", mixVal));"}))))),!0===r?DY("vec4 color0 = texture2D("+$Y+", vMaskTextureCoord)","vec4 "+KY+" = vec4(color.rgb, color0.r * color.a)"):DY("vec4 "+KY+" = color"),DY("gl_FragColor = "+KY)):l instanceof Qe&&a.push(CY("uniform vec4 uBounds","uniform vec2 uStartPoint","uniform vec2 uEndPoint",r&&"uniform sampler2D "+$Y,r&&"varying vec2 vMaskTextureCoord"),CY.apply(void 0,u([],h(Ir(d.map((function(t,i){return["uniform vec4 color_"+i,"uniform float stop_"+i]})))))),BY(EY),IY.apply(void 0,u(["vec2 uv = gl_FragCoord.xy - uBounds.xy","float magnitude = ((uv.x-uStartPoint.x) * (uEndPoint.x-uStartPoint.x) + (uv.y-uStartPoint.y) * (uEndPoint.y-uStartPoint.y)) / (pow(uEndPoint.x - uStartPoint.x, 2.0) + pow(uEndPoint.y-uStartPoint.y,2.0))","vec4 color = mix(color_0, color_1, linearStep(stop_0, stop_1, magnitude))"],h(d.map((function(t,i){return i<2?"":"color = mix(color, color_"+i+", linearStep(stop_"+(i-1)+", stop_"+i+", magnitude))"}))))),!0===r?DY("vec4 color0 = texture2D("+$Y+", vMaskTextureCoord)","vec4 "+KY+" = vec4(color.rgb, color0.r * color.a)"):DY("vec4 "+KY+" = color"),DY("gl_FragColor = "+KY))}return!0===r&&o.push(_Y("attribute vec2 aMaskTextureCoord","varying vec2 vMaskTextureCoord")),{idFeature:"Color",idVertex:i,idFragment:n,apply:function(t){return{vertexShaderModifiers:o,fragmentShader:s,fragmentShaderModifiers:a}}}},ColorShaded3D:function(t){return{idFeature:"ColorShaded3D",idVertex:"ColorShaded3D:"+MY(t),idFragment:"ColorShaded3D:"+MY(t),apply:function(i){var n,e,r=t.dataType,s=t.shadingStyle,o=t.wireframe,h=[];if(e=["phong"===s&&_Y(YY,"varying vec3 vNormal"),_Y(UY,"varying vec3 vPosWorld")],"uniform"===r)n="phong"===s?"Phong3D":"Simple3D";else if("attribute"===r)n="phong"===s?"PointColor3D":"SimplePointColor3D",e.push(_Y("attribute vec4 aColor","varying vec4 vColor"));else{if(!Array.isArray(r))return{};n="phong"===s?"Paletted3D":"SimplePaletted3D";var u=r[1],a="value"===u?"attribute float aLookupValue":WY+"."+u;e.push(_Y(a,"varying float vLookupValue"))}return o&&(e.push(_Y("attribute vec3 aTriangleBary","varying vec3 vTriangleBary")),h.push(CY("varying vec3 vTriangleBary"),CY("uniform vec4 uWireframeColor","uniform float uWireframeThickness"),BY(jY),PY(ZY+" =","float edge = computeScreenSpaceWireframe(vTriangleBary, uWireframeThickness)",ZY+" = mix("+ZY+", uWireframeColor, edge)"))),{fragmentShader:n,vertexShaderModifiers:e,fragmentShaderModifiers:h}}}},VertexLocation:function(t){return{idFeature:"VertexLocation",idVertex:"VertexLocation:"+MY(t),idFragment:void 0,apply:function(i){var n=[],e=PX(i),r=e?"vec3":"vec2";if("linear-highPrecision"!==t.axisWorldTranslation)!0!==t.splitPosAttribute?n.push(CY("attribute "+r+" aPos")):n.push(CY("attribute float aPosX"),CY("attribute float aPosY"),e&&CY("attribute float aPosZ"));else{if(!0===t.splitPosAttribute)throw new Error("splitPosAttribute: true not supported with axisWorldTranslation: linear-highPrecision");n.push(CY("attribute "+r+" aPos_highpart"),CY("attribute "+r+" aPos_lowpart"))}return n.push.apply(n,u([],h(RX(t,e,{attributeNameAxisCoord:"aPos",variableNameAxisCoord:WY,variableNameWorldCoord:UY})))),{vertexShaderModifiers:n}}}},LineInstanced2D:function(t){return{idFeature:"LineInstanced2D",idVertex:"LineInstanced2D:"+MY(t),idFragment:void 0,apply:function(i){return{vertexShaderModifiers:u(u(u(u([CY("uniform float uThicknessPixels"),CY("uniform vec2 "+qY),"linear-highPrecision"!==t.axisWorldTranslation&&CY("attribute vec2 aLocationA"),"linear-highPrecision"!==t.axisWorldTranslation&&CY("attribute vec2 aLocationB"),"linear-highPrecision"===t.axisWorldTranslation&&CY("attribute vec2 aLocationA_highpart"),"linear-highPrecision"===t.axisWorldTranslation&&CY("attribute vec2 aLocationB_highpart"),"linear-highPrecision"===t.axisWorldTranslation&&CY("attribute vec2 aLocationA_lowpart"),"linear-highPrecision"===t.axisWorldTranslation&&CY("attribute vec2 aLocationB_lowpart"),CY("attribute vec2 aSegmentPosition"),CY("attribute float aSegmentSide")],h(RX(t,!1,{attributeNameAxisCoord:"aLocationA",variableNameAxisCoord:"locationA",variableNameWorldCoord:"worldA"},{attributeNameAxisCoord:"aLocationB",variableNameAxisCoord:"locationB",variableNameWorldCoord:"worldB"}))),[PY("worldB = ","vec2 directionBasis = worldB - worldA","vec2 directionBasisNorm = normalize(directionBasis)","vec2 perpendBasisNorm = vec2(-directionBasisNorm.y, directionBasisNorm.x)","vec2 offset = mix(worldA, worldB, aSegmentSide)","vec2 thicknessDirection = aSegmentPosition.x * directionBasisNorm + aSegmentPosition.y * perpendBasisNorm ","vec2 "+UY+" = offset + thicknessDirection * uThicknessPixels * "+qY)]),h(_X(i)?[LY("attribute float aLookupValue"),LY("vLookupValue = aLookupValue"),CY("attribute float aLookupValueA"),CY("attribute float aLookupValueB"),DY("vLookupValue = mix(aLookupValueA, aLookupValueB, aSegmentSide)")]:[])),h(DX(i)?zX(t,!1,UY,WY):[]))}}}},LineInstanced3D:function(t){return{idFeature:"LineInstanced3D",idVertex:"LineInstanced3D:"+MY(t),idFragment:void 0,apply:function(i){return{defaultFragmentShader:"Phong3D",vertexShaderModifiers:u(u(u([CY("uniform float uOffsetWU"),CY("attribute vec3 aLocationA"),CY("attribute vec3 aLocationB"),CY("attribute float aSegmentPosition"),CY("attribute float aPerpendHorizontal"),CY("attribute float aPerpendVertical")],h(RX({axisWorldTranslation:t.axisWorldTranslation,normalSource:"custom"},PX(i),{attributeNameAxisCoord:"aLocationA",variableNameAxisCoord:"locationA",variableNameWorldCoord:"worldA"},{attributeNameAxisCoord:"aLocationB",variableNameAxisCoord:"locationB",variableNameWorldCoord:"worldB"}))),[PY("worldB = ","vec3 directionBasis = worldB - worldA","vec3 directionBasisNorm = normalize(directionBasis)","vec3 notParallel = normalize(mix( vec3( 0.0, 1.0, 0.0 ), vec3( 0.2, 0.8, 0.0 ), step( abs(directionBasis.y), 0.9 ) ))","vec3 horizontalBasis = normalize( cross( notParallel, directionBasisNorm ) )","vec3 verticalBasis = normalize( cross( horizontalBasis, directionBasisNorm ) )","vec3 "+YY+" = aPerpendHorizontal * horizontalBasis + aPerpendVertical * verticalBasis","vec3 "+UY+" = worldA + aSegmentPosition * directionBasis + "+YY+" * uOffsetWU * 0.5")]),h(DX(i)?zX({axisWorldTranslation:t.axisWorldTranslation,normalSource:"custom"},!0,UY,WY):[]))}}}},RoundedEdges3D:{idFeature:"RoundedEdges3D",idVertex:"RoundedEdges3D",idFragment:void 0,apply:function(t){return{defaultFragmentShader:"Phong3D",vertexShaderModifiers:[CY("attribute vec3 aEdge"),CY("uniform float uEdgeRoundness"),PY(UY+" =","vec3 boxSizeWorld = abs( aOffsetAxis / uScale )","float boxMinDimensionWorldXZ = min( boxSizeWorld.x, boxSizeWorld.z )","vec3 edgeRoundAmount = uEdgeRoundness * vec3( boxMinDimensionWorldXZ, min( boxMinDimensionWorldXZ, boxSizeWorld.y ), boxMinDimensionWorldXZ )",UY+" = "+UY+" + aEdge * edgeRoundAmount")]}}},ColorGrid2D:function(t){var i=t.flipXY,n=t.intensityTextureType,e=t.littleEndian;return{idFeature:"ColorGrid2D",idVertex:void 0,idFragment:"ColorGrid2D:"+MY(t),apply:function(r){return{fragmentShader:"EmptyFragmentShader",fragmentShaderModifiers:[CY("uniform sampler2D uLookupTexture","uniform vec4 uTileBounds","uniform vec2 uTileDimensions","uniform sampler2D uTileIntensityValues","uniform float uLookupMax","uniform float uLookupMin","uniform float uLookupTextureHeightPx",zY,"ubyte"===n&&NY),"bilinear"===t.interpolation?IY("vec2 cellSizePx = uTileBounds.zw / (uTileDimensions - 1.0)","vec2 cellIndex = (gl_FragCoord.xy - uTileBounds.xy) / cellSizePx","vec2 cellStart = floor(cellIndex)","vec2 cellEnd = ceil(cellIndex)","vec2 cellStartNormalized = cellStart / (uTileDimensions - 1.0)","vec2 cellEndNormalized = cellEnd / (uTileDimensions - 1.0)","vec4 sample00 = texture2D(uTileIntensityValues, "+(i?"cellStartNormalized":"vec2(cellStartNormalized.y, cellStartNormalized.x)")+")","vec4 sample01 = texture2D(uTileIntensityValues, "+(i?"vec2(cellStartNormalized.x, cellEndNormalized.y)":"vec2(cellStartNormalized.y, cellEndNormalized.x)")+")","vec4 sample10 = texture2D(uTileIntensityValues, "+(i?"vec2(cellEndNormalized.x, cellStartNormalized.y)":"vec2(cellEndNormalized.y, cellStartNormalized.x)")+")","vec4 sample11 = texture2D(uTileIntensityValues, "+(i?"cellEndNormalized":"vec2(cellEndNormalized.y, cellEndNormalized.x)")+")","float intensity00 = "+("float"===n?"sample00.x":"decodeUbyteRGBAEncodedFloat(sample00, "+e+")"),"float intensity01 = "+("float"===n?"sample01.x":"decodeUbyteRGBAEncodedFloat(sample01, "+e+")"),"float intensity10 = "+("float"===n?"sample10.x":"decodeUbyteRGBAEncodedFloat(sample10, "+e+")"),"float intensity11 = "+("float"===n?"sample11.x":"decodeUbyteRGBAEncodedFloat(sample11, "+e+")"),"vec2 lerpFactors = cellIndex - cellStart","float intensityR1 = mix(intensity00, intensity10, "+(i?"lerpFactors.x":"lerpFactors.y")+")","float intensityR2 = mix(intensity01, intensity11, "+(i?"lerpFactors.x":"lerpFactors.y")+")","float intensityP = mix(intensityR1, intensityR2, "+(i?"lerpFactors.y":"lerpFactors.x")+")","float texCoordY = (intensityP - uLookupMin) / (uLookupMax - uLookupMin)","texCoordY = (roundUnsigned(clamp(texCoordY, 0.0, 1.0) * uLookupTextureHeightPx) / uLookupTextureHeightPx) * (1.0 - (1.0 / uLookupTextureHeightPx)) + (0.5 / uLookupTextureHeightPx)","gl_FragColor = texture2D(uLookupTexture, vec2(0.5, texCoordY))"):IY("vec2 cellSizePx = uTileBounds.zw / (uTileDimensions)","vec2 cellIndex = (gl_FragCoord.xy - uTileBounds.xy) / cellSizePx","vec2 cellIndexNormalized = cellIndex / uTileDimensions","vec4 sample0 = texture2D(uTileIntensityValues, "+(i?"cellIndexNormalized":"vec2(cellIndexNormalized.y, cellIndexNormalized.x)")+")","float intensity = "+("float"===n?"sample0.x":"decodeUbyteRGBAEncodedFloat(sample0, "+e+")"),"float texCoordY = (intensity - uLookupMin) / (uLookupMax - uLookupMin)","texCoordY = (roundUnsigned(clamp(texCoordY, 0.0, 1.0) * uLookupTextureHeightPx) / uLookupTextureHeightPx) * (1.0 - (1.0 / uLookupTextureHeightPx)) + (0.5 / uLookupTextureHeightPx)","gl_FragColor = texture2D(uLookupTexture, vec2(0.5, texCoordY))")]}}}},DrawToNormalTexture:function(t){var i=t.flipXZ,n=t.vertexIdSource,e=t.normalTextureType,r=t.heightmapTextureType,s=t.littleEndian;return{idFeature:"DrawToNormalTexture",idVertex:"DrawToNormalTexture:"+MY(t),idFragment:"DrawToNormalTexture:"+MY(t),apply:function(t){var o=[],h=[];return o.push(CY("uniform ivec2 uTileDimensions","uniform vec2 uTileDimensionsXZ","uniform vec2 uTileStartLocationAxisXZ","uniform vec2 uTileSizeAxisXZ","uniform sampler2D uHeightmapTexture","uint"===e?"flat varying uvec3 vNormalRGB":"varying vec3 vNormalRGB","attribute"===n&&"attribute float aVertexID",zY,HY,VY,"ubyte"===r&&NY),IY(void 0===n?"int iVertex = gl_VertexID":"int iVertex = int(roundUnsigned(aVertexID))","int iSecondary = modulus(iVertex, (uTileDimensions.y - 1))","int iPrimary = iVertex / (uTileDimensions.y - 1)","vec2 iCell = vec2(float(iPrimary), float(iSecondary))","vec2 uTileDimensionsMinus1 = vec2(uTileDimensions) - 1.0","vec2 halfTexelWorld = 2.0 / (uTileDimensionsMinus1 * 2.0)","vec2 posWorld = vec2(-1.0 + halfTexelWorld.y + iCell.y * 2.0 * halfTexelWorld.y, -1.0 + halfTexelWorld.x + iCell.x * 2.0 * halfTexelWorld.x)","vec2 cellSizeAxis = uTileSizeAxisXZ / (uTileDimensionsXZ - 1.0)","vec3 posAxis0 = vec3(\n uTileStartLocationAxisXZ.x + iCell."+(i?"y":"x")+" * cellSizeAxis.x,\n "+("float"===r?"pickTexel(uHeightmapTexture, vec2(iCell.y, iCell.x), vec2(uTileDimensions.y, uTileDimensions.x)).x":"decodeUbyteRGBAEncodedFloat(pickTexel(uHeightmapTexture, vec2(iCell.y, iCell.x), vec2(uTileDimensions.y, uTileDimensions.x)), "+s+")")+" ,\n uTileStartLocationAxisXZ.y + iCell."+(i?"x":"y")+" * cellSizeAxis.y\n )","vec2 iCell1 = iCell + vec2(1.0, 0.0)","vec3 posAxis1 = vec3(\n uTileStartLocationAxisXZ.x + iCell1."+(i?"y":"x")+" * cellSizeAxis.x,\n "+("float"===r?"pickTexel(uHeightmapTexture, vec2(iCell1.y, iCell1.x), vec2(uTileDimensions.y, uTileDimensions.x)).x":"decodeUbyteRGBAEncodedFloat(pickTexel(uHeightmapTexture, vec2(iCell1.y, iCell1.x), vec2(uTileDimensions.y, uTileDimensions.x)), "+s+")")+",\n uTileStartLocationAxisXZ.y + iCell1."+(i?"x":"y")+" * cellSizeAxis.y\n )","vec2 iCell2 = iCell + vec2(0.0, 1.0)","vec3 posAxis2 = vec3(\n uTileStartLocationAxisXZ.x + iCell2."+(i?"y":"x")+" * cellSizeAxis.x,\n "+("float"===r?"pickTexel(uHeightmapTexture, vec2(iCell2.y, iCell2.x), vec2(uTileDimensions.y, uTileDimensions.x)).x":"decodeUbyteRGBAEncodedFloat(pickTexel(uHeightmapTexture, vec2(iCell2.y, iCell2.x), vec2(uTileDimensions.y, uTileDimensions.x)), "+s+")")+",\n uTileStartLocationAxisXZ.y + iCell2."+(i?"x":"y")+" * cellSizeAxis.y\n )","vec2 iCell3 = iCell + vec2(1.0, 1.0)","vec3 posAxis3 = vec3(\n uTileStartLocationAxisXZ.x + iCell3."+(i?"y":"x")+" * cellSizeAxis.x,\n "+("float"===r?"pickTexel(uHeightmapTexture, vec2(iCell3.y, iCell3.x), vec2(uTileDimensions.y, uTileDimensions.x)).x":"decodeUbyteRGBAEncodedFloat(pickTexel(uHeightmapTexture, vec2(iCell3.y, iCell3.x), vec2(uTileDimensions.y, uTileDimensions.x)), "+s+")")+",\n uTileStartLocationAxisXZ.y + iCell3."+(i?"x":"y")+" * cellSizeAxis.y\n )","vec3 normal = normalize(cross(posAxis2 - posAxis0, posAxis1 - posAxis0) + cross(posAxis1 - posAxis3, posAxis2 - posAxis3))","uint"===e?"vNormalRGB = uvec3(((normal / 2.0) + 0.5) * float(-1u))":"vNormalRGB = (normal / 2.0) + 0.5","gl_PointSize = 1.0")),h.push(CY("uint"===e?"flat varying uvec3 vNormalRGB":"varying vec3 vNormalRGB"),DY("uint"===e?"gl_FragColor = uvec4(vNormalRGB, -1u)":"gl_FragColor = vec4(vNormalRGB, 1.0)")),{vertexShaderModifiers:o,fragmentShaderModifiers:h,fragmentShader:"EmptyFragmentShader",hints:["uint"===e&&{type:"fragOutput",fragOutput:"uvec4"}]}}}},SurfaceGrid:function(t){var i=t.fillColor,n=t.interpolation,e=t.flipXZ,r=t.shadingStyle,s=t.wireframe,o=t.instanceIdSource,a=t.normalTextureType,f=t.heightmapTextureType,c=t.intensityTextureType,l=t.littleEndian;return{idFeature:"SurfaceGrid",idVertex:"SurfaceGrid:"+MY(t),idFragment:"SurfaceGrid:"+MY(t),apply:function(d){var v,y,S,m=[],b=[];return m.push(CY("attribute vec2 aGeoCellOffset","attribute vec3 aTriangleBary","uniform int uBaseInstance","uniform ivec2 uTileDimensions","uniform vec2 uTileDimensionsXZ","uniform vec2 uTileStartLocationAxisXZ","uniform vec2 uTileSizeAxisXZ","uniform sampler2D uHeightmapTexture","attribute"===o&&"attribute float aInstanceID",zY,HY,VY,"ubyte"===f&&NY),_Y("aTriangleBary","varying vec3 vTriangleBary"),IY(void 0===o?"int iInstance = gl_InstanceID":"int iInstance = int(roundUnsigned(aInstanceID))","iInstance = iInstance + uBaseInstance","int iSecondary = modulus(iInstance, (uTileDimensions.y - 1))","int iPrimary = iInstance / (uTileDimensions.y - 1)","vec2 iCell = vec2(float(iPrimary), float(iSecondary))","vec2 iCellVertex = iCell + aGeoCellOffset","vec2 uTileDimensionsMinus1 = vec2(float(uTileDimensions.x), float(uTileDimensions.y)) - 1.0","vec2 ySampleCoordinate = vec2(iCellVertex.y, iCellVertex.x) / vec2(uTileDimensionsMinus1.y, uTileDimensionsMinus1.x)","float y = "+("float"===f?"pickTexel(uHeightmapTexture, vec2(iCellVertex.y, iCellVertex.x), vec2(uTileDimensions.y, uTileDimensions.x)).x":"decodeUbyteRGBAEncodedFloat(pickTexel(uHeightmapTexture, vec2(iCellVertex.y, iCellVertex.x), vec2(uTileDimensions.y, uTileDimensions.x)), "+l+")"),"vec2 cellSizeAxis = uTileSizeAxisXZ / (uTileDimensionsXZ - 1.0)","vec2 posAxisXZ = uTileStartLocationAxisXZ + cellSizeAxis * "+(e?"vec2(iCellVertex.y, iCellVertex.x)":"iCellVertex"),"vec3 posAxis = vec3(posAxisXZ.x, y, posAxisXZ.y)")),m.push.apply(m,u([],h(RX({axisWorldTranslation:t.axisWorldTranslation,normalSource:"custom"},!0,{attributeNameAxisCoord:void 0,variableNameAxisCoord:WY,variableNameWorldCoord:UY})))),"phong"===r&&m.push.apply(m,u(u([_Y(UY,"varying vec3 vPosWorld")],h("uint"===a?[BY(GY),DY("vec4 normalAxisRGB = vec4(pickTexelUnsigned(uNormalmapTexture, vec2(iCell.y, iCell.x), vec2(uTileDimensionsMinus1.y, uTileDimensionsMinus1.x))) / float(-1u)")]:[DY("vec4 normalAxisRGB = pickTexel(uNormalmapTexture, vec2(iCell.y, iCell.x), vec2(uTileDimensionsMinus1.y, uTileDimensionsMinus1.x))")])),[DY("vec3 normalAxis = (normalAxisRGB.rgb * 2.0) - 1.0","vNormal = normalize(normalAxis * uScale)"),CY.apply(void 0,u(["varying vec3 vNormal"],h("uint"===a?["uniform usampler2D uNormalmapTexture"]:["uniform sampler2D uNormalmapTexture"])))])),"uniform"===i?b.push(CY("uniform vec4 uColorDiffuse"),IY("vec4 colorDiffuse = uColorDiffuse")):Array.isArray(i)&&"lookup"===i[0]?"value"===i[1]?(m.push(_Y(WY+".xz","varying vec2 vVertexLocationAxisXZ")),b.push(CY("uniform sampler2D uLookupTexture","uniform vec4 uTileBoundsAxisXZ","uniform vec2 uTileDimensionsXZ","varying vec2 vVertexLocationAxisXZ","uniform sampler2D uTileIntensityValues","uniform float uLookupMax","uniform float uLookupMin","uniform float uLookupTextureHeightPx","uniform mat4 uViewProjectionMatrix","uniform vec3 uScale","uniform vec3 uDisp",zY,"ubyte"===c&&NY),"bilinear"===n?IY("vec2 cellSizeAxisXZ = uTileBoundsAxisXZ.zw / (uTileDimensionsXZ - 1.0)","vec2 cellIndex = (vVertexLocationAxisXZ - uTileBoundsAxisXZ.xy) / cellSizeAxisXZ","vec2 cellStart = floor(cellIndex)","vec2 cellEnd = ceil(cellIndex)","vec2 cellStartNormalized = cellStart / (uTileDimensionsXZ - 1.0)","vec2 cellEndNormalized = cellEnd / (uTileDimensionsXZ - 1.0)","vec4 sample00 = texture2D(uTileIntensityValues, "+(e?"cellStartNormalized":"vec2(cellStartNormalized.y, cellStartNormalized.x)")+")","vec4 sample01 = texture2D(uTileIntensityValues, "+(e?"vec2(cellStartNormalized.x, cellEndNormalized.y)":"vec2(cellStartNormalized.y, cellEndNormalized.x)")+")","vec4 sample10 = texture2D(uTileIntensityValues, "+(e?"vec2(cellEndNormalized.x, cellStartNormalized.y)":"vec2(cellEndNormalized.y, cellStartNormalized.x)")+")","vec4 sample11 = texture2D(uTileIntensityValues, "+(e?"cellEndNormalized":"vec2(cellEndNormalized.y, cellEndNormalized.x)")+")","float intensity00 = "+("float"===c?"sample00.x":"decodeUbyteRGBAEncodedFloat(sample00, "+l+")"),"float intensity01 = "+("float"===c?"sample01.x":"decodeUbyteRGBAEncodedFloat(sample01, "+l+")"),"float intensity10 = "+("float"===c?"sample10.x":"decodeUbyteRGBAEncodedFloat(sample10, "+l+")"),"float intensity11 = "+("float"===c?"sample11.x":"decodeUbyteRGBAEncodedFloat(sample11, "+l+")"),"vec2 lerpFactors = cellIndex - cellStart","float intensityR1 = mix(intensity00, intensity10, "+(e?"lerpFactors.x":"lerpFactors.y")+")","float intensityR2 = mix(intensity01, intensity11, "+(e?"lerpFactors.x":"lerpFactors.y")+")","float intensityP = mix(intensityR1, intensityR2, "+(e?"lerpFactors.y":"lerpFactors.x")+")","float texCoordY = (intensityP - uLookupMin) / (uLookupMax - uLookupMin)","texCoordY = (roundUnsigned(clamp(texCoordY, 0.0, 1.0) * uLookupTextureHeightPx) / uLookupTextureHeightPx) * (1.0 - (1.0 / uLookupTextureHeightPx)) + (0.5 / uLookupTextureHeightPx)","vec4 colorDiffuse = texture2D(uLookupTexture, vec2(0.5, texCoordY))"):IY("vec2 cellSizeAxisXZ = uTileBoundsAxisXZ.zw / (uTileDimensionsXZ - 1.0)","vec2 cellIndex = floor((vVertexLocationAxisXZ - uTileBoundsAxisXZ.xy) / cellSizeAxisXZ)","vec2 cellIndexNormalized = cellIndex / (uTileDimensionsXZ - 1.0)","vec4 sample0 = texture2D(uTileIntensityValues, "+(e?"cellIndexNormalized":"vec2(cellIndexNormalized.y, cellIndexNormalized.x)")+")","float intensity = sample0.x","float texCoordY = (intensity - uLookupMin) / (uLookupMax - uLookupMin)","texCoordY = (roundUnsigned(clamp(texCoordY, 0.0, 1.0) * uLookupTextureHeightPx) / uLookupTextureHeightPx) * (1.0 - (1.0 / uLookupTextureHeightPx)) + (0.5 / uLookupTextureHeightPx)","vec4 colorDiffuse = texture2D(uLookupTexture, vec2(0.5, texCoordY))"))):(m.push(_Y(WY+"."+i[1],"varying float vLookupValue")),b.push.apply(b,u([CY("varying float vLookupValue")],h((v="vLookupValue",y="colorDiffuse",[CY("uniform float uLookupMin","uniform float uLookupMax","uniform sampler2D uLookupTexture","uniform float uLookupTextureHeightPx"),BY(zY),DY(cX(v,y))]))))):void 0===i&&b.push(IY("vec4 colorDiffuse = vec4(0.0, 0.0, 0.0, 0.0)")),s&&b.push(CY("uniform vec4 uWireframeColor","uniform float uWireframeThickness"),BY(jY),DY("float edge = computeScreenSpaceWireframe(vTriangleBary, uWireframeThickness)",i?"if (edge > 0.0) {\n colorDiffuse = vec4(mix(colorDiffuse.rgb, uWireframeColor.rgb, edge * uWireframeColor.a), max(colorDiffuse.a, uWireframeColor.a));\n }":"if (edge > 0.0) {\n colorDiffuse = uWireframeColor;\n } else {\n discard;\n }")),b.push.apply(b,u([CY("varying vec3 vTriangleBary")],h("phong"===r?(S="colorDiffuse",[CY("varying vec3 vPosWorld;","varying vec3 vNormal;","uniform vec3 uCameraLoc;","uniform vec3 uLightLoc;","uniform vec4 uLightColor;","uniform vec4 uAmbientColor;","uniform float uShininess;","uniform float uAmbientReflection;","uniform float uDiffuseReflection;","uniform float uSpecularReflection;"),S!==ZY&&DY("vec4 "+ZY+" = "+S),DY(lX)]):function(t){return[t!==ZY&&DY("vec4 "+ZY+" = "+t),DY(dX)]}("colorDiffuse")))),{vertexShaderModifiers:m,fragmentShader:"EmptyFragmentShader",fragmentShaderModifiers:b}}}},DebugSurfaceGridNormals:function(t){return{idFeature:"DebugSurfaceGridNormals",idVertex:"DebugSurfaceGridNormals:"+MY(t),idFragment:"DebugSurfaceGridNormals:"+MY(t),apply:function(i){return{vertexShaderModifiers:u(u(u([CY.apply(void 0,u(["attribute float aNormalArrow","uniform int uBaseInstance","uniform ivec2 uTileDimensions","uniform vec2 uTileDimensionsXZ","uniform vec2 uTileStartLocationAxisXZ","uniform vec2 uTileSizeAxisXZ","uniform sampler2D uHeightmapTexture","attribute"===t.instanceIdSource&&"attribute float aInstanceID",zY,HY,VY,"ubyte"===t.heightmapTextureType&&NY],h("uint"===t.normalTextureType?["uniform usampler2D uNormalmapTexture"]:["uniform sampler2D uNormalmapTexture"]))),IY.apply(void 0,u(u([void 0===t.instanceIdSource?"int iInstance = gl_InstanceID":"int iInstance = int(roundUnsigned(aInstanceID))","iInstance = iInstance + uBaseInstance","int iSecondary = modulus(iInstance, (uTileDimensions.y - 1))","int iPrimary = iInstance / (uTileDimensions.y - 1)","vec2 iCell = vec2(float(iPrimary), float(iSecondary))","vec2 uTileDimensionsMinus1 = vec2(float(uTileDimensions.x), float(uTileDimensions.y)) - 1.0","float y00 = "+("float"===t.heightmapTextureType?"pickTexel(uHeightmapTexture, vec2(iCell.y, iCell.x), vec2(uTileDimensions.y, uTileDimensions.x)).x":"decodeUbyteRGBAEncodedFloat(pickTexel(uHeightmapTexture, vec2(iCell.y, iCell.x), vec2(uTileDimensions.y, uTileDimensions.x)), "+t.littleEndian+")"),"float y01 = "+("float"===t.heightmapTextureType?"pickTexel(uHeightmapTexture, vec2(iCell.y + 1.0, iCell.x), vec2(uTileDimensions.y, uTileDimensions.x)).x":"decodeUbyteRGBAEncodedFloat(pickTexel(uHeightmapTexture, vec2(iCell.y + 1.0, iCell.x), vec2(uTileDimensions.y, uTileDimensions.x)), "+t.littleEndian+")"),"float y10 = "+("float"===t.heightmapTextureType?"pickTexel(uHeightmapTexture, vec2(iCell.y, iCell.x + 1.0), vec2(uTileDimensions.y, uTileDimensions.x)).x":"decodeUbyteRGBAEncodedFloat(pickTexel(uHeightmapTexture, vec2(iCell.y, iCell.x + 1.0), vec2(uTileDimensions.y, uTileDimensions.x)), "+t.littleEndian+")"),"float y11 = "+("float"===t.heightmapTextureType?"pickTexel(uHeightmapTexture, vec2(iCell.y + 1.0, iCell.x + 1.0), vec2(uTileDimensions.y, uTileDimensions.x)).x":"decodeUbyteRGBAEncodedFloat(pickTexel(uHeightmapTexture, vec2(iCell.y + 1.0, iCell.x + 1.0), vec2(uTileDimensions.y, uTileDimensions.x)), "+t.littleEndian+")"),"float y = (y00 + y01 + y10 + y11) / 4.0","vec2 cellSizeAxis = uTileSizeAxisXZ / (uTileDimensionsXZ - 1.0)","vec2 posAxisXZ = uTileStartLocationAxisXZ + cellSizeAxis * (0.5 + "+(t.flipXZ?"vec2(iCell.y, iCell.x)":"iCell")+")","vec3 posAxis = vec3(posAxisXZ.x, y, posAxisXZ.y)"],h("uint"===t.normalTextureType?["vec4 normalAxisRGB = vec4(pickTexelUnsigned(uNormalmapTexture, vec2(iCell.y, iCell.x), vec2(uTileDimensionsMinus1.y, uTileDimensionsMinus1.x))) / float(-1u)"]:["vec4 normalAxisRGB = pickTexel(uNormalmapTexture, vec2(iCell.y, iCell.x), vec2(uTileDimensionsMinus1.y, uTileDimensionsMinus1.x))"])),["vec3 normalAxis = (normalAxisRGB.rgb * 2.0) - 1.0","vec3 normalWorld = normalize(normalAxis * uScale)"]))],h("uint"===t.normalTextureType?[BY(GY)]:[])),h(RX({axisWorldTranslation:t.axisWorldTranslation,normalSource:"custom"},!0,{attributeNameAxisCoord:void 0,variableNameAxisCoord:WY,variableNameWorldCoord:UY}))),[PY("posWorld =","vec3 dirArrow = normalWorld","vec3 posArrowStart = posWorld","vec3 posArrowEnd = posWorld + dirArrow * 0.010","vec3 notParallel = normalize(mix( vec3( 0.0, 1.0, 0.0 ), vec3( 0.2, 0.8, 0.0 ), step( abs(dirArrow.y), 0.9 ) ))","vec3 dirArrowLeft = normalize(-dirArrow + 0.50 * normalize(cross(dirArrow, notParallel)))","vec3 dirArrowRight = normalize(-dirArrow + 0.50 * normalize(cross(notParallel, dirArrow)))","vec3 posArrowLeft = posArrowEnd + dirArrowLeft * 0.0025","vec3 posArrowRight = posArrowEnd + dirArrowRight * 0.0025","if (aNormalArrow == 0.0) {\n posWorld = posArrowStart;\n } else if (aNormalArrow == 1.0) {\n posWorld = posArrowEnd;\n } else if (aNormalArrow == 2.0) {\n posWorld = posArrowLeft;\n } else if (aNormalArrow == 3.0) {\n posWorld = posArrowRight;\n }")]),fragmentShader:"EmptyFragmentShader",fragmentShaderModifiers:[DY("gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0)")]}}}},OffsetTowardsCamera:function(){return{idFeature:"OffsetTowardsCamera",idVertex:"OffsetTowardsCamera",idFragment:void 0,apply:function(t){return{vertexShaderModifiers:[CY("uniform vec3 uCameraLoc"),PY("posWorld =","posWorld = posWorld + normalize(uCameraLoc) * 0.0025")]}}}},AliasedEdge:function(){return{idFeature:"AliasedEdge",idVertex:"AliasedEdge",idFragment:"AliasedEdge",apply:function(t){return{vertexShaderModifiers:[CY("attribute float aSegmentInside"),CY("varying float vSegmentInside"),CY("varying float vSegmentSide"),PY("gl_Position = ","\n vSegmentInside = aSegmentInside;\n vSegmentSide = aSegmentSide;\n ")],fragmentShaderModifiers:[RY("#extension GL_OES_standard_derivatives : enable"),CY("uniform float uAALimit"),CY("varying float vSegmentInside"),CY("varying float vSegmentSide"),OY("gl_FragColor = ","\n float dist = (uAALimit - vSegmentInside);\n vec2 ddist = vec2(dFdx(dist), dFdy(dist));\n float pixelDist = dist / length(ddist);\n // additional blurring\n pixelDist *= 0.5;\n\n float aa = clamp(0.5 - pixelDist, 0.0, 1.0);\n if((vSegmentSide <= 0.0 || vSegmentSide >= 1.0) && aa <=0.99){\n aa *= 0.5;\n }\n "+KY+".a = "+KY+".a * aa;\n ")]}}}}},NX=function(t){if(t instanceof Vo||t instanceof tj)return t.Ei()?"linear-highPrecision":"linear";if(t instanceof Go){var i={};return t.x instanceof Co&&(i.x={base:t.x.Bi()}),t.y instanceof Co&&(i.y={base:t.y.Bi()}),["logarithmic",i]}return"linear"};function VX(i,n,e,r,s,o){var h,u,a=n.x._t(i.max.x),f=n.x._t(i.min.x),c=n.y._t(i.max.y),l=n.y._t(i.min.y),d=a-f,v=c-l,y=d/v,S=d*e.x,m=v*e.y,b=d-S,g=v-m,w=S>b?[b,S]:[S,b],p=m>g?[g,m]:[m,g],k=1,x=1;switch(r){default:case t.GradientExtent.closestSide:if(h=w[0]/d,u=p[0]/v,s===t.GradientShape.circle)k=M=Math.min(h*y,u),x=M;else k=h*y,x=u;break;case t.GradientExtent.farthestSide:if(h=w[1]/d,u=p[1]/v,s===t.GradientShape.circle)k=M=Math.max(h*y,u),x=M;else k=h*y,x=u;break;case t.GradientExtent.closestCorner:if(u=p[0]/v,s===t.GradientShape.circle)h=w[0]/d*y,k=M=Math.sqrt(h*h+u*u),x=M;else h=w[0]/d,k=(M=Math.sqrt(h*h+u*u))*y,x=M;break;case t.GradientExtent.farthestCorner:var M;if(u=p[1]/v,s===t.GradientShape.circle)h=w[1]/d*y,k=M=Math.sqrt(h*h+u*u),x=M;else h=w[1]/d,k=(M=Math.sqrt(h*h+u*u))*y,x=M}return{bounds:[f*o,l*o,d*o,v*o],center:[e.x*y,e.y],distance:[Math.max(k,1e-4),Math.max(x,1e-4)],aspectRatio:y}}function GX(t,i,n,e){var r=i.x._t(t.max.x),s=i.x._t(t.min.x),o=i.y._t(t.max.y),h=i.y._t(t.min.y),u=r-s,a=o-h,f=Math.abs(u*Math.sin(n))+Math.abs(a*Math.cos(n)),c=l(u/2-Math.sin(n)*(f/2),a/2-Math.cos(n)*(f/2)),d=l(u/2+Math.sin(n)*(f/2),a/2+Math.cos(n)*(f/2));return{bounds:[s*e,h*e,u*e,a*e],startPoint:[c.x*e,c.y*e],endPoint:[d.x*e,d.y*e]}}var HX,jX=function(t,i,n){return function(t,i,n,e){for(var r,s,o,h,u=[],a=0,f=ao(i,n/2),c=e?t[t.length-1]:t[0],d=0,v=0;v<t.length;v+=1){r=t[v],s=v===t.length-1?e?t[0]:t[v]:t[v+1],v>0&&(c=t[v-1]),pr(r,c)&&(c=fo(r,oo(ao(co(s,r),-1)))),pr(r,s)&&(s=fo(r,oo(ao(co(c,r),-1))));var y=vo(c,i),S=vo(r,i),m=vo(s,i),b=oo(co(S,y)),g=oo(co(m,S)),w=fo(b,g),p=l(-w.y,w.x),k=l(-b.y,b.x),x=1/So(p,k),M=uo(p),A=oo(co(b,g)),F=Math.sign(So(p,A))||1,T=lo(p,ao(f,x)),C=lo(p,ao(f,-x));if(M<1||x===1/0){var B={x:0,y:0},L={x:0,y:0},I={x:0,y:0},O={x:0,y:0},P=l(-g.y,g.x),D=Math.sign(So(b,p))||F,_=lo(k,ao(f,D)),R=lo(P,ao(f,D));1===F?(B=_,L=C,I=R,O=C):(B=T,L=_,I=T,O=R);var z=4*Hs(c,r),E=4*Hs(r,s);(x>z||x>E)&&(1===F?(B=_,L=R,I=R,O=_):(B=R,L=_,I=_,O=R));var N=fo(r,B),V=fo(r,L),G=fo(r,I),H=fo(r,O);u[a]=N,u[a+=1]=V,u[a+=1]=G,u[a+=1]=H,a+=1,d=4}else N=fo(r,T),V=fo(r,C),u[a]=N,u[a+=1]=V,a+=1,d=2;h=o,o=t[v]}return e&&(u[a]=u[0],u[a+=1]=u[1],a+=1),[u,d,[h,o]]}(t,i,n,!0)[0]},WX=function(t){function i(i,n,e,r,s){var o=t.call(this,i,n,e,r,s)||this;return o.gO=i,o.cL=new BX,o.wO=Ps,o.pO=Ps,o.yB=i.kO(),o}return n(i,t),i.prototype.xO=function(t,i){var n,e=0,r=Array(0);if(void 0!==i){for(var s=t.length,o=Array(s+i.length),h=0,u=0;h<s;)o[u]=t[h],o[u+1]=i[h],u+=2,h+=1;r=o,e=this.yB.gl.TRIANGLE_STRIP}else r=t,e=this.yB.gl.TRIANGLE_FAN;var a=os(r,this.Rt.Ei());return n=r.length,[r,this.yB.qL(a),n,e]},i.prototype.MO=function(t,i,n,e){var r=Array(0);if(void 0===i)r=t;else{var s=0,o=0,h=t.length;for(s=0,o=h,r=Array(h+i.length-2),i.reverse();s<h;)r[s]=t[s],r[o]=i[s],o+=1,s+=1}if(1===n||-1===n)return[os(r,this.Rt.Ei()),r.length];var u=jX(r,e,n);return[os(u,this.Rt.Ei()),u.length]},i.prototype.Fe=function(){var t,i,n,e,r,s,o=this.Uo()||this.t();if(this.Yo()){var u=Math.abs(this.bt.S()-this.Ou.S());this.cL.$I(this.Rt);var a=!1;(!this.Qp||this.Rt.Qi()||o)&&(this.Qp=this.Rt.tn(),a=!0);var f=this.Pu.S(),c=this.Du.S(),d=h(pj(this.th.S(),this.Ou.S(),this.bt.S(),this.Pu.S(),this.Du.S(),this.Ru.S()),2),v=d[0],y=d[1],S=this._u.S(),m=S>0?pj(this.th.S(),this.Ou.S(),this.bt.S(),this.Pu.S()*S/100,this.Du.S()*S/100,y)[0]:[this.th.S()],g=v.length-1;if(2===g){var w=(v[g-1].x+v[1].x)/2,p=(v[g-1].y+v[1].y)/2;this.zu=l(w,p)}else{var k=Math.floor(g/2);this.zu=l(v[k].x,v[k].y)}this.Eu=v[1];var x=v.length-1;this.Nu=v[x],this._u.S()&&(v.shift(),m.shift());var M=!1;(this.t()||this.th.t||this.Ou.t||this.bt.t||this.Pu.t||this.Du.t||this._u.t||this.Ru.t||a)&&(this.pO=b(l(this.kh().x-f,this.kh().y-c),l(this.kh().x+f,this.kh().y+c)),M=!0,this.th.t=!1,this.Ou.t=!1,this.bt.t=!1,this.Pu.t=!1,this.Du.t=!1,this._u.t=!1,this.Ru.t=!1,this.Go());var A=this.jo();(M||A)&&this.Ho!==Re&&(this._u.S()?(this.AO&&this.yB.gl.deleteBuffer(this.AO),t=h(this.xO(v,m),4),this.FO=t[0],this.AO=t[1],this.TO=t[2],this.CO=t[3]):(this.AO&&this.yB.gl.deleteBuffer(this.AO),i=h(this.xO(v,void 0),4),this.FO=i[0],this.AO=i[1],this.TO=i[2],this.CO=i[3]),this.Ho instanceof Je?this.BO=VX(this.pO,this.Rt,this.Ho.getPosition(),this.Ho.getExtent(),this.Ho.getShape(),this.yB.uL()):this.Ho instanceof Qe?this.LO=GX(this.pO,this.Rt,this.Ho.getAngle(!0),this.yB.uL()):(this.BO=void 0,this.LO=void 0)),A&&(this.IO=this.yB.FI(EX["2D"],EX.Color({dataType:this.Ho instanceof Je||this.Ho instanceof Qe?["gradient",this.Ho]:"uniform"}),EX.VertexLocation({axisWorldTranslation:NX(this.Rt),normalSource:void 0})),this.Xo(this.Ho));var F=this.Zo;if(F instanceof nr&&(M||this.Jo(F.getThickness()))){this._u.S()?360===u?(v.pop(),m.pop(),n=h(this.MO(v,void 0,F.getThickness(),this.Qp),2),this.OO=n[0],this.PO=n[1],this.DO&&this.OO?this.yB.$L(this.DO,this.OO,!0):!this.DO&&this.OO?this.DO=this.yB.qL(this.OO,!0):this.DO&&!this.OO&&(this.yB.VI(this.DO),this.DO=void 0),e=h(this.MO(m,void 0,F.getThickness(),this.Qp),2),this._O=e[0],this.RO=e[1],this.zO&&this._O?this.yB.$L(this.zO,this._O,!0):!this.zO&&this._O?this.zO=this.yB.qL(this._O,!0):this.zO&&!this._O&&(this.yB.VI(this.zO),this.zO=void 0)):(r=h(this.MO(v,m,F.getThickness(),this.Qp),2),this.OO=r[0],this.PO=r[1],this.DO&&this.OO?this.yB.$L(this.DO,this.OO,!0):!this.DO&&this.OO?this.DO=this.yB.qL(this.OO,!0):this.DO&&!this.OO&&(this.yB.VI(this.DO),this.DO=void 0),this._O&&(this.zO&&this.yB.gl.deleteBuffer(this.zO),this.zO=void 0,this.RO=0)):(360===u&&(v.shift(),v.pop()),s=h(this.MO(v,void 0,F.getThickness(),this.Qp),2),this.OO=s[0],this.PO=s[1],this.DO&&this.OO?this.yB.$L(this.DO,this.OO,!0):!this.DO&&this.OO?this.DO=this.yB.qL(this.OO,!0):this.DO&&!this.OO&&(this.yB.VI(this.DO),this.DO=void 0));var T=F.getFillStyle();T instanceof Je?this.EO=VX(this.pO,this.Rt,T.getPosition(),T.getExtent(),T.getShape(),this.yB.uL()):T instanceof Qe?this.NO=GX(this.pO,this.Rt,T.getAngle(!0),this.yB.uL()):(this.EO=void 0,this.NO=void 0),this.VO=T===Re?void 0:this.yB.FI(EX["2D"],EX.Color({dataType:T instanceof Je||T instanceof Qe?["gradient",T]:"uniform"}),EX.VertexLocation({axisWorldTranslation:NX(this.Rt),normalSource:void 0})),this.Qo(F)}if(M){var C=1,B=1;F instanceof nr&&(C=F.getThickness()*this.Qp.x,B=F.getThickness()*this.Qp.y),this.wO=b(l(this.pO.min.x-C,this.pO.min.y-B),l(this.pO.max.x+C,this.pO.max.y+B))}}return this},i.prototype.vB=function(){var t=this;if(this.Yo()){this.Fe();var i=this.Ho,n=this.IO,e=this.AO;n&&e&&this.yB.rL(n).NI(n,(function(r,s,o,h){t.yB.VL(r("uScale"),t.cL.aO()).VL(r("uDisp"),t.cL.uO()).VL(h("uScaleStart_highpart"),t.cL.fO()).VL(h("uScaleStart_lowpart"),t.cL.cO()).UI(o,e,t.Rt.Ei(),void 0),i instanceof Ee?t.yB.YL(r("uColor"),i.getColor()):i instanceof Je?t.BO&&t.yB.GI(n,t.BO,i):i instanceof Qe&&t.LO&&t.yB.HI(n,t.LO,i),t.yB.Ky(t.CO,t.TO)}));var r=this.Zo;r instanceof nr&&(void 0!==this.DO&&this.GO(this.DO,this.PO,r),void 0!==this.zO&&this.GO(this.zO,this.RO,r))}return this},i.prototype.GO=function(t,i,n){var e=this,r=this.VO,s=n.getFillStyle();r&&this.yB.rL(r).NI(r,(function(o,h,u,a){e.yB.VL(o("uScale"),e.cL.aO()).VL(o("uDisp"),e.cL.uO()).UI(u,t,e.Rt.Ei(),void 0),s instanceof Ee?e.yB.YL(o("uColor"),s.getColor()):s instanceof Je?e.EO&&e.yB.GI(r,e.EO,s):s instanceof Qe&&e.NO&&e.yB.HI(r,e.NO,s);var f=n.getThickness(),c=-1===f||1===f;e.yB.Ky(c?e.yB.gl.LINE_LOOP:e.yB.gl.TRIANGLE_STRIP,i)}))},i.prototype.HO=function(t,i){if(this.Yo()&&this.Qp){var n=sr({x:t,y:i},this.oo.Rt,this.Rt);if(eo.Ut(n,this.wO.min,this.wO.max)){if(eo.Ut(n,this.pO.min,this.pO.max)&&this.Ho!==Re&&this.FO){var e=this.FO.length,r=2;if(this._u.S())for(;r<e;){if(eo.jt(n,this.FO[r-2],this.FO[r-1],this.FO[r])&&$s(n,this.FO[r-2],this.FO[r-1],this.FO[r]))return!0;r+=1}else for(;r<e;){if(eo.jt(n,this.FO[0],this.FO[r-1],this.FO[r])&&$s(n,this.FO[0],this.FO[r-1],this.FO[r]))return!0;r+=1}}var s=this.Zo;if(s instanceof nr){if(this.OO&&1!==s.getThickness()){if(Zs(n,this.OO))return!0}else if(this.OO)for(var o=this.OO.length-1,h=this.Qp.y,u=this.Qp.x,a=0;a<o;a+=1){if(0!==(p=so(g=l(this.OO[a],this.OO[a+1]),w=l(this.OO[a+2],this.OO[a+3]))).x||0!==p.y||eo.Wt(n,g,w))if(Math.abs(p.x/this.Qp.x)>Math.abs(p.y/this.Qp.y)){var f=l(g.x,g.y+h),c=l(g.x,g.y-h),d=l(w.x,w.y+h),v=l(w.x,w.y-h);if($s(n,f,c,d)||$s(n,d,v,f))return!0}else{var y=l(g.x+u,g.y),S=l(g.x-u,g.y),m=l(w.x+u,w.y),b=l(w.x-u,w.y);if($s(n,y,S,m)||$s(n,m,b,y))return!0}}if(this._O&&1!==s.getThickness()){if(Zs(n,this._O))return!0}else if(this._O)for(o=this._O.length-1,h=2*this.Qp.y,u=2*this.Qp.x,a=0;a<o;a+=1){var g,w,p;if(0!==(p=so(g=l(this._O[a],this._O[a+1]),w=l(this._O[a+2],this._O[a+3]))).x||0!==p.y||eo.Wt(n,g,w))if(Math.abs(p.x/this.Qp.x)>Math.abs(p.y/this.Qp.y)){f=l(g.x,g.y+h),c=l(g.x,g.y-h),d=l(w.x,w.y+h),v=l(w.x,w.y-h);if($s(n,f,c,d)||$s(n,d,v,f))return!0}else{y=l(g.x+u,g.y),S=l(g.x-u,g.y),m=l(w.x+u,w.y),b=l(w.x-u,w.y);if($s(n,y,S,m)||$s(n,m,b,y))return!0}}}}}return!1},i.prototype.ZB=function(){return this.jO&&(this.yB.VI(this.jO),this.jO=void 0),this.WO&&(this.yB.VI(this.WO),this.WO=void 0),this.AO&&(this.yB.VI(this.AO),this.AO=void 0),this.DO&&(this.yB.VI(this.DO),this.DO=void 0),this.zO&&(this.yB.VI(this.zO),this.zO=void 0),this},i}(LE),UX=function(t){function i(i,n,e,r,s){var o=t.call(this,i,n,e,r,s)||this;return o.gO=i,o.cL=new BX,o.wO=Ps,o.yB=i.kO(),o}return n(i,t),i.prototype.Pw=function(t){var i,n,e,r=Number.MAX_VALUE;try{for(var s=o(this.Dh),h=s.next();!h.done;h=s.next()){var u=h.value,a=Hs(sr(u,this.Rt,this.oo.Rt),t);a<r&&(r=a,e=u)}}catch(t){i={error:t}}finally{try{h&&!h.done&&(n=s.return)&&n.call(s)}finally{if(i)throw i.error}}return e},i.prototype.Fe=function(){var t=this.Uo()||this.t();if(this.Yo()){this.cL.$I(this.Rt);var i=!1;(!this.Qp||this.Rt.Qi()||t)&&(this.Qp=this.Rt.tn(),i=!0);var n=!1;(this.t()||i)&&(this.wO=Ks(this.Dh),this.Go(),n=!0);var e=this.Dh.length,r=this.jo();(r||n)&&(this.Nh=Ks(this.Dh),this.Ho!==Re&&(this.AO&&this.yB.gl.deleteBuffer(this.AO),this.AO=this.yB.qL(os(this.Dh,this.Rt.Ei())),this.TO=e),this.Ho instanceof Je?this.BO=VX(this.Nh,this.Rt,this.Ho.getPosition(),this.Ho.getExtent(),this.Ho.getShape(),this.yB.uL()):this.Ho instanceof Qe?this.LO=GX(this.Nh,this.Rt,this.Ho.getAngle(!0),this.yB.uL()):(this.BO=void 0,this.LO=void 0)),r&&(this.IO=this.Ho===Re?void 0:this.yB.FI(EX["2D"],EX.Color({dataType:this.Ho instanceof Je||this.Ho instanceof Qe?["gradient",this.Ho]:"uniform"}),EX.VertexLocation({axisWorldTranslation:NX(this.Rt),normalSource:void 0})),this.Xo(this.Ho));var s=this.Zo;if(s instanceof nr){var o=s.getThickness();if(n||this.Jo(s.getThickness())){var h=1===o||-1===o?this.Dh:jX(this.Dh,this.Qp,o);this.OO=os(h,this.Rt.Ei()),this.DO&&this.OO?(this.yB.$L(this.DO,this.OO,!0),this.PO=h.length):!this.DO&&this.OO?(this.DO=this.yB.qL(this.OO,!0),this.PO=h.length):this.DO&&!this.OO&&(this.yB.VI(this.DO),this.DO=void 0,this.PO=0);var u=s.getFillStyle();u instanceof Je?this.EO=VX(this.Nh,this.Rt,u.getPosition(),u.getExtent(),u.getShape(),this.yB.uL()):u instanceof Qe?this.NO=GX(this.Nh,this.Rt,u.getAngle(!0),this.yB.uL()):(this.EO=void 0,this.NO=void 0),this.VO=u===Re?void 0:this.yB.FI(EX["2D"],EX.Color({dataType:u instanceof Je||u instanceof Qe?["gradient",u]:"uniform"}),EX.VertexLocation({axisWorldTranslation:NX(this.Rt),normalSource:void 0})),this.Qo(s);var a=o*this.Qp.x,f=o*this.Qp.y;this.wO=b(l(this.Nh.min.x-a,this.Nh.min.y-f),l(this.Nh.max.x+a,this.Nh.max.y+f))}}}return this},i.prototype.vB=function(){var t=this;if(this.Yo()){this.Fe();var i=this.Ho,n=this.IO,e=this.AO,r=this.TO;n&&e&&r&&this.yB.rL(n).NI(n,(function(s,o,h,u){t.yB.VL(s("uScale"),t.cL.aO()).VL(s("uDisp"),t.cL.uO()).VL(u("uScaleStart_highpart"),t.cL.fO()).VL(u("uScaleStart_lowpart"),t.cL.cO()).UI(h,e,t.Rt.Ei(),void 0),i instanceof Ee?t.yB.YL(s("uColor"),i.getColor()).Ky(t.yB.gl.TRIANGLE_FAN,r):i instanceof Je?t.BO&&(t.yB.GI(n,t.BO,i),t.yB.Ky(t.yB.gl.TRIANGLE_FAN,r)):i instanceof Qe&&t.LO&&(t.yB.HI(n,t.LO,i),t.yB.Ky(t.yB.gl.TRIANGLE_FAN,r))}));var s=this.VO,o=this.DO,h=this.PO,u=this.Zo;s&&o&&h&&this.yB.rL(s).NI(s,(function(i,n,e,r){if(t.yB.VL(i("uScale"),t.cL.aO()).VL(i("uDisp"),t.cL.uO()).UI(e,o,t.Rt.Ei(),void 0),u instanceof nr){var h=u.getFillStyle();h instanceof Ee?t.yB.YL(i("uColor"),h.getColor()):h instanceof Je?t.EO&&t.yB.GI(s,t.EO,h):h instanceof Qe&&t.NO&&t.yB.HI(s,t.NO,h);var a=u.getThickness(),f=-1===a||1===a;t.yB.Ky(f?t.yB.gl.LINE_LOOP:t.yB.gl.TRIANGLE_STRIP,t.PO)}}))}return this},i.prototype.HO=function(t,i){if(this.Yo()){var n=sr({x:t,y:i},this.oo.Rt,this.Rt);if(eo.Ut(n,this.wO.min,this.wO.max)){if(eo.Ut(n,this.Nh.min,this.Nh.max)&&this.Ho!==Re&&this.Dh)for(var e=this.Dh.length,r=2;r<e;){if(eo.jt(n,this.Dh[0],this.Dh[r-1],this.Dh[r])&&$s(n,this.Dh[0],this.Dh[r-1],this.Dh[r]))return!0;r+=1}var s=this.Zo;if(s instanceof nr){if(this.OO&&1!==s.getThickness())return Zs(n,this.OO);if(this.OO)for(var o=this.Dh.length-1,h=this.Qp.y,u=this.Qp.x,a=0;a<o;a+=1){var f=this.Dh[a],c=this.Dh[a+1],d=so(f,c);if(0!==d.x||0!==d.y||eo.Wt(n,f,c))if(Math.abs(d.x/this.Qp.x)>Math.abs(d.y/this.Qp.y)){var v=l(f.x,f.y+h),y=l(f.x,f.y-h),S=l(c.x,c.y+h),m=l(c.x,c.y-h);if($s(n,v,y,S)||$s(n,S,m,v))return!0}else{var b=l(f.x+u,f.y),g=l(f.x-u,f.y),w=l(c.x+u,c.y),p=l(c.x-u,c.y);if($s(n,b,g,w)||$s(n,w,p,b))return!0}}}}}return!1},i.prototype.ZB=function(){return this.jO&&(this.yB.VI(this.jO),this.jO=void 0),this.AO&&(this.yB.VI(this.AO),this.AO=void 0),this.DO&&(this.yB.VI(this.DO),this.DO=void 0),this},i}(FE),YX=function(t,i,n){void 0===n&&(n=200);var e=n-1;t<=1&&(t+=1),i<=1&&(i+=1);for(var r=Math.ceil((t-1)/e),s=Math.ceil((i-1)/e),o=Array.from(Array(r)).map((function(){return Array(s)})),h=0,u=0,a=0,f=t-1;h<r;h+=1){var c=Math.min(e,f);f-=c,a+=c;for(var l=0,d=0,v=0,y=i-1;l<s;l+=1){var S=Math.min(e,y);y-=S,v+=S,o[h][l]={row:{start:u,end:a},column:{start:d,end:v}},d=v}u=a}return{tiles:o,tilesCount:{x:s,y:r}}},XX=function(t){for(var i=t.tiles,n=t.tilesCount,e=n.x,r=n.y,s=Array(r*e),o=0,h=0;o<r;o+=1)for(var u=0;u<e;u+=1)s[h]={range:i[o][u]},h+=1;return s},ZX=function(t,i,n,r,s){var o=n.range,u={row:e({},o.row),column:e({},o.column)};if(u.row.end+=1,u.column.end+=1,i){u.row.end+=1,u.column.end+=1;c=Or(t,u);var a=h(r.pixelated(c.sliced,c.rows*c.columns,s),5),f=(d=a[0],v=a[1],a[2]);S=a[3],m=a[4];n.vbo=d,n.ibo=v,n.length=f,n.lengthWireframe=S,n.boundary=m}else{var c=Or(t,u),l=h(r.nonPixelated(c.sliced,c.rows*c.columns,s),5),d=l[0],v=l[1],y=l[2],S=l[3],m=l[4];n.vbo=d,n.ibo=v,n.length=y,n.lengthWireframe=S,n.boundary=m}},KX={pixelated:function(t,i){for(var n=t.length,e=i/n,r=n-1,s=e-1,o=r*s*6,h=Array(2*(r*s*4)),u=Array(o),a=b(d(Is,Is),d(Os,Os)),f=0,c=1,l=2,v=3,y=0,S=0,m=0;m<n;m+=1)for(var g=0;g<e;g+=1){var w=t[m][g];if(a.min.x=Math.min(a.min.x,w.x),a.min.y=Math.min(a.min.y,w.y),a.max.x=Math.max(a.max.x,w.x),a.max.y=Math.max(a.max.y,w.y),m<r&&g<s){var p=t[m][g],k=t[m+1][g],x=t[m][g+1],M=t[m+1][g+1];h[y+0]=p.x,h[y+1]=p.y,h[y+2]=k.x,h[y+3]=k.y,h[y+4]=x.x,h[y+5]=x.y,h[y+6]=M.x,h[y+7]=M.y,y+=8,u[S+0]=f,u[S+1]=c,u[S+2]=l,u[(S+=3)+0]=l,u[S+1]=v,u[S+2]=c,S+=3,f+=4,c+=4,l+=4,v+=4}}var A=u.length;for(g=0;g<s;g+=1){var F=4*((m=0)*s+g);u[S+0]=F+0,u[S+1]=F+2,S+=2}for(m=0;m<r;m+=1){F=4*(m*s+(g=s-1));u[S+0]=F+2,u[S+1]=F+3,S+=2}var T=u.length;return[h,new Uint16Array(u),A,T,a]},nonPixelated:function(t,i){for(var n=t.length,e=i/n,r=n-1,s=e-1,o=Array(2*i),h=Array(r*s*6),u=b(d(Is,Is),d(Os,Os)),a=0,f=0;f<n;f+=1)for(var c=0;c<e;c+=1){var l=t[f][c];o[a+0]=l.x,o[a+1]=l.y,a+=2,u.min.x=Math.min(u.min.x,l.x),u.min.y=Math.min(u.min.y,l.y),u.max.x=Math.max(u.max.x,l.x),u.max.y=Math.max(u.max.y,l.y)}var v=0;for(f=0;f<r;f+=1)for(c=0;c<s;c+=1)h[v+0]=f*e+c,h[v+1]=f*e+c+1,h[v+2]=(f+1)*e+c,h[(v+=3)+0]=f*e+c+1,h[v+1]=(f+1)*e+c+1,h[v+2]=(f+1)*e+c,v+=3;var y=h.length;for(f=0;f<r;f+=1){var S=s-1;h[v+0]=f*e+0,h[v+1]=(f+1)*e+0,h[v+2]=f*e+S+1,h[v+3]=(f+1)*e+S+1,v+=4}var m=h.length;return[o,new Uint16Array(h),y,m,u]},verticesPerPixelatedCell:4},qX={pixelated:function(t,i,n){for(var e={x:n.x.pS(),y:n.y.pS(),z:n.z.pS()},r=t.length,s=i/r,o=Array(r),h=0;h<r;h+=1)for(var u=o[h]=Array(s),a=0;a<s;a+=1){var f=t[h][a],c=h>=r-1,l=a>=s-1,d=t[c?h-1:h+1][a],v=t[h][l?a-1:a+1],y=Ls.normalize(Ls.cross(Ls.divideVec(Ls.subtractVec(c?d:f,c?f:d),e),Ls.divideVec(Ls.subtractVec(l?f:v,l?v:f),e)));u[a]=y}var m=r-1,g=s-1,w=m*g*6,p=Array(6*(m*g*6)),k=Array(w),x=b(S(Is,Is,Is),S(Os,Os,Os)),M=0,A=1,F=2,T=3,C=0,B=0;for(h=0;h<r;h+=1)for(a=0;a<s;a+=1){var L=t[h][a];if(x.min.x=Math.min(x.min.x,L.x),x.min.y=Math.min(x.min.y,L.y),x.min.z=Math.min(x.min.z,L.z),x.max.x=Math.max(x.max.x,L.x),x.max.y=Math.max(x.max.y,L.y),x.max.z=Math.max(x.max.z,L.z),h<m&&a<g){var I=t[h][a],O=o[h][a],P=t[h+1][a],D=o[h+1][a],_=t[h][a+1],R=o[h][a+1],z=t[h+1][a+1],E=o[h+1][a+1];p[C+0]=I.x,p[C+1]=I.y,p[C+2]=I.z,p[(C+=3)+0]=O.x,p[C+1]=O.y,p[C+2]=O.z,p[(C+=3)+0]=P.x,p[C+1]=P.y,p[C+2]=P.z,p[(C+=3)+0]=D.x,p[C+1]=D.y,p[C+2]=D.z,p[(C+=3)+0]=_.x,p[C+1]=_.y,p[C+2]=_.z,p[(C+=3)+0]=R.x,p[C+1]=R.y,p[C+2]=R.z,p[(C+=3)+0]=z.x,p[C+1]=z.y,p[C+2]=z.z,p[(C+=3)+0]=E.x,p[C+1]=E.y,p[C+2]=E.z,C+=3,k[B+0]=M,k[B+1]=F,k[B+2]=A,k[B+3]=A,k[B+4]=F,k[B+5]=T,B+=6,M+=4,A+=4,F+=4,T+=4}}var N=k.length;for(a=0;a<g;a+=1){var V=4*((h=0)*g+a);k[B+0]=V+0,k[B+1]=V+2,B+=2}for(h=0;h<m;h+=1){V=4*(h*g+(a=g-1));k[B+0]=V+2,k[B+1]=V+3,B+=2}var G=k.length;return[p,new Uint16Array(k),N,G,x]},nonPixelated:function(t,i,n){for(var e={x:n.x.pS(),y:n.y.pS(),z:n.z.pS()},r=t.length,s=i/r,o=r-1,h=s-1,u=Array(3*i),a=Array(o*h*6),f=b(S(Is,Is,Is),S(Os,Os,Os)),c=0,l=0;l<r;l+=1)for(var d=0;d<s;d+=1){var v=t[l][d],y=l>=r-1,m=d>=s-1,g=t[y?l-1:l+1][d],w=t[l][m?d-1:d+1],p=Ls.normalize(Ls.cross(Ls.divideVec(Ls.subtractVec(y?g:v,y?v:g),e),Ls.divideVec(Ls.subtractVec(m?v:w,m?w:v),e)));u[c+0]=v.x,u[c+1]=v.y,u[c+2]=v.z,u[(c+=3)+0]=p.x,u[c+1]=p.y,u[c+2]=p.z,c+=3,f.min.x=Math.min(f.min.x,v.x),f.min.y=Math.min(f.min.y,v.y),f.min.z=Math.min(f.min.z,v.z),f.max.x=Math.max(f.max.x,v.x),f.max.y=Math.max(f.max.y,v.y),f.max.z=Math.max(f.max.z,v.z)}var k=0;for(l=0;l<o;l+=1)for(d=0;d<h;d+=1)a[k+0]=l*s+d,a[k+1]=l*s+d+1,a[k+2]=(l+1)*s+d,a[(k+=3)+0]=l*s+d+1,a[k+1]=(l+1)*s+d+1,a[k+2]=(l+1)*s+d,k+=3;var x=a.length;for(l=0;l<o;l+=1){var M=h-1;a[k+0]=l*s+0,a[k+1]=(l+1)*s+0,a[k+2]=l*s+M+1,a[k+3]=(l+1)*s+M+1,k+=4}var A=a.length;return[u,new Uint16Array(a),x,A,f]},verticesPerPixelatedCell:4},JX=function(t,i,n,r){var s=n.range,o={row:e({},s.row),column:e({},s.column)};o.row.end+=1,o.column.end+=1;var h=Or(t,o);n.intensities=i?function(t,i,n){for(var e=t.length,r=i/e,s=new Float32Array(i*n),o=0,h=0;o<e;o+=1)for(var u=0;u<r;u+=1)for(var a=t[o][u].intensity,f=0;f<n;f+=1)s[h]=a,h+=1;return s}(h.sliced,h.rows*h.columns,r.verticesPerPixelatedCell):function(t,i){for(var n=new Float32Array(i),e=t.length,r=i/e,s=0,o=0;s<e;s+=1)for(var h=0;h<r;h+=1)n[o]=t[s][h].intensity,o+=1;return n}(h.sliced,h.rows*h.columns)},QX=function(t,i,n,r,s){var o=r.range,h={row:e({},o.row),column:e({},o.column)};h.row.end+=1,h.column.end+=1;var u=Or(t,h);r.colors=n?function(t,i,n,e){for(var r=t.length,s=i/r,o=new Float32Array(4*i*e),h=0,u=0;h<r;h+=1)for(var a=0;a<s;a+=1)for(var f=t[h][a].color,c=0;c<e;c+=1)f?(o[u+0]=f.r,o[u+1]=f.g,o[u+2]=f.b,o[u+3]=f.a,u+=4):(o[u+0]=n.r,o[u+1]=n.g,o[u+2]=n.b,o[u+3]=n.a,u+=4);return o}(u.sliced,u.rows*u.columns,i,s.verticesPerPixelatedCell):function(t,i,n){for(var e=new Float32Array(4*i),r=t.length,s=i/r,o=0,h=0;o<r;o+=1)for(var u=0;u<s;u+=1){var a=t[o][u].color;a?(e[h+0]=a.r,e[h+1]=a.g,e[h+2]=a.b,e[h+3]=a.a,h+=4):(e[h+0]=n.r,e[h+1]=n.g,e[h+2]=n.b,e[h+3]=n.a,h+=4)}return e}(u.sliced,u.rows*u.columns,i)},$X=function(t){function i(i,n,e,r,s){var o=t.call(this,i,n,e,r,s)||this;return o.gO=i,o.UO="grid",o.cL=new BX,o.YO=[],o.yB=i.kO(),o}return n(i,t),i.prototype.Fe=function(){var t,i,n,e,r,s,h,u,a,f,c,l,d=this.Uo();if(this.Yo()&&this.Ra&&this.Da){var v=this.yB,y=this.Ho;this.cL.$I(this.Rt);var S=this.Rt.Qi()||d;this.Qp&&!S||(this.Qp=this.Rt.tn());var m=this.xa(),b=d||this.ba||m||this.co;if(d||this.t()||b){if(m||this.co){var g=this.va.S(),w=g.y,p=g.x,k=this.ga?101:201;this.XO=YX(w,p,k),this.ZO=XX(this.XO),this.KO(),this.YO=this.ZO.map((function(){return{vbo:void 0,ibo:void 0,colors:void 0,intensities:void 0,length:0}})),this.va.t=!1,this.ya.t=!1}var x=this.ZO,M=this.YO,A=this.Da;if(b){this.Nh=Ps;try{for(var F=o(x),T=F.next();!T.done;T=F.next()){var C=T.value;ZX(A,this.ga,C,KX,void 0)}}catch(i){t={error:i}}finally{try{T&&!T.done&&(i=F.return)&&i.call(F)}finally{if(t)throw t.error}}var B=0;try{for(var L=o(M),I=L.next();!I.done;I=L.next()){(X=I.value).vbo&&v.gl.deleteBuffer(X.vbo),X.ibo&&v.gl.deleteBuffer(X.ibo);var O=x[B];B+=1,X.vbo=v.qL(O.vbo),X.ibo=v.tI(O.ibo),X.length=O.length,X.lengthWireframe=O.lengthWireframe,this.Nh=Js(this.Nh,O.boundary)}}catch(t){n={error:t}}finally{try{I&&!I.done&&(e=L.return)&&e.call(L)}finally{if(n)throw n.error}}this.ba=!1}}if(this.jo()){y instanceof Ve||(this.gO.BI.uo(this.qO),this.qO=void 0),this.fL=y===Re?void 0:v.FI(EX["2D"],EX.VertexLocation({translation:"grid"===this.UO?{dataType:"uniform",sizeUnit:"axis"}:void 0,axisWorldTranslation:NX(this.Rt),normalSource:void 0}),y instanceof Ee?EX.Color({dataType:"uniform"}):y instanceof Ne?EX.Color({dataType:"attribute"}):y instanceof Ve?EX.Color({dataType:["lookup",y.getLookUpProperty()]}):y instanceof Je||y instanceof Qe?EX.Color({dataType:["gradient",y]}):void 0);var P=this.wa;this.JO=P instanceof Ee?v.FI(EX["2D"],EX.Color({dataType:"uniform"}),EX.VertexLocation({translation:"grid"===this.UO?{dataType:"uniform",sizeUnit:"axis"}:void 0,axisWorldTranslation:NX(this.Rt),normalSource:void 0})):void 0,this.Xo(y),this.Ga=this.wa}var D=this.ZO,_=this.YO,R=this.Ra;if(y instanceof Ve&&y.lut.isValid){if(this.ma){try{for(var z=o(D),E=z.next();!E.done;E=z.next()){var N=E.value;JX(R,this.ga,N,KX)}}catch(t){r={error:t}}finally{try{E&&!E.done&&(s=z.return)&&s.call(z)}finally{if(r)throw r.error}}B=0;try{for(var V=o(_),G=V.next();!G.done;G=V.next()){(X=G.value)&&X.intensities&&v.gl.deleteBuffer(X.intensities);O=D[B];B+=1,X.intensities=v.iI(O.intensities)}}catch(t){h={error:t}}finally{try{G&&!G.done&&(u=V.return)&&u.call(V)}finally{if(h)throw h.error}}this.ma=!1}var H=y.getPalette();this.QO=this.gO.$O(H,this.qO,this.QO),this.qO=H}else if(y instanceof Ne&&(this.tP&&v.zI(this.tP),this.Sa||this.co)){try{for(var j=o(D),W=j.next();!W.done;W=j.next()){N=W.value;QX(R,y.color,this.ga,N,KX)}}catch(t){a={error:t}}finally{try{W&&!W.done&&(f=j.return)&&f.call(j)}finally{if(a)throw a.error}}B=0;try{for(var U=o(_),Y=U.next();!Y.done;Y=U.next()){var X;(X=Y.value).colors&&v.gl.deleteBuffer(X.colors);O=D[B];B+=1,X.colors=v.iI(O.colors)}}catch(t){c={error:t}}finally{try{Y&&!Y.done&&(l=U.return)&&l.call(U)}finally{if(c)throw c.error}}this.Sa=!1}y instanceof Je?this.BO=VX(this.No(),this.Rt,y.getPosition(),y.getExtent(),y.getShape(),this.yB.uL()):y instanceof Qe?this.LO=GX(this.No(),this.Rt,y.getAngle(!0),this.yB.uL()):(this.BO=void 0,this.LO=void 0),this.Go()}return this},i.prototype.vB=function(){var t=this,i=this.Ra&&this.Da;if(this.Yo()&&i){this.Fe();var n=this.fL;if(n){var e=(f=this.Ho)instanceof Ee&&f,r=f instanceof Ve&&f,s=f instanceof Ne&&f,h=f instanceof Je&&f,u=f instanceof Qe&&f;this.yB.NI(n,(function(i,a,f){var c,l;t.yB.rL(n).VL(i("uScale"),t.cL.aO()).VL(i("uDisp"),t.cL.uO()),"grid"===t.UO&&t.yB.VL(i("uTranslationAxis"),[t.St.x,t.St.y]),e&&t.yB.YL(i("uColor"),e.getColor()),r&&r.lut.isValid&&t.QO&&t.yB.XL(i("uLookupMin"),r.lut.min).XL(i("uLookupMax"),r.lut.max).KL(i("uLookupTexture"),t.QO.texture,0).XL(i("uLookupTextureHeightPx"),t.QO.textureHeight),h&&t.yB.GI(n,t.BO,h),u&&t.yB.HI(n,t.LO,u);try{for(var d=o(t.YO),v=d.next();!v.done;v=d.next()){var y=v.value,S=y.vbo,m=y.ibo,b=y.colors,g=y.intensities,w=y.length;t.yB.nI(a("aPos"),S).aI(m),r&&"value"===r.getLookUpProperty()&&t.yB.uI(a("aLookupValue"),g),s&&t.yB.hI(a("aColor"),b),t.yB.fI(w)}}catch(t){c={error:t}}finally{try{v&&!v.done&&(l=d.return)&&l.call(d)}finally{if(c)throw c.error}}}))}var a=this.JO;if(a){var f,c=(f=this.wa)instanceof Ee&&f;this.yB.NI(a,(function(i,n,e){var r,s;t.yB.rL(a).VL(a.yL("uScale"),t.cL.aO()).VL(a.yL("uDisp"),t.cL.uO()),"grid"===t.UO&&t.yB.VL(a.yL("uTranslationAxis"),[t.St.x,t.St.y]),c&&t.yB.YL(a.yL("uColor"),c.getColor());try{for(var h=o(t.YO),u=h.next();!u.done;u=h.next()){var f=u.value,l=f.vbo,d=f.ibo,v=f.lengthWireframe;t.yB.nI(n("aPos"),l).aI(d).fI(v,t.yB.gl.LINES)}}catch(t){r={error:t}}finally{try{u&&!u.done&&(s=h.return)&&s.call(h)}finally{if(r)throw r.error}}}))}}return this},i.prototype.HO=function(t,i){if(this.Yo()&&this.lo.S()&&this.Nh&&this.Da){var n="grid"===this.UO?this.St:{x:0,y:0},e=co(sr({x:t,y:i},this.oo.Rt,this.Rt),n);if(eo.Ut(e,this.Nh.min,this.Nh.max)&&this.Ho!==Re)for(var r=0;r<this.Da.length-1;r+=1)for(var s=0;s<this.Da[r].length-1;s+=1){var o=this.Da[r][s],h=this.Da[r][s+1],u=this.Da[r+1][s],a=this.Da[r+1][s+1];if(eo.Yt(e,o,h,u,a)&&($s(e,o,h,u)||$s(e,h,u,a)))return!0}}return!1},i.prototype.Pw=function(t){var i="grid"===this.UO?this.St:{x:0,y:0},n=t,e=[0,0],r=l(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),s=this.Da,o=this.Ra,h=this.ga,u=0;if(h&&(u=-1),s&&o){for(var a=0;a<s.length+u;a+=1)for(var f=0;f<s[a].length+u;f+=1)if(h){var c=s[a][f],d=s[a][f+1],v=s[a+1][f],y=s[a+1][f+1],S=fo(no(c,d,v,y),i);Math.hypot(S.x-n.x,S.y-n.y)<Math.hypot(r.x-n.x,r.y-n.y)&&(e=[a,f],r=S)}else Math.hypot(s[a][f].x+i.x-n.x,s[a][f].y+i.y-n.y)<Math.hypot(s[e[0]][e[1]].x+i.x-n.x,s[e[0]][e[1]].y+i.y-n.y)&&(e=[a,f]);if(e){o[e[0]]||(e[0]=o.length-1),o[e[0]][e[1]]||(e[1]=o[e[0]].length-1);var m={x:0,y:0},b=o[e[0]][e[1]].intensity;return h?m={x:r.x,y:r.y}:(m.x=s[e[0]][e[1]].x+i.x,m.y=s[e[0]][e[1]].y+i.y),[m,b]}}},i.prototype.ZF=function(t){var i=t,n=this.Da,e=this.Ra,r=this.ga,s=[],o=sr(i,this.Rt,this.oo.Rt);if(n&&!this.HO(o.x,o.y)){for(var h=0;h<n.length-1;h+=1)s.push([n[h][0],n[h+1][0]]),s.push([n[h][n[h].length-1],n[h+1][n[h].length-1]]);for(var u=0;u<n[0].length-1;u+=1)s.push([n[0][u],n[0][u+1]]),s.push([n[n[0].length-1][u],n[n[0].length-1][u+1]]);for(var a=Number.MAX_SAFE_INTEGER,f=l(0,0),c=0;c<s.length;c+=1){var d=Ws(i,s[c][0],s[c][1]);d[0]<a&&(a=d[0],f=d[1])}i.x=f.x,i.y=f.y}var v=[0,0];if(n&&e){for(h=0;h<n.length+-1;h+=1)for(u=0;u<n[h].length+-1;u+=1){var y=n[h][u],S=n[h][u+1],m=n[h+1][u],b=n[h+1][u+1];($s(t,y,S,m)||$s(t,S,m,b))&&(v=[h,u])}if(v){e[v[0]]||(v[0]=e.length-1),e[v[0]][v[1]]||(v[1]=e[v[0]].length-1);var g,w=void 0;if(g=i,r)w=e[v[0]][v[1]].intensity;else{var p={point:n[v[0]][v[1]],value:e[v[0]][v[1]].intensity},k={point:n[v[0]+1][v[1]],value:e[v[0]+1][v[1]].intensity},x={point:n[v[0]][v[1]+1],value:e[v[0]][v[1]+1].intensity},M={point:n[v[0]+1][v[1]+1],value:e[v[0]+1][v[1]+1].intensity};w=su(i,p,k,x,M)}return[g,w]}}},i.prototype.KO=function(){var t,i,n=this.yB;if(this.YO.length>0){try{for(var e=o(this.YO),r=e.next();!r.done;r=e.next()){var s=r.value,h=s||{},u=h.vbo,a=h.ibo,f=h.colors,c=h.intensities;u&&(n.VI(u),s.vbo=void 0),a&&(n.VI(a),s.ibo=void 0),f&&(n.VI(f),s.colors=void 0),c&&(n.VI(c),s.intensities=void 0)}}catch(i){t={error:i}}finally{try{r&&!r.done&&(i=e.return)&&i.call(e)}finally{if(t)throw t.error}}this.YO.length=0}},i.prototype.ZB=function(){return this.KO(),this.tP&&(this.yB.zI(this.tP),this.tP=void 0),this.gO.BI.uo(this.qO),this.QO=void 0,this},i.prototype.Ba=function(i,n){return this.UO="mesh",t.prototype.Ba.call(this,i,n)},i.prototype.Et=function(){return"grid"===this.UO?this.Nh.max.x+this.St.x:this.Nh.max.x},i.prototype.zt=function(){return"grid"===this.UO?this.Nh.min.x+this.St.x:this.Nh.min.x},i.prototype.Vt=function(){return"grid"===this.UO?this.Nh.max.y+this.St.y:this.Nh.max.y},i.prototype.Nt=function(){return"grid"===this.UO?this.Nh.min.y+this.St.y:this.Nh.min.y},i.prototype.cu=function(){return 0},i.prototype.lu=function(){return 0},i}(GE),tZ=function(){function t(){this.first=0,this.second=1,this.third=2,this.fourth=3,this.fifth=4,this.sixth=5}return t.prototype.iP=function(t){return this.first=t,this.second=t+1,this.third=t+2,this.fourth=t+3,this.fifth=t+4,this.sixth=t+5,t+=6,this},t.prototype.nP=function(){return this.first=this.second,this.second=this.third,this.third=this.fourth,this.fourth=this.fifth,this.fifth=this.sixth,this.sixth+=1,this},t.prototype.eP=function(){return this.first=this.third,this.second=this.fourth,this.third=this.fifth,this.fourth=this.sixth,this.fifth=this.fourth+1,this.sixth=this.fifth+1,this},t.prototype.jt=function(t){var i=t.buffer,n=t.position;return i[n]=this.first,i[n+1]=this.second,i[n+2]=this.third,n+=3,t.position=n,t.next&&this.nP(),this},t.prototype.Yt=function(t){var i=t.buffer,n=t.position;return i[n]=this.first,i[n+1]=this.third,i[n+2]=this.second,i[n+3]=this.third,i[n+4]=this.fourth,i[n+5]=this.second,n+=6,t.position=n,t.next&&this.eP(),this},t.prototype.rP=function(t,i){i.next=!0,6*t>=i.buffer.length&&(i.buffer=Array(6*t));for(var n=0;n<t;n+=1)this.Yt(i);return this},Object.defineProperty(t.prototype,"sP",{get:function(){return[this.first,this.second,this.third,this.fourth,this.fifth,this.sixth]},enumerable:!1,configurable:!0}),t}(),iZ=(void 0===HX&&(HX=0),(new tZ).iP(HX)),nZ=function(t,i,n,e,r,s,o,h,u,a){return void 0===h&&void 0===o||iZ.nP(),s.push(t,i),r.push(iZ.first,iZ.second,iZ.third),h=void 0,o=void 0,r.push(iZ.third,iZ.fourth,iZ.second),u=iZ.third,iZ.eP(),a&&s.push(n,e),[o,h,u]},eZ=function(t,i,n,e,r,s,o,h,u,a,f){void 0===u&&void 0===h||iZ.nP(),o.push(t,i),r.push(iZ.first,iZ.second,iZ.third);var c=Mo(t,n,i,e);return u=void 0,void 0!==c&&(void 0===u&&(u=c),o.push(u),s.push(iZ.third,iZ.fourth,iZ.fifth),a=iZ.fourth),iZ.eP(),f&&o.push(n,e),[h,u,a]},rZ=function(t,i,n,e,r,s,o,h,u,a){return void 0===o&&void 0===s||iZ.nP(),r.push(t,i),e.push(iZ.first,iZ.second,iZ.third),s=n,o=void 0,h=iZ.third,a?r.push(n):u=!0,[s,o,h,u]},sZ=function(t,i,n,e,r,s,o,h,u,a,f){return 0!==s.length?(void 0===h&&void 0===o||iZ.nP(),iZ.nP()):u>0&&(iZ.nP(),f>0&&(f-=1)),s.push(t),r.push(iZ.first,iZ.second,iZ.third),u=iZ.second,o=t,h=void 0,a&&s.push(n,e),[o,h,u,f]},oZ=function(t,i){var n,e,r,s,o,u,a,f;void 0===i&&(i=0),iZ.iP(i);var c,l,d=h(t,2),v=d[0],y=d[1],S=v.length,m=[],b=[],g=[],w=i,p=0,k=v[p],x=y[p],M=v[p],A=y[p],F=!1,T=w>0?M.y!==A.y?2:1:0;if(S>1)for(;p<S-1;){M=k,A=x,k=v[p+=1],x=y[p];var C=p===S-1;M.y>A.y?k.y>x.y?(c=(n=h(nZ(M,A,k,x,m,g,c,l,w,C),3))[0],l=n[1],w=n[2]):k.y<x.y?(c=(e=h(eZ(M,A,k,x,m,b,g,c,l,w,C),3))[0],l=e[1],w=e[2]):(c=(r=h(rZ(M,A,k,m,g,c,l,w,F,C),4))[0],l=r[1],w=r[2],F=r[3]):M.y<A.y?k.y<x.y?(c=(s=h(nZ(M,A,k,x,b,g,c,l,w,C),3))[0],l=s[1],w=s[2]):k.y>x.y?(c=(o=h(eZ(M,A,k,x,b,m,g,c,l,w,C),3))[0],l=o[1],w=o[2]):(c=(u=h(rZ(M,A,k,b,g,c,l,w,F,C),4))[0],l=u[1],w=u[2],F=u[3]):k.y===x.y?(c=M,F&&(g.push(M),F=!1,iZ.nP()),0===g.length&&w>0&&T>0&&(T-=1)):k.y>x.y?(c=(a=h(sZ(M,0,k,x,m,g,c,l,w,C,T),4))[0],l=a[1],w=a[2],T=a[3]):(c=(f=h(sZ(M,0,k,x,b,g,c,l,w,C,T),4))[0],l=f[1],w=f[2],T=f[3])}return[g,new Uint16Array(m),new Uint16Array(b),w,T]},hZ=function(t){function i(i,n,e,r,s){var o=t.call(this,i,n,e,r,s)||this;return o.gO=i,o.cL=new BX,o.oP=0,o.Dh=Array(),o.hP=0,o.uP=new Uint16Array(0),o.aP=new Uint16Array(0),o.yB=i.kO(),o}return n(i,t),i.prototype.Fe=function(){var t=this.Uo()||this.t();if(this.Yo()){this.cL.$I(this.Rt);var i=this.Rt instanceof Go==!1,n=i?this.Rt.tn():void 0,e=this.xu(),r=this.Rt.Qi()||t,s=this.t()||this.yu.t||r&&"disabled"!==e.type;if(s){if(this.oP=0,this.uP=new Uint16Array(0),this.aP=new Uint16Array(0),this.Dh.length=0,this.hP=0,this.Su>1){var o=h(oZ([i?e.packager(this.du,n,.5):this.du,i?e.packager(this.vu,n,.5):this.vu]),4),u=o[0],a=o[1],f=o[2],c=o[3];this.oP=c,this.uP=a,this.aP=f,this.Dh=u,this.hP=u.length}this.Go(),this.yu.t=!1}if(this.bu&&this.Gh[0].length>1){var l=h(this.Gh,2),d=l[0],v=l[1],y=d.length,S=h(oZ([i?e.packager(d,n,.5):d,i?e.packager(v,n,.5):v],this.oP),5),m=(u=S[0],a=S[1],f=S[2],c=S[3],S[4]);this.oP=c,this.Nh=this.jh?Js(this.Nh,this.jh):Js(this.Nh,Ks(u));for(var b=u.length,g=m;g<b;g+=1)this.Dh[this.hP]=u[g],this.hP+=1;this.uP=Ao(this.uP,a),this.aP=Ao(this.aP,f);for(g=m>0||this.Su>0?1:m;g<y;g+=1)this.du[this.Su]=d[g],this.vu[this.Su]=v[g],this.Su+=1;this.mu=!0,this.bu=!1,this.Gh=[],this.jh=Ps}var w=this.Ho!==Re,p=this.gu!==Re;if((w||p)&&(w&&(this.Ho instanceof Je?this.BO=VX(this.No(),this.Rt,this.Ho.getPosition(),this.Ho.getExtent(),this.Ho.getShape(),this.yB.uL()):this.Ho instanceof Qe?this.LO=GX(this.No(),this.Rt,this.Ho.getAngle(!0),this.yB.uL()):(this.BO=void 0,this.LO=void 0)),p&&(this.gu instanceof Je?this.fP=VX(this.No(),this.Rt,this.gu.getPosition(),this.gu.getExtent(),this.gu.getShape(),this.yB.uL()):this.gu instanceof Qe?this.cP=GX(this.No(),this.Rt,this.gu.getAngle(!0),this.yB.uL()):(this.fP=void 0,this.cP=void 0)),t||this.mu||s)){if(this.mu||s){u=this.Dh;for(var k=this.hP,x=new Float32Array(2*k),M=0,A=0;M<k;)x[A]=u[M].x,x[A+1]=u[M].y,A+=2,M+=1;this.lP&&this.yB.gl.deleteBuffer(this.lP),this.lP=this.yB.qL(x),w&&(this.dP&&this.yB.gl.deleteBuffer(this.dP),this.dP=this.yB.tI(this.uP),this.vP=this.uP.length),p&&(this.yP&&this.yB.gl.deleteBuffer(this.yP),this.yP=this.yB.tI(this.aP),this.SP=this.aP.length),this.mu=!1}this.Ho!==this.Wo&&(this.mP=w?this.yB.FI(EX["2D"],EX.Color({dataType:this.Ho instanceof Je||this.Ho instanceof Qe?["gradient",this.Ho]:"uniform"}),EX.VertexLocation({axisWorldTranslation:NX(this.Rt),normalSource:void 0})):void 0),this.gu!==this.Lu&&(this.bP=p?this.yB.FI(EX["2D"],EX.Color({dataType:this.gu instanceof Je||this.gu instanceof Qe?["gradient",this.gu]:"uniform"}),EX.VertexLocation({axisWorldTranslation:NX(this.Rt),normalSource:void 0})):void 0),this.Xo(this.Ho),this.Iu(this.gu)}}return this},i.prototype.vB=function(){if(this.Yo()){this.Fe();var t=this.Ho,i=this.gu,n=this.yB.DL;this.bP&&this.lP&&this.yP&&(this.yB.rL(this.bP).nI(n,this.lP).aI(this.yP),this.Rt instanceof Vo||this.Rt instanceof tj?this.yB.VL(this.bP.yL("uScale"),this.cL.aO()).VL(this.bP.yL("uDisp"),this.cL.uO()):this.Rt instanceof Go&&this.yB.VL(this.bP.SL("uScaleStart"),this.cL.MixedScaleXY.uScaleStart).VL(this.bP.SL("uScaleStartLog"),this.cL.MixedScaleXY.uScaleStartLog).VL(this.bP.SL("uScaleInterval"),this.cL.MixedScaleXY.uScaleInterval).VL(this.bP.SL("uScaleIntervalLog"),this.cL.MixedScaleXY.uScaleIntervalLog).VL(this.bP.yL("uViewportStart"),this.cL.MixedScaleXY.uViewportStart).VL(this.bP.yL("uViewportSize"),this.cL.MixedScaleXY.uViewportSize),i instanceof Ee?this.yB.YL(this.bP.yL("uColor"),i.getColor()):i instanceof Je?this.fP&&this.yB.GI(this.bP,this.fP,i):i instanceof Qe&&this.cP&&this.yB.HI(this.bP,this.cP,i),this.yB.fI(this.SP)),this.mP&&this.lP&&this.dP&&(this.yB.rL(this.mP).nI(n,this.lP).aI(this.dP),this.Rt instanceof Vo||this.Rt instanceof tj?this.yB.VL(this.mP.yL("uScale"),this.cL.aO()).VL(this.mP.yL("uDisp"),this.cL.uO()):this.Rt instanceof Go&&this.yB.VL(this.mP.SL("uScaleStart"),this.cL.MixedScaleXY.uScaleStart).VL(this.mP.SL("uScaleStartLog"),this.cL.MixedScaleXY.uScaleStartLog).VL(this.mP.SL("uScaleInterval"),this.cL.MixedScaleXY.uScaleInterval).VL(this.mP.SL("uScaleIntervalLog"),this.cL.MixedScaleXY.uScaleIntervalLog).VL(this.mP.yL("uViewportStart"),this.cL.MixedScaleXY.uViewportStart).VL(this.mP.yL("uViewportSize"),this.cL.MixedScaleXY.uViewportSize),t instanceof Ee?this.yB.YL(this.mP.yL("uColor"),t.getColor()):t instanceof Je?this.BO&&this.yB.GI(this.mP,this.BO,t):t instanceof Qe&&this.LO&&this.yB.HI(this.mP,this.LO,t),this.yB.fI(this.vP))}return this},i.prototype.HO=function(t,i){if(this.Yo()&&this.lo.S()){var n=sr({x:t,y:i},this.oo.Rt,this.Rt),e=vE(this.Nh,{x:this.cu(),y:this.lu()},this.Rt);if(eo.Ut(n,e.min,e.max)){var r=this.Ho,s=this.gu,o=r!==Re,h=s!==Re;if(o||h){var u=this.Dh;if(u){var a=!!o&&Xs(n,u,this.uP),f=!!h&&Xs(n,u,this.aP);return a||f}}}}return!1},i.prototype.Et=function(){return this.Nh.max.x},i.prototype.zt=function(){return this.Nh.min.x},i.prototype.Vt=function(){return this.Nh.max.y},i.prototype.Nt=function(){return this.Nh.min.y},i.prototype.cu=function(){return 0},i.prototype.lu=function(){return 0},i.prototype.Cw=function(t){var i=h(this.Gh.length>0&&this.Gh[0].length>0?[u(u([],h(this.Xh()[0])),h(this.Yh()[0])),u(u([],h(this.Xh()[1])),h(this.Yh()[1]))]:this.Xh(),2),n=i[0],e=i[1],r=n.length>2&&n[1].x<n[0].x,s=eE(n,t,Wz.NearestX,this.wu,this.pu,this.Rt,this.oo.Rt,this.Nh,"x",r);return void 0!==s?[n[s],e[s]]:void 0},i.prototype.WM=function(t){var i=h(this.Gh.length>0&&this.Gh[0].length>0?[u(u([],h(this.Xh()[0])),h(this.Yh()[0])),u(u([],h(this.Xh()[1])),h(this.Yh()[1]))]:this.Xh(),2),n=i[0],e=i[1],r=n.length;if(0!==r){var s=this.wu?1:0,o=r-(this.pu?2:1),a=n.length>2&&n[1].x<n[0].x,f=uE(n,sr(t,this.oo.Rt,this.Rt),"x",a,s,o);return f?[Us(n[f.a],n[f.b],f.lerpAmount),Us(e[f.a],e[f.b],f.lerpAmount)]:void 0}},i.prototype.ZB=function(){return this.yP&&(this.yB.VI(this.yP),this.yP=void 0),this.dP&&(this.yB.VI(this.dP),this.dP=void 0),this.lP&&(this.yB.VI(this.lP),this.lP=void 0),this},i}(BE),uZ=function(t){function i(i,n,e,r,s){var o=t.call(this,i,n,e,r,s)||this;return o.gO=i,o.cL=new BX,o.yB=i.kO(),o}return n(i,t),i.prototype.Fe=function(){var t=this.Ko(),i=this.co,n=this.ia,e=n instanceof nr&&n,r=e&&e.getFillStyle(),s=r instanceof Ee&&r,o=r instanceof Qe&&r,h=r instanceof Je&&r,u=r instanceof Ve&&r,a=e,f=s||o||h||u,c=this.Uo()||this.t();if(this.Yo()&&a&&f){var d=this.ji(),v=this.Hi(),y=this.sa(n.thickness);if(d&&v){var S=n.thickness;this.cL.$I(this.Rt);var m=this.Rt.Qi()||c;if(this.t()||y||m&&1!==S){if(1===S||-1===S)this.gP&&this.yB.gl.deleteBuffer(this.gP),this.gP=this.yB.qL(os([d,v],this.Rt.Ei())),this.wP=void 0,this.pP=this.yB.gl.LINES,this.kP=2;else{var g=this.Rt;if(g instanceof Go){var w=S/2,p=g.nn(d,v,w,0),k=g.nn(d,v,-w,0),x=g.nn(v,d,-w,0),M=g.nn(v,d,w,0);this.wP=[l(p.x,p.y),l(k.x,k.y),l(x.x,x.y),l(M.x,M.y)]}else{var A=g.tn(),F=ho(l(d.x/A.x,d.y/A.y),l(v.x/A.x,v.y/A.y)),T=(w=S/2,l(F.x*A.x*w,F.y*A.y*w));this.wP=[l(d.x-T.x,d.y-T.y),l(d.x+T.x,d.y+T.y),l(v.x+T.x,v.y+T.y),l(v.x-T.x,v.y-T.y)]}this.pP=this.yB.gl.TRIANGLE_FAN,this.kP=4,this.gP&&this.yB.gl.deleteBuffer(this.gP),this.gP=this.yB.qL(os([this.wP[0],this.wP[1],this.wP[2],this.wP[3]],this.Rt.Ei()))}var C=this.wP?Ks(this.wP):b(l(d.x,d.y),l(v.x,v.y));r instanceof Je?this.EO=VX(C,this.Rt,r.getPosition(),r.getExtent(),r.getShape(),this.yB.uL()):r instanceof Qe?this.NO=GX(C,this.Rt,r.getAngle(!0),this.yB.uL()):(this.EO=void 0,this.NO=void 0)}if(t||i)if(this.xP={shader:this.yB.FI(EX["2D"],EX.Color({dataType:h?["gradient",h]:o?["gradient",o]:u?["lookup",u.getLookUpProperty()]:"uniform"}),EX.VertexLocation({axisWorldTranslation:NX(this.Rt),normalSource:void 0})),lineStyle:a,fillStyleSolid:s,fillStylePaletted:u,fillStyleLinearGradient:o,fillStyleRadialGradient:h},u){if(u&&u.lut.isValid){var B=u.getPalette();this.QO=this.gO.$O(B,this.qO,this.QO),this.qO=B}}else this.gO.BI.uo(this.qO),this.qO=void 0;this.oa(n),this.Go()}}else this.xP=void 0;return this.co=!1,this},i.prototype.vB=function(){var t=this;this.Fe();var i=this.gP,n=this.kP;if(!i)return this;var e=this.xP;if(!e)return this;var r=e.shader,s=e.fillStyleSolid,o=e.fillStyleLinearGradient,h=e.fillStyleRadialGradient,u=e.fillStylePaletted;return this.yB.rL(r).NI(r,(function(e,a,f){t.Rt instanceof Vo||t.Rt instanceof tj?t.yB.VL(r.yL("uScale"),t.cL.aO()).VL(r.yL("uDisp"),t.cL.uO()).VL(r.SL("uScaleStart_highpart"),t.cL.fO()).VL(r.SL("uScaleStart_lowpart"),t.cL.cO()):t.Rt instanceof Go&&t.yB.VL(r.SL("uScaleStart"),t.cL.MixedScaleXY.uScaleStart).VL(r.SL("uScaleStartLog"),t.cL.MixedScaleXY.uScaleStartLog).VL(r.SL("uScaleInterval"),t.cL.MixedScaleXY.uScaleInterval).VL(r.SL("uScaleIntervalLog"),t.cL.MixedScaleXY.uScaleIntervalLog).VL(r.yL("uViewportStart"),t.cL.MixedScaleXY.uViewportStart).VL(r.yL("uViewportSize"),t.cL.MixedScaleXY.uViewportSize),s?t.yB.YL(r.yL("uColor"),s.getColor()):h?t.EO&&i&&t.yB.GI(r,t.EO,h):o?t.NO&&i&&t.yB.HI(r,t.NO,o):u&&t.QO&&t.yB.KL(e("uLookupTexture"),t.QO.texture,0).XL(e("uLookupMin"),u.lut.min).XL(e("uLookupMax"),u.lut.max).XL(e("uLookupTextureHeightPx"),t.QO.textureHeight),t.yB.UI(f,i,t.Rt.Ei(),void 0).Ky(t.pP,n)})),this},i.prototype.HO=function(t,i){var n=this.Rt;if(this.Yo()){var e=sr({x:t,y:i},this.oo.Rt,this.Rt);if(this.wP)return!(!eo.Yt(e,this.wP[0],this.wP[1],this.wP[2],this.wP[3])||!$s(e,this.wP[0],this.wP[1],this.wP[2])&&!$s(e,this.wP[2],this.wP[3],this.wP[0]));if(n instanceof Go)return!1;var r=n.tn(),s=this.ji(),o=this.Hi();if(s&&o){var h=so(s,o);if(0!==h.x||0!==h.y||eo.Wt(e,s,o)){if(Math.abs(h.x/r.x)>Math.abs(h.y/r.y)){var u=r.y,a=l(s.x,s.y+u),f=l(s.x,s.y-u),c=l(o.x,o.y+u),d=l(o.x,o.y-u);return $s(e,a,f,c)||$s(e,c,d,a)}var v=r.x,y=l(s.x+v,s.y),S=l(s.x-v,s.y),m=l(o.x+v,o.y),b=l(o.x-v,o.y);return $s(e,y,S,m)||$s(e,m,b,y)}}}return!1},i.prototype.dispose=function(){return t.prototype.dispose.call(this),this.qO&&(this.gO.BI.uo(this.qO),this.qO=void 0),this.QO=void 0,this.xP=void 0,this.gP&&(this.yB.VI(this.gP),this.gP=void 0),this},i.prototype.ZB=function(){return this},i}(EE),aZ=function(t){function i(i,n,e,r,s){var o=t.call(this,i,n,e,r,s)||this;return o.gO=i,o.cL=new BX,o.yB=i.kO(),o.fL=o.yB.FI(EX["2D"],EX.Color({dataType:"uniform"}),EX.VertexLocation({axisWorldTranslation:NX(o.Rt),normalSource:void 0})),o}return n(i,t),i.prototype.Fe=function(){var t=this.ia,i=this.ua,n=this.Uo()||this.t();if(this.Yo()&&t instanceof nr){var e=t.getThickness(),r=this.sa(e);this.cL.$I(this.Rt);var s=this.Rt.Qi()||n;if(this.t()||r||s&&1!==e)if(this.gP&&this.yB.gl.deleteBuffer(this.gP),1===e||-1===e){var o=os(i,this.Rt.Ei());this.gP=this.yB.qL(o),this.kP=i.length,this.pP=this.yB.gl.LINES}else{for(var h=[],u=0;u<i.length;u+=2){var a=i[u],f=i[u+1],c=this.Rt;if(c instanceof Go){var d=e/2,v=c.nn(a,f,d,0),y=c.nn(a,f,-d,0),S=c.nn(f,a,-d,0),m=c.nn(f,a,d,0);h=h.concat([v,y,m,v,m,S])}else{var b=c.tn(),g=ho(l(a.x/b.x,a.y/b.y),l(f.x/b.x,f.y/b.y)),w=(d=e/2,l(g.x*b.x*d,g.y*b.y*d));v=l(a.x-w.x,a.y-w.y),y=l(a.x+w.x,a.y+w.y),S=l(f.x+w.x,f.y+w.y),m=l(f.x-w.x,f.y-w.y);this.wP=(this.wP||[]).concat([v,y,S,m]),h=h.concat([v,y,S,v,S,m])}}this.pP=this.yB.gl.TRIANGLES,this.gP=this.yB.qL(os(h,this.Rt.Ei())),this.kP=h.length}this.oa(t),this.Go()}return this},i.prototype.vB=function(){var t=this,i=this.ia;if(this.Yo()&&i instanceof nr){this.Fe();var n=i.getFillStyle();n instanceof Ee&&(this.yB.rL(this.fL),this.yB.NI(this.fL,(function(i,e,r){t.Rt instanceof Vo||t.Rt instanceof tj?t.yB.VL(t.fL.yL("uScale"),t.cL.aO()).VL(t.fL.yL("uDisp"),t.cL.uO()).VL(t.fL.SL("uScaleStart_highpart"),t.cL.fO()).VL(t.fL.SL("uScaleStart_lowpart"),t.cL.cO()):t.Rt instanceof Go&&t.yB.VL(t.fL.SL("uScaleStart"),t.cL.MixedScaleXY.uScaleStart).VL(t.fL.SL("uScaleStartLog"),t.cL.MixedScaleXY.uScaleStartLog).VL(t.fL.SL("uScaleInterval"),t.cL.MixedScaleXY.uScaleInterval).VL(t.fL.SL("uScaleIntervalLog"),t.cL.MixedScaleXY.uScaleIntervalLog).VL(t.fL.yL("uViewportStart"),t.cL.MixedScaleXY.uViewportStart).VL(t.fL.yL("uViewportSize"),t.cL.MixedScaleXY.uViewportSize),t.yB.YL(t.fL.yL("uColor"),n.getColor()).UI(r,t.gP,t.Rt.Ei(),void 0).Ky(t.pP,t.kP)})))}return this},i.prototype.HO=function(t,i){return!1},i.prototype.ZB=function(){return this.gP&&(this.yB.VI(this.gP),this.gP=void 0),this},i}(NE),fZ=function(t){function i(i,n){var e=t.call(this,i)||this;e.MP=n;var r=e.AP(),s=r.vertices,o=r.indices,h=r.indicesCount,u=r.drawMode;return e.FP=i.qL(s),e.TP=i.tI(o),e.CP=h,e.pP=u,e}return n(i,t),i.prototype.rL=function(t){return this.yB.rI(this.FP,0,{location:t.attribute("aSegmentPosition"),size:2},{location:t.attribute("aSegmentSide"),size:1},{location:t.attribute("aSegmentInside"),size:1}),this.yB.aI(this.TP),this},i.prototype.Ky=function(t,i,n){return this.yB.dI(void 0!==i?i:this.pP,this.CP,n||0,t,this.yB.gl.UNSIGNED_BYTE),this},i.prototype.AP=function(){var t=this,i=[];[1,0].forEach((function(n){for(var e=1===n?.5*Math.PI:1.5*Math.PI,r=0;r<=t.MP;r+=1){var s=e-r*Math.PI/t.MP;i.push(.5*Math.cos(s),.5*Math.sin(s),n,0)}})),i.push(0,0,1,1),i.push(0,0,0,1);for(var n=i.length/4,e=[],r=0;r<this.MP;r+=1)e.push(r,r+1,n-2),e.push(r+n/2-1,r+n/2,n-1);return e.push(0,n-2,n-1),e.push(n-1,n-2,n/2-1),e.push(0,n-3,n-1),e.push(n/2-2,n-2,n/2-1),{vertices:new Float32Array(i),indices:new Uint8Array(e),indicesCount:e.length,verticesCount:n,drawMode:this.yB.gl.TRIANGLES}},i.prototype.xB=function(){this.yB.VI(this.FP),this.yB.VI(this.TP)},i}(fY),cZ=function(t,i){var n=t._L.gB.get(i);return n||(n=new fZ(t,i),t._L.gB.set(i,n),n)},lZ=function(){function t(t,i){var n=this;this.Rt=t,this.BP=i,this.LP=!1,this.IP=!1,this.OP=!1,this.BP._o("DataPattern",(function(t){"ProgressiveX"!==t.pattern&&"RegressiveX"!==t.pattern||(n.LP="x"),"ProgressiveY"!==t.pattern&&"RegressiveY"!==t.pattern||(n.LP="y"),"RegressiveX"!==t.pattern&&"RegressiveY"!==t.pattern||(n.IP=!0),!0===t.regularProgressiveStep&&(n.OP=!0)}))}return t.prototype.calculateUserDataPointsProgressiveRange=function(t){if(0===t.length)throw new Error("calculateUserDataPointsProgressiveRange called with 0 data points");return{start:"x"===this.LP?t[0].x:t[0].y,end:"x"===this.LP?t[t.length-1].x:t[t.length-1].y}},t.prototype.calculateUserDataPointsBoundaries=function(t){return this.LP?"x"===this.LP?function(t){var i=t.length;if(i>0){for(var n=Math.max(t[i-1].x,t[0].x),e=Math.min(t[i-1].x,t[0].x),r=t[0].y,s=t[0].y,o=0;o<i;o+=1){var h=t[o];h.y>r&&(r=h.y),h.y<s&&(s=h.y)}return b(l(e,s),l(n,r))}return Ps}(t):function(t){var i=t.length;if(i>0){for(var n=Math.max(t[i-1].y,t[0].y),e=Math.min(t[i-1].y,t[0].y),r=t[0].x,s=t[0].x,o=0;o<i;o+=1){var h=t[o];h.x>r&&(r=h.x),h.x<s&&(s=h.x)}return b(l(s,e),l(r,n))}return Ps}(t):Ks(t)},t.prototype.calculateAvgStepBetweenDataPoints=function(t,i,n){return Math.abs(t-i)/(n-1)},t}(),dZ=Math.min(1,1.5),vZ=function(t){function i(i,n,e){var r=t.call(this,i,n)||this;return r.xn=e,r.PP=!1,r.DP={enabled:!1,totalDataPointsAtTime:0},r._P=[],r.RP=i instanceof Vo?{type:"linear",scale:i}:i instanceof Go?{type:"mixed",scale:i}:{type:"unknown"},r.BP._o("DataPattern",(function(t){!1===t.allowDataGrouping&&(r.PP=!0)})),r}return n(i,t),i.prototype.zP=function(t,i){var n=this;if(void 0===i&&(i=!1),this.PP||!this.LP||"linear"!==this.RP.type)return!1;!1===i&&this.EP&&(clearTimeout(this.EP),this.EP=void 0);var r="x"===this.LP?this.RP.scale.x.cv:this.RP.scale.y.cv;if(!r)throw new Error("CP helper has no information about Axis state.");var s=t.length;if(s<2)return!1;var o=t[0],h=t[s-1],u=this.calculateAvgStepBetweenDataPoints("x"===this.LP?o.x:o.y,"x"===this.LP?h.x:h.y,s),a=this.RP.scale,f=Math.abs("x"===this.LP?a.tn().x:a.tn().y),c=f/u,l=Math.floor(c*dZ),d=l*u,v=wr.performance.now(),y=!(v-r.In<500)&&(r.An?v-r.Ln<1e3:v-r.Fn<2e3||r.Cn),S=s>2*this.DP.totalDataPointsAtTime;if(y&&!S)return this.EP=setTimeout((function(){return n.NP(t)}),1e3),!1;var m,b=l>=10,g=this.DP.enabled?this.DP.columnWidthAxis/f<1.5:void 0,w=this.DP.enabled&&l>this.DP.dataPointsPerColumn?l/this.DP.dataPointsPerColumn>=2:void 0;!0===this.DP.enabled?g?w&&(m={enabled:!0,columnWidthAxis:d,dataPointsPerColumn:l,totalDataPointsAtTime:s}):m=b?{enabled:!0,columnWidthAxis:d,dataPointsPerColumn:l,totalDataPointsAtTime:s}:{enabled:!1,totalDataPointsAtTime:s}:b&&(m={enabled:!0,columnWidthAxis:d,dataPointsPerColumn:l,totalDataPointsAtTime:s});var p=!1===i;return m?(p&&(this.DP=m),!0):(p&&(this.DP=e(e({},this.DP),{totalDataPointsAtTime:s})),!1)},i.prototype.Vb=function(){this.VP=void 0,this._P.length=0,this.EP&&(clearTimeout(this.EP),this.EP=void 0)},i.prototype.GP=function(t){var i;if(0===t.length)return t;if(this.PP||!this.LP||"linear"!==this.RP.type||!this.DP.enabled)return t;var n,e,r=(i=this._P.length>0?ps(this._P,t,{canReturnB:!0}):t).length,s=[],o=void 0===this.VP,h=-1,u=-1,a=0,f=0;if("x"!==this.LP||this.IP)if("x"===this.LP&&this.IP)for(v=this.DP.columnWidthAxis,y=(this.VP?this.VP.x:i[0].x)-v,d=0;d<r;d+=1){(S=i[d]).x>=y?((!n||S.y>n.y)&&(n=S,h=d),(!e||S.y<e.y)&&(e=S,u=d),f=d):(n&&e&&(o&&s.push(i[0]),h<u?s.push(n,e):s.push(e,n)),o=!1,y=S.x-v,n=S,h=d,e=S,u=d,a=d,f=d)}else if("y"!==this.LP||this.IP){if("y"===this.LP&&this.IP)for(c=this.DP.columnWidthAxis,l=(this.VP?this.VP.y:i[0].y)-c,d=0;d<r;d+=1){(S=i[d]).y>=l?((!n||S.x>n.x)&&(n=S,h=d),(!e||S.x<e.x)&&(e=S,u=d),f=d):(e&&n&&(o&&s.push(i[0]),h<u?s.push(n,e):s.push(e,n)),o=!1,l=S.y-c,n=S,h=d,e=S,u=d,a=d,f=d)}}else for(var c=this.DP.columnWidthAxis,l=(this.VP?this.VP.y:i[0].y)+c,d=0;d<r;d+=1){(S=i[d]).y<=l?((!n||S.x>n.x)&&(n=S,h=d),(!e||S.x<e.x)&&(e=S,u=d),f=d):(e&&n&&(o&&s.push(i[0]),h<u?s.push(n,e):s.push(e,n)),o=!1,l=S.y+c,n=S,h=d,e=S,u=d,a=d,f=d)}else for(var v=this.DP.columnWidthAxis,y=(this.VP?this.VP.x:i[0].x)+v,d=0;d<r;d+=1){var S;(S=i[d]).x<=y?((!n||S.y>n.y)&&(n=S,h=d),(!e||S.y<e.y)&&(e=S,u=d),f=d):(n&&e&&(o&&s.push(i[0]),h<u?s.push(n,e):s.push(e,n)),o=!1,y=S.x+v,n=S,h=d,e=S,u=d,a=d,f=d)}if(n||e){var m=i.slice(a,f+1);this._P=m}else this._P.length=0;var b=s.length;return b>0&&(this.VP=s[b-1]),s},i.prototype.HP=function(t){if(this.LP&&"linear"===this.RP.type){var i="x"===this.LP?this.RP.scale.x.cv:this.RP.scale.y.cv;if(!i)throw new Error("CP helper has no information about Axis state.");if(i.wn===Ho.progressive||i.wn===Ho.regressive){var n=Math.abs("x"===this.LP?this.RP.scale.x.getInnerInterval():this.RP.scale.y.getInnerInterval());if(this.DP.enabled)return 2*n/this.DP.columnWidthAxis;var e=t.length,r=t[0],s=t[e-1];return n/this.calculateAvgStepBetweenDataPoints("x"===this.LP?r.x:r.y,"x"===this.LP?s.x:s.y,e)}}},i.prototype.jP=function(t,i,n){if(!this.LP)return i;var e=n.length,r=hE(n,t.min,this.LP,this.IP,0,e-1);void 0===r&&(r=this.IP?e-1:0);var s=hE(n,t.max,this.LP,this.IP,0,e-1);return void 0===s&&(s=this.IP?0:e-1),1+Math.abs(s-r)},i.prototype.WP=function(){this.EP&&(clearTimeout(this.EP),this.EP=void 0)},i.prototype.NP=function(t){this.zP(t,!0)&&this.xn()},i}(lZ),yZ=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return n(i,t),i.prototype.renderVisibleOnly=function(t,i){var n=this.Rt.x.getInnerStart(),e=this.Rt.x.getInnerEnd(),r=Math.min(n,e),s=Math.max(n,e),o=this.Rt.y.getInnerStart(),h=this.Rt.y.getInnerEnd(),u=Math.min(o,h),a=Math.max(o,h);t.forEach((function(t,n){t.existingCoordinatesCount<=1||t.boundaries.max.x<r||t.boundaries.min.x>s||t.boundaries.max.y<u||t.boundaries.min.y>a||i(t)}))},i}(lZ),SZ=function(){function t(t,i,n){this.UP=i,this.YP=n,this.XP=t,this.ZP=[]}return t.prototype.KP=function(t,i,n,r){var s=t.length;if(0!==s){var o=t,h=s,u=this.XP[this.XP.length-1];do{var a=this.XP.length,f=void 0;if(u||(u=this.qP(i,h)),u)0===u.allocatedCoordinatesCount-u.existingCoordinatesCount&&(u=void 0);var c=0;if(this.YP&&a>0&&(void 0===u||0===u.existingCoordinatesCount)){var l=this.XP[a-1].lastDataPoint;l?(o.splice(0,0,l),c=1,h+=1):console.error("SegmentationHelper _connectSegments = true, but segment has no lastDataPoint information!")}if(u){f=Math.min(h,u.allocatedCoordinatesCount-u.existingCoordinatesCount),r(u,o.slice(0,f),f,c)}else{var d=Math.ceil(i)+c;f=Math.min(d,h);var v=o.slice(0,f),y=e(e({},n(d,v,f,c)),{isDropped:!1});this.XP.push(y)}f>0&&(h>f?h=(o=o.slice(f)).length:(o=[],h=0))}while(h>0);this.JP()}},t.prototype.QP=function(t){var i=t,n=this.XP.indexOf(i);n>=0&&this.XP.splice(n,1),i.droppedTimestamp=wr.performance.now(),this.ZP.push(i)},t.prototype.$P=function(){var t=this;this.XP.slice().forEach((function(i){return t.QP(i)}))},t.prototype.tD=function(){var t=this;this.XP.forEach((function(i){return t.UP(i)})),this.ZP.forEach((function(i){return t.UP(i)})),this.XP.length=0,this.ZP.length=0},t.prototype.qP=function(t,i){var n=2*t/3,e=4*t/3,r=this.ZP.findIndex((function(t){return t.allocatedCoordinatesCount>=n&&t.allocatedCoordinatesCount<=e}));if(r>=0){var s=this.ZP[r];return this.ZP.splice(r,1),this.XP.push(s),s}},t.prototype.JP=function(){if(this.ZP.length>5)for(var t=wr.performance.now(),i=0;i<this.ZP.length-5;i+=1){var n=this.ZP[i];(void 0===n.droppedTimestamp||t-n.droppedTimestamp>=1e4)&&(this.UP(n),this.ZP.splice(i,1),i-=1)}},t}(),mZ=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return n(i,t),i.prototype.iD=function(t,i){if(!i||"object"!=typeof i)return 0;var n=this.Rt.x.getInnerStart(),e=this.Rt.x.getInnerEnd(),r=Math.min(n,e),s=Math.max(n,e),o=this.Rt.y.getInnerStart(),h=this.Rt.y.getInnerEnd(),u=Math.min(o,h),a=Math.max(o,h);if("maxDataPointCount"in i)return this.nD(t,i.maxDataPointCount,r,s,u,a);if("minDataPointCount"in i)return this.eD(t,i.minDataPointCount,r,s,u,a);if("progressiveDataCleaningThreshold"in i)return this.rD(t,i.progressiveDataCleaningThreshold,r,s,u,a);throw new Error("Unimplemented data cleaning configuration: "+JSON.stringify(i))},i.prototype.nD=function(t,i,n,e,r,s){if(void 0===i||i<=0)return 0;var o=t.reduce((function(t,i){return t+i.existingDataPointsCount}),0);if(o<=i)return 0;for(var h=0,u=o,a=0;a<t.length;a+=1){var f=t[a];u>i&&(h+=1,u-=f.existingDataPointsCount)}return h},i.prototype.rD=function(t,i,n,e,r,s){if(void 0===i||!this.LP)return 0;for(var o=0,h=0;h<t.length;h+=1){var u=t[h],a=this.IP?"x"===this.LP?u.boundaries.min.x>e:u.boundaries.min.y>s:"x"===this.LP?u.boundaries.max.x<n:u.boundaries.max.y<r;if(!((this.IP?"x"===this.LP?u.boundaries.min.x>i:u.boundaries.min.y>i:"x"===this.LP?u.boundaries.max.x<i:u.boundaries.max.y<i)&&a&&u.existingCoordinatesCount>2))break;o+=1}return o},i.prototype.eD=function(t,i,n,e,r,s){if(void 0===i||0===i)return 0;for(var o=0,h=0,u=t.length-1;u>=0;u-=1){var a=t[u];if(h>i)if(this.LP){if(this.IP?"x"===this.LP?a.boundaries.min.x>e:a.boundaries.min.y>s:"x"===this.LP?a.boundaries.max.x<n:a.boundaries.max.y<r){o=1+u;break}}else a.boundaries.max.x<n||a.boundaries.min.x>e||a.boundaries.max.y<r||a.boundaries.min.y>s?o+=1:o=0;h+=a.existingDataPointsCount}return o},i.prototype.sD=function(t,i){var n=t.reduce((function(t,i){return Js(t,i.boundaries)}),Ps);if(i&&"progressiveDataCleaningThreshold"in i&&i.progressiveDataCleaningThreshold){var e=i.progressiveDataCleaningThreshold;"x"!==this.LP||this.IP?"x"===this.LP&&this.IP?n.max.x=Math.min(n.max.x,e):"y"!==this.LP||this.IP?"y"===this.LP&&this.IP&&(n.max.y=Math.min(n.max.y,e)):n.min.y=Math.max(n.min.y,e):n.min.x=Math.max(n.min.x,e)}return n},i}(lZ),bZ=function(t){function i(i,n,e,r,s,o){var h=t.call(this,i,n,e,r,s)||this;h.Vm=o,h.cL=new BX,h.ic=[],h.oD=new yZ(h.Rt,h),h.hD=new vZ(h.Rt,h,(function(){return h.engine.xn()})),h.uD=new SZ(h.ic,(function(t){return t.coordsBuffer&&h.yB.VI(t.coordsBuffer)}),!0),h.aD=new mZ(h.Rt,h),h.xP={type:"none"},h.yB=i.kO(),h.gO=i;var u,a,f,c=h.Rt.Ei(),l=!0===(null==o?void 0:o.individualLookupValuesEnabled),d=0;c||(u=d,d+=2),c&&(a=d,d+=4),l&&(f=d,d+=1);var v=function(t,i){return i?function(i,n){return us(i,t)}:function(i,n){return os(i,t)}}(c,l);return h.fD={individualLookupValuesEnabled:l,attributesPerVertex:d,attributeOffsetCoordinateLowPrecision:u,attributeOffsetCoordinateHighPrecision:a,attributeOffsetLookUpValue:f,prepareRenderData:function(t,i){return v(t,h.ia.fillStyle)}},h}return n(i,t),i.prototype.Fe=function(){var t=this,i=this.t(),n=this.ia,e=this.Ko(),r=this.Gh,s=r.length,o=s>0,h=this.co;this.lo.S(),o&&(this.aa=ps(this.aa,r,{canReturnB:!0}),this.Vh+=s);var u=this.fa.t,a=this.aD.iD(this.ic,this.fa.S());if(a>0){for(var f=0,c=0;c<a;c+=1){var l=this.ic[0];f+=l.existingDataPointsCount,l.existingDataPointsCount=0,l.existingCoordinatesCount=0,l.jointPointsCount=0,l.boundaries=Ps,l.lastDataPoint=void 0,this.uD.QP(l)}this.aa=this.aa.slice(f),this.Vh=this.aa.length,u=!0}var d=r;(this.hD.zP(this.aa)||i)&&(this.hD.Vb(),this.ic.forEach((function(t){t.existingDataPointsCount=0,t.existingCoordinatesCount=0,t.jointPointsCount=0,t.boundaries=Ps,t.lastDataPoint=void 0})),this.uD.$P(),d=this.aa);var v=this.hD.GP(d),y=v.length;if(y>0){var S=this.hD.HP(this.aa)||(this._o("ApplicationType",(function(t){return"InternalUI"===t.type}))?this.Vh:1e5);y/S>10&&(S=y/10),this.uD.KP(v,S,(function(i,n,e,r){var s=t.oD.calculateUserDataPointsBoundaries(n);return{allocatedCoordinatesCount:i,existingDataPointsCount:t.hD.jP(s,e,t.aa)-r,existingCoordinatesCount:e,jointPointsCount:r,boundaries:s,coordsBuffer:t.yB.JL(i*t.fD.attributesPerVertex,t.fD.prepareRenderData(n,e)),lastDataPoint:n[e-1]}}),(function(i,n,e,r){var s=Js(i.boundaries,t.oD.calculateUserDataPointsBoundaries(n)),o=t.hD.jP(s,i.existingCoordinatesCount+e,t.aa)-(i.jointPointsCount+r);t.yB.QL(i.coordsBuffer,i.existingCoordinatesCount*t.fD.attributesPerVertex,t.fD.prepareRenderData(n,e)),i.jointPointsCount+=r,i.lastDataPoint=n[e-1],i.existingDataPointsCount=o,i.existingCoordinatesCount+=e,i.boundaries=s}))}if(u&&(this.Nh=this.aD.sD(this.ic,this.fa.S())),this.cL.$I(this.Rt),e||h){var m=n instanceof nr&&n,b=m&&m.getThickness(),g=m&&m.getFillStyle(),w=g instanceof Ee&&g,p=g instanceof Qe&&g,k=g instanceof Je&&g,x=g instanceof Ve&&g,M=w||p||k||x,A=this.fD.individualLookupValuesEnabled;if(x&&"value"===x.getLookUpProperty()&&!A){var F='LCJS misusage error: Series individualLookupValuesEnabled flag must be set if using PalettedFill with lookUpProperty="value" !';throw wr.alert(F),new Error(F)}if(M&&m&&!1!==b){var T=-1===b?"primitive":"triangulated",C=p?["gradient",p]:k?["gradient",k]:x?["lookup",x.getLookUpProperty()]:"uniform";this.xP="primitive"===T?{type:T,shader:this.yB.FI(EX["2D"],EX.Color({dataType:C}),EX.VertexLocation({axisWorldTranslation:NX(this.Rt),normalSource:void 0})),lineStyle:m,fillStyleSolid:w,fillStyleLinearGradient:p,fillStyleRadialGradient:k,fillStylePaletted:x}:"triangulated"===T?{type:T,shader:this.yB.FI(EX["2D"],EX.Color({dataType:C}),EX.LineInstanced2D({axisWorldTranslation:NX(this.Rt),normalSource:void 0}),this.yB.kI?EX.AliasedEdge():void 0),geometry:gZ(this.yB,b),lineStyle:m,fillStyleSolid:w,fillStyleLinearGradient:p,fillStyleRadialGradient:k,fillStylePaletted:x}:{type:"none"},this.oa(m)}else this.xP={type:"none"};if(k?this.EO=VX(this.No(),this.Rt,k.getPosition(),k.getExtent(),k.getShape(),this.yB.uL()):p?this.NO=GX(this.No(),this.Rt,p.getAngle(!0),this.yB.uL()):(this.EO=void 0,this.NO=void 0),x){if(x&&x.lut.isValid){var B=x.getPalette();this.QO=this.gO.$O(B,this.qO,this.QO),this.qO=B}}else this.gO.BI.uo(this.qO),this.qO=void 0}return this.Vo=!1,this.co=!1,this.Gh=[],this.lo.t=!1,this.Go(),this.fa.t=!1,this},i.prototype.vB=function(){var t=this;this.Fe();var i=this.yB.gl,n=this.xP;if(!n||"none"===n.type)return this;var e=n.shader,r=n.lineStyle,s=n.fillStyleSolid,o=n.fillStyleLinearGradient,h=n.fillStyleRadialGradient,u=n.fillStylePaletted;return this.yB.rL(e).NI(e,(function(a,f,c,l){if(t.Rt instanceof Vo||t.Rt instanceof tj?t.yB.VL(e.yL("uScale"),t.cL.aO()).VL(e.yL("uDisp"),t.cL.uO()).VL(e.SL("uScaleStart_highpart"),t.cL.fO()).VL(e.SL("uScaleStart_lowpart"),t.cL.cO()):t.Rt instanceof Go&&t.yB.VL(e.SL("uScaleStart"),t.cL.MixedScaleXY.uScaleStart).VL(e.SL("uScaleStartLog"),t.cL.MixedScaleXY.uScaleStartLog).VL(e.SL("uScaleInterval"),t.cL.MixedScaleXY.uScaleInterval).VL(e.SL("uScaleIntervalLog"),t.cL.MixedScaleXY.uScaleIntervalLog).VL(e.yL("uViewportStart"),t.cL.MixedScaleXY.uViewportStart).VL(e.yL("uViewportSize"),t.cL.MixedScaleXY.uViewportSize),s?t.yB.YL(e.yL("uColor"),s.getColor()):h?t.EO&&t.yB.GI(e,t.EO,h):o?t.NO&&t.yB.HI(e,t.NO,o):u&&t.QO&&t.yB.KL(a("uLookupTexture"),t.QO.texture,0).XL(a("uLookupMin"),u.lut.min).XL(a("uLookupMax"),u.lut.max).XL(a("uLookupTextureHeightPx"),t.QO.textureHeight),"triangulated"===n.type){var d=r.getThickness()+1;t.yB.XL(e.yL("uThicknessPixels"),d).XL(e.SL("uAALimit"),1-(d-1)/d).VL(e.yL("uRatioPxClip"),[2/t.oo.vi().x,2/t.oo.vi().y])}t.oD.renderVisibleOnly(t.ic,(function(e){var r=e.coordsBuffer;if(r){if(i.bindBuffer(i.ARRAY_BUFFER,r),"triangulated"===n.type)if(t.Rt.Ei()||void 0===t.fD.attributeOffsetCoordinateLowPrecision){if(t.Rt.Ei()&&void 0!==t.fD.attributeOffsetCoordinateHighPrecision){var s=f("aLocationA_highpart"),o=f("aLocationA_lowpart"),h=f("aLocationB_highpart"),a=f("aLocationB_lowpart");i.vertexAttribPointer(s,2,i.FLOAT,!1,t.fD.attributesPerVertex*Float32Array.BYTES_PER_ELEMENT,t.fD.attributeOffsetCoordinateHighPrecision*Float32Array.BYTES_PER_ELEMENT),t.yB.sI(s,1),i.enableVertexAttribArray(s),i.vertexAttribPointer(o,2,i.FLOAT,!1,t.fD.attributesPerVertex*Float32Array.BYTES_PER_ELEMENT,(t.fD.attributeOffsetCoordinateHighPrecision+2)*Float32Array.BYTES_PER_ELEMENT),t.yB.sI(o,1),i.enableVertexAttribArray(o),i.vertexAttribPointer(h,2,i.FLOAT,!1,t.fD.attributesPerVertex*Float32Array.BYTES_PER_ELEMENT,(t.fD.attributeOffsetCoordinateHighPrecision+t.fD.attributesPerVertex)*Float32Array.BYTES_PER_ELEMENT),t.yB.sI(h,1),i.enableVertexAttribArray(h),i.vertexAttribPointer(a,2,i.FLOAT,!1,t.fD.attributesPerVertex*Float32Array.BYTES_PER_ELEMENT,(t.fD.attributeOffsetCoordinateHighPrecision+t.fD.attributesPerVertex+2)*Float32Array.BYTES_PER_ELEMENT),t.yB.sI(a,1),i.enableVertexAttribArray(a)}}else{var l=f("aLocationA"),d=f("aLocationB");i.vertexAttribPointer(l,2,i.FLOAT,!1,t.fD.attributesPerVertex*Float32Array.BYTES_PER_ELEMENT,t.fD.attributeOffsetCoordinateLowPrecision*Float32Array.BYTES_PER_ELEMENT),t.yB.sI(l,1),i.enableVertexAttribArray(l),i.vertexAttribPointer(d,2,i.FLOAT,!1,t.fD.attributesPerVertex*Float32Array.BYTES_PER_ELEMENT,(t.fD.attributeOffsetCoordinateLowPrecision+t.fD.attributesPerVertex)*Float32Array.BYTES_PER_ELEMENT),t.yB.sI(d,1),i.enableVertexAttribArray(d)}else if(t.Rt.Ei()||void 0===t.fD.attributeOffsetCoordinateLowPrecision){if(t.Rt.Ei()&&void 0!==t.fD.attributeOffsetCoordinateHighPrecision){var v=f("aPos_highpart");i.vertexAttribPointer(v,2,i.FLOAT,!1,t.fD.attributesPerVertex*Float32Array.BYTES_PER_ELEMENT,t.fD.attributeOffsetCoordinateHighPrecision*Float32Array.BYTES_PER_ELEMENT),i.enableVertexAttribArray(v);var y=f("aPos_lowpart");i.vertexAttribPointer(y,2,i.FLOAT,!1,t.fD.attributesPerVertex*Float32Array.BYTES_PER_ELEMENT,(t.fD.attributeOffsetCoordinateHighPrecision+2)*Float32Array.BYTES_PER_ELEMENT),i.enableVertexAttribArray(y)}}else{var S=f("aPos");i.vertexAttribPointer(S,2,i.FLOAT,!1,t.fD.attributesPerVertex*Float32Array.BYTES_PER_ELEMENT,t.fD.attributeOffsetCoordinateLowPrecision*Float32Array.BYTES_PER_ELEMENT),i.enableVertexAttribArray(S)}if(u&&"value"===u.lookUpProperty&&void 0!==t.fD.attributeOffsetLookUpValue)if("triangulated"===n.type){var m=f("aLookupValueA");i.vertexAttribPointer(m,1,i.FLOAT,!1,t.fD.attributesPerVertex*Float32Array.BYTES_PER_ELEMENT,t.fD.attributeOffsetLookUpValue*Float32Array.BYTES_PER_ELEMENT),t.yB.sI(m,1),i.enableVertexAttribArray(m);var b=f("aLookupValueB");i.vertexAttribPointer(b,1,i.FLOAT,!1,t.fD.attributesPerVertex*Float32Array.BYTES_PER_ELEMENT,(t.fD.attributeOffsetLookUpValue+t.fD.attributesPerVertex)*Float32Array.BYTES_PER_ELEMENT),t.yB.sI(b,1),i.enableVertexAttribArray(b)}else{var g=f("aLookupValue");i.vertexAttribPointer(g,1,i.FLOAT,!1,t.fD.attributesPerVertex*Float32Array.BYTES_PER_ELEMENT,t.fD.attributeOffsetLookUpValue*Float32Array.BYTES_PER_ELEMENT),i.enableVertexAttribArray(g)}"triangulated"===n.type?n.geometry.rL(c).Ky(e.existingCoordinatesCount-1):t.yB.Ky(i.LINE_STRIP,e.existingCoordinatesCount,0)}})),i.bindBuffer(i.ARRAY_BUFFER,null)})),this},i.prototype.Qh=function(t,i){return Array.isArray(t)||(t=[t]),this.Gh=ps(this.Gh,t,{canReturnB:!0}),this.Nh=Js(this.Nh,i||this.oD.calculateUserDataPointsBoundaries(t)),this},i.prototype.$h=function(){return t.prototype.$h.call(this),this},i.prototype.dispose=function(){return t.prototype.dispose.call(this),this.hD.WP(),this.qO&&(this.gO.BI.uo(this.qO),this.qO=void 0),this.xP={type:"none"},this.QO=void 0,this},i.prototype.ZB=function(){return this.uD.tD(),this},i.prototype.Cw=function(t){var i=this.Gh.length>0?u(u([],h(this.Xh())),h(this.Yh())):this.Xh(),n=eE(i,t,this.Wh,this.wu,this.pu,this.Rt,this.engine.Rt,this.Nh,this.oD.LP,this.oD.IP);return void 0!==n?i[n]:void 0},i.prototype.WM=function(t){var i=this.Gh.length>0?u(u([],h(this.Xh())),h(this.Yh())):this.Xh(),n=i.length;if(0!==n){var e=this.wu?1:0,r=n-(this.pu?2:1);if(this.Wh===Wz.Nearest){for(var s=Is,o=void 0,a=void 0,f=0;f<n;f+=1){var c=sr(i[f],this.Rt,this.oo.Rt);if(void 0!==a){var l=Vs(a,c,t),d=Math.pow(l.x-t.x,2)+Math.pow(l.y-t.y,2);d<s&&(s=d,o=l)}a=c}return void 0!==o?sr(o,this.oo.Rt,this.Rt):void 0}if("x"===this.oD.LP&&this.Wh===Wz.NearestX||"y"===this.oD.LP&&this.Wh===Wz.NearestY){var v=uE(i,sr(t,this.oo.Rt,this.Rt),this.oD.LP,this.oD.IP,e,r);return v?Us(i[v.a],i[v.b],v.lerpAmount):void 0}return this.Cw(t)}},i.prototype.HO=function(t,i){if(!this.Yo())return!1;var n=this.Rt;if(n instanceof Vo){var e=n.tn(),r=sr({x:t,y:i},this.engine.Rt,this.Rt),s=vE(this.Nh,{x:this.cu(),y:this.lu()},n);if(!eo.Ut(r,s.min,s.max))return!1;var o=this.Rt.x.getInnerStart(),h=this.Rt.x.getInnerEnd(),u=Math.min(o,h),a=Math.max(o,h),f=this.Rt.y.getInnerStart(),c=this.Rt.y.getInnerEnd(),l=Math.min(f,c),d=Math.max(f,c),v=this.aa.length-1,y=ao(e,Math.max(this.ia.thickness,2)/2),S=0,m=v,b=1e4;if(v>b&&this.oD.LP)if("x"===this.oD.LP)for(var g=v/(F=v/b),w=0;w<F-1;w+=1){var p=g*(w+1);if((T=g*w)>=0&&T<this.aa.length&&p<this.aa.length){var k=this.aa[T].x,x=this.aa[p].x,M=Math.min(k,x),A=Math.max(k,x);if(M<r.x&&A>r.x){m=(S=g*w)+b;break}}}else if("y"===this.oD.LP){var F;for(g=v/(F=b),w=0;w<F-1;w+=1){var T;p=g*(w+1);if((T=g*w)>=0&&T<this.aa.length&&p<this.aa.length){k=this.aa[T].y,x=this.aa[p].y;var C=Math.min(k,x),B=Math.max(k,x);if(C<r.y&&B>r.y){m=(S=g*w)+b;break}}}}for(;S<m;S+=1){var L=this.aa[S],I=this.aa[S+1];if(I.x>u&&L.x<a&&I.y>l&&L.y<d){var O=oo({x:I.x-L.x,y:I.y-L.y}),P={x:O.y*y.x,y:-O.x*y.y},D={x:L.x+P.x,y:L.y+P.y},_={x:L.x-P.x,y:L.y-P.y},R={x:I.x+P.x,y:I.y+P.y},z={x:I.x-P.x,y:I.y-P.y};if(eo.Yt(r,D,_,R,z)&&($s(r,D,_,R)||$s(r,R,z,_)))return!0}}}return!1},i.prototype.Et=function(){return this.Nh.max.x},i.prototype.zt=function(){return this.Nh.min.x},i.prototype.Vt=function(){return this.Nh.max.y},i.prototype.Nt=function(){return this.Nh.min.y},i.prototype.getPointsBounds=function(){return this.Nh},i.prototype.cu=function(){return.5*this.ia.thickness},i.prototype.lu=function(){return.5*this.ia.thickness},i}(VE),gZ=function(t,i){return cZ(t,i>=50?8:i>=20?6:i>=7?4:i>=4?3:1===i?1:2)},wZ=function(t){function i(i,n){var e=t.call(this,i)||this;e.cD=n,e.lD=os(n,!1),e.dD=n.length,e.RB=i.qL(e.lD);var r=Ks(e.cD);return e.hi=l(r.max.x-r.min.x,r.max.y-r.min.y),e}return n(i,t),i.prototype.xB=function(){this.yB.VI(this.RB)},i}(fY),pZ=function(t){var i,n,e=((i=[]).push(l(-(n=2/1.73205080757)/2,.3333333333333333)),i.push(l(0,-.6666666666666666)),i.push(l(n/2,.3333333333333333)),i);return new wZ(t,e)},kZ=function(t){var i=[l(-.5,-.5),l(-.5,.5),l(.5,-.5),l(.5,-.5),l(-.5,.5),l(.5,.5)];return new wZ(t,i)},xZ=function(t,i){var n,e=(void 0===(n=i)&&(n=25),pj(l(0,0),0,360,.5,.5,n)[0]);return new wZ(t,e)},MZ=function(t,i,n){var e=i._L.bB.get(t);return e||(e=n(i),i._L.bB.set(t,e)),e},AZ=1e3,FZ=function(i){function e(t,n,e,r,s){var o=i.call(this,t,n,e,r,s)||this;return o.gO=t,o.cL=new BX,o.wO=b(d(Os,Os),d(Is,Is)),o.vD=[],o.yB=t.kO(),o}return n(e,i),e.prototype.Fe=function(){var i=this.Uo()||this.t(),n=this.Gh,e=n.length,r=e>0,s=this._h.S(),o=this.Ho,h=this.size.S(),u=this.Rt.Qi()||i,a=this.t()||this.size.t||this._h.t,f=n&&n.length>0||this.co,c=u||a||this.co;if(r){this.Dh=ps(this.Dh,n,{canReturnB:!0}),this.Vh+=e;var l=this.vD[this.vD.length-1],d=l?{St:l.St,bt:l.bt,iM:{max:{x:l.iM.max.x,y:l.iM.max.y},min:{x:l.iM.min.x,y:l.iM.min.y}},yD:{max:{x:l.yD.max.x,y:l.yD.max.y},min:{x:l.yD.min.x,y:l.yD.min.y}}}:void 0,v=n.length;if(!d)(S={St:0,bt:n.length>=AZ?AZ:n.length}).iM=Ks(n.slice(0,S.bt)),S.yD=vE(S.iM,{x:h,y:h},this.Rt),this.vD[0]=S,d=S,v=n.length-(S.bt||0);if(d&&v)if(d.bt-d.St+v<AZ)d.bt+=d.bt-d.St+v,d.iM=Ks(n.slice(d.St,d.bt)),d.yD=vE(d.iM,{x:h,y:h},this.Rt),this.vD[this.vD.length-1]=d;else{if(d.bt-d.St<AZ)(S={St:d.St,bt:d.St+AZ}).iM=Ks(n.slice(S.St,S.bt)),S.yD=vE(S.iM,{x:h,y:h},this.Rt),this.vD[this.vD.length-1]=S;for(var y=d.bt;y<this.Dh.length;){var S;(S={St:y,bt:y+AZ>this.Dh.length?this.Dh.length:y+AZ}).iM=Ks(n.slice(S.St,S.bt)),S.yD=vE(S.iM,{x:h,y:h},this.Rt),y=S.bt,this.vD[this.vD.length]=S}}}if(r||this.co||this.Vo){this.Nh=this.jh?Js(this.Nh,this.jh):Js(this.Nh,Ks(this.Dh));var m=os(this.Dh,this.Rt.Ei());this.SD=this.Vh,this.mD=this.yB.qL(m)}if(this.cL.$I(this.Rt),a||this.jo()){var b=this.Rh.S()?"attribute":"uniform";this.fL=o===Re?void 0:this.yB.FI(EX["2D"],h<=1&&EX.PointSize(b),EX.VertexLocation({offset:h>1?{dataType:b,sizeUnit:"px",symmetric:!0,rotation:(this.zh.S()||this.sh.S()%360!=0)&&{dataType:this.zh.S()?"attribute":"uniform"}}:void 0,axisWorldTranslation:NX(this.Rt),normalSource:void 0}),o instanceof Ee?EX.Color({dataType:"uniform"}):o instanceof Ne?EX.Color({dataType:"attribute"}):o instanceof Ve?EX.Color({dataType:["lookup",o.getLookUpProperty()]}):o instanceof Je||o instanceof Qe?EX.Color({dataType:["gradient",o]}):void 0)}if(o!==Re?c&&(this.bD&&(this.bD=void 0),h>1||o instanceof Ne?h<=1?this.pP=this.yB.gl.POINTS:s===t.PointShape.Triangle?(this.bD=MZ(t.PointShape.Triangle,this.yB,pZ),this.pP=this.yB.gl.TRIANGLES):s===t.PointShape.Circle?(this.bD=MZ(t.PointShape.Circle,this.yB,(function(t){return xZ(t,24)})),this.pP=this.yB.gl.TRIANGLE_FAN):s===t.PointShape.Square?(this.bD=MZ(t.PointShape.Square,this.yB,kZ),this.pP=this.yB.gl.TRIANGLES):this.pP=this.yB.gl.POINTS:this.pP=this.yB.gl.POINTS):this.bD&&(this.bD=void 0),f||this.jo()){var g=this.Dh.length;if(o instanceof Ne&&this.SD&&this.SD>0){for(var w=o.getFallbackColor(),p=new Float32Array(4*g),k=0;k<g;k+=1){(L=this.Dh[k]).color?(p[4*k+0]=L.color.r,p[4*k+1]=L.color.g,p[4*k+2]=L.color.b,p[4*k+3]=L.color.a):(p[4*k+0]=w.r,p[4*k+1]=w.g,p[4*k+2]=w.b,p[4*k+3]=w.a)}this.gD||(this.gD=this.yB.qL(p,!0)),this.yB.$L(this.gD,p,!0)}else this.gD&&this.yB.gl.deleteBuffer(this.gD),this.gD=void 0;if(o instanceof Ve){if(o instanceof Ve&&o.lut.isValid){var x=o.getPalette();this.QO=this.gO.$O(x,this.qO,this.QO),this.qO=x}}else this.gO.BI.uo(this.qO),this.qO=void 0;if(this.Rh.S()&&this.SD&&this.SD>0&&h>1){var M=new Float32Array(g);for(k=0;k<g;k+=1){(L=this.Dh[k]).size?M[k]=L.size:M[k]=h}this.wD||(this.wD=this.yB.qL(M,!0)),this.yB.$L(this.wD,M,!0)}else this.wD&&(this.yB.gl.deleteBuffer(this.wD),this.wD=void 0);if(this.zh.S()&&this.SD&&this.SD>0&&h>1){var A=new Float32Array(2*g),F=go(this.sh.S()),T=Math.sin(F),C=Math.cos(F);for(k=0;k<g;k+=1){(L=this.Dh[k]).rotation?(A[2*k+0]=Math.sin(L.rotation),A[2*k+1]=Math.cos(L.rotation)):(A[2*k+0]=T,A[2*k+1]=C)}this.pD||(this.pD=this.yB.qL(A,!0)),this.yB.$L(this.pD,A,!0)}else this.pD&&(this.yB.gl.deleteBuffer(this.pD),this.pD=void 0);if(this.Eh.S()&&this.SD&&this.SD>0){var B=new Float32Array(g);for(k=0;k<g;k+=1){var L;"value"in(L=this.Dh[k])&&void 0!==L.value&&null!==L.value?B[k]=L.value:B[k]=0}this.Ft||(this.Ft=this.yB.qL(B,!0)),this.yB.$L(this.Ft,B,!0)}else this.Ft&&(this.yB.gl.deleteBuffer(this.Ft),this.Ft=void 0);this.Xo(this.Ho)}return o instanceof Je?this.BO=VX(this.No(),this.Rt,o.getPosition(),o.getExtent(),o.getShape(),this.yB.uL()):o instanceof Qe?this.LO=GX(this.No(),this.Rt,o.getAngle(!0),this.yB.uL()):(this.BO=void 0,this.LO=void 0),(n&&n.length>0||r||i)&&(this.Nh&&f&&(this.wO=vE(this.Nh,{x:h,y:h},this.Rt)),this.Gh=[],this.Hh=0,this.jh=Ps),this.Go(),this.Wo=o,this._h.t=!1,this.size.t=!1,this.Vo=!1,this},e.prototype.vB=function(){var t=this;if(this.Yo()){this.Fe();var i=this.fL,n=this.mD,e=this.SD,r=this.Ho;i&&n&&e&&r!==Re&&(this.yB.rL(i),this.yB.NI(i,(function(r,s,o,h){if(t.Rt instanceof Vo||t.Rt instanceof tj?t.yB.VL(r("uScale"),t.cL.aO()).VL(r("uDisp"),t.cL.uO()).VL(h("uScaleStart_highpart"),t.cL.fO()).VL(h("uScaleStart_lowpart"),t.cL.cO()):t.Rt instanceof Go&&t.yB.VL(h("uScaleStart"),t.cL.MixedScaleXY.uScaleStart).VL(h("uScaleStartLog"),t.cL.MixedScaleXY.uScaleStartLog).VL(h("uScaleInterval"),t.cL.MixedScaleXY.uScaleInterval).VL(h("uScaleIntervalLog"),t.cL.MixedScaleXY.uScaleIntervalLog).VL(r("uViewportStart"),t.cL.MixedScaleXY.uViewportStart).VL(r("uViewportSize"),t.cL.MixedScaleXY.uViewportSize),t.yB.UI(o,n,t.Rt.Ei(),t.bD?1:void 0),t.bD){var u=s("aInstanceGeo");t.yB.nI(u,t.bD.RB).sI(u,0)}if(t.Ho instanceof Ee)t.yB.YL(r("uColor"),t.Ho.getColor());else if(t.Ho instanceof Ne&&t.gD){var a=s("aColor");t.yB.hI(a,t.gD),t.pP!==t.yB.gl.POINTS&&t.yB.sI(a,1)}else if(t.Ho instanceof Ve&&t.QO){if("value"===t.Ho.getLookUpProperty()&&t.Ft){var f=s("aLookupValue");t.yB.uI(f,t.Ft),t.pP!==t.yB.gl.POINTS&&t.yB.sI(f,1)}t.yB.KL(r("uLookupTexture"),t.QO.texture,0).XL(r("uLookupMin"),t.Ho.lut.min).XL(r("uLookupMax"),t.Ho.lut.max).XL(r("uLookupTextureHeightPx"),t.QO.textureHeight)}else t.Ho instanceof Je?t.BO&&t.yB.GI(i,t.BO,t.Ho):t.Ho instanceof Qe&&t.LO&&t.yB.HI(i,t.LO,t.Ho);if(t.wD&&t.pP!==t.yB.gl.POINTS){var c=s("aOffsetPixels");t.yB.uI(c,t.wD),t.pP!==t.yB.gl.POINTS&&t.yB.sI(c,1)}else if(t.pP!==t.yB.gl.POINTS){var l=r("uOffsetPixels");t.yB.XL(l,t.size.S())}if(t.pD&&t.pP!==t.yB.gl.POINTS){var d=s("aRot");t.yB.nI(d,t.pD),t.pP!==t.yB.gl.POINTS&&t.yB.sI(d,1)}else if(t.pP!==t.yB.gl.POINTS&&t.sh.S()%360!=0){var v=go(t.sh.S()),y=Math.sin(v),S=Math.cos(v);t.yB.VL(r("uRot"),[y,S])}if(t.pP===t.yB.gl.POINTS)t.yB.XL(r("uPointSize"),t.size.S());else{var m={x:2/t.oo.vi().x,y:2/t.oo.vi().y};t.yB.VL(r("uRatioPxClip"),[m.x,m.y])}t.pP===t.yB.gl.POINTS?t.yB.Ky(t.pP,e):t.bD&&t.yB.cI(t.pP,0,t.bD.dD,e)})))}return this},e.prototype.Pw=function(t){var i=this.Hh>0?u(u([],h(this.Xh())),h(this.Yh())):this.Xh(),n=eE(i,t,this.Wh,!1,!1,this.Rt,this.oo.Rt,this.Nh,void 0,void 0);return void 0!==n?i[n]:void 0},e.prototype.HO=function(i,n){var e=this.Rt;if(e instanceof Go)return!1;var r=e.tn();if(this.Yo()&&this.Ho!==Re){var s=sr({x:i,y:n},this.oo.Rt,this.Rt);if(!eo.Ut(s,this.wO.min,this.wO.max))return!1;for(var o=!1,h=function(i){if(eo.Ut(s,u.vD[i].yD.min,u.vD[i].yD.max)){var n=u.Xh(),e=u.size.S(),h=u._h.S(),a=go(u.sh.S());if(u.pP===u.yB.gl.POINTS){for(var f=r.y*e,c=r.x*e,d=u.vD[i].St;d<u.vD[i].bt;d+=1)if(f=r.y*(n[d].size||e),c=r.x*(n[d].size||e),eo.Ut(s,l(n[d].x-c,n[d].y-f),l(n[d].x+c,n[d].y+f))){o=!0;break}return"break"}if(u.bD){var v=u.bD.cD;if(h===t.PointShape.Triangle){var y=void 0,S=void 0,m=void 0,b=void 0;for(d=u.vD[i].St;d<u.vD[i].bt;d+=1){var g=n[d].rotation?Fo(v,go(n[d].rotation)):Fo(v,a);if(b=ao(r,n[d].size||e),y=fo(n[d],lo(g[0],b)),S=fo(n[d],lo(g[1],b)),m=fo(n[d],lo(g[2],b)),eo.jt(s,y,S,m)&&$s(s,y,S,m)){o=!0;break}}return"break"}if(h===t.PointShape.Circle){var w,p=void 0;for(d=u.vD[i].St;d<u.vD[i].bt;d+=1){w=ao(r,n[d].size||e);var k=Ks(p=v.map((function(t){return lo(t,w)})));if(eo.Ut(s,fo(n[d],k.min),fo(n[d],k.max))&&to(s,p,n[d])){o=!0;break}}return"break"}if(h===t.PointShape.Square){y=void 0,S=void 0,m=void 0;var x=void 0;for(b=void 0,d=u.vD[i].St;d<u.vD[i].bt;d+=1){g=n[d].rotation?Fo(v,go(n[d].rotation)):Fo(v,a);if(b=ao(r,n[d].size||e),y=fo(n[d],lo(g[0],b)),S=fo(n[d],lo(g[1],b)),m=fo(n[d],lo(g[2],b)),x=fo(n[d],lo(g[5],b)),eo.Yt(s,y,S,x,m)&&($s(s,y,S,m)||$s(s,m,S,x))){o=!0;break}}return"break"}}}if(o)return"break"},u=this,a=0;a<this.vD.length;a+=1){if("break"===h(a))break}return o}return!1},e.prototype.$n=function(t){return i.prototype.$n.call(this,t)},e.prototype.Et=function(){return this.Nh.max.x},e.prototype.zt=function(){return this.Nh.min.x},e.prototype.Vt=function(){return this.Nh.max.y},e.prototype.Nt=function(){return this.Nh.min.y},e.prototype.cu=function(){return.5*this.size.S()},e.prototype.lu=function(){return.5*this.size.S()},e.prototype.$h=function(){return i.prototype.$h.call(this),this.vD=[],this},e.prototype.ZB=function(){return this.mD&&(this.yB.VI(this.mD),this.mD=void 0),this.bD&&(this.bD=void 0),this.gD&&(this.yB.gl.deleteBuffer(this.gD),this.gD=void 0),this.pD&&(this.yB.VI(this.pD),this.pD=void 0),this.Ft&&(this.yB.VI(this.Ft),this.Ft=void 0),this},e}(xE),TZ=function(t,i,n){return[t,l(t.x+i,t.y),l(t.x+i,t.y+n),l(t.x,t.y+n)]};var CZ=function(i){function e(t,n,e,r,s){var o=i.call(this,t,n,e,r,s)||this;return o.gO=t,o.cL=new BX,o.yB=t.kO(),o}return n(e,i),e.prototype.Fe=function(){var t,n,e,r,s,o,u,a,f,c,d,v,y,S,m=this;if(this.Uo()||this.t(),this.Yo()){i.prototype.Fe.call(this),this.cL.$I(this.Rt);var b=this.Rt.Qi(),g=!1,w=this.sh.S();if(0!==w){if(this.t()||this.th.t||this.hi.t||this.sh.t||this.st.t||b){var p=this.hi.S();this.Dh=function(t,i,n,e,r){var s=TZ(t,i,n);if(0!==e||e%360!=0){var o=e*Math.PI/180;s[0]=ro(s[0],r,o),s[1]=ro(s[1],r,o),s[2]=ro(s[2],r,o),s[3]=ro(s[3],r,o)}return s}(this.th.S(),p.x,p.y,w,this.st.S()),g=!0,this.th.t=!1,this.hi.t=!1,this.sh.t=!1,this.st.t=!1}}else if(this.t()||this.th.t||this.hi.t||this.sh.t||b){p=this.hi.S();this.Dh=TZ(this.th.S(),p.x,p.y),g=!0,this.th.t=!1,this.hi.t=!1,this.sh.t=!1}this.kD=Ks(this.Dh);var k=this.jo();if(this.Ho!==Re){if(g){this.AO&&this.yB.gl.deleteBuffer(this.AO);var x=os(this.Dh,this.Rt.Ei());this.AO=this.yB.qL(x),this.TO=this.Dh.length}if(k&&(this.IO=this.Ho===Re?void 0:this.yB.FI(EX["2D"],EX.Color({dataType:this.Ho instanceof Je||this.Ho instanceof Qe?["gradient",this.Ho]:this.Ho instanceof uY?"texture":"uniform"}),EX.VertexLocation({axisWorldTranslation:NX(this.Rt),normalSource:void 0})),this.Xo(this.Ho)),this.Ho instanceof Je?this.BO=VX(this.kD,this.Rt,this.Ho.getPosition(),this.Ho.getExtent(),this.Ho.getShape(),this.yB.uL()):this.Ho instanceof Qe?this.LO=GX(this.kD,this.Rt,this.Ho.getAngle(!0),this.yB.uL()):(this.BO=void 0,this.LO=void 0),this.Ho instanceof uY){var M=this.Ho.getSource();if((!this.xD||k)&&M){this.xD&&(this.xD.texture.sL(this),this.yB.VI(this.xD.texCoordsBuffer));var A=this.yB.jI(M);A.rL(this),this.xD={texture:A,texCoordsBuffer:this.yB.qL([]),sourceMissingTexture:this.yB._I(new Uint8Array(Object.values(this.Ho.getSourceMissingColor().toJS()).map((function(t){return 255*t}))),this.yB.gl.RGBA,!1,!0,{x:1,y:1}),textureReadyCallback:function(){m.xD&&m.Ho instanceof uY&&(m.MD(),m.oo.xn())}},A.IL(this.xD.textureReadyCallback),this.MD()}this.xD&&this.xD.texture.xL&&this.xD.texture.kL&&this.xD.texture.gL&&(this.xD.texture.Fe(),this.oo.xn()),(b||g)&&this.xD&&this.xD.texture.xL&&this.MD()}else this.xD&&(this.xD.texture.sL(this),this.yB.VI(this.xD.texCoordsBuffer),this.xD=void 0)}var F=this.Zo;if(F instanceof nr){var T=F.getThickness();if(g||this.Jo(F.getThickness())){if(1===T||-1===T)t=h([this.Dh,void 0],2),this.OO=t[0],this.AD=t[1];else{var C=this.Rt;n=h(C instanceof Go?function(t,i,n){var e=t[0],r=t[1],s=t[2],o=t[3],h=i/2;return[[n.nn(e,r,h,-h),n.nn(r,e,-h,-h),n.nn(o,s,-h,-h),n.nn(s,o,h,-h),n.nn(e,r,-h,h),n.nn(r,e,h,h),n.nn(o,s,h,h),n.nn(s,o,-h,h)],[0,4,5,0,5,1,1,5,7,1,3,7,3,7,6,3,2,6,2,4,0,2,6,4]]}(this.Dh,T,C):(e=this.Dh,r=C.tn(),s=T,o=e[0],u=e[1],a=e[2],f=e[3],c=l(r.x*s*.5,r.y*s*.5),d=oo(so(u,o)),v=oo(so(f,o)),y=yo(d),S=yo(v),[[fo(o,fo(ao(y,c.x),ao(S,c.y))),fo(u,fo(ao(d,c.x),ao(S,c.y))),fo(f,fo(ao(y,c.x),ao(v,c.y))),fo(a,fo(ao(d,c.x),ao(v,c.y))),fo(o,fo(ao(d,c.x),ao(v,c.y))),fo(u,fo(ao(y,c.x),ao(v,c.y))),fo(f,fo(ao(d,c.x),ao(S,c.y))),fo(a,fo(ao(y,c.x),ao(S,c.y)))],[0,4,5,0,5,1,1,5,7,1,3,7,3,7,6,3,2,6,2,4,0,2,6,4]]),2),this.OO=n[0],this.AD=n[1]}this.DO&&this.yB.gl.deleteBuffer(this.DO),this.DO=this.yB.qL(os(this.OO,this.Rt.Ei())),this.AD?(this.TP&&this.yB.gl.deleteBuffer(this.TP),this.TP=this.yB.tI(new Uint16Array(this.AD)),this.PO=this.AD.length):(this.TP&&this.yB.gl.deleteBuffer(this.TP),this.TP=void 0,this.PO=this.OO.length);var B=F.getFillStyle();B instanceof Je?this.EO=VX(this.kD,this.Rt,B.getPosition(),B.getExtent(),B.getShape(),this.yB.uL()):B instanceof Qe?this.NO=GX(this.kD,this.Rt,B.getAngle(!0),this.yB.uL()):(this.EO=void 0,this.NO=void 0),this.VO=B===Re?void 0:this.yB.FI(EX["2D"],EX.Color({dataType:B instanceof Je||B instanceof Qe?["gradient",B]:"uniform"}),EX.VertexLocation({axisWorldTranslation:NX(this.Rt),normalSource:void 0})),this.Qo(F)}}}return this.Go(),this.th.t=!1,this.sh.t=!1,this.hi.t=!1,this.st.t=!1,this},e.prototype.MD=function(){if(this.xD&&this.Ho instanceof uY){var i=sr(this.kh(),this.Rt,this.oo.Rt),n=co(sr(fo(this.kh(),this.vi()),this.Rt,this.oo.Rt),i);this.xD.texCoordsBuffer&&this.yB.VI(this.xD.texCoordsBuffer),this.xD.texCoordsBuffer=this.yB.qL(function(i,n,e,r,s){var o=Math.min(e/i,r/n),h=i*o,u=n*o,a=e/h,f=r/u,c=h/e,l=u/r,d=0,v=1,y=0,S=1;switch(s){case t.ImageFitMode.Fill:f<a?(d=0,v=1,y=.5+-c/2,S=.5+c/2):(y=0,S=1,d=.5+-l/2,v=.5+l/2);break;case t.ImageFitMode.Fit:f<a?(y=0,S=1,d=.5+-a/2,v=.5+a/2):(d=0,v=1,y=.5+-f/2,S=.5+f/2);break;case t.ImageFitMode.Center:var m=e/i,b=r/n;d=.5+-m/2,v=.5+m/2,y=.5+-b/2,S=.5+b/2;break;case t.ImageFitMode.Stretch:default:d=0,v=1,y=0,S=1}return new Float32Array([d,S,v,S,v,y,d,y])}(this.xD.texture.wL,this.xD.texture.pL,n.x,n.y,this.Ho.getFitMode()))}},e.prototype.vB=function(){var t=this;if(this.Yo()){this.Fe();var i=this.IO,n=this.AO,e=this.TO,r=this.Ho;i&&n&&e&&(this.yB.rL(i),this.yB.NI(i,(function(s,o,h,u){if(t.Rt instanceof Vo||t.Rt instanceof tj?t.yB.VL(s("uScale"),t.cL.aO()).VL(s("uDisp"),t.cL.uO()).VL(u("uScaleStart_highpart"),t.cL.fO()).VL(u("uScaleStart_lowpart"),t.cL.cO()):t.Rt instanceof Go&&t.yB.VL(u("uScaleStart"),t.cL.MixedScaleXY.uScaleStart).VL(u("uScaleStartLog"),t.cL.MixedScaleXY.uScaleStartLog).VL(u("uScaleInterval"),t.cL.MixedScaleXY.uScaleInterval).VL(u("uScaleIntervalLog"),t.cL.MixedScaleXY.uScaleIntervalLog).VL(s("uViewportStart"),t.cL.MixedScaleXY.uViewportStart).VL(s("uViewportSize"),t.cL.MixedScaleXY.uViewportSize),r instanceof Ee)t.yB.YL(s("uColor"),r.getColor());else if(r instanceof Je)t.BO&&t.AO&&t.yB.GI(i,t.BO,r);else if(r instanceof Qe)t.LO&&t.AO&&t.yB.HI(i,t.LO,r);else if(r instanceof uY&&t.xD){var a=t.xD&&t.xD.texture.PL();t.yB.YL(s("uColor"),r.getSurroundingColor()).KL(s(QY),a||t.xD.sourceMissingTexture,0).rI(t.xD.texCoordsBuffer,void 0,{location:o("aTextureCoord"),size:2})}t.yB.UI(h,n,t.Rt.Ei(),void 0).Ky(t.yB.gl.TRIANGLE_FAN,e)})));var s=this.VO,o=this.Zo,h=this.DO;s&&h&&o instanceof nr&&(this.yB.rL(s),this.yB.NI(s,(function(i,n,e,r){t.Rt instanceof Vo||t.Rt instanceof tj?t.yB.VL(i("uScale"),t.cL.aO()).VL(i("uDisp"),t.cL.uO()).VL(r("uScaleStart_highpart"),t.cL.fO()).VL(r("uScaleStart_lowpart"),t.cL.cO()):t.Rt instanceof Go&&t.yB.VL(r("uScaleStart"),t.cL.MixedScaleXY.uScaleStart).VL(r("uScaleStartLog"),t.cL.MixedScaleXY.uScaleStartLog).VL(r("uScaleInterval"),t.cL.MixedScaleXY.uScaleInterval).VL(r("uScaleIntervalLog"),t.cL.MixedScaleXY.uScaleIntervalLog).VL(i("uViewportStart"),t.cL.MixedScaleXY.uViewportStart).VL(i("uViewportSize"),t.cL.MixedScaleXY.uViewportSize);var u=o.getFillStyle();u instanceof Ee?t.yB.YL(i("uColor"),u.getColor()):u instanceof Je?t.BO&&t.AO&&t.yB.GI(s,t.BO,u):u instanceof Qe&&t.LO&&t.AO&&t.yB.HI(s,t.LO,u),t.yB.UI(e,h,t.Rt.Ei(),void 0),t.TP?t.yB.aI(t.TP).fI(t.PO):t.yB.Ky(t.yB.gl.LINE_LOOP,t.PO)})))}return this},e.prototype.HO=function(t,i){var n=this.Rt;if(this.Yo()&&this.lo&&this.Dh&&this.kD){var e=sr({x:t,y:i},this.oo.Rt,this.Rt),r=this.Zo instanceof nr?this.Zo.getThickness():0,s=vE(this.kD,{x:r,y:r},this.Rt);if(!eo.Ut(e,s.min,s.max))return!1;var o=this.sh.S();if(this.Ho!==Re)if(o%360==0){var h=Ks(this.Dh);if(eo.Ut(e,h.min,h.max))return!0}else if(eo.Yt(e,this.Dh[0],this.Dh[1],this.Dh[2],this.Dh[3])&&$s(e,this.Dh[0],this.Dh[1],this.Dh[2])||$s(e,this.Dh[2],this.Dh[3],this.Dh[0]))return!0;if(this.Zo instanceof nr){if(this.AD)return Xs(e,this.OO,this.AD);if(!(n instanceof Vo))return!1;var u=n.tn(),a=u.y,f=u.x;if(o%360==0)return eo.Ut(e,l(this.Dh[0].x-f,this.Dh[0].y-a),l(this.Dh[1].x+f,this.Dh[1].y+a))||eo.Ut(e,l(this.Dh[1].x-f,this.Dh[1].y-a),l(this.Dh[2].x+f,this.Dh[2].y+a))||eo.Ut(e,l(this.Dh[3].x-f,this.Dh[3].y-a),l(this.Dh[2].x+f,this.Dh[2].y+a))||eo.Ut(e,l(this.Dh[0].x-f,this.Dh[0].y-a),l(this.Dh[3].x+f,this.Dh[3].y+a));var c=l(f,a);if(io(e,this.Dh[0],this.Dh[1],c)||io(e,this.Dh[1],this.Dh[2],c)||io(e,this.Dh[2],this.Dh[3],c)||io(e,this.Dh[3],this.Dh[0],c))return!0}}return!1},e.prototype.ZB=function(){return this.TP&&(this.yB.VI(this.TP),this.TP=void 0),this.AO&&(this.yB.VI(this.AO),this.AO=void 0),this.DO&&(this.yB.VI(this.DO),this.DO=void 0),this.xD&&(this.xD.texture.sL(this),this.xD.texture.OL(this.xD.textureReadyCallback),this.yB.KB(this.xD.sourceMissingTexture),this.yB.VI(this.xD.texCoordsBuffer),this.xD=void 0),this},e}(ME),BZ="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var LZ={exports:{}};function IZ(t,i,n){n=n||2;var e,r,s,o,h,u,a,f=i&&i.length,c=f?i[0]*n:t.length,l=OZ(t,0,c,n,!0),d=[];if(!l||l.next===l.prev)return d;if(f&&(l=function(t,i,n,e){var r,s,o,h=[];for(r=0,s=i.length;r<s;r++)(o=OZ(t,i[r]*e,r<s-1?i[r+1]*e:t.length,e,!1))===o.next&&(o.steiner=!0),h.push(jZ(o));for(h.sort(NZ),r=0;r<h.length;r++)VZ(h[r],n),n=PZ(n,n.next);return n}(t,i,l,n)),t.length>80*n){e=s=t[0],r=o=t[1];for(var v=n;v<c;v+=n)(h=t[v])<e&&(e=h),(u=t[v+1])<r&&(r=u),h>s&&(s=h),u>o&&(o=u);a=0!==(a=Math.max(s-e,o-r))?1/a:0}return DZ(l,d,n,e,r,a),d}function OZ(t,i,n,e,r){var s,o;if(r===nK(t,i,n,e)>0)for(s=i;s<n;s+=e)o=$Z(s,t[s],t[s+1],o);else for(s=n-e;s>=i;s-=e)o=$Z(s,t[s],t[s+1],o);return o&&XZ(o,o.next)&&(tK(o),o=o.next),o}function PZ(t,i){if(!t)return t;i||(i=t);var n,e=t;do{if(n=!1,e.steiner||!XZ(e,e.next)&&0!==YZ(e.prev,e,e.next))e=e.next;else{if(tK(e),(e=i=e.prev)===e.next)break;n=!0}}while(n||e!==i);return i}function DZ(t,i,n,e,r,s,o){if(t){!o&&s&&function(t,i,n,e){var r=t;do{null===r.z&&(r.z=HZ(r.x,r.y,i,n,e)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==t);r.prevZ.nextZ=null,r.prevZ=null,function(t){var i,n,e,r,s,o,h,u,a=1;do{for(n=t,t=null,s=null,o=0;n;){for(o++,e=n,h=0,i=0;i<a&&(h++,e=e.nextZ);i++);for(u=a;h>0||u>0&&e;)0!==h&&(0===u||!e||n.z<=e.z)?(r=n,n=n.nextZ,h--):(r=e,e=e.nextZ,u--),s?s.nextZ=r:t=r,r.prevZ=s,s=r;n=e}s.nextZ=null,a*=2}while(o>1)}(r)}(t,e,r,s);for(var h,u,a=t;t.prev!==t.next;)if(h=t.prev,u=t.next,s?RZ(t,e,r,s):_Z(t))i.push(h.i/n),i.push(t.i/n),i.push(u.i/n),tK(t),t=u.next,a=u.next;else if((t=u)===a){o?1===o?DZ(t=zZ(PZ(t),i,n),i,n,e,r,s,2):2===o&&EZ(t,i,n,e,r,s):DZ(PZ(t),i,n,e,r,s,1);break}}}function _Z(t){var i=t.prev,n=t,e=t.next;if(YZ(i,n,e)>=0)return!1;for(var r=t.next.next;r!==t.prev;){if(WZ(i.x,i.y,n.x,n.y,e.x,e.y,r.x,r.y)&&YZ(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function RZ(t,i,n,e){var r=t.prev,s=t,o=t.next;if(YZ(r,s,o)>=0)return!1;for(var h=r.x<s.x?r.x<o.x?r.x:o.x:s.x<o.x?s.x:o.x,u=r.y<s.y?r.y<o.y?r.y:o.y:s.y<o.y?s.y:o.y,a=r.x>s.x?r.x>o.x?r.x:o.x:s.x>o.x?s.x:o.x,f=r.y>s.y?r.y>o.y?r.y:o.y:s.y>o.y?s.y:o.y,c=HZ(h,u,i,n,e),l=HZ(a,f,i,n,e),d=t.prevZ,v=t.nextZ;d&&d.z>=c&&v&&v.z<=l;){if(d!==t.prev&&d!==t.next&&WZ(r.x,r.y,s.x,s.y,o.x,o.y,d.x,d.y)&&YZ(d.prev,d,d.next)>=0)return!1;if(d=d.prevZ,v!==t.prev&&v!==t.next&&WZ(r.x,r.y,s.x,s.y,o.x,o.y,v.x,v.y)&&YZ(v.prev,v,v.next)>=0)return!1;v=v.nextZ}for(;d&&d.z>=c;){if(d!==t.prev&&d!==t.next&&WZ(r.x,r.y,s.x,s.y,o.x,o.y,d.x,d.y)&&YZ(d.prev,d,d.next)>=0)return!1;d=d.prevZ}for(;v&&v.z<=l;){if(v!==t.prev&&v!==t.next&&WZ(r.x,r.y,s.x,s.y,o.x,o.y,v.x,v.y)&&YZ(v.prev,v,v.next)>=0)return!1;v=v.nextZ}return!0}function zZ(t,i,n){var e=t;do{var r=e.prev,s=e.next.next;!XZ(r,s)&&ZZ(r,e,e.next,s)&&JZ(r,s)&&JZ(s,r)&&(i.push(r.i/n),i.push(e.i/n),i.push(s.i/n),tK(e),tK(e.next),e=t=s),e=e.next}while(e!==t);return PZ(e)}function EZ(t,i,n,e,r,s){var o=t;do{for(var h=o.next.next;h!==o.prev;){if(o.i!==h.i&&UZ(o,h)){var u=QZ(o,h);return o=PZ(o,o.next),u=PZ(u,u.next),DZ(o,i,n,e,r,s),void DZ(u,i,n,e,r,s)}h=h.next}o=o.next}while(o!==t)}function NZ(t,i){return t.x-i.x}function VZ(t,i){if(i=function(t,i){var n,e=i,r=t.x,s=t.y,o=-1/0;do{if(s<=e.y&&s>=e.next.y&&e.next.y!==e.y){var h=e.x+(s-e.y)*(e.next.x-e.x)/(e.next.y-e.y);if(h<=r&&h>o){if(o=h,h===r){if(s===e.y)return e;if(s===e.next.y)return e.next}n=e.x<e.next.x?e:e.next}}e=e.next}while(e!==i);if(!n)return null;if(r===o)return n;var u,a=n,f=n.x,c=n.y,l=1/0;e=n;do{r>=e.x&&e.x>=f&&r!==e.x&&WZ(s<c?r:o,s,f,c,s<c?o:r,s,e.x,e.y)&&(u=Math.abs(s-e.y)/(r-e.x),JZ(e,t)&&(u<l||u===l&&(e.x>n.x||e.x===n.x&&GZ(n,e)))&&(n=e,l=u)),e=e.next}while(e!==a);return n}(t,i)){var n=QZ(i,t);PZ(i,i.next),PZ(n,n.next)}}function GZ(t,i){return YZ(t.prev,t,i.prev)<0&&YZ(i.next,t,t.next)<0}function HZ(t,i,n,e,r){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*r)|t<<8))|t<<4))|t<<2))|t<<1))|(i=1431655765&((i=858993459&((i=252645135&((i=16711935&((i=32767*(i-e)*r)|i<<8))|i<<4))|i<<2))|i<<1))<<1}function jZ(t){var i=t,n=t;do{(i.x<n.x||i.x===n.x&&i.y<n.y)&&(n=i),i=i.next}while(i!==t);return n}function WZ(t,i,n,e,r,s,o,h){return(r-o)*(i-h)-(t-o)*(s-h)>=0&&(t-o)*(e-h)-(n-o)*(i-h)>=0&&(n-o)*(s-h)-(r-o)*(e-h)>=0}function UZ(t,i){return t.next.i!==i.i&&t.prev.i!==i.i&&!function(t,i){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==i.i&&n.next.i!==i.i&&ZZ(n,n.next,t,i))return!0;n=n.next}while(n!==t);return!1}(t,i)&&(JZ(t,i)&&JZ(i,t)&&function(t,i){var n=t,e=!1,r=(t.x+i.x)/2,s=(t.y+i.y)/2;do{n.y>s!=n.next.y>s&&n.next.y!==n.y&&r<(n.next.x-n.x)*(s-n.y)/(n.next.y-n.y)+n.x&&(e=!e),n=n.next}while(n!==t);return e}(t,i)&&(YZ(t.prev,t,i.prev)||YZ(t,i.prev,i))||XZ(t,i)&&YZ(t.prev,t,t.next)>0&&YZ(i.prev,i,i.next)>0)}function YZ(t,i,n){return(i.y-t.y)*(n.x-i.x)-(i.x-t.x)*(n.y-i.y)}function XZ(t,i){return t.x===i.x&&t.y===i.y}function ZZ(t,i,n,e){var r=qZ(YZ(t,i,n)),s=qZ(YZ(t,i,e)),o=qZ(YZ(n,e,t)),h=qZ(YZ(n,e,i));return r!==s&&o!==h||(!(0!==r||!KZ(t,n,i))||(!(0!==s||!KZ(t,e,i))||(!(0!==o||!KZ(n,t,e))||!(0!==h||!KZ(n,i,e)))))}function KZ(t,i,n){return i.x<=Math.max(t.x,n.x)&&i.x>=Math.min(t.x,n.x)&&i.y<=Math.max(t.y,n.y)&&i.y>=Math.min(t.y,n.y)}function qZ(t){return t>0?1:t<0?-1:0}function JZ(t,i){return YZ(t.prev,t,t.next)<0?YZ(t,i,t.next)>=0&&YZ(t,t.prev,i)>=0:YZ(t,i,t.prev)<0||YZ(t,t.next,i)<0}function QZ(t,i){var n=new iK(t.i,t.x,t.y),e=new iK(i.i,i.x,i.y),r=t.next,s=i.prev;return t.next=i,i.prev=t,n.next=r,r.prev=n,e.next=n,n.prev=e,s.next=e,e.prev=s,e}function $Z(t,i,n,e){var r=new iK(t,i,n);return e?(r.next=e.next,r.prev=e,e.next.prev=r,e.next=r):(r.prev=r,r.next=r),r}function tK(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function iK(t,i,n){this.i=t,this.x=i,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function nK(t,i,n,e){for(var r=0,s=i,o=n-e;s<n;s+=e)r+=(t[o]-t[s])*(t[s+1]+t[o+1]),o=s;return r}LZ.exports=IZ,LZ.exports.default=IZ,IZ.deviation=function(t,i,n,e){var r=i&&i.length,s=r?i[0]*n:t.length,o=Math.abs(nK(t,0,s,n));if(r)for(var h=0,u=i.length;h<u;h++){var a=i[h]*n,f=h<u-1?i[h+1]*n:t.length;o-=Math.abs(nK(t,a,f,n))}var c=0;for(h=0;h<e.length;h+=3){var l=e[h]*n,d=e[h+1]*n,v=e[h+2]*n;c+=Math.abs((t[l]-t[v])*(t[d+1]-t[l+1])-(t[l]-t[d])*(t[v+1]-t[l+1]))}return 0===o&&0===c?0:Math.abs((c-o)/o)},IZ.flatten=function(t){for(var i=t[0][0].length,n={vertices:[],holes:[],dimensions:i},e=0,r=0;r<t.length;r++){for(var s=0;s<t[r].length;s++)for(var o=0;o<i;o++)n.vertices.push(t[r][s][o]);r>0&&(e+=t[r-1].length,n.holes.push(e))}return n};var eK=LZ.exports,rK=function(t){function i(i,n,e,r,s){var o=t.call(this,i,n,e,r,s)||this;return o.gO=i,o.cL=new BX,o.wO=Ps,o.yB=i.kO(),o}return n(i,t),i.prototype.Pw=function(t){var i,n,e,r=Number.MAX_VALUE;try{for(var s=o(this.Dh),h=s.next();!h.done;h=s.next()){var u=h.value,a=Hs(sr(u,this.Rt,this.oo.Rt),t);a<r&&(r=a,e=u)}}catch(t){i={error:t}}finally{try{h&&!h.done&&(n=s.return)&&n.call(s)}finally{if(i)throw i.error}}return e},i.prototype.Fe=function(){var t=this.Uo()||this.t();if(this.Yo()){this.cL.$I(this.Rt);var i=!1;(!this.Qp||this.Rt.Qi()||t)&&(this.Qp=this.Rt.tn(),i=!0);var n=!1;if(this.t()&&(this.wO=Ks(this.Dh),this.Nh=this.wO,this.Go(),n=!0),this.Ho!==Re){if(n){this.AO&&this.yB.gl.deleteBuffer(this.AO);var e=os(this.Dh,this.Rt.Ei());this.AO=this.yB.qL(e),this.FD=new Uint16Array(eK(e)),this.TD&&this.yB.gl.deleteBuffer(this.TD),this.TD=this.yB.tI(this.FD),this.TO=this.FD.length}if(this.jo()){var r=this.Ho instanceof Ee&&this.Ho,s=this.Ho instanceof Ve&&this.Ho,o=this.Ho instanceof Je&&this.Ho,h=this.Ho instanceof Qe&&this.Ho;if(s){var u=s.getPalette();this.QO=this.gO.$O(u,this.qO,this.QO),this.qO=u}else this.gO.BI.uo(this.qO),this.qO=void 0;this.IO=r||o||h||s&&"value"!==s.getLookUpProperty()?this.yB.FI(EX["2D"],r&&EX.Color({dataType:"uniform"}),h&&EX.Color({dataType:["gradient",h]}),o&&EX.Color({dataType:["gradient",o]}),s&&EX.Color({dataType:["lookup",s.getLookUpProperty()]}),EX.VertexLocation({axisWorldTranslation:NX(this.Rt),normalSource:void 0})):void 0,this.Xo(this.Ho)}this.Ho instanceof Je?this.BO=VX(this.mo||this.Nh,this.Rt,this.Ho.getPosition(),this.Ho.getExtent(),this.Ho.getShape(),this.yB.uL()):this.Ho instanceof Qe?this.LO=GX(this.mo||this.Nh,this.Rt,this.Ho.getAngle(!0),this.yB.uL()):(this.BO=void 0,this.LO=void 0)}var a=this.Zo,f=0;if(a instanceof nr){var c=a.getFillStyle(),d=a.getThickness();if(f=d,n||this.Jo(a.getThickness())||i&&1!==d){var v=1===d||-1===d?this.Dh:jX(this.Dh,this.Qp,d);this.OO=os(v,this.Rt.Ei()),this.DO&&this.OO?(this.yB.$L(this.DO,this.OO,!0),this.PO=v.length):!this.DO&&this.OO?(this.DO=this.yB.qL(this.OO,!0),this.PO=v.length):this.DO&&!this.OO&&(this.yB.VI(this.DO),this.DO=void 0,this.PO=0),this.VO=c===Re?void 0:this.yB.FI(EX["2D"],EX.Color({dataType:c instanceof Je||c instanceof Qe?["gradient",c]:"uniform"}),EX.VertexLocation({axisWorldTranslation:NX(this.Rt),normalSource:void 0})),this.Qo(a)}c instanceof Je?this.EO=VX(this.mo||this.Nh,this.Rt,c.getPosition(),c.getExtent(),c.getShape(),this.yB.uL()):c instanceof Qe?this.NO=GX(this.mo||this.Nh,this.Rt,c.getAngle(!0),this.yB.uL()):(this.EO=void 0,this.NO=void 0)}var y=f*this.Qp.x,S=f*this.Qp.y;this.wO=b(l(this.Nh.min.x-y,this.Nh.min.y-S),l(this.Nh.max.x+y,this.Nh.max.y+S)),this.Go()}return this},i.prototype.vB=function(){var t=this;if(this.Yo()){this.Fe();var i=this.Ho,n=this.IO,e=this.AO,r=this.TO;n&&e&&r&&this.yB.rL(n).NI(n,(function(r,s,o,h){t.yB.VL(r("uScale"),t.cL.aO()).VL(r("uDisp"),t.cL.uO()).VL(h("uScaleStart_highpart"),t.cL.fO()).VL(h("uScaleStart_lowpart"),t.cL.cO()).UI(o,e,t.Rt.Ei(),void 0).aI(t.TD),i instanceof Ee?t.yB.YL(r("uColor"),i.getColor()):i instanceof Je?t.BO&&t.yB.GI(n,t.BO,i):i instanceof Qe?t.LO&&t.yB.HI(n,t.LO,i):i instanceof Ve&&t.QO&&t.yB.XL(r("uLookupMin"),i.lut.min).XL(r("uLookupMax"),i.lut.max).XL(r("uLookupTextureHeightPx"),t.QO.textureHeight).KL(r("uLookupTexture"),t.QO.texture,0),t.yB.fI(t.TO)}));var s=this.VO,o=this.DO,h=this.PO,u=this.Zo;s&&o&&h&&this.yB.rL(s).NI(s,(function(i,n,e,r){if(t.yB.VL(i("uScale"),t.cL.aO()).VL(i("uDisp"),t.cL.uO()).UI(e,o,t.Rt.Ei(),void 0),u instanceof nr){var h=u.getFillStyle();h instanceof Ee?t.yB.YL(i("uColor"),h.getColor()):h instanceof Je?t.EO&&t.yB.GI(s,t.EO,h):h instanceof Qe&&t.NO&&t.yB.HI(s,t.NO,h);var a=u.getThickness(),f=-1===a||1===a;t.yB.Ky(f?t.yB.gl.LINE_LOOP:t.yB.gl.TRIANGLE_STRIP,t.PO)}}))}return this},i.prototype.HO=function(t,i){if(this.Yo()&&this.lo.S()&&this.Qp){var n=sr({x:t,y:i},this.oo.Rt,this.Rt);if(eo.Ut(n,this.wO.min,this.wO.max)){if(eo.Ut(n,this.Nh.min,this.Nh.max)&&this.Ho!==Re){var e=this.Dh;if(e)return Xs(n,e,this.FD)}var r=this.Zo;if(r instanceof nr){if(this.OO&&1!==r.getThickness())return Zs(n,this.OO);if(this.OO)for(var s=this.OO.length-1,o=this.Qp.y,h=this.Qp.x,u=0;u<s;u+=1){var a=l(this.OO[u],this.OO[u+1]),f=l(this.OO[u+2],this.OO[u+3]),c=so(a,f);if(0!==c.x||0!==c.y||eo.Wt(n,a,f))if(Math.abs(c.x/this.Qp.x)>Math.abs(c.y/this.Qp.y)){var d=l(a.x,a.y+o),v=l(a.x,a.y-o),y=l(f.x,f.y+o),S=l(f.x,f.y-o);if($s(n,d,v,y)||$s(n,y,S,d))return!0}else{var m=l(a.x+h,a.y),b=l(a.x-h,a.y),g=l(f.x+h,f.y),w=l(f.x-h,f.y);if($s(n,m,b,g)||$s(n,g,w,m))return!0}}}}}return!1},i.prototype.ZB=function(){return this.TD&&(this.yB.VI(this.TD),this.TD=void 0),this.AO&&(this.yB.VI(this.AO),this.AO=void 0),this.DO&&(this.yB.VI(this.DO),this.DO=void 0),this.QO=void 0,this},i}(TE),sK=function(t,i){for(var n=0,e=[];n<t;){var r=n,s=i,o=n>0;s-=o?1:0,s-=n+s<t?1:0;var h=Math.min(s,t-r),u=n-(o?1:0),a={start:u,startUnique:r,sizeData:Math.min(i,t-u),sizeUniqueData:h};e.push(a),n+=h}return e},oK=function(t,i){for(var n=0,e=[];n<t;){var r=n,s=i,o=n>0;s-=o?1:0;s-=0;var h=Math.min(s,t-r),u=n-(o?1:0),a={start:u,startUnique:r,sizeData:Math.min(i,t-u),sizeUniqueData:h};e.push(a),n+=h}return e},hK=function(t,i,n,e){if(n){var r=new Map;return i.gridTiles.forEach((function(t){r.set(t,{type:n,dataInvalidationRanges:[{tileInvalidationOffset:{primary:0,secondary:0},tileInvalidationLength:t.sizeHeatmapDataVectors}]})})),r}for(var s=new Map,o=function(n){var r=t[n],o={x:r.startPrimary,y:r.startSecondary},h={x:o.x+r.lengthPrimary-1,y:o.y+r.lengthSecondary-1},u=[o,{x:h.x,y:o.y},h,{x:o.x,y:h.y}];i.gridTiles.forEach((function(t){var i=t.iFirstVector,n=e(t),o={x:i.primary+n.primary-1,y:i.secondary+n.secondary-1},h=[{x:i.primary,y:i.secondary},{x:o.x,y:i.secondary},o,{x:i.primary,y:o.y}];if(zs(u,h)){var a=s.get(t);a||(a={type:r.type,dataInvalidationRanges:[]},s.set(t,a));for(var f,c,l=Es(u,h),d={primary:l.min.x-i.primary,secondary:l.min.y-i.secondary},v={primary:1+l.max.x-l.min.x,secondary:1+l.max.y-l.min.y},y=!1,S=[{x:d.primary,y:d.secondary},{x:d.primary+v.primary,y:d.secondary},{x:d.primary+v.primary,y:d.secondary+v.secondary},{x:d.primary,y:d.secondary+v.secondary}],m=0;m<a.dataInvalidationRanges.length;m+=1)if(!y){var b=a.dataInvalidationRanges[m],g=[{x:b.tileInvalidationOffset.primary,y:b.tileInvalidationOffset.secondary},{x:b.tileInvalidationOffset.primary+b.tileInvalidationLength.primary,y:b.tileInvalidationOffset.secondary},{x:b.tileInvalidationOffset.primary+b.tileInvalidationLength.primary,y:b.tileInvalidationOffset.secondary+b.tileInvalidationLength.secondary},{x:b.tileInvalidationOffset.primary,y:b.tileInvalidationOffset.secondary+b.tileInvalidationLength.secondary}];if(zs(S,g)){var w=(f=S,c=g,{min:{x:Math.min(f[0].x,c[0].x),y:Math.min(f[0].y,c[0].y)},max:{x:Math.max(f[2].x,c[2].x),y:Math.max(f[2].y,c[2].y)}});b.tileInvalidationOffset.primary=w.min.x,b.tileInvalidationOffset.secondary=w.min.y,b.tileInvalidationLength.primary=w.max.x-w.min.x,b.tileInvalidationLength.secondary=w.max.y-w.min.y,y=!0}}y||a.dataInvalidationRanges.push({tileInvalidationLength:v,tileInvalidationOffset:d})}}))},h=0;h<t.length;h+=1)o(h);return s},uK=function(t,i,n){if(1!==t.length||0!==i.startPrimary||0!==i.startSecondary||i.lengthPrimary!==t[0].sizeHeatmapDataVectors.primary||i.lengthSecondary!==t[0].sizeHeatmapDataVectors.secondary)t.forEach((function(t){for(var e=n(t),r=Math.max(i.startPrimary,t.iFirstVector.primary),s=Math.min(i.startPrimary+i.lengthPrimary-1,t.iFirstVector.primary+t.sizeHeatmapDataVectors.primary-1),o=Math.max(i.startSecondary,t.iFirstVector.secondary),h=Math.min(i.startSecondary+i.lengthSecondary-1,t.iFirstVector.secondary+t.sizeHeatmapDataVectors.secondary-1),u=r;u<=s;u+=1)for(var a=u-i.startPrimary,f=i.values[a],c=(u-t.iFirstVector.primary)*t.sizeHeatmapDataVectors.secondary,l=o;l<=h;l+=1){var d=l-i.startSecondary,v=l-t.iFirstVector.secondary,y=f[d];e[c+v]=y}}));else for(var e=t[0],r=n(e),s=0;s<i.lengthPrimary;s+=1){var o=s*e.sizeHeatmapDataVectors.secondary;r.set(i.values[s],o)}},aK=function(t,i,n){var e,r,s=null===(e=t.gl2)||void 0===e?void 0:e.ctx;if(s)return t._I(null,s.RED,!1,!0,{x:i,y:n},s.FLOAT,s.R32F);var o=t.gl;return(null===(r=t.gl1)||void 0===r?void 0:r.optional.OES_texture_float)?t._I(null,o.LUMINANCE,!1,!0,{x:i,y:n},o.FLOAT):t._I(null,o.RGBA,!1,!0,{x:i,y:n},o.UNSIGNED_BYTE)},fK=function(t,i,n,e){i.forEach((function(i,r){var s,o,h=n(r),u=e(r),a=t.gl;a.bindTexture(a.TEXTURE_2D,u),a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1);var f=null===(s=t.gl2)||void 0===s?void 0:s.ctx,c=i.dataInvalidationRanges.length,l=i.dataInvalidationRanges.reduce((function(t,i){return t+i.tileInvalidationLength.primary}),0)/r.sizeHeatmapDataVectors.primary;1===c&&l<1||l<.5&&c<10?i.dataInvalidationRanges.forEach((function(i){var n,e=i.tileInvalidationOffset.primary*r.sizeHeatmapDataVectors.secondary,s=e+i.tileInvalidationLength.primary*r.sizeHeatmapDataVectors.secondary;if(f)f.texSubImage2D(a.TEXTURE_2D,0,0,i.tileInvalidationOffset.primary,r.sizeHeatmapDataVectors.secondary,i.tileInvalidationLength.primary,f.RED,f.FLOAT,h.subarray(e,s));else if(null===(n=t.gl1)||void 0===n?void 0:n.optional.OES_texture_float)a.texSubImage2D(a.TEXTURE_2D,0,0,i.tileInvalidationOffset.primary,r.sizeHeatmapDataVectors.secondary,i.tileInvalidationLength.primary,a.LUMINANCE,a.FLOAT,h.subarray(e,s));else{var o=new Uint8Array(h.buffer).subarray(4*e,4*s);a.texSubImage2D(a.TEXTURE_2D,0,0,i.tileInvalidationOffset.primary,r.sizeHeatmapDataVectors.secondary,i.tileInvalidationLength.primary,a.RGBA,a.UNSIGNED_BYTE,o)}})):f?f.texImage2D(a.TEXTURE_2D,0,f.R32F,r.sizeHeatmapDataVectors.secondary,r.sizeHeatmapDataVectors.primary,0,f.RED,f.FLOAT,h):(null===(o=t.gl1)||void 0===o?void 0:o.optional.OES_texture_float)?a.texImage2D(a.TEXTURE_2D,0,a.LUMINANCE,r.sizeHeatmapDataVectors.secondary,r.sizeHeatmapDataVectors.primary,0,a.LUMINANCE,a.FLOAT,h):a.texImage2D(a.TEXTURE_2D,0,a.RGBA,r.sizeHeatmapDataVectors.secondary,r.sizeHeatmapDataVectors.primary,0,a.RGBA,a.UNSIGNED_BYTE,new Uint8Array(h.buffer)),a.bindTexture(a.TEXTURE_2D,null)}))},cK=function(t){function i(i,n,r,s,o,h){var u=t.call(this,i,n,r,s,o,h)||this;u.gO=i,u.cL=new BX,u.xP={},u.CD=[],u.BD=!1,u.LD=!1,u.ID=sK,u.yB=i.kO();var a=Math.min(u.yB.XB,2048),f={x:Math.min(a,u.Vm.primaryDimensionVectorsCount),y:Math.min(a,u.Vm.secondaryDimensionVectorsCount)},c=function(t,i,n,e){var r,s=[],o=n(t.primaryDimensionVectorsCount,i.x),h=n(t.secondaryDimensionVectorsCount,i.y);return o.forEach((function(t){return h.forEach((function(i){var n={iFirstVector:{primary:t.start,secondary:i.start},iFirstUniqueVector:{primary:t.startUnique,secondary:i.startUnique},sizeHeatmapDataVectors:{primary:t.sizeData,secondary:i.sizeData},sizeUniqueHeatmapDataVectors:{primary:t.sizeUniqueData,secondary:i.sizeUniqueData}};s.push(n)}))})),e&&e.gridTileSizes?r=e.gridTileSizes:(r=[],s.forEach((function(t){var i=r.find((function(i){return i.sizeHeatmapData.primary===t.sizeHeatmapDataVectors.primary&&i.sizeHeatmapData.secondary===t.sizeHeatmapDataVectors.secondary}));i||(i={sizeHeatmapData:t.sizeHeatmapDataVectors,tiles:[]},r.push(i)),i.tiles.push(t)}))),{gridTiles:s,gridTileSizes:r}}(u.Vm,f,u.ID),l=c.gridTiles.map((function(t){var i="columns"===u.Vm.dataOrder?{x:u.Vm.start.x+u.Vm.step.x*t.iFirstVector.primary,y:u.Vm.start.y+u.Vm.step.y*t.iFirstVector.secondary}:{x:u.Vm.start.x+u.Vm.step.x*t.iFirstVector.secondary,y:u.Vm.start.y+u.Vm.step.y*t.iFirstVector.primary},n="columns"===u.Vm.dataOrder?{x:u.Vm.step.x*t.sizeHeatmapDataVectors.primary,y:u.Vm.step.y*t.sizeHeatmapDataVectors.secondary}:{x:u.Vm.step.x*t.sizeHeatmapDataVectors.secondary,y:u.Vm.step.y*t.sizeHeatmapDataVectors.primary},r="columns"===u.Vm.dataOrder?{x:u.Vm.start.x+u.Vm.step.x*t.iFirstUniqueVector.primary,y:u.Vm.start.y+u.Vm.step.y*t.iFirstUniqueVector.secondary}:{x:u.Vm.start.x+u.Vm.step.x*t.iFirstUniqueVector.secondary,y:u.Vm.start.y+u.Vm.step.y*t.iFirstUniqueVector.primary},s="columns"===u.Vm.dataOrder?{x:u.Vm.step.x*t.sizeUniqueHeatmapDataVectors.primary,y:u.Vm.step.y*t.sizeUniqueHeatmapDataVectors.secondary}:{x:u.Vm.step.x*t.sizeUniqueHeatmapDataVectors.secondary,y:u.Vm.step.y*t.sizeUniqueHeatmapDataVectors.primary},o=new Float32Array(t.sizeHeatmapDataVectors.primary*t.sizeHeatmapDataVectors.secondary);return e(e({},t),{startLocationAxis:i,startRenderLocationAxis:r,sizeAxis:n,renderSizeAxis:s,intensityData:o,hasIntensityData:!1})})),d=c.gridTileSizes.map((function(t){return e(e({},t),{tiles:l.filter((function(i){return i.sizeHeatmapDataVectors.primary===t.sizeHeatmapData.primary&&i.sizeHeatmapDataVectors.secondary===t.sizeHeatmapData.secondary}))})}));return u.OD={gridTiles:l,gridTileSizes:d},u}return n(i,t),i.prototype.Fe=function(){var t=this.CD,i=this.Ho,n=this.jo(),e=this.wa,r=e!==this.Ga,s=i instanceof Ve&&i,o=i instanceof Ee&&i,h=s&&s.getPalette(),u=this.PD.t,a=this.PD.S(),f=this.co,c=this.LD;this.DD=this.DD||this._D();var l=this.DD,d=hK(t,l,f&&this.BD||c?"intensity":void 0,(function(t){return t.sizeHeatmapDataVectors}));d.size>0&&(fK(this.yB,d,(function(t){return t.intensityData}),(function(t){return t.intensityDataTexture})),this.BD=!0),this.cL.$I(this.Rt);var v=this.xP;if((n||this.co||u)&&(h?(this.RD=this.gO.$O(h,this.zD,this.RD),this.zD=h):(this.RD=void 0,this.gO.BI.uo(this.zD),this.zD=void 0),v.tile=s&&this.RD?{renderMode:"paletted",fillStylePaletted:s,colorLookupTexture:this.RD,shader:this.yB.FI(EX["2D"],EX.ColorGrid2D({heatmapType:"intensity",interpolation:"bilinear"===a&&"bilinear",flipXY:"rows"===this.Vm.dataOrder,intensityTextureType:this.yB.MI?"float":"ubyte",littleEndian:this.yB.IS_MACHINE_LITTLE_ENDIAN}),EX.VertexLocation({scaling:{dataType:"uniform"},translation:{dataType:"uniform",sizeUnit:"axis"},axisWorldTranslation:NX(this.Rt),flipXY:"rows"===this.Vm.dataOrder,normalSource:void 0}))}:o?{renderMode:"solid",fillStyleSolid:o,shader:this.yB.FI(EX["2D"],EX.Color({dataType:"uniform"}),EX.VertexLocation({scaling:{dataType:"uniform"},translation:{dataType:"uniform",sizeUnit:"axis"},axisWorldTranslation:NX(this.Rt),flipXY:"rows"===this.Vm.dataOrder,normalSource:void 0}))}:void 0),r||this.co){var y=e instanceof nr&&e,S=y&&y.getFillStyle(),m=S instanceof Ee&&S;v.wireframe=y&&m?-1===y.getThickness()?{renderMode:"primitive",shader:this.yB.FI(EX["2D"],EX.Color({dataType:"uniform"}),EX.VertexLocation({translation:{dataType:"uniform",sizeUnit:"axis"},scaling:{dataType:"uniform"},flipXY:"rows"===this.Vm.dataOrder,axisWorldTranslation:NX(this.Rt),normalSource:void 0})),fillStyleSolid:m}:{renderMode:"triangulated",shader:this.yB.FI(EX["2D"],EX.Color({dataType:"uniform"}),EX.LineInstanced2D({translation:{dataType:"uniform",sizeUnit:"axis"},scaling:{dataType:"uniform"},flipXY:"rows"===this.Vm.dataOrder,axisWorldTranslation:NX(this.Rt),normalSource:void 0}),this.yB.kI?EX.AliasedEdge():void 0),geometry:cZ(this.yB,1),solidLine:y,fillStyleSolid:m}:void 0,v.wireframe?this.ED=this.ED||this.ND():this.ED&&(this.yB.VI(this.ED.wireframeCoordinatesBuffer),this.ED=void 0)}return this.xP=v,this.Vo=!1,this.LD=!1,this.co=!1,this.CD.length=0,this.Xo(i),this.Ga=e,this.PD.t=!1,this},i.prototype._D=function(){var t=this,i=this.OD.gridTiles.map((function(i){var n=aK(t.yB,i.sizeHeatmapDataVectors.secondary,i.sizeHeatmapDataVectors.primary);return e(e({},i),{intensityDataTexture:n})})),n=this.OD.gridTileSizes.map((function(t){return e(e({},t),{tiles:i.filter((function(i){return i.sizeHeatmapDataVectors.primary===t.sizeHeatmapData.primary&&i.sizeHeatmapDataVectors.secondary===t.sizeHeatmapData.secondary}))})})),r=this.yB.qL([0,0,1,0,0,1,1,1]),s=this.yB.gl.TRIANGLE_STRIP;return{gridTiles:i,gridTileSizes:n,rectangleLocationsBuffer:r,rectangleLocationsDrawMode:s,rectangleLocationsDrawLength:4}},i.prototype.ND=function(){for(var t=this.Vm.primaryDimensionVectorsCount+1+this.Vm.secondaryDimensionVectorsCount+1,i=new Float32Array(4*t),n=0,e=0;e<this.Vm.primaryDimensionVectorsCount+1;e+=1)i[n+0]=e,i[n+1]=0,i[n+2]=e,i[n+3]=this.Vm.secondaryDimensionVectorsCount,n+=4;for(var r=0;r<this.Vm.secondaryDimensionVectorsCount+1;r+=1)i[n+0]=0,i[n+1]=r,i[n+2]=this.Vm.primaryDimensionVectorsCount,i[n+3]=r,n+=4;return{wireframeCoordinatesBuffer:this.yB.qL(i),wireframeSegmentsLength:t}},i.prototype.vB=function(){var t=this;this.Fe();var i=this.DD;if(this.xP.tile&&i){var n=this.xP.tile,e={x:(this.Nh.max.x-this.Nh.min.x)*Math.sign(this.Vm.step.x),y:(this.Nh.max.y-this.Nh.min.y)*Math.sign(this.Vm.step.y)},r={x:e.x/this.Vm.columns,y:e.y/this.Vm.rows},s=this.Rt.tn(),o={x:r.x/s.x,y:r.y/s.y};if("paletted"===n.renderMode){var h=n.shader,u=n.colorLookupTexture,a=n.fillStylePaletted;this.yB.NI(h,(function(n,e,r){var s,f;t.yB.rL(h).VL(h.yL("uScale"),t.cL.aO()).VL(h.yL("uDisp"),t.cL.uO()).KL(h.yL("uLookupTexture"),u.texture,0).XL(h.yL("uLookupMin"),a.getPalette().min).XL(h.yL("uLookupMax"),a.getPalette().max).XL(n("uLookupTextureHeightPx"),u.textureHeight).rI(i.rectangleLocationsBuffer,void 0,{location:e("aPos"),size:2}),s=function(i){t.yB.VL(h.yL("uTileDimensions"),["columns"===t.Vm.dataOrder?i.sizeHeatmapData.primary:i.sizeHeatmapData.secondary,"columns"===t.Vm.dataOrder?i.sizeHeatmapData.secondary:i.sizeHeatmapData.primary])},f=function(e,r){var s,h,u,a=t.yB.uL();s="bilinear"===t.PD.S()?[h=(t.Rt.x._t(e.startLocationAxis.x)+o.x/2)*a,u=(t.Rt.y._t(e.startLocationAxis.y)+o.y/2)*a,(t.Rt.x._t(e.startLocationAxis.x+e.sizeAxis.x)-o.x/2)*a-h,(t.Rt.y._t(e.startLocationAxis.y+e.sizeAxis.y)-o.y/2)*a-u]:[h=t.Rt.x._t(e.startLocationAxis.x)*a,u=t.Rt.y._t(e.startLocationAxis.y)*a,t.Rt.x._t(e.startLocationAxis.x+e.sizeAxis.x)*a-h,t.Rt.y._t(e.startLocationAxis.y+e.sizeAxis.y)*a-u],t.yB.HL(n("uTileBounds"),s).VL(n("uScaling"),[e.renderSizeAxis.x,e.renderSizeAxis.y]).VL(n("uTranslationAxis"),[e.startRenderLocationAxis.x,e.startRenderLocationAxis.y]).KL(n("uTileIntensityValues"),e.intensityDataTexture,1).Ky(i.rectangleLocationsDrawMode,i.rectangleLocationsDrawLength)},i.gridTileSizes.forEach((function(t){s(t),t.tiles.forEach((function(i){f(i,t)}))}))}))}if("solid"===n.renderMode){var f=n.shader,c=n.fillStyleSolid;this.yB.NI(f,(function(n,e,r){t.yB.rL(f).VL(n("uScale"),t.cL.aO()).VL(n("uDisp"),t.cL.uO()).rI(i.rectangleLocationsBuffer,void 0,{location:e("aPos"),size:2}).YL(n("uColor"),c.getColor()).VL(n("uScaling"),[t.Vm.step.x*t.Vm.columns,t.Vm.step.y*t.Vm.rows]).VL(n("uTranslationAxis"),[t.Vm.start.x,t.Vm.start.y]).Ky(i.rectangleLocationsDrawMode,i.rectangleLocationsDrawLength)}))}}var l=this.ED,d=this.xP.wireframe;if(l&&d&&"primitive"===d.renderMode){var v=d.shader,y=d.fillStyleSolid;this.yB.rL(v).NI(v,(function(i,n,e){(t.Rt instanceof Vo||t.Rt instanceof tj)&&t.yB.VL(i("uScale"),t.cL.aO()).VL(i("uDisp"),t.cL.uO()),t.yB.YL(i("uColor"),y.getColor()),t.yB.rI(l.wireframeCoordinatesBuffer,void 0,{location:n("aPos"),size:2}).VL(i("uScaling"),[t.Vm.step.x,t.Vm.step.y]).VL(i("uTranslationAxis"),[t.Vm.start.x,t.Vm.start.y]).Ky(t.yB.gl.LINES,2*l.wireframeSegmentsLength)}))}else if(l&&d&&"triangulated"===d.renderMode){var S=d.shader,m=d.geometry,b=d.solidLine,g=d.fillStyleSolid;this.yB.rL(S).NI(S,(function(i,n,e){(t.Rt instanceof Vo||t.Rt instanceof tj)&&t.yB.VL(i("uScale"),t.cL.aO()).VL(i("uDisp"),t.cL.uO()),t.yB.YL(i("uColor"),g.getColor()).XL(S.yL("uThicknessPixels"),b.getThickness()).VL(S.yL("uRatioPxClip"),[2/t.oo.vi().x,2/t.oo.vi().y]).rI(l.wireframeCoordinatesBuffer,1,{location:n("aLocationA"),size:2},{location:n("aLocationB"),size:2}).VL(i("uScaling"),[t.Vm.step.x,t.Vm.step.y]).VL(i("uTranslationAxis"),[t.Vm.start.x,t.Vm.start.y]),m.rL(e).Ky(l.wireframeSegmentsLength)}))}return this},i.prototype.Wm=function(t){return this.CD.push(t),uK(this.OD.gridTiles,t,(function(t){return t.hasIntensityData=!0,t.intensityData})),this},i.prototype.$h=function(){return this.BD&&(this.OD.gridTiles.forEach((function(t){t.intensityData.fill(0),t.hasIntensityData=!1})),this.LD=!0,this.BD=!1),this},i.prototype.dispose=function(){var i=this;t.prototype.dispose.call(this),this.gO.BI.uo(this.zD),this.zD=void 0,this.RD=void 0;var n=this.DD;n&&(n.gridTiles.forEach((function(t){i.yB.KB(t.intensityDataTexture)})),n.gridTiles.length=0,n.gridTileSizes.forEach((function(t){})),n.gridTileSizes.length=0,this.yB.VI(n.rectangleLocationsBuffer)),this.DD=void 0;var e=this.ED;return e&&this.yB.VI(e.wireframeCoordinatesBuffer),this.ED=void 0,this.xP={},this},i.prototype.ZB=function(){return this.dispose(),this},i.prototype.HO=function(t,i){var n=sr({x:t,y:i},this.engine.Rt,this.Rt);return!!eo.Ut(n,this.Nh.min,this.Nh.max)},i.prototype.Pw=function(t){var i=t,n="columns"===this.Vm.dataOrder?i.x:i.y,e="columns"===this.Vm.dataOrder?i.y:i.x,r="columns"===this.Vm.dataOrder?this.Vm.start.x:this.Vm.start.y,s="columns"===this.Vm.dataOrder?this.Vm.start.y:this.Vm.start.x,o=(n-r)/("columns"===this.Vm.dataOrder?this.Vm.step.x:this.Vm.step.y),h=(e-s)/("columns"===this.Vm.dataOrder?this.Vm.step.y:this.Vm.step.x);o=Math.floor(Lr(o,0,this.Vm.primaryDimensionVectorsCount-1)),h=Math.floor(Lr(h,0,this.Vm.secondaryDimensionVectorsCount-1));var u=this.VD(o,h),a="columns"===this.Vm.dataOrder?{x:this.Vm.start.x+(o+.5)*this.Vm.step.x,y:this.Vm.start.y+(h+.5)*this.Vm.step.y}:{x:this.Vm.start.x+(h+.5)*this.Vm.step.x,y:this.Vm.start.y+(o+.5)*this.Vm.step.y},f="columns"===this.Vm.dataOrder?o:h,c="columns"===this.Vm.dataOrder?h:o;return{x:a.x,y:a.y,column:f,row:c,cellValue:u}},i.prototype.ZF=function(t){if(!(t.x<this.Nh.min.x||t.x>this.Nh.max.x||t.y<this.Nh.min.y||t.y>this.Nh.max.y)){var i=t,n="columns"===this.Vm.dataOrder?i.x:i.y,e="columns"===this.Vm.dataOrder?i.y:i.x,r="columns"===this.Vm.dataOrder?this.Vm.start.x:this.Vm.start.y,s="columns"===this.Vm.dataOrder?this.Vm.start.y:this.Vm.start.x,o="columns"===this.Vm.dataOrder?this.Vm.step.x:this.Vm.step.y,h="columns"===this.Vm.dataOrder?this.Vm.step.y:this.Vm.step.x,u=Lr((n-r)/o-.5,0,this.Vm.primaryDimensionVectorsCount-1),a=Lr((e-s)/h-.5,0,this.Vm.secondaryDimensionVectorsCount-1),f=Lr(Math.ceil(u)-1,0,this.Vm.primaryDimensionVectorsCount-1),c=Lr(Math.ceil(a)-1,0,this.Vm.secondaryDimensionVectorsCount-1),l={point:{x:f,y:c},value:this.VD(f,c)},d={point:{x:f,y:c+1},value:this.VD(f,c+1)},v={point:{x:f+1,y:c},value:this.VD(f+1,c)},y={point:{x:f+1,y:c+1},value:this.VD(f+1,c+1)},S=su({x:u,y:a},l,d,v,y);if(void 0!==S){var m=Lr(Math.floor(u+.5),0,this.Vm.primaryDimensionVectorsCount-1),b=Lr(Math.floor(a+.5),0,this.Vm.secondaryDimensionVectorsCount-1),g="columns"===this.Vm.dataOrder?m:b,w="columns"===this.Vm.dataOrder?b:m,p=t;return{x:p.x,y:p.y,column:g,row:w,cellValue:S}}}},i.prototype.VD=function(t,i){for(var n=0;n<this.OD.gridTiles.length;n+=1){var e=this.OD.gridTiles[n];if(t>=e.iFirstVector.primary&&t<=e.iFirstVector.primary+e.sizeHeatmapDataVectors.primary-1&&i>=e.iFirstVector.secondary&&i<=e.iFirstVector.secondary+e.sizeHeatmapDataVectors.secondary-1){var r=t-e.iFirstVector.primary,s=i-e.iFirstVector.secondary,o=r*e.sizeHeatmapDataVectors.secondary+s;return e.intensityData[o]}}return 0},i.prototype.Et=function(){return this.Nh.max.x},i.prototype.zt=function(){return this.Nh.min.x},i.prototype.Vt=function(){return this.Nh.max.y},i.prototype.Nt=function(){return this.Nh.min.y},i.prototype.cu=function(){return 0},i.prototype.lu=function(){return 0},i.prototype.lT=function(){var t=[];return this.OD.gridTiles.forEach((function(i){if(i.hasIntensityData){for(var n=new Array(i.sizeUniqueHeatmapDataVectors.primary).fill(0).map((function(t){return new Array(i.sizeUniqueHeatmapDataVectors.secondary).fill(0)})),e=0;e<i.sizeUniqueHeatmapDataVectors.primary;e+=1)for(var r=e*i.sizeHeatmapDataVectors.secondary,s=n[e],o=0;o<i.sizeUniqueHeatmapDataVectors.secondary;o+=1){var h=i.intensityData[r+o];s[o]=h}t.push({type:"intensity",startPrimary:i.iFirstUniqueVector.primary,startSecondary:i.iFirstUniqueVector.secondary,lengthPrimary:i.sizeUniqueHeatmapDataVectors.primary,lengthSecondary:i.sizeUniqueHeatmapDataVectors.secondary,values:n})}})),t},i}(function(t){function i(i,n,r,s,o,h){var u=t.call(this,i,n,r,s,o)||this;u.engine=i,u.PD=w("bilinear"),u.wa=Kz.lineStyle,u.Nh=b({x:Math.min(h.start.x,h.start.x+h.columns*h.step.x),y:Math.min(h.start.y,h.start.y+h.rows*h.step.y)},{x:Math.max(h.start.x,h.start.x+h.columns*h.step.x),y:Math.max(h.start.y,h.start.y+h.rows*h.step.y)});var a="columns"===h.dataOrder?h.columns:h.rows,f="columns"===h.dataOrder?h.rows:h.columns;return u.Vm=e(e({},h),{primaryDimensionVectorsCount:a,secondaryDimensionVectorsCount:f}),u}return n(i,t),i.prototype.Hm=function(t){return this.PD.l(t),this},i.prototype.jm=function(){return this.PD.S()},i.prototype.pa=function(t){return this.wa="function"==typeof t?t(this.wa):t,this},i.prototype.ka=function(){return this.wa},i}(gE)),lK=function(t){function i(i,n,e,r,s,o){var h=t.call(this,i,n,e,r,s,o)||this;h.gO=i,h.GD=0,h.ic=[],h.aD=new mZ(h.Rt,h),h.yB=i.kO(),h.Nh=h.Vm.initialBoundaries;return h.HD={dataPerSegment:2048},h}return n(i,t),i.prototype.Fe=function(){var t=this.aD.iD(this.ic,this.fa.S());if(t>0){for(var i=0;i<t;i+=1){this.ic[0].shape.dispose().ZB(),this.ic.shift()}"columns"===this.Vm.scrollDimension?this.Nh.min.x=this.ic.length>0?this.ic[0].boundaries.min.x:Is:this.Nh.min.y=this.ic.length>0?this.ic[0].boundaries.min.y:Is}return this.ic.forEach((function(t){return t.shape.Fe()})),this.fa.t=!1,this},i.prototype.vB=function(){return this.Fe(),this.ic.forEach((function(t){return t.shape.vB()})),this},i.prototype.Km=function(t){if(0===t.length)return this;var i=0,n=this.HD.dataPerSegment,r=t.length;do{var s=this.ic[this.ic.length-1],o=s?n-(s.existingDataPointsCount+(s.hasJoint?1:0)):0,h=!1;if(!s||0===o){var u={columns:"columns"===this.Vm.scrollDimension?n:this.Vm.resolution,rows:"rows"===this.Vm.scrollDimension?n:this.Vm.resolution,heatmapDataType:this.Vm.heatmapDataType,dataOrder:this.Vm.scrollDimension,step:this.Vm.step,start:"columns"===this.Vm.scrollDimension?{x:this.Vm.start.x+this.Vm.step.x*this.GD,y:this.Vm.start.y}:{x:this.Vm.start.x,y:this.Vm.start.y+this.Vm.step.y*this.GD}};this.ic.length>0&&(u.start="columns"===this.Vm.scrollDimension?{x:u.start.x-1*this.Vm.step.x,y:u.start.y}:{x:u.start.x,y:u.start.y-1*this.Vm.step.y},h=!0);var a=new cK(this.gO,this.Rt,Cr,Cr,[],u).Hm(this.PD.S()).$n(this.Ho).pa(this.wa);s={shape:a,existingDataPointsCount:0,existingCoordinatesCount:0,allocatedCoordinatesCount:n,dataStartIndex:this.GD,hasJoint:!1,boundaries:a.Nh},this.ic.push(s),o=n-(h?1:0)}var f=r-i,c=Math.min(o,f),l=t.slice(i,i+c),d={type:"intensity",values:l,startPrimary:s.existingDataPointsCount+(s.hasJoint?1:0),startSecondary:0,lengthPrimary:c,lengthSecondary:this.Vm.resolution};h&&(d.values.unshift(this.jD),d.lengthPrimary+=1,s.hasJoint=!0),s.shape.Wm(d),s.existingDataPointsCount+=c,s.existingCoordinatesCount+=c+(h?1:0),s.boundaries=s.shape.Nh,this.jD=l[l.length-1],this.GD+=c,i+=c}while(i<r);return this.Nh.max="columns"===this.Vm.scrollDimension?e(e({},this.Nh.max),{x:this.Vm.start.x+this.GD*this.Vm.step.x}):e(e({},this.Nh.max),{y:this.Vm.start.y+this.GD*this.Vm.step.y}),this},i.prototype.$h=function(){return this.ic.forEach((function(t){t.shape.dispose().ZB()})),this.ic.length=0,this.Nh=this.Vm.initialBoundaries,this.GD=0,this.jD=void 0,this},i.prototype.$n=function(i){var n=this;return t.prototype.$n.call(this,i),this.ic.forEach((function(t){return t.shape.$n(n.Ho)})),this},i.prototype.pa=function(i){var n=this;return t.prototype.pa.call(this,i),this.ic.forEach((function(t){return t.shape.pa(n.wa)})),this},i.prototype.Hm=function(i){return t.prototype.Hm.call(this,i),this.ic.forEach((function(t){return t.shape.Hm(i)})),this},i.prototype.dispose=function(){return t.prototype.dispose.call(this),this.ic.forEach((function(t){return t.shape.dispose()})),this},i.prototype.restore=function(){return t.prototype.restore.call(this),this.ic.forEach((function(t){return t.shape.restore()})),this},i.prototype.ZB=function(){return this.ic.forEach((function(t){return t.shape.ZB()})),this},i.prototype.HO=function(t,i){return this.ic.reduce((function(n,e){return n||e.shape.HO(t,i)}),!1)},i.prototype.Pw=function(t){var i=this,n=sr(t,this.Rt,this.engine.Rt),e=this.ic.reduce((function(e,r){var s=r.shape.Pw(t);if(s){var o=js(sr(s,i.Rt,i.engine.Rt),n);if(void 0===e||o<e.distance)return{result:s,distance:o,segment:r}}return e}),void 0);if(e&&e.result){var r="columns"===this.Vm.scrollDimension?e.result.column+e.segment.dataStartIndex:e.result.column,s="rows"===this.Vm.scrollDimension?e.result.row+e.segment.dataStartIndex:e.result.row;if("columns"===this.Vm.scrollDimension&&r>=this.GD||"rows"===this.Vm.scrollDimension&&s>=this.GD)return;return{x:e.result.x,y:e.result.y,column:r,row:s,cellValue:e.result.cellValue}}},i.prototype.ZF=function(t){var i=this,n=sr(t,this.Rt,this.engine.Rt),e=this.ic.reduce((function(e,r){var s=r.shape.ZF(t);if(s){var o=js(sr(s,i.Rt,i.engine.Rt),n);if(void 0===e||o<e.distance)return{result:s,distance:o,segment:r}}return e}),void 0);if(e&&e.result){var r="columns"===this.Vm.scrollDimension?e.result.column+e.segment.dataStartIndex:e.result.column,s="rows"===this.Vm.scrollDimension?e.result.row+e.segment.dataStartIndex:e.result.row;if("columns"===this.Vm.scrollDimension&&r>=this.GD||"rows"===this.Vm.scrollDimension&&s>=this.GD)return;return{x:e.result.x,y:e.result.y,column:r,row:s,cellValue:e.result.cellValue}}},i.prototype.Et=function(){return this.Nh.max.x},i.prototype.zt=function(){return this.Nh.min.x},i.prototype.Vt=function(){return this.Nh.max.y},i.prototype.Nt=function(){return this.Nh.min.y},i.prototype.cu=function(){return 0},i.prototype.lu=function(){return 0},i}(function(t){function i(i,n,r,s,o,h){var u=t.call(this,i,n,r,s,o)||this;u.engine=i,u.wa=Kz.lineStyle,u.fa=w(void 0),u.PD=w("bilinear");var a="columns"===h.scrollDimension?b({x:h.start.x,y:h.start.y},{x:h.start.x,y:h.start.y+h.resolution*h.step.y}):b({x:h.start.x,y:h.start.y},{x:h.start.x+h.resolution*h.step.x,y:h.start.y});return u.Vm=e(e({},h),{initialBoundaries:a}),u}return n(i,t),i.prototype.pa=function(t){return this.wa="function"==typeof t?t(this.wa):t,this},i.prototype.ka=function(){return this.wa},i.prototype.ca=function(t){return this.fa.l(t),this},i.prototype.la=function(){return this.fa.S()},i.prototype.Hm=function(t){return this.PD.l(t),this},i.prototype.jm=function(){return this.PD.S()},i}(gE)),dK={translation:function(t,i){return[1,0,0,0,1,0,t,i,1]},rotation:function(t){var i=Math.cos(t),n=Math.sin(t);return[i,-n,0,n,i,0,0,0,1]},scaling:function(t,i){return[t,0,0,0,i,0,0,0,1]},translate:function(t,i,n){return dK.multiply(t,dK.translation(i,n))},rotate:function(t,i){return dK.multiply(t,dK.rotation(i))},scale:function(t,i,n){return dK.multiply(t,dK.scaling(i,n))},multiply:function(t,i){var n=t[0],e=t[1],r=t[2],s=t[3],o=t[4],h=t[5],u=t[6],a=t[7],f=t[8],c=i[0],l=i[1],d=i[2],v=i[3],y=i[4],S=i[5],m=i[6],b=i[7],g=i[8];return[c*n+l*s+d*u,c*e+l*o+d*a,c*r+l*h+d*f,v*n+y*s+S*u,v*e+y*o+S*a,v*r+y*h+S*f,m*n+b*s+g*u,m*e+b*o+g*a,m*r+b*h+g*f]},projection:function(t,i,n){return[2/t,0,0,0,-2*n/i,0,-1,1*n,1]}},vK=function(t){function i(i,n,e,r,s){var o=t.call(this,i,n,e,r,s)||this;return o.gO=i,o.WD=[],o.cL=new BX,o.UD=[l(0,0),l(0,0),l(0,0),l(0,0)],o.YD=b(l(0,0),l(0,0)),o.XD=b(l(0,0),l(0,0)),o.ZD=l(0,0),o.KD=l(0,0),o.Qp=l(0,0),o.qD=l(0,0),o.JD=0,o.yB=i.kO(),o}return n(i,t),i.prototype.Fe=function(){var t,i=this.Yo(),n=this.Uo()||this.t();if(i){var e=this.yB,r=this.yB.uL();if(this.cL.$I(this.Rt),this.oh.t||this.co){this.QD&&this.QD.sL(this),this.font.l(dh(this.oh.S()));var s=this.font.S();this.QD=this.yB.te(s.properties.family),this.QD.rL(this)}var o=this.font.t||this.co||this.$o.t||this.co;if(o&&this.QD){s=this.font.S();t=h(this.QD.oL(this.$o.S(),s.properties),2),this.$D=t[0],this.XD=t[1],this.WD.forEach((function(t){t.texCoordBuff&&e.VI(t.texCoordBuff),t.vertexBuff&&e.VI(t.vertexBuff)})),this.WD=this.$D.map((function(t){return{texCoordBuff:e.qL(t.texCoords,!1),texture:t.texture,info:t}})),this.oh.t=!1,this.font.t=!1,this.$o.t=!1}var u=this.Rt.Qi()||n||this.co,a=this.th.t||this.eh.t||this.ih.t||this.rh.t||o||u||this.co,f=this.hh.S(),c=ao(l(this.eh.S()+1,this.ih.S()+1),.5);if(a&&this.$D&&(this.ZD=l(-(f.left*r+this.XD.max.x-this.XD.min.x+f.right*r)*c.x-this.XD.min.x+f.right*r,-(f.bottom*r+this.XD.max.y-this.XD.min.y+f.top*r)*c.y-this.XD.min.y+f.top*r)),(a||u||this.sh.t||this.jo())&&this.Ho!==Re){if(this.$D){var d=fo(this.th.S(),this.rh.S()),v=sr(d,this.Rt,this.oo.Rt),y=ao(v,r);this.qD=y;var S=go(this.sh.S());this.JD=S,o&&this.WD.forEach((function(t){var i=t.info;i&&(t.vertexBuffLen=i.vertices.length/2,t.vertexBuff?e.$L(t.vertexBuff,i.vertices,!0):t.vertexBuff=e.qL(i.vertices,!0))}));var m=this.Qt.S(),b=[fo(ro(l((this.XD.min.x+(-m.left-f.left)*r+this.ZD.x)/r,(this.XD.max.y+(m.top+f.top)*r+this.ZD.y)/r),this.st,S),v),fo(ro(l((this.XD.max.x+(m.right+f.right)*r+this.ZD.x)/r,(this.XD.max.y+(m.top+f.top)*r+this.ZD.y)/r),this.st,S),v),fo(ro(l((this.XD.max.x+(m.right+f.right)*r+this.ZD.x)/r,(this.XD.min.y+(-m.bottom-f.bottom)*r+this.ZD.y)/r),this.st,S),v),fo(ro(l((this.XD.min.x+(-m.left-f.left)*r+this.ZD.x)/r,(this.XD.min.y+(-m.bottom-f.bottom)*r+this.ZD.y)/r),this.st,S),v)];this.UD=[sr(b[0],this.oo.Rt,this.Rt),sr(b[1],this.oo.Rt,this.Rt),sr(b[2],this.oo.Rt,this.Rt),sr(b[3],this.oo.Rt,this.Rt)],this.YD=Ks(this.UD);var g=Ks(b);this.KD=l(-(g.max.x-g.min.x)*r*c.x-g.min.x*r+this.qD.x,-(g.max.y-g.min.y)*r*c.y-g.min.y*r+this.qD.y),this.t_=co(g.max,g.min)}this.Ho instanceof Je?this.BO=VX(this.YD,this.Rt,this.Ho.getPosition(),this.Ho.getExtent(),this.Ho.getShape(),this.yB.uL()):this.Ho instanceof Qe?this.LO=GX(this.YD,this.Rt,this.Ho.getAngle(!0),this.yB.uL()):(this.BO=void 0,this.LO=void 0)}this.jo()&&(this.fL=this.Ho===Re?void 0:this.yB.FI(EX["2D"],EX.VertexLocation({axisWorldTranslation:"matrix",normalSource:void 0}),EX.Color({dataType:this.Ho instanceof Je||this.Ho instanceof Qe?["gradient",this.Ho]:"uniform",maskTexture:!0}))),this.th.t=!1,this.eh.t=!1,this.ih.t=!1,this.rh.t=!1,this.sh.t=!1,this.Xo(this.Ho),this.Go()}return this.uh=i,this},i.prototype.vB=function(){var t=this;if(this.Yo()){this.Fe();var i=this.fL;if(!i)return this;var n=this.yB.DL,e=this.yB.gl.drawingBufferWidth,r=this.yB.gl.drawingBufferHeight,s=dK.projection(e,r,-1),o=dK.translation(this.ZD.x,this.ZD.y),h=dK.translation(this.KD.x,this.KD.y);s=dK.translate(s,this.qD.x,this.qD.y),s=dK.multiply(s,h),s=dK.rotate(s,this.JD),s=dK.multiply(s,o),this.yB.rL(i).NI(i,(function(i,e,r,o){if(t.yB.WL(i("uMatrix"),s),t.Ho instanceof Ee)t.yB.YL(i("uColor"),t.Ho.getColor());else if(t.Ho instanceof Je&&t.BO){t.yB.VL(i("uCenter"),t.BO.center).VL(i("uDistance"),t.BO.distance).HL(i("uBounds"),t.BO.bounds).XL(i("uAspect"),t.BO.aspectRatio);for(var h=t.Ho.getColorStops(),u=0;u<h.length;u+=1)t.yB.YL(i("color_"+u),h[u].color).XL(i("stop_"+u),h[u].offset)}else if(t.Ho instanceof Qe&&t.LO){t.yB.VL(i("uStartPoint"),t.LO.startPoint).VL(i("uEndPoint"),t.LO.endPoint).HL(i("uBounds"),t.LO.bounds);for(h=t.Ho.getColorStops(),u=0;u<h.length;u+=1)t.yB.YL(i("color_"+u),h[u].color).XL(i("stop_"+u),h[u].offset)}t.WD.forEach((function(r){t.yB.nI(n,r.vertexBuff),t.yB.nI(e("aMaskTextureCoord"),r.texCoordBuff).KL(i("uMaskTexture"),r.texture,0),t.yB.Ky(t.yB.gl.TRIANGLES,r.vertexBuffLen)}))}))}return this},i.prototype.HO=function(t,i){if(this.Yo()&&this.lo.S()&&this.UD){var n=sr({x:t,y:i},this.oo.Rt,this.Rt);if(this.Ho instanceof Ee)if(this.sh.S()%360==0){if(eo.Ut(n,this.YD.min,this.YD.max))return!0}else if(eo.Yt(n,this.UD[0],this.UD[1],this.UD[2],this.UD[3])&&($s(n,this.UD[0],this.UD[1],this.UD[2])||$s(n,this.UD[2],this.UD[3],this.UD[0])))return!0}return!1},i.prototype.fn=function(){return this.Yo()?this.UD:[]},i.prototype.Nc=function(){return this.Yo()&&this.t_?this.t_:l(0,0)},i.prototype.vi=function(){if(this.Yo()&&this.YD){var t=this.YD;return l(t.max.x-t.min.x,t.max.y-t.min.y)}return l(0,0)},i.prototype.ZB=function(){var t=this;return this.WD.forEach((function(i){i.texCoordBuff&&t.yB.VI(i.texCoordBuff),i.vertexBuff&&t.yB.VI(i.vertexBuff)})),this.WD=[],this.QD&&this.QD.sL(this),this},i}(kE),yK=function(t){function i(i,n){var e=t.call(this,i)||this;return e.oo=i,e.i_=n,e.n_=new Set,e.e_=w(void 0),e.gI=w(void 0),e.r_=function(t){return e.n_.add(t),t},e.s_=function(t){return e.n_.delete(t),t.ZB(),e},e.o_=function(t){return e.n_.add(t),t},e.ys=function(){return e.h_},e.cs=function(t,i,n,r,s){var h,u,a=e.e_.S(),f=!a||n>=a.x&&r>=a.y&&n<=a.x+a.width&&r<=a.y+a.height;if(void 0!==e.h_){if(void 0!==i&&void 0!==e.h_.Bo){var c=l(t.clientX-i.clientX,i.clientY-t.clientY);0===c.x&&0===c.y||e.h_.Bo(e.h_,t,e.u_,e.a_,c)}return!1}var d=f&&s?e.f_(e.n_,n,r):void 0;try{for(var v=o(e.n_),y=v.next();!y.done;y=v.next()){var S=y.value;S.getMouseInteractions()&&S.Ro(t,S===d,i)}}catch(t){h={error:t}}finally{try{y&&!y.done&&(u=v.return)&&u.call(v)}finally{if(h)throw h.error}}return!1!==s&&void 0===d},e.Ss=function(t){var i,n;try{for(var r=o(e.n_),s=r.next();!s.done;s=r.next()){var h=s.value;h.getMouseInteractions()&&h.zo(t)}}catch(t){i={error:t}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}void 0!==e.h_&&void 0!==e.u_&&void 0!==e.a_&&(void 0!==e.h_.Lo&&e.h_.Lo(e.h_,t,e.u_,e.a_),e.h_=void 0)},e}return n(i,t),i.prototype.ro=function(){var t,i;try{for(var n=o(this.n_),e=n.next();!e.done;e=n.next()){e.value.ZB().dispose()}}catch(i){t={error:i}}finally{try{e&&!e.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}this.c_=void 0,this.h_=void 0,this.oo.fs(this.i_)},i.prototype.xn=function(){return this.oo.xn(),this},i.prototype.rb=function(t){return this.e_.l(t),this},i.prototype.my=function(){return this.e_.S()},i.prototype.sb=function(t){return this.gI.l(t),this},i.prototype.l_=function(){return this.gI.S()},i.prototype.us=function(){return this.i_},i.prototype.Qs=function(t,i,n){n===zz.mouseUp&&void 0!==this.h_&&void 0!==this.u_&&void 0!==this.a_&&t.button===this.u_&&(void 0!==(r=SK(this.h_)).dragStop&&r.dragStop(this.h_,t,this.u_,this.a_),this.h_=void 0,this.u_=void 0);if(n===zz.contextmenu&&ss(t),i){var e=Array.from(this.n_).filter((function(t){return t.getIsUnderMouse()}));if(e&&e.length>0){var r,s=e[0];if(void 0===this.h_&&n===zz.mouseDown)this.h_=s,this.u_=t.button,this.a_=l(t.clientX,t.clientY),void 0!==(r=SK(this.h_)).dragStart&&r.dragStart(this.h_,t,this.u_);var o=l(t.clientX,t.clientY),h=SK(s)[zz[n]];return h&&h(s,t,t.button,o,o),!1}return!0}return!1},i.prototype.Ns=function(t,i,n,e,r){if(void 0!==this.c_){var s=mK(this.c_)[Ez[n]];this.c_&&s&&s(this.c_,i),n===Ez.touchEnd&&0===t.length&&(this.c_=void 0)}else if(n===Ez.touchStart){var o=this.e_.S(),h=!o||e>=o.x&&r>=o.y&&e<=o.x+o.width&&r<=o.y+o.height,u=t.length;if(this.c_=void 0,h)for(var a=0;a<u&&(this.c_=this.f_(this.n_,t[a].x,t[a].y),!this.c_);a+=1);if(this.c_)(s=mK(this.c_)[Ez[n]])&&s(this.c_,i)}return void 0===this.c_},i}(aE),SK=function(t){var i;return(i={})[zz[zz.click]]=t.ko,i[zz[zz.dbclick]]=t.Ao,i[zz[zz.mouseDown]]=t.Fo,i[zz[zz.mouseUp]]=t.To,i[zz[zz.contextmenu]]=t.Mo,i[zz[zz.wheel]]=t.xo,i.dragStop=t.Lo,i.dragStart=t.Co,i},mK=function(t){var i;return(i={})[Ez[Ez.touchStart]]=t.Io,i[Ez[Ez.touchMove]]=t.Oo,i[Ez[Ez.touchEnd]]=t.Po,i},bK=function(t){function i(i,n){var e=t.call(this,i,n)||this;return e.gO=i,e.gl=i.kO(),e}return n(i,t),Object.defineProperty(i.prototype,"d_",{get:function(){return this.n_},enumerable:!1,configurable:!0}),i.prototype.f_=function(t,i,n){return Array.from(t).reverse().reduce((function(t,e){return t||(e.getMouseInteractions()&&e.HO(i,n)?e:void 0)}),void 0)},i.prototype.Gf=function(t){return this.r_(new uZ(this.gO,t,this.s_,this.o_,[]))},i.prototype.Dv=function(t){return this.r_(new aZ(this.gO,t,this.s_,this.o_,[]))},i.prototype.iS=function(t,i,n){return this.r_(new bZ(this.gO,t,this.s_,this.o_,n,i))},i.prototype.$e=function(t){return this.r_(new vK(this.gO,t,this.s_,this.o_,[]))},i.prototype.US=function(t){return this.r_(new FZ(this.gO,t,this.s_,this.o_,[]))},i.prototype.Rc=function(t,i){switch(void 0===i&&(i=CE.Convex),i){case CE.Convex:return this.r_(new UX(this.gO,t,this.s_,this.o_,[]));case CE.Simple:return this.r_(new rK(this.gO,t,this.s_,this.o_,[]));default:throw new Error("GlEngine.addPolygon | No such polygon type!")}},i.prototype.Pc=function(t){return this.r_(new CZ(this.gO,t,this.s_,this.o_,[]))},i.prototype.lF=function(t){return this.r_(new hZ(this.gO,t,this.s_,this.o_,[]))},i.prototype.Gc=function(t){return this.r_(new WX(this.gO,t,this.s_,this.o_,[]))},i.prototype.KF=function(t){return this.r_(new $X(this.gO,t,this.s_,this.o_,[]))},i.prototype.mT=function(t,i,n){if("intensity"===n.heatmapDataType)return this.r_(new lK(this.gO,t,this.s_,this.o_,i,n));throw new yr("Unimplemented Heatmap Grid Static type")},i.prototype.cT=function(t,i,n){return this.r_(new cK(this.gO,t,this.s_,this.o_,i,n))},i.prototype.vB=function(){var t,i,n=this.e_.S();n&&this.gl.EI(n.x*this.gl.uL(),n.y*this.gl.uL(),n.width*this.gl.uL(),n.height*this.gl.uL());var e=this.gO.vi();this.gl.gl.resize&&this.gl.gl.resize(e.x*this.gl.uL(),e.y*this.gl.uL()),this.gl.gl.viewport(0,0,e.x*this.gl.uL(),e.y*this.gl.uL());try{for(var r=o(this.n_),s=r.next();!s.done;s=r.next()){s.value.vB()}}catch(i){t={error:i}}finally{try{s&&!s.done&&(i=r.return)&&i.call(r)}finally{if(t)throw t.error}}return this.gl.SI(!1),this},i}(function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return n(i,t),i.prototype.Fe=function(){var t,i;try{for(var n=o(this.n_),e=n.next();!e.done;e=n.next()){e.value.Fe()}}catch(i){t={error:i}}finally{try{e&&!e.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}return this},i}(yK)),gK=function(t){function i(i){return t.call(this,i)||this}return n(i,t),i}(fY),wK=function(t){function i(i){var n=t.call(this,i)||this;n.v_="attribute";var e=pK(i.gl),r=e.vertices,s=e.drawSize,o=e.drawMode;return n.RB=i.qL(r),n.CP=s,n.pP=o,n}return n(i,t),i.prototype.Ky=function(t,i){return this.yB.rI(this.RB,0,{location:t.attribute("aInstanceGeo"),size:3},{location:t.attribute("aNormal"),size:3},{location:t.attribute("aTriangleBary"),size:3}).cI(this.pP,0,this.CP,i),this},i.prototype.xB=function(){this.yB.VI(this.RB)},i}(gK),pK=function(t){var i=new Float32Array(324),n=0;return i[n+0]=-1,i[n+1]=1,i[n+2]=1,i[n+3]=0,i[n+4]=1,i[n+5]=0,i[n+6]=1,i[n+7]=0,i[n+8]=0,i[(n+=9)+0]=1,i[n+1]=1,i[n+2]=1,i[n+3]=0,i[n+4]=1,i[n+5]=0,i[n+6]=1,i[n+7]=1,i[n+8]=0,i[(n+=9)+0]=-1,i[n+1]=1,i[n+2]=-1,i[n+3]=0,i[n+4]=1,i[n+5]=0,i[n+6]=0,i[n+7]=0,i[n+8]=1,i[(n+=9)+0]=-1,i[n+1]=1,i[n+2]=-1,i[n+3]=0,i[n+4]=1,i[n+5]=0,i[n+6]=0,i[n+7]=1,i[n+8]=0,i[(n+=9)+0]=1,i[n+1]=1,i[n+2]=1,i[n+3]=0,i[n+4]=1,i[n+5]=0,i[n+6]=1,i[n+7]=0,i[n+8]=1,i[(n+=9)+0]=1,i[n+1]=1,i[n+2]=-1,i[n+3]=0,i[n+4]=1,i[n+5]=0,i[n+6]=1,i[n+7]=0,i[n+8]=0,i[(n+=9)+0]=-1,i[n+1]=-1,i[n+2]=-1,i[n+3]=-1,i[n+4]=0,i[n+5]=0,i[n+6]=1,i[n+7]=0,i[n+8]=0,i[(n+=9)+0]=-1,i[n+1]=-1,i[n+2]=1,i[n+3]=-1,i[n+4]=0,i[n+5]=0,i[n+6]=1,i[n+7]=1,i[n+8]=0,i[(n+=9)+0]=-1,i[n+1]=1,i[n+2]=-1,i[n+3]=-1,i[n+4]=0,i[n+5]=0,i[n+6]=0,i[n+7]=0,i[n+8]=1,i[(n+=9)+0]=-1,i[n+1]=1,i[n+2]=-1,i[n+3]=-1,i[n+4]=0,i[n+5]=0,i[n+6]=0,i[n+7]=1,i[n+8]=0,i[(n+=9)+0]=-1,i[n+1]=-1,i[n+2]=1,i[n+3]=-1,i[n+4]=0,i[n+5]=0,i[n+6]=1,i[n+7]=0,i[n+8]=1,i[(n+=9)+0]=-1,i[n+1]=1,i[n+2]=1,i[n+3]=-1,i[n+4]=0,i[n+5]=0,i[n+6]=1,i[n+7]=0,i[n+8]=0,i[(n+=9)+0]=1,i[n+1]=-1,i[n+2]=1,i[n+3]=1,i[n+4]=0,i[n+5]=0,i[n+6]=1,i[n+7]=0,i[n+8]=0,i[(n+=9)+0]=1,i[n+1]=-1,i[n+2]=-1,i[n+3]=1,i[n+4]=0,i[n+5]=0,i[n+6]=1,i[n+7]=1,i[n+8]=0,i[(n+=9)+0]=1,i[n+1]=1,i[n+2]=1,i[n+3]=1,i[n+4]=0,i[n+5]=0,i[n+6]=0,i[n+7]=0,i[n+8]=1,i[(n+=9)+0]=1,i[n+1]=1,i[n+2]=1,i[n+3]=1,i[n+4]=0,i[n+5]=0,i[n+6]=0,i[n+7]=1,i[n+8]=0,i[(n+=9)+0]=1,i[n+1]=-1,i[n+2]=-1,i[n+3]=1,i[n+4]=0,i[n+5]=0,i[n+6]=1,i[n+7]=0,i[n+8]=1,i[(n+=9)+0]=1,i[n+1]=1,i[n+2]=-1,i[n+3]=1,i[n+4]=0,i[n+5]=0,i[n+6]=1,i[n+7]=0,i[n+8]=0,i[(n+=9)+0]=-1,i[n+1]=-1,i[n+2]=1,i[n+3]=0,i[n+4]=0,i[n+5]=1,i[n+6]=1,i[n+7]=0,i[n+8]=0,i[(n+=9)+0]=1,i[n+1]=-1,i[n+2]=1,i[n+3]=0,i[n+4]=0,i[n+5]=1,i[n+6]=1,i[n+7]=1,i[n+8]=0,i[(n+=9)+0]=-1,i[n+1]=1,i[n+2]=1,i[n+3]=0,i[n+4]=0,i[n+5]=1,i[n+6]=0,i[n+7]=0,i[n+8]=1,i[(n+=9)+0]=-1,i[n+1]=1,i[n+2]=1,i[n+3]=0,i[n+4]=0,i[n+5]=1,i[n+6]=0,i[n+7]=1,i[n+8]=0,i[(n+=9)+0]=1,i[n+1]=-1,i[n+2]=1,i[n+3]=0,i[n+4]=0,i[n+5]=1,i[n+6]=1,i[n+7]=0,i[n+8]=1,i[(n+=9)+0]=1,i[n+1]=1,i[n+2]=1,i[n+3]=0,i[n+4]=0,i[n+5]=1,i[n+6]=1,i[n+7]=0,i[n+8]=0,i[(n+=9)+0]=1,i[n+1]=-1,i[n+2]=-1,i[n+3]=0,i[n+4]=0,i[n+5]=-1,i[n+6]=1,i[n+7]=0,i[n+8]=0,i[(n+=9)+0]=-1,i[n+1]=-1,i[n+2]=-1,i[n+3]=0,i[n+4]=0,i[n+5]=-1,i[n+6]=1,i[n+7]=1,i[n+8]=0,i[(n+=9)+0]=1,i[n+1]=1,i[n+2]=-1,i[n+3]=0,i[n+4]=0,i[n+5]=-1,i[n+6]=0,i[n+7]=0,i[n+8]=1,i[(n+=9)+0]=1,i[n+1]=1,i[n+2]=-1,i[n+3]=0,i[n+4]=0,i[n+5]=-1,i[n+6]=0,i[n+7]=1,i[n+8]=0,i[(n+=9)+0]=-1,i[n+1]=-1,i[n+2]=-1,i[n+3]=0,i[n+4]=0,i[n+5]=-1,i[n+6]=1,i[n+7]=0,i[n+8]=1,i[(n+=9)+0]=-1,i[n+1]=1,i[n+2]=-1,i[n+3]=0,i[n+4]=0,i[n+5]=-1,i[n+6]=1,i[n+7]=0,i[n+8]=0,i[(n+=9)+0]=-1,i[n+1]=-1,i[n+2]=-1,i[n+3]=0,i[n+4]=-1,i[n+5]=0,i[n+6]=1,i[n+7]=0,i[n+8]=0,i[(n+=9)+0]=1,i[n+1]=-1,i[n+2]=-1,i[n+3]=0,i[n+4]=-1,i[n+5]=0,i[n+6]=1,i[n+7]=1,i[n+8]=0,i[(n+=9)+0]=-1,i[n+1]=-1,i[n+2]=1,i[n+3]=0,i[n+4]=-1,i[n+5]=0,i[n+6]=0,i[n+7]=0,i[n+8]=1,i[(n+=9)+0]=-1,i[n+1]=-1,i[n+2]=1,i[n+3]=0,i[n+4]=-1,i[n+5]=0,i[n+6]=0,i[n+7]=1,i[n+8]=0,i[(n+=9)+0]=1,i[n+1]=-1,i[n+2]=-1,i[n+3]=0,i[n+4]=-1,i[n+5]=0,i[n+6]=1,i[n+7]=0,i[n+8]=1,i[(n+=9)+0]=1,i[n+1]=-1,i[n+2]=1,i[n+3]=0,i[n+4]=-1,i[n+5]=0,i[n+6]=1,i[n+7]=0,i[n+8]=0,{vertices:i,drawSize:(n+=9)/9,drawMode:t.TRIANGLES}},kK=function(t){function i(i,n){var e=t.call(this,i)||this;e.v_="attribute",e.y_=n;var r=xK(),s=r.vertices,o=r.indices;return e.RB=i.qL(s),e.TP=i.tI(o),e.CP=o.length,e.pP=i.gl.TRIANGLES,e}return n(i,t),i.prototype.Ky=function(t,i){return this.yB.rI(this.RB,0,{location:t.attribute("aEdge"),size:3},{location:t.attribute("aNormal"),size:3},{location:t.attribute("aInstanceGeo"),size:3}).aI(this.TP).XL(t.uniform("uEdgeRoundness"),this.y_/2).dI(this.pP,this.CP,0,i),this},i.prototype.xB=function(){this.yB.VI(this.RB),this.yB.VI(this.TP)},i.prototype.S_=function(t){return this.y_=t,this},i.prototype.m_=function(){return this.y_},i}(gK),xK=function(){var t,i,n,e,r,s,h,u,a,f,c=[],l=0,d=[],v=0;try{for(var y=o([{normal:{x:0,y:1,z:0},perpendA:{x:0,y:0,z:1},perpendB:{x:-1,y:0,z:0}},{normal:{x:0,y:0,z:-1},perpendA:{x:0,y:1,z:0},perpendB:{x:-1,y:0,z:0}},{normal:{x:-1,y:0,z:0},perpendA:{x:0,y:1,z:0},perpendB:{x:0,y:0,z:1}},{normal:{x:1,y:0,z:0},perpendA:{x:0,y:1,z:0},perpendB:{x:0,y:0,z:-1}},{normal:{x:0,y:0,z:1},perpendA:{x:0,y:1,z:0},perpendB:{x:1,y:0,z:0}},{normal:{x:0,y:-1,z:0},perpendA:{x:0,y:0,z:-1},perpendB:{x:-1,y:0,z:0}}]),S=y.next();!S.done;S=y.next()){var m=S.value,b=m.normal,g=m.perpendA,w=m.perpendB,p=Ls.multiply(g,-1),k=Ls.multiply(w,-1),x=l;c[l]={thicknessDirection:Ls.addVec(b,g,w),edge:Ls.addVec(p,k),normal:b};var M=l+=1;c[l]={thicknessDirection:Ls.addVec(b,p,w),edge:Ls.addVec(g,k),normal:b};var A=l+=1;c[l]={thicknessDirection:Ls.addVec(b,p,k),edge:Ls.addVec(g,w),normal:b};var F=l+=1;c[l]={thicknessDirection:Ls.addVec(b,g,k),edge:Ls.addVec(p,w),normal:b},l+=1,d[v+0]=A,d[v+1]=x,d[v+2]=F,d[v+3]=A,d[v+4]=M,d[v+5]=x,v+=6;var T=[{A:g,B:w},{A:p,B:w},{A:p,B:k},{A:g,B:k}];try{for(var C=(n=void 0,o(T)),B=C.next();!B.done;B=C.next()){var L=B.value;L.thicknessDirection=Ls.addVec(b,L.A,L.B),L.stripVerticesA=[],L.stripVerticesB=[];var I=[{direction:L.A,other:L.B,vertices:L.stripVerticesA},{direction:L.B,other:L.A,vertices:L.stripVerticesB}];try{for(var O=(r=void 0,o(I)),P=O.next();!P.done;P=O.next())for(var D=P.value,_=0;_<8;_+=1){var R=.5*_/7,z=Ls.normalize(Ls.lerp(b,D.direction,R)),E=Math.PI/2-Ls.angle(z,b),N=Ls.addVec(Ls.multiply(Ls.multiply(D.direction,-1),1-Math.cos(E)),Ls.multiply(Ls.multiply(b,-1),1-Math.sin(E)),Ls.multiply(D.other,-1)),V=l;c[l]={thicknessDirection:L.thicknessDirection,normal:z,edge:N};var G=c[l];l+=1,D.vertices.push({index:V,vertex:G})}}catch(t){r={error:t}}finally{try{P&&!P.done&&(s=O.return)&&s.call(O)}finally{if(r)throw r.error}}}}catch(t){n={error:t}}finally{try{B&&!B.done&&(e=C.return)&&e.call(C)}finally{if(n)throw n.error}}for(var H=0;H<T.length;H+=1)for(var j=T[H],W=T[H<T.length-1?H+1:0],U=H%2==0?j.stripVerticesB:j.stripVerticesA,Y=H%2==0?W.stripVerticesB:W.stripVerticesA,X=1;X<U.length;X+=1){var Z=U[X-1],K=Y[X-1],q=U[X],J=Y[X];d[v+0]=Z.index,d[v+1]=K.index,d[v+2]=J.index,d[v+3]=q.index,d[v+4]=Z.index,d[v+5]=J.index,v+=6}}}catch(i){t={error:i}}finally{try{S&&!S.done&&(i=y.return)&&i.call(y)}finally{if(t)throw t.error}}var Q=15,$=Math.PI/15,tt=2*Math.PI/Q,it=1,nt=1,et=1,rt=l;try{for(var st=o([{x:-1,y:1,z:-1,flipVertexOrder:!1},{x:-1,y:1,z:1,flipVertexOrder:!0},{x:1,y:1,z:1,flipVertexOrder:!1},{x:1,y:1,z:-1,flipVertexOrder:!0},{x:-1,y:-1,z:-1,flipVertexOrder:!0},{x:-1,y:-1,z:1,flipVertexOrder:!1},{x:1,y:-1,z:1,flipVertexOrder:!0},{x:1,y:-1,z:-1,flipVertexOrder:!1}]),ot=st.next();!ot.done;ot=st.next()){var ht=ot.value,ut=0;c[l]={thicknessDirection:ht,normal:{x:0,y:ht.y,z:0},edge:{x:-ht.x,y:0,z:-ht.z}},l+=1,ut+=1;for(var at=1;at<8.5;at+=1)for(var ft=15===at?Math.PI:at*$,ct=nt*Math.cos(ft)*ht.y,lt=Math.sin(ft),dt=0;dt<Math.ceil(3.75)+1;dt+=1){var vt=dt===Q?0:dt*tt,yt=lt*Math.cos(vt)*it*ht.x,St=lt*Math.sin(vt)*et*ht.z,mt={x:yt,y:ct,z:St},bt=Ls.normalize({x:yt,y:ct,z:St});c[l]={thicknessDirection:ht,normal:bt,edge:{x:mt.x-ht.x,y:mt.y-ht.y,z:mt.z-ht.z}},l+=1,ut+=1}for(var gt=[],wt=1;wt<=Math.ceil(3.75);wt+=1)gt.push(rt),wt===Q?gt.push(rt+1):gt.push(rt+wt+1),gt.push(rt+wt);var pt=rt+1,kt=Math.ceil(3.75)+1;for(wt=0;wt<6.5;wt+=1)for(var xt=0;xt<Math.ceil(3.75);xt+=1){var Mt=0,At=pt+(wt+1)*kt+xt,Ft=0;14===xt?(Mt=pt+wt*kt,Ft=pt+(wt+1)*kt):(Mt=pt+wt*kt+xt+1,Ft=pt+(wt+1)*kt+xt+1),gt.push(pt+wt*kt+xt),gt.push(Mt),gt.push(At),gt.push(At),gt.push(Mt),gt.push(Ft)}d.push.apply(d,ht.flipVertexOrder?gt.reverse():gt),rt+=ut}}catch(t){h={error:t}}finally{try{ot&&!ot.done&&(u=st.return)&&u.call(st)}finally{if(h)throw h.error}}var Tt=new Float32Array(9*c.length),Ct=0;try{for(var Bt=o(c),Lt=Bt.next();!Lt.done;Lt=Bt.next()){G=Lt.value;Tt[Ct+0]=G.edge.x,Tt[Ct+1]=G.edge.y,Tt[Ct+2]=G.edge.z,Tt[Ct+3]=G.normal.x,Tt[Ct+4]=G.normal.y,Tt[Ct+5]=G.normal.z,Tt[Ct+6]=G.thicknessDirection.x,Tt[Ct+7]=G.thicknessDirection.y,Tt[Ct+8]=G.thicknessDirection.z,Ct+=9}}catch(t){a={error:t}}finally{try{Lt&&!Lt.done&&(f=Bt.return)&&f.call(Bt)}finally{if(a)throw a.error}}return{vertices:Tt,indices:new Uint16Array(d)}},MK=function(t,i){var n=t._L.kB.get(i);return n||(n=void 0!==i&&i>0?new kK(t,Lr(i,0,1)):new wK(t),t._L.kB.set(i,n),n)},AK=function(t){function i(i,n,e,r){var s=t.call(this,i,n,e,r)||this;return s.b_=i,s.gO=i.gO,s.yB=s.gO.kO(),s}return n(i,t),i}(function(t){function i(i,n,e,r){var s=t.call(this,i,n,e,r)||this;return s.Vo=!0,s}return n(i,t),i.prototype.FS=function(t){return this.g_=this.xS.S(),this.xS.l(t),this},i.prototype.Ym=function(t){return this.w_=t,this},i.prototype.Xm=function(){return this.w_},i.prototype.t=function(){return this.Vo||this.co},i.prototype.Go=function(){this.Vo=!1,this.co=!1},i}(function(t){function i(i,n,e,r){var s=t.call(this,i.oo,n,e,r)||this;return s.wf=i,s.Rt=s.wf.Rt,s.AS=!0,s.kS={},s.xS=w(QV),s}return n(i,t),i.prototype.p_=function(){var t;return this.xS.t&&this.xS.S().type!==(null===(t=this.g_)||void 0===t?void 0:t.type)},i.prototype.TS=function(t){return this.AS=t,this},i.prototype.k_=function(t){return this.kS=t,this},i}(fE))),FK=function(t){function i(i,n,e,r){var s=t.call(this,i,n,e,r)||this;return s.w_="cull-back",s.Nh=Ds,s.x_={},s.M_=[],s.Ho=Kz.fillStyle,s.xS.l(tG),s}return n(i,t),i.prototype.Fe=function(t){var i,n,e,r,s,h,u,a,f=this.M_,c=this.Ho,l=c!==Re,d=this.A_,v=this.t()||this.jo()||this.F_!==d,y=this.p_();if(l){try{for(var S=o(f),m=S.next();!m.done;m=S.next()){(N=m.value).id=void 0!==N.id?String(N.id):void 0,N.xSize=void 0!==N.xSize&&N.xSize<0?-N.xSize:N.xSize,N.ySize=void 0!==N.ySize&&N.ySize<0?-N.ySize:N.ySize,N.zSize=void 0!==N.zSize&&N.zSize<0?-N.zSize:N.zSize}}catch(t){i={error:t}}finally{try{m&&!m.done&&(n=S.return)&&n.call(S)}finally{if(i)throw i.error}}var g=11,w=this.T_||0,p=w;try{for(var k=o(f),x=k.next();!x.done;x=k.next()){void 0!==(V=(N=x.value).id)&&void 0!==this.x_[V]||(p+=1)}}catch(t){e={error:t}}finally{try{x&&!x.done&&(r=k.return)&&r.call(k)}finally{if(e)throw e.error}}var M,A,F;if(F=!(A=M=p!==w)&&(f.length<100?"chunks":"all"),M){var T=p*g,C=new Float32Array(T);this.lD&&C.set(this.lD),this.lD=C,this.C_=T,this.B_=w*g}var B=c instanceof Ne?c.getFallbackColor():void 0;try{for(var L=o(f),I=L.next();!I.done;I=L.next()){var O=void 0!==(V=(N=I.value).id)&&this.x_[V],P=[N.xCenter,N.yCenter,N.zCenter,N.xSize,N.ySize,N.zSize,N.color?N.color.r:B?B.r:void 0,N.color?N.color.g:B?B.g:void 0,N.color?N.color.b:B?B.b:void 0,N.color?N.color.a:B?B.a:void 0,N.value];if(O){for(var D=0;D<g;D+=1)P[D]=void 0!==P[D]?P[D]:O.buffer[D];O.buffer.set(P)}else{var _=this.B_,R=new Float32Array(this.lD.buffer,_*Float32Array.BYTES_PER_ELEMENT,g);R.set(P),void 0!==V&&(this.x_[V]={location:_,buffer:R}),this.B_+=g}}}catch(t){s={error:t}}finally{try{I&&!I.done&&(h=L.return)&&h.call(L)}finally{if(s)throw s.error}}if((A||this.t())&&(this.FP=this.yB.qL(this.lD,!0)),"all"===F||this.t())this.yB.QL(this.FP,0,this.lD);else if("chunks"===F)try{for(var z=o(f),E=z.next();!E.done;E=z.next()){var N,V;if(void 0!==(V=(N=E.value).id)){O=this.x_[V];this.yB.QL(this.FP,O.location,O.buffer)}}}catch(t){u={error:t}}finally{try{E&&!E.done&&(a=z.return)&&a.call(z)}finally{if(u)throw u.error}}if(v||y){var G=c instanceof Ne&&c,H=c instanceof Ve&&c;if(c instanceof Ee&&c||G||H?(this.L_=MK(this.yB,this.I_()),this.fL=this.yB.FI(EX["3D"],EX.ColorShaded3D({dataType:G?"attribute":H?["lookup",H.getLookUpProperty()]:"uniform",shadingStyle:this.xS.S().type}),EX.VertexLocation({offset:{sizeUnit:"axis",dataType:"attribute",halved:!0},axisWorldTranslation:NX(this.Rt),normalSource:this.L_.v_}),void 0!==this.A_&&EX.RoundedEdges3D)):(this.L_=void 0,this.fL=void 0),H&&H.lut.isValid){var j=H.getPalette();this.QO=this.gO.$O(j,this.qO,this.QO),this.qO=j}else this.QO=void 0,this.gO.BI.uo(this.qO),this.qO=void 0}if(f.length>0){var W=b({x:Is,y:Is,z:Is},{x:Os,y:Os,z:Os});for(D=0;D<this.B_;D+=g){var U=this.lD[D+0],Y=this.lD[D+3]/2,X=U-Y,Z=U+Y,K=this.lD[D+1],q=this.lD[D+4]/2,J=K-q,Q=K+q,$=this.lD[D+2],tt=this.lD[D+5]/2,it=$-tt,nt=$+tt;W.min.x=W.min.x<X?W.min.x:X,W.min.y=W.min.y<J?W.min.y:J,W.min.z=W.min.z<it?W.min.z:it,W.max.x=W.max.x>Z?W.max.x:Z,W.max.y=W.max.y>Q?W.max.y:Q,W.max.z=W.max.z>nt?W.max.z:nt}this.Nh=W}this.T_=p,this.M_.length=0}return this.Xo(c),this.Go(),this.F_=d,this.xS.t=!1,this},i.prototype.vB=function(){var t=this,i=this.fL,n=this.L_,e=this.FP,r=this.Ho,s=this.T_,o=this.xS.S();return i&&e&&void 0!==s&&this.yB.NI(i,(function(h,u,a){var f=u("aPos"),c=u("aOffsetAxis");t.yB.rL(i).jL(h("uScale"),t.b_.cL.aO()).jL(h("uDisp"),t.b_.cL.uO()).UL(h("uViewProjectionMatrix"),t.O_),"phong"===o.type&&t.yB.jL(h("uCameraLoc"),t.P_).jL(h("uLightLoc"),t.D_).XL(h("uAmbientReflection"),o.ambientReflection).XL(h("uSpecularReflection"),o.specularReflection).XL(h("uDiffuseReflection"),o.diffuseReflection).XL(h("uShininess"),o.shininess).YL(h("uLightColor"),o.specularColor).YL(h("uAmbientColor"),o.ambientColor);var l={location:f,size:3},d={location:c,size:3},v={location:void 0,size:4},y={location:void 0,size:1};if(r instanceof Ee)t.yB.YL(h("uColorDiffuse"),r.getColor());else if(r instanceof Ne){var S=u("aColor");v.location=S}else if(r instanceof Ve){var m=r.getLookUpProperty(),b=r.getPalette();"value"===m&&(y.location=u("aLookupValue")),t.yB.KL(h("uLookupTexture"),t.QO.texture,0).XL(h("uLookupMin"),b.min).XL(h("uLookupMax"),b.max).XL(h("uLookupTextureHeightPx"),t.QO.textureHeight)}e&&(t.yB.rI(e,1,l,d,v,y),n.Ky(a,s))})),this},i.prototype.HO=function(t,i){},i.prototype.ZB=function(){return this.FP&&(this.yB.VI(this.FP),this.FP=void 0),this.gO.BI.uo(this.qO),this.QO=void 0,this.qO=void 0,this.fL=void 0,this},i.prototype.NS=function(t){this.M_=ps(this.M_,t,{canReturnB:!0})},i.prototype.$n=function(t){return this.Ho=yE(this.Ho,t),this},i.prototype.Qn=function(){return this.Ho},i.prototype.zS=function(t){return this.A_=void 0!==t&&t>0?Lr(t,0,1):void 0,this},i.prototype.I_=function(){return this.A_},i.prototype.Et=function(){return this.Nh.max.x},i.prototype.zt=function(){return this.Nh.min.x},i.prototype.Vt=function(){return this.Nh.max.y},i.prototype.Nt=function(){return this.Nh.min.y},i.prototype.Ht=function(){return this.Nh.max.z},i.prototype.Gt=function(){return this.Nh.min.z},i.prototype.cu=function(){return 0},i.prototype.lu=function(){return 0},i.prototype.LS=function(){return 0},i.prototype.jo=function(){return SE(this.Wo,this.Ho)},i.prototype.Xo=function(t){this.Wo=t},i}(AK),TK=function(t){function i(i,n){var e=t.call(this,i)||this;e.MP=n,e.v_="custom";var r=e.AP(),s=r.vertices,o=r.drawSize;return e.FP=i.qL(s),e.CP=o,e}return n(i,t),i.prototype.rL=function(t){return this.yB.rI(this.FP,0,{location:t.attribute("aSegmentPosition"),size:1},{location:t.attribute("aPerpendHorizontal"),size:1},{location:t.attribute("aPerpendVertical"),size:1}),this},i.prototype.Ky=function(t){return this.yB.cI(this.yB.gl.TRIANGLE_STRIP,0,this.CP,t),this},i.prototype.AP=function(){for(var t,i,n=this.MP,e=new Float32Array(3*(2*(n+1))),r=0,s=0;s<=n;s+=1){var h=2*Math.PI*s/n,u=Math.cos(h),a=Math.sin(h);try{for(var f=(t=void 0,o([0,1])),c=f.next();!c.done;c=f.next()){var l=c.value;e[r+0]=l,e[r+1]=u,e[r+2]=a,r+=3}}catch(i){t={error:i}}finally{try{c&&!c.done&&(i=f.return)&&i.call(f)}finally{if(t)throw t.error}}}return{vertices:e,drawSize:r/3}},i.prototype.xB=function(){this.yB.VI(this.FP)},i}(fY),CK=function(t,i){void 0===i&&(i=16);var n=t._L.wB.get(i);return n||(n=new TK(t,i),t._L.wB.set(i,n),n)},BK=function(t){function i(i,n,e,r){var s=t.call(this,i,n,e,r)||this;return s.w_="cull-back",s.ua=[],s.ia=Kz.lineStyle,s.xS.l(QV),s}return n(i,t),i.prototype.Fe=function(t){var i=this.t(),n=this.ia,e=this.ra!==n,r=this.p_();if(i){this.__&&(this.yB.VI(this.__),this.__=void 0);var s=hs(this.ua);this.__=this.yB.qL(s)}if(e||r){var o=n instanceof nr&&n.getFillStyle(),h=1===n.thickness?"primitive":"instanced";this.xP=void 0,o instanceof Ee&&("primitive"===h?this.xP={type:h,shader:this.yB.FI(EX["3D"],EX.VertexLocation({axisWorldTranslation:NX(this.Rt),normalSource:void 0}),EX.Color({dataType:"uniform"})),fillStyle:o}:"instanced"===h&&(this.xP={type:h,shader:this.yB.FI(EX["3D"],EX.ColorShaded3D({dataType:"uniform",shadingStyle:this.xS.S().type}),EX.LineInstanced3D({axisWorldTranslation:NX(this.Rt)})),geometry:CK(this.yB,8),fillStyle:o}))}return this.Go(),this.ra=n,this.xS.t=!1,this},i.prototype.vB=function(){var t=this,i=this.yB.gl,n=this.xP,e=this.__,r=this.ia,s=this.xS.S();if(n&&e)switch(n.type){case"instanced":var o=.5*this.wf.gS(r.thickness),h=n.fillStyle.getColor(),u=n.shader,a=n.geometry;this.yB.NI(u,(function(n,r,f){t.yB.rL(u).jL(n("uScale"),t.b_.cL.aO()).jL(n("uDisp"),t.b_.cL.uO()).UL(n("uViewProjectionMatrix"),t.O_).YL(n("uColorDiffuse"),h).XL(n("uOffsetWU"),o),"phong"===s.type&&t.yB.jL(n("uCameraLoc"),t.P_).jL(n("uLightLoc"),t.D_).XL(n("uAmbientReflection"),s.ambientReflection).XL(n("uSpecularReflection"),s.specularReflection).XL(n("uDiffuseReflection"),s.diffuseReflection).XL(n("uShininess"),s.shininess).YL(n("uLightColor"),s.specularColor).YL(n("uAmbientColor"),s.ambientColor),i.bindBuffer(i.ARRAY_BUFFER,e);var c=r("aLocationA"),l=r("aLocationB");i.vertexAttribPointer(c,3,i.FLOAT,!1,6*Float32Array.BYTES_PER_ELEMENT,0*Float32Array.BYTES_PER_ELEMENT),t.yB.sI(c,1),i.enableVertexAttribArray(c),i.vertexAttribPointer(l,3,i.FLOAT,!1,6*Float32Array.BYTES_PER_ELEMENT,3*Float32Array.BYTES_PER_ELEMENT),t.yB.sI(l,1),i.enableVertexAttribArray(l),a.rL(f).Ky(t.ua.length/2)}));break;case"primitive":var f=r instanceof nr?r.getFillStyle():void 0,c=f&&f instanceof Ee?f.getColor():void 0;if(c){var l=n.shader;this.yB.NI(l,(function(n,r){t.yB.rL(l).jL(n("uScale"),t.b_.cL.aO()).jL(n("uDisp"),t.b_.cL.uO()).UL(n("uViewProjectionMatrix"),t.O_),t.yB.YL(n("uColor"),c).rI(e,void 0,{location:r("aPos"),size:3}).Ky(i.LINES,t.ua.length)}))}}return this},i.prototype.Qh=function(t){for(var i=0;i<t.length-1;i+=1){var n=t[i],e=t[i+1];this.ua.push(n),this.ua.push(e)}return this.Vo=!0,this},i.prototype.$h=function(){return this.ua.length=0,this.Vo=!0,this},i.prototype.na=function(t){return this.ia="function"==typeof t?t(this.ia):t,this},i.prototype.ea=function(){return this.ia},i.prototype.HO=function(t,i){},i.prototype.ZB=function(){return this.__&&(this.yB.VI(this.__),this.__=void 0),this},i}(AK),LK=function(t){function i(i,n,e){var r=t.call(this,i)||this;r.R_=n,r.z_=e,r.v_="gpu-calculate";var s=r.AP(),o=s.vertices,h=s.drawSize;return r.FP=i.qL(o),r.CP=h,r}return n(i,t),i.prototype.Ky=function(t,i){return this.yB.rI(this.FP,0,{location:t.attribute("aInstanceGeo"),size:3},{location:t.attribute("aTriangleBary"),size:3}).cI(this.yB.gl.TRIANGLES,0,this.CP,i),this},i.prototype.E_=function(t,i){return this.yB.rI(this.FP,0,{location:t.attribute("aInstanceGeo"),size:3},{location:t.attribute("aTriangleBary"),size:3}).cI(this.yB.gl.LINE_STRIP,0,this.CP,i),this},i.prototype.AP=function(){for(var t=this,i=this.z_,n=this.R_,e=new Float32Array(6*(6*n+6*(i-2)*n)),r=0,s=2*Math.PI/n,o=Math.PI/i,h=function(t,i,n,h,u){var a=i*s,f=Math.PI/2-t*o,c=Math.cos(f),l=c*Math.cos(a),d=c*Math.sin(a),v=Math.sin(f);e[r]=l,e[r+1]=v,e[r+2]=d,e[r+3]=n,e[r+4]=h,e[r+5]=u,r+=6},u=0;u<i;u+=1)for(var a=0;a<n;a+=1)u>0&&(h(u,a,1,0,0),h(u,a+1,1,1,0),h(u+1,a,0,0,1)),u<i-1&&(h(u,a+1,1,1,0),h(u+1,a+1,0,1,0),h(u+1,a,0,0,1));return r!==e.length&&Bs(0,(function(){t.yB.ps.warnings&&r>e.length&&wr.console.warn("LightningChart JS unexpected error scenario, sphere geometry buffer size mismatch.\nA point series 3D component might have missing points.\n\nThis warning can be omitted with LightningChartOptions.warnings")})),{vertices:e,drawSize:r/6}},i.prototype.xB=function(){this.yB.VI(this.FP)},i}(fY),IK=function(t,i){var n=Math.round(i);n<3&&Bs();var e=n,r=t._L.pB.get(Array.from(t._L.pB.keys()).find((function(t){return t.sectors===n&&t.stacks===e})));return r||(r=new LK(t,n,e),t._L.pB.set({sectors:n,stacks:e},r),r)},OK=function(t){function i(i,n,e,r){var s=t.call(this,i,n,e,r)||this;return s.w_="cull-back",s.ic=[],s.xP={},s.uD=new SZ(s.ic,(function(t){return t.vertexBuffer&&s.yB.VI(t.vertexBuffer)}),!0),s.aa=[],s.Vh=0,s.Gh=[],s.Hh=0,s.Nh=Ds,s.jh=Ds,s.ia=Kz.lineStyle,s.VS=Kz.pointStyle3D,s.xS.l(tG),s.fD={attributesPerVertex:3,prepareRenderData:function(t,i){return hs(t)}},s}return n(i,t),i.prototype.Fe=function(t){var i=this,n=this.Vo,e=this.co,r=this.Gh,s=this.Hh,o=s>0,h=this.ia,u=h!==this.ra,a=this.VS,f=a!==this.N_,c=this.p_();this.jh&&(this.Nh=Qs(this.Nh,this.jh),this.jh=void 0),o&&(this.aa=ps(this.aa,r,{canReturnB:!0}),this.Vh+=s);var l=r,d=s;if((n||e)&&(this.ic.forEach((function(t){t.existingCoordinatesCount=0,t.existingDataPointsCount=0,t.boundaries=Ds})),this.uD.$P(),l=this.aa,d=this.Vh),d>0){var v=Math.floor(this.gO.V_/(this.fD.attributesPerVertex*Float32Array.BYTES_PER_ELEMENT)),y=this._o("ApplicationType",(function(t){return"UserSeries"===t.type}))?d:1e3,S=Lr(y,1e5,v);this.uD.KP(l,S,(function(t,n,e,r){return{existingDataPointsCount:e-r,existingCoordinatesCount:e,allocatedCoordinatesCount:t,jointPointsCount:r,lastDataPoint:n[e-1],boundaries:Ds,vertexBuffer:i.yB.JL(t*i.fD.attributesPerVertex,i.fD.prepareRenderData(n,e))}}),(function(t,n,e,r){i.yB.QL(t.vertexBuffer,t.existingCoordinatesCount*i.fD.attributesPerVertex,i.fD.prepareRenderData(n,e)),t.existingDataPointsCount+=e-r,t.existingCoordinatesCount+=e,t.jointPointsCount+=r,t.lastDataPoint=n[e-1]}))}if(u||f||e||c){var m={},b=h instanceof nr&&h,g=b&&b.getFillStyle(),w=g instanceof Ee&&g,p=g instanceof Ve&&g,k=w||p,x=a instanceof ah&&a.getSize(),M=a instanceof ah&&a.getFillStyle(),A=M instanceof Ee&&M,F=M instanceof Ve&&M,T=A||F,C=h.thickness<0||1===h.thickness&&this._o("ApplicationType",(function(t){return"InternalUI"===t.type}))?"primitive":"instanced",B=p?["lookup",p.getLookUpProperty()]:"uniform";if("primitive"===C&&k?m.lines={type:"primitive",fillStyleSolid:w,fillStylePaletted:p,shader:this.yB.FI(EX["3D"],EX.Color({dataType:B}),EX.VertexLocation({axisWorldTranslation:NX(this.Rt),normalSource:void 0}))}:"instanced"===C&&b&&k&&(m.lines={type:"instanced",lineStyleSolid:b,fillStyleSolid:w,fillStylePaletted:p,shader:this.yB.FI(EX["3D"],EX.ColorShaded3D({dataType:B,shadingStyle:this.xS.S().type}),EX.LineInstanced3D({axisWorldTranslation:NX(this.Rt)})),geometry:PK(this.yB,b.getThickness())}),m.markers=void 0,T){var L=gs(a.getShape(),{cube:function(){return MK(i.yB)},sphere:function(){return DK(i.yB,a)}});m.markers={geometry:L,pointStyle:a,pointSizeNWU:"number"==typeof x&&x,pointSizeAxis:"object"==typeof x&&x,fillStyleSolid:A,fillStylePaletted:F,shader:this.yB.FI(EX["3D"],EX.ColorShaded3D({dataType:F?["lookup",F.getLookUpProperty()]:"uniform",shadingStyle:this.xS.S().type}),EX.VertexLocation({offset:{dataType:"uniform",sizeUnit:"number"==typeof x?"nwu":"axis",symmetric:"number"==typeof x,halved:!0},axisWorldTranslation:NX(this.Rt),normalSource:L.v_}))}}if(this.xP=m,p){if(p&&p.lut.isValid){var I=p.getPalette();this.QO=this.gO.$O(I,this.qO,this.QO),this.qO=I}}else this.gO.BI.uo(this.qO),this.qO=void 0}return this.Go(),this.Gh=[],this.Hh=0,this.ra=h,this.N_=a,this.xS.t=!1,this},i.prototype.vB=function(){var t=this,i=this.yB.gl,n=this.xP,e=n.lines,r=n.markers,s=this.xS.S();if(e&&"instanced"===e.type){var o=e.shader,h=e.geometry,u=e.lineStyleSolid,a=e.fillStyleSolid,f=e.fillStylePaletted;this.yB.NI(o,(function(n,e,r){t.yB.rL(o).jL(n("uScale"),t.b_.cL.aO()).jL(n("uDisp"),t.b_.cL.uO()).UL(n("uViewProjectionMatrix"),t.O_).XL(n("uOffsetWU"),t.wf.gS(u.getThickness())),"phong"===s.type&&t.yB.jL(n("uCameraLoc"),t.P_).jL(n("uLightLoc"),t.D_).XL(n("uAmbientReflection"),s.ambientReflection).XL(n("uSpecularReflection"),s.specularReflection).XL(n("uDiffuseReflection"),s.diffuseReflection).XL(n("uShininess"),s.shininess).YL(n("uLightColor"),s.specularColor).YL(n("uAmbientColor"),s.ambientColor),a?t.yB.YL(n("uColorDiffuse"),a.getColor()):f&&t.QO&&t.yB.KL(n("uLookupTexture"),t.QO.texture,0).XL(n("uLookupMin"),f.lut.min).XL(n("uLookupMax"),f.lut.max).XL(n("uLookupTextureHeightPx"),t.QO.textureHeight),t.ic.forEach((function(n){i.bindBuffer(i.ARRAY_BUFFER,n.vertexBuffer);var s=e("aLocationA"),o=e("aLocationB");i.vertexAttribPointer(s,3,i.FLOAT,!1,3*Float32Array.BYTES_PER_ELEMENT,0*Float32Array.BYTES_PER_ELEMENT),t.yB.sI(s,1),i.enableVertexAttribArray(s),i.vertexAttribPointer(o,3,i.FLOAT,!1,3*Float32Array.BYTES_PER_ELEMENT,3*Float32Array.BYTES_PER_ELEMENT),t.yB.sI(o,1),i.enableVertexAttribArray(o),h.rL(r).Ky(n.existingCoordinatesCount-1)}))}))}if(e&&"primitive"===e.type){var c=e.shader,l=e.fillStyleSolid,d=e.fillStylePaletted;this.yB.NI(c,(function(n,e){t.yB.rL(c).jL(n("uScale"),t.b_.cL.aO()).jL(n("uDisp"),t.b_.cL.uO()).UL(n("uViewProjectionMatrix"),t.O_),l?t.yB.YL(n("uColor"),l.getColor()):d&&t.QO&&t.yB.KL(n("uLookupTexture"),t.QO.texture,0).XL(n("uLookupMin"),d.lut.min).XL(n("uLookupMax"),d.lut.max).XL(n("uLookupTextureHeightPx"),t.QO.textureHeight),t.ic.forEach((function(n){t.yB.rI(n.vertexBuffer,void 0,{location:e("aPos"),size:3}).Ky(i.LINE_STRIP,n.existingCoordinatesCount)}))}))}if(r){var v=r.shader,y=r.geometry,S=r.fillStyleSolid,m=r.fillStylePaletted,b=r.pointSizeAxis,g=r.pointSizeNWU;this.yB.NI(v,(function(i,n,e,r){t.yB.rL(v).jL(i("uScale"),t.b_.cL.aO()).jL(i("uDisp"),t.b_.cL.uO()).UL(i("uViewProjectionMatrix"),t.O_).XL(r("uRatioNwuWu"),t.b_.G_()),"phong"===s.type&&t.yB.jL(i("uCameraLoc"),t.P_).jL(i("uLightLoc"),t.D_).XL(i("uAmbientReflection"),s.ambientReflection).XL(i("uSpecularReflection"),s.specularReflection).XL(i("uDiffuseReflection"),s.diffuseReflection).XL(i("uShininess"),s.shininess).YL(i("uLightColor"),s.specularColor).YL(i("uAmbientColor"),s.ambientColor),S?t.yB.YL(i("uColorDiffuse"),S.getColor()):m&&t.QO&&t.yB.KL(i("uLookupTexture"),t.QO.texture,0).XL(i("uLookupMin"),m.lut.min).XL(i("uLookupMax"),m.lut.max).XL(i("uLookupTextureHeightPx"),t.QO.textureHeight),!1!==b&&t.yB.jL(i("uOffsetAxis"),[b.x,b.y,b.z]),!1!==g&&t.yB.XL(i("uOffsetNWU"),g),t.ic.forEach((function(i){t.yB.rI(i.vertexBuffer,1,{location:n("aPos"),size:3}),y.Ky(e,i.existingCoordinatesCount)}))}))}return this},i.prototype.Qh=function(t,i){Array.isArray(t)||(t=[t]),this.Gh=ps(this.Gh,t,{canReturnB:!0}),this.Hh+=t.length;var n=i||qs(t);return this.jh=this.jh?Qs(this.jh,n):n,this},i.prototype.na=function(t){return this.ia="function"==typeof t?t(this.ia):t,this},i.prototype.ea=function(){return this.ia},i.prototype.lS=function(t){return this.VS="function"==typeof t?t(this.VS):t,this},i.prototype.H_=function(){return this.VS},i.prototype.Et=function(){return this.jh?Math.max(this.jh.max.x,this.Nh.max.x):this.Nh.max.x},i.prototype.zt=function(){return this.jh?Math.min(this.jh.min.x,this.Nh.min.x):this.Nh.min.x},i.prototype.Vt=function(){return this.jh?Math.max(this.jh.max.y,this.Nh.max.y):this.Nh.max.y},i.prototype.Nt=function(){return this.jh?Math.min(this.jh.min.y,this.Nh.min.y):this.Nh.min.y},i.prototype.Ht=function(){return this.jh?Math.max(this.jh.max.z,this.Nh.max.z):this.Nh.max.z},i.prototype.Gt=function(){return this.jh?Math.min(this.jh.min.z,this.Nh.min.z):this.Nh.min.z},i.prototype.cu=function(){return.5*this.ia.thickness},i.prototype.lu=function(){return.5*this.ia.thickness},i.prototype.LS=function(){return.5*this.ia.thickness},i.prototype.Xh=function(){return this.aa},i.prototype.Yh=function(){return this.Gh},i.prototype.tu=function(){return this.Vh},i.prototype.iu=function(){return this.Hh},i.prototype.$h=function(){return this.Vo=!0,this.aa.length=0,this.Vh=0,this.Gh=[],this.Hh=0,this.Nh=Ds,this.jh=void 0,this},i.prototype.HO=function(t,i){},i.prototype.dispose=function(){return t.prototype.dispose.call(this),this.uD.tD(),this.xP={},this.qO&&(this.gO.BI.uo(this.qO),this.qO=void 0),this.QO=void 0,this},i.prototype.ZB=function(){return this.dispose(),this},i}(AK),PK=function(t,i){return CK(t,i>50?20:i>20?16:i>10?12:i>5?8:6)},DK=function(t,i){var n=i.getSize();return IK(t,"number"==typeof i?n>50?20:n>20?16:n>10?12:n>5?8:6:20)},_K=function(t){function i(i,n,e,r,s){var o=t.call(this,i,n,e,r)||this;o.Vm=s,o.w_="cull-back",o.ic=[],o.uD=new SZ(o.ic,(function(t){return t.vertexBuffer&&o.yB.VI(t.vertexBuffer)}),!1),o.aa=[],o.Vh=0,o.Gh=[],o.Hh=0,o.Nh=Ds,o.jh=Ds,o.WS=Kz.pointStyle3D,o.xS.l(tG);var h,u,a,f,c=!0===(null==s?void 0:s.individualPointColorEnabled),l=!0===(null==s?void 0:s.individualPointSizeEnabled),d=!0===(null==s?void 0:s.individualLookupValuesEnabled),v=!0===(null==s?void 0:s.individualPointSizeAxisEnabled),y=0;y+=3,c&&(h=y,y+=4),l&&(u=y,y+=1),d&&(a=y,y+=1),v&&(f=y,y+=3);var S=function(t,i,n,e){return t||i||n||e?!t||i||n||e?t||!i||n||e?t||i||!n||e?t||i||n||!e?function(r,s,o){for(var h=3+(t?4:0)+(i?1:0)+(n?1:0)+(e?3:0),u=r.length,a=new Float32Array(u*h),f=0,c=f,l=0;l<u;l+=1){var d=r[l];a[c+0]=d.x,a[c+1]=d.y,a[c+2]=d.z,c+=h}if(f+=3,t){var v=o&&o instanceof Ne&&o.getFallbackColor()||Me;for(c=f,l=0;l<u;l+=1){var y=(d=r[l]).color||v;a[c+0]=y.r,a[c+1]=y.g,a[c+2]=y.b,a[c+3]=y.a,c+=h}f+=4}if(i){var S=1;for("number"==typeof(b=s&&s.getSize())&&(S=b),c=f,l=0;l<u;l+=1){var m=void 0!==(d=r[l]).size?d.size:S;a[c+0]=m,c+=h}f+=1}if(n){for(c=f,l=0;l<u;l+=1)d=r[l],a[c+0]=void 0!==d.value?d.value:0,c+=h;f+=1}if(e){var b;for(S={x:1,y:1,z:1},"object"==typeof(b=s&&s.getSize())&&(S=b),c=f,l=0;l<u;l+=1){var g=void 0!==(d=r[l]).sizeAxisX?d.sizeAxisX:S.x,w=void 0!==d.sizeAxisY?d.sizeAxisY:S.y,p=void 0!==d.sizeAxisZ?d.sizeAxisZ:S.z;a[c+0]=g,a[c+1]=w,a[c+2]=p,c+=h}f+=3}return a}:function(t,i,n){return as(t,i)}:function(t,i,n){return ls(t)}:function(t,i,n){return cs(t,i)}:function(t,i,n){return fs(t,n)}:function(t,i,n){return hs(t)}}(c,l,d,v);return o.fD={individualPointColorEnabled:c,individualPointSizeEnabled:l,individualLookupValuesEnabled:d,individualPointSizeAxisEnabled:v,attributesPerVertex:y,attributeOffsetCoordinate:0,attributeOffsetColor:h,attributeOffsetSize:u,attributeOffsetLookUpValue:a,attributeOffsetPointSize3D:f,prepareRenderData:function(t,i){return S(t,o.WS,o.WS.fillStyle)}},o}return n(i,t),i.prototype.Fe=function(t){var i=this,n=this.Vo,e=this.co,r=this.Gh,s=this.Hh,o=s>0,h=this.WS,u=this.WS!==this.j_,a=this.lo.t,f=this.p_();this.jh&&(this.Nh=Qs(this.Nh,this.jh),this.jh=void 0),o&&(this.aa=ps(this.aa,r,{canReturnB:!0}),this.Vh+=s);var c=r,l=s;if((n||e)&&(this.ic.forEach((function(t){t.existingDataPointsCount=0,t.existingCoordinatesCount=0,t.boundaries=Ds})),this.uD.$P(),c=this.aa,l=this.Vh),l>0){var d=Math.floor(this.gO.V_/(this.fD.attributesPerVertex*Float32Array.BYTES_PER_ELEMENT)),v=Lr(l,1e5,d);this.uD.KP(c,v,(function(t,n,e){return{existingDataPointsCount:e,existingCoordinatesCount:e,allocatedCoordinatesCount:t,boundaries:Ds,vertexBuffer:i.yB.JL(t*i.fD.attributesPerVertex,i.fD.prepareRenderData(n,e))}}),(function(t,n,e){i.yB.QL(t.vertexBuffer,t.existingCoordinatesCount*i.fD.attributesPerVertex,i.fD.prepareRenderData(n,e)),t.existingDataPointsCount+=e,t.existingCoordinatesCount=t.existingDataPointsCount}))}if(u||e||f||a){var y=void 0,S=h.getSize(),m=h.getFillStyle(),b=this.fD.individualPointColorEnabled,g=this.fD.individualPointSizeEnabled,w=this.fD.individualPointSizeAxisEnabled,p=this.fD.individualLookupValuesEnabled,k=m instanceof Ee&&m,x=m instanceof Ne&&m,M=m instanceof Ve&&m;if(x&&!b){var A="LCJS misusage error: Series individualPointColorEnabled flag must be set if using IndividualPointFill !";throw wr.alert(A),new Error(A)}if(M&&"value"===M.getLookUpProperty()&&!p){A='LCJS misusage error: Series individualLookupValuesEnabled flag must be set if using PalettedFill with lookUpProperty="value" !';throw wr.alert(A),new Error(A)}var F=h instanceof ah&&h,T=F&&F.getWireframeStyle(),C=T&&T instanceof nr&&T,B=C&&C.getFillStyle(),L=B&&B instanceof Ee&&B;if(k||x||M||L){var I=x?"attribute":M?["lookup",M.getLookUpProperty()]:"uniform",O=g&&"number"==typeof S,P=w&&"object"==typeof S,D=O||P?"attribute":"uniform";if(h instanceof ah){var _=gs(h.getShape(),{cube:function(){return MK(i.yB)},sphere:function(){return RK(i.yB,h,g)}});y={type:"instanced",shader:this.yB.FI(EX["3D"],EX.ColorShaded3D({dataType:I,shadingStyle:this.xS.S().type,wireframe:!1!==L}),EX.VertexLocation({offset:{dataType:D,sizeUnit:"number"==typeof S?"nwu":"axis",halved:!0,symmetric:"number"==typeof S},axisWorldTranslation:NX(this.Rt),normalSource:_.v_})),pointStyle:h,useIndividualPointSize:O,useIndividualPointSize3D:P,pointSizeNWU:"number"==typeof S&&S,pointSizeAxis:"object"==typeof S&&S,fillStyleSolid:k,fillStyleIndividual:x,fillStylePalette:M,geometry:_,wireframe:C&&L&&{thickness:C.getThickness(),fillStyleSolid:L}}}else h instanceof fh&&"number"==typeof S&&(y={type:"primitive",shader:this.yB.FI(EX["3D"],EX.PointSize(D),EX.Color({dataType:I}),EX.VertexLocation({axisWorldTranslation:NX(this.Rt),normalSource:void 0})),pointStyle:h,pointSizePixels:S,useIndividualPointSize:O,fillStyleSolid:k,fillStyleIndividual:x,fillStylePalette:M})}if(this.xP=y,m instanceof Ve){var R=m.getPalette();this.RD=this.gO.$O(R,this.qO,this.RD),this.qO=R}else this.RD=void 0,this.gO.BI.uo(this.qO),this.qO=void 0}return this.Go(),this.Gh=[],this.Hh=0,this.j_=h,this.xS.t=!1,this},i.prototype.vB=function(){var t=this,i=this.yB.gl,n=this.xP;if(!n)return this;var e=n.shader;if(!e)return this;var r=this.xS.S(),s=n.fillStyleSolid,o=n.fillStylePalette,h=n.useIndividualPointSize,u="instanced"===n.type&&n.useIndividualPointSize3D;return this.yB.NI(e,(function(a,f,c,l){if(t.yB.rL(e).jL(a("uScale"),t.b_.cL.aO()).jL(a("uDisp"),t.b_.cL.uO()).UL(a("uViewProjectionMatrix"),t.O_),"instanced"===n.type){var d=n.pointSizeAxis,v=n.pointSizeNWU;!1!==d&&!1===u&&t.yB.jL(a("uOffsetAxis"),[d.x,d.y,d.z]),!1!==v&&!1===h&&t.yB.XL(a("uOffsetNWU"),v).XL(l("uRatioNwuWu"),t.b_.G_())}else if("primitive"===n.type){var y=n.pointSizePixels;h||t.yB.XL(a("uPointSize"),y).XL(a("uDevicePixelRatio"),t.yB.uL())}if("instanced"===n.type){var S=n.wireframe;"phong"===r.type&&t.yB.jL(a("uCameraLoc"),t.P_).jL(a("uLightLoc"),t.D_).XL(a("uAmbientReflection"),r.ambientReflection).XL(a("uSpecularReflection"),r.specularReflection).XL(a("uDiffuseReflection"),r.diffuseReflection).XL(a("uShininess"),r.shininess).YL(a("uLightColor"),r.specularColor).YL(a("uAmbientColor"),r.ambientColor),S&&t.yB.XL(a("uWireframeThickness"),S.thickness).YL(a("uWireframeColor"),S.fillStyleSolid.getColor()),s&&t.yB.YL(a("uColorDiffuse"),s.getColor())}else"primitive"===n.type&&s&&t.yB.YL(a("uColor"),s.getColor());o&&t.RD&&t.yB.KL(a("uLookupTexture"),t.RD.texture,0).XL(a("uLookupMin"),o.lut.min).XL(a("uLookupMax"),o.lut.max).XL(a("uLookupTextureHeightPx"),t.RD.textureHeight),t.ic.forEach((function(e,r){i.bindBuffer(i.ARRAY_BUFFER,e.vertexBuffer);var s=f("aPos");if(i.vertexAttribPointer(s,3,i.FLOAT,!1,t.fD.attributesPerVertex*Float32Array.BYTES_PER_ELEMENT,t.fD.attributeOffsetCoordinate*Float32Array.BYTES_PER_ELEMENT),"instanced"===n.type&&t.yB.sI(s,1),i.enableVertexAttribArray(s),n.fillStyleIndividual&&void 0!==t.fD.attributeOffsetColor){var o=f("aColor");i.vertexAttribPointer(o,4,i.FLOAT,!1,t.fD.attributesPerVertex*Float32Array.BYTES_PER_ELEMENT,t.fD.attributeOffsetColor*Float32Array.BYTES_PER_ELEMENT),"instanced"===n.type&&t.yB.sI(o,1),i.enableVertexAttribArray(o)}if(h&&void 0!==t.fD.attributeOffsetSize){"instanced"===n.type?t.yB.XL(l("uRatioNwuWu"),t.b_.G_()):"primitive"===n.type&&t.yB.XL(a("uDevicePixelRatio"),t.yB.uL());var d=f("instanced"===n.type?"aOffsetNWU":"aPointSize");i.vertexAttribPointer(d,1,i.FLOAT,!1,t.fD.attributesPerVertex*Float32Array.BYTES_PER_ELEMENT,t.fD.attributeOffsetSize*Float32Array.BYTES_PER_ELEMENT),"instanced"===n.type&&t.yB.sI(d,1),i.enableVertexAttribArray(d)}if(u&&void 0!==t.fD.attributeOffsetPointSize3D&&"instanced"===n.type){var v=f("aOffsetAxis");i.vertexAttribPointer(v,3,i.FLOAT,!1,t.fD.attributesPerVertex*Float32Array.BYTES_PER_ELEMENT,t.fD.attributeOffsetPointSize3D*Float32Array.BYTES_PER_ELEMENT),"instanced"===n.type&&t.yB.sI(v,1),i.enableVertexAttribArray(v)}if(n.fillStylePalette&&"value"===n.fillStylePalette.getLookUpProperty()&&void 0!==t.fD.attributeOffsetLookUpValue){var y=f("aLookupValue");i.vertexAttribPointer(y,1,i.FLOAT,!1,t.fD.attributesPerVertex*Float32Array.BYTES_PER_ELEMENT,t.fD.attributeOffsetLookUpValue*Float32Array.BYTES_PER_ELEMENT),"instanced"===n.type&&t.yB.sI(y,1),i.enableVertexAttribArray(y)}"instanced"===n.type?n.geometry.Ky(c,e.existingCoordinatesCount):"primitive"===n.type&&t.yB.Ky(i.POINTS,e.existingCoordinatesCount)}))})),this},i.prototype.Qh=function(t,i){Array.isArray(t)||(t=[t]),this.Gh=ps(this.Gh,t,{canReturnB:!0}),this.Hh+=t.length;var n=i||qs(t);return this.jh=this.jh?Qs(this.jh,n):n,this},i.prototype.jS=function(t){return this.WS="function"==typeof t?t(this.WS):t,this},i.prototype.W_=function(){return this.WS},i.prototype.Et=function(){return this.jh?Math.max(this.jh.max.x,this.Nh.max.x):this.Nh.max.x},i.prototype.zt=function(){return this.jh?Math.min(this.jh.min.x,this.Nh.min.x):this.Nh.min.x},i.prototype.Vt=function(){return this.jh?Math.max(this.jh.max.y,this.Nh.max.y):this.Nh.max.y},i.prototype.Nt=function(){return this.jh?Math.min(this.jh.min.y,this.Nh.min.y):this.Nh.min.y},i.prototype.Ht=function(){return this.jh?Math.max(this.jh.max.z,this.Nh.max.z):this.Nh.max.z},i.prototype.Gt=function(){return this.jh?Math.min(this.jh.min.z,this.Nh.min.z):this.Nh.min.z},i.prototype.cu=function(){var t=this.WS,i=t.getSize();return"number"==typeof i?t instanceof ah?i/2:t instanceof fh?5:0:0},i.prototype.lu=function(){return this.cu()},i.prototype.LS=function(){return this.cu()},i.prototype.Xh=function(){return this.aa},i.prototype.Yh=function(){return this.Gh},i.prototype.tu=function(){return this.Vh},i.prototype.iu=function(){return this.Hh},i.prototype.$h=function(){return this.Vo=!0,this.aa.length=0,this.Vh=0,this.Gh=[],this.Hh=0,this.Nh=Ds,this.jh=void 0,this},i.prototype.HO=function(t,i){},i.prototype.dispose=function(){return t.prototype.dispose.call(this),this.uD.tD(),this.gO.BI.uo(this.qO),this.qO=void 0,this.RD=void 0,this.xP=void 0,this},i.prototype.ZB=function(){return this.dispose(),this},i}(AK),RK=function(t,i,n){var e=i.getSize();return IK(t,"number"==typeof e?n||e>=50?20:e>=10?10:e>=3?5:3:32)},zK=function(t){function i(i,n,e,r){var s=t.call(this,i,n,e,r)||this;return s.UO="grid",s.w_="disabled",s.YO=[],s.Su=0,s.da=0,s.hi=w({x:0,y:0,z:0}),s.va=w({x:0,y:0}),s.ya=w({x:0,y:0}),s.St={x:0,y:0},s.bt={x:0,y:0},s.Sa=!0,s.ma=!0,s.ba=!0,s.Nh=Ds,s.ga=!0,s.Ho=Kz.fillStyle,s.wa=Re,s.xS.l(QV),s}return n(i,t),i.prototype.Fe=function(){var t,i,n,e,r,s,h,u,a,f,c,l,d=this.Uo(),v=this.co,y=this.Vo;if(this.Yo()&&this.Ra&&this.Da){var S=this.yB,m=this.Ho,b=this.Wo!==m,g=this.p_(),w=this.wa,p=this.Ga!==w,k=this.xa(),x=this.Rt.x.t||this.Rt.y.t||this.Rt.z.t;if(k||v){var M=this.va.S(),A=M.y,F=M.x,T=this.ga?101:201;this.XO=YX(A,F,T),this.ZO=XX(this.XO),this.KO(),this.YO=this.ZO.map((function(){return{vbo:void 0,ibo:void 0,colors:void 0,intensities:void 0,length:0}})),this.va.t=!1,this.ya.t=!1}var C=this.ZO,B=this.YO,L=this.Da;if(d||v||x||this.ba||y||k){this.Nh=Ds;try{for(var I=o(C),O=I.next();!O.done;O=I.next()){var P=O.value;ZX(L,this.ga,P,qX,this.Rt)}}catch(i){t={error:i}}finally{try{O&&!O.done&&(i=I.return)&&i.call(I)}finally{if(t)throw t.error}}var D=0;try{for(var _=o(B),R=_.next();!R.done;R=_.next()){(Q=R.value).vbo&&S.gl.deleteBuffer(Q.vbo),Q.ibo&&S.gl.deleteBuffer(Q.ibo);var z=C[D];D+=1,Q.vbo=S.qL(z.vbo),Q.ibo=S.tI(z.ibo),Q.length=z.length,Q.lengthWireframe=z.lengthWireframe,this.Nh=Qs(this.Nh,z.boundary)}}catch(t){n={error:t}}finally{try{R&&!R.done&&(e=_.return)&&e.call(_)}finally{if(n)throw n.error}}this.ba=!1}if(m instanceof Ve||(this.gO.BI.uo(this.qO),this.qO=void 0),b||v||g){var E=m instanceof Ee&&m,N=m instanceof Ne&&m,V=m instanceof Ve&&m;this.fL=E||N||V?S.FI(EX["3D"],EX.ColorShaded3D({dataType:E?"uniform":N?"attribute":["lookup",V.getLookUpProperty()],shadingStyle:this.xS.S().type}),EX.VertexLocation({translation:"grid"===this.UO?{dataType:"uniform",sizeUnit:"axis"}:void 0,axisWorldTranslation:NX(this.Rt),normalSource:"attribute"})):void 0}(p||v)&&(this.JO=w instanceof Ee?S.FI(EX["3D"],EX.Color({dataType:"uniform"}),EX.VertexLocation({translation:"grid"===this.UO?{dataType:"uniform",sizeUnit:"axis"}:void 0,axisWorldTranslation:NX(this.Rt),normalSource:void 0}),EX.OffsetTowardsCamera()):void 0);var G=this.Ra;if(m instanceof Ve&&m.lut.isValid){if("value"===m.getLookUpProperty()&&(this.ma||this.co)){try{for(var H=o(C),j=H.next();!j.done;j=H.next()){var W=j.value;JX(G,this.ga,W,qX)}}catch(t){r={error:t}}finally{try{j&&!j.done&&(s=H.return)&&s.call(H)}finally{if(r)throw r.error}}D=0;try{for(var U=o(B),Y=U.next();!Y.done;Y=U.next()){(Q=Y.value)&&Q.intensities&&S.gl.deleteBuffer(Q.intensities);z=C[D];D+=1,Q.intensities=S.iI(z.intensities)}}catch(t){h={error:t}}finally{try{Y&&!Y.done&&(u=U.return)&&u.call(U)}finally{if(h)throw h.error}}this.ma=!1}var X=m.getPalette();this.QO=this.gO.$O(X,this.qO,this.QO),this.qO=X}else if(m instanceof Ne&&(this.tP&&S.zI(this.tP),this.Sa||this.co)){try{for(var Z=o(C),K=Z.next();!K.done;K=Z.next()){W=K.value;QX(G,m.color,this.ga,W,qX)}}catch(t){a={error:t}}finally{try{K&&!K.done&&(f=Z.return)&&f.call(Z)}finally{if(a)throw a.error}}D=0;try{for(var q=o(B),J=q.next();!J.done;J=q.next()){var Q;(Q=J.value).colors&&S.gl.deleteBuffer(Q.colors);z=C[D];D+=1,Q.colors=S.iI(z.colors)}}catch(t){c={error:t}}finally{try{J&&!J.done&&(l=q.return)&&l.call(q)}finally{if(c)throw c.error}}this.Sa=!1}}return this.Vo=!1,this.co=!1,this.Xo(this.Ho),this.Ga=this.wa,this.xS.t=!1,this},i.prototype.vB=function(){var t=this,i=this.Ra&&this.Da;if(this.Yo()&&i){var n=this.fL,e=this.xS.S();if(n){var r=(a=this.Ho)instanceof Ee&&a,s=a instanceof Ve&&a,h=a instanceof Ne&&a;this.yB.NI(n,(function(i,u,a){var f,c;t.yB.rL(n).jL(i("uScale"),t.b_.cL.aO()).jL(i("uDisp"),t.b_.cL.uO()).UL(i("uViewProjectionMatrix"),t.O_),"phong"===e.type&&t.yB.jL(i("uCameraLoc"),t.P_).jL(i("uLightLoc"),t.D_).XL(i("uAmbientReflection"),e.ambientReflection).XL(i("uSpecularReflection"),e.specularReflection).XL(i("uDiffuseReflection"),e.diffuseReflection).XL(i("uShininess"),e.shininess).YL(i("uLightColor"),e.specularColor).YL(i("uAmbientColor"),e.ambientColor),"grid"===t.UO&&t.yB.jL(i("uTranslationAxis"),[t.St.x,0,t.St.y]),r&&t.yB.YL(i("uColorDiffuse"),r.getColor()),s&&s.lut.isValid&&t.QO&&t.yB.XL(i("uLookupMin"),s.lut.min).XL(i("uLookupMax"),s.lut.max).XL(i("uLookupTextureHeightPx"),t.QO.textureHeight).KL(i("uLookupTexture"),t.QO.texture,0);try{for(var l=o(t.YO),d=l.next();!d.done;d=l.next()){var v=d.value,y=v.vbo,S=v.ibo,m=v.colors,b=v.intensities,g=v.length;t.yB.rI(y,void 0,{location:u("aPos"),size:3},{location:u("aNormal"),size:3}).aI(S),s&&"value"===s.getLookUpProperty()&&b&&t.yB.uI(u("aLookupValue"),b),h&&m&&t.yB.hI(u("aColor"),m),t.yB.fI(g)}}catch(t){f={error:t}}finally{try{d&&!d.done&&(c=l.return)&&c.call(l)}finally{if(f)throw f.error}}}))}var u=this.JO;if(u){var a,f=(a=this.wa)instanceof Ee&&a;f&&this.yB.NI(u,(function(i,n,e){var r,s;t.yB.rL(u).jL(u.yL("uScale"),t.b_.cL.aO()).jL(u.yL("uDisp"),t.b_.cL.uO()).UL(u.yL("uViewProjectionMatrix"),t.O_).jL(u.yL("uCameraLoc"),t.P_),"grid"===t.UO&&t.yB.jL(u.yL("uTranslationAxis"),[t.St.x,0,t.St.y]),t.yB.YL(u.yL("uColor"),f.getColor());try{for(var h=o(t.YO),a=h.next();!a.done;a=h.next()){var c=a.value,l=c.vbo,d=c.ibo,v=c.lengthWireframe;t.yB.rI(l,void 0,{location:n("aPos"),size:3},{location:void 0,size:3}).aI(d).fI(v,t.yB.gl.LINES)}}catch(t){r={error:t}}finally{try{a&&!a.done&&(s=h.return)&&s.call(h)}finally{if(r)throw r.error}}}))}}return this},i.prototype.HO=function(t,i){},i.prototype.KO=function(){var t,i,n=this.yB;if(this.YO.length>0){try{for(var e=o(this.YO),r=e.next();!r.done;r=e.next()){var s=r.value,h=s||{},u=h.vbo,a=h.ibo,f=h.colors,c=h.intensities;u&&(n.VI(u),s.vbo=void 0),a&&(n.VI(a),s.ibo=void 0),f&&(n.VI(f),s.colors=void 0),c&&(n.VI(c),s.intensities=void 0)}}catch(i){t={error:i}}finally{try{r&&!r.done&&(i=e.return)&&i.call(e)}finally{if(t)throw t.error}}this.YO.length=0}},i.prototype.ZB=function(){return this.KO(),this.tP&&(this.yB.zI(this.tP),this.tP=void 0),this.fL=void 0,this.JO=void 0,this.gO.BI.uo(this.qO),this.qO=void 0,this.QO=void 0,this},i.prototype.l=function(t){return HE.l(this,t,(function(t,i){return{x:t,y:0,z:i}})),this},i.prototype.xa=function(){return HE.xa(this)},i.prototype.Ma=function(){return HE.Ma(this)},i.prototype.kh=function(){return HE.kh(this)},i.prototype.iu=function(){return HE.iu(this)},i.prototype.Aa=function(t,i,n){return HE.Aa(this,t,i,n),this},i.prototype.Fa=function(t,i,n){return HE.Fa(this,t,i,n),this},i.prototype.Ta=function(t,i){return HE.Ta(this,t,i),this},i.prototype.Ca=function(t,i){return HE.Ca(this,t,i),this},i.prototype.Ba=function(t,i){return this.UO="mesh",HE.Ba(this,t,i),this},i.prototype.Va=function(t,i){return HE.Va(this,t,i),this},i.prototype.$h=function(){return HE.$h(this,(function(t,i){return{x:t,y:0,z:i}})),this},i.prototype.La=function(){return HE.La(this)},i.prototype.Ia=function(){return HE.Ia(this)},i.prototype.Oa=function(){return HE.Oa(this)},i.prototype.tu=function(){return HE.tu(this)},i.prototype.Uo=function(){return HE.Uo(this)},i.prototype.Yo=function(){return HE.Yo(this)},i.prototype.Et=function(){return"grid"===this.UO?this.Nh.max.x+this.St.x:this.Nh.max.x},i.prototype.zt=function(){return"grid"===this.UO?this.Nh.min.x+this.St.x:this.Nh.min.x},i.prototype.Vt=function(){return this.UO,this.Nh.max.y},i.prototype.Nt=function(){return this.UO,this.Nh.min.y},i.prototype.Ht=function(){return"grid"===this.UO?this.Nh.max.z+this.St.y:this.Nh.max.z},i.prototype.Gt=function(){return"grid"===this.UO?this.Nh.min.z+this.St.y:this.Nh.min.z},i.prototype.cu=function(){return 0},i.prototype.lu=function(){return 0},i.prototype.LS=function(){return 0},i.prototype.$n=function(t){return this.Ho=yE(this.Ho,t),this},i.prototype.Qn=function(){return this.Ho},i.prototype.pa=function(t){return this.wa=yE(this.wa,t),this},i.prototype.ka=function(){return this.wa},i.prototype.jo=function(){return SE(this.Wo,this.Ho)},i.prototype.Xo=function(t){this.Wo=t},i}(AK),EK=function(t){function i(i,n,r,s,o){var h=t.call(this,i,n,r,s)||this;h.w_="disabled",h.Ho=Kz.fillStyle,h.wa=Kz.lineStyle,h.PD=w("bilinear"),h.U_=[],h.Y_=Ds,h.X_=void 0,h.Z_=!1,h.xS.l(QV);var u="columns"===o.dataOrder?o.columns:o.rows,a="columns"===o.dataOrder?o.rows:o.columns;h.Vm=e(e({},o),{primaryDimensionVectorsCount:u,secondaryDimensionVectorsCount:a}),h.Y_={min:{x:Math.min(o.start.x,o.start.x+(o.columns-1)*o.step.x),z:Math.min(o.start.z,o.start.z+(o.rows-1)*o.step.z)},max:{x:Math.max(o.start.x,o.start.x+(o.columns-1)*o.step.x),z:Math.max(o.start.z,o.start.z+(o.rows-1)*o.step.z)}},h.K_=new Array(h.Vm.primaryDimensionVectorsCount).fill(void 0),h.q_=new cK(h.gO,i.oo.Rt,Cr,Cr,[],e(e({},h.Vm),{start:{x:0,y:0},step:{x:1,y:1}})).pa(ir),h.q_.ID=oK;var f=h.q_.OD.gridTiles.map((function(t){var i=t.sizeHeatmapDataVectors,n=t.sizeUniqueHeatmapDataVectors,e=t.iFirstVector,r=t.iFirstUniqueVector,s="columns"===h.Vm.dataOrder?{x:h.Vm.step.x*(t.sizeHeatmapDataVectors.primary-1),z:h.Vm.step.z*(t.sizeHeatmapDataVectors.secondary-1)}:{x:h.Vm.step.x*(t.sizeHeatmapDataVectors.secondary-1),z:h.Vm.step.z*(t.sizeHeatmapDataVectors.primary-1)},o="columns"===h.Vm.dataOrder?{x:h.Vm.start.x+h.Vm.step.x*t.iFirstVector.primary,z:h.Vm.start.z+h.Vm.step.z*t.iFirstVector.secondary}:{x:h.Vm.start.x+h.Vm.step.x*t.iFirstVector.secondary,z:h.Vm.start.z+h.Vm.step.z*t.iFirstVector.primary},u=new Float32Array(t.sizeHeatmapDataVectors.primary*t.sizeHeatmapDataVectors.secondary),a={primary:t.sizeHeatmapDataVectors.primary-1,secondary:t.sizeHeatmapDataVectors.secondary-1};return{iFirstVector:t.iFirstVector,iFirstUniqueVector:t.iFirstUniqueVector,sizeHeatmapDataVectors:t.sizeHeatmapDataVectors,sizeUniqueHeatmapDataVectors:t.sizeUniqueHeatmapDataVectors,iFirstGeometryVector:e,iFirstGeometryUniqueVector:r,sizeGeometryDataVectors:i,sizeUniqueGeometryDataVectors:n,startLocationAxis:o,sizeAxis:s,heightmapData:u,normalmapSize:a}})),c=h.q_.OD.gridTileSizes.map((function(t){var i=f.filter((function(i){return i.sizeHeatmapDataVectors.primary===t.sizeHeatmapData.primary&&i.sizeHeatmapDataVectors.secondary===t.sizeHeatmapData.secondary})),n=i[0].sizeGeometryDataVectors;return e(e({},t),{tiles:i,sizeGeometryData:n})})),l=f.reduce((function(t,i){var n=i.sizeHeatmapDataVectors.primary,e=i.sizeHeatmapDataVectors.secondary,r=n*e;return r>t.cells?{primary:n,secondary:e,cells:r}:t}),{primary:0,secondary:0,cells:0});return h.J_={gridTiles:f,gridTileSizes:c,largestGridTileSize:l},h}return n(i,t),i.prototype.Q_=function(t){this.tR=t,this.X_=void 0},i.prototype.iR=function(t){"columns"===this.Vm.dataOrder?(this.Y_.min.x=Math.min(this.Vm.start.x,this.Vm.start.x+(this.Vm.columns-1)*this.Vm.step.x)+t,this.Y_.max.x=Math.max(this.Vm.start.x,this.Vm.start.x+(this.Vm.columns-1)*this.Vm.step.x)+t):(this.Y_.min.z=Math.min(this.Vm.start.z,this.Vm.start.z+(this.Vm.rows-1)*this.Vm.step.z)+t,this.Y_.max.z=Math.max(this.Vm.start.z,this.Vm.start.z+(this.Vm.rows-1)*this.Vm.step.z)+t),this.nR=t},i.prototype.Fe=function(t){var i=this,n=this.U_,e=this.Ho,r=e instanceof Ee&&e,s=e instanceof Ve&&e,o=SE(this.Wo,e),h=s&&s.getPalette(),u=this.wa,a=u instanceof nr&&u,f=a&&a.getFillStyle(),c=f&&f instanceof Ee&&f,l=!1!==c,d=u!==this.Ga,v=this.PD.t,y=this.PD.S(),S=this.xS.S(),m=this.p_(),b=this.co;this.q_.Fe();var g=this.q_.DD;if(!g)return this;this.eR=this.eR||this.rR(g);var w=this.eR;this.sR(w);var p=hK(n,w,b&&this.Z_?"y":void 0,(function(t){return t.sizeGeometryDataVectors}));if(p.size>0&&(fK(this.yB,p,(function(t){return t.heightmapData}),(function(t){return t.heightmapDataTexture})),this.Z_=!0),"phong"===S.type&&(p.size>0||m)){var k=this.yB.gl,x=this.yB.FI(EX["2D"],EX.DrawToNormalTexture({flipXZ:"rows"===this.Vm.dataOrder,vertexIdSource:this.yB.KI(),normalTextureType:this.yB.gl2?"uint":"ubyte",heightmapTextureType:this.yB.MI?"float":"ubyte",littleEndian:this.yB.IS_MACHINE_LITTLE_ENDIAN}));w.gridTileSizes.forEach((function(t){t.tiles.forEach((function(n){var e=n.normalmapTexture;if(e){var r={x:n.normalmapSize.secondary,y:n.normalmapSize.primary},s=r.x*r.y;i.yB.LI.vB((function(){i.yB.NI(x,(function(e,r,o,h){i.yB.rL(x).qI(o,s).VL(e("uTileDimensionsXZ"),["columns"===i.Vm.dataOrder?t.sizeHeatmapData.primary:t.sizeHeatmapData.secondary,"columns"===i.Vm.dataOrder?t.sizeHeatmapData.secondary:t.sizeHeatmapData.primary]).GL(e("uTileDimensions"),[t.sizeHeatmapData.primary,t.sizeHeatmapData.secondary]).VL(e("uTileStartLocationAxisXZ"),[n.startLocationAxis.x+("columns"===i.Vm.dataOrder&&i.nR||0),n.startLocationAxis.z+("rows"===i.Vm.dataOrder&&i.nR||0)]).VL(e("uTileSizeAxisXZ"),[n.sizeAxis.x,n.sizeAxis.z]).KL(e("uHeightmapTexture"),n.heightmapDataTexture,1).Ky(k.POINTS,s)}))}),e,r,void 0,i.oo.vi(),i.oo.rs(),0)}}))}))}if(o||d||this.co||v){h?(this.RD=this.gO.$O(h,this.zD,this.RD),this.zD=h):(this.RD=void 0,this.gO.BI.uo(this.zD),this.zD=void 0);var M=a&&c?{wireframeSolid:a,wireframeFillSolid:c}:void 0,A=void 0;r?A={shader:this.yB.FI(EX["3D"],EX.SurfaceGrid({axisWorldTranslation:NX(this.Rt),fillColor:"uniform",interpolation:"bilinear"===y&&"bilinear",flipXZ:"rows"===this.Vm.dataOrder,shadingStyle:S.type,wireframe:l,instanceIdSource:this.yB.JI(),normalTextureType:this.yB.gl2?"uint":"ubyte",intensityTextureType:this.yB.MI?"float":"ubyte",heightmapTextureType:this.yB.MI?"float":"ubyte",littleEndian:this.yB.IS_MACHINE_LITTLE_ENDIAN})),fill:{fillMode:"solid",fillStyleSolid:r},wireframe:M}:this.RD&&s&&"value"===s.getLookUpProperty()?A={shader:this.yB.FI(EX["3D"],EX.SurfaceGrid({axisWorldTranslation:NX(this.Rt),fillColor:["lookup","value"],interpolation:"bilinear"===y&&"bilinear",flipXZ:"rows"===this.Vm.dataOrder,shadingStyle:S.type,wireframe:l,instanceIdSource:this.yB.JI(),normalTextureType:this.yB.gl2?"uint":"ubyte",intensityTextureType:this.yB.MI?"float":"ubyte",heightmapTextureType:this.yB.MI?"float":"ubyte",littleEndian:this.yB.IS_MACHINE_LITTLE_ENDIAN})),fill:{fillMode:"intensity",fillStylePaletted:s,colorLookupTexture:this.RD},wireframe:M}:this.RD&&s?A={shader:this.yB.FI(EX["3D"],EX.SurfaceGrid({axisWorldTranslation:NX(this.Rt),fillColor:["lookup",s.getLookUpProperty()],interpolation:"bilinear"===y&&"bilinear",flipXZ:"rows"===this.Vm.dataOrder,shadingStyle:S.type,wireframe:l,instanceIdSource:this.yB.JI(),normalTextureType:this.yB.gl2?"uint":"ubyte",intensityTextureType:this.yB.MI?"float":"ubyte",heightmapTextureType:this.yB.MI?"float":"ubyte",littleEndian:this.yB.IS_MACHINE_LITTLE_ENDIAN})),fill:{fillMode:"xyz",fillStylePaletted:s,colorLookupTexture:this.RD},wireframe:M}:l&&(A={shader:this.yB.FI(EX["3D"],EX.SurfaceGrid({axisWorldTranslation:NX(this.Rt),fillColor:void 0,interpolation:"bilinear"===y&&"bilinear",flipXZ:"rows"===this.Vm.dataOrder,shadingStyle:S.type,wireframe:l,instanceIdSource:this.yB.JI(),normalTextureType:this.yB.gl2?"uint":"ubyte",intensityTextureType:this.yB.MI?"float":"ubyte",heightmapTextureType:this.yB.MI?"float":"ubyte",littleEndian:this.yB.IS_MACHINE_LITTLE_ENDIAN})),fill:void 0,wireframe:M}),this.xP=A}return this.U_.length=0,this.Vo=!1,this.co=!1,this.Wo=e,this.Ga=u,this.xS.t=!1,this},i.prototype.rR=function(t){var i=this,n=this.J_.gridTiles.map((function(n){var r=aK(i.yB,n.sizeHeatmapDataVectors.secondary,n.sizeHeatmapDataVectors.primary),s=t.gridTiles.find((function(t){return t.iFirstUniqueVector.primary===n.iFirstUniqueVector.primary&&t.iFirstUniqueVector.secondary===n.iFirstUniqueVector.secondary}));if(!s)throw new Error("Internal LC JS error prepare surface data 2D render data not found");return e(e({},n),{intensityDataTexture:s.intensityDataTexture,heightmapDataTexture:r,normalmap:void 0})})),r=this.J_.gridTileSizes.map((function(t){var i=n.filter((function(i){return i.sizeHeatmapDataVectors.primary===t.sizeHeatmapData.primary&&i.sizeHeatmapDataVectors.secondary===t.sizeHeatmapData.secondary}));return e(e({},t),{tiles:i})})),s=this.yB.qL([0,0,1,0,0,1,0,1,1,0,0,1,0,0,1,0,1,0,1,0,1,0,1,0,1,1,1,1,0,0]),o=this.yB.gl.TRIANGLES;return{gridTiles:n,gridTileSizes:r,rectangleLocationsBuffer:s,rectangleLocationsDrawLength:6,rectangleLocationsDrawMode:o}},i.prototype.sR=function(t){var i,n=this;if("phong"===this.xS.S().type)for(var e=0;e<t.gridTiles.length;e+=1){var r=t.gridTiles[e];if(r.normalmapTexture)return;var s=void 0,o=null===(i=this.yB.gl2)||void 0===i?void 0:i.ctx;if(o)s=this.yB._I(null,o.RGBA_INTEGER,!1,!0,{x:r.normalmapSize.secondary,y:r.normalmapSize.primary},o.UNSIGNED_INT,o.RGBA32UI);else{var h=this.yB.gl;s=this.yB._I(null,h.RGBA,!1,!0,{x:r.normalmapSize.secondary,y:r.normalmapSize.primary},h.UNSIGNED_BYTE)}r.normalmapTexture=s}else t.gridTiles.forEach((function(t){t.normalmapTexture&&(n.yB.KB(t.normalmapTexture),t.normalmapTexture=void 0)}))},i.prototype.vB=function(){var t=this,i=this.yB.gl,n=this.eR;if(!n)return this;var e=this.xS.S();if(this.xP){var r=this.xP,s=r.shader,o=r.fill,h=r.wireframe;this.yB.NI(s,(function(r,u,a,f){if(t.yB.rL(s).QI(a,t.J_.largestGridTileSize.cells).jL(r("uScale"),t.b_.cL.aO()).jL(r("uDisp"),t.b_.cL.uO()).UL(r("uViewProjectionMatrix"),t.O_),"phong"===e.type&&t.yB.jL(r("uCameraLoc"),t.P_).jL(r("uLightLoc"),t.D_).XL(r("uAmbientReflection"),e.ambientReflection).XL(r("uSpecularReflection"),e.specularReflection).XL(r("uDiffuseReflection"),e.diffuseReflection).XL(r("uShininess"),e.shininess).YL(r("uLightColor"),e.specularColor).YL(r("uAmbientColor"),e.ambientColor),h){var c=h.wireframeFillSolid,l=h.wireframeSolid;t.yB.YL(r("uWireframeColor"),c.getColor()).XL(r("uWireframeThickness"),l.getThickness())}"solid"===(null==o?void 0:o.fillMode)&&t.yB.YL(r("uColorDiffuse"),o.fillStyleSolid.getColor()),n.gridTileSizes.forEach((function(e){t.yB.VL(r("uTileDimensionsXZ"),["columns"===t.Vm.dataOrder?e.sizeHeatmapData.primary:e.sizeHeatmapData.secondary,"columns"===t.Vm.dataOrder?e.sizeHeatmapData.secondary:e.sizeHeatmapData.primary]).GL(r("uTileDimensions"),[e.sizeHeatmapData.primary,e.sizeHeatmapData.secondary]),e.tiles.forEach((function(s){var h,a,f=0,c=(s.sizeHeatmapDataVectors.primary-1)*(s.sizeHeatmapDataVectors.secondary-1);if(t.tR){var l=t.tR.fill.iFirstPrimary,d=t.tR.fill.iFirstPrimary+t.tR.fill.amountPrimary-1,v=s.iFirstVector.primary,y=s.iFirstVector.primary+s.sizeHeatmapDataVectors.primary-1;if(h=l,a=y,v>d||a<h)return;var S=function(t,i,n,e){return b(Math.max(t,n),Math.min(i,e))}(l,d,v,y);f=(S.min-s.iFirstVector.primary)*(e.sizeGeometryData.secondary-1),c=(S.max-S.min)*(e.sizeGeometryData.secondary-1)}if(!(f<0||c<=0)){if("intensity"===(null==o?void 0:o.fillMode)){var m=o.colorLookupTexture,g=o.fillStylePaletted;t.yB.KL(r("uLookupTexture"),m.texture,1).XL(r("uLookupMin"),g.getPalette().min).XL(r("uLookupMax"),g.getPalette().max).XL(r("uLookupTextureHeightPx"),m.textureHeight).KL(r("uTileIntensityValues"),s.intensityDataTexture,2).HL(r("uTileBoundsAxisXZ"),[s.startLocationAxis.x+("columns"===t.Vm.dataOrder&&t.nR||0),s.startLocationAxis.z+("rows"===t.Vm.dataOrder&&t.nR||0),s.sizeAxis.x,s.sizeAxis.z])}if("xyz"===(null==o?void 0:o.fillMode)){m=o.colorLookupTexture,g=o.fillStylePaletted;t.yB.KL(r("uLookupTexture"),m.texture,1).XL(r("uLookupMin"),g.getPalette().min).XL(r("uLookupMax"),g.getPalette().max).XL(r("uLookupTextureHeightPx"),m.textureHeight)}"phong"===t.xS.S().type&&s.normalmapTexture&&t.yB.KL(r("uNormalmapTexture"),s.normalmapTexture,3),t.yB.rI(n.rectangleLocationsBuffer,0,{location:u("aGeoCellOffset"),size:2},{location:u("aTriangleBary"),size:3}).ZL(r("uBaseInstance"),f).VL(r("uTileStartLocationAxisXZ"),[s.startLocationAxis.x+("columns"===t.Vm.dataOrder&&t.nR||0),s.startLocationAxis.z+("rows"===t.Vm.dataOrder&&t.nR||0)]).VL(r("uTileSizeAxisXZ"),[s.sizeAxis.x,s.sizeAxis.z]).KL(r("uHeightmapTexture"),s.heightmapDataTexture,0).cI(n.rectangleLocationsDrawMode,0,n.rectangleLocationsDrawLength,c),i.bindBuffer(i.ARRAY_BUFFER,null)}}))}))}))}return this},i.prototype.dispose=function(){var i=this;return t.prototype.dispose.call(this),this.q_.dispose(),this.gO.BI.uo(this.zD),this.zD=void 0,this.RD=void 0,this.eR&&(this.eR.gridTileSizes.forEach((function(t){})),this.eR.gridTiles.forEach((function(t){i.yB.KB(t.heightmapDataTexture),t.normalmapTexture&&i.yB.KB(t.normalmapTexture)})),this.yB.VI(this.eR.rectangleLocationsBuffer),this.eR=void 0),this.xP=void 0,this},i.prototype.restore=function(){return t.prototype.restore.call(this),this.q_.restore(),this},i.prototype.ZB=function(){return this.dispose(),this.q_.ZB(),this},i.prototype.HO=function(t,i){},i.prototype.Wm=function(t){return this.q_.Wm(t),this},i.prototype.Um=function(t){this.U_.push(t),uK(this.J_.gridTiles,t,(function(t){return t.heightmapData}));for(var i=t.startPrimary;i<t.startPrimary+t.lengthPrimary;i+=1)this.K_[i]=void 0;return this.X_=void 0,this},i.prototype.Hm=function(t){return this.PD.l(t),this},i.prototype.jm=function(){return this.PD.S()},i.prototype.$n=function(t){return this.Ho=yE(this.Ho,t),this.q_.$n(this.Ho),this},i.prototype.Qn=function(){return this.Ho},i.prototype.pa=function(t){return this.wa="function"==typeof t?t(this.wa):t,this},i.prototype.ka=function(){return this.wa},i.prototype.Et=function(){return this.Y_.max.x},i.prototype.zt=function(){return this.Y_.min.x},i.prototype.Vt=function(){var t=this.X_||this.oR();return this.X_=t,t.max},i.prototype.Nt=function(){var t=this.X_||this.oR();return this.X_=t,t.min},i.prototype.Ht=function(){return this.Y_.max.z},i.prototype.Gt=function(){return this.Y_.min.z},i.prototype.cu=function(){return 0},i.prototype.lu=function(){return 0},i.prototype.LS=function(){return 0},i.prototype.oR=function(){var t=this;if(this.X_)return this.X_;var i=this.tR?this.tR.fill.iFirstPrimary:0,n=this.tR?i+this.tR.fill.amountPrimary-1:this.Vm.primaryDimensionVectorsCount-1,e=Is,r=Os;return this.J_.gridTiles.forEach((function(s){for(var o=Math.max(i,s.iFirstUniqueVector.primary);o<=Math.min(n,s.iFirstUniqueVector.primary+s.sizeUniqueHeatmapDataVectors.primary-1);o+=1){var h=(o-s.iFirstUniqueVector.primary)*s.sizeHeatmapDataVectors.secondary,u=t.K_[o];if(u)e=e<u.min?e:u.min,r=r>u.max?r:u.max;else{u={min:Is,max:Os},t.K_[o]=u;for(var a=0;a<s.sizeHeatmapDataVectors.secondary;a+=1){var f=s.heightmapData[h+a];e=e<f?e:f,r=r>f?r:f,u.min=Math.min(u.min,f),u.max=Math.max(u.max,f)}}}})),this.X_={min:e,max:r},this.X_},i}(AK),NK=function(t){function i(i,n,r,s,o){var h=t.call(this,i,n,r,s)||this;h.w_="disabled",h.GD=0,h.jD={};var u={min:{x:o.start.x,z:o.start.z},max:{x:"rows"===o.scrollDimension?o.start.x+(o.columns-1)*o.step.x:o.start.x,z:"columns"===o.scrollDimension?o.start.z+(o.rows-1)*o.step.z:o.start.z}};h.Vm=e(e({},o),{initialBoundaries:u,scrollDimensionSize:"columns"===o.scrollDimension?o.columns:o.rows,staticDimensionSize:"columns"===o.scrollDimension?o.rows:o.columns}),h.Y_=u;var a=function(){return{shape:new EK(h.b_,Cr,Cr,h.fo,{columns:o.columns+("columns"===o.scrollDimension?1:0),rows:o.rows+("rows"===o.scrollDimension?1:0),start:{x:0,z:0},step:o.step,dataOrder:o.scrollDimension,heatmapDataType:"intensity"}).dispose(),hasData:!1}};return h.ic=[a(),a()],h}return n(i,t),i.prototype.Fe=function(t){return this.ic.forEach((function(i){i.shape.Fe(t)})),this},i.prototype.vB=function(){var t=this;return this.ic.forEach((function(i){i.hasData&&(i.shape.O_=t.O_,i.shape.P_=t.P_,i.shape.D_=t.D_,i.shape.vB())})),this},i.prototype.$h=function(){return this.GD=0,this.jD={},this.Y_=this.Vm.initialBoundaries,this.ic.forEach((function(t){t.shape.dispose(),t.shape.Z_=!1,t.hasData=!1})),this},i.prototype.Km=function(t){var i,n=this.isDisposed(),e=this.ic[0],r=this.ic[1],s=t.heightMapValues?t.heightMapValues.length:null===(i=t.intensityValues)||void 0===i?void 0:i.length,o=0;if(!s)return this;do{var h=Math.floor(this.GD/this.Vm.scrollDimensionSize)%this.ic.length,u=this.ic[h],a=this.GD%this.Vm.scrollDimensionSize,f=this.Vm.scrollDimensionSize-a,c=0===a,l=Math.min(f,s),d=a+l,v=a,y=v+1,S=o,m=o+l,b=this.GD>=this.Vm.scrollDimensionSize&&d<=this.Vm.scrollDimensionSize-1,g=c;if(c){var w="columns"===this.Vm.scrollDimension?this.Vm.start.x+(this.GD-1)*this.Vm.step.x:this.Vm.start.z+(this.GD-1)*this.Vm.step.z;u.shape.iR(w)}var p=b?0:1,k=d+(b?1:0);u.shape.Q_({fill:{iFirstPrimary:p,amountPrimary:k},wireframe:{iFirstPrimary:p,amountPrimary:k,connectNext:!1}});var x=u===e?r:e,M=d+1,A=1+this.Vm.scrollDimensionSize-M;x.shape.Q_({fill:{iFirstPrimary:M,amountPrimary:A},wireframe:{iFirstPrimary:M,amountPrimary:A-1,connectNext:!0}});var F={};if(t.heightMapValues){var T=t.heightMapValues.slice(S,m),C=!1;g&&this.jD.yValues&&(C=!0,T.splice(0,0,this.jD.yValues));var B={startPrimary:C?v:y,startSecondary:0,lengthPrimary:T.length,lengthSecondary:this.Vm.staticDimensionSize,values:T,type:"y"};u.shape.Um(B),u.hasData=!0,n||u.shape.restore(),F.yValues=T[l-1]}if(t.intensityValues){var L=t.intensityValues.slice(S,m),I=!1;g&&this.jD.intensityValues&&(I=!0,L.splice(0,0,this.jD.intensityValues));B={startPrimary:I?v:y,startSecondary:0,lengthPrimary:L.length,lengthSecondary:this.Vm.staticDimensionSize,values:L,type:"intensity"};u.shape.Wm(B),u.hasData=!0,n||u.shape.restore(),F.intensityValues=L[l-1]}this.GD+=l,o+=l,this.jD=F}while(o<s);return"columns"===this.Vm.scrollDimension?(this.Y_.min.x=this.Vm.start.x+Math.max(this.GD-this.Vm.scrollDimensionSize,0)*this.Vm.step.x,this.Y_.max.x=this.Vm.start.x+(this.GD-1)*this.Vm.step.x):(this.Y_.min.z=this.Vm.start.z+Math.max(this.GD-this.Vm.scrollDimensionSize,0)*this.Vm.step.z,this.Y_.max.z=this.Vm.start.z+(this.GD-1)*this.Vm.step.z),this},i.prototype.Hm=function(t){return this.ic.forEach((function(i){return i.shape.Hm(t)})),this},i.prototype.jm=function(){return this.ic[0].shape.jm()},i.prototype.$n=function(t){return this.ic.forEach((function(i){return i.shape.$n(t)})),this},i.prototype.Qn=function(){return this.ic[0].shape.Qn()},i.prototype.pa=function(t){return this.ic.forEach((function(i){return i.shape.pa(t)})),this},i.prototype.ka=function(){return this.ic[0].shape.ka()},i.prototype.ZB=function(){return this.dispose(),this.ic.forEach((function(t){return t.shape.ZB()})),this},i.prototype.HO=function(t,i){},i.prototype.dispose=function(){return t.prototype.dispose.call(this),this.ic.forEach((function(t){return t.shape.dispose()})),this},i.prototype.restore=function(){return t.prototype.restore.call(this),this.ic.forEach((function(t){return t.hasData&&t.shape.restore()})),this},i.prototype.FS=function(i){return t.prototype.FS.call(this,i),this.ic.forEach((function(t){return t.shape.FS(i)})),this},i.prototype.Et=function(){return this.Y_.max.x},i.prototype.zt=function(){return this.Y_.min.x},i.prototype.Vt=function(){return Math.max(this.ic[0].shape.Vt(),this.ic[1].shape.Vt())},i.prototype.Nt=function(){return Math.min(this.ic[0].shape.Nt(),this.ic[1].shape.Nt())},i.prototype.Ht=function(){return this.Y_.max.z},i.prototype.Gt=function(){return this.Y_.min.z},i.prototype.cu=function(){return 0},i.prototype.lu=function(){return 0},i.prototype.LS=function(){return 0},i}(AK),VK=function(t){function i(i,n,e){var r=t.call(this,i,n,e)||this;return r.gO=i,r.cL=new LX,r.gl=i.kO(),r.d_=r.n_,r}return n(i,t),i.prototype.f_=function(t,i,n){var e=this.hm({x:i,y:n});if(void 0!==e){var r,s=Array.from(t.values()).reduce((function(t,i){return t+(i.getMouseInteractions()&&!0!==i.kS.skipMousePicking?1:0)}),0),o=Is,h=0,u=!1;return t.forEach((function(t){var i=t.kS;if(t.getMouseInteractions()&&!u&&!0!==i.skipMousePicking){var n=!(h===s-1&&void 0===r||!0===i.overrideFollowing);h+=1;var a=t.HO(e,n);void 0!==a&&(a<o&&(o=a,r=t),i.overrideFollowing&&(u=!0))}})),r}},i.prototype.hR=function(){this.cL.vO(this.Rt.x),this.cL.yO(this.Rt.y),this.cL.SO(this.Rt.z)},i.prototype.uR=function(){var t=this.Rt.x.t||this.Rt.y.t||this.Rt.z.t;this.hR(),this.n_.forEach((function(i){return i.Fe(t)}))},i.prototype.wS=function(t){if(this.aR(),this.hR(),this.O_){var i=this.cL.uO(),n=y(i[0],i[1],i[2]),e=this.cL.aO(),r=y(e[0],e[1],e[2]),s=Ls.divideVec(Ls.subtractVec(t,n),r),o=this.O_,h=aY.multiply(o,[s.x,s.y,s.z,1]),u=l(h[0]/h[3],h[1]/h[3]),a=this.gI.S();return l(.5*(1+u.x)*a.width+a.x,.5*(1+u.y)*a.height+a.y)}},i.prototype.hm=function(t){var i=this.gI.S(),n=this.fR;if(i&&n){var e=this.P_.S(),r=this.cR,s=l(2*(t.x-i.x)/i.width-1,2*(t.y-i.y)/i.height-1),o=[s.x,s.y,-r,1],h=aY.multiply(n,o),u=y(h[0]/h[3],h[1]/h[3],h[2]/h[3]),a=e;if(Ls.length(u)>Ls.length(a)){var f=u;u=a,a=f}var c=Ls.normalize(Ls.subtractVec(u,a)),d=this.cL.aO(),v=this.cL.uO(),S=y(d[0],d[1],d[2]),m=y(v[0],v[1],v[2]),b=Ls.addVec(Ls.multiplyVec(a,S),m),g=Ls.addVec(a,Ls.multiply(c,1)),w=Ls.addVec(Ls.multiplyVec(g,S),m);return{origin:b,direction:Ls.normalize(Ls.subtractVec(w,b))}}},i.prototype.lR=function(t){var i=this.cL.uO(),n=this.cL.aO(),r=Ls.divideVec(Ls.subtractVec(t,{x:i[0],y:i[1],z:i[2]}),{x:n[0],y:n[1],z:n[2]});return e(e({},t),{x:r.x,y:r.y,z:r.z})},i.prototype.dR=function(t){var i=this.cL.uO(),n=this.cL.aO(),r=Ls.addVec(Ls.multiplyVec(t,{x:n[0],y:n[1],z:n[2]}),{x:i[0],y:i[1],z:i[2]});return e(e({},t),{x:r.x,y:r.y,z:r.z})},i.prototype.gS=function(t){return t/1e3},i.prototype.G_=function(){return.001},i.prototype.vB=function(){var t=this;this.vR=!1,this.Fe();var i=this.gI.S(),n=this.O_,e=this.P_.S(),r=this.D_;if(!i||!n)throw new Error("Layer3D viewport is not defined");if(!r)throw new Error("Layer3D light location is not defined");var s=[e.x,e.y,e.z],o=[r.x,r.y,r.z];return this.gl.gl.viewport(i.x*this.gl.uL(),i.y*this.gl.uL(),i.width*this.gl.uL(),i.height*this.gl.uL()),this.n_.forEach((function(i){i.O_=n,i.P_=s,i.D_=o,t.gl.II(i.w_),t.gl.TS(i.AS),i.vB()})),this.gl.II("disabled"),this.gl.TS(!1),this},i.prototype.US=function(t){return this.r_(new _K(this,this.s_,this.o_,[],t))},i.prototype.iS=function(t){return this.r_(new OK(this,this.s_,this.o_,t))},i.prototype.XS=function(){return this.r_(new zK(this,this.s_,this.o_,[]))},i.prototype.ES=function(){return this.r_(new FK(this,this.s_,this.o_,[]))},i.prototype.Dv=function(){return this.r_(new BK(this,this.s_,this.o_,[]))},i.prototype.Gm=function(t){return this.r_(new EK(this,this.s_,this.o_,[],t))},i.prototype.Zm=function(t){return this.r_(new NK(this,this.s_,this.o_,[],t))},i}(function(t){function i(i,n,e){var r=t.call(this,i,n)||this;return r.Rt=e,r.vR=!0,r.yR=45,r.cR=.1,r.SR=100,r.P_=w(y(0,0,1)),r.mR=w(y(0,0,-1)),r.bR=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],r.xS=new JV,r}return n(i,t),i.prototype.aR=function(){var t=this.e_.S();if(void 0!==t){var i=t.width/t.height;if(this.gR=aY.projectionPerspective(this.yR,i,this.cR,this.SR),this.P_.t||this.mR.t){if(this.P_.t){var n=this.P_.S();this.bR[12]=n.x,this.bR[13]=n.y,this.bR[14]=n.z}if(this.mR.t){var e=this.mR.S(),r=y(0,1,0),s=Ls.multiply(e,-1),o=Ls.normalize(Ls.cross(r,s)),h=Ls.normalize(Ls.cross(s,o));this.bR[0]=o.x,this.bR[1]=o.y,this.bR[2]=o.z,this.bR[4]=h.x,this.bR[5]=h.y,this.bR[6]=h.z,this.bR[8]=s.x,this.bR[9]=s.y,this.bR[10]=s.z}this.wR=aY.inverse(this.bR)}this.O_=aY.multiply(this.gR,this.wR),this.fR=aY.inverse(this.O_),this.e_.t=!1,this.P_.t=!1,this.mR.t=!1,this.vR=!0}},i.prototype.Fe=function(){return this.aR(),this.uR(),this},i.prototype.setCameraLocation=function(t){return this.P_.l(t),this},i.prototype.getCameraLocation=function(){return this.P_.S()},i.prototype.setCameraDirection=function(t){return this.mR.l(Ls.normalize(t)),this},i.prototype.getCameraDirection=function(){return this.mR.S()},i.prototype.setLightLocation=function(t){return this.D_=t,this},i.prototype.getLightLocation=function(){return this.D_},i.prototype.pR=function(){return!0===this.vR||this.e_.t||this.P_.t||this.mR.t},i.prototype.kR=function(){return y(this.bR[0],this.bR[1],this.bR[2])},i.prototype.xR=function(){return y(this.bR[4],this.bR[5],this.bR[6])},i}(yK)),GK=function(t){function i(i,n,e){var r,s,h;void 0===e&&(e=CX);var u=t.call(this,i,n)||this;u.hi=d(1,1),u.MR=!1,u.AR=0,u.V_=8*Math.pow(1024,2),u.xn=function(t){return void 0===t&&(t=!1),t&&(u.MR=!0),void 0===u.Gr&&(u.Gr=wr.requestAnimationFrame(u.FR)),u},u.FR=function(t){t-u.AR>=u.As||-1===u.As?(u.AR=t,u.MR=!1,u.Hr&&u.Hr(),u.Gr=void 0,-1!==u.As&&(u.Gr=u.MR?wr.requestAnimationFrame(u.FR):void 0),u.os(),u.jr&&u.jr()):u.Gr=wr.requestAnimationFrame(u.FR)},u.kO=function(){return u.yB},u.os=function(){var t,i;u.Us.oi(u.hi),u.es.t&&u.yB.bI(u.es.S()),u.yB.$h();try{for(var n=o(u.Er.values()),e=n.next();!e.done;e=n.next()){e.value.vB()}}catch(i){t={error:i}}finally{try{e&&!e.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}return u.bi(),u.Zr(),u.ls&&u.cs(u.ls),u},u.ho=function(){var t,i;try{for(var n=o(u.Er.values()),e=n.next();!e.done;e=n.next()){e.value.Fe()}}catch(i){t={error:i}}finally{try{e&&!e.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}return u.bi(),u},u.TR=wr.document.createElement("canvas");var a,f={preserveDrawingBuffer:!0,antialias:n?n.antialias:void 0,alpha:!0,lineAntialias:!n||(!0===n.lineAntiAlias||!1===n.lineAntiAlias?n.lineAntiAlias:!1!==n.antialias)};if("webgl1"!==(null===(r=null==n?void 0:n.webgl)||void 0===r?void 0:r.version)){var c=u.TR.getContext("webgl2",f);c&&(a=new e(u.ps,{type:"webgl2",ctx:c,antialias:f.antialias,lineAntialias:f.lineAntialias}))}if(!a&&"webgl2"!==(null===(s=null==n?void 0:n.webgl)||void 0===s?void 0:s.version)){var l=u.TR.getContext("webgl",f)||u.TR.getContext("experimental-webgl",f);a=new e(u.ps,{type:"webgl1",ctx:l,antialias:f.antialias,lineAntialias:f.lineAntialias})}if(!a)throw new yr("No WebGL context available."+((null===(h=null==n?void 0:n.webgl)||void 0===h?void 0:h.version)?"\nSelected explicit target: "+n.webgl.version:""));u.yB=a,u.BI=dY(u.yB.gl);var v=u.yB.EL;if(v.length>0){var y=wr.document.createElement("div");y.innerText="LightningChart JS: Some features might not work properly, due to missing WebGL features.",y.style.cssText="position:absolute;top:0;background:red;width:100%;padding:10px;text-align:center;color:white;z-index:1;";var S=wr.document.createElement("button");S.innerText="X",S.addEventListener("click",(function(){y.parentElement&&y.parentElement.removeChild(y)})),u.$r.appendChild(y),y.appendChild(S),console.warn("LightningChart JS - Following WebGL extensions could not be loaded:",v.join(", "))}var m=1;if(n&&n.devicePixelRatio)m=!0===n.devicePixelRatio?wr.devicePixelRatio||1:n.devicePixelRatio||1;else{var b=wr.document.head.querySelector('meta[name="viewport"]');b&&b.content.includes("width=device-width")&&(m=wr.devicePixelRatio||1)}u.yB.DI(m),u.TR.style.position="absolute",u.TR.style.top="0",u.TR.style.left="0",u.TR.style.right="0",u.TR.style.bottom="0",u.TR.style.width="100%",u.TR.style.height="100%",u.TR.style.boxSizing="content-box",u.$r.appendChild(u.TR);var g=n?n.width:void 0,w=n?n.height:void 0;u.Hs=u.CR(g),u.Ws=u.CR(w),u.BR(u.Hs,u.Ws);var p=(null==n?void 0:n.theme)||Gz;return u.LR=u.$v(0),u.Us=u.LR.Pc(u.Rt).$n(p.lcjsBackgroundFillStyle||p.dashboardBackgroundFillStyle||Re).Ys(p.lcjsBackgroundStrokeStyle||p.dashboardBackgroundStrokeStyle||ir).setMouseInteractions(!1).ph({x:0,y:0}),u.Jr(),u.Zr(),u}return n(i,t),Object.defineProperty(i.prototype,"IR",{get:function(){return this.Er},enumerable:!1,configurable:!0}),i.prototype.Ps=function(t,i){return function(t){for(var i=t.split(",")[0].split(":")[1].split(";")[0],n=wr.atob(t.split(",")[1]),e=new Uint8Array(n.length),r=0;r<n.length;r+=1)e[r]=n.charCodeAt(r);return new wr.Blob([e.buffer],{type:i})}(this.TR.toDataURL(t,i))},i.prototype.Ds=function(t,i,n){void 0===n&&(n=!1),this.Jr(l(Math.round(t),Math.round(i))),this.ss();var e=this.yB.gl.drawingBufferWidth,r=this.yB.gl.drawingBufferHeight,s=new Uint8Array(e*r*4);if(this.yB.gl.readPixels(0,0,e,r,this.yB.gl.RGBA,this.yB.gl.UNSIGNED_BYTE,s),!n)for(var o=r/2|0,h=4*e,u=new Uint8Array(4*e),a=0;a<o;a+=1){var f=a*h,c=(r-a-1)*h;u.set(s.subarray(f,f+h)),s.copyWithin(f,c,c+h),s.set(u,c)}return s},i.prototype.iB=function(t){return void 0!==this.Hs?this.Hs[0]=t:this.Hs=[t,void 0],this.$r.style.minWidth=this.Hs[0]+"px",this.Jr(),this},i.prototype.eB=function(t){return void 0!==this.Hs?this.Hs[1]=t:this.Hs=[void 0,t],this.$r.style.maxWidth=this.Hs[1]+"px",this.Jr(),this},i.prototype.sB=function(t){return void 0!==this.Ws?this.Ws[0]=t:this.Ws=[t,void 0],this.$r.style.minHeight=this.Ws[0]+"px",this.Jr(),this},i.prototype.hB=function(t){return void 0!==this.Ws?this.Ws[1]=t:this.Ws=[void 0,t],this.$r.style.maxHeight=this.Ws[1]+"px",this.Jr(),this},i.prototype.BR=function(t,i){return this.Hs=t,this.Ws=i,this.$r.style.minWidth=this.Hs[0]+"px",this.$r.style.maxWidth=this.Hs[1]+"px",this.$r.style.minHeight=this.Ws[0]+"px",this.$r.style.maxHeight=this.Ws[1]+"px",this.Jr(),this},i.prototype.$v=function(t){void 0===t&&(t=this.Js());var i=this.qs(t);if(!i)return this.hs(new bK(this,t));if(!(i instanceof bK))throw new Error("Unexpected Engine Layer error");return i},i.prototype.xC=function(t,i){if(void 0!==this.qs(t))throw new Error("GlEngine _createLayer3D zIndex is already reserved !");return this.hs(new VK(this,t,i))},i.prototype.vi=function(){return this.hi},i.prototype.CR=function(t){return t instanceof Array||(t=[t,t]),t},i.prototype.Kr=function(){return this.TR},i.prototype.Jr=function(t){this.OR("X","Width",t?t.x:void 0)+this.OR("Y","Height",t?t.y:void 0)>=1&&this.an.emit("resize",[this.hi.x,this.hi.y])},i.prototype.ro=function(){t.prototype.ro.call(this),this.TR.width=1,this.TR.height=1,this.TR&&(this.$r.removeChild(this.TR),this.TR=void 0,this.$r=void 0),Array.from(this.yB.RL.values()).forEach((function(t){t.ZB()})),Array.from(this.yB.zL.values()).forEach((function(t){t.dispose()})),this.yB._L.xB(),this.yB.ZI&&(this.yB.VI(this.yB.ZI.buffer),this.yB.ZI=void 0),this.yB.YI(),this.yB.gl=void 0},i.prototype.OR=function(t,i,n){var e=this.hi[t.toLowerCase()],r=n||this.$r["offset"+i]||e||1;return e!==r?(this.TR[i.toLowerCase()]=r*this.yB.uL(),this.hi[t.toLowerCase()]=r,this.Rt[t.toLowerCase()].xi(0,r).oi(r),1):0},i.prototype.$O=function(t,i,n){var e=this.BI,r=n;if(e.FB(t))t!==i&&(e.uo(i),r=e.S(t),e.Qh(t));else{r={};var s=this.vi(),o={x:1,y:this.yB.XB};r.textureHeight=o.y;var h=er.d2({scaleXYConstructor:Vo}).oi(o);h.x.xi(0,1),h.y.xi(t.min,t.max);var u=new $X(this,h,(function(){}),(function(){}),[]);u.$n(new Ne({color:t.color})),t.interpolate?u.l({columns:2,rows:t.length,start:{x:0,y:t.min},end:{x:1,y:t.max},pixelate:!1}).Ba((function(i,n,e){return{x:e.x,y:t.steps[i].value}})).Ta((function(i){return t.steps[i].color})):u.l({columns:1,rows:t.length,start:{x:0,y:t.min},end:{x:1,y:t.max},pixelate:!0}).Ba((function(i,n,e){return{x:e.x,y:i<t.steps.length-1?t.steps[i].value:i===t.steps.length-1?t.steps[i].value-h.y.getPixelSize():t.steps[t.steps.length-1].value}})).Ta((function(i){return t.steps[i].color})),r.texture=this.yB._I(null,this.yB.gl.RGBA,!1,!t.interpolate,o),this.yB.LI.vB((function(){u.vB()}),r.texture,o,void 0,s,this.es.S()),e.Qh({lut:t,textureInfo:r})}return r},i}(qz),HK={exports:{}};(function(t,i){function n(t,i){if(!t)throw new Error(i||"Assertion failed")}function e(t,i){t.super_=i;var n=function(){};n.prototype=i.prototype,t.prototype=new n,t.prototype.constructor=t}function r(t,i,n){if(r.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==i&&"be"!==i||(n=i,i=10),this.LL(t||0,i||10,n||"be"))}var s;"object"===M(t)?t.exports=r:i.BN=r,r.BN=r,r.wordSize=26;try{s=(void 0).Buffer}catch(t){}function o(t,i,e){for(var r=0,s=Math.min(t.length,e),o=0,h=i;h<s;h++){var u,a=t.charCodeAt(h)-48;r<<=4,r|=u=a>=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:a,o|=u}return n(!(240&o),"Invalid character in "+t),r}function h(t,i,e,r){for(var s=0,o=0,h=Math.min(t.length,e),u=i;u<h;u++){var a=t.charCodeAt(u)-48;s*=r,o=a>=49?a-49+10:a>=17?a-17+10:a,n(a>=0&&o<r,"Invalid character"),s+=o}return s}function u(t,i){t.words=i.words,t.length=i.length,t.negative=i.negative,t.red=i.red}if(r.isBN=function(t){return t instanceof r||null!==t&&"object"===M(t)&&t.constructor.wordSize===r.wordSize&&Array.isArray(t.words)},r.max=function(t,i){return t.cmp(i)>0?t:i},r.min=function(t,i){return t.cmp(i)<0?t:i},r.prototype.LL=function(t,i,e){if("number"==typeof t)return this.PR(t,i,e);if("object"===M(t))return this.DR(t,i,e);"hex"===i&&(i=16),n(i===(0|i)&&i>=2&&i<=36);var r=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&r++,16===i?this._R(t,r):this.RR(t,i,r),"-"===t[0]&&(this.negative=1),this.zR(),"le"===e&&this.DR(this.toArray(),i,e)},r.prototype.PR=function(t,i,e){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===e&&this.DR(this.toArray(),i,e)},r.prototype.DR=function(t,i,e){if(n("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var s,o,h=0;if("be"===e)for(r=t.length-1,s=0;r>=0;r-=3)o=t[r]|t[r-1]<<8|t[r-2]<<16,this.words[s]|=o<<h&67108863,this.words[s+1]=o>>>26-h&67108863,(h+=24)>=26&&(h-=26,s++);else if("le"===e)for(r=0,s=0;r<t.length;r+=3)o=t[r]|t[r+1]<<8|t[r+2]<<16,this.words[s]|=o<<h&67108863,this.words[s+1]=o>>>26-h&67108863,(h+=24)>=26&&(h-=26,s++);return this.zR()},r.prototype._R=function(t,i){this.length=Math.ceil((t.length-i)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var e,r,s=0;for(n=t.length-6,e=0;n>=i;n-=6)r=o(t,n,n+6),this.words[e]|=r<<s&67108863,this.words[e+1]|=r>>>26-s&4194303,(s+=24)>=26&&(s-=26,e++);n+6!==i&&(r=o(t,i,n+6),this.words[e]|=r<<s&67108863,this.words[e+1]|=r>>>26-s&4194303),this.zR()},r.prototype.RR=function(t,i,n){this.words=[0],this.length=1;for(var e=0,r=1;r<=67108863;r*=i)e++;e--,r=r/i|0;for(var s=t.length-n,o=s%e,u=Math.min(s,s-o)+n,a=0,f=n;f<u;f+=e)a=h(t,f,f+e,i),this.imuln(r),this.words[0]+a<67108864?this.words[0]+=a:this.ER(a);if(0!==o){var c=1;for(a=h(t,f,t.length,i),f=0;f<o;f++)c*=i;this.imuln(c),this.words[0]+a<67108864?this.words[0]+=a:this.ER(a)}},r.prototype.copy=function(t){t.words=new Array(this.length);for(var i=0;i<this.length;i++)t.words[i]=this.words[i];t.length=this.length,t.negative=this.negative,t.red=this.red},r.prototype.NR=function(t){u(t,this)},r.prototype.clone=function(){var t=new r(null);return this.copy(t),t},r.prototype.VR=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},r.prototype.zR=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this.GR()},r.prototype.GR=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{r.prototype[Symbol.for("nodejs.util.inspect.custom")]=a}catch(t){r.prototype.inspect=a}else r.prototype.inspect=a;function a(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],c=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(t,i,n){n.negative=i.negative^t.negative;var e=t.length+i.length|0;n.length=e,e=e-1|0;var r=0|t.words[0],s=0|i.words[0],o=r*s,h=67108863&o,u=o/67108864|0;n.words[0]=h;for(var a=1;a<e;a++){for(var f=u>>>26,c=67108863&u,l=Math.min(a,i.length-1),d=Math.max(0,a-t.length+1);d<=l;d++){var v=a-d|0;f+=(o=(r=0|t.words[v])*(s=0|i.words[d])+c)/67108864|0,c=67108863&o}n.words[a]=0|c,u=0|f}return 0!==u?n.words[a]=0|u:n.length--,n.zR()}r.prototype.toString=function(t,i){var e;if(i=0|i||1,16===(t=t||10)||"hex"===t){e="";for(var r=0,s=0,o=0;o<this.length;o++){var h=this.words[o],u=(16777215&(h<<r|s)).toString(16);e=0!=(s=h>>>24-r&16777215)||o!==this.length-1?f[6-u.length]+u+e:u+e,(r+=2)>=26&&(r-=26,o--)}for(0!==s&&(e=s.toString(16)+e);e.length%i!=0;)e="0"+e;return 0!==this.negative&&(e="-"+e),e}if(t===(0|t)&&t>=2&&t<=36){var a=c[t],d=l[t];e="";var v=this.clone();for(v.negative=0;!v.isZero();){var y=v.modrn(d).toString(t);e=(v=v.idivn(d)).isZero()?y+e:f[a-y.length]+y+e}for(this.isZero()&&(e="0"+e);e.length%i!=0;)e="0"+e;return 0!==this.negative&&(e="-"+e),e}n(!1,"Base should be between 2 and 36")},r.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},r.prototype.toJSON=function(){return this.toString(16,2)},s&&(r.prototype.toBuffer=function(t,i){return this.toArrayLike(s,t,i)}),r.prototype.toArray=function(t,i){return this.toArrayLike(Array,t,i)},r.prototype.toArrayLike=function(t,i,e){this.zR();var r=this.byteLength(),s=e||Math.max(1,r);n(r<=s,"byte array longer than desired length"),n(s>0,"Requested array length <= 0");var o=function(t,i){return t.allocUnsafe?t.allocUnsafe(i):new t(i)}(t,s);return this["_toArrayLike"+("le"===i?"LE":"BE")](o,r),o},r.prototype.HR=function(t,i){for(var n=0,e=0,r=0,s=0;r<this.length;r++){var o=this.words[r]<<s|e;t[n++]=255&o,n<t.length&&(t[n++]=o>>8&255),n<t.length&&(t[n++]=o>>16&255),6===s?(n<t.length&&(t[n++]=o>>24&255),e=0,s=0):(e=o>>>24,s+=2)}if(n<t.length)for(t[n++]=e;n<t.length;)t[n++]=0},r.prototype.jR=function(t,i){for(var n=t.length-1,e=0,r=0,s=0;r<this.length;r++){var o=this.words[r]<<s|e;t[n--]=255&o,n>=0&&(t[n--]=o>>8&255),n>=0&&(t[n--]=o>>16&255),6===s?(n>=0&&(t[n--]=o>>24&255),e=0,s=0):(e=o>>>24,s+=2)}if(n>=0)for(t[n--]=e;n>=0;)t[n--]=0},Math.clz32?r.prototype.WR=function(t){return 32-Math.clz32(t)}:r.prototype.WR=function(t){var i=t,n=0;return i>=4096&&(n+=13,i>>>=13),i>=64&&(n+=7,i>>>=7),i>=8&&(n+=4,i>>>=4),i>=2&&(n+=2,i>>>=2),n+i},r.prototype.UR=function(t){if(0===t)return 26;var i=t,n=0;return 0==(8191&i)&&(n+=13,i>>>=13),0==(127&i)&&(n+=7,i>>>=7),0==(15&i)&&(n+=4,i>>>=4),0==(3&i)&&(n+=2,i>>>=2),0==(1&i)&&n++,n},r.prototype.bitLength=function(){var t=this.words[this.length-1],i=this.WR(t);return 26*(this.length-1)+i},r.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,i=0;i<this.length;i++){var n=this.UR(this.words[i]);if(t+=n,26!==n)break}return t},r.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},r.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},r.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},r.prototype.isNeg=function(){return 0!==this.negative},r.prototype.neg=function(){return this.clone().ineg()},r.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},r.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var i=0;i<t.length;i++)this.words[i]=this.words[i]|t.words[i];return this.zR()},r.prototype.ior=function(t){return n(0==(this.negative|t.negative)),this.iuor(t)},r.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},r.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},r.prototype.iuand=function(t){var i;i=this.length>t.length?t:this;for(var n=0;n<i.length;n++)this.words[n]=this.words[n]&t.words[n];return this.length=i.length,this.zR()},r.prototype.iand=function(t){return n(0==(this.negative|t.negative)),this.iuand(t)},r.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},r.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},r.prototype.iuxor=function(t){var i,n;this.length>t.length?(i=this,n=t):(i=t,n=this);for(var e=0;e<n.length;e++)this.words[e]=i.words[e]^n.words[e];if(this!==i)for(;e<i.length;e++)this.words[e]=i.words[e];return this.length=i.length,this.zR()},r.prototype.ixor=function(t){return n(0==(this.negative|t.negative)),this.iuxor(t)},r.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},r.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},r.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var i=0|Math.ceil(t/26),e=t%26;this.VR(i),e>0&&i--;for(var r=0;r<i;r++)this.words[r]=67108863&~this.words[r];return e>0&&(this.words[r]=~this.words[r]&67108863>>26-e),this.zR()},r.prototype.notn=function(t){return this.clone().inotn(t)},r.prototype.setn=function(t,i){n("number"==typeof t&&t>=0);var e=t/26|0,r=t%26;return this.VR(e+1),this.words[e]=i?this.words[e]|1<<r:this.words[e]&~(1<<r),this.zR()},r.prototype.iadd=function(t){var i,n,e;if(0!==this.negative&&0===t.negative)return this.negative=0,i=this.isub(t),this.negative^=1,this.GR();if(0===this.negative&&0!==t.negative)return t.negative=0,i=this.isub(t),t.negative=1,i.GR();this.length>t.length?(n=this,e=t):(n=t,e=this);for(var r=0,s=0;s<e.length;s++)i=(0|n.words[s])+(0|e.words[s])+r,this.words[s]=67108863&i,r=i>>>26;for(;0!==r&&s<n.length;s++)i=(0|n.words[s])+r,this.words[s]=67108863&i,r=i>>>26;if(this.length=n.length,0!==r)this.words[this.length]=r,this.length++;else if(n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this},r.prototype.add=function(t){var i;return 0!==t.negative&&0===this.negative?(t.negative=0,i=this.sub(t),t.negative^=1,i):0===t.negative&&0!==this.negative?(this.negative=0,i=t.sub(this),this.negative=1,i):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},r.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var i=this.iadd(t);return t.negative=1,i.GR()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this.GR();var n,e,r=this.cmp(t);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;r>0?(n=this,e=t):(n=t,e=this);for(var s=0,o=0;o<e.length;o++)s=(i=(0|n.words[o])-(0|e.words[o])+s)>>26,this.words[o]=67108863&i;for(;0!==s&&o<n.length;o++)s=(i=(0|n.words[o])+s)>>26,this.words[o]=67108863&i;if(0===s&&o<n.length&&n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this.length=Math.max(this.length,o),n!==this&&(this.negative=1),this.zR()},r.prototype.sub=function(t){return this.clone().isub(t)};var v=function(t,i,n){var e,r,s,o=t.words,h=i.words,u=n.words,a=0,f=0|o[0],c=8191&f,l=f>>>13,d=0|o[1],v=8191&d,y=d>>>13,S=0|o[2],m=8191&S,b=S>>>13,g=0|o[3],w=8191&g,p=g>>>13,k=0|o[4],x=8191&k,M=k>>>13,A=0|o[5],F=8191&A,T=A>>>13,C=0|o[6],B=8191&C,L=C>>>13,I=0|o[7],O=8191&I,P=I>>>13,D=0|o[8],_=8191&D,R=D>>>13,z=0|o[9],E=8191&z,N=z>>>13,V=0|h[0],G=8191&V,H=V>>>13,j=0|h[1],W=8191&j,U=j>>>13,Y=0|h[2],X=8191&Y,Z=Y>>>13,K=0|h[3],q=8191&K,J=K>>>13,Q=0|h[4],$=8191&Q,tt=Q>>>13,it=0|h[5],nt=8191&it,et=it>>>13,rt=0|h[6],st=8191&rt,ot=rt>>>13,ht=0|h[7],ut=8191&ht,at=ht>>>13,ft=0|h[8],ct=8191&ft,lt=ft>>>13,dt=0|h[9],vt=8191&dt,yt=dt>>>13;n.negative=t.negative^i.negative,n.length=19;var St=(a+(e=Math.imul(c,G))|0)+((8191&(r=(r=Math.imul(c,H))+Math.imul(l,G)|0))<<13)|0;a=((s=Math.imul(l,H))+(r>>>13)|0)+(St>>>26)|0,St&=67108863,e=Math.imul(v,G),r=(r=Math.imul(v,H))+Math.imul(y,G)|0,s=Math.imul(y,H);var mt=(a+(e=e+Math.imul(c,W)|0)|0)+((8191&(r=(r=r+Math.imul(c,U)|0)+Math.imul(l,W)|0))<<13)|0;a=((s=s+Math.imul(l,U)|0)+(r>>>13)|0)+(mt>>>26)|0,mt&=67108863,e=Math.imul(m,G),r=(r=Math.imul(m,H))+Math.imul(b,G)|0,s=Math.imul(b,H),e=e+Math.imul(v,W)|0,r=(r=r+Math.imul(v,U)|0)+Math.imul(y,W)|0,s=s+Math.imul(y,U)|0;var bt=(a+(e=e+Math.imul(c,X)|0)|0)+((8191&(r=(r=r+Math.imul(c,Z)|0)+Math.imul(l,X)|0))<<13)|0;a=((s=s+Math.imul(l,Z)|0)+(r>>>13)|0)+(bt>>>26)|0,bt&=67108863,e=Math.imul(w,G),r=(r=Math.imul(w,H))+Math.imul(p,G)|0,s=Math.imul(p,H),e=e+Math.imul(m,W)|0,r=(r=r+Math.imul(m,U)|0)+Math.imul(b,W)|0,s=s+Math.imul(b,U)|0,e=e+Math.imul(v,X)|0,r=(r=r+Math.imul(v,Z)|0)+Math.imul(y,X)|0,s=s+Math.imul(y,Z)|0;var gt=(a+(e=e+Math.imul(c,q)|0)|0)+((8191&(r=(r=r+Math.imul(c,J)|0)+Math.imul(l,q)|0))<<13)|0;a=((s=s+Math.imul(l,J)|0)+(r>>>13)|0)+(gt>>>26)|0,gt&=67108863,e=Math.imul(x,G),r=(r=Math.imul(x,H))+Math.imul(M,G)|0,s=Math.imul(M,H),e=e+Math.imul(w,W)|0,r=(r=r+Math.imul(w,U)|0)+Math.imul(p,W)|0,s=s+Math.imul(p,U)|0,e=e+Math.imul(m,X)|0,r=(r=r+Math.imul(m,Z)|0)+Math.imul(b,X)|0,s=s+Math.imul(b,Z)|0,e=e+Math.imul(v,q)|0,r=(r=r+Math.imul(v,J)|0)+Math.imul(y,q)|0,s=s+Math.imul(y,J)|0;var wt=(a+(e=e+Math.imul(c,$)|0)|0)+((8191&(r=(r=r+Math.imul(c,tt)|0)+Math.imul(l,$)|0))<<13)|0;a=((s=s+Math.imul(l,tt)|0)+(r>>>13)|0)+(wt>>>26)|0,wt&=67108863,e=Math.imul(F,G),r=(r=Math.imul(F,H))+Math.imul(T,G)|0,s=Math.imul(T,H),e=e+Math.imul(x,W)|0,r=(r=r+Math.imul(x,U)|0)+Math.imul(M,W)|0,s=s+Math.imul(M,U)|0,e=e+Math.imul(w,X)|0,r=(r=r+Math.imul(w,Z)|0)+Math.imul(p,X)|0,s=s+Math.imul(p,Z)|0,e=e+Math.imul(m,q)|0,r=(r=r+Math.imul(m,J)|0)+Math.imul(b,q)|0,s=s+Math.imul(b,J)|0,e=e+Math.imul(v,$)|0,r=(r=r+Math.imul(v,tt)|0)+Math.imul(y,$)|0,s=s+Math.imul(y,tt)|0;var pt=(a+(e=e+Math.imul(c,nt)|0)|0)+((8191&(r=(r=r+Math.imul(c,et)|0)+Math.imul(l,nt)|0))<<13)|0;a=((s=s+Math.imul(l,et)|0)+(r>>>13)|0)+(pt>>>26)|0,pt&=67108863,e=Math.imul(B,G),r=(r=Math.imul(B,H))+Math.imul(L,G)|0,s=Math.imul(L,H),e=e+Math.imul(F,W)|0,r=(r=r+Math.imul(F,U)|0)+Math.imul(T,W)|0,s=s+Math.imul(T,U)|0,e=e+Math.imul(x,X)|0,r=(r=r+Math.imul(x,Z)|0)+Math.imul(M,X)|0,s=s+Math.imul(M,Z)|0,e=e+Math.imul(w,q)|0,r=(r=r+Math.imul(w,J)|0)+Math.imul(p,q)|0,s=s+Math.imul(p,J)|0,e=e+Math.imul(m,$)|0,r=(r=r+Math.imul(m,tt)|0)+Math.imul(b,$)|0,s=s+Math.imul(b,tt)|0,e=e+Math.imul(v,nt)|0,r=(r=r+Math.imul(v,et)|0)+Math.imul(y,nt)|0,s=s+Math.imul(y,et)|0;var kt=(a+(e=e+Math.imul(c,st)|0)|0)+((8191&(r=(r=r+Math.imul(c,ot)|0)+Math.imul(l,st)|0))<<13)|0;a=((s=s+Math.imul(l,ot)|0)+(r>>>13)|0)+(kt>>>26)|0,kt&=67108863,e=Math.imul(O,G),r=(r=Math.imul(O,H))+Math.imul(P,G)|0,s=Math.imul(P,H),e=e+Math.imul(B,W)|0,r=(r=r+Math.imul(B,U)|0)+Math.imul(L,W)|0,s=s+Math.imul(L,U)|0,e=e+Math.imul(F,X)|0,r=(r=r+Math.imul(F,Z)|0)+Math.imul(T,X)|0,s=s+Math.imul(T,Z)|0,e=e+Math.imul(x,q)|0,r=(r=r+Math.imul(x,J)|0)+Math.imul(M,q)|0,s=s+Math.imul(M,J)|0,e=e+Math.imul(w,$)|0,r=(r=r+Math.imul(w,tt)|0)+Math.imul(p,$)|0,s=s+Math.imul(p,tt)|0,e=e+Math.imul(m,nt)|0,r=(r=r+Math.imul(m,et)|0)+Math.imul(b,nt)|0,s=s+Math.imul(b,et)|0,e=e+Math.imul(v,st)|0,r=(r=r+Math.imul(v,ot)|0)+Math.imul(y,st)|0,s=s+Math.imul(y,ot)|0;var xt=(a+(e=e+Math.imul(c,ut)|0)|0)+((8191&(r=(r=r+Math.imul(c,at)|0)+Math.imul(l,ut)|0))<<13)|0;a=((s=s+Math.imul(l,at)|0)+(r>>>13)|0)+(xt>>>26)|0,xt&=67108863,e=Math.imul(_,G),r=(r=Math.imul(_,H))+Math.imul(R,G)|0,s=Math.imul(R,H),e=e+Math.imul(O,W)|0,r=(r=r+Math.imul(O,U)|0)+Math.imul(P,W)|0,s=s+Math.imul(P,U)|0,e=e+Math.imul(B,X)|0,r=(r=r+Math.imul(B,Z)|0)+Math.imul(L,X)|0,s=s+Math.imul(L,Z)|0,e=e+Math.imul(F,q)|0,r=(r=r+Math.imul(F,J)|0)+Math.imul(T,q)|0,s=s+Math.imul(T,J)|0,e=e+Math.imul(x,$)|0,r=(r=r+Math.imul(x,tt)|0)+Math.imul(M,$)|0,s=s+Math.imul(M,tt)|0,e=e+Math.imul(w,nt)|0,r=(r=r+Math.imul(w,et)|0)+Math.imul(p,nt)|0,s=s+Math.imul(p,et)|0,e=e+Math.imul(m,st)|0,r=(r=r+Math.imul(m,ot)|0)+Math.imul(b,st)|0,s=s+Math.imul(b,ot)|0,e=e+Math.imul(v,ut)|0,r=(r=r+Math.imul(v,at)|0)+Math.imul(y,ut)|0,s=s+Math.imul(y,at)|0;var Mt=(a+(e=e+Math.imul(c,ct)|0)|0)+((8191&(r=(r=r+Math.imul(c,lt)|0)+Math.imul(l,ct)|0))<<13)|0;a=((s=s+Math.imul(l,lt)|0)+(r>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,e=Math.imul(E,G),r=(r=Math.imul(E,H))+Math.imul(N,G)|0,s=Math.imul(N,H),e=e+Math.imul(_,W)|0,r=(r=r+Math.imul(_,U)|0)+Math.imul(R,W)|0,s=s+Math.imul(R,U)|0,e=e+Math.imul(O,X)|0,r=(r=r+Math.imul(O,Z)|0)+Math.imul(P,X)|0,s=s+Math.imul(P,Z)|0,e=e+Math.imul(B,q)|0,r=(r=r+Math.imul(B,J)|0)+Math.imul(L,q)|0,s=s+Math.imul(L,J)|0,e=e+Math.imul(F,$)|0,r=(r=r+Math.imul(F,tt)|0)+Math.imul(T,$)|0,s=s+Math.imul(T,tt)|0,e=e+Math.imul(x,nt)|0,r=(r=r+Math.imul(x,et)|0)+Math.imul(M,nt)|0,s=s+Math.imul(M,et)|0,e=e+Math.imul(w,st)|0,r=(r=r+Math.imul(w,ot)|0)+Math.imul(p,st)|0,s=s+Math.imul(p,ot)|0,e=e+Math.imul(m,ut)|0,r=(r=r+Math.imul(m,at)|0)+Math.imul(b,ut)|0,s=s+Math.imul(b,at)|0,e=e+Math.imul(v,ct)|0,r=(r=r+Math.imul(v,lt)|0)+Math.imul(y,ct)|0,s=s+Math.imul(y,lt)|0;var At=(a+(e=e+Math.imul(c,vt)|0)|0)+((8191&(r=(r=r+Math.imul(c,yt)|0)+Math.imul(l,vt)|0))<<13)|0;a=((s=s+Math.imul(l,yt)|0)+(r>>>13)|0)+(At>>>26)|0,At&=67108863,e=Math.imul(E,W),r=(r=Math.imul(E,U))+Math.imul(N,W)|0,s=Math.imul(N,U),e=e+Math.imul(_,X)|0,r=(r=r+Math.imul(_,Z)|0)+Math.imul(R,X)|0,s=s+Math.imul(R,Z)|0,e=e+Math.imul(O,q)|0,r=(r=r+Math.imul(O,J)|0)+Math.imul(P,q)|0,s=s+Math.imul(P,J)|0,e=e+Math.imul(B,$)|0,r=(r=r+Math.imul(B,tt)|0)+Math.imul(L,$)|0,s=s+Math.imul(L,tt)|0,e=e+Math.imul(F,nt)|0,r=(r=r+Math.imul(F,et)|0)+Math.imul(T,nt)|0,s=s+Math.imul(T,et)|0,e=e+Math.imul(x,st)|0,r=(r=r+Math.imul(x,ot)|0)+Math.imul(M,st)|0,s=s+Math.imul(M,ot)|0,e=e+Math.imul(w,ut)|0,r=(r=r+Math.imul(w,at)|0)+Math.imul(p,ut)|0,s=s+Math.imul(p,at)|0,e=e+Math.imul(m,ct)|0,r=(r=r+Math.imul(m,lt)|0)+Math.imul(b,ct)|0,s=s+Math.imul(b,lt)|0;var Ft=(a+(e=e+Math.imul(v,vt)|0)|0)+((8191&(r=(r=r+Math.imul(v,yt)|0)+Math.imul(y,vt)|0))<<13)|0;a=((s=s+Math.imul(y,yt)|0)+(r>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,e=Math.imul(E,X),r=(r=Math.imul(E,Z))+Math.imul(N,X)|0,s=Math.imul(N,Z),e=e+Math.imul(_,q)|0,r=(r=r+Math.imul(_,J)|0)+Math.imul(R,q)|0,s=s+Math.imul(R,J)|0,e=e+Math.imul(O,$)|0,r=(r=r+Math.imul(O,tt)|0)+Math.imul(P,$)|0,s=s+Math.imul(P,tt)|0,e=e+Math.imul(B,nt)|0,r=(r=r+Math.imul(B,et)|0)+Math.imul(L,nt)|0,s=s+Math.imul(L,et)|0,e=e+Math.imul(F,st)|0,r=(r=r+Math.imul(F,ot)|0)+Math.imul(T,st)|0,s=s+Math.imul(T,ot)|0,e=e+Math.imul(x,ut)|0,r=(r=r+Math.imul(x,at)|0)+Math.imul(M,ut)|0,s=s+Math.imul(M,at)|0,e=e+Math.imul(w,ct)|0,r=(r=r+Math.imul(w,lt)|0)+Math.imul(p,ct)|0,s=s+Math.imul(p,lt)|0;var Tt=(a+(e=e+Math.imul(m,vt)|0)|0)+((8191&(r=(r=r+Math.imul(m,yt)|0)+Math.imul(b,vt)|0))<<13)|0;a=((s=s+Math.imul(b,yt)|0)+(r>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,e=Math.imul(E,q),r=(r=Math.imul(E,J))+Math.imul(N,q)|0,s=Math.imul(N,J),e=e+Math.imul(_,$)|0,r=(r=r+Math.imul(_,tt)|0)+Math.imul(R,$)|0,s=s+Math.imul(R,tt)|0,e=e+Math.imul(O,nt)|0,r=(r=r+Math.imul(O,et)|0)+Math.imul(P,nt)|0,s=s+Math.imul(P,et)|0,e=e+Math.imul(B,st)|0,r=(r=r+Math.imul(B,ot)|0)+Math.imul(L,st)|0,s=s+Math.imul(L,ot)|0,e=e+Math.imul(F,ut)|0,r=(r=r+Math.imul(F,at)|0)+Math.imul(T,ut)|0,s=s+Math.imul(T,at)|0,e=e+Math.imul(x,ct)|0,r=(r=r+Math.imul(x,lt)|0)+Math.imul(M,ct)|0,s=s+Math.imul(M,lt)|0;var Ct=(a+(e=e+Math.imul(w,vt)|0)|0)+((8191&(r=(r=r+Math.imul(w,yt)|0)+Math.imul(p,vt)|0))<<13)|0;a=((s=s+Math.imul(p,yt)|0)+(r>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,e=Math.imul(E,$),r=(r=Math.imul(E,tt))+Math.imul(N,$)|0,s=Math.imul(N,tt),e=e+Math.imul(_,nt)|0,r=(r=r+Math.imul(_,et)|0)+Math.imul(R,nt)|0,s=s+Math.imul(R,et)|0,e=e+Math.imul(O,st)|0,r=(r=r+Math.imul(O,ot)|0)+Math.imul(P,st)|0,s=s+Math.imul(P,ot)|0,e=e+Math.imul(B,ut)|0,r=(r=r+Math.imul(B,at)|0)+Math.imul(L,ut)|0,s=s+Math.imul(L,at)|0,e=e+Math.imul(F,ct)|0,r=(r=r+Math.imul(F,lt)|0)+Math.imul(T,ct)|0,s=s+Math.imul(T,lt)|0;var Bt=(a+(e=e+Math.imul(x,vt)|0)|0)+((8191&(r=(r=r+Math.imul(x,yt)|0)+Math.imul(M,vt)|0))<<13)|0;a=((s=s+Math.imul(M,yt)|0)+(r>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,e=Math.imul(E,nt),r=(r=Math.imul(E,et))+Math.imul(N,nt)|0,s=Math.imul(N,et),e=e+Math.imul(_,st)|0,r=(r=r+Math.imul(_,ot)|0)+Math.imul(R,st)|0,s=s+Math.imul(R,ot)|0,e=e+Math.imul(O,ut)|0,r=(r=r+Math.imul(O,at)|0)+Math.imul(P,ut)|0,s=s+Math.imul(P,at)|0,e=e+Math.imul(B,ct)|0,r=(r=r+Math.imul(B,lt)|0)+Math.imul(L,ct)|0,s=s+Math.imul(L,lt)|0;var Lt=(a+(e=e+Math.imul(F,vt)|0)|0)+((8191&(r=(r=r+Math.imul(F,yt)|0)+Math.imul(T,vt)|0))<<13)|0;a=((s=s+Math.imul(T,yt)|0)+(r>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,e=Math.imul(E,st),r=(r=Math.imul(E,ot))+Math.imul(N,st)|0,s=Math.imul(N,ot),e=e+Math.imul(_,ut)|0,r=(r=r+Math.imul(_,at)|0)+Math.imul(R,ut)|0,s=s+Math.imul(R,at)|0,e=e+Math.imul(O,ct)|0,r=(r=r+Math.imul(O,lt)|0)+Math.imul(P,ct)|0,s=s+Math.imul(P,lt)|0;var It=(a+(e=e+Math.imul(B,vt)|0)|0)+((8191&(r=(r=r+Math.imul(B,yt)|0)+Math.imul(L,vt)|0))<<13)|0;a=((s=s+Math.imul(L,yt)|0)+(r>>>13)|0)+(It>>>26)|0,It&=67108863,e=Math.imul(E,ut),r=(r=Math.imul(E,at))+Math.imul(N,ut)|0,s=Math.imul(N,at),e=e+Math.imul(_,ct)|0,r=(r=r+Math.imul(_,lt)|0)+Math.imul(R,ct)|0,s=s+Math.imul(R,lt)|0;var Ot=(a+(e=e+Math.imul(O,vt)|0)|0)+((8191&(r=(r=r+Math.imul(O,yt)|0)+Math.imul(P,vt)|0))<<13)|0;a=((s=s+Math.imul(P,yt)|0)+(r>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,e=Math.imul(E,ct),r=(r=Math.imul(E,lt))+Math.imul(N,ct)|0,s=Math.imul(N,lt);var Pt=(a+(e=e+Math.imul(_,vt)|0)|0)+((8191&(r=(r=r+Math.imul(_,yt)|0)+Math.imul(R,vt)|0))<<13)|0;a=((s=s+Math.imul(R,yt)|0)+(r>>>13)|0)+(Pt>>>26)|0,Pt&=67108863;var Dt=(a+(e=Math.imul(E,vt))|0)+((8191&(r=(r=Math.imul(E,yt))+Math.imul(N,vt)|0))<<13)|0;return a=((s=Math.imul(N,yt))+(r>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,u[0]=St,u[1]=mt,u[2]=bt,u[3]=gt,u[4]=wt,u[5]=pt,u[6]=kt,u[7]=xt,u[8]=Mt,u[9]=At,u[10]=Ft,u[11]=Tt,u[12]=Ct,u[13]=Bt,u[14]=Lt,u[15]=It,u[16]=Ot,u[17]=Pt,u[18]=Dt,0!==a&&(u[19]=a,n.length++),n};function y(t,i,n){n.negative=i.negative^t.negative,n.length=t.length+i.length;for(var e=0,r=0,s=0;s<n.length-1;s++){var o=r;r=0;for(var h=67108863&e,u=Math.min(s,i.length-1),a=Math.max(0,s-t.length+1);a<=u;a++){var f=s-a,c=(0|t.words[f])*(0|i.words[a]),l=67108863&c;h=67108863&(l=l+h|0),r+=(o=(o=o+(c/67108864|0)|0)+(l>>>26)|0)>>>26,o&=67108863}n.words[s]=h,e=o,o=r}return 0!==e?n.words[s]=e:n.length--,n.zR()}function S(t,i,n){return y(t,i,n)}Math.imul||(v=d),r.prototype.mulTo=function(t,i){var n=this.length+t.length;return 10===this.length&&10===t.length?v(this,t,i):n<63?d(this,t,i):n<1024?y(this,t,i):S(this,t,i)},r.prototype.mul=function(t){var i=new r(null);return i.words=new Array(this.length+t.length),this.mulTo(t,i)},r.prototype.mulf=function(t){var i=new r(null);return i.words=new Array(this.length+t.length),S(this,t,i)},r.prototype.imul=function(t){return this.clone().mulTo(t,this)},r.prototype.imuln=function(t){var i=t<0;i&&(t=-t),n("number"==typeof t),n(t<67108864);for(var e=0,r=0;r<this.length;r++){var s=(0|this.words[r])*t,o=(67108863&s)+(67108863&e);e>>=26,e+=s/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),i?this.ineg():this},r.prototype.muln=function(t){return this.clone().imuln(t)},r.prototype.sqr=function(){return this.mul(this)},r.prototype.isqr=function(){return this.imul(this.clone())},r.prototype.pow=function(t){var i=function(t){for(var i=new Array(t.bitLength()),n=0;n<i.length;n++){var e=n/26|0,r=n%26;i[n]=t.words[e]>>>r&1}return i}(t);if(0===i.length)return new r(1);for(var n=this,e=0;e<i.length&&0===i[e];e++,n=n.sqr());if(++e<i.length)for(var s=n.sqr();e<i.length;e++,s=s.sqr())0!==i[e]&&(n=n.mul(s));return n},r.prototype.iushln=function(t){n("number"==typeof t&&t>=0);var i,e=t%26,r=(t-e)/26,s=67108863>>>26-e<<26-e;if(0!==e){var o=0;for(i=0;i<this.length;i++){var h=this.words[i]&s,u=(0|this.words[i])-h<<e;this.words[i]=u|o,o=h>>>26-e}o&&(this.words[i]=o,this.length++)}if(0!==r){for(i=this.length-1;i>=0;i--)this.words[i+r]=this.words[i];for(i=0;i<r;i++)this.words[i]=0;this.length+=r}return this.zR()},r.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},r.prototype.iushrn=function(t,i,e){var r;n("number"==typeof t&&t>=0),r=i?(i-i%26)/26:0;var s=t%26,o=Math.min((t-s)/26,this.length),h=67108863^67108863>>>s<<s,u=e;if(r-=o,r=Math.max(0,r),u){for(var a=0;a<o;a++)u.words[a]=this.words[a];u.length=o}if(0===o);else if(this.length>o)for(this.length-=o,a=0;a<this.length;a++)this.words[a]=this.words[a+o];else this.words[0]=0,this.length=1;var f=0;for(a=this.length-1;a>=0&&(0!==f||a>=r);a--){var c=0|this.words[a];this.words[a]=f<<26-s|c>>>s,f=c&h}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.zR()},r.prototype.ishrn=function(t,i,e){return n(0===this.negative),this.iushrn(t,i,e)},r.prototype.shln=function(t){return this.clone().ishln(t)},r.prototype.ushln=function(t){return this.clone().iushln(t)},r.prototype.shrn=function(t){return this.clone().ishrn(t)},r.prototype.ushrn=function(t){return this.clone().iushrn(t)},r.prototype.testn=function(t){n("number"==typeof t&&t>=0);var i=t%26,e=(t-i)/26,r=1<<i;return!(this.length<=e||!(this.words[e]&r))},r.prototype.imaskn=function(t){n("number"==typeof t&&t>=0);var i=t%26,e=(t-i)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=e)return this;if(0!==i&&e++,this.length=Math.min(e,this.length),0!==i){var r=67108863^67108863>>>i<<i;this.words[this.length-1]&=r}return this.zR()},r.prototype.maskn=function(t){return this.clone().imaskn(t)},r.prototype.iaddn=function(t){return n("number"==typeof t),n(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<=t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this.ER(t)},r.prototype.ER=function(t){this.words[0]+=t;for(var i=0;i<this.length&&this.words[i]>=67108864;i++)this.words[i]-=67108864,i===this.length-1?this.words[i+1]=1:this.words[i+1]++;return this.length=Math.max(this.length,i+1),this},r.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var i=0;i<this.length&&this.words[i]<0;i++)this.words[i]+=67108864,this.words[i+1]-=1;return this.zR()},r.prototype.addn=function(t){return this.clone().iaddn(t)},r.prototype.subn=function(t){return this.clone().isubn(t)},r.prototype.iabs=function(){return this.negative=0,this},r.prototype.abs=function(){return this.clone().iabs()},r.prototype.YR=function(t,i,e){var r,s,o=t.length+e;this.VR(o);var h=0;for(r=0;r<t.length;r++){s=(0|this.words[r+e])+h;var u=(0|t.words[r])*i;h=((s-=67108863&u)>>26)-(u/67108864|0),this.words[r+e]=67108863&s}for(;r<this.length-e;r++)h=(s=(0|this.words[r+e])+h)>>26,this.words[r+e]=67108863&s;if(0===h)return this.zR();for(n(-1===h),h=0,r=0;r<this.length;r++)h=(s=-(0|this.words[r])+h)>>26,this.words[r]=67108863&s;return this.negative=1,this.zR()},r.prototype.XR=function(t,i){var n=(this.length,t.length),e=this.clone(),s=t,o=0|s.words[s.length-1];0!=(n=26-this.WR(o))&&(s=s.ushln(n),e.iushln(n),o=0|s.words[s.length-1]);var h,u=e.length-s.length;if("mod"!==i){(h=new r(null)).length=u+1,h.words=new Array(h.length);for(var a=0;a<h.length;a++)h.words[a]=0}var f=e.clone().YR(s,1,u);0===f.negative&&(e=f,h&&(h.words[u]=1));for(var c=u-1;c>=0;c--){var l=67108864*(0|e.words[s.length+c])+(0|e.words[s.length+c-1]);for(l=Math.min(l/o|0,67108863),e.YR(s,l,c);0!==e.negative;)l--,e.negative=0,e.YR(s,1,c),e.isZero()||(e.negative^=1);h&&(h.words[c]=l)}return h&&h.zR(),e.zR(),"div"!==i&&0!==n&&e.iushrn(n),{div:h||null,mod:e}},r.prototype.divmod=function(t,i,e){return n(!t.isZero()),this.isZero()?{div:new r(0),mod:new r(0)}:0!==this.negative&&0===t.negative?(h=this.neg().divmod(t,i),"mod"!==i&&(s=h.div.neg()),"div"!==i&&(o=h.mod.neg(),e&&0!==o.negative&&o.iadd(t)),{div:s,mod:o}):0===this.negative&&0!==t.negative?(h=this.divmod(t.neg(),i),"mod"!==i&&(s=h.div.neg()),{div:s,mod:h.mod}):0!=(this.negative&t.negative)?(h=this.neg().divmod(t.neg(),i),"div"!==i&&(o=h.mod.neg(),e&&0!==o.negative&&o.isub(t)),{div:h.div,mod:o}):t.length>this.length||this.cmp(t)<0?{div:new r(0),mod:this}:1===t.length?"div"===i?{div:this.divn(t.words[0]),mod:null}:"mod"===i?{div:null,mod:new r(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new r(this.modrn(t.words[0]))}:this.XR(t,i);var s,o,h},r.prototype.div=function(t){return this.divmod(t,"div",!1).div},r.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},r.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},r.prototype.divRound=function(t){var i=this.divmod(t);if(i.mod.isZero())return i.div;var n=0!==i.div.negative?i.mod.isub(t):i.mod,e=t.ushrn(1),r=t.andln(1),s=n.cmp(e);return s<0||1===r&&0===s?i.div:0!==i.div.negative?i.div.isubn(1):i.div.iaddn(1)},r.prototype.modrn=function(t){var i=t<0;i&&(t=-t),n(t<=67108863);for(var e=(1<<26)%t,r=0,s=this.length-1;s>=0;s--)r=(e*r+(0|this.words[s]))%t;return i?-r:r},r.prototype.modn=function(t){return this.modrn(t)},r.prototype.idivn=function(t){var i=t<0;i&&(t=-t),n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var s=(0|this.words[r])+67108864*e;this.words[r]=s/t|0,e=s%t}return this.zR(),i?this.ineg():this},r.prototype.divn=function(t){return this.clone().idivn(t)},r.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var i=this,e=t.clone();i=0!==i.negative?i.umod(t):i.clone();for(var s=new r(1),o=new r(0),h=new r(0),u=new r(1),a=0;i.isEven()&&e.isEven();)i.iushrn(1),e.iushrn(1),++a;for(var f=e.clone(),c=i.clone();!i.isZero();){for(var l=0,d=1;0==(i.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(i.iushrn(l);l-- >0;)(s.isOdd()||o.isOdd())&&(s.iadd(f),o.isub(c)),s.iushrn(1),o.iushrn(1);for(var v=0,y=1;0==(e.words[0]&y)&&v<26;++v,y<<=1);if(v>0)for(e.iushrn(v);v-- >0;)(h.isOdd()||u.isOdd())&&(h.iadd(f),u.isub(c)),h.iushrn(1),u.iushrn(1);i.cmp(e)>=0?(i.isub(e),s.isub(h),o.isub(u)):(e.isub(i),h.isub(s),u.isub(o))}return{a:h,b:u,gcd:e.iushln(a)}},r.prototype.ZR=function(t){n(0===t.negative),n(!t.isZero());var i=this,e=t.clone();i=0!==i.negative?i.umod(t):i.clone();for(var s,o=new r(1),h=new r(0),u=e.clone();i.cmpn(1)>0&&e.cmpn(1)>0;){for(var a=0,f=1;0==(i.words[0]&f)&&a<26;++a,f<<=1);if(a>0)for(i.iushrn(a);a-- >0;)o.isOdd()&&o.iadd(u),o.iushrn(1);for(var c=0,l=1;0==(e.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(e.iushrn(c);c-- >0;)h.isOdd()&&h.iadd(u),h.iushrn(1);i.cmp(e)>=0?(i.isub(e),o.isub(h)):(e.isub(i),h.isub(o))}return(s=0===i.cmpn(1)?o:h).cmpn(0)<0&&s.iadd(t),s},r.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var i=this.clone(),n=t.clone();i.negative=0,n.negative=0;for(var e=0;i.isEven()&&n.isEven();e++)i.iushrn(1),n.iushrn(1);for(;;){for(;i.isEven();)i.iushrn(1);for(;n.isEven();)n.iushrn(1);var r=i.cmp(n);if(r<0){var s=i;i=n,n=s}else if(0===r||0===n.cmpn(1))break;i.isub(n)}return n.iushln(e)},r.prototype.invm=function(t){return this.egcd(t).a.umod(t)},r.prototype.isEven=function(){return 0==(1&this.words[0])},r.prototype.isOdd=function(){return 1==(1&this.words[0])},r.prototype.andln=function(t){return this.words[0]&t},r.prototype.bincn=function(t){n("number"==typeof t);var i=t%26,e=(t-i)/26,r=1<<i;if(this.length<=e)return this.VR(e+1),this.words[e]|=r,this;for(var s=r,o=e;0!==s&&o<this.length;o++){var h=0|this.words[o];s=(h+=s)>>>26,h&=67108863,this.words[o]=h}return 0!==s&&(this.words[o]=s,this.length++),this},r.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},r.prototype.cmpn=function(t){var i,e=t<0;if(0!==this.negative&&!e)return-1;if(0===this.negative&&e)return 1;if(this.zR(),this.length>1)i=1;else{e&&(t=-t),n(t<=67108863,"Number is too big");var r=0|this.words[0];i=r===t?0:r<t?-1:1}return 0!==this.negative?0|-i:i},r.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var i=this.ucmp(t);return 0!==this.negative?0|-i:i},r.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var i=0,n=this.length-1;n>=0;n--){var e=0|this.words[n],r=0|t.words[n];if(e!==r){e<r?i=-1:e>r&&(i=1);break}}return i},r.prototype.gtn=function(t){return 1===this.cmpn(t)},r.prototype.gt=function(t){return 1===this.cmp(t)},r.prototype.gten=function(t){return this.cmpn(t)>=0},r.prototype.gte=function(t){return this.cmp(t)>=0},r.prototype.ltn=function(t){return-1===this.cmpn(t)},r.prototype.lt=function(t){return-1===this.cmp(t)},r.prototype.lten=function(t){return this.cmpn(t)<=0},r.prototype.lte=function(t){return this.cmp(t)<=0},r.prototype.eqn=function(t){return 0===this.cmpn(t)},r.prototype.eq=function(t){return 0===this.cmp(t)},r.red=function(t){return new x(t)},r.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this).KR(t)},r.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},r.prototype.KR=function(t){return this.red=t,this},r.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this.KR(t)},r.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},r.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},r.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},r.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},r.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},r.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red.qR(this,t),this.red.mul(this,t)},r.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red.qR(this,t),this.red.imul(this,t)},r.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red.JR(this),this.red.sqr(this)},r.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red.JR(this),this.red.isqr(this)},r.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red.JR(this),this.red.sqrt(this)},r.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red.JR(this),this.red.invm(this)},r.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red.JR(this),this.red.neg(this)},r.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red.JR(this),this.red.pow(this,t)};var m={k256:null,p224:null,p192:null,p25519:null};function b(t,i){this.name=t,this.p=new r(i,16),this.n=this.p.bitLength(),this.k=new r(1).iushln(this.n).isub(this.p),this.tmp=this.QR()}function g(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function p(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function k(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(t){if("string"==typeof t){var i=r.$R(t);this.m=i.p,this.prime=i}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function A(t){x.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new r(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r.ZR(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}b.prototype.QR=function(){var t=new r(null);return t.words=new Array(Math.ceil(this.n/13)),t},b.prototype.ireduce=function(t){var i,n=t;do{this.split(n,this.tmp),i=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(i>this.n);var e=i<this.n?-1:n.ucmp(this.p);return 0===e?(n.words[0]=0,n.length=1):e>0?n.isub(this.p):void 0!==n.strip?n.strip():n.zR(),n},b.prototype.split=function(t,i){t.iushrn(this.n,0,i)},b.prototype.imulK=function(t){return t.imul(this.k)},e(g,b),g.prototype.split=function(t,i){for(var n=4194303,e=Math.min(t.length,9),r=0;r<e;r++)i.words[r]=t.words[r];if(i.length=e,t.length<=9)return t.words[0]=0,void(t.length=1);var s=t.words[9];for(i.words[i.length++]=s&n,r=10;r<t.length;r++){var o=0|t.words[r];t.words[r-10]=(o&n)<<4|s>>>22,s=o}s>>>=22,t.words[r-10]=s,0===s&&t.length>10?t.length-=10:t.length-=9},g.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var i=0,n=0;n<t.length;n++){var e=0|t.words[n];i+=977*e,t.words[n]=67108863&i,i=64*e+(i/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},e(w,b),e(p,b),e(k,b),k.prototype.imulK=function(t){for(var i=0,n=0;n<t.length;n++){var e=19*(0|t.words[n])+i,r=67108863&e;e>>>=26,t.words[n]=r,i=e}return 0!==i&&(t.words[t.length++]=i),t},r.$R=function(t){if(m[t])return m[t];var i;if("k256"===t)i=new g;else if("p224"===t)i=new w;else if("p192"===t)i=new p;else{if("p25519"!==t)throw new Error("Unknown prime "+t);i=new k}return m[t]=i,i},x.prototype.JR=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},x.prototype.qR=function(t,i){n(0==(t.negative|i.negative),"red works only with positives"),n(t.red&&t.red===i.red,"red works only with red numbers")},x.prototype.imod=function(t){return this.prime?this.prime.ireduce(t).KR(this):(u(t,t.umod(this.m).KR(this)),t)},x.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t).KR(this)},x.prototype.add=function(t,i){this.qR(t,i);var n=t.add(i);return n.cmp(this.m)>=0&&n.isub(this.m),n.KR(this)},x.prototype.iadd=function(t,i){this.qR(t,i);var n=t.iadd(i);return n.cmp(this.m)>=0&&n.isub(this.m),n},x.prototype.sub=function(t,i){this.qR(t,i);var n=t.sub(i);return n.cmpn(0)<0&&n.iadd(this.m),n.KR(this)},x.prototype.isub=function(t,i){this.qR(t,i);var n=t.isub(i);return n.cmpn(0)<0&&n.iadd(this.m),n},x.prototype.shl=function(t,i){return this.JR(t),this.imod(t.ushln(i))},x.prototype.imul=function(t,i){return this.qR(t,i),this.imod(t.imul(i))},x.prototype.mul=function(t,i){return this.qR(t,i),this.imod(t.mul(i))},x.prototype.isqr=function(t){return this.imul(t,t.clone())},x.prototype.sqr=function(t){return this.mul(t,t)},x.prototype.sqrt=function(t){if(t.isZero())return t.clone();var i=this.m.andln(3);if(n(i%2==1),3===i){var e=this.m.add(new r(1)).iushrn(2);return this.pow(t,e)}for(var s=this.m.subn(1),o=0;!s.isZero()&&0===s.andln(1);)o++,s.iushrn(1);n(!s.isZero());var h=new r(1).toRed(this),u=h.redNeg(),a=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new r(2*f*f).toRed(this);0!==this.pow(f,a).cmp(u);)f.redIAdd(u);for(var c=this.pow(f,s),l=this.pow(t,s.addn(1).iushrn(1)),d=this.pow(t,s),v=o;0!==d.cmp(h);){for(var y=d,S=0;0!==y.cmp(h);S++)y=y.redSqr();n(S<v);var m=this.pow(c,new r(1).iushln(v-S-1));l=l.redMul(m),c=m.redSqr(),d=d.redMul(c),v=S}return l},x.prototype.invm=function(t){var i=t.ZR(this.m);return 0!==i.negative?(i.negative=0,this.imod(i).redNeg()):this.imod(i)},x.prototype.pow=function(t,i){if(i.isZero())return new r(1).toRed(this);if(0===i.cmpn(1))return t.clone();var n=new Array(16);n[0]=new r(1).toRed(this),n[1]=t;for(var e=2;e<n.length;e++)n[e]=this.mul(n[e-1],t);var s=n[0],o=0,h=0,u=i.bitLength()%26;for(0===u&&(u=26),e=i.length-1;e>=0;e--){for(var a=i.words[e],f=u-1;f>=0;f--){var c=a>>f&1;s!==n[0]&&(s=this.sqr(s)),0!==c||0!==o?(o<<=1,o|=c,(4==++h||0===e&&0===f)&&(s=this.mul(s,n[o]),h=0,o=0)):h=0}u=26}return s},x.prototype.convertTo=function(t){var i=t.umod(this.m);return i===t?i.clone():i},x.prototype.convertFrom=function(t){var i=t.clone();return i.red=null,i},r.mont=function(t){return new A(t)},e(A,x),A.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},A.prototype.convertFrom=function(t){var i=this.imod(t.mul(this.rinv));return i.red=null,i},A.prototype.imul=function(t,i){if(t.isZero()||i.isZero())return t.words[0]=0,t.length=1,t;var n=t.imul(i),e=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=n.isub(e).iushrn(this.shift),s=r;return r.cmp(this.m)>=0?s=r.isub(this.m):r.cmpn(0)<0&&(s=r.iadd(this.m)),s.KR(this)},A.prototype.mul=function(t,i){if(t.isZero()||i.isZero())return new r(0).KR(this);var n=t.mul(i),e=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=n.isub(e).iushrn(this.shift),o=s;return s.cmp(this.m)>=0?o=s.isub(this.m):s.cmpn(0)<0&&(o=s.iadd(this.m)),o.KR(this)},A.prototype.invm=function(t){return this.imod(t.ZR(this.m).mul(this.r2)).KR(this)}})(HK,BZ);var jK=HK.exports;function WK(t,i){if(Array.isArray(t))return t.slice();if(!t)return[];var n=[];if("string"!=typeof t){for(var e=0;e<t.length;e++)n[e]=0|t[e];return n}if("hex"===i){(t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t);for(e=0;e<t.length;e+=2)n.push(parseInt(t[e]+t[e+1],16))}else for(e=0;e<t.length;e++){var r=t.charCodeAt(e),s=r>>8,o=255&r;s?n.push(s,o):n.push(o)}return n}var UK,YK,XK=function(t,i,n){var e=new Array(Math.max(t.bitLength(),n)+1);e.fill(0);for(var r=1<<i+1,s=t.clone(),o=0;o<e.length;o++){var h=void 0,u=s.andln(r-1);s.isOdd()?(h=u>(r>>1)-1?(r>>1)-u:u,s.isubn(h)):h=0,e[o]=h,s.iushrn(1)}return e},ZK=function(t,i){var n=[[],[]];t=t.clone(),i=i.clone();for(var e=0,r=0;t.cmpn(-e)>0||i.cmpn(-r)>0;){var s=t.andln(3)+e&3,o=i.andln(3)+r&3;3===s&&(s=-1),3===o&&(o=-1);var h=void 0;if(0==(1&s))h=0;else h=3!==(u=t.andln(7)+e&7)&&5!==u||2!==o?s:-s;n[0].push(h);var u,a=void 0;if(0==(1&o))a=0;else a=3!==(u=i.andln(7)+r&7)&&5!==u||2!==s?o:-o;n[1].push(a),2*e===h+1&&(e=1-e),2*r===a+1&&(r=1-r),t.iushrn(1),i.iushrn(1)}return n},KK=function(){function t(t,i){this.type=t,this.p=new jK(i.p,16),this.red=i.prime?jK.red(i.prime):jK.mont(this.p),this.zero=new jK(0).toRed(this.red),this.one=new jK(1).toRed(this.red),this.two=new jK(2).toRed(this.red),this.n=i.n&&new jK(i.n,16),this.g=i.g&&this.pointFromJSON(i.g,i.gRed),this.tz=new Array(4),this.iz=new Array(4),this.nz=new Array(4),this.ez=new Array(4),this.rz=this.n?this.n.bitLength():0;var n=this.n&&this.p.div(this.n);!n||n.cmpn(100)>0?this.redN=null:(this.sz=!0,this.redN=this.n.toRed(this.red))}return t.prototype.oz=function(t,i){var n=t.hz(),e=XK(i,1,this.rz),r=(1<<n.step+1)-(n.step%2==0?2:1);r/=3;for(var s=[],o=0;o<e.length;o+=n.step){for(var h=0,u=o+n.step-1;u>=o;u--)h=(h<<1)+e[u];s.push(h)}for(var a=this.jpoint(null,null,null),f=this.jpoint(null,null,null),c=r;c>0;c--){for(o=0;o<s.length;o++){(h=s[o])===c?f=f.mixedAdd(n.points[o]):h===-c&&(f=f.mixedAdd(n.points[o].neg()))}a=a.add(f)}return a.toP()},t.prototype.uz=function(t,i){var n=4,e=t.az(n);n=e.wnd;for(var r=e.points,s=XK(i,n,this.rz),o=this.jpoint(null,null,null),h=s.length-1;h>=0;h--){for(;h>=0&&0===s[h];h--)0;if(h>=0&&i++,o=o.dblp(i),h<0)break;var u=s[h];o="affine"===t.type?u>0?o.mixedAdd(r[u-1>>1]):o.mixedAdd(r[-u-1>>1].neg()):u>0?o.add(r[u-1>>1]):o.add(r[-u-1>>1].neg())}return"affine"===t.type?o.toP():o},t.prototype.fz=function(t,i,n,e,r){for(var s=this.tz,o=this.iz,h=this.nz,u=0,a=0;a<e;a++){var f=(M=i[a]).az(t);s[a]=f.wnd,o[a]=f.points}for(a=e-1;a>=1;a-=2){var c=a-1,l=a;if(1===s[c]&&1===s[l]){var d=[i[c],null,null,i[l]];0===i[c].y.cmp(i[l].y)?(d[1]=i[c].add(i[l]),d[2]=i[c].toJ().mixedAdd(i[l].neg())):0===i[c].y.cmp(i[l].y.redNeg())?(d[1]=i[c].toJ().mixedAdd(i[l]),d[2]=i[c].add(i[l].neg())):(d[1]=i[c].toJ().mixedAdd(i[l]),d[2]=i[c].toJ().mixedAdd(i[l].neg()));var v=[-3,-1,-5,-7,0,7,5,1,3],y=ZK(n[c],n[l]);u=Math.max(y[0].length,u),h[c]=new Array(u),h[l]=new Array(u);for(var S=0;S<u;S++){var m=0|y[0][S],b=0|y[1][S];h[c][S]=v[3*(m+1)+(b+1)],h[l][S]=0,o[c]=d}}else h[c]=XK(n[c],s[c],this.rz),h[l]=XK(n[l],s[l],this.rz),u=Math.max(h[c].length,u),u=Math.max(h[l].length,u)}var g=this.jpoint(null,null,null),w=this.ez;for(a=u;a>=0;a--){for(var p=0;a>=0;){var k=!0;for(S=0;S<e;S++)w[S]=0|h[S][a],0!==w[S]&&(k=!1);if(!k)break;p++,a--}if(a>=0&&p++,g=g.dblp(p),a<0)break;for(S=0;S<e;S++){var x=w[S],M=void 0;0!==x&&(x>0?M=o[S][x-1>>1]:x<0&&(M=o[S][-x-1>>1].neg()),g="affine"===M.type?g.mixedAdd(M):g.add(M))}}for(a=0;a<e;a++)o[a]=null;return r?g:g.toP()},t.prototype.decodePoint=function(t,i){t=WK(t,i);var n=this.p.byteLength();if((4===t[0]||6===t[0]||7===t[0])&&t.length-1==2*n)return this.point(t.slice(1,1+n),t.slice(1+n,1+2*n));if((2===t[0]||3===t[0])&&t.length-1===n)return this.pointFromX(t.slice(1,1+n),3===t[0]);throw new Error("Unknown point format")},t}(),qK=function(){function t(t,i){this.curve=t,this.type=i,this.precomputed=null}return t.prototype.eq=function(t){throw new Error("Not implemented")},t.prototype.validate=function(){return this.curve.validate(this)},t.prototype.encodeCompressed=function(t){return this.encode(t,!0)},t.prototype.cz=function(t){var i=this.curve.p.byteLength(),n=this.getX().toArray("be",i);return t?[this.getY().isEven()?2:3].concat(n):[4].concat(n,this.getY().toArray("be",i))},t.prototype.encode=function(t,i){return function(t,i){return"hex"===i?function(t){for(var i,n="",e=0;e<t.length;e++)n+=1===(i=t[e].toString(16)).length?"0"+i:i;return n}(t):t}(this.cz(i),t)},t.prototype.precompute=function(t){if(this.precomputed)return this;var i={doubles:null,naf:null,beta:null};return i.naf=this.az(8),i.doubles=this.hz(4,t),i.beta=this.lz(),this.precomputed=i,this},t.prototype.dz=function(t){if(!this.precomputed)return!1;var i=this.precomputed.doubles;return!!i&&i.points.length>=Math.ceil((t.bitLength()+1)/i.step)},t.prototype.hz=function(t,i){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],e=this,r=0;r<i;r+=t){for(var s=0;s<t;s++)e=e.dbl();n.push(e)}return{step:t,points:n}},t.prototype.az=function(t){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var i=[this],n=(1<<t)-1,e=1===n?null:this.dbl(),r=1;r<n;r++)i[r]=i[r-1].add(e);return{wnd:t,points:i}},t.prototype.lz=function(){return null},t.prototype.dblp=function(t){for(var i=this,n=0;n<t;n++)i=i.dbl();return i},t}(),JK=function(t){function i(i){var n=t.call(this,"short",i)||this;return n.a=new jK(i.a,16).toRed(n.red),n.b=new jK(i.b,16).toRed(n.red),n.tinv=n.two.redInvm(),n.zeroA=0===n.a.fromRed().cmpn(0),n.threeA=0===n.a.fromRed().sub(n.p).cmpn(-3),n.endo=n.vz(i),n.yz=new Array(4),n.Sz=new Array(4),n}return n(i,t),i.prototype.pointFromJSON=function(t,i){return QK.fromJSON(this,t,i)},i.prototype.vz=function(t){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var i,n;if(t.beta)i=new jK(t.beta,16).toRed(this.red);else{var e=this.mz(this.p);i=(i=e[0].cmp(e[1])<0?e[0]:e[1]).toRed(this.red)}if(t.lambda)n=new jK(t.lambda,16);else{var r=this.mz(this.n);n=0===this.g.mul(r[0]).x.cmp(this.g.x.redMul(i))?r[0]:r[1]}return{beta:i,lambda:n,basis:t.basis?t.basis.map((function(t){return{a:new jK(t.a,16),b:new jK(t.b,16)}})):this.bz(n)}}},i.prototype.mz=function(t){var i=t===this.p?this.red:jK.mont(t),n=new jK(2).toRed(i).redInvm(),e=n.redNeg(),r=new jK(3).toRed(i).redNeg().redSqrt().redMul(n);return[e.redAdd(r).fromRed(),e.redSub(r).fromRed()]},i.prototype.bz=function(t){for(var i,n,e,r,s,o,h,u,a,f=this.n.ushrn(Math.floor(this.n.bitLength()/2)),c=t,l=this.n.clone(),d=new jK(1),v=new jK(0),y=new jK(0),S=new jK(1),m=0;0!==c.cmpn(0);){var b=l.div(c);u=l.sub(b.mul(c)),a=y.sub(b.mul(d));var g=S.sub(b.mul(v));if(!e&&u.cmp(f)<0)i=h.neg(),n=d,e=u.neg(),r=a;else if(e&&2==++m)break;h=u,l=c,c=u,y=d,d=a,S=v,v=g}s=u.neg(),o=a;var w=e.sqr().add(r.sqr());return s.sqr().add(o.sqr()).cmp(w)>=0&&(s=i,o=n),e.negative&&(e=e.neg(),r=r.neg()),s.negative&&(s=s.neg(),o=o.neg()),[{a:e,b:r},{a:s,b:o}]},i.prototype.gz=function(t){var i=this.endo.basis,n=i[0],e=i[1],r=e.b.mul(t).divRound(this.n),s=n.b.neg().mul(t).divRound(this.n),o=r.mul(n.a),h=s.mul(e.a),u=r.mul(n.b),a=s.mul(e.b);return{k1:t.sub(o).sub(h),k2:u.add(a).neg()}},i.prototype.point=function(t,i,n){return new QK(this,t,i,n)},i.prototype.pointFromX=function(t,i){(t=new jK(t,16)).red||(t=t.toRed(this.red));var n=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),e=n.redSqrt();if(0!==e.redSqr().redSub(n).cmp(this.zero))throw new Error("invalid point");var r=e.fromRed().isOdd();return(i&&!r||!i&&r)&&(e=e.redNeg()),this.point(t,e)},i.prototype.validate=function(t){if(t.inf)return!0;var i=t.x,n=t.y,e=this.a.redMul(i),r=i.redSqr().redMul(i).redIAdd(e).redIAdd(this.b);return 0===n.redSqr().redISub(r).cmpn(0)},i.prototype.wz=function(t,i,n){var e=this.yz,r=this.Sz,s=0;for(s=0;s<t.length;s++){var o=this.gz(i[s]),h=t[s],u=h.lz();o.k1.negative&&(o.k1.ineg(),h=h.neg(!0)),o.k2.negative&&(o.k2.ineg(),u=u.neg(!0)),e[2*s]=h,e[2*s+1]=u,r[2*s]=o.k1,r[2*s+1]=o.k2}for(var a=this.fz(1,e,r,2*s,n),f=0;f<2*s;f++)e[f]=null,r[f]=null;return a},i.prototype.jpoint=function(t,i,n){return new $K(this,t,i,n)},i}(KK),QK=function(t){function i(i,n,e,r){var s=t.call(this,i,"affine")||this;return null===n&&null===e?(s.x=null,s.y=null,s.inf=!0):(s.x=new jK(n,16),s.y=new jK(e,16),r&&(s.x.forceRed(s.curve.red),s.y.forceRed(s.curve.red)),s.x.red||(s.x=s.x.toRed(s.curve.red)),s.y.red||(s.y=s.y.toRed(s.curve.red)),s.inf=!1),s}return n(i,t),i.prototype.pointFromX=function(t,i){throw new Error("Method not implemented.")},i.prototype.point=function(t,n,e){return new i(this,t,n,e)},i.prototype.lz=function(){if(this.curve.endo){var t=this.precomputed;if(t&&t.beta)return t.beta;var i=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(t){var n=this.curve,e=function(t){return n.point(t.x.redMul(n.endo.beta),t.y)};t.beta=i,i.precomputed={beta:null,naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(e)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(e)}}}return i}},i.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},i.fromJSON=function(t,i,n){"string"==typeof i&&(i=JSON.parse(i));var e=t.point(i[0],i[1],n);if(!i[2])return e;function r(i){return t.point(i[0],i[1],n)}var s=i[2];return e.precomputed={beta:null,doubles:s.doubles&&{step:s.doubles.step,points:[e].concat(s.doubles.points.map(r))},naf:s.naf&&{wnd:s.naf.wnd,points:[e].concat(s.naf.points.map(r))}},e},i.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},i.prototype.isInfinity=function(){return this.inf},i.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(0===this.x.cmp(t.x))return this.curve.point(null,null);var i=this.y.redSub(t.y);0!==i.cmpn(0)&&(i=i.redMul(this.x.redSub(t.x).redInvm()));var n=i.redSqr().redISub(this.x).redISub(t.x),e=i.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,e)},i.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(0===t.cmpn(0))return this.curve.point(null,null);var i=this.curve.a,n=this.x.redSqr(),e=t.redInvm(),r=n.redAdd(n).redIAdd(n).redIAdd(i).redMul(e),s=r.redSqr().redISub(this.x.redAdd(this.x)),o=r.redMul(this.x.redSub(s)).redISub(this.y);return this.curve.point(s,o)},i.prototype.getX=function(){return this.x.fromRed()},i.prototype.getY=function(){return this.y.fromRed()},i.prototype.mul=function(t){return t=new jK(t,16),this.isInfinity()?this:this.dz(t)?this.curve.oz(this,t):this.curve.endo?this.curve.wz([this],[t]):this.curve.uz(this,t)},i.prototype.mulAdd=function(t,i,n){var e=[this,i],r=[t,n];return this.curve.endo?this.curve.wz(e,r):this.curve.fz(1,e,r,2)},i.prototype.jmulAdd=function(t,i,n){var e=[this,i],r=[t,n];return this.curve.endo?this.curve.wz(e,r,!0):this.curve.fz(1,e,r,2,!0)},i.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},i.prototype.neg=function(t){if(this.inf)return this;var i=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var n=this.precomputed,e=function(t){return t.neg()};i.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(e)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(e)}}}return i},i.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},i}(qK),$K=function(t){function i(i,n,e,r){var s=t.call(this,i,"jacobian")||this;return null===n&&null===e&&null===r?(s.x=s.curve.one,s.y=s.curve.one,s.z=new jK(0)):(s.x=new jK(n,16),s.y=new jK(e,16),s.z=new jK(r,16)),s.x.red||(s.x=s.x.toRed(s.curve.red)),s.y.red||(s.y=s.y.toRed(s.curve.red)),s.z.red||(s.z=s.z.toRed(s.curve.red)),s.zOne=s.z===s.curve.one,s}return n(i,t),i.prototype.getY=function(){throw new Error("Method not implemented.")},i.prototype.getX=function(){throw new Error("Method not implemented.")},i.prototype.pointFromX=function(t,i){throw new Error("Method not implemented.")},i.prototype.point=function(t,i,n){throw new Error("Method not implemented.")},i.prototype.jpoint=function(t,n,e){return new i(this,t,n,e)},i.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),i=t.redSqr(),n=this.x.redMul(i),e=this.y.redMul(i).redMul(t);return this.curve.point(n,e)},i.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},i.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var i=t.z.redSqr(),n=this.z.redSqr(),e=this.x.redMul(i),r=t.x.redMul(n),s=this.y.redMul(i.redMul(t.z)),o=t.y.redMul(n.redMul(this.z)),h=e.redSub(r),u=s.redSub(o);if(0===h.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var a=h.redSqr(),f=a.redMul(h),c=e.redMul(a),l=u.redSqr().redIAdd(f).redISub(c).redISub(c),d=u.redMul(c.redISub(l)).redISub(s.redMul(f)),v=this.z.redMul(t.z).redMul(h);return this.curve.jpoint(l,d,v)},i.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var i=this.z.redSqr(),n=this.x,e=t.x.redMul(i),r=this.y,s=t.y.redMul(i).redMul(this.z),o=n.redSub(e),h=r.redSub(s);if(0===o.cmpn(0))return 0!==h.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=o.redSqr(),a=u.redMul(o),f=n.redMul(u),c=h.redSqr().redIAdd(a).redISub(f).redISub(f),l=h.redMul(f.redISub(c)).redISub(r.redMul(a)),d=this.z.redMul(o);return this.curve.jpoint(c,l,d)},i.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var i=this,n=0;n<t;n++)i=i.dbl();return i}var e=this.curve.a,r=this.curve.tinv,s=this.x,o=this.y,h=this.z,u=h.redSqr().redSqr(),a=o.redAdd(o);for(n=0;n<t;n++){var f=s.redSqr(),c=a.redSqr(),l=c.redSqr(),d=f.redAdd(f).redIAdd(f).redIAdd(e.redMul(u)),v=s.redMul(c),y=d.redSqr().redISub(v.redAdd(v)),S=v.redISub(y),m=d.redMul(S);m=m.redIAdd(m).redISub(l);var b=a.redMul(h);n+1<t&&(u=u.redMul(l)),s=y,h=b,a=m}return this.curve.jpoint(s,a.redMul(r),h)},i.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this.pz():this.curve.threeA?this.kz():this.xz()},i.prototype.pz=function(){var t,i,n;if(this.zOne){var e=this.x.redSqr(),r=this.y.redSqr(),s=r.redSqr(),o=this.x.redAdd(r).redSqr().redISub(e).redISub(s);o=o.redIAdd(o);var h=e.redAdd(e).redIAdd(e),u=h.redSqr().redISub(o).redISub(o),a=s.redIAdd(s);a=(a=a.redIAdd(a)).redIAdd(a),t=u,i=h.redMul(o.redISub(u)).redISub(a),n=this.y.redAdd(this.y)}else{var f=this.x.redSqr(),c=this.y.redSqr(),l=c.redSqr(),d=this.x.redAdd(c).redSqr().redISub(f).redISub(l);d=d.redIAdd(d);var v=f.redAdd(f).redIAdd(f),y=v.redSqr(),S=l.redIAdd(l);S=(S=S.redIAdd(S)).redIAdd(S),t=y.redISub(d).redISub(d),i=v.redMul(d.redISub(t)).redISub(S),n=(n=this.y.redMul(this.z)).redIAdd(n)}return this.curve.jpoint(t,i,n)},i.prototype.kz=function(){var t,i,n;if(this.zOne){var e=this.x.redSqr(),r=this.y.redSqr(),s=r.redSqr(),o=this.x.redAdd(r).redSqr().redISub(e).redISub(s);o=o.redIAdd(o);var h=e.redAdd(e).redIAdd(e).redIAdd(this.curve.a),u=h.redSqr().redISub(o).redISub(o);t=u;var a=s.redIAdd(s);a=(a=a.redIAdd(a)).redIAdd(a),i=h.redMul(o.redISub(u)).redISub(a),n=this.y.redAdd(this.y)}else{var f=this.z.redSqr(),c=this.y.redSqr(),l=this.x.redMul(c),d=this.x.redSub(f).redMul(this.x.redAdd(f));d=d.redAdd(d).redIAdd(d);var v=l.redIAdd(l),y=(v=v.redIAdd(v)).redAdd(v);t=d.redSqr().redISub(y),n=this.y.redAdd(this.z).redSqr().redISub(c).redISub(f);var S=c.redSqr();S=(S=(S=S.redIAdd(S)).redIAdd(S)).redIAdd(S),i=d.redMul(v.redISub(t)).redISub(S)}return this.curve.jpoint(t,i,n)},i.prototype.xz=function(){var t=this.curve.a,i=this.x,n=this.y,e=this.z,r=e.redSqr().redSqr(),s=i.redSqr(),o=n.redSqr(),h=s.redAdd(s).redIAdd(s).redIAdd(t.redMul(r)),u=i.redAdd(i),a=(u=u.redIAdd(u)).redMul(o),f=h.redSqr().redISub(a.redAdd(a)),c=a.redISub(f),l=o.redSqr();l=(l=(l=l.redIAdd(l)).redIAdd(l)).redIAdd(l);var d=h.redMul(c).redISub(l),v=n.redAdd(n).redMul(e);return this.curve.jpoint(f,d,v)},i.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var t=this.x.redSqr(),i=this.y.redSqr(),n=this.z.redSqr(),e=i.redSqr(),r=t.redAdd(t).redIAdd(t),s=r.redSqr(),o=this.x.redAdd(i).redSqr().redISub(t).redISub(e),h=(o=(o=(o=o.redIAdd(o)).redAdd(o).redIAdd(o)).redISub(s)).redSqr(),u=e.redIAdd(e);u=(u=(u=u.redIAdd(u)).redIAdd(u)).redIAdd(u);var a=r.redIAdd(o).redSqr().redISub(s).redISub(h).redISub(u),f=i.redMul(a);f=(f=f.redIAdd(f)).redIAdd(f);var c=this.x.redMul(h).redISub(f);c=(c=c.redIAdd(c)).redIAdd(c);var l=this.y.redMul(a.redMul(u.redISub(a)).redISub(o.redMul(h)));l=(l=(l=l.redIAdd(l)).redIAdd(l)).redIAdd(l);var d=this.z.redAdd(o).redSqr().redISub(n).redISub(h);return this.curve.jpoint(c,l,d)},i.prototype.mul=function(t,i){return t=new jK(t,i),this.curve.uz(this,t)},i.prototype.eq=function(t){if("affine"===t.type)return this.eq(t.toJ());if(this===t)return!0;var i=this.z.redSqr(),n=t.z.redSqr();if(0!==this.x.redMul(n).redISub(t.x.redMul(i)).cmpn(0))return!1;var e=i.redMul(this.z),r=n.redMul(t.z);return 0===this.y.redMul(r).redISub(t.y.redMul(e)).cmpn(0)},i.prototype.eqXToP=function(t){var i=this.z.redSqr(),n=t.toRed(this.curve.red).redMul(i);if(0===this.x.cmp(n))return!0;for(var e=t.clone(),r=this.curve.redN.redMul(i);;){if(e.iadd(this.curve.n),e.cmp(this.curve.p)>=0)return!1;if(n.redIAdd(r),0===this.x.cmp(n))return!0}},i.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},i.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},i}(qK),tq=function(t){this.curve=new JK(t),this.g=this.curve.g,this.n=this.curve.n},iq={};iq.PresetCurve=tq,UK="secp256k1",YK={type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",{doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}]},Object.defineProperty(iq,UK,{configurable:!0,enumerable:!0,get:function(){var t=new tq(YK);return Object.defineProperty(iq,UK,{configurable:!0,enumerable:!0,value:t}),t}});var nq=function(){function t(t,i){this.ec=t,this.priv=null,this.pub=null,i.pub&&this.Mz(i.pub,i.pubEnc)}return t.fromPublic=function(i,n,e){return n instanceof t?n:new t(i,{pub:n,pubEnc:e})},t.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:"Invalid public key"}:t.validate()?t.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},t.prototype.getPublic=function(t,i){return"string"==typeof t&&(i=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),i?this.pub.encode(i,t):this.pub},t.prototype.Mz=function(t,i){if(t.x||t.y)return"mont"===this.ec.curve.type||"short"===this.ec.curve.type||this.ec.curve.type,void(this.pub=this.ec.curve.point(t.x,t.y));this.pub=this.ec.curve.decodePoint(t,i)},t.prototype.verify=function(t,i){return this.ec.verify(t,i,this)},t}();function eq(t,i){var n=t[i.place++];if(!(128&n))return n;var e=15&n;if(0===e||e>4)return!1;for(var r=0,s=i.place,o=0;o<e;o++,s++)r<<=8,r|=t[s],r>>>=0;return!(r<=127)&&(i.place=s,r)}var rq=function(){this.place=0},sq=function(){function t(i,n){if(i instanceof t)return i;this.Az(i,n)||(this.r=new jK(i.r,16),this.s=new jK(i.s,16),void 0===i.recoveryParam?this.recoveryParam=null:this.recoveryParam=i.recoveryParam)}return t.prototype.Az=function(t,i){t=WK(t,i);var n=new rq;if(48!==t[n.place++])return!1;var e=eq(t,n);if(!1===e)return!1;if(e+n.place!==t.length)return!1;if(2!==t[n.place++])return!1;var r=eq(t,n);if(!1===r)return!1;var s=t.slice(n.place,r+n.place);if(n.place+=r,2!==t[n.place++])return!1;var o=eq(t,n);if(!1===o)return!1;if(t.length!==o+n.place)return!1;var h=t.slice(n.place,o+n.place);if(0===s[0]){if(!(128&s[1]))return!1;s=s.slice(1)}if(0===h[0]){if(!(128&h[1]))return!1;h=h.slice(1)}return this.r=new jK(s),this.s=new jK(h),this.recoveryParam=null,!0},t}(),oq=function(){function t(i){if(!(this instanceof t))return new t(i);"string"==typeof i&&(i=iq[i]),i instanceof iq.PresetCurve&&(i={curve:i}),this.curve=i.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=i.curve.g,this.g.precompute(i.curve.n.bitLength()+1)}return t.prototype.keyFromPublic=function(t,i){return nq.fromPublic(this,t,i)},t.prototype.Fz=function(t,i){var n=8*t.byteLength()-this.n.bitLength();return n>0&&(t=t.ushrn(n)),!i&&t.cmp(this.n)>=0?t.sub(this.n):t},t.prototype.verify=function(t,i,n,e){t=this.Fz(new jK(t,16)),n=this.keyFromPublic(n,e);var r=(i=new sq(i,"hex")).r,s=i.s;if(r.cmpn(1)<0||r.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var o=s.invm(this.n),h=o.mul(t).umod(this.n),u=o.mul(r).umod(this.n);if(!this.curve.sz){var a=this.g.mulAdd(h,n.getPublic(),u);return!a.isInfinity()&&0===a.getX().umod(this.n).cmp(r)}var f=this.g.jmulAdd(h,n.getPublic(),u);return!f.isInfinity()&&f.eqXToP(r)},t}(),hq={exports:{}},uq={exports:{}};!function(t,i){var n;t.exports=n=n||function(t,i){var n;if("undefined"!=typeof window&&window.crypto&&(n=window.crypto),!n&&"undefined"!=typeof window&&window.msCrypto&&(n=window.msCrypto),!n&&void 0!==BZ&&BZ.crypto&&(n=BZ.crypto),!n)try{n=i}catch(t){}var e=function(){if(n){if("function"==typeof n.getRandomValues)try{return n.getRandomValues(new Uint32Array(1))[0]}catch(t){}if("function"==typeof n.randomBytes)try{return n.randomBytes(4).readInt32LE()}catch(t){}}throw new Error("Native crypto module could not be used to get secure random number.")},r=Object.create||function(){function t(){}return function(i){var n;return t.prototype=i,n=new t,t.prototype=null,n}}(),s={},o=s.lib={},h=o.Base={extend:function(t){var i=r(this);return t&&i.mixIn(t),i.hasOwnProperty("init")&&this.init!==i.init||(i.init=function(){i.$super.init.apply(this,arguments)}),i.init.prototype=i,i.$super=this,i},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var i in t)t.hasOwnProperty(i)&&(this[i]=t[i]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},u=o.WordArray=h.extend({init:function(t,n){t=this.words=t||[],this.sigBytes=n!=i?n:4*t.length},toString:function(t){return(t||f).stringify(this)},concat:function(t){var i=this.words,n=t.words,e=this.sigBytes,r=t.sigBytes;if(this.clamp(),e%4)for(var s=0;s<r;s++){var o=n[s>>>2]>>>24-s%4*8&255;i[e+s>>>2]|=o<<24-(e+s)%4*8}else for(s=0;s<r;s+=4)i[e+s>>>2]=n[s>>>2];return this.sigBytes+=r,this},clamp:function(){var i=this.words,n=this.sigBytes;i[n>>>2]&=4294967295<<32-n%4*8,i.length=t.ceil(n/4)},clone:function(){var t=h.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var i=[],n=0;n<t;n+=4)i.push(e());return new u.init(i,t)}}),a=s.enc={},f=a.Hex={stringify:function(t){for(var i=t.words,n=t.sigBytes,e=[],r=0;r<n;r++){var s=i[r>>>2]>>>24-r%4*8&255;e.push((s>>>4).toString(16)),e.push((15&s).toString(16))}return e.join("")},parse:function(t){for(var i=t.length,n=[],e=0;e<i;e+=2)n[e>>>3]|=parseInt(t.substr(e,2),16)<<24-e%8*4;return new u.init(n,i/2)}},c=a.Latin1={stringify:function(t){for(var i=t.words,n=t.sigBytes,e=[],r=0;r<n;r++){var s=i[r>>>2]>>>24-r%4*8&255;e.push(String.fromCharCode(s))}return e.join("")},parse:function(t){for(var i=t.length,n=[],e=0;e<i;e++)n[e>>>2]|=(255&t.charCodeAt(e))<<24-e%4*8;return new u.init(n,i)}},l=a.Utf8={stringify:function(t){try{return decodeURIComponent(escape(c.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return c.parse(unescape(encodeURIComponent(t)))}},d=o.BufferedBlockAlgorithm=h.extend({reset:function(){this.xA=new u.init,this.Tz=0},Cz:function(t){"string"==typeof t&&(t=l.parse(t)),this.xA.concat(t),this.Tz+=t.sigBytes},Bz:function(i){var n,e=this.xA,r=e.words,s=e.sigBytes,o=this.blockSize,h=s/(4*o),a=(h=i?t.ceil(h):t.max((0|h)-this.Lz,0))*o,f=t.min(4*a,s);if(a){for(var c=0;c<a;c+=o)this.Iz(r,c);n=r.splice(0,a),e.sigBytes-=f}return new u.init(n,f)},clone:function(){var t=h.clone.call(this);return t.xA=this.xA.clone(),t},Lz:0});o.Hasher=d.extend({cfg:h.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){d.reset.call(this),this.Oz()},update:function(t){return this.Cz(t),this.Bz(),this},finalize:function(t){return t&&this.Cz(t),this.Pz()},blockSize:16,Dz:function(t){return function(i,n){return new t.init(n).finalize(i)}},_z:function(t){return function(i,n){return new v.HMAC.init(t,n).finalize(i)}}});var v=s.algo={};return s}(Math)}(uq);var aq={exports:{}};!function(t,i){var n;t.exports=(n=uq.exports,function(t){var i=n,e=i.lib,r=e.WordArray,s=e.Hasher,o=i.algo,h=[],u=[];!function(){function i(i){for(var n=t.sqrt(i),e=2;e<=n;e++)if(!(i%e))return!1;return!0}function n(t){return 4294967296*(t-(0|t))|0}for(var e=2,r=0;r<64;)i(e)&&(r<8&&(h[r]=n(t.pow(e,.5))),u[r]=n(t.pow(e,1/3)),r++),e++}();var a=[],f=o.SHA256=s.extend({Oz:function(){this.Rz=new r.init(h.slice(0))},Iz:function(t,i){for(var n=this.Rz.words,e=n[0],r=n[1],s=n[2],o=n[3],h=n[4],f=n[5],c=n[6],l=n[7],d=0;d<64;d++){if(d<16)a[d]=0|t[i+d];else{var v=a[d-15],y=(v<<25|v>>>7)^(v<<14|v>>>18)^v>>>3,S=a[d-2],m=(S<<15|S>>>17)^(S<<13|S>>>19)^S>>>10;a[d]=y+a[d-7]+m+a[d-16]}var b=e&r^e&s^r&s,g=(e<<30|e>>>2)^(e<<19|e>>>13)^(e<<10|e>>>22),w=l+((h<<26|h>>>6)^(h<<21|h>>>11)^(h<<7|h>>>25))+(h&f^~h&c)+u[d]+a[d];l=c,c=f,f=h,h=o+w|0,o=s,s=r,r=e,e=w+(g+b)|0}n[0]=n[0]+e|0,n[1]=n[1]+r|0,n[2]=n[2]+s|0,n[3]=n[3]+o|0,n[4]=n[4]+h|0,n[5]=n[5]+f|0,n[6]=n[6]+c|0,n[7]=n[7]+l|0},Pz:function(){var i=this.xA,n=i.words,e=8*this.Tz,r=8*i.sigBytes;return n[r>>>5]|=128<<24-r%32,n[14+(r+64>>>9<<4)]=t.floor(e/4294967296),n[15+(r+64>>>9<<4)]=e,i.sigBytes=4*n.length,this.Bz(),this.Rz},clone:function(){var t=s.clone.call(this);return t.Rz=this.Rz.clone(),t}});i.SHA256=s.Dz(f),i.HmacSHA256=s._z(f)}(Math),n.SHA256)}(aq);var fq=aq.exports;!function(t,i){var n,e,r,s,o,h;t.exports=(e=(n=h=uq.exports).lib.WordArray,r=n.algo,s=r.SHA256,o=r.SHA224=s.extend({Oz:function(){this.Rz=new e.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},Pz:function(){var t=s.Pz.call(this);return t.sigBytes-=4,t}}),n.SHA224=s.Dz(o),n.HmacSHA224=s._z(o),h.SHA224)}(hq);var cq=hq.exports,lq={exports:{}};!function(t,i){t.exports=uq.exports.enc.Hex}(lq);var dq=lq.exports,vq={exports:{}};!function(t,i){t.exports=uq.exports.enc.Utf8}(vq);var yq=vq.exports,Sq={exports:{}},mq={exports:{}};!function(t,i){var n;t.exports=(n=uq.exports,function(){var t=n,i=t.lib.WordArray;function e(t,n,e){for(var r=[],s=0,o=0;o<n;o++)if(o%4){var h=e[t.charCodeAt(o-1)]<<o%4*2|e[t.charCodeAt(o)]>>>6-o%4*2;r[s>>>2]|=h<<24-s%4*8,s++}return i.create(r,s)}t.enc.Base64={stringify:function(t){var i=t.words,n=t.sigBytes,e=this.ft;t.clamp();for(var r=[],s=0;s<n;s+=3)for(var o=(i[s>>>2]>>>24-s%4*8&255)<<16|(i[s+1>>>2]>>>24-(s+1)%4*8&255)<<8|i[s+2>>>2]>>>24-(s+2)%4*8&255,h=0;h<4&&s+.75*h<n;h++)r.push(e.charAt(o>>>6*(3-h)&63));var u=e.charAt(64);if(u)for(;r.length%4;)r.push(u);return r.join("")},parse:function(t){var i=t.length,n=this.ft,r=this.zz;if(!r){r=this.zz=[];for(var s=0;s<n.length;s++)r[n.charCodeAt(s)]=s}var o=n.charAt(64);if(o){var h=t.indexOf(o);-1!==h&&(i=h)}return e(t,i,r)},ft:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),n.enc.Base64)}(mq);var bq={exports:{}};!function(t,i){var n;t.exports=(n=uq.exports,function(t){var i=n,e=i.lib,r=e.WordArray,s=e.Hasher,o=i.algo,h=[];!function(){for(var i=0;i<64;i++)h[i]=4294967296*t.abs(t.sin(i+1))|0}();var u=o.MD5=s.extend({Oz:function(){this.Rz=new r.init([1732584193,4023233417,2562383102,271733878])},Iz:function(t,i){for(var n=0;n<16;n++){var e=i+n,r=t[e];t[e]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8)}var s=this.Rz.words,o=t[i+0],u=t[i+1],d=t[i+2],v=t[i+3],y=t[i+4],S=t[i+5],m=t[i+6],b=t[i+7],g=t[i+8],w=t[i+9],p=t[i+10],k=t[i+11],x=t[i+12],M=t[i+13],A=t[i+14],F=t[i+15],T=s[0],C=s[1],B=s[2],L=s[3];T=a(T,C,B,L,o,7,h[0]),L=a(L,T,C,B,u,12,h[1]),B=a(B,L,T,C,d,17,h[2]),C=a(C,B,L,T,v,22,h[3]),T=a(T,C,B,L,y,7,h[4]),L=a(L,T,C,B,S,12,h[5]),B=a(B,L,T,C,m,17,h[6]),C=a(C,B,L,T,b,22,h[7]),T=a(T,C,B,L,g,7,h[8]),L=a(L,T,C,B,w,12,h[9]),B=a(B,L,T,C,p,17,h[10]),C=a(C,B,L,T,k,22,h[11]),T=a(T,C,B,L,x,7,h[12]),L=a(L,T,C,B,M,12,h[13]),B=a(B,L,T,C,A,17,h[14]),T=f(T,C=a(C,B,L,T,F,22,h[15]),B,L,u,5,h[16]),L=f(L,T,C,B,m,9,h[17]),B=f(B,L,T,C,k,14,h[18]),C=f(C,B,L,T,o,20,h[19]),T=f(T,C,B,L,S,5,h[20]),L=f(L,T,C,B,p,9,h[21]),B=f(B,L,T,C,F,14,h[22]),C=f(C,B,L,T,y,20,h[23]),T=f(T,C,B,L,w,5,h[24]),L=f(L,T,C,B,A,9,h[25]),B=f(B,L,T,C,v,14,h[26]),C=f(C,B,L,T,g,20,h[27]),T=f(T,C,B,L,M,5,h[28]),L=f(L,T,C,B,d,9,h[29]),B=f(B,L,T,C,b,14,h[30]),T=c(T,C=f(C,B,L,T,x,20,h[31]),B,L,S,4,h[32]),L=c(L,T,C,B,g,11,h[33]),B=c(B,L,T,C,k,16,h[34]),C=c(C,B,L,T,A,23,h[35]),T=c(T,C,B,L,u,4,h[36]),L=c(L,T,C,B,y,11,h[37]),B=c(B,L,T,C,b,16,h[38]),C=c(C,B,L,T,p,23,h[39]),T=c(T,C,B,L,M,4,h[40]),L=c(L,T,C,B,o,11,h[41]),B=c(B,L,T,C,v,16,h[42]),C=c(C,B,L,T,m,23,h[43]),T=c(T,C,B,L,w,4,h[44]),L=c(L,T,C,B,x,11,h[45]),B=c(B,L,T,C,F,16,h[46]),T=l(T,C=c(C,B,L,T,d,23,h[47]),B,L,o,6,h[48]),L=l(L,T,C,B,b,10,h[49]),B=l(B,L,T,C,A,15,h[50]),C=l(C,B,L,T,S,21,h[51]),T=l(T,C,B,L,x,6,h[52]),L=l(L,T,C,B,v,10,h[53]),B=l(B,L,T,C,p,15,h[54]),C=l(C,B,L,T,u,21,h[55]),T=l(T,C,B,L,g,6,h[56]),L=l(L,T,C,B,F,10,h[57]),B=l(B,L,T,C,m,15,h[58]),C=l(C,B,L,T,M,21,h[59]),T=l(T,C,B,L,y,6,h[60]),L=l(L,T,C,B,k,10,h[61]),B=l(B,L,T,C,d,15,h[62]),C=l(C,B,L,T,w,21,h[63]),s[0]=s[0]+T|0,s[1]=s[1]+C|0,s[2]=s[2]+B|0,s[3]=s[3]+L|0},Pz:function(){var i=this.xA,n=i.words,e=8*this.Tz,r=8*i.sigBytes;n[r>>>5]|=128<<24-r%32;var s=t.floor(e/4294967296),o=e;n[15+(r+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),n[14+(r+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),i.sigBytes=4*(n.length+1),this.Bz();for(var h=this.Rz,u=h.words,a=0;a<4;a++){var f=u[a];u[a]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8)}return h},clone:function(){var t=s.clone.call(this);return t.Rz=this.Rz.clone(),t}});function a(t,i,n,e,r,s,o){var h=t+(i&n|~i&e)+r+o;return(h<<s|h>>>32-s)+i}function f(t,i,n,e,r,s,o){var h=t+(i&e|n&~e)+r+o;return(h<<s|h>>>32-s)+i}function c(t,i,n,e,r,s,o){var h=t+(i^n^e)+r+o;return(h<<s|h>>>32-s)+i}function l(t,i,n,e,r,s,o){var h=t+(n^(i|~e))+r+o;return(h<<s|h>>>32-s)+i}i.MD5=s.Dz(u),i.HmacMD5=s._z(u)}(Math),n.MD5)}(bq);var gq={exports:{}},wq={exports:{}};!function(t,i){var n,e,r,s,o,h,u,a;t.exports=(e=(n=a=uq.exports).lib,r=e.WordArray,s=e.Hasher,o=n.algo,h=[],u=o.SHA1=s.extend({Oz:function(){this.Rz=new r.init([1732584193,4023233417,2562383102,271733878,3285377520])},Iz:function(t,i){for(var n=this.Rz.words,e=n[0],r=n[1],s=n[2],o=n[3],u=n[4],a=0;a<80;a++){if(a<16)h[a]=0|t[i+a];else{var f=h[a-3]^h[a-8]^h[a-14]^h[a-16];h[a]=f<<1|f>>>31}var c=(e<<5|e>>>27)+u+h[a];c+=a<20?1518500249+(r&s|~r&o):a<40?1859775393+(r^s^o):a<60?(r&s|r&o|s&o)-1894007588:(r^s^o)-899497514,u=o,o=s,s=r<<30|r>>>2,r=e,e=c}n[0]=n[0]+e|0,n[1]=n[1]+r|0,n[2]=n[2]+s|0,n[3]=n[3]+o|0,n[4]=n[4]+u|0},Pz:function(){var t=this.xA,i=t.words,n=8*this.Tz,e=8*t.sigBytes;return i[e>>>5]|=128<<24-e%32,i[14+(e+64>>>9<<4)]=Math.floor(n/4294967296),i[15+(e+64>>>9<<4)]=n,t.sigBytes=4*i.length,this.Bz(),this.Rz},clone:function(){var t=s.clone.call(this);return t.Rz=this.Rz.clone(),t}}),n.SHA1=s.Dz(u),n.HmacSHA1=s._z(u),a.SHA1)}(wq);var pq={exports:{}};!function(t,i){var n,e,r;t.exports=(e=(n=uq.exports).lib.Base,r=n.enc.Utf8,void(n.algo.HMAC=e.extend({init:function(t,i){t=this.Ez=new t.init,"string"==typeof i&&(i=r.parse(i));var n=t.blockSize,e=4*n;i.sigBytes>e&&(i=t.finalize(i)),i.clamp();for(var s=this.Nz=i.clone(),o=this.Vz=i.clone(),h=s.words,u=o.words,a=0;a<n;a++)h[a]^=1549556828,u[a]^=909522486;s.sigBytes=o.sigBytes=e,this.reset()},reset:function(){var t=this.Ez;t.reset(),t.update(this.Vz)},update:function(t){return this.Ez.update(t),this},finalize:function(t){var i=this.Ez,n=i.finalize(t);return i.reset(),i.finalize(this.Nz.clone().concat(n))}})))}(pq),function(t,i){var n,e,r,s,o,h,u,a;t.exports=(e=(n=a=uq.exports).lib,r=e.Base,s=e.WordArray,o=n.algo,h=o.MD5,u=o.EvpKDF=r.extend({cfg:r.extend({keySize:4,hasher:h,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,i){for(var n,e=this.cfg,r=e.hasher.create(),o=s.create(),h=o.words,u=e.keySize,a=e.iterations;h.length<u;){n&&r.update(n),n=r.update(t).finalize(i),r.reset();for(var f=1;f<a;f++)n=r.finalize(n),r.reset();o.concat(n)}return o.sigBytes=4*u,o}}),n.EvpKDF=function(t,i,n){return u.create(n).compute(t,i)},a.EvpKDF)}(gq);var kq={exports:{}};!function(t,i){var n;t.exports=void((n=uq.exports).lib.Cipher||function(t){var i=n,e=i.lib,r=e.Base,s=e.WordArray,o=e.BufferedBlockAlgorithm,h=i.enc;h.Utf8;var u=h.Base64,a=i.algo.EvpKDF,f=e.Cipher=o.extend({cfg:r.extend(),createEncryptor:function(t,i){return this.create(this.Gz,t,i)},createDecryptor:function(t,i){return this.create(this.jz,t,i)},init:function(t,i,n){this.cfg=this.cfg.extend(n),this.Wz=t,this.Uz=i,this.reset()},reset:function(){o.reset.call(this),this.Oz()},process:function(t){return this.Cz(t),this.Bz()},finalize:function(t){return t&&this.Cz(t),this.Pz()},keySize:4,ivSize:4,Gz:1,jz:2,Dz:function(){function t(t){return"string"==typeof t?g:m}return function(i){return{encrypt:function(n,e,r){return t(e).encrypt(i,n,e,r)},decrypt:function(n,e,r){return t(e).decrypt(i,n,e,r)}}}}()});e.StreamCipher=f.extend({Pz:function(){return this.Bz(!0)},blockSize:1});var c=i.mode={},l=e.BlockCipherMode=r.extend({createEncryptor:function(t,i){return this.Encryptor.create(t,i)},createDecryptor:function(t,i){return this.Decryptor.create(t,i)},init:function(t,i){this.Yz=t,this.Xz=i}}),d=c.CBC=function(){var i=l.extend();function n(i,n,e){var r,s=this.Xz;s?(r=s,this.Xz=t):r=this.Zz;for(var o=0;o<e;o++)i[n+o]^=r[o]}return i.Encryptor=i.extend({processBlock:function(t,i){var e=this.Yz,r=e.blockSize;n.call(this,t,i,r),e.encryptBlock(t,i),this.Zz=t.slice(i,i+r)}}),i.Decryptor=i.extend({processBlock:function(t,i){var e=this.Yz,r=e.blockSize,s=t.slice(i,i+r);e.decryptBlock(t,i),n.call(this,t,i,r),this.Zz=s}}),i}(),v=(i.pad={}).Pkcs7={pad:function(t,i){for(var n=4*i,e=n-t.sigBytes%n,r=e<<24|e<<16|e<<8|e,o=[],h=0;h<e;h+=4)o.push(r);var u=s.create(o,e);t.concat(u)},unpad:function(t){var i=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=i}};e.BlockCipher=f.extend({cfg:f.cfg.extend({mode:d,padding:v}),reset:function(){var t;f.reset.call(this);var i=this.cfg,n=i.iv,e=i.mode;this.Wz==this.Gz?t=e.createEncryptor:(t=e.createDecryptor,this.Lz=1),this.Kz&&this.Kz.qz==t?this.Kz.init(this,n&&n.words):(this.Kz=t.call(e,this,n&&n.words),this.Kz.qz=t)},Iz:function(t,i){this.Kz.processBlock(t,i)},Pz:function(){var t,i=this.cfg.padding;return this.Wz==this.Gz?(i.pad(this.xA,this.blockSize),t=this.Bz(!0)):(t=this.Bz(!0),i.unpad(t)),t},blockSize:4});var y=e.CipherParams=r.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}}),S=(i.format={}).OpenSSL={stringify:function(t){var i=t.ciphertext,n=t.salt;return(n?s.create([1398893684,1701076831]).concat(n).concat(i):i).toString(u)},parse:function(t){var i,n=u.parse(t),e=n.words;return 1398893684==e[0]&&1701076831==e[1]&&(i=s.create(e.slice(2,4)),e.splice(0,4),n.sigBytes-=16),y.create({ciphertext:n,salt:i})}},m=e.SerializableCipher=r.extend({cfg:r.extend({format:S}),encrypt:function(t,i,n,e){e=this.cfg.extend(e);var r=t.createEncryptor(n,e),s=r.finalize(i),o=r.cfg;return y.create({ciphertext:s,key:n,iv:o.iv,algorithm:t,mode:o.mode,padding:o.padding,blockSize:t.blockSize,formatter:e.format})},decrypt:function(t,i,n,e){return e=this.cfg.extend(e),i=this.Jz(i,e.format),t.createDecryptor(n,e).finalize(i.ciphertext)},Jz:function(t,i){return"string"==typeof t?i.parse(t,this):t}}),b=(i.kdf={}).OpenSSL={execute:function(t,i,n,e){e||(e=s.random(8));var r=a.create({keySize:i+n}).compute(t,e),o=s.create(r.words.slice(i),4*n);return r.sigBytes=4*i,y.create({key:r,iv:o,salt:e})}},g=e.PasswordBasedCipher=m.extend({cfg:m.cfg.extend({kdf:b}),encrypt:function(t,i,n,e){var r=(e=this.cfg.extend(e)).kdf.execute(n,t.keySize,t.ivSize);e.iv=r.iv;var s=m.encrypt.call(this,t,i,r.key,e);return s.mixIn(r),s},decrypt:function(t,i,n,e){e=this.cfg.extend(e),i=this.Jz(i,e.format);var r=e.kdf.execute(n,t.keySize,t.ivSize,i.salt);return e.iv=r.iv,m.decrypt.call(this,t,i,r.key,e)}})}())}(kq),function(t,i){var n;t.exports=(n=uq.exports,function(){var t=n,i=t.lib.BlockCipher,e=t.algo,r=[],s=[],o=[],h=[],u=[],a=[],f=[],c=[],l=[],d=[];!function(){for(var t=[],i=0;i<256;i++)t[i]=i<128?i<<1:i<<1^283;var n=0,e=0;for(i=0;i<256;i++){var v=e^e<<1^e<<2^e<<3^e<<4;v=v>>>8^255&v^99,r[n]=v,s[v]=n;var y=t[n],S=t[y],m=t[S],b=257*t[v]^16843008*v;o[n]=b<<24|b>>>8,h[n]=b<<16|b>>>16,u[n]=b<<8|b>>>24,a[n]=b,b=16843009*m^65537*S^257*y^16843008*n,f[v]=b<<24|b>>>8,c[v]=b<<16|b>>>16,l[v]=b<<8|b>>>24,d[v]=b,n?(n=y^t[t[t[m^y]]],e^=t[t[e]]):n=e=1}}();var v=[0,1,2,4,8,16,32,64,128,27,54],y=e.AES=i.extend({Oz:function(){if(!this.Qz||this.$z!==this.Uz){for(var t=this.$z=this.Uz,i=t.words,n=t.sigBytes/4,e=4*((this.Qz=n+6)+1),s=this.tE=[],o=0;o<e;o++)o<n?s[o]=i[o]:(a=s[o-1],o%n?n>6&&o%n==4&&(a=r[a>>>24]<<24|r[a>>>16&255]<<16|r[a>>>8&255]<<8|r[255&a]):(a=r[(a=a<<8|a>>>24)>>>24]<<24|r[a>>>16&255]<<16|r[a>>>8&255]<<8|r[255&a],a^=v[o/n|0]<<24),s[o]=s[o-n]^a);for(var h=this.iE=[],u=0;u<e;u++){if(o=e-u,u%4)var a=s[o];else a=s[o-4];h[u]=u<4||o<=4?a:f[r[a>>>24]]^c[r[a>>>16&255]]^l[r[a>>>8&255]]^d[r[255&a]]}}},encryptBlock:function(t,i){this.nE(t,i,this.tE,o,h,u,a,r)},decryptBlock:function(t,i){var n=t[i+1];t[i+1]=t[i+3],t[i+3]=n,this.nE(t,i,this.iE,f,c,l,d,s),n=t[i+1],t[i+1]=t[i+3],t[i+3]=n},nE:function(t,i,n,e,r,s,o,h){for(var u=this.Qz,a=t[i]^n[0],f=t[i+1]^n[1],c=t[i+2]^n[2],l=t[i+3]^n[3],d=4,v=1;v<u;v++){var y=e[a>>>24]^r[f>>>16&255]^s[c>>>8&255]^o[255&l]^n[d++],S=e[f>>>24]^r[c>>>16&255]^s[l>>>8&255]^o[255&a]^n[d++],m=e[c>>>24]^r[l>>>16&255]^s[a>>>8&255]^o[255&f]^n[d++],b=e[l>>>24]^r[a>>>16&255]^s[f>>>8&255]^o[255&c]^n[d++];a=y,f=S,c=m,l=b}y=(h[a>>>24]<<24|h[f>>>16&255]<<16|h[c>>>8&255]<<8|h[255&l])^n[d++],S=(h[f>>>24]<<24|h[c>>>16&255]<<16|h[l>>>8&255]<<8|h[255&a])^n[d++],m=(h[c>>>24]<<24|h[l>>>16&255]<<16|h[a>>>8&255]<<8|h[255&f])^n[d++],b=(h[l>>>24]<<24|h[a>>>16&255]<<16|h[f>>>8&255]<<8|h[255&c])^n[d++],t[i]=y,t[i+1]=S,t[i+2]=m,t[i+3]=b},keySize:8});t.AES=i.Dz(y)}(),n.AES)}(Sq);var xq=Sq.exports,Mq={exports:{}};!function(t,i){var n,e,r;t.exports=((r=uq.exports).mode.CTR=(n=r.lib.BlockCipherMode.extend(),e=n.Encryptor=n.extend({processBlock:function(t,i){var n=this.Yz,e=n.blockSize,r=this.Xz,s=this.eE;r&&(s=this.eE=r.slice(0),this.Xz=void 0);var o=s.slice(0);n.encryptBlock(o,0),s[e-1]=s[e-1]+1|0;for(var h=0;h<e;h++)t[i+h]^=o[h]}}),n.Decryptor=e,n),r.mode.CTR)}(Mq);var Aq=Mq.exports,Fq={exports:{}};!function(t,i){var n;t.exports=((n=uq.exports).pad.NoPadding={pad:function(){},unpad:function(){}},n.pad.NoPadding)}(Fq);var Tq,Cq,Bq=Fq.exports,Lq={"-4":["MDQxMmQ1MWU5MjFhYTMzODUwMWE4ZGYzN2ViZTE4NTU3ZDViYmRlZDg1Yzk0OGI3YTJkMDBmZTNhZGVlMjdjY2VmNzBiMWVlOWI3MDZjMTIwYTAzZDZlZTNkNmYyOTc5Y2E2NGEzN2Y3YjY4N2E1ZjljZWY2ODYxN2I1NWU5ZmJjMA=="],"-3":["MTY0Mzc1MjgwMDAwMA=="],"-2":["aHR0cHM6Ly9qc2xpY2Vuc2luZy5hcmN0aW9uLmNvbS9zZXNzaW9u"],"-1":["WE1MSHR0cFJlcXVlc3Q=","ZG9jdW1lbnQ=","ZGVmYXVsdFZpZXc=","YQ==","Yg==","bGljZW5zZV9leHBpcmF0aW9uX2RhdGU=","bG9jYXRpb24=","aG9zdG5hbWU=","dGVzdF9kb21haW4=","ZG9tYWlucw==","Y3J5cHRv","U2lnbmF0dXJl","RUNEU0E=","U0hBMjI0d2l0aEVDRFNB","YWxn","Y3VydmU=","c2VjcDI1Nmsx","YWRkRXZlbnRMaXN0ZW5lcg==","cmVtb3ZlRXZlbnRMaXN0ZW5lcg==","bG9hZGVuZA==","ZXJyb3I=","YWJvcnQ=","dGltZW91dA==","cmVzcG9uc2VUZXh0","Q29udGVudC1UeXBl","YXBwbGljYXRpb24vanNvbg==","TWVzc2FnZURpZ2VzdA==","c2hhMjU2","Y3J5cHRvanM=","dXBkYXRlU3RyaW5n","ZGlnZXN0","Y29tcGFueQ==","YXBwVGl0bGU=","bGNqcy1zZXNzaW9u","bG9jYWxTdG9yYWdl","Z2V0SXRlbQ==","c2V0SXRlbQ=="],0:["TGljZW5zZQ==","IA==","a2V5","aGFz","ZXhwaXJlZA==","Lg==","dmVyc2lvbg==","aXM=","dG9v","bmV3","b2xk","b3I=","aW52YWxpZA==","MDAwMQ==","SW52YWxpZA==","bnVtYmVy","b2Y=","ZG9tYWlucw==","ZGVwbG95bWVudA==","aW4=","ZG9tYWlu","RGVwbG95bWVudA==","ZG9tYWlu","dmFsaWRhdGlvbg==","ZmFpbGVk","Og==","UE9TVA==","c2VydmVy","cmVzcG9uZGVk","d2l0aA==","dW5leHBlY3RlZA==","dmFsdWU=","cmVxdWVzdA==","VEVTVA==","REVQTE9ZTUVOVA==","S2V5","VGFtcGVyaW5n","YmVlbg==","ZGV0ZWN0ZWQ=","TWlzc2luZw==","bGljZW5zZQ==","aW5mb3JtYXRpb24="]},Iq=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return t.slice(1).reduce((function(i,n){return i+wr.atob(Lq[t[0]][n].toString())}),"")},Oq=!1,Pq=function(){function t(){}return Object.defineProperty(t.prototype,"e",{get:function(){return Oq},set:function(t){Tq=t},enumerable:!1,configurable:!0}),t}(),Dq=wr[Iq(-1,1)][Iq(-1,2)],_q=!1,Rq=function(t,i){var n=new RegExp(".{"+i+"}","g");return(t.match(n)||[]).map((function(t){return parseInt(t,16)}))},zq=function(t,i){var n=new oq("secp256k1").keyFromPublic(Iq(-4,0),"hex"),e=cq(t).toString();return n.verify(e,i)},Eq=function(t){var i,n="";try{var e=t.split("-"),r=e[1],s=e[2],o=e[3];if(!zq(s,o))throw new Error(Iq(0,21,1,2,1,7,1,12,5));var h=dq.parse(s);n=xq.decrypt({ciphertext:dq.parse(r)},h,{mode:Aq,padding:Bq,iv:dq.parse("00000000000000000000000000000001")}).toString(yq)}catch(t){throw new Error(Iq(0,21,1,2,1,7,1,12,5))}try{i=JSON.parse(n)}catch(t){throw new Error(Iq(0,21,1,2,1,7,1,12,5))}if(void 0===i[Iq(-1,5)]||null===i[Iq(-1,4)]||!i[Iq(-1,9)])throw new Error(Iq(0,21,1,2,1,7,1,12,5));var u=parseInt(Iq(-3,0),10)||Number(parseInt(Iq(-3,0),10));if(i[Iq(-1,5)]<u)throw new Error(Iq(0,21,1,2,1,3,1,4,5));var a=!1;try{a=function(t){if(!t)throw new Error(Iq(0,14,1,15,1,16,1,17,1,19,1,18,1,2,5));if(t[Iq(-1,9)].indexOf(Dq[Iq(-1,6)][Iq(-1,7)])>-1)return!0;if(t[Iq(-1,8)]===Dq[Iq(-1,6)][Iq(-1,7)])return!1;throw new Error(Iq(0,14,1,20,5))}(i)}catch(t){throw new Error(Iq(0,14,1,22,5))}return a},Nq=function(t,i){switch(t.slice(0,4)){case"0001":!function(t,i){if(!i)throw new Error(Iq(0,39,1,40,1,41,5));var n=t.split("-"),e=n[1].slice(1),r=n[2],s=n[3];if(!zq(e+"-"+r,s))throw new Error(Iq(0,21,1,2,1,7,1,12,5));for(var o=Uint8Array.from(Rq(r,2)),h=0,u=o.length-1;u>0;u-=1)h+=o[u]*Math.pow(2,8*u);if(h<(parseInt(Iq(-3,0),10)||Number(parseInt(Iq(-3,0),10))))throw new Error(Iq(0,21,1,2,1,3,1,4,5));var a=Int32Array.from(Rq(e,8)),f=fq(i[Iq(-1,31)]).toString(dq),c=Int32Array.from(Rq(f,8)),l=fq(i[Iq(-1,32)]).toString(dq),d=Int32Array.from(Rq(l,8)),v=new Int32Array(c.length);for(u=0;u<v.length;u+=1)v[u]=c[u]^d[u];if(!a.every((function(t,i){return v[i]===t})))throw new Error(Iq(0,21,1,2,1,7,1,12,5))}(t,i);break;default:throw new Error(Iq(0,21,1,2,1,6,1,7,1,8,1,9,1,11,1,10,5))}},Vq=function(t,i,n){void 0===n&&(n=!0),_q=!1;for(var e=i.Js()-1;e>0;)i.fs(e),e=i.Js()-1;var r=i.$v(),s=i.vi(),o=(t||"LICENSE_ERROR").toLowerCase().split("_").join(" ");o=(n?Iq(0,0,1,2,1,23,1,24,25,1):"")+o.charAt(0).toUpperCase()+o.substr(1),r.Pc(i.Rt).$n(new Ee({color:Ae(0,0,0)})).Ys(ir).oi(s).ph(l(0,0)),r.$e(i.Rt).Jn(o).ph({x:s.x/2,y:s.y/2}).lh(20).$n(new Ee({color:Ae(255,0,0)})),i.os(),Object.freeze(i),Object.freeze(qz)},Gq=function(t,i,n){i?(t[Iq(-1,17)](Iq(-1,19),n),t[Iq(-1,17)](Iq(-1,20),n),t[Iq(-1,17)](Iq(-1,21),n),t[Iq(-1,17)](Iq(-1,22),n)):(t[Iq(-1,18)](Iq(-1,19),n),t[Iq(-1,18)](Iq(-1,20),n),t[Iq(-1,18)](Iq(-1,21),n),t[Iq(-1,18)](Iq(-1,22),n))},Hq=function(t){var i=!1,n=!1,e=!1,r="",s="";try{if(Tq){var o=function(t){if(t){var i=t.split("-");return 4===i.length?i[1].startsWith("m")?2:1:0}}(Tq);1===o?(e=!function(t){switch(t.slice(0,4)){case"0001":return Eq(t);default:throw new Error(Iq(0,21,1,2,1,6,1,7,1,8,1,9,1,11,1,10,5))}}(Tq),i=!0):2===o?(Nq(Tq,t),n=!0):(_q=!0,function(t){var i=t.slice(0,4),n=t.slice(5);switch(i){case"0001":n=n.replace(/-/g,"");var e=Uint8Array.from(Rq(n,2)),r=e.slice(36,40),s=new Uint8Array(4),o=function(t){for(var i,n=[],e=0;e<256;e+=1){i=e;for(var r=0;r<8;r+=1)i=1&i?3988292384^i>>>1:i>>>1;n[e]=i}for(var s=-1,o=0;o<t.length;o+=1)s=s>>>8^n[255&(s^t[o])];return(-1^s)>>>0}(e.slice(0,36));new DataView(s.buffer).setUint32(0,o,!0);for(var h=e.slice(28,34),u=0,a=h.length-1;a>0;a-=1)u+=h[a]*Math.pow(2,8*a);if(u<(parseInt(Iq(-3,0),10)||Number(parseInt(Iq(-3,0),10))))throw new Error(Iq(0,0,1,2,1,3,1,4,5));if(r.every((function(t,i){return s[i]===t})))return;break;default:throw new Error(Iq(0,0,1,2,1,6,1,7,1,8,1,9,1,11,1,10,5))}throw new Error(Iq(0,0,1,2,1,7,1,12,5))}(Tq))}else Oq=!0}catch(t){r=t.message,console.error(t)}var h=!(r||Oq||i||n),u=function(){var t=new(Dq[Iq(-1,0)]);return t.open(Iq(0,26),Iq(-2,0)),t.setRequestHeader(Iq(-1,24),Iq(-1,25)),t.withCredentials=!0,t}();if(h){var a=void 0;try{a=parseInt(Tq?Tq.split("-")[1]:Math.floor(1e6*Math.random()).toString(),16)}catch(t){a=Math.floor(1e6*Math.random())}var f=Math.floor(1e6*Math.random());s=(a^f).toString();var c={},l="",d="",v="";Tq=Tq||"";for(var y=Iq(-4,0),S=0;S<Tq.length;S+=1){var m=Tq.charCodeAt(S)^y.charCodeAt(S);l+=String.fromCharCode(m)}for(var b=Iq(-3,0),g=0;g<b.length;g+=1)d+=String.fromCharCode(b.charCodeAt(g)^y.charCodeAt(g));for(var w=0;w<s.length;w+=1)v+=String.fromCharCode(s.charCodeAt(w)^y.charCodeAt(w));c[Iq(-1,3)]=Dq.btoa(l),c[Iq(-1,4)]=Dq.btoa(d),c.h=Dq.btoa(v),c.v=2,c.s=Dq[Iq(-1,34)][Iq(-1,35)](Iq(-1,33))||void 0,u.send(JSON.stringify(c))}return function(t,i){var n=new GK(t,i),o=function(t){if(u.readyState===Dq[Iq(-1,0)].DONE){if(200!==u.status){e="";try{e=t&&"loadend"!==t.type?Iq(0,0,1,23,1,32,1,24,5):JSON.parse(u[Iq(-1,23)]).message,Gq(u,!1,a)}catch(t){console.error(t)}throw Vq(e,n),new Error(Iq(0,0,1,2,1,7,1,12,5)+e)}var i=JSON.parse(u[Iq(-1,23)]);if(!zq(s+Iq(-3,0),i.h)){var e=Iq(0,0,1,27,1,28,1,29,1,30,1,31,5);throw Vq(e,n),new Error(e)}Dq[Iq(-1,34)][Iq(-1,36)](Iq(-1,33),i.s),_q=!1}},a=function(t){o(t)};return Gq(u,!0,a),h?setTimeout((function(){_q&&Vq(Iq(0,25,1,23,1,32,1,24,5),n)}),1e4):Gq(u,!1,a),e?function(t){var i;_q=!1;var n=t.vi(),e=function(){i&&(t.fs(i.us()),i=void 0),(i=t.$v()).$e(t.Rt).Jn(Iq(0,34,1,33)).ph({x:n.x/2,y:n.y/2}).lh(50).ne(13).$n(new Ee({color:Ae(128,128,128,100)})).ah("Arial").yh(500).setMouseInteractions(!1).os()};t.io((function(){e()})),setTimeout(e,0),setInterval((function(){i&&i.us()<t.Js()-1?e():i||e()}),1e3)}(n):r?Vq(r,n):u.readyState===Dq[Iq(-1,0)].DONE&&o(),n}},jq=function(i){var n,e,r,s=function(){};if(new wr.Image instanceof wr.HTMLImageElement){(h=new wr.Image).src=oY,e=new uY({source:h,fitMode:t.ImageFitMode.Stretch});var o=new wr.Image;o.src=eY,r=new uY({source:o,fitMode:t.ImageFitMode.Stretch})}else if(wr.lcjs_setup){var h;(h=new wr.Image).src=oY;var u=wr.lcjs_setup(h.naturalWidth,h.naturalHeight);u.getContext("2d").drawImage(h,0,0),e=new uY({source:u,fitMode:t.ImageFitMode.Stretch}),r=e}else e=new Ee({color:Fe("#f00")}),r=e;var a=function(t){var s=t.Rt.tn();if(t.cl&&(t.rE&&(r?t.cl.$n(r):wr.requestAnimationFrame((function(){return a(t)}))),t.rE||(e?t.cl.$n(e):wr.requestAnimationFrame((function(){return a(t)})))),t.cl){var o=t.rE?iY:rY,h=t.rE?nY:sY,u=t.Rt.x.getInnerEnd()-(3+o)*s.x,f=t.Rt.y.getInnerStart()+3*s.y;t.cl.ph({x:u,y:f}).oi({x:o*s.x,y:h*s.y})}!1===t.rE&&(2610!==oY.length&&Vq(Iq(0,36,1,38,5),i,!1),"M"!==oY[429]&&Vq(Iq(0,36,1,38,5),i,!1)),!0===t.rE&&(3958!==eY.length&&Vq(Iq(0,36,1,38,5),i,!1),"2"!==eY[638]&&Vq(Iq(0,36,1,38,5),i,!1)),n&&n.xn()};return n=i.$v(Number.MAX_SAFE_INTEGER),function(r){var o,h,u={Rt:r,rE:!1};return u.sE=function(){o=wr.setTimeout((function(){h=i.Qr(t.MouseStyles.Point),void 0!==u.cl&&(u.cl.setMouseClickEventHandler(Wq),u.cl.setTouchEndEventHandler(Wq)),u.rE=!0,a(u)}),3e3)},u.oE=function(){wr.clearTimeout(o),i.ts(h),void 0!==u.cl&&(u.cl.setMouseClickEventHandler(s),u.cl.setTouchEndEventHandler(s)),u.rE=!1,a(u)},function(t){t.cl&&t.cl.dispose(),n&&(t.cl=n.Pc(t.Rt).$n(e).setMouseInteractions(!0).setMouseClickEventHandler(s).setTouchEndEventHandler(s).Ys(ir),t.sE&&t.cl.setMouseEnterEventHandler(t.sE),t.oE&&t.cl.setMouseLeaveEventHandler(t.oE),a(t))}(u),{Fe:function(){return a(u)},ro:function(){return function(t){t.cl&&(t.cl.dispose(),t.cl=void 0,t.sE=function(){},t.oE=function(){})}(u)}}}},Wq=function(){return wr.open("https://www.arction.com/lightningchart-js/")},Uq=function(t,i,n){return function(e){var r=t(n,e),s=i?jq(r):void 0,o=new $U(r.ps,e,r,r.ro.bind(r),s);return r.Ks((function(){return o.vB()})).Zs((function(){return o.bi()})).xn(),o}},Yq=function(t,i){t.Ks((function(){i.Tf()})).Zs((function(){return i.bi()})).xn()},Xq=function(t,i,n){return function(e){var r=t(n,e),s=i?jq(r):void 0,o=new yV(r.ps,ZU(r)(0),er,r.ro.bind(r),s);return Yq(r,o),o}},Zq=function(t,i,n){return function(e){var r=t(n,e),s=i?jq(r):void 0,o=new UU(r.ps,ZU(r)(0),er,r.ro.bind(r),s,e);return Yq(r,o),o}},Kq=function(t,i,n){return function(e){var r=t(n,e),s=i?jq(r):void 0,o=new Jj(r.ps,ZU(r)(0),er,r.ro.bind(r),s,e);return Yq(r,o),o}},qq=function(t,i,n){return function(e){var r=t(n,e),s=i?jq(r):void 0,o=new ij(r.ps,ZU(r)(0),er,r.ro.bind(r),s,e);return Yq(r,o),o}},Jq=function(t,i,n){return function(e){var r=t(n,e),s=i?jq(r):void 0,o=new(e&&e.type?e.type:GV)(r.ps,ZU(r)(0),er,r.ro.bind(r),s,void 0,e&&e.theme?e.theme:Gz,e&&e.disableAnimations);return Yq(r,o),o}},Qq=function(t,i,n){return function(e){var r=t(n,e),s=i?jq(r):void 0,o=new(e&&e.type?e.type:Mj)(r.ps,ZU(r)(0),er,r.ro.bind(r),s,void 0,e&&e.theme?e.theme:Gz,e&&e.disableAnimations);return Yq(r,o),o}},$q=function(t,i,n){return function(e){var r=t(n,e),s=i?jq(r):void 0,o=new(e&&e.type?e.type:dj)(r.ps,ZU(r)(0),er,r.ro.bind(r),s,void 0,e&&e.theme?e.theme:Gz,e&&e.disableAnimations);return Yq(r,o),o}},tJ=function(t,i,n){return function(e){var r=t(n,e),s=i?jq(r):void 0,o=new(e&&e.type?e.type:Pj)(r.ps,ZU(r)(0),er,r.ro.bind(r),s,void 0,e&&e.theme?e.theme:Gz,!(!e||!e.disableAnimations));return Yq(r,o),o}},iJ=function(t,i,n){return function(e){var r=t(n,e),s=i?jq(r):void 0,o=new sH(r.ps,ZU(r)(0),er,r.ro.bind(r),s,e,void 0);return Yq(r,o),o}},nJ=function(t,i,n){return function(e){var r=t(n,e),s=i?jq(r):void 0,o=new FG(r.ps,ZU(r)(0),er,r.ro.bind(r),s,void 0,e);return Yq(r,o),o}},eJ={Angola:{name:"Angola",ISO_A3:"AGO"},Burundi:{name:"Burundi",ISO_A3:"BDI"},Benin:{name:"Benin",ISO_A3:"BEN"},"Burkina Faso":{name:"Burkina Faso",ISO_A3:"BFA"},Botswana:{name:"Botswana",ISO_A3:"BWA"},"Central African Republic":{name:"Central African Republic",ISO_A3:"CAF"},"Ivory Coast":{name:"Ivory Coast",ISO_A3:"CIV"},Cameroon:{name:"Cameroon",ISO_A3:"CMR"},"Democratic Republic of the Congo":{name:"Democratic Republic of the Congo",ISO_A3:"COD"},"Republic of Congo":{name:"Republic of Congo",ISO_A3:"COG"},Comoros:{name:"Comoros",ISO_A3:"COM"},"Cape Verde":{name:"Cape Verde",ISO_A3:"CPV"},Djibouti:{name:"Djibouti",ISO_A3:"DJI"},Algeria:{name:"Algeria",ISO_A3:"DZA"},Egypt:{name:"Egypt",ISO_A3:"EGY"},Eritrea:{name:"Eritrea",ISO_A3:"ERI"},Ethiopia:{name:"Ethiopia",ISO_A3:"ETH"},Gabon:{name:"Gabon",ISO_A3:"GAB"},Ghana:{name:"Ghana",ISO_A3:"GHA"},Guinea:{name:"Guinea",ISO_A3:"GIN"},Gambia:{name:"Gambia",ISO_A3:"GMB"},"Guinea Bissau":{name:"Guinea Bissau",ISO_A3:"GNB"},"Equatorial Guinea":{name:"Equatorial Guinea",ISO_A3:"GNQ"},Israel:{name:"Israel",ISO_A3:"ISR"},Jordan:{name:"Jordan",ISO_A3:"JOR"},Kenya:{name:"Kenya",ISO_A3:"KEN"},Lebanon:{name:"Lebanon",ISO_A3:"LBN"},Liberia:{name:"Liberia",ISO_A3:"LBR"},Libya:{name:"Libya",ISO_A3:"LBY"},Lesotho:{name:"Lesotho",ISO_A3:"LSO"},Morocco:{name:"Morocco",ISO_A3:"MAR"},Madagascar:{name:"Madagascar",ISO_A3:"MDG"},Mali:{name:"Mali",ISO_A3:"MLI"},Malta:{name:"Malta",ISO_A3:"MLT"},Mozambique:{name:"Mozambique",ISO_A3:"MOZ"},Mauritania:{name:"Mauritania",ISO_A3:"MRT"},Mauritius:{name:"Mauritius",ISO_A3:"MUS"},Malawi:{name:"Malawi",ISO_A3:"MWI"},Namibia:{name:"Namibia",ISO_A3:"NAM"},Niger:{name:"Niger",ISO_A3:"NER"},Nigeria:{name:"Nigeria",ISO_A3:"NGA"},Oman:{name:"Oman",ISO_A3:"OMN"},Rwanda:{name:"Rwanda",ISO_A3:"RWA"},"Western Sahara":{name:"Western Sahara",ISO_A3:"ESH"},"Saudi Arabia":{name:"Saudi Arabia",ISO_A3:"SAU"},Sudan:{name:"Sudan",ISO_A3:"SDN"},"South Sudan":{name:"South Sudan",ISO_A3:"SSD"},Senegal:{name:"Senegal",ISO_A3:"SEN"},"Saint Helena":{name:"Saint Helena",ISO_A3:"SHN"},"Sierra Leone":{name:"Sierra Leone",ISO_A3:"SLE"},Somalia:{name:"Somalia",ISO_A3:"SOM"},Swaziland:{name:"Swaziland",ISO_A3:"SWZ"},Seychelles:{name:"Seychelles",ISO_A3:"SYC"},Syria:{name:"Syria",ISO_A3:"SYR"},Chad:{name:"Chad",ISO_A3:"TCD"},Togo:{name:"Togo",ISO_A3:"TGO"},Tunisia:{name:"Tunisia",ISO_A3:"TUN"},"United Republic of Tanzania":{name:"United Republic of Tanzania",ISO_A3:"TZA"},Uganda:{name:"Uganda",ISO_A3:"UGA"},Yemen:{name:"Yemen",ISO_A3:"YEM"},"South Africa":{name:"South Africa",ISO_A3:"ZAF"},Zambia:{name:"Zambia",ISO_A3:"ZMB"},Zimbabwe:{name:"Zimbabwe",ISO_A3:"ZWE"}},rJ={Afghanistan:{name:"Afghanistan",ISO_A3:"AFG"},"United Arab Emirates":{name:"United Arab Emirates",ISO_A3:"ARE"},Armenia:{name:"Armenia",ISO_A3:"ARM"},Australia:{name:"Australia",ISO_A3:"AUS"},Azerbaijan:{name:"Azerbaijan",ISO_A3:"AZE"},Bangladesh:{name:"Bangladesh",ISO_A3:"BGD"},Bahrain:{name:"Bahrain",ISO_A3:"BHR"},Brunei:{name:"Brunei",ISO_A3:"BRN"},Bhutan:{name:"Bhutan",ISO_A3:"BTN"},China:{name:"China",ISO_A3:"CHN"},Georgia:{name:"Georgia",ISO_A3:"GEO"},Indonesia:{name:"Indonesia",ISO_A3:"IDN"},India:{name:"India",ISO_A3:"IND"},Iran:{name:"Iran",ISO_A3:"IRN"},Iraq:{name:"Iraq",ISO_A3:"IRQ"},Israel:{name:"Israel",ISO_A3:"ISR"},Jordan:{name:"Jordan",ISO_A3:"JOR"},Japan:{name:"Japan",ISO_A3:"JPN"},Kazakhstan:{name:"Kazakhstan",ISO_A3:"KAZ"},Kyrgyzstan:{name:"Kyrgyzstan",ISO_A3:"KGZ"},Cambodia:{name:"Cambodia",ISO_A3:"KHM"},"South Korea":{name:"South Korea",ISO_A3:"KOR"},Kuwait:{name:"Kuwait",ISO_A3:"KWT"},Laos:{name:"Laos",ISO_A3:"LAO"},Lebanon:{name:"Lebanon",ISO_A3:"LBN"},"Sri Lanka":{name:"Sri Lanka",ISO_A3:"LKA"},Maldives:{name:"Maldives",ISO_A3:"MDV"},Myanmar:{name:"Myanmar",ISO_A3:"MMR"},Mongolia:{name:"Mongolia",ISO_A3:"MNG"},Malaysia:{name:"Malaysia",ISO_A3:"MYS"},Nepal:{name:"Nepal",ISO_A3:"NPL"},Oman:{name:"Oman",ISO_A3:"OMN"},Pakistan:{name:"Pakistan",ISO_A3:"PAK"},Philippines:{name:"Philippines",ISO_A3:"PHL"},"Papua New Guinea":{name:"Papua New Guinea",ISO_A3:"PNG"},"North Korea":{name:"North Korea",ISO_A3:"PRK"},Palestine:{name:"Palestine",ISO_A3:"PSE"},Qatar:{name:"Qatar",ISO_A3:"QAT"},Russia:{name:"Russia",ISO_A3:"RUS"},"Saudi Arabia":{name:"Saudi Arabia",ISO_A3:"SAU"},Singapore:{name:"Singapore",ISO_A3:"SGP"},Syria:{name:"Syria",ISO_A3:"SYR"},Thailand:{name:"Thailand",ISO_A3:"THA"},Tajikistan:{name:"Tajikistan",ISO_A3:"TJK"},Turkmenistan:{name:"Turkmenistan",ISO_A3:"TKM"},Turkey:{name:"Turkey",ISO_A3:"TUR"},Taiwan:{name:"Taiwan",ISO_A3:"TWN"},Uzbekistan:{name:"Uzbekistan",ISO_A3:"UZB"},Vietnam:{name:"Vietnam",ISO_A3:"VNM"},Yemen:{name:"Yemen",ISO_A3:"YEM"}},sJ={"New South Wales":{name:"New South Wales"},Victoria:{name:"Victoria"},Queensland:{name:"Queensland"},"South Australia":{name:"South Australia"},"Western Australia":{name:"Western Australia"},Tasmania:{name:"Tasmania"},"Northern Territory":{name:"Northern Territory"},"Australian Capital Territory":{name:"Australian Capital Territory"},"Other Territories":{name:"Other Territories"}},oJ={"British Columbia":{name:"British Columbia"},Quebec:{name:"Quebec"},Nunavut:{name:"Nunavut"},"Prince Edward Island":{name:"Prince Edward Island"},Saskatchewan:{name:"Saskatchewan"},Yukon:{name:"Yukon"},Manitoba:{name:"Manitoba"},Ontario:{name:"Ontario"},"New Brunswick":{name:"New Brunswick"},"Northwest Territories":{name:"Northwest Territories"},Alberta:{name:"Alberta"},"Newfoundland and Labrador":{name:"Newfoundland and Labrador"},"Nova Scotia":{name:"Nova Scotia"}},hJ={Albania:{name:"Albania",ISO_A3:"ALB"},Austria:{name:"Austria",ISO_A3:"AUT"},Belarus:{name:"Belarus",ISO_A3:"BLR"},Belgium:{name:"Belgium",ISO_A3:"BEL"},Bulgaria:{name:"Bulgaria",ISO_A3:"BGR"},"Bosnia and Herzegovina":{name:"Bosnia and Herzegovina",ISO_A3:"BIH"},Switzerland:{name:"Switzerland",ISO_A3:"CHE"},Cyprus:{name:"Cyprus",ISO_A3:"CYP"},"Czech Republic":{name:"Czech Republic",ISO_A3:"CZE"},Germany:{name:"Germany",ISO_A3:"DEU"},Denmark:{name:"Denmark",ISO_A3:"DNK"},Spain:{name:"Spain",ISO_A3:"ESP"},Estonia:{name:"Estonia",ISO_A3:"EST"},Finland:{name:"Finland",ISO_A3:"FIN"},France:{name:"France",ISO_A3:"FRA"},"United Kingdom":{name:"United Kingdom",ISO_A3:"GBR"},Greece:{name:"Greece",ISO_A3:"GRC"},Croatia:{name:"Croatia",ISO_A3:"HRV"},Hungary:{name:"Hungary",ISO_A3:"HUN"},Ireland:{name:"Ireland",ISO_A3:"IRL"},Iceland:{name:"Iceland",ISO_A3:"ISL"},Italy:{name:"Italy",ISO_A3:"ITA"},Kosovo:{name:"Kosovo",ISO_A3:"-99"},Lithuania:{name:"Lithuania",ISO_A3:"LTU"},Luxembourg:{name:"Luxembourg",ISO_A3:"LUX"},Latvia:{name:"Latvia",ISO_A3:"LVA"},Macedonia:{name:"Macedonia",ISO_A3:"MKD"},Malta:{name:"Malta",ISO_A3:"MLT"},Montenegro:{name:"Montenegro",ISO_A3:"MNE"},Netherlands:{name:"Netherlands",ISO_A3:"NLD"},Norway:{name:"Norway",ISO_A3:"NOR"},Poland:{name:"Poland",ISO_A3:"POL"},Portugal:{name:"Portugal",ISO_A3:"PRT"},Romania:{name:"Romania",ISO_A3:"ROU"},"Republic of Serbia":{name:"Republic of Serbia",ISO_A3:"SRB"},Slovakia:{name:"Slovakia",ISO_A3:"SVK"},Slovenia:{name:"Slovenia",ISO_A3:"SVN"},Sweden:{name:"Sweden",ISO_A3:"SWE"},Ukraine:{name:"Ukraine",ISO_A3:"UKR"},Moldova:{name:"Moldova",ISO_A3:"MDA"},Russia:{name:"Russia",ISO_A3:"RUS"},Turkey:{name:"Turkey",ISO_A3:"TODO"}},uJ={Aruba:{name:"Aruba",ISO_A3:"ABW"},Afghanistan:{name:"Afghanistan",ISO_A3:"AFG"},Angola:{name:"Angola",ISO_A3:"AGO"},Anguilla:{name:"Anguilla",ISO_A3:"AIA"},Albania:{name:"Albania",ISO_A3:"ALB"},Aland:{name:"Aland",ISO_A3:"ALA"},Andorra:{name:"Andorra",ISO_A3:"AND"},"United Arab Emirates":{name:"United Arab Emirates",ISO_A3:"ARE"},Argentina:{name:"Argentina",ISO_A3:"ARG"},Armenia:{name:"Armenia",ISO_A3:"ARM"},"American Samoa":{name:"American Samoa",ISO_A3:"ASM"},Antarctica:{name:"Antarctica",ISO_A3:"ATA"},"French Southern and Antarctic Lands":{name:"French Southern and Antarctic Lands",ISO_A3:"ATF"},"Antigua and Barbuda":{name:"Antigua and Barbuda",ISO_A3:"ATG"},Australia:{name:"Australia",ISO_A3:"AUS"},Austria:{name:"Austria",ISO_A3:"AUT"},Azerbaijan:{name:"Azerbaijan",ISO_A3:"AZE"},Burundi:{name:"Burundi",ISO_A3:"BDI"},Belgium:{name:"Belgium",ISO_A3:"BEL"},Benin:{name:"Benin",ISO_A3:"BEN"},"Burkina Faso":{name:"Burkina Faso",ISO_A3:"BFA"},Bangladesh:{name:"Bangladesh",ISO_A3:"BGD"},Bulgaria:{name:"Bulgaria",ISO_A3:"BGR"},Bahrain:{name:"Bahrain",ISO_A3:"BHR"},"The Bahamas":{name:"The Bahamas",ISO_A3:"BHS"},"Bosnia and Herzegovina":{name:"Bosnia and Herzegovina",ISO_A3:"BIH"},Belarus:{name:"Belarus",ISO_A3:"BLR"},Belize:{name:"Belize",ISO_A3:"BLZ"},Bermuda:{name:"Bermuda",ISO_A3:"BMU"},Bolivia:{name:"Bolivia",ISO_A3:"BOL"},Brazil:{name:"Brazil",ISO_A3:"BRA"},Barbados:{name:"Barbados",ISO_A3:"BRB"},Brunei:{name:"Brunei",ISO_A3:"BRN"},Bhutan:{name:"Bhutan",ISO_A3:"BTN"},Botswana:{name:"Botswana",ISO_A3:"BWA"},"Central African Republic":{name:"Central African Republic",ISO_A3:"CAF"},Canada:{name:"Canada",ISO_A3:"CAN"},Switzerland:{name:"Switzerland",ISO_A3:"CHE"},Chile:{name:"Chile",ISO_A3:"CHL"},China:{name:"China",ISO_A3:"CHN"},"Ivory Coast":{name:"Ivory Coast",ISO_A3:"CIV"},Cameroon:{name:"Cameroon",ISO_A3:"CMR"},"Cyprus No Mans Area":{name:"Cyprus No Mans Area",ISO_A3:"-99"},"Democratic Republic of the Congo":{name:"Democratic Republic of the Congo",ISO_A3:"COD"},"Republic of Congo":{name:"Republic of Congo",ISO_A3:"COG"},"Cook Islands":{name:"Cook Islands",ISO_A3:"COK"},Colombia:{name:"Colombia",ISO_A3:"COL"},Comoros:{name:"Comoros",ISO_A3:"COM"},"Cape Verde":{name:"Cape Verde",ISO_A3:"CPV"},"Costa Rica":{name:"Costa Rica",ISO_A3:"CRI"},Cuba:{name:"Cuba",ISO_A3:"CUB"},"Curaçao":{name:"Curaçao",ISO_A3:"CUW"},"Cayman Islands":{name:"Cayman Islands",ISO_A3:"CYM"},"Northern Cyprus":{name:"Northern Cyprus",ISO_A3:"-99"},Cyprus:{name:"Cyprus",ISO_A3:"CYP"},"Czech Republic":{name:"Czech Republic",ISO_A3:"CZE"},Germany:{name:"Germany",ISO_A3:"DEU"},Djibouti:{name:"Djibouti",ISO_A3:"DJI"},Dominica:{name:"Dominica",ISO_A3:"DMA"},Denmark:{name:"Denmark",ISO_A3:"DNK"},"Dominican Republic":{name:"Dominican Republic",ISO_A3:"DOM"},Algeria:{name:"Algeria",ISO_A3:"DZA"},Ecuador:{name:"Ecuador",ISO_A3:"ECU"},Egypt:{name:"Egypt",ISO_A3:"EGY"},Eritrea:{name:"Eritrea",ISO_A3:"ERI"},"Dhekelia Sovereign Base Area":{name:"Dhekelia Sovereign Base Area",ISO_A3:"-99"},Spain:{name:"Spain",ISO_A3:"ESP"},Estonia:{name:"Estonia",ISO_A3:"EST"},Ethiopia:{name:"Ethiopia",ISO_A3:"ETH"},Finland:{name:"Finland",ISO_A3:"FIN"},Fiji:{name:"Fiji",ISO_A3:"FJI"},"Falkland Islands":{name:"Falkland Islands",ISO_A3:"FLK"},France:{name:"France",ISO_A3:"FRA"},"Faroe Islands":{name:"Faroe Islands",ISO_A3:"FRO"},"Federated States of Micronesia":{name:"Federated States of Micronesia",ISO_A3:"FSM"},Gabon:{name:"Gabon",ISO_A3:"GAB"},"United Kingdom":{name:"United Kingdom",ISO_A3:"GBR"},Georgia:{name:"Georgia",ISO_A3:"GEO"},Guernsey:{name:"Guernsey",ISO_A3:"GGY"},Ghana:{name:"Ghana",ISO_A3:"GHA"},Guinea:{name:"Guinea",ISO_A3:"GIN"},Gambia:{name:"Gambia",ISO_A3:"GMB"},"Guinea Bissau":{name:"Guinea Bissau",ISO_A3:"GNB"},"Equatorial Guinea":{name:"Equatorial Guinea",ISO_A3:"GNQ"},Greece:{name:"Greece",ISO_A3:"GRC"},Grenada:{name:"Grenada",ISO_A3:"GRD"},Greenland:{name:"Greenland",ISO_A3:"GRL"},Guatemala:{name:"Guatemala",ISO_A3:"GTM"},Guam:{name:"Guam",ISO_A3:"GUM"},Guyana:{name:"Guyana",ISO_A3:"GUY"},"Hong Kong S.A.R.":{name:"Hong Kong S.A.R.",ISO_A3:"HKG"},"Heard Island and McDonald Islands":{name:"Heard Island and McDonald Islands",ISO_A3:"HMD"},Honduras:{name:"Honduras",ISO_A3:"HND"},Croatia:{name:"Croatia",ISO_A3:"HRV"},Haiti:{name:"Haiti",ISO_A3:"HTI"},Hungary:{name:"Hungary",ISO_A3:"HUN"},Indonesia:{name:"Indonesia",ISO_A3:"IDN"},"Isle of Man":{name:"Isle of Man",ISO_A3:"IMN"},India:{name:"India",ISO_A3:"IND"},"Indian Ocean Territories":{name:"Indian Ocean Territories",ISO_A3:"-99"},"British Indian Ocean Territory":{name:"British Indian Ocean Territory",ISO_A3:"IOT"},Ireland:{name:"Ireland",ISO_A3:"IRL"},Iran:{name:"Iran",ISO_A3:"IRN"},Iraq:{name:"Iraq",ISO_A3:"IRQ"},Iceland:{name:"Iceland",ISO_A3:"ISL"},Israel:{name:"Israel",ISO_A3:"ISR"},Italy:{name:"Italy",ISO_A3:"ITA"},Jamaica:{name:"Jamaica",ISO_A3:"JAM"},Jersey:{name:"Jersey",ISO_A3:"JEY"},Jordan:{name:"Jordan",ISO_A3:"JOR"},Japan:{name:"Japan",ISO_A3:"JPN"},"Baykonur Cosmodrome":{name:"Baykonur Cosmodrome",ISO_A3:"-99"},"Siachen Glacier":{name:"Siachen Glacier",ISO_A3:"-99"},Kazakhstan:{name:"Kazakhstan",ISO_A3:"KAZ"},Kenya:{name:"Kenya",ISO_A3:"KEN"},Kyrgyzstan:{name:"Kyrgyzstan",ISO_A3:"KGZ"},Cambodia:{name:"Cambodia",ISO_A3:"KHM"},Kiribati:{name:"Kiribati",ISO_A3:"KIR"},"Saint Kitts and Nevis":{name:"Saint Kitts and Nevis",ISO_A3:"KNA"},"South Korea":{name:"South Korea",ISO_A3:"KOR"},Kosovo:{name:"Kosovo",ISO_A3:"-99"},Kuwait:{name:"Kuwait",ISO_A3:"KWT"},Laos:{name:"Laos",ISO_A3:"LAO"},Lebanon:{name:"Lebanon",ISO_A3:"LBN"},Liberia:{name:"Liberia",ISO_A3:"LBR"},Libya:{name:"Libya",ISO_A3:"LBY"},"Saint Lucia":{name:"Saint Lucia",ISO_A3:"LCA"},Liechtenstein:{name:"Liechtenstein",ISO_A3:"LIE"},"Sri Lanka":{name:"Sri Lanka",ISO_A3:"LKA"},Lesotho:{name:"Lesotho",ISO_A3:"LSO"},Lithuania:{name:"Lithuania",ISO_A3:"LTU"},Luxembourg:{name:"Luxembourg",ISO_A3:"LUX"},Latvia:{name:"Latvia",ISO_A3:"LVA"},"Macao S.A.R":{name:"Macao S.A.R",ISO_A3:"MAC"},"Saint Martin":{name:"Saint Martin",ISO_A3:"MAF"},Morocco:{name:"Morocco",ISO_A3:"MAR"},Moldova:{name:"Moldova",ISO_A3:"MDA"},Madagascar:{name:"Madagascar",ISO_A3:"MDG"},Maldives:{name:"Maldives",ISO_A3:"MDV"},Mexico:{name:"Mexico",ISO_A3:"MEX"},"Marshall Islands":{name:"Marshall Islands",ISO_A3:"MHL"},Macedonia:{name:"Macedonia",ISO_A3:"MKD"},Mali:{name:"Mali",ISO_A3:"MLI"},Malta:{name:"Malta",ISO_A3:"MLT"},Myanmar:{name:"Myanmar",ISO_A3:"MMR"},Montenegro:{name:"Montenegro",ISO_A3:"MNE"},Mongolia:{name:"Mongolia",ISO_A3:"MNG"},"Northern Mariana Islands":{name:"Northern Mariana Islands",ISO_A3:"MNP"},Mozambique:{name:"Mozambique",ISO_A3:"MOZ"},Mauritania:{name:"Mauritania",ISO_A3:"MRT"},Montserrat:{name:"Montserrat",ISO_A3:"MSR"},Mauritius:{name:"Mauritius",ISO_A3:"MUS"},Malawi:{name:"Malawi",ISO_A3:"MWI"},Malaysia:{name:"Malaysia",ISO_A3:"MYS"},Namibia:{name:"Namibia",ISO_A3:"NAM"},"New Caledonia":{name:"New Caledonia",ISO_A3:"NCL"},Niger:{name:"Niger",ISO_A3:"NER"},Nigeria:{name:"Nigeria",ISO_A3:"NGA"},Nicaragua:{name:"Nicaragua",ISO_A3:"NIC"},Niue:{name:"Niue",ISO_A3:"NIU"},Netherlands:{name:"Netherlands",ISO_A3:"NLD"},Norway:{name:"Norway",ISO_A3:"NOR"},Nepal:{name:"Nepal",ISO_A3:"NPL"},"New Zealand":{name:"New Zealand",ISO_A3:"NZL"},Oman:{name:"Oman",ISO_A3:"OMN"},Pakistan:{name:"Pakistan",ISO_A3:"PAK"},Panama:{name:"Panama",ISO_A3:"PAN"},"Pitcairn Islands":{name:"Pitcairn Islands",ISO_A3:"PCN"},Peru:{name:"Peru",ISO_A3:"PER"},"Spratly Islands":{name:"Spratly Islands",ISO_A3:"-99"},Philippines:{name:"Philippines",ISO_A3:"PHL"},Palau:{name:"Palau",ISO_A3:"PLW"},"Papua New Guinea":{name:"Papua New Guinea",ISO_A3:"PNG"},Poland:{name:"Poland",ISO_A3:"POL"},"Puerto Rico":{name:"Puerto Rico",ISO_A3:"PRI"},"North Korea":{name:"North Korea",ISO_A3:"PRK"},Portugal:{name:"Portugal",ISO_A3:"PRT"},Paraguay:{name:"Paraguay",ISO_A3:"PRY"},Palestine:{name:"Palestine",ISO_A3:"PSE"},"French Polynesia":{name:"French Polynesia",ISO_A3:"PYF"},Qatar:{name:"Qatar",ISO_A3:"QAT"},Romania:{name:"Romania",ISO_A3:"ROU"},Russia:{name:"Russia",ISO_A3:"RUS"},Rwanda:{name:"Rwanda",ISO_A3:"RWA"},"Western Sahara":{name:"Western Sahara",ISO_A3:"ESH"},"Saudi Arabia":{name:"Saudi Arabia",ISO_A3:"SAU"},Sudan:{name:"Sudan",ISO_A3:"SDN"},"South Sudan":{name:"South Sudan",ISO_A3:"SSD"},Senegal:{name:"Senegal",ISO_A3:"SEN"},Singapore:{name:"Singapore",ISO_A3:"SGP"},"South Georgia and South Sandwich Islands":{name:"South Georgia and South Sandwich Islands",ISO_A3:"SGS"},"Saint Helena":{name:"Saint Helena",ISO_A3:"SHN"},"Solomon Islands":{name:"Solomon Islands",ISO_A3:"SLB"},"Sierra Leone":{name:"Sierra Leone",ISO_A3:"SLE"},"El Salvador":{name:"El Salvador",ISO_A3:"SLV"},Somalia:{name:"Somalia",ISO_A3:"SOM"},"Saint Pierre and Miquelon":{name:"Saint Pierre and Miquelon",ISO_A3:"SPM"},"Republic of Serbia":{name:"Republic of Serbia",ISO_A3:"SRB"},"Sao Tome and Principe":{name:"Sao Tome and Principe",ISO_A3:"STP"},Suriname:{name:"Suriname",ISO_A3:"SUR"},Slovakia:{name:"Slovakia",ISO_A3:"SVK"},Slovenia:{name:"Slovenia",ISO_A3:"SVN"},Sweden:{name:"Sweden",ISO_A3:"SWE"},Swaziland:{name:"Swaziland",ISO_A3:"SWZ"},Seychelles:{name:"Seychelles",ISO_A3:"SYC"},Syria:{name:"Syria",ISO_A3:"SYR"},"Turks and Caicos Islands":{name:"Turks and Caicos Islands",ISO_A3:"TCA"},Chad:{name:"Chad",ISO_A3:"TCD"},Togo:{name:"Togo",ISO_A3:"TGO"},Thailand:{name:"Thailand",ISO_A3:"THA"},Tajikistan:{name:"Tajikistan",ISO_A3:"TJK"},Turkmenistan:{name:"Turkmenistan",ISO_A3:"TKM"},"East Timor":{name:"East Timor",ISO_A3:"TLS"},Tonga:{name:"Tonga",ISO_A3:"TON"},"Trinidad and Tobago":{name:"Trinidad and Tobago",ISO_A3:"TTO"},Tunisia:{name:"Tunisia",ISO_A3:"TUN"},Turkey:{name:"Turkey",ISO_A3:"TUR"},Tuvalu:{name:"Tuvalu",ISO_A3:"TUV"},Taiwan:{name:"Taiwan",ISO_A3:"TWN"},"United Republic of Tanzania":{name:"United Republic of Tanzania",ISO_A3:"TZA"},Uganda:{name:"Uganda",ISO_A3:"UGA"},Ukraine:{name:"Ukraine",ISO_A3:"UKR"},"United States Minor Outlying Islands":{name:"United States Minor Outlying Islands",ISO_A3:"UMI"},Uruguay:{name:"Uruguay",ISO_A3:"URY"},"United States of America":{name:"United States of America",ISO_A3:"USA"},"US Naval Base Guantanamo Bay":{name:"US Naval Base Guantanamo Bay",ISO_A3:"-99"},Uzbekistan:{name:"Uzbekistan",ISO_A3:"UZB"},"Saint Vincent and the Grenadines":{name:"Saint Vincent and the Grenadines",ISO_A3:"VCT"},Venezuela:{name:"Venezuela",ISO_A3:"VEN"},"British Virgin Islands":{name:"British Virgin Islands",ISO_A3:"VGB"},"United States Virgin Islands":{name:"United States Virgin Islands",ISO_A3:"VIR"},Vietnam:{name:"Vietnam",ISO_A3:"VNM"},Vanuatu:{name:"Vanuatu",ISO_A3:"VUT"},"Wallis and Futuna":{name:"Wallis and Futuna",ISO_A3:"WLF"},"Akrotiri Sovereign Base Area":{name:"Akrotiri Sovereign Base Area",ISO_A3:"-99"},Samoa:{name:"Samoa",ISO_A3:"WSM"},Yemen:{name:"Yemen",ISO_A3:"YEM"},"South Africa":{name:"South Africa",ISO_A3:"ZAF"},Zambia:{name:"Zambia",ISO_A3:"ZMB"},Zimbabwe:{name:"Zimbabwe",ISO_A3:"ZWE"},"French Guyana":{name:"French Guyana",ISO_A3:"GUF"}},aJ={Alabama:{name:"Alabama"},Alaska:{name:"Alaska"},Arizona:{name:"Arizona"},Arkansas:{name:"Arkansas"},California:{name:"California"},Colorado:{name:"Colorado"},Connecticut:{name:"Connecticut"},Delaware:{name:"Delaware"},"District of Columbia":{name:"District of Columbia"},Florida:{name:"Florida"},Georgia:{name:"Georgia"},Hawaii:{name:"Hawaii"},Idaho:{name:"Idaho"},Illinois:{name:"Illinois"},Indiana:{name:"Indiana"},Iowa:{name:"Iowa"},Kansas:{name:"Kansas"},Kentucky:{name:"Kentucky"},Louisiana:{name:"Louisiana"},Maine:{name:"Maine"},Maryland:{name:"Maryland"},Massachusetts:{name:"Massachusetts"},Michigan:{name:"Michigan"},Minnesota:{name:"Minnesota"},Mississippi:{name:"Mississippi"},Missouri:{name:"Missouri"},Montana:{name:"Montana"},Nebraska:{name:"Nebraska"},Nevada:{name:"Nevada"},"New Hampshire":{name:"New Hampshire"},"New Jersey":{name:"New Jersey"},"New Mexico":{name:"New Mexico"},"New York":{name:"New York"},"North Carolina":{name:"North Carolina"},"North Dakota":{name:"North Dakota"},Ohio:{name:"Ohio"},Oklahoma:{name:"Oklahoma"},Oregon:{name:"Oregon"},Pennsylvania:{name:"Pennsylvania"},"Rhode Island":{name:"Rhode Island"},"South Carolina":{name:"South Carolina"},"South Dakota":{name:"South Dakota"},Tennessee:{name:"Tennessee"},Texas:{name:"Texas"},Utah:{name:"Utah"},Vermont:{name:"Vermont"},Virginia:{name:"Virginia"},Washington:{name:"Washington"},"West Virginia":{name:"West Virginia"},Wisconsin:{name:"Wisconsin"},Wyoming:{name:"Wyoming"}},fJ={Anguilla:{name:"Anguilla",ISO_A3:"AIA"},"Antigua and Barbuda":{name:"Antigua and Barbuda",ISO_A3:"ATG"},"The Bahamas":{name:"The Bahamas",ISO_A3:"BHS"},Bermuda:{name:"Bermuda",ISO_A3:"BMU"},Barbados:{name:"Barbados",ISO_A3:"BRB"},Canada:{name:"Canada",ISO_A3:"CAN"},Cuba:{name:"Cuba",ISO_A3:"CUB"},"Cayman Islands":{name:"Cayman Islands",ISO_A3:"CYM"},Dominica:{name:"Dominica",ISO_A3:"DMA"},"Dominican Republic":{name:"Dominican Republic",ISO_A3:"DOM"},Grenada:{name:"Grenada",ISO_A3:"GRD"},Greenland:{name:"Greenland",ISO_A3:"GRL"},Haiti:{name:"Haiti",ISO_A3:"HTI"},Jamaica:{name:"Jamaica",ISO_A3:"JAM"},"Saint Kitts and Nevis":{name:"Saint Kitts and Nevis",ISO_A3:"KNA"},"Saint Lucia":{name:"Saint Lucia",ISO_A3:"LCA"},"Saint Martin":{name:"Saint Martin",ISO_A3:"MAF"},Mexico:{name:"Mexico",ISO_A3:"MEX"},Montserrat:{name:"Montserrat",ISO_A3:"MSR"},"Puerto Rico":{name:"Puerto Rico",ISO_A3:"PRI"},"Saint Pierre and Miquelon":{name:"Saint Pierre and Miquelon",ISO_A3:"SPM"},"Turks and Caicos Islands":{name:"Turks and Caicos Islands",ISO_A3:"TCA"},"Trinidad and Tobago":{name:"Trinidad and Tobago",ISO_A3:"TTO"},"United States of America":{name:"United States of America",ISO_A3:"USA"},"Saint Vincent and the Grenadines":{name:"Saint Vincent and the Grenadines",ISO_A3:"VCT"},"British Virgin Islands":{name:"British Virgin Islands",ISO_A3:"VGB"},"United States Virgin Islands":{name:"United States Virgin Islands",ISO_A3:"VIR"}},cJ={Argentina:{name:"Argentina",ISO_A3:"ARG"},Bolivia:{name:"Bolivia",ISO_A3:"BOL"},Brazil:{name:"Brazil",ISO_A3:"BRA"},Chile:{name:"Chile",ISO_A3:"CHL"},Colombia:{name:"Colombia",ISO_A3:"COL"},"Costa Rica":{name:"Costa Rica",ISO_A3:"CRI"},Ecuador:{name:"Ecuador",ISO_A3:"ECU"},"Falkland Islands":{name:"Falkland Islands",ISO_A3:"FLK"},Guyana:{name:"Guyana",ISO_A3:"GUY"},Nicaragua:{name:"Nicaragua",ISO_A3:"NIC"},Panama:{name:"Panama",ISO_A3:"PAN"},Peru:{name:"Peru",ISO_A3:"PER"},Paraguay:{name:"Paraguay",ISO_A3:"PRY"},Suriname:{name:"Suriname",ISO_A3:"SUR"},Uruguay:{name:"Uruguay",ISO_A3:"URY"},Venezuela:{name:"Venezuela",ISO_A3:"VEN"},"French Guyana":{name:"French Guyana",ISO_A3:"GUF"},Guatemala:{name:"Guatemala",ISO_A3:"GTM"},"El Salvador":{name:"El Salvador",ISO_A3:"SLV"},Honduras:{name:"Honduras",ISO_A3:"HND"}},lJ={World:uJ,USA:aJ,NorthAmerica:fJ,SouthAmerica:cJ,Canada:oJ,Europe:hJ,Asia:rJ,Africa:eJ,Australia:sJ},dJ={Solid:Mj},vJ={None:vN,Rectangle:pN,Circle:kN,Diamond:xN,Pointer:MN},yJ={Rectangle:pN,Circle:kN,Diamond:xN},SJ={XY:zH},mJ={XY:RH,Spider:UG,Map:ZG,Polar:UG},bJ={None:yN,UIRectangle:pN,UICircle:kN,UIDiamond:xN};return t.AbstractAxisTick=rh,t.Animation=$o,t.AnimationEasings=Qo,t.Animator=th,t.AreaRangeSeries=wU,t.AreaSeries=dU,t.AreaSeriesBipolar=mU,t.AreaSeriesMonopolar=vU,t.AreaSeriesNegative=SU,t.AreaSeriesPositive=yU,t.AreaSeriesTypes=bU,t.AuroraBorealisTheme=Kd,t.AutoCursor2DBuilder=GG,t.AutoCursorBuilders=mJ,t.AutoCursorXYBuilder=PH,t.AutoFitStrategies=PG,t.AutoFitStrategy=LG,t.Axis=uV,t.Axis3D=ZV,t.AxisScrollStrategies=Ho,t.AxisTickStrategies=jo,t.Band=rN,t.BasicSeries=KH,t.BasicSeries3D=eG,t.BlueSciFiTheme=dS,t.BorderedPicture=mN,t.BoxAndWhiskers=aW,t.BoxFigure=uW,t.BoxSeries=fU,t.BoxSeries3D=rG,t.Button=HN,t.Chart=mV,t.Chart3D=FG,t.ChartComponent=nN,t.ChartMarker=VH,t.ChartMarker2D=GH,t.ChartMarkerXY=HH,t.ChartWithCursor=rH,t.ChartWithSeries=bG,t.ChartXY=UU,t.ClassicTheme=xS,t.Color=xe,t.ColorCSS=function(t){try{if(t.startsWith("rgba")){var i=t.substr(5).slice(0,-1),n=JSON.parse("["+i+"]");return Ae(n[0],n[1],n[2],255*n[3])}if(t.startsWith("rgb")){i=t.substr(4).slice(0,-1),n=JSON.parse("["+i+"]");return Ae(n[0],n[1],n[2])}if(t.startsWith("hsl")){n=t.substr(4).slice(0,-1).split(",").map(parseFloat);var e=Ce(n[0],n[1],n[2]);return Ae(e[0],e[1],e[2])}return t.startsWith("#")||t.startsWith("0x")?Fe(t):Fe(Le(t))}catch(t){}return console.warn("ColorCSS parsing error: "+t),Fe("#fff")},t.ColorHEX=Fe,t.ColorHSV=Te,t.ColorPalettes=ou,t.ColorRGBA=Ae,t.ColorShadingStyles=iG,t.ConstantLine=sN,t.CursorBuilder=VG,t.CursorBuilderXY=OH,t.CustomTick=$E,t.CustomizableFigure=oW,t.DarkGradientTheme=zS,t.DarkTheme=Qa,t.Dashboard=$U,t.DataPatterns=DW,t.DateTimeTickStrategy=Oh,t.DateTimeUnits=Th,t.DefaultCameraStrategy=wG,t.EllipseFigure=jW,t.EllipseSeries=WW,t.EmptyAxisTickStrategy=Uo,t.EmptyFill=_e,t.EmptyPointMarker=yN,t.EmptyPoints3D=hh,t.EmptyUIElement=dN,t.Figure=rW,t.FigureSeries=sW,t.FontSettings=sh,t.FormattingFunctions=_o,t.FreeFormPattern=pW,t.FunnelChart=fj,t.FunnelChartTypes=yj,t.FunnelChartWithLabelsInsideSlices=vj,t.FunnelChartWithLabelsOnSides=dj,t.FunnelSlice=sj,t.GaugeChart=Sj,t.GaugeChartTypes=dJ,t.GaugeSlice=bj,t.GenericAxis=eh,t.GreenTheme=gb,t.HeatmapGridSeries=BU,t.HeatmapGridSeriesIntensityValues=LU,t.HeatmapScrollingGridSeries=IU,t.HeatmapScrollingGridSeriesIntensityValues=OU,t.Highlighter=eN,t.HorizontalPattern=FW,t.HorizontalProgressivePattern=TW,t.HorizontalRegressivePattern=CW,t.ImageFill=uY,t.IndividualPointFill=Ne,t.IntensityGridSeries=MU,t.IntensityMeshSeries=AU,t.IntensitySeries=kU,t.IntensitySeriesTypes=FU,t.InternalAutoCursor=EG,t.InternalAutoCursorXY=IH,t.InternalCustomTick=tN,t.InternalFunnelSlice=oj,t.InternalPieSlice=MV,t.InternalPolarAxisRadial=dH,t.InternalPyramidSlice=Fj,t.InternalResultTable=RG,t.InternalSolidGaugeSlice=wj,t.InternalStaticCursor=NG,t.InternalStaticCursorXY=LH,t.InternalTableContentBuilder=_G,t.InternalUIElement=JE,t.InternalUILUTRange=UN,t.LUT=De,t.LavenderGradientTheme=Gb,t.LavenderTheme=Fb,t.LegendBoxBuilders=rV,t.LightGradientTheme=ig,t.LightGreenTheme=Bw,t.LightPurpleTheme=ek,t.LightRedTheme=fz,t.LightTheme=Ac,t.LineAndPointSeries3D=sG,t.LineSeries=RW,t.LineSeries3D=oG,t.LineStyle=$e,t.LinearGradientFill=Qe,t.LinearGradientFillPalette=ur,t.LipstickTheme=Zk,t.MapChart=sH,t.MapRegions=lJ,t.MapRegionsAfrica=eJ,t.MapRegionsAsia=rJ,t.MapRegionsAustralia=sJ,t.MapRegionsCanada=oJ,t.MapRegionsEurope=hJ,t.MapRegionsNorthAmerica=fJ,t.MapRegionsSouthAmerica=cJ,t.MapRegionsUSA=aJ,t.MapRegionsWorld=uJ,t.MapTypes=qG,t.MarkerBuilders=SJ,t.MonochromeTheme=kA,t.NewSurfaceGridSeries3D=MG,t.NightTheme=UT,t.NumericTickStrategy=Eh,t.OHLCBar=lW,t.OHLCCandleStick=cW,t.OHLCFigure=fW,t.OHLCFigures=dW,t.OHLCSeries=sU,t.OHLCSeriesTraditional=oU,t.OHLCSeriesTypes=uU,t.OHLCSeriesWithAutomaticPacking=hU,t.OnScreenMenu=TU,t.OnScreenMenuAnimationsButton=P_,t.OnScreenMenuButton=A_,t.OnScreenMenuButtonIconsDark=Jh,t.OnScreenMenuButtonIconsLight=qh,t.OnScreenMenuControlBase=x_,t.OnScreenMenuCustomButton=__,t.OnScreenMenuOsmToggleButton=R_,t.OnScreenMenuToggleButton=F_,t.OnScreenMenuZoomInButton=T_,t.OnScreenMenuZoomInXButton=C_,t.OnScreenMenuZoomInYButton=B_,t.OnScreenMenuZoomOutButton=L_,t.OnScreenMenuZoomOutXButton=I_,t.OnScreenMenuZoomOutYButton=O_,t.OnScreenMenuZoomToFitButton=D_,t.PalettedFill=Ve,t.Panel=dV,t.PhongShadingStyle=$V,t.Picture=SN,t.PieChart=CV,t.PieChartTypes=jV,t.PieChartWithLabelsInsideSlices=HV,t.PieChartWithLabelsOnSides=GV,t.PieSlice=xV,t.PixelatedPoints3D=fh,t.PointCloudSeries3D=fG,t.PointLineSeries=SW,t.PointLineSeries3D=hG,t.PointMarkers=bJ,t.PointSeries=pU,t.PointSeries3D=aG,t.PointSeriesTypes3D=cG,t.PointStyle3D=ch,t.PolarAreaSeries=QH,t.PolarAreaSeriesInterior=$H,t.PolarAxis=aH,t.PolarAxisAmplitude=cH,t.PolarAxisTick=fH,t.PolarChart=ij,t.PolarLineSeries=AH,t.PolarPointLineSeries=FH,t.PolarPointSeries=TH,t.PolarPolygon=CH,t.PolarPolygonSeries=JH,t.PolarSector=SH,t.PolarSeries=gH,t.PolygonFigure=NW,t.PolygonSeries=VW,t.ProgressivePattern=xW,t.PurpleTheme=TB,t.PyramidChart=Lj,t.PyramidChartTypes=_j,t.PyramidChartWithLabelsInsideSlices=Dj,t.PyramidChartWithLabelsOnSides=Pj,t.PyramidSlice=Aj,t.RadialGauge=mj,t.RadialGradientFill=Je,t.RadialGradientFillPalette=hr,t.Rainbow=vI,t.RangeSeries=cU,t.RaspberryTheme=xk,t.RectangleFigure=zW,t.RectangleSeries=EW,t.RedTheme=JO,t.SegmentFigure=GW,t.SegmentSeries=HW,t.Series2D=bH,t.Series3D=nG,t.SeriesMarkerXY=jH,t.SeriesXY=WH,t.SimpleFigureSeries=hW,t.SimpleShadingStyle=JV,t.Slice=pV,t.SliceLabelFormatters=wV,t.SliceSorters=gV,t.SolidFill=Ee,t.SolidFillPalette=or,t.SolidGauge=Mj,t.SolidGaugeSlice=gj,t.SolidLine=nr,t.SpiderAxis=Vj,t.SpiderChart=Jj,t.SpiderSeries=Hj,t.SplineSeries=wW,t.StaticCursor2DBuilder=HG,t.StaticCursorXYBuilder=DH,t.StepSeries=_W,t.SunsetTheme=k_,t.SurfaceGridSeries3D=vG,t.SurfaceMeshSeries3D=yG,t.SurfaceScrollingGridSeries3D=AG,t.SurfaceSeries3D=lG,t.SurfaceSeriesTypes3D=SG,t.TableContentBuilder=DG,t.Themes=Vz,t.Tick=sV,t.Tick3D=KV,t.TickStyle=vh,t.TimeFormattingFunctions=Xh,t.TimeTickStrategy=Kh,t.TriangulatedPoints3D=ah,t.UIBackgrounds=vJ,t.UIButtonPictures=yJ,t.UICircle=kN,t.UIColumnGrid=LN,t.UIDiamond=xN,t.UIElementBuilders=eV,t.UIElementColumn=CN,t.UIElementLine=FN,t.UIElementRow=TN,t.UIElementWithBackground=QE,t.UIEmptyBackground=vN,t.UILabel=gN,t.UILabelAndTick=QN,t.UILayoutBuilders=TG,t.UILayoutGap=AN,t.UILegendBoxPanel=CG,t.UIObject=XE,t.UIOrigins=lz,t.UIPanel=yV,t.UIPointer=MN,t.UIPolygon=bN,t.UIRectangle=pN,t.UIRowGrid=IN,t.VerticalPattern=IW,t.VerticalProgressivePattern=OW,t.VerticalRegressivePattern=PW,t.VisibleFill=ze,t.VisibleTicks=yh,t.ZoomBandChart=XU,t.customComplexTheme=function(t,i){var n,r,s=i,u={};if(s.font){var a=new sh({family:s.font});u={chartTitleFont:a,spiderScaleLabelFont:a,spiderAxisLabelFont:a,sliceLabelFont:a,axisTitleFont:a,axisLabelFont:a,axisNumericTickStrategy:t.numericTickStrategy.setMajorTickStyle((function(t){return t.setLabelFont(a)})).setExtremeTickStyle((function(t){return t instanceof yh&&t.setLabelFont(a),t})).setMinorTickStyle((function(t){return t instanceof yh&&t.setLabelFont(a),t})),axisDateTimeTickStrategy:t.dateTimeTickStrategy.setMajorTickStyle((function(t){return t.setLabelFont(a)})).setGreatTickStyle((function(t){return t instanceof yh&&t.setLabelFont(a),t})).setMinorTickStyle((function(t){return t instanceof yh&&t.setLabelFont(a),t})),uiFont:a}}var f={dashboardBackgroundFillStyle:s.dashboard&&s.dashboard.fill?vS("fill",s.dashboard.fill):void 0,dashboardSplitterStyle:s.dashboard&&s.dashboard.splitter?vS("line",s.dashboard.splitter,10):void 0,chartTitleFillStyle:s.chart&&s.chart.title?vS("fill",s.chart.title):void 0,seriesBackgroundFillStyle:s.chart&&s.chart.backGroundFill?vS("fill",s.chart.backGroundFill):void 0,panelBackgroundFillStyle:s.chart&&s.chart.panelFill?vS("fill",s.chart.panelFill):void 0,spiderSeriesFillStyle:s.spider&&s.spider.fill?vS("fill",s.spider.fill):void 0,spiderWebStyle:s.spider&&s.spider.web?vS("line",s.spider.web):void 0,spiderAxisStyle:s.spider&&s.spider.axis?vS("line",s.spider.axis,3):void 0,spiderAxisNibStyle:s.spider&&s.spider.axisNib?vS("line",s.spider.axisNib,2):void 0,spiderSeriesStrokeStyle:s.spider&&s.spider.stroke?vS("line",s.spider.stroke,2):void 0,spiderAxisLabelFillStyle:s.spider&&s.spider.axisLabel?vS("fill",s.spider.axisLabel):void 0,spiderScaleLabelFillStyle:s.spider&&s.spider.seriesLabel?vS("fill",s.spider.seriesLabel):void 0,sliceLabelConnectorStyle:s.sliceChart&&s.sliceChart.connector?vS("line",s.sliceChart.connector):void 0,sliceLabelFillStyle:s.sliceChart&&s.sliceChart.label?vS("fill",s.sliceChart.label):void 0,gaugeBackgroundStrokeStyle:s.gauge&&s.gauge.stroke?vS("line",s.gauge.stroke):void 0,gaugeBackgroundFillStyle:s.gauge&&s.gauge.backgroundFill?vS("fill",s.gauge.backgroundFill):void 0,gaugeSliceFillStyle:s.gauge&&s.gauge.sliceFill?vS("fill",s.gauge.sliceFill):void 0,axisTitleFillStyle:s.axis&&s.axis.title?vS("fill",s.axis.title):void 0,axisStyle:s.axis&&s.axis.axes?vS("line",s.axis.axes,3):void 0,axisOverlayStyle:s.axis&&s.axis.overlay?vS("line",s.axis.overlay):void 0,numericTickStrategy:s.axis&&s.axis.tick&&s.axis.grid&&s.axis.label?t.numericTickStrategy.setMajorTickStyle((function(t){return t.setLabelFillStyle(vS("fill",s.axis.label)).setGridStrokeStyle(vS("line",s.axis.grid)).setTickStyle(vS("line",s.axis.tick))})):void 0,dateTimeTickStrategy:s.axis&&s.axis.tick&&s.axis.grid&&s.axis.label?t.dateTimeTickStrategy.setMajorTickStyle((function(t){return t.setLabelFillStyle(vS("fill",s.axis.label)).setGridStrokeStyle(vS("line",s.axis.grid)).setTickStyle(vS("line",s.axis.tick))})):void 0,axisNibStyle:s.axis&&s.axis.nib?vS("line",s.axis.nib,3):void 0,axisNibOverlayStyle:s.axis&&s.axis.nibOverlay?vS("fill",s.axis.nibOverlay):void 0,bandFillStyle:s.band&&s.band.fill?vS("fill",s.band.fill):void 0,constantLineStrokeStyle:s.constantline&&s.constantline.stroke?vS("fill",s.constantline.stroke,5):void 0,seriesFillStyle:s.series&&s.series.fill?vS("fill",s.series.fill):void 0,seriesStrokeStyle:s.series&&s.series.stroke?vS("line",s.series.stroke):void 0,seriesPointFillStyle:s.series&&s.series.pointFill?vS("fill",s.series.pointFill):void 0,mountainsFillStyle:s.mountains&&s.mountains.fill?vS("fill",s.mountains.fill):void 0,mountainsStrokeStyle:s.mountains&&s.mountains.stroke?vS("line",s.mountains.stroke):void 0,mountainsInvertedFillStyle:s.mountains&&s.mountains.invertedFill?vS("fill",s.mountains.invertedFill):void 0,mountainsInvertedStrokeStyle:s.mountains&&s.mountains.invertedStroke?vS("line",s.mountains.invertedStroke):void 0,candleStickStyle:s.candlestick&&s.candlestick.fill?vS("line",s.candlestick.fill):void 0,candleStickPositiveStyle:s.candlestick&&s.candlestick.positive?vS("fill",s.candlestick.positive):void 0,candleStickNegativeStyle:s.candlestick&&s.candlestick.negative?vS("fill",s.candlestick.negative):void 0,boxFigureStyle:s.box&&s.box.fill?vS("fill",s.box.fill):void 0,boxFigureStrokeStyle:s.box&&s.box.stroke?vS("line",s.box.stroke,3):void 0,boxFigureLineStyle:s.box&&s.box.line?vS("line",s.box.line,3):void 0,boxFigureMedianLineStyle:s.box&&s.box.median?vS("line",s.box.median,5):void 0,pointMarkerFillStyle:s.point&&s.point.fill?vS("fill",s.point.fill):void 0,pointMarkerStrokeStyle:s.point&&s.point.stroke?vS("line",s.point.stroke):void 0,pointMarkerHorizontalGridStrokeStyle:s.point&&s.point.horizontalGrid?vS("line",s.point.horizontalGrid):void 0,pointMarkerVerticalGridStrokeStyle:s.point&&s.point.verticalGrid?vS("line",s.point.verticalGrid):void 0,pointMarkerTextFillStyle:s.point&&s.point.text?vS("fill",s.point.text):void 0,resultTableFillStyle:s.result&&s.result.fill?vS("fill",s.result.fill):void 0,resultTableStrokeStyle:s.result&&s.result.stroke?vS("line",s.result.stroke):void 0,resultTableTextFillStyle:s.result&&s.result.text?vS("fill",s.result.text):void 0,uiBackgroundFillStyle:s.ui&&s.ui.fill?vS("fill",s.ui.fill):void 0,uiBackgroundStrokeStyle:s.ui&&s.ui.stroke?vS("line",s.ui.stroke):void 0,uiTextFillStyle:s.ui&&s.ui.text?vS("fill",s.ui.text):void 0,uiButtonFillStyle:s.ui&&s.ui.button?vS("fill",s.ui.button):void 0,customTickMarkerFillStyle:s.customTick&&s.customTick.fill?vS("fill",s.customTick.fill):void 0,customTickGridStrokeStyle:s.customTick&&s.customTick.grid?vS("line",s.customTick.grid,3):void 0,customTickMarkerStrokeStyle:s.customTick&&s.customTick.stroke?vS("line",s.customTick.stroke,1):void 0};try{for(var c=o(Object.entries(f)),l=c.next();!l.done;l=c.next()){var d=h(l.value,2),v=d[0];void 0===d[1]&&delete f[v]}}catch(t){n={error:t}}finally{try{l&&!l.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}return e(e(e({},t),u),f)},t.customSimpleTheme=function(t,i,n,r){void 0===n&&(n=Qa);var s,o,h,u=new Ee({color:t}),a=new Ee({color:t.getLighter()}),f=new Ee({color:t.getDarker()}),c=!0,l={};i?(h=new Ee({color:i}),s=new Ee({color:i.getLighter()}),o=new Ee({color:i.getDarker()})):(s=a,o=f,h=u);var d=n.seriesBackgroundFillStyle instanceof Ee?n.seriesBackgroundFillStyle.getColor():new xe({});(d.getR()>180||d.getG()>180||d.getB()>180)&&(c=!1);var v={chartTitleFillStyle:u,uiTextFillStyle:h,uiButtonFillStyle:u,uiBackgroundStrokeStyle:new nr({fillStyle:u}),sliceLabelFillStyle:c?a:f,sliceLabelConnectorStyle:new nr({fillStyle:c?s:o}),spiderScaleLabelFillStyle:u,spiderAxisLabelFillStyle:c?a:f,spiderSeriesFillStyle:s,spiderSeriesStrokeStyle:new nr({fillStyle:h,thickness:2}),seriesPointFillStyle:o,seriesStrokeStyle:new nr({fillStyle:h,thickness:1}),seriesFillStyle:h,axisLabelFillStyle:c?a:f,numericTickStrategy:n.numericTickStrategy.setMajorTickStyle((function(t){return t.setLabelFillStyle(c?a:f)})).setExtremeTickStyle((function(t){return t instanceof yh&&t.setLabelFillStyle(c?a:f),t})).setMinorTickStyle((function(i){return i instanceof yh&&i.setLabelFillStyle(new Ee(c?{color:t.getDarker()}:{color:t.getLighter()})),i})),dateTimeTickStrategy:n.dateTimeTickStrategy.setMajorTickStyle((function(t){return t.setLabelFillStyle(c?a:f)})).setMinorTickStyle((function(i){return i instanceof yh&&i.setLabelFillStyle(new Ee(c?{color:t.getDarker()}:{color:t.getLighter()})),i})),axisTitleFillStyle:c?o:s,resultTableTextFillStyle:c?s:o,resultTableStrokeStyle:new nr({fillStyle:c?f:a}),customTickMarkerStrokeStyle:new nr({fillStyle:c?f:a}),mountainsFillStyle:h,mountainsInvertedFillStyle:c?f:a,mountainsStrokeStyle:new nr({fillStyle:c?s:o}),mountainsInvertedStrokeStyle:new nr({fillStyle:c?a:f}),gaugeSliceFillStyle:h,pointMarkerTextFillStyle:u};if(r){var y=new sh({family:r});l={chartTitleFont:y,spiderScaleLabelFont:y,spiderAxisLabelFont:y,sliceLabelFont:y,axisTitleFont:y,axisLabelFont:y,axisNumericTickStrategyFont:v.numericTickStrategy.setMajorTickStyle((function(t){return t.setLabelFont(y)})).setExtremeTickStyle((function(t){return t instanceof yh&&t.setLabelFont(y),t})).setMinorTickStyle((function(t){return t instanceof yh&&t.setLabelFont(y),t})),axisDateTimeTickStrategyFont:v.dateTimeTickStrategy.setMajorTickStyle((function(t){return t.setLabelFont(y)})).setGreatTickStyle((function(t){return t instanceof yh&&t.setLabelFont(y),t})).setMinorTickStyle((function(t){return t instanceof yh&&t.setLabelFont(y),t})),uiFont:y}}return e(e(e({},n),v),l)},t.customTheme=yS,t.defaultOsmBackgroundColor=wz,t.emptyFill=Re,t.emptyLine=ir,t.emptyPoints3D=uh,t.emptyTick=mh,t.formatLongitudeLatitude=uH,t.lightningChart=function(t,i){var n="object"==typeof t?t.license:t,e="object"==typeof t?t.licenseInformation:i,r="object"==typeof t?t:void 0,s=new Pq;return s.e=n||"",Cq||(Cq=Hq(e)),function(t,i,n){return{Dashboard:Uq(t,i,n),ChartXY:Zq(t,i,n),Spider:Kq(t,i,n),Polar:qq(t,i,n),Pie:Jq(t,i,n),UIPanel:Xq(t,i,n),Gauge:Qq(t,i,n),Funnel:$q(t,i,n),Pyramid:tJ(t,i,n),Chart3D:nJ(t,i,n),Map:iJ(t,i,n)}}(Cq,s.e,r)},t.onScreenMenuControlBaseHeight=yz,t.onScreenMenuControlBaseWidth=Sz,t.onScreenMenuControlOpacity=mz,t.onScreenMenuDefaultButtonShape=gz,t.onScreenMenuSpriteURL=bz,t.saveToFile=fV,t.synchronizeAxisIntervals=ar,t.translatePoint=sr,t.translatePoint3D=function(t,i,n){if("axes"===i.id&&"world"===n.id)return i.chart.hS.lR(t);if("world"===i.id&&"axes"===n.id)return i.chart.hS.dR(t);if(i.id===n.id)return t;throw new Error("LC JS translatePoint3D misusage | originCoordinateSystem and targetCoordinateSystem arguments must be either Chart3D.world or Chart3D.axes")},t.transparentFill=dz,t.transparentLine=vz,t.vec3Utils=Ls,t.xDimensionStrategy=Qj,t.yDimensionStrategy=$j,Object.defineProperty(t,"hE",{value:!0}),t}({});