(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4467],{tjlA:function(e,t,r){"use strict";/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */var n=r("H7XF"),i=r("kVK+"),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function createBuffer(e){if(e>2147483647)throw RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,Buffer.prototype),t}function Buffer(e,t,r){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return allocUnsafe(e)}return from(e,t,r)}function from(e,t,r){if("string"==typeof e)return function(e,t){if(("string"!=typeof t||""===t)&&(t="utf8"),!Buffer.isEncoding(t))throw TypeError("Unknown encoding: "+t);var r=0|byteLength(e,t),n=createBuffer(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(isInstance(e,Uint8Array)){var t=new Uint8Array(e);return fromArrayBuffer(t.buffer,t.byteOffset,t.byteLength)}return fromArrayLike(e)}(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(isInstance(e,ArrayBuffer)||e&&isInstance(e.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(isInstance(e,SharedArrayBuffer)||e&&isInstance(e.buffer,SharedArrayBuffer)))return fromArrayBuffer(e,t,r);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return Buffer.from(n,t,r);var i=function(e){if(Buffer.isBuffer(e)){var t,r=0|checked(e.length),n=createBuffer(r);return 0===n.length||e.copy(n,0,0,r),n}return void 0!==e.length?"number"!=typeof e.length||(t=e.length)!=t?createBuffer(0):fromArrayLike(e):"Buffer"===e.type&&Array.isArray(e.data)?fromArrayLike(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return Buffer.from(e[Symbol.toPrimitive]("string"),t,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function assertSize(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function allocUnsafe(e){return assertSize(e),createBuffer(e<0?0:0|checked(e))}function fromArrayLike(e){for(var t=e.length<0?0:0|checked(e.length),r=createBuffer(t),n=0;n=2147483647)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function byteLength(e,t){if(Buffer.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||isInstance(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return utf8ToBytes(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return base64ToBytes(e).length;default:if(i)return n?-1:utf8ToBytes(e).length;t=(""+t).toLowerCase(),i=!0}}function slowToString(e,t,r){var i,o,a=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=t;o2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),(o=r=+r)!=o&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return -1;r=e.length-1}else if(r<0){if(!i)return -1;r=0}if("string"==typeof t&&(t=Buffer.from(t,n)),Buffer.isBuffer(t))return 0===t.length?-1:arrayIndexOf(e,t,r,n,i);if("number"==typeof t)return(t&=255,"function"==typeof Uint8Array.prototype.indexOf)?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):arrayIndexOf(e,[t],r,n,i);throw TypeError("val must be string, number or Buffer")}function arrayIndexOf(e,t,r,n,i){var o,a=1,u=e.length,s=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return -1;a=2,u/=2,s/=2,r/=2}function read(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var l=-1;for(o=r;ou&&(r=u-s),o=r;o>=0;o--){for(var c=!0,h=0;h239?4:l>223?3:l>191?2:1;if(i+h<=r)switch(h){case 1:l<128&&(c=l);break;case 2:(192&(o=e[i+1]))==128&&(s=(31&l)<<6|63&o)>127&&(c=s);break;case 3:o=e[i+1],a=e[i+2],(192&o)==128&&(192&a)==128&&(s=(15&l)<<12|(63&o)<<6|63&a)>2047&&(s<55296||s>57343)&&(c=s);break;case 4:o=e[i+1],a=e[i+2],u=e[i+3],(192&o)==128&&(192&a)==128&&(192&u)==128&&(s=(15&l)<<18|(63&o)<<12|(63&a)<<6|63&u)>65535&&s<1114112&&(c=s)}null===c?(c=65533,h=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=h}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);for(var r="",n=0;nr)throw RangeError("Trying to access beyond buffer length")}function checkInt(e,t,r,n,i,o){if(!Buffer.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw RangeError("Index out of range")}function checkIEEE754(e,t,r,n,i,o){if(r+n>e.length||r<0)throw RangeError("Index out of range")}function writeFloat(e,t,r,n,o){return t=+t,r>>>=0,o||checkIEEE754(e,t,r,4,34028234663852886e22,-34028234663852886e22),i.write(e,t,r,n,23,4),r+4}function writeDouble(e,t,r,n,o){return t=+t,r>>>=0,o||checkIEEE754(e,t,r,8,17976931348623157e292,-17976931348623157e292),i.write(e,t,r,n,52,8),r+8}t.lW=Buffer,t.h2=50,Buffer.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),Buffer.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(Buffer.prototype,"parent",{enumerable:!0,get:function(){if(Buffer.isBuffer(this))return this.buffer}}),Object.defineProperty(Buffer.prototype,"offset",{enumerable:!0,get:function(){if(Buffer.isBuffer(this))return this.byteOffset}}),Buffer.poolSize=8192,Buffer.from=function(e,t,r){return from(e,t,r)},Object.setPrototypeOf(Buffer.prototype,Uint8Array.prototype),Object.setPrototypeOf(Buffer,Uint8Array),Buffer.alloc=function(e,t,r){return(assertSize(e),e<=0)?createBuffer(e):void 0!==t?"string"==typeof r?createBuffer(e).fill(t,r):createBuffer(e).fill(t):createBuffer(e)},Buffer.allocUnsafe=function(e){return allocUnsafe(e)},Buffer.allocUnsafeSlow=function(e){return allocUnsafe(e)},Buffer.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==Buffer.prototype},Buffer.compare=function(e,t){if(isInstance(e,Uint8Array)&&(e=Buffer.from(e,e.offset,e.byteLength)),isInstance(t,Uint8Array)&&(t=Buffer.from(t,t.offset,t.byteLength)),!Buffer.isBuffer(e)||!Buffer.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);in.length?Buffer.from(o).copy(n,i):Uint8Array.prototype.set.call(n,o,i);else if(Buffer.isBuffer(o))o.copy(n,i);else throw TypeError('"list" argument must be an Array of Buffers');i+=o.length}return n},Buffer.byteLength=byteLength,Buffer.prototype._isBuffer=!0,Buffer.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;tr&&(e+=" ... "),""},o&&(Buffer.prototype[o]=Buffer.prototype.inspect),Buffer.prototype.compare=function(e,t,r,n,i){if(isInstance(e,Uint8Array)&&(e=Buffer.from(e,e.offset,e.byteLength)),!Buffer.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return -1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;for(var o=i-n,a=r-t,u=Math.min(o,a),s=this.slice(n,i),l=e.slice(t,r),c=0;c>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i,o,a,u,s,l,c,h,p=this.length-t;if((void 0===r||r>p)&&(r=p),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var d=!1;;)switch(n){case"hex":return function(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=t.length;n>o/2&&(n=o/2);for(var a=0;a>8,i.push(r%256),i.push(n);return i}(e,this.length-c),this,c,h);default:if(d)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),d=!0}},Buffer.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},Buffer.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||checkOffset(e,t,this.length);for(var n=this[e],i=1,o=0;++o>>=0,t>>>=0,r||checkOffset(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},Buffer.prototype.readUint8=Buffer.prototype.readUInt8=function(e,t){return e>>>=0,t||checkOffset(e,1,this.length),this[e]},Buffer.prototype.readUint16LE=Buffer.prototype.readUInt16LE=function(e,t){return e>>>=0,t||checkOffset(e,2,this.length),this[e]|this[e+1]<<8},Buffer.prototype.readUint16BE=Buffer.prototype.readUInt16BE=function(e,t){return e>>>=0,t||checkOffset(e,2,this.length),this[e]<<8|this[e+1]},Buffer.prototype.readUint32LE=Buffer.prototype.readUInt32LE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},Buffer.prototype.readUint32BE=Buffer.prototype.readUInt32BE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},Buffer.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||checkOffset(e,t,this.length);for(var n=this[e],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*t)),n},Buffer.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||checkOffset(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},Buffer.prototype.readInt8=function(e,t){return(e>>>=0,t||checkOffset(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},Buffer.prototype.readInt16LE=function(e,t){e>>>=0,t||checkOffset(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},Buffer.prototype.readInt16BE=function(e,t){e>>>=0,t||checkOffset(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},Buffer.prototype.readInt32LE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},Buffer.prototype.readInt32BE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},Buffer.prototype.readFloatLE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),i.read(this,e,!0,23,4)},Buffer.prototype.readFloatBE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),i.read(this,e,!1,23,4)},Buffer.prototype.readDoubleLE=function(e,t){return e>>>=0,t||checkOffset(e,8,this.length),i.read(this,e,!0,52,8)},Buffer.prototype.readDoubleBE=function(e,t){return e>>>=0,t||checkOffset(e,8,this.length),i.read(this,e,!1,52,8)},Buffer.prototype.writeUintLE=Buffer.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;checkInt(this,e,t,r,i,0)}var o=1,a=0;for(this[t]=255&e;++a>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;checkInt(this,e,t,r,i,0)}var o=r-1,a=1;for(this[t+o]=255&e;--o>=0&&(a*=256);)this[t+o]=e/a&255;return t+r},Buffer.prototype.writeUint8=Buffer.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,1,255,0),this[t]=255&e,t+1},Buffer.prototype.writeUint16LE=Buffer.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},Buffer.prototype.writeUint16BE=Buffer.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},Buffer.prototype.writeUint32LE=Buffer.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},Buffer.prototype.writeUint32BE=Buffer.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},Buffer.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);checkInt(this,e,t,r,i-1,-i)}var o=0,a=1,u=0;for(this[t]=255&e;++o>0)-u&255;return t+r},Buffer.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);checkInt(this,e,t,r,i-1,-i)}var o=r-1,a=1,u=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===u&&0!==this[t+o+1]&&(u=1),this[t+o]=(e/a>>0)-u&255;return t+r},Buffer.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},Buffer.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},Buffer.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},Buffer.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},Buffer.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},Buffer.prototype.writeFloatLE=function(e,t,r){return writeFloat(this,e,t,!0,r)},Buffer.prototype.writeFloatBE=function(e,t,r){return writeFloat(this,e,t,!1,r)},Buffer.prototype.writeDoubleLE=function(e,t,r){return writeDouble(this,e,t,!0,r)},Buffer.prototype.writeDoubleBE=function(e,t,r){return writeDouble(this,e,t,!1,r)},Buffer.prototype.copy=function(e,t,r,n){if(!Buffer.isBuffer(e))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i55295&&r<57344){if(!i){if(r>56319||a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return o}function base64ToBytes(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(a,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function blitBuffer(e,t,r,n){for(var i=0;i=t.length)&&!(i>=e.length);++i)t[i+r]=e[i];return i}function isInstance(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}var u=function(){for(var e="0123456789abcdef",t=Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)t[n+i]=e[r]+e[i];return t}()},q8gk:function(e){"use strict";let t=/[\p{Lu}]/u,r=/[\p{Ll}]/u,n=/^[\p{Lu}](?![\p{Lu}])/gu,i=/([\p{Alpha}\p{N}_]|$)/u,o=/[_.\- ]+/,a=RegExp("^"+o.source),u=RegExp(o.source+i.source,"gu"),s=RegExp("\\d+"+i.source,"gu"),preserveCamelCase=(e,n,i)=>{let o=!1,a=!1,u=!1;for(let s=0;s(n.lastIndex=0,e.replace(n,e=>t(e))),postProcess=(e,t)=>(u.lastIndex=0,s.lastIndex=0,e.replace(u,(e,r)=>t(r)).replace(s,e=>t(e))),camelCase=(e,t)=>{if(!("string"==typeof e||Array.isArray(e)))throw TypeError("Expected the input to be `string | string[]`");if(t={pascalCase:!1,preserveConsecutiveUppercase:!1,...t},0===(e=Array.isArray(e)?e.map(e=>e.trim()).filter(e=>e.length).join("-"):e.trim()).length)return"";let r=!1===t.locale?e=>e.toLowerCase():e=>e.toLocaleLowerCase(t.locale),n=!1===t.locale?e=>e.toUpperCase():e=>e.toLocaleUpperCase(t.locale);if(1===e.length)return t.pascalCase?n(e):r(e);let i=e!==r(e);return i&&(e=preserveCamelCase(e,r,n)),e=e.replace(a,""),e=t.preserveConsecutiveUppercase?preserveConsecutiveUppercase(e,r):r(e),t.pascalCase&&(e=n(e.charAt(0))+e.slice(1)),postProcess(e,n)};e.exports=camelCase,e.exports.default=camelCase},Mk1v:function(e,t,r){"use strict";r.d(t,{Z:function(){return g}});var n=r("pxuU"),i=r("uaMf"),o=function(){if("undefined"!=typeof window){if(window.devicePixelRatio)return window.devicePixelRatio;var e=window.screen;if(e)return(e.deviceXDPI||1)/(e.logicalXDPI||1)}return 1}(),a={toTextLines:function(e){var t,r=[];for(e=[].concat(e);e.length;)"string"==typeof(t=e.pop())?r.unshift.apply(r,t.split("\n")):Array.isArray(t)?e.push.apply(e,t):(0,n.k)(e)||r.unshift(""+t);return r},textSize:function(e,t,r){var n,i=[].concat(t),o=i.length,a=e.font,u=0;for(n=0,e.font=r.string;nr.right&&(n|=2),tr.bottom&&(n|=4),n}function compute$1(e,t){var r,n,i=t.anchor,o=e;return t.clamp&&(o=function(e,t){for(var r,n,i,o=e.x0,a=e.y0,u=e.x1,s=e.y1,l=region(o,a,t),c=region(u,s,t);l|c&&!(l&c);)8&(r=l||c)?(n=o+(u-o)*(t.top-a)/(s-a),i=t.top):4&r?(n=o+(u-o)*(t.bottom-a)/(s-a),i=t.bottom):2&r?(i=a+(s-a)*(t.right-o)/(u-o),n=t.right):1&r&&(i=a+(s-a)*(t.left-o)/(u-o),n=t.left),r===l?l=region(o=n,a=i,t):c=region(u=n,s=i,t);return{x0:o,x1:u,y0:a,y1:s}}(o,t.area)),"start"===i?(r=o.x0,n=o.y0):"end"===i?(r=o.x1,n=o.y1):(r=(o.x0+o.x1)/2,n=(o.y0+o.y1)/2),function(e,t,r,n,i){switch(i){case"center":r=n=0;break;case"bottom":r=0,n=1;break;case"right":r=1,n=0;break;case"left":r=-1,n=0;break;case"top":r=0,n=-1;break;case"start":r=-r,n=-n;break;case"end":break;default:i*=Math.PI/180,r=Math.cos(i),n=Math.sin(i)}return{x:e,y:t,vx:r,vy:n}}(r,n,e.vx,e.vy,t.align)}var u={arc:function(e,t){var r=(e.startAngle+e.endAngle)/2,n=Math.cos(r),i=Math.sin(r),o=e.innerRadius,a=e.outerRadius;return compute$1({x0:e.x+n*o,y0:e.y+i*o,x1:e.x+n*a,y1:e.y+i*a,vx:n,vy:i},t)},point:function(e,t){var r=orient(e,t.origin),n=r.x*e.options.radius,i=r.y*e.options.radius;return compute$1({x0:e.x-n,y0:e.y-i,x1:e.x+n,y1:e.y+i,vx:r.x,vy:r.y},t)},bar:function(e,t){var r=orient(e,t.origin),n=e.x,i=e.y,o=0,a=0;return e.horizontal?(n=Math.min(e.x,e.base),o=Math.abs(e.base-e.x)):(i=Math.min(e.y,e.base),a=Math.abs(e.base-e.y)),compute$1({x0:n,y0:i+a,x1:n+o,y1:i,vx:r.x,vy:r.y},t)},fallback:function(e,t){var r=orient(e,t.origin);return compute$1({x0:e.x,y0:e.y,x1:e.x,y1:e.y,vx:r.x,vy:r.y},t)}},s=a.rasterize,Label=function(e,t,r,n){this._config=e,this._index=n,this._model=null,this._rects=null,this._ctx=t,this._el=r};(0,n.V)(Label.prototype,{_modelize:function(e,t,r,o){var s,l=this._index,c=(0,n.O)((0,n.a)([r.font,{}],o,l)),h=(0,n.a)([r.color,i.ce.color],o,l);return{align:(0,n.a)([r.align,"center"],o,l),anchor:(0,n.a)([r.anchor,"center"],o,l),area:o.chart.chartArea,backgroundColor:(0,n.a)([r.backgroundColor,null],o,l),borderColor:(0,n.a)([r.borderColor,null],o,l),borderRadius:(0,n.a)([r.borderRadius,0],o,l),borderWidth:(0,n.a)([r.borderWidth,0],o,l),clamp:(0,n.a)([r.clamp,!1],o,l),clip:(0,n.a)([r.clip,!1],o,l),color:h,display:e,font:c,lines:t,offset:(0,n.a)([r.offset,0],o,l),opacity:(0,n.a)([r.opacity,1],o,l),origin:function(e,t){var r=t.chart.getDatasetMeta(t.datasetIndex).vScale;if(!r)return null;if(void 0!==r.xCenter&&void 0!==r.yCenter)return{x:r.xCenter,y:r.yCenter};var n=r.getBasePixel();return e.horizontal?{x:n,y:null}:{x:null,y:n}}(this._el,o),padding:(0,n.K)((0,n.a)([r.padding,0],o,l)),positioner:(s=this._el)instanceof i.qi?u.arc:s instanceof i.od?u.point:s instanceof i.ZL?u.bar:u.fallback,rotation:(0,n.a)([r.rotation,0],o,l)*(Math.PI/180),size:a.textSize(this._ctx,t,c),textAlign:(0,n.a)([r.textAlign,"start"],o,l),textShadowBlur:(0,n.a)([r.textShadowBlur,0],o,l),textShadowColor:(0,n.a)([r.textShadowColor,h],o,l),textStrokeColor:(0,n.a)([r.textStrokeColor,h],o,l),textStrokeWidth:(0,n.a)([r.textStrokeWidth,0],o,l)}},update:function(e){var t,r,i,o,u,s,l,c,h,p,d=null,g=null,y=this._index,b=this._config,m=(0,n.a)([b.display,!0],e,y);m&&(t=e.dataset.data[y],r=(0,n.v)((0,n.C)(b.formatter,[t,e]),t),(i=(0,n.k)(r)?[]:a.toTextLines(r)).length)&&(u=(o=d=this._modelize(m,i,b,e)).borderWidth||0,s=o.padding,l=o.size.height,h=-(c=o.size.width)/2,p=-l/2,g={frame:{x:h-s.left-u,y:p-s.top-u,w:c+s.width+2*u,h:l+s.height+2*u},text:{x:h,y:p,w:c,h:l}}),this._model=d,this._rects=g},geometry:function(){return this._rects?this._rects.frame:{}},rotation:function(){return this._model?this._model.rotation:0},visible:function(){return this._model&&this._model.opacity},model:function(){return this._model},draw:function(e,t){var r,n,i,o,u,l=e.ctx,c=this._model,h=this._rects;this.visible()&&(l.save(),c.clip&&(u=c.area,l.beginPath(),l.rect(u.left,u.top,u.right-u.left,u.bottom-u.top),l.clip()),l.globalAlpha=a.bound(0,c.opacity,1),l.translate(s(t.x),s(t.y)),l.rotate(c.rotation),r=h.frame,n=c.backgroundColor,i=c.borderColor,o=c.borderWidth,(n||i&&o)&&(l.beginPath(),function(e,t,r,n,i,o){var a=Math.PI/2;if(o){var u=Math.min(o,i/2,n/2),s=t+u,l=r+u,c=t+n-u,h=r+i-u;e.moveTo(t,l),st.x+t.w+2||e.y>t.y+t.h+2)},intersects:function(e){var t,r,n,i=this._points(),o=e._points(),a=[toAxis(i[0],i[1]),toAxis(i[0],i[3])];for(this._rotation!==e._rotation&&a.push(toAxis(o[0],o[1]),toAxis(o[0],o[3])),t=0;te.getProps([t],!0)[t]}),o=n.geometry(),a=coordinates(u,n.model(),o),i._box.update(a,o,n.rotation()));!function(e,t){var r,n,i,o;for(r=e.length-1;r>=0;--r)for(i=e[r].$layout,n=r-1;n>=0&&i._visible;--n)(o=e[n].$layout)._visible&&i._box.intersects(o._box)&&t(i,o)}(e,function(e,t){var r=e._hidable,n=t._hidable;r&&n||n?t._visible=!1:r&&(e._visible=!1)})}(e)},lookup:function(e,t){var r,n;for(r=e.length-1;r>=0;--r)if((n=e[r].$layout)&&n._visible&&n._box.contains(t))return e[r];return null},draw:function(e,t){var r,n,i,o,a,u;for(r=0,n=t.length;r_attachContext(e,t,r,n),override:i=>_attachContext(e.override(i),t,r,n)};return new Proxy(i,{deleteProperty:(t,r)=>(delete t[r],delete e[r],!0),get:(e,t,r)=>_cached(e,t,()=>(function(e,t,r){let{_proxy:n,_context:i,_subProxy:o,_descriptors:a}=e,u=n[t];return isFunction(u)&&a.isScriptable(t)&&(u=function(e,t,r,n){let{_proxy:i,_context:o,_subProxy:a,_stack:u}=r;if(u.has(e))throw Error("Recursion detected: "+Array.from(u).join("->")+"->"+e);return u.add(e),t=t(o,a||n),u.delete(e),needsSubResolver(e,t)&&(t=createSubResolver(i._scopes,i,e,t)),t}(t,u,e,r)),isArray(u)&&u.length&&(u=function(e,t,r,n){let{_proxy:i,_context:o,_subProxy:a,_descriptors:u}=r;if(defined(o.index)&&n(e))t=t[o.index%t.length];else if(isObject(t[0])){let r=t,n=i._scopes.filter(e=>e!==r);for(let s of(t=[],r)){let r=createSubResolver(n,i,e,s);t.push(_attachContext(r,o,a&&a[e],u))}}return t}(t,u,e,a.isIndexable)),needsSubResolver(t,u)&&(u=_attachContext(u,i,o&&o[t],a)),u})(e,t,r)),getOwnPropertyDescriptor:(t,r)=>t._descriptors.allKeys?Reflect.has(e,r)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,r),getPrototypeOf:()=>Reflect.getPrototypeOf(e),has:(t,r)=>Reflect.has(e,r),ownKeys:()=>Reflect.ownKeys(e),set:(t,r,n)=>(e[r]=n,delete t[r],!0)})}},aA:function(){return getRtlAdapter},aB:function(){return overrideTextDirection},aC:function(){return _textX},aD:function(){return restoreTextDirection},aE:function(){return drawPointLegend},aF:function(){return noop},aG:function(){return distanceBetweenPoints},aH:function(){return _setMinAndMaxByKey},aI:function(){return niceNum},aJ:function(){return almostWhole},aK:function(){return almostEquals},aL:function(){return _decimalPlaces},aM:function(){return _longestText},aN:function(){return _filterBetween},aO:function(){return _lookup},aa:function(){return _createResolver},ab:function(){return _descriptors},ac:function(){return mergeIf},ad:function(){return o},ae:function(){return debounce},af:function(){return retinaScale},ag:function(){return clearCanvas},ah:function(){return setsEqual},ai:function(){return _elementsEqual},aj:function(){return _isClickEvent},ak:function(){return _isBetween},al:function(){return _readValueToProps},am:function(){return _updateBezierControlPoints},an:function(){return _computeSegments},ao:function(){return _boundSegments},ap:function(){return _steppedInterpolation},aq:function(){return _bezierInterpolation},ar:function(){return _pointInLine},as:function(){return _steppedLineTo},at:function(){return _bezierCurveTo},au:function(){return drawPoint},av:function(){return addRoundedRectPath},aw:function(){return toTRBL},ax:function(){return toTRBLCorners},ay:function(){return _boundSegment},az:function(){return _normalizeAngle},b:function(){return isArray},c:function(){return color},d:function(){return M},e:function(){return v},f:function(){return resolveObjectKey},g:function(){return isNumberFinite},h:function(){return createContext},i:function(){return isObject},j:function(){return defined},k:function(){return isNullOrUndef},l:function(){return listenArrayEvents},m:function(){return toPercentage},n:function(){return toDimension},o:function(){return formatNumber},p:function(){return _angleBetween},q:function(){return _getStartAndCountOfVisiblePoints},r:function(){return x},s:function(){return b},t:function(){return toRadians},u:function(){return unlistenArrayEvents},v:function(){return valueOrDefault},w:function(){return _scaleRangesChanged},x:function(){return isNumber},y:function(){return _parseObjectDataRadialScale},z:function(){return y}});let o=(i=0,function(){return i++});function isNullOrUndef(e){return null==e}function isArray(e){if(Array.isArray&&Array.isArray(e))return!0;let t=Object.prototype.toString.call(e);return"[object"===t.slice(0,7)&&"Array]"===t.slice(-6)}function isObject(e){return null!==e&&"[object Object]"===Object.prototype.toString.call(e)}let isNumberFinite=e=>("number"==typeof e||e instanceof Number)&&isFinite(+e);function finiteOrDefault(e,t){return isNumberFinite(e)?e:t}function valueOrDefault(e,t){return void 0===e?t:e}let toPercentage=(e,t)=>"string"==typeof e&&e.endsWith("%")?parseFloat(e)/100:e/t,toDimension=(e,t)=>"string"==typeof e&&e.endsWith("%")?parseFloat(e)/100*t:+e;function callback(e,t,r){if(e&&"function"==typeof e.call)return e.apply(r,t)}function each(e,t,r,n){let i,o,a;if(isArray(e)){if(o=e.length,n)for(i=o-1;i>=0;i--)t.call(r,e[i],i);else for(i=0;ie,x:e=>e.x,y:e=>e.y};function resolveObjectKey(e,t){let r=a[t]||(a[t]=function(e){let t=function(e){let t=e.split("."),r=[],n="";for(let e of t)(n+=e).endsWith("\\")?n=n.slice(0,-1)+".":(r.push(n),n="");return r}(e);return e=>{for(let r of t){if(""===r)break;e=e&&e[r]}return e}}(t));return r(e)}function _capitalize(e){return e.charAt(0).toUpperCase()+e.slice(1)}let defined=e=>void 0!==e,isFunction=e=>"function"==typeof e,setsEqual=(e,t)=>{if(e.size!==t.size)return!1;for(let r of e)if(!t.has(r))return!1;return!0};function _isClickEvent(e){return"mouseup"===e.type||"click"===e.type||"contextmenu"===e.type}let u=Math.PI,s=2*u,l=s+u,c=Number.POSITIVE_INFINITY,h=u/180,p=u/2,d=u/4,g=2*u/3,y=Math.log10,b=Math.sign;function niceNum(e){let t=Math.round(e);e=almostEquals(e,t,e/1e3)?t:e;let r=Math.pow(10,Math.floor(y(e))),n=e/r;return(n<=1?1:n<=2?2:n<=5?5:10)*r}function _factorize(e){let t;let r=[],n=Math.sqrt(e);for(t=1;te-t).pop(),r}function isNumber(e){return!isNaN(parseFloat(e))&&isFinite(e)}function almostEquals(e,t,r){return Math.abs(e-t)=e}function _setMinAndMaxByKey(e,t,r){let n,i,o;for(n=0,i=e.length;ns&&l=Math.min(t,r)-n&&e<=Math.max(t,r)+n}function _lookup(e,t,r){let n;r=r||(r=>e[r]1;)r(n=o+i>>1)?o=n:i=n;return{lo:o,hi:i}}let _lookupByKey=(e,t,r,n)=>_lookup(e,r,n?n=>e[n][t]<=r:n=>e[n][t]_lookup(e,r,n=>e[n][t]>=r);function _filterBetween(e,t,r){let n=0,i=e.length;for(;nn&&e[i-1]>r;)i--;return n>0||i{let r="_onData"+_capitalize(t),n=e[t];Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value(...t){let i=n.apply(this,t);return e._chartjs.listeners.forEach(e=>{"function"==typeof e[r]&&e[r](...t)}),i}})})}function unlistenArrayEvents(e,t){let r=e._chartjs;if(!r)return;let n=r.listeners,i=n.indexOf(t);-1!==i&&n.splice(i,1),n.length>0||(m.forEach(t=>{delete e[t]}),delete e._chartjs)}function _arrayUnique(e){let t,r;let n=new Set;for(t=0,r=e.length;tArray.prototype.slice.call(e)),i=!1,o=[];return function(...r){o=n(r),i||(i=!0,x.call(window,()=>{i=!1,e.apply(t,o)}))}}function debounce(e,t){let r;return function(...n){return t?(clearTimeout(r),r=setTimeout(e,t,n)):e.apply(this,n),t}}let _toLeftRightCenter=e=>"start"===e?"left":"end"===e?"right":"center",_alignStartEnd=(e,t,r)=>"start"===e?t:"end"===e?r:(t+r)/2,_textX=(e,t,r,n)=>e===(n?"left":"right")?r:"center"===e?(t+r)/2:t;function _getStartAndCountOfVisiblePoints(e,t,r){let n=t.length,i=0,o=n;if(e._sorted){let{iScale:a,_parsed:u}=e,s=a.axis,{min:l,max:c,minDefined:h,maxDefined:p}=a.getUserBounds();h&&(i=_limitValue(Math.min(_lookupByKey(u,a.axis,l).lo,r?n:_lookupByKey(t,s,a.getPixelForValue(l)).lo),0,n-1)),o=p?_limitValue(Math.max(_lookupByKey(u,a.axis,c,!0).hi+1,r?0:_lookupByKey(t,s,a.getPixelForValue(c),!0).hi+1),i,n)-i:n-i}return{start:i,count:o}}function _scaleRangesChanged(e){let{xScale:t,yScale:r,_scaleRanges:n}=e,i={xmin:t.min,xmax:t.max,ymin:r.min,ymax:r.max};if(!n)return e._scaleRanges=i,!0;let o=n.xmin!==t.min||n.xmax!==t.max||n.ymin!==r.min||n.ymax!==r.max;return Object.assign(n,i),o}let atEdge=e=>0===e||1===e,elasticIn=(e,t,r)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*s/r)),elasticOut=(e,t,r)=>Math.pow(2,-10*e)*Math.sin((e-t)*s/r)+1,v={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*p)+1,easeOutSine:e=>Math.sin(e*p),easeInOutSine:e=>-.5*(Math.cos(u*e)-1),easeInExpo:e=>0===e?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>1===e?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>atEdge(e)?e:e<.5?.5*Math.pow(2,10*(2*e-1)):.5*(-Math.pow(2,-10*(2*e-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>atEdge(e)?e:elasticIn(e,.075,.3),easeOutElastic:e=>atEdge(e)?e:elasticOut(e,.075,.3),easeInOutElastic:e=>atEdge(e)?e:e<.5?.5*elasticIn(2*e,.1125,.45):.5+.5*elasticOut(2*e-1,.1125,.45),easeInBack:e=>e*e*(2.70158*e-1.70158),easeOutBack:e=>(e-=1)*e*(2.70158*e+1.70158)+1,easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-v.easeOutBounce(1-e),easeOutBounce:e=>e<.36363636363636365?7.5625*e*e:e<.7272727272727273?7.5625*(e-=.5454545454545454)*e+.75:e<.9090909090909091?7.5625*(e-=.8181818181818182)*e+.9375:7.5625*(e-=.9545454545454546)*e+.984375,easeInOutBounce:e=>e<.5?.5*v.easeInBounce(2*e):.5*v.easeOutBounce(2*e-1)+.5};/*! * @kurkle/color v0.2.1 * https://github.com/kurkle/color#readme * (c) 2022 Jukka Kurkela * Released under the MIT License */function round(e){return e+.5|0}let lim=(e,t,r)=>Math.max(Math.min(e,r),t);function p2b(e){return lim(round(2.55*e),0,255)}function n2b(e){return lim(round(255*e),0,255)}function b2n(e){return lim(round(e/2.55)/100,0,1)}function n2p(e){return lim(round(100*e),0,100)}let _={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},w=[..."0123456789ABCDEF"],h1=e=>w[15&e],h2=e=>w[(240&e)>>4]+w[15&e],eq=e=>(240&e)>>4==(15&e),isShort=e=>eq(e.r)&&eq(e.g)&&eq(e.b)&&eq(e.a),alpha=(e,t)=>e<255?t(e):"",B=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function hsl2rgbn(e,t,r){let n=t*Math.min(r,1-r),f=(t,i=(t+e/30)%12)=>r-n*Math.max(Math.min(i-3,9-i,1),-1);return[f(0),f(8),f(4)]}function hsv2rgbn(e,t,r){let f=(n,i=(n+e/60)%6)=>r-r*t*Math.max(Math.min(i,4-i,1),0);return[f(5),f(3),f(1)]}function hwb2rgbn(e,t,r){let n;let i=hsl2rgbn(e,1,.5);for(t+r>1&&(n=1/(t+r),t*=n,r*=n),n=0;n<3;n++)i[n]*=1-t-r,i[n]+=t;return i}function rgb2hsl(e){let t,r,n;let i=e.r/255,o=e.g/255,a=e.b/255,u=Math.max(i,o,a),s=Math.min(i,o,a),l=(u+s)/2;return u!==s&&(n=u-s,r=l>.5?n/(2-u-s):n/(u+s),t=60*(t=i===u?(o-a)/n+(oe<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055,from=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function modHSL(e,t,r){if(e){let n=rgb2hsl(e);n[t]=Math.max(0,Math.min(n[t]+n[t]*r,0===t?360:1)),n=calln(hsl2rgbn,n,void 0,void 0),e.r=n[0],e.g=n[1],e.b=n[2]}}function clone(e,t){return e?Object.assign(t||{},e):e}function fromObject(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=n2b(e[3]))):(t=clone(e,{r:0,g:0,b:0,a:1})).a=n2b(t.a),t}let Color=class Color{constructor(e){let t;if(e instanceof Color)return e;let r=typeof e;if("object"===r)t=fromObject(e);else if("string"===r){var i,o;o=e.length,"#"===e[0]&&(4===o||5===o?i={r:255&17*_[e[1]],g:255&17*_[e[2]],b:255&17*_[e[3]],a:5===o?17*_[e[4]]:255}:(7===o||9===o)&&(i={r:_[e[1]]<<4|_[e[2]],g:_[e[3]]<<4|_[e[4]],b:_[e[5]]<<4|_[e[6]],a:9===o?_[e[7]]<<4|_[e[8]]:255})),t=i||function(e){n||((n=function(){let e,t,r,n,i;let o={},a=Object.keys(S),u=Object.keys(k);for(e=0;e>16&255,r>>8&255,255&r]}return o}()).transparent=[0,0,0,0]);let t=n[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:4===t.length?t[3]:255}}(e)||("r"===e.charAt(0)?function(e){let t,r,n;let i=O.exec(e),o=255;if(i){if(i[7]!==t){let e=+i[7];o=i[8]?p2b(e):lim(255*e,0,255)}return t=+i[1],r=+i[3],n=+i[5],{r:t=255&(i[2]?p2b(t):lim(t,0,255)),g:r=255&(i[4]?p2b(r):lim(r,0,255)),b:n=255&(i[6]?p2b(n):lim(n,0,255)),a:o}}}(e):function(e){let t;let r=B.exec(e),n=255;if(!r)return;r[5]!==t&&(n=r[6]?p2b(+r[5]):n2b(+r[5]));let i=hue(+r[2]),o=+r[3]/100,a=+r[4]/100;return{r:(t="hwb"===r[1]?calln(hwb2rgbn,i,o,a):"hsv"===r[1]?calln(hsv2rgbn,i,o,a):calln(hsl2rgbn,i,o,a))[0],g:t[1],b:t[2],a:n}}(e))}this._rgb=t,this._valid=!!t}get valid(){return this._valid}get rgb(){var e=clone(this._rgb);return e&&(e.a=b2n(e.a)),e}set rgb(e){this._rgb=fromObject(e)}rgbString(){var e;return this._valid?(e=this._rgb)&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${b2n(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`):void 0}hexString(){var e,t;return this._valid?(t=isShort(e=this._rgb)?h1:h2,e?"#"+t(e.r)+t(e.g)+t(e.b)+alpha(e.a,t):void 0):void 0}hslString(){return this._valid?function(e){if(!e)return;let t=rgb2hsl(e),r=t[0],n=n2p(t[1]),i=n2p(t[2]);return e.a<255?`hsla(${r}, ${n}%, ${i}%, ${b2n(e.a)})`:`hsl(${r}, ${n}%, ${i}%)`}(this._rgb):void 0}mix(e,t){if(e){let r;let n=this.rgb,i=e.rgb,o=t===r?.5:t,a=2*o-1,u=n.a-i.a,s=((a*u==-1?a:(a+u)/(1+a*u))+1)/2;r=1-s,n.r=255&s*n.r+r*i.r+.5,n.g=255&s*n.g+r*i.g+.5,n.b=255&s*n.b+r*i.b+.5,n.a=o*n.a+(1-o)*i.a,this.rgb=n}return this}interpolate(e,t){return e&&(this._rgb=function(e,t,r){let n=from(b2n(e.r)),i=from(b2n(e.g)),o=from(b2n(e.b));return{r:n2b(to(n+r*(from(b2n(t.r))-n))),g:n2b(to(i+r*(from(b2n(t.g))-i))),b:n2b(to(o+r*(from(b2n(t.b))-o))),a:e.a+r*(t.a-e.a)}}(this._rgb,e._rgb,t)),this}clone(){return new Color(this.rgb)}alpha(e){return this._rgb.a=n2b(e),this}clearer(e){let t=this._rgb;return t.a*=1-e,this}greyscale(){let e=this._rgb,t=round(.3*e.r+.59*e.g+.11*e.b);return e.r=e.g=e.b=t,this}opaquer(e){let t=this._rgb;return t.a*=1+e,this}negate(){let e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return modHSL(this._rgb,2,e),this}darken(e){return modHSL(this._rgb,2,-e),this}saturate(e){return modHSL(this._rgb,1,e),this}desaturate(e){return modHSL(this._rgb,1,-e),this}rotate(e){var t,r;return(r=rgb2hsl(t=this._rgb))[0]=hue(r[0]+e),r=calln(hsl2rgbn,r,void 0,void 0),t.r=r[0],t.g=r[1],t.b=r[2],this}};function isPatternOrGradient(e){if(e&&"object"==typeof e){let t=e.toString();return"[object CanvasPattern]"===t||"[object CanvasGradient]"===t}return!1}function color(e){return isPatternOrGradient(e)?e:new Color(e)}function getHoverColor(e){return isPatternOrGradient(e)?e:new Color(e).saturate(.5).darken(.1).hexString()}let E=Object.create(null),A=Object.create(null);function getScope$1(e,t){if(!t)return e;let r=t.split(".");for(let t=0,n=r.length;te.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(e,t)=>getHoverColor(t.backgroundColor),this.hoverBorderColor=(e,t)=>getHoverColor(t.borderColor),this.hoverColor=(e,t)=>getHoverColor(t.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e)}set(e,t){return set(this,e,t)}get(e){return getScope$1(this,e)}describe(e,t){return set(A,e,t)}override(e,t){return set(E,e,t)}route(e,t,r,n){let i=getScope$1(this,e),o=getScope$1(this,r),a="_"+t;Object.defineProperties(i,{[a]:{value:i[t],writable:!0},[t]:{enumerable:!0,get(){let e=this[a],t=o[n];return isObject(e)?Object.assign({},t,e):valueOrDefault(e,t)},set(e){this[a]=e}}})}}({_scriptable:e=>!e.startsWith("on"),_indexable:e=>"events"!==e,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function _measureText(e,t,r,n,i){let o=t[i];return o||(o=t[i]=e.measureText(i).width,r.push(i)),o>n&&(n=o),n}function _longestText(e,t,r,n){let i,o,a,u,s;let l=(n=n||{}).data=n.data||{},c=n.garbageCollect=n.garbageCollect||[];n.font!==t&&(l=n.data={},c=n.garbageCollect=[],n.font=t),e.save(),e.font=t;let h=0,p=r.length;for(i=0;ir.length){for(i=0;i0&&e.stroke()}}function _isPointInArea(e,t,r){return r=r||.5,!t||e&&e.x>t.left-r&&e.xt.top-r&&e.y0&&""!==o.strokeColor;for(e.save(),e.font=i.string,o.translation&&e.translate(o.translation[0],o.translation[1]),isNullOrUndef(o.rotation)||e.rotate(o.rotation),o.color&&(e.fillStyle=o.color),o.textAlign&&(e.textAlign=o.textAlign),o.textBaseline&&(e.textBaseline=o.textBaseline),a=0;a+e||0;function _readValueToProps(e,t){let r={},n=isObject(t),i=n?Object.keys(t):t,o=isObject(e)?n?r=>valueOrDefault(e[r],e[t[r]]):t=>e[t]:()=>e;for(let e of i)r[e]=numberOrZero(o(e));return r}function toTRBL(e){return _readValueToProps(e,{top:"y",right:"x",bottom:"y",left:"x"})}function toTRBLCorners(e){return _readValueToProps(e,["topLeft","topRight","bottomLeft","bottomRight"])}function toPadding(e){let t=toTRBL(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function toFont(e,t){e=e||{},t=t||M.font;let r=valueOrDefault(e.size,t.size);"string"==typeof r&&(r=parseInt(r,10));let n=valueOrDefault(e.style,t.style);n&&!(""+n).match(T)&&(console.warn('Invalid font style specified: "'+n+'"'),n="");let i={family:valueOrDefault(e.family,t.family),lineHeight:function(e,t){let r=(""+e).match(I);if(!r||"normal"===r[1])return 1.2*t;switch(e=+r[2],r[3]){case"px":return e;case"%":e/=100}return t*e}(valueOrDefault(e.lineHeight,t.lineHeight),r),size:r,style:n,weight:valueOrDefault(e.weight,t.weight),string:""};return i.string=!i||isNullOrUndef(i.size)||isNullOrUndef(i.family)?null:(i.style?i.style+" ":"")+(i.weight?i.weight+" ":"")+i.size+"px "+i.family,i}function resolve(e,t,r,n){let i,o,a,u=!0;for(i=0,o=e.length;ir&&0===e?0:e+t;return{min:keepZero(n,-Math.abs(o)),max:keepZero(i,o)}}function createContext(e,t){return Object.assign(Object.create(e),t)}function _createResolver(e,t=[""],r=e,n,i=()=>e[0]){defined(n)||(n=_resolve("_fallback",e));let o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:r,_fallback:n,_getTarget:i,override:i=>_createResolver([i,...e],t,r,n)};return new Proxy(o,{deleteProperty:(t,r)=>(delete t[r],delete t._keys,delete e[0][r],!0),get:(r,n)=>_cached(r,n,()=>(function(e,t,r,n){let i;for(let o of t)if(defined(i=_resolve(readKey(o,e),r)))return needsSubResolver(e,i)?createSubResolver(r,n,e,i):i})(n,t,e,r)),getOwnPropertyDescriptor:(e,t)=>Reflect.getOwnPropertyDescriptor(e._scopes[0],t),getPrototypeOf:()=>Reflect.getPrototypeOf(e[0]),has:(e,t)=>getKeysFromAllScopes(e).includes(t),ownKeys:e=>getKeysFromAllScopes(e),set(e,t,r){let n=e._storage||(e._storage=i());return e[t]=n[t]=r,delete e._keys,!0}})}function _descriptors(e,t={scriptable:!0,indexable:!0}){let{_scriptable:r=t.scriptable,_indexable:n=t.indexable,_allKeys:i=t.allKeys}=e;return{allKeys:i,scriptable:r,indexable:n,isScriptable:isFunction(r)?r:()=>r,isIndexable:isFunction(n)?n:()=>n}}let readKey=(e,t)=>e?e+_capitalize(t):t,needsSubResolver=(e,t)=>isObject(t)&&"adapters"!==e&&(null===Object.getPrototypeOf(t)||t.constructor===Object);function _cached(e,t,r){if(Object.prototype.hasOwnProperty.call(e,t))return e[t];let n=r();return e[t]=n,n}let getScope=(e,t)=>!0===e?t:"string"==typeof e?resolveObjectKey(t,e):void 0;function createSubResolver(e,t,r,n){var i;let o=t._rootScopes,a=isFunction(i=t._fallback)?i(r,n):i,u=[...e,...o],s=new Set;s.add(n);let l=addScopesFromKey(s,u,r,a||r,n);return!(null===l||defined(a)&&a!==r&&null===(l=addScopesFromKey(s,u,a,l,n)))&&_createResolver(Array.from(s),[""],o,a,()=>(function(e,t,r){let n=e._getTarget();t in n||(n[t]={});let i=n[t];return isArray(i)&&isObject(r)?r:i})(t,r,n))}function addScopesFromKey(e,t,r,n,i){for(;r;)r=function(e,t,r,n,i){for(let a of t){let t=getScope(r,a);if(t){var o;e.add(t);let a=isFunction(o=t._fallback)?o(r,i):o;if(defined(a)&&a!==r&&a!==n)return a}else if(!1===t&&defined(n)&&r!==n)return null}return!1}(e,t,r,n,i);return r}function _resolve(e,t){for(let r of t){if(!r)continue;let t=r[e];if(defined(t))return t}}function getKeysFromAllScopes(e){let t=e._keys;return t||(t=e._keys=function(e){let t=new Set;for(let r of e)for(let e of Object.keys(r).filter(e=>!e.startsWith("_")))t.add(e);return Array.from(t)}(e._scopes)),t}function _parseObjectDataRadialScale(e,t,r,n){let i,o,a;let{iScale:u}=e,{key:s="r"}=this._parsing,l=Array(n);for(i=0;it"x"===e?"y":"x";function capControlPoint(e,t,r){return Math.max(Math.min(e,r),t)}function _updateBezierControlPoints(e,t,r,n,i){let o,a,u,s;if(t.spanGaps&&(e=e.filter(e=>!e.skip)),"monotone"===t.cubicInterpolationMode)!function(e,t="x"){let r,n,i;let o=getValueAxis(t),a=e.length,u=Array(a).fill(0),s=Array(a),l=getPoint(e,0);for(r=0;rwindow.getComputedStyle(e,null),C=["top","right","bottom","left"];function getPositionedStyle(e,t,r){let n={};r=r?"-"+r:"";for(let i=0;i<4;i++){let o=C[i];n[o]=parseFloat(e[t+"-"+o+r])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}let useOffsetPos=(e,t,r)=>(e>0||t>0)&&(!r||!r.shadowRoot);function getRelativePosition(e,t){if("native"in e)return e;let{canvas:r,currentDevicePixelRatio:n}=t,i=getComputedStyle(r),o="border-box"===i.boxSizing,a=getPositionedStyle(i,"padding"),u=getPositionedStyle(i,"border","width"),{x:s,y:l,box:c}=function(e,t){let r,n;let i=e.touches,o=i&&i.length?i[0]:e,{offsetX:a,offsetY:u}=o,s=!1;if(useOffsetPos(a,u,e.target))r=a,n=u;else{let e=t.getBoundingClientRect();r=o.clientX-e.left,n=o.clientY-e.top,s=!0}return{x:r,y:n,box:s}}(e,r),h=a.left+(c&&u.left),p=a.top+(c&&u.top),{width:d,height:g}=t;return o&&(d-=a.width+u.width,g-=a.height+u.height),{x:Math.round((s-h)/d*r.width/n),y:Math.round((l-p)/g*r.height/n)}}let round1=e=>Math.round(10*e)/10;function getMaximumSize(e,t,r,n){let i=getComputedStyle(e),o=getPositionedStyle(i,"margin"),a=parseMaxStyle(i.maxWidth,e,"clientWidth")||c,u=parseMaxStyle(i.maxHeight,e,"clientHeight")||c,s=function(e,t,r){let n,i;if(void 0===t||void 0===r){let o=_getParentNode(e);if(o){let e=o.getBoundingClientRect(),a=getComputedStyle(o),u=getPositionedStyle(a,"border","width"),s=getPositionedStyle(a,"padding");t=e.width-s.width-u.width,r=e.height-s.height-u.height,n=parseMaxStyle(a.maxWidth,o,"clientWidth"),i=parseMaxStyle(a.maxHeight,o,"clientHeight")}else t=e.clientWidth,r=e.clientHeight}return{width:t,height:r,maxWidth:n||c,maxHeight:i||c}}(e,t,r),{width:l,height:h}=s;if("content-box"===i.boxSizing){let e=getPositionedStyle(i,"border","width"),t=getPositionedStyle(i,"padding");l-=t.width+e.width,h-=t.height+e.height}return l=Math.max(0,l-o.width),h=Math.max(0,n?Math.floor(l/n):h-o.height),l=round1(Math.min(l,a,s.maxWidth)),h=round1(Math.min(h,u,s.maxHeight)),l&&!h&&(h=round1(l/2)),{width:l,height:h}}function retinaScale(e,t,r){let n=t||1,i=Math.floor(e.height*n),o=Math.floor(e.width*n);e.height=i/n,e.width=o/n;let a=e.canvas;return a.style&&(r||!a.style.height&&!a.style.width)&&(a.style.height=`${e.height}px`,a.style.width=`${e.width}px`),(e.currentDevicePixelRatio!==n||a.height!==i||a.width!==o)&&(e.currentDevicePixelRatio=n,a.height=i,a.width=o,e.ctx.setTransform(n,0,0,n,0,0),!0)}let R=function(){let e=!1;try{let t={get passive(){return e=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(e){}return e}();function readUsedSize(e,t){let r=getComputedStyle(e).getPropertyValue(t),n=r&&r.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function _pointInLine(e,t,r,n){return{x:e.x+r*(t.x-e.x),y:e.y+r*(t.y-e.y)}}function _steppedInterpolation(e,t,r,n){return{x:e.x+r*(t.x-e.x),y:"middle"===n?r<.5?e.y:t.y:"after"===n?r<1?e.y:t.y:r>0?t.y:e.y}}function _bezierInterpolation(e,t,r,n){let i={x:e.cp2x,y:e.cp2y},o={x:t.cp1x,y:t.cp1y},a=_pointInLine(e,i,r),u=_pointInLine(i,o,r),s=_pointInLine(o,t,r),l=_pointInLine(a,u,r),c=_pointInLine(u,s,r);return _pointInLine(l,c,r)}let L=new Map;function formatNumber(e,t,r){return(function(e,t){t=t||{};let r=e+JSON.stringify(t),n=L.get(r);return n||(n=new Intl.NumberFormat(e,t),L.set(r,n)),n})(t,r).format(e)}function getRtlAdapter(e,t,r){var n;return e?(n=r,{x:e=>t+t+n-e,setWidth(e){n=e},textAlign:e=>"center"===e?e:"right"===e?"left":"right",xPlus:(e,t)=>e-t,leftForLtr:(e,t)=>e-t}):{x:e=>e,setWidth(e){},textAlign:e=>e,xPlus:(e,t)=>e+t,leftForLtr:(e,t)=>e}}function overrideTextDirection(e,t){let r,n;("ltr"===t||"rtl"===t)&&(n=[(r=e.canvas.style).getPropertyValue("direction"),r.getPropertyPriority("direction")],r.setProperty("direction",t,"important"),e.prevTextDirection=n)}function restoreTextDirection(e,t){void 0!==t&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function propertyFn(e){return"angle"===e?{between:_angleBetween,compare:_angleDiff,normalize:_normalizeAngle}:{between:_isBetween,compare:(e,t)=>e-t,normalize:e=>e}}function normalizeSegment({start:e,end:t,count:r,loop:n,style:i}){return{start:e%r,end:t%r,loop:n&&(t-e+1)%r==0,style:i}}function _boundSegment(e,t,r){let n,i,o;if(!r)return[e];let{property:a,start:u,end:s}=r,l=t.length,{compare:c,between:h,normalize:p}=propertyFn(a),{start:d,end:g,loop:y,style:b}=function(e,t,r){let n;let{property:i,start:o,end:a}=r,{between:u,normalize:s}=propertyFn(i),l=t.length,{start:c,end:h,loop:p}=e;if(p){for(c+=l,h+=l,n=0;nh(u,o,n)&&0!==c(u,o),endIsBefore=()=>0===c(s,n)||h(s,o,n),shouldStart=()=>x||startIsBefore(),shouldStop=()=>!x||endIsBefore();for(let e=d,r=d;e<=g;++e)(i=t[e%l]).skip||(n=p(i[a]))===o||(x=h(n,u,s),null===v&&shouldStart()&&(v=0===c(n,u)?e:r),null!==v&&shouldStop()&&(m.push(normalizeSegment({start:v,end:e,loop:y,count:l,style:b})),v=null),r=e,o=n);return null!==v&&m.push(normalizeSegment({start:v,end:g,loop:y,count:l,style:b})),m}function _boundSegments(e,t){let r=[],n=e.segments;for(let i=0;ii&&e[o%t].skip;)o--;return{start:i,end:o%=t}}(r,i,o,n);if(!0===n)return splitByStyles(e,[{start:a,end:u,loop:o}],r,t);let s=u