@openmrs/esm-patient-vitals-app 11.3.1-pre.8961 → 11.3.1-pre.8962
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +12 -12
- package/dist/5415.js +1 -1
- package/dist/5415.js.map +1 -1
- package/dist/5810.js +1 -1
- package/dist/5810.js.map +1 -1
- package/dist/7237.js +1 -1
- package/dist/7237.js.map +1 -1
- package/dist/7299.js +1 -1
- package/dist/7299.js.map +1 -1
- package/dist/8185.js +2 -0
- package/dist/8185.js.map +1 -0
- package/dist/8803.js +1 -1
- package/dist/8803.js.map +1 -1
- package/dist/8953.js +1 -1
- package/dist/8953.js.map +1 -1
- package/dist/{7598.js → 9595.js} +2 -2
- package/dist/9595.js.map +1 -0
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/openmrs-esm-patient-vitals-app.js +1 -1
- package/dist/openmrs-esm-patient-vitals-app.js.buildmanifest.json +53 -53
- package/dist/routes.json +1 -1
- package/package.json +2 -2
- package/src/biometrics/biometrics-overview.test.tsx +0 -14
- package/src/vitals/vitals-overview.test.tsx +0 -17
- package/dist/7598.js.map +0 -1
- package/dist/7910.js +0 -2
- package/dist/7910.js.map +0 -1
- /package/dist/{7910.js.LICENSE.txt → 8185.js.LICENSE.txt} +0 -0
- /package/dist/{7598.js.LICENSE.txt → 9595.js.LICENSE.txt} +0 -0
package/dist/{7598.js → 9595.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! For license information please see
|
|
2
|
-
(globalThis.webpackChunk_openmrs_esm_patient_vitals_app=globalThis.webpackChunk_openmrs_esm_patient_vitals_app||[]).push([[7598],{10279:function(t){t.exports=function(){"use strict";var t,e,n=1e3,i=6e4,r=36e5,o=864e5,s=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,a=31536e6,l=2628e6,c=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,u={years:a,months:l,days:o,hours:r,minutes:i,seconds:n,milliseconds:1,weeks:6048e5},h=function(t){return t instanceof y},d=function(t,e,n){return new y(t,n,e.$l)},f=function(t){return e.p(t)+"s"},p=function(t){return t<0},m=function(t){return p(t)?Math.ceil(t):Math.floor(t)},g=function(t){return Math.abs(t)},v=function(t,e){return t?p(t)?{negative:!0,format:""+g(t)+e}:{negative:!1,format:""+t+e}:{negative:!1,format:""}},y=function(){function p(t,e,n){var i=this;if(this.$d={},this.$l=n,void 0===t&&(this.$ms=0,this.parseFromMilliseconds()),e)return d(t*u[f(e)],this);if("number"==typeof t)return this.$ms=t,this.parseFromMilliseconds(),this;if("object"==typeof t)return Object.keys(t).forEach((function(e){i.$d[f(e)]=t[e]})),this.calMilliseconds(),this;if("string"==typeof t){var r=t.match(c);if(r){var o=r.slice(2).map((function(t){return null!=t?Number(t):0}));return this.$d.years=o[0],this.$d.months=o[1],this.$d.weeks=o[2],this.$d.days=o[3],this.$d.hours=o[4],this.$d.minutes=o[5],this.$d.seconds=o[6],this.calMilliseconds(),this}}return this}var g=p.prototype;return g.calMilliseconds=function(){var t=this;this.$ms=Object.keys(this.$d).reduce((function(e,n){return e+(t.$d[n]||0)*u[n]}),0)},g.parseFromMilliseconds=function(){var t=this.$ms;this.$d.years=m(t/a),t%=a,this.$d.months=m(t/l),t%=l,this.$d.days=m(t/o),t%=o,this.$d.hours=m(t/r),t%=r,this.$d.minutes=m(t/i),t%=i,this.$d.seconds=m(t/n),t%=n,this.$d.milliseconds=t},g.toISOString=function(){var t=v(this.$d.years,"Y"),e=v(this.$d.months,"M"),n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var i=v(n,"D"),r=v(this.$d.hours,"H"),o=v(this.$d.minutes,"M"),s=this.$d.seconds||0;this.$d.milliseconds&&(s+=this.$d.milliseconds/1e3,s=Math.round(1e3*s)/1e3);var a=v(s,"S"),l=t.negative||e.negative||i.negative||r.negative||o.negative||a.negative,c=r.format||o.format||a.format?"T":"",u=(l?"-":"")+"P"+t.format+e.format+i.format+c+r.format+o.format+a.format;return"P"===u||"-P"===u?"P0D":u},g.toJSON=function(){return this.toISOString()},g.format=function(t){var n=t||"YYYY-MM-DDTHH:mm:ss",i={Y:this.$d.years,YY:e.s(this.$d.years,2,"0"),YYYY:e.s(this.$d.years,4,"0"),M:this.$d.months,MM:e.s(this.$d.months,2,"0"),D:this.$d.days,DD:e.s(this.$d.days,2,"0"),H:this.$d.hours,HH:e.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:e.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:e.s(this.$d.seconds,2,"0"),SSS:e.s(this.$d.milliseconds,3,"0")};return n.replace(s,(function(t,e){return e||String(i[t])}))},g.as=function(t){return this.$ms/u[f(t)]},g.get=function(t){var e=this.$ms,n=f(t);return"milliseconds"===n?e%=1e3:e="weeks"===n?m(e/u[n]):this.$d[n],e||0},g.add=function(t,e,n){var i;return i=e?t*u[f(e)]:h(t)?t.$ms:d(t,this).$ms,d(this.$ms+i*(n?-1:1),this)},g.subtract=function(t,e){return this.add(t,e,!0)},g.locale=function(t){var e=this.clone();return e.$l=t,e},g.clone=function(){return d(this.$ms,this)},g.humanize=function(e){return t().add(this.$ms,"ms").locale(this.$l).fromNow(!e)},g.valueOf=function(){return this.asMilliseconds()},g.milliseconds=function(){return this.get("milliseconds")},g.asMilliseconds=function(){return this.as("milliseconds")},g.seconds=function(){return this.get("seconds")},g.asSeconds=function(){return this.as("seconds")},g.minutes=function(){return this.get("minutes")},g.asMinutes=function(){return this.as("minutes")},g.hours=function(){return this.get("hours")},g.asHours=function(){return this.as("hours")},g.days=function(){return this.get("days")},g.asDays=function(){return this.as("days")},g.weeks=function(){return this.get("weeks")},g.asWeeks=function(){return this.as("weeks")},g.months=function(){return this.get("months")},g.asMonths=function(){return this.as("months")},g.years=function(){return this.get("years")},g.asYears=function(){return this.as("years")},p}(),_=function(t,e,n){return t.add(e.years()*n,"y").add(e.months()*n,"M").add(e.days()*n,"d").add(e.hours()*n,"h").add(e.minutes()*n,"m").add(e.seconds()*n,"s").add(e.milliseconds()*n,"ms")};return function(n,i,r){t=r,e=r().$utils(),r.duration=function(t,e){var n=r.locale();return d(t,{$l:n},e)},r.isDuration=h;var o=i.prototype.add,s=i.prototype.subtract;i.prototype.add=function(t,e){return h(t)?_(this,t,1):o.bind(this)(t,e)},i.prototype.subtract=function(t,e){return h(t)?_(this,t,-1):s.bind(this)(t,e)}}}()},30723:function(t,e,n){var i,r;"undefined"!=typeof self&&self,t.exports=(i=n(1343),r=n(43144),function(){"use strict";var t={156:function(t){t.exports=i},111:function(t){t.exports=r},582:function(t,e,n){n.r(e),n.d(e,{__assign:function(){return o},__asyncDelegator:function(){return S},__asyncGenerator:function(){return T},__asyncValues:function(){return O},__await:function(){return E},__awaiter:function(){return p},__classPrivateFieldGet:function(){return D},__classPrivateFieldIn:function(){return R},__classPrivateFieldSet:function(){return L},__createBinding:function(){return g},__decorate:function(){return a},__esDecorate:function(){return c},__exportStar:function(){return v},__extends:function(){return r},__generator:function(){return m},__importDefault:function(){return k},__importStar:function(){return C},__makeTemplateObject:function(){return M},__metadata:function(){return f},__param:function(){return l},__propKey:function(){return h},__read:function(){return _},__rest:function(){return s},__runInitializers:function(){return u},__setFunctionName:function(){return d},__spread:function(){return b},__spreadArray:function(){return x},__spreadArrays:function(){return w},__values:function(){return y}});var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)};function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=function(){return o=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},o.apply(this,arguments)};function s(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]])}return n}function a(t,e,n,i){var r,o=arguments.length,s=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o<3?r(s):o>3?r(e,n,s):r(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s}function l(t,e){return function(n,i){e(n,i,t)}}function c(t,e,n,i,r,o){function s(t){if(void 0!==t&&"function"!=typeof t)throw new TypeError("Function expected");return t}for(var a,l=i.kind,c="getter"===l?"get":"setter"===l?"set":"value",u=!e&&t?i.static?t:t.prototype:null,h=e||(u?Object.getOwnPropertyDescriptor(u,i.name):{}),d=!1,f=n.length-1;f>=0;f--){var p={};for(var m in i)p[m]="access"===m?{}:i[m];for(var m in i.access)p.access[m]=i.access[m];p.addInitializer=function(t){if(d)throw new TypeError("Cannot add initializers after decoration has completed");o.push(s(t||null))};var g=(0,n[f])("accessor"===l?{get:h.get,set:h.set}:h[c],p);if("accessor"===l){if(void 0===g)continue;if(null===g||"object"!=typeof g)throw new TypeError("Object expected");(a=s(g.get))&&(h.get=a),(a=s(g.set))&&(h.set=a),(a=s(g.init))&&r.unshift(a)}else(a=s(g))&&("field"===l?r.unshift(a):h[c]=a)}u&&Object.defineProperty(u,i.name,h),d=!0}function u(t,e,n){for(var i=arguments.length>2,r=0;r<e.length;r++)n=i?e[r].call(t,n):e[r].call(t);return i?n:void 0}function h(t){return"symbol"==typeof t?t:"".concat(t)}function d(t,e,n){return"symbol"==typeof e&&(e=e.description?"[".concat(e.description,"]"):""),Object.defineProperty(t,"name",{configurable:!0,value:n?"".concat(n," ",e):e})}function f(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function p(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{l(i.next(t))}catch(t){o(t)}}function a(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}l((i=i.apply(t,e||[])).next())}))}function m(t,e){var n,i,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,i&&(r=2&a[0]?i.return:a[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,a[1])).done)return r;switch(i=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,i=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((r=(r=s.trys).length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){s.label=a[1];break}if(6===a[0]&&s.label<r[1]){s.label=r[1],r=a;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(a);break}r[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],i=0}finally{n=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}var g=Object.create?function(t,e,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);r&&!("get"in r?!e.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}:function(t,e,n,i){void 0===i&&(i=n),t[i]=e[n]};function v(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||g(e,t,n)}function y(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function _(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,o=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(i=o.next()).done;)s.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return s}function b(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(_(arguments[e]));return t}function w(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var i=Array(t),r=0;for(e=0;e<n;e++)for(var o=arguments[e],s=0,a=o.length;s<a;s++,r++)i[r]=o[s];return i}function x(t,e,n){if(n||2===arguments.length)for(var i,r=0,o=e.length;r<o;r++)!i&&r in e||(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))}function E(t){return this instanceof E?(this.v=t,this):new E(t)}function T(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,r=n.apply(t,e||[]),o=[];return i={},s("next"),s("throw"),s("return"),i[Symbol.asyncIterator]=function(){return this},i;function s(t){r[t]&&(i[t]=function(e){return new Promise((function(n,i){o.push([t,e,n,i])>1||a(t,e)}))})}function a(t,e){try{(n=r[t](e)).value instanceof E?Promise.resolve(n.value.v).then(l,c):u(o[0][2],n)}catch(t){u(o[0][3],t)}var n}function l(t){a("next",t)}function c(t){a("throw",t)}function u(t,e){t(e),o.shift(),o.length&&a(o[0][0],o[0][1])}}function S(t){var e,n;return e={},i("next"),i("throw",(function(t){throw t})),i("return"),e[Symbol.iterator]=function(){return this},e;function i(i,r){e[i]=t[i]?function(e){return(n=!n)?{value:E(t[i](e)),done:!1}:r?r(e):e}:r}}function O(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=y(t),e={},i("next"),i("throw"),i("return"),e[Symbol.asyncIterator]=function(){return this},e);function i(n){e[n]=t[n]&&function(e){return new Promise((function(i,r){!function(t,e,n,i){Promise.resolve(i).then((function(e){t({value:e,done:n})}),e)}(i,r,(e=t[n](e)).done,e.value)}))}}}function M(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}var A=Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e};function C(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&g(e,t,n);return A(e,t),e}function k(t){return t&&t.__esModule?t:{default:t}}function D(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)}function L(t,e,n,i,r){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?r.call(t,n):r?r.value=n:e.set(t,n),n}function R(t,e){if(null===e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof t?e===t:t.has(e)}e.default={__extends:r,__assign:o,__rest:s,__decorate:a,__param:l,__metadata:f,__awaiter:p,__generator:m,__createBinding:g,__exportStar:v,__values:y,__read:_,__spread:b,__spreadArrays:w,__spreadArray:x,__await:E,__asyncGenerator:T,__asyncDelegator:S,__asyncValues:O,__makeTemplateObject:M,__importStar:C,__importDefault:k,__classPrivateFieldGet:D,__classPrivateFieldSet:L,__classPrivateFieldIn:R}}},e={};function n(i){var r=e[i];if(void 0!==r)return r.exports;var o=e[i]={exports:{}};return t[i](o,o.exports,n),o.exports}n.d=function(t,e){for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};return function(){var t=o;Object.defineProperty(t,"__esModule",{value:!0}),t.useReactToPrint=t.PrintContextConsumer=void 0;var e=n(582),i=n(156),r=n(111),s=Object.prototype.hasOwnProperty.call(i,"createContext"),a=Object.prototype.hasOwnProperty.call(i,"useMemo")&&Object.prototype.hasOwnProperty.call(i,"useCallback"),l=s?i.createContext({}):null;t.PrintContextConsumer=l?l.Consumer:function(){return null};var c={copyStyles:!0,pageStyle:"\n @page {\n /* Remove browser default header (title) and footer (url) */\n margin: 0;\n }\n @media print {\n body {\n /* Tell browsers to print background colors */\n -webkit-print-color-adjust: exact; /* Chrome/Safari/Edge/Opera */\n color-adjust: exact; /* Firefox */\n }\n }\n ",removeAfterPrint:!1,suppressErrors:!1},u=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.startPrint=function(t){var e=n.props,i=e.onAfterPrint,r=e.onPrintError,o=e.print,s=e.documentTitle;setTimeout((function(){var e,a;if(t.contentWindow)if(t.contentWindow.focus(),o)o(t).then((function(){return null==i?void 0:i()})).then((function(){return n.handleRemoveIframe()})).catch((function(t){r?r("print",t):n.logMessages(["An error was thrown by the specified `print` function"])}));else{if(t.contentWindow.print){var l=null!==(a=null===(e=t.contentDocument)||void 0===e?void 0:e.title)&&void 0!==a?a:"",c=t.ownerDocument.title;s&&(t.ownerDocument.title=s,t.contentDocument&&(t.contentDocument.title=s)),t.contentWindow.print(),s&&(t.ownerDocument.title=c,t.contentDocument&&(t.contentDocument.title=l))}else n.logMessages(["Printing for this browser is not currently possible: the browser does not have a `print` method available for iframes."]);null==i||i(),n.handleRemoveIframe()}else n.logMessages(["Printing failed because the `contentWindow` of the print iframe did not load. This is possibly an error with `react-to-print`. Please file an issue: https://github.com/gregnb/react-to-print/issues/"])}),500)},n.triggerPrint=function(t){var e=n.props,i=e.onBeforePrint,r=e.onPrintError;if(i){var o=i();o&&"function"==typeof o.then?o.then((function(){n.startPrint(t)})).catch((function(t){r&&r("onBeforePrint",t)})):n.startPrint(t)}else n.startPrint(t)},n.handleClick=function(){var t=n.props,e=t.onBeforeGetContent,i=t.onPrintError;if(e){var r=e();r&&"function"==typeof r.then?r.then(n.handlePrint).catch((function(t){i&&i("onBeforeGetContent",t)})):n.handlePrint()}else n.handlePrint()},n.handlePrint=function(){var t=n.props,i=t.bodyClass,o=t.content,s=t.copyStyles,a=t.fonts,l=t.pageStyle,c=t.nonce,u=o();if(void 0!==u)if(null!==u){var h=document.createElement("iframe");h.width="".concat(document.documentElement.clientWidth,"px"),h.height="".concat(document.documentElement.clientHeight,"px"),h.style.position="absolute",h.style.top="-".concat(document.documentElement.clientHeight+100,"px"),h.style.left="-".concat(document.documentElement.clientWidth+100,"px"),h.id="printWindow",h.srcdoc="<!DOCTYPE html>";var d=(0,r.findDOMNode)(u);if(d){var f=d.cloneNode(!0),p=f instanceof Text,m=document.querySelectorAll("link[rel='stylesheet']"),g=p?[]:f.querySelectorAll("img"),v=p?[]:f.querySelectorAll("video"),y=a?a.length:0;n.numResourcesToLoad=m.length+g.length+v.length+y,n.resourcesLoaded=[],n.resourcesErrored=[];var _=function(t,i){n.resourcesLoaded.includes(t)?n.logMessages(["Tried to mark a resource that has already been handled",t],"debug"):(i?(n.logMessages(e.__spreadArray(['"react-to-print" was unable to load a resource but will continue attempting to print the page'],e.__read(i),!1)),n.resourcesErrored.push(t)):n.resourcesLoaded.push(t),n.resourcesLoaded.length+n.resourcesErrored.length===n.numResourcesToLoad&&n.triggerPrint(h))};h.onload=function(){var t,r,o,u;h.onload=null;var m=h.contentDocument||(null===(r=h.contentWindow)||void 0===r?void 0:r.document);if(m){m.body.appendChild(f),a&&((null===(o=h.contentDocument)||void 0===o?void 0:o.fonts)&&(null===(u=h.contentWindow)||void 0===u?void 0:u.FontFace)?a.forEach((function(t){var e=new FontFace(t.family,t.source,{weight:t.weight,style:t.style});h.contentDocument.fonts.add(e),e.loaded.then((function(){_(e)})).catch((function(t){_(e,["Failed loading the font:",e,"Load error:",t])}))})):(a.forEach((function(t){return _(t)})),n.logMessages(['"react-to-print" is not able to load custom fonts because the browser does not support the FontFace API but will continue attempting to print the page'])));var y="function"==typeof l?l():l;if("string"!=typeof y)n.logMessages(['"react-to-print" expected a "string" from `pageStyle` but received "'.concat(typeof y,'". Styles from `pageStyle` will not be applied.')]);else{var b=m.createElement("style");c&&(b.setAttribute("nonce",c),m.head.setAttribute("nonce",c)),b.appendChild(m.createTextNode(y)),m.head.appendChild(b)}if(i&&(t=m.body.classList).add.apply(t,e.__spreadArray([],e.__read(i.split(" ")),!1)),!p){for(var w=p?[]:d.querySelectorAll("canvas"),x=m.querySelectorAll("canvas"),E=0;E<w.length;++E){var T=w[E],S=x[E].getContext("2d");S&&S.drawImage(T,0,0)}var O=function(t){var e=g[t],n=e.getAttribute("src");if(n){var i=new Image;i.onload=function(){return _(e)},i.onerror=function(t,n,i,r,o){return _(e,["Error loading <img>",e,"Error",o])},i.src=n}else _(e,['Found an <img> tag with an empty "src" attribute. This prevents pre-loading it. The <img> is:',e])};for(E=0;E<g.length;E++)O(E);var M=function(t){var e=v[t];e.preload="auto";var n=e.getAttribute("poster");if(n){var i=new Image;i.onload=function(){return _(e)},i.onerror=function(t,i,r,o,s){return _(e,["Error loading video poster",n,"for video",e,"Error:",s])},i.src=n}else e.readyState>=2?_(e):(e.onloadeddata=function(){return _(e)},e.onerror=function(t,n,i,r,o){return _(e,["Error loading video",e,"Error",o])},e.onstalled=function(){return _(e,["Loading video stalled, skipping",e])})};for(E=0;E<v.length;E++)M(E);var A="input",C=d.querySelectorAll(A),k=m.querySelectorAll(A);for(E=0;E<C.length;E++)k[E].value=C[E].value;var D="input[type=checkbox],input[type=radio]",L=d.querySelectorAll(D),R=m.querySelectorAll(D);for(E=0;E<L.length;E++)R[E].checked=L[E].checked;var I="select",P=d.querySelectorAll(I),N=m.querySelectorAll(I);for(E=0;E<P.length;E++)N[E].value=P[E].value}if(s)for(var U=document.querySelectorAll("style, link[rel='stylesheet']"),B=function(t,e){var i=U[t];if("style"===i.tagName.toLowerCase()){var r=m.createElement(i.tagName),o=i.sheet;if(o){var s="";try{for(var a=o.cssRules.length,l=0;l<a;++l)"string"==typeof o.cssRules[l].cssText&&(s+="".concat(o.cssRules[l].cssText,"\r\n"))}catch(t){n.logMessages(["A stylesheet could not be accessed. This is likely due to the stylesheet having cross-origin imports, and many browsers block script access to cross-origin stylesheets. See https://github.com/gregnb/react-to-print/issues/429 for details. You may be able to load the sheet by both marking the stylesheet with the cross `crossorigin` attribute, and setting the `Access-Control-Allow-Origin` header on the server serving the stylesheet. Alternatively, host the stylesheet on your domain to avoid this issue entirely.",i],"warning")}r.setAttribute("id","react-to-print-".concat(t)),c&&r.setAttribute("nonce",c),r.appendChild(m.createTextNode(s)),m.head.appendChild(r)}}else if(i.getAttribute("href"))if(i.hasAttribute("disabled"))n.logMessages(["`react-to-print` encountered a <link> tag with a `disabled` attribute and will ignore it. Note that the `disabled` attribute is deprecated, and some browsers ignore it. You should stop using it. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-disabled. The <link> is:",i],"warning"),_(i);else{for(var u=m.createElement(i.tagName),h=(l=0,i.attributes.length);l<h;++l){var d=i.attributes[l];d&&u.setAttribute(d.nodeName,d.nodeValue||"")}u.onload=function(){return _(u)},u.onerror=function(t,e,n,i,r){return _(u,["Failed to load",u,"Error:",r])},c&&u.setAttribute("nonce",c),m.head.appendChild(u)}else n.logMessages(["`react-to-print` encountered a <link> tag with an empty `href` attribute. In addition to being invalid HTML, this can cause problems in many browsers, and so the <link> was not loaded. The <link> is:",i],"warning"),_(i)},$=(E=0,U.length);E<$;++E)B(E)}0!==n.numResourcesToLoad&&s||n.triggerPrint(h)},n.handleRemoveIframe(!0),document.body.appendChild(h)}else n.logMessages(['"react-to-print" could not locate the DOM node corresponding with the `content` prop'])}else n.logMessages(['There is nothing to print because the "content" prop returned "null". Please ensure "content" is renderable before allowing "react-to-print" to be called.']);else n.logMessages(["To print a functional component ensure it is wrapped with `React.forwardRef`, and ensure the forwarded ref is used. See the README for an example: https://github.com/gregnb/react-to-print#examples"])},n.handleRemoveIframe=function(t){var e=n.props.removeAfterPrint;if(t||e){var i=document.getElementById("printWindow");i&&document.body.removeChild(i)}},n.logMessages=function(t,e){void 0===e&&(e="error"),n.props.suppressErrors||("error"===e?console.error(t):"warning"===e?console.warn(t):"debug"===e&&console.debug(t))},n}return e.__extends(n,t),n.prototype.render=function(){var t=this.props,e=t.children,n=t.trigger;if(n)return i.cloneElement(n(),{onClick:this.handleClick});if(!l)return this.logMessages(['"react-to-print" requires React ^16.3.0 to be able to use "PrintContext"']),null;var r={handlePrint:this.handleClick};return i.createElement(l.Provider,{value:r},e)},n.defaultProps=c,n}(i.Component);t.default=u,t.useReactToPrint=function(t){if(!a)return t.suppressErrors||console.error('"react-to-print" requires React ^16.8.0 to be able to use "useReactToPrint"'),function(){throw new Error('"react-to-print" requires React ^16.8.0 to be able to use "useReactToPrint"')};var n=i.useMemo((function(){return new u(e.__assign(e.__assign({},c),t))}),[t]);return i.useCallback((function(){return n.handleClick()}),[n])}}(),o}())},51890:(t,e,n)=>{"use strict";n.d(e,{Wh:()=>F,bl:()=>w_});var i=n(1343),r=Object.defineProperty,o=(t,e,n)=>((t,e,n)=>e in t?r(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n)(t,"symbol"!=typeof e?e+"":e,n),s=(t=>(t.RENDER_FINISHED="render-finished",t.RESIZE="chart-resize",t.MOUSEOVER="chart-mouseover",t.MOUSEOUT="chart-mouseout",t))(s||{}),a=(t=>(t.SHOW="show-modal",t.HIDE="hide-modal",t))(a||{}),l=(t=>(t.UPDATE="model-update",t))(l||{}),c=(t=>(t.SHOW_OVERFLOW_MENU="show-toolbar-overflow-menu",t.HIDE_OVERFLOW_MENU="hide-toolbar-overflow-menu",t.BUTTON_CLICK="toolbar-button-click",t.SHOW_TOOLTIP="toolbar-show-tooltip",t.HIDE_TOOLTIP="toolbar-hide-tooltip",t))(c||{}),u=(t=>(t.UPDATE="zoom-bar-update",t.SELECTION_START="zoom-bar-selection-start",t.SELECTION_IN_PROGRESS="zoom-bar-selection-in-progress",t.SELECTION_END="zoom-bar-selection-end",t))(u||{}),h=(t=>(t.CHANGE="zoom-domain-change",t))(h||{}),d=(t=>(t.CANVAS_ZOOM_IN="canvas-zoom-in",t.CANVAS_ZOOM_OUT="canvas-zoom-out",t))(d||{}),f=(t=>(t.LABEL_MOUSEOVER="axis-label-mouseover",t.LABEL_MOUSEMOVE="axis-label-mousemove",t.LABEL_CLICK="axis-label-click",t.LABEL_MOUSEOUT="axis-label-mouseout",t.LABEL_FOCUS="axis-label-focus",t.LABEL_BLUR="axis-label-blur",t.RENDER_COMPLETE="axis-render-complete",t))(f||{}),p=(t=>(t.POINT_MOUSEOVER="scatter-mouseover",t.POINT_MOUSEMOVE="scatter-mousemove",t.POINT_CLICK="scatter-click",t.POINT_MOUSEOUT="scatter-mouseout",t))(p||{}),m=(t=>(t.WORD_MOUSEOVER="wordcloud-word-mouseover",t.WORD_MOUSEMOVE="wordcloud-word-mousemove",t.WORD_CLICK="wordcloud-word-click",t.WORD_MOUSEOUT="wordcloud-word-mouseout",t))(m||{}),g=(t=>(t.SLICE_MOUSEOVER="pie-slice-mouseover",t.SLICE_MOUSEMOVE="pie-slice-mousemove",t.SLICE_CLICK="pie-slice-click",t.SLICE_MOUSEOUT="pie-slice-mouseout",t))(g||{}),v=(t=>(t.ARC_MOUSEOVER="gauge-arc-mouseover",t.ARC_MOUSEMOVE="gauge-arc-mousemove",t.ARC_CLICK="gauge-arc-click",t.ARC_MOUSEOUT="gauge-arc-mouseout",t))(v||{}),y=(t=>(t.BAR_MOUSEOVER="bar-mouseover",t.BAR_MOUSEMOVE="bar-mousemove",t.BAR_CLICK="bar-click",t.BAR_MOUSEOUT="bar-mouseout",t))(y||{}),_=(t=>(t.BOX_MOUSEOVER="box-mouseover",t.BOX_MOUSEMOVE="box-mousemove",t.BOX_CLICK="box-click",t.BOX_MOUSEOUT="box-mouseout",t.OUTLIER_MOUSEOVER="outlier-mouseover",t.OUTLIER_MOUSEMOVE="outlier-mousemove",t.OUTLIER_CLICK="outlier-click",t.OUTLIER_MOUSEOUT="outlier-mouseout",t))(_||{}),b=(t=>(t.SCATTER_MOUSEOVER="scatter-mouseover",t.SCATTER_MOUSEMOVE="scatter-mousemove",t.SCATTER_CLICK="scatter-click",t.SCATTER_MOUSEOUT="scatter-mouseout",t))(b||{}),w=(t=>(t.POINT_MOUSEOVER="scatter-mouseover",t.POINT_MOUSEMOVE="scatter-mousemove",t.POINT_CLICK="scatter-click",t.POINT_MOUSEOUT="scatter-mouseout",t))(w||{}),x=(t=>(t.X_AXIS_MOUSEOVER="radar-x-axis-mouseover",t.X_AXIS_MOUSEMOVE="radar-x-axis-mousemove",t.X_AXIS_CLICK="radar-x-axis-click",t.X_AXIS_MOUSEOUT="radar-x-axis-mouseout",t))(x||{}),E=(t=>(t.NODE_MOUSEOVER="tree-node-mouseover",t.NODE_CLICK="tree-node-click",t.NODE_MOUSEOUT="tree-node-mouseout",t))(E||{}),T=(t=>(t.LEAF_MOUSEOVER="leaf-mouseover",t.LEAF_MOUSEMOVE="leaf-mousemove",t.LEAF_CLICK="leaf-click",t.LEAF_MOUSEOUT="leaf-mouseout",t))(T||{}),S=(t=>(t.SHOW="show-tooltip",t.MOVE="move-tooltip",t.HIDE="hide-tooltip",t))(S||{}),O=(t=>(t.SHOW="show-threshold",t.HIDE="hide-threshold",t))(O||{}),M=(t=>(t.ITEM_HOVER="legend-item-onhover",t.ITEM_CLICK="legend-item-onclick",t.ITEM_MOUSEOUT="legend-item-onmouseout",t.ITEMS_UPDATE="legend-items-update",t))(M||{}),A=(t=>(t.CIRCLE_MOUSEOVER="circle-leaf-mouseover",t.CIRCLE_CLICK="circle-leaf-click",t.CIRCLE_MOUSEOUT="circle-leaf-mouseout",t.CIRCLE_MOUSEMOVE="circle-leaf-mousemove",t))(A||{}),C=(t=>(t.NODE_MOUSEOVER="alluvial-node-mouseover",t.NODE_CLICK="alluvial-node-click",t.NODE_MOUSEOUT="alluvial-node-mouseout",t.NODE_MOUSEMOVE="alluvial-node-mousemove",t.LINE_MOUSEOVER="alluvial-line-mouseover",t.LINE_CLICK="alluvial-line-click",t.LINE_MOUSEOUT="alluvial-line-mouseout",t.LINE_MOUSEMOVE="alluvial-line-mousemove",t))(C||{}),k=(t=>(t.METER_MOUSEOVER="meter-mouseover",t.METER_CLICK="meter-click",t.METER_MOUSEOUT="meter-mouseout",t.METER_MOUSEMOVE="meter-mousemove",t))(k||{}),D=(t=>(t.HEATMAP_MOUSEOVER="heatmap-mouseover",t.HEATMAP_CLICK="heatmap-click",t.HEATMAP_MOUSEOUT="heatmap-mouseout",t.HEATMAP_MOUSEMOVE="hetmap-mousemove",t))(D||{}),L=(t=>(t.CHOROPLETH_MOUSEOVER="choropleth-mouseover",t.CHOROPLETH_CLICK="choropleth-click",t.CHOROPLETH_MOUSEOUT="choropleth-mouseout",t.CHOROPLETH_MOUSEMOVE="choropleth-mousemove",t))(L||{});const R=Object.freeze(Object.defineProperty({__proto__:null,Alluvial:C,Area:p,Axis:f,Bar:y,Boxplot:_,CanvasZoom:d,Chart:s,Choropleth:L,CirclePack:A,Gauge:v,Heatmap:D,Legend:M,Line:w,Meter:k,Modal:a,Model:l,Pie:g,Radar:x,Scatter:b,Threshold:O,Toolbar:c,Tooltip:S,Tree:E,Treemap:T,WordCloud:m,ZoomBar:u,ZoomDomain:h},Symbol.toStringTag,{value:"Module"}));var I=(t=>(t.HTML="html",t.SVG="svg",t))(I||{}),P=(t=>(t.WHITE="white",t.G100="g100",t.G90="g90",t.G10="g10",t))(P||{}),N=(t=>(t.BACKGROUND="background",t.FILL="fill",t.STROKE="stroke",t.TOOLTIP="tooltip",t))(N||{}),U=(t=>(t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom",t))(U||{}),B=(t=>(t.GRAPH_VIEW="graph_view",t.SLIDER_VIEW="slider_view",t))(B||{}),$=(t=>(t.END_LINE="end_line",t.MID_LINE="mid_line",t.FRONT_LINE="front_line",t.NONE="none",t))($||{}),H=(t=>(t.VERTICAL="vertical",t.HORIZONTAL="horizontal",t))(H||{}),F=(t=>(t.TIME="time",t.LINEAR="linear",t.LOG="log",t.LABELS="labels",t.LABELS_RATIO="labels-ratio",t))(F||{}),z=(t=>(t.RIGHT="right",t.LEFT="left",t.TOP="top",t.BOTTOM="bottom",t))(z||{}),j=(t=>(t.LEFT="left",t.CENTER="center",t.RIGHT="right",t))(j||{}),V=(t=>(t.HORIZONTAL="horizontal",t.VERTICAL="vertical",t))(V||{}),G=(t=>(t.TREE="tree",t.DENDROGRAM="dendrogram",t))(G||{}),W=(t=>(t.ROW="row",t.COLUMN="column",t.ROW_REVERSE="row-reverse",t.COLUMN_REVERSE="column-reverse",t))(W||{}),Y=(t=>(t.FIXED="fixed",t.PREFERRED="preferred",t.STRETCH="stretch",t))(Y||{}),Z=(t=>(t.CENTER="center",t))(Z||{}),q=(t=>(t.GRID="grid",t.VERT_OR_HORIZ="vertOrHoriz",t.PIE="pie",t.DONUT="donut",t))(q||{}),X=(t=>(t.SEMI="semi",t.FULL="full",t))(X||{}),K=(t=>(t.ALWAYS="always",t.AUTO="auto",t.NEVER="never",t))(K||{}),Q=(t=>(t.SCATTER="scatter",t.LINE="line",t.SIMPLE_BAR="simple-bar",t.STACKED_BAR="stacked-bar",t.GROUPED_BAR="grouped-bar",t.AREA="area",t.STACKED_AREA="stacked-area",t))(Q||{}),J=(t=>(t.EXPORT_CSV="Export as CSV",t.EXPORT_PNG="Export as PNG",t.EXPORT_JPG="Export as JPG",t.ZOOM_IN="Zoom in",t.ZOOM_OUT="Zoom out",t.RESET_ZOOM="Reset zoom",t.MAKE_FULLSCREEN="Make fullscreen",t.EXIT_FULLSCREEN="Exit fullscreen",t.SHOW_AS_DATATABLE="Show as data-table",t.CUSTOM="Custom",t))(J||{}),tt=(t=>(t.LEFT="left",t.RIGHT="right",t))(tt||{}),et=(t=>(t.CHECKBOX="checkbox",t.RADIUS="radius",t.AREA="area",t.SIZE="size",t.LINE="line",t.QUARTILE="quartile",t.ZOOM="zoom",t))(et||{}),nt=(t=>(t.ON="on",t.AUTO="auto",t.OFF="off",t))(nt||{}),it=(t=>(t.DEFAULT="default",t.HOVERABLE="hoverable",t))(it||{}),rt=(t=>(t.geoEqualEarth="geoEqualEarth",t.geoAlbers="geoAlbers",t.geoConicEqualArea="geoConicEqualArea",t.geoConicEquidistant="geoConicEquidistant",t.geoEquirectangular="geoEquirectangular",t.geoMercator="geoMercator",t.geoNaturalEarth1="geoNaturalEarth1",t))(rt||{}),ot=(t=>(t["15seconds"]="15seconds",t.minute="minute",t["30minutes"]="30minutes",t.hourly="hourly",t.daily="daily",t.weekly="weekly",t.monthly="monthly",t.quarterly="quarterly",t.yearly="yearly",t))(ot||{});function st(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}function at(t){return(e,n)=>{let i;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&t.formattingValues){const e=t.defaultFormattingWidth||t.defaultWidth,r=null!=n&&n.width?String(n.width):e;i=t.formattingValues[r]||t.formattingValues[e]}else{const e=t.defaultWidth,r=null!=n&&n.width?String(n.width):t.defaultWidth;i=t.values[r]||t.values[e]}return i[t.argumentCallback?t.argumentCallback(e):e]}}function lt(t){return(e,n={})=>{const i=n.width,r=i&&t.matchPatterns[i]||t.matchPatterns[t.defaultMatchWidth],o=e.match(r);if(!o)return null;const s=o[0],a=i&&t.parsePatterns[i]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(a)?function(t){for(let e=0;e<t.length;e++)if(t[e].test(s))return e}(a):function(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&t[e].test(s))return e}(a);let c;return c=t.valueCallback?t.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c,{value:c,rest:e.slice(s.length)}}}const ct=6048e5,ut=36e5,ht=Symbol.for("constructDateFrom");function dt(t,e){return"function"==typeof t?t(e):t&&"object"==typeof t&&ht in t?t[ht](e):t instanceof Date?new t.constructor(e):new Date(e)}function ft(t,...e){const n=dt.bind(null,e.find((t=>"object"==typeof t)));return e.map(n)}let pt={};function mt(){return pt}function gt(t,e){return dt(e||t,t)}function vt(t,e){var n,i,r,o;const s=mt(),a=(null==e?void 0:e.weekStartsOn)??(null==(i=null==(n=null==e?void 0:e.locale)?void 0:n.options)?void 0:i.weekStartsOn)??s.weekStartsOn??(null==(o=null==(r=s.locale)?void 0:r.options)?void 0:o.weekStartsOn)??0,l=gt(t,null==e?void 0:e.in),c=l.getDay(),u=(c<a?7:0)+c-a;return l.setDate(l.getDate()-u),l.setHours(0,0,0,0),l}const yt={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},_t={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},bt={ordinalNumber:(t,e)=>{const n=Number(t),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:at({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:at({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:t=>t-1}),month:at({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:at({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:at({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},wt={ordinalNumber:(Et={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:t=>parseInt(t,10)},(t,e={})=>{const n=t.match(Et.matchPattern);if(!n)return null;const i=n[0],r=t.match(Et.parsePattern);if(!r)return null;let o=Et.valueCallback?Et.valueCallback(r[0]):r[0];return o=e.valueCallback?e.valueCallback(o):o,{value:o,rest:t.slice(i.length)}}),era:lt({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:lt({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:t=>t+1}),month:lt({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:lt({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:lt({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},xt={code:"en-US",formatDistance:(t,e,n)=>{let i;const r=yt[t];return i="string"==typeof r?r:1===e?r.one:r.other.replace("{{count}}",e.toString()),null!=n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i},formatLong:{date:st({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:st({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:st({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},formatRelative:(t,e,n,i)=>_t[t],localize:bt,match:wt,options:{weekStartsOn:0,firstWeekContainsDate:1}};var Et,Tt="object"==typeof global&&global&&global.Object===Object&&global,St="object"==typeof self&&self&&self.Object===Object&&self,Ot=Tt||St||Function("return this")(),Mt=Ot.Symbol,At=Object.prototype,Ct=At.hasOwnProperty,kt=At.toString,Dt=Mt?Mt.toStringTag:void 0,Lt=Object.prototype.toString,Rt=Mt?Mt.toStringTag:void 0;function It(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Rt&&Rt in Object(t)?function(t){var e=Ct.call(t,Dt),n=t[Dt];try{t[Dt]=void 0;var i=!0}catch{}var r=kt.call(t);return i&&(e?t[Dt]=n:delete t[Dt]),r}(t):function(t){return Lt.call(t)}(t)}function Pt(t){return null!=t&&"object"==typeof t}function Nt(t){return"symbol"==typeof t||Pt(t)&&"[object Symbol]"==It(t)}function Ut(t,e){for(var n=-1,i=null==t?0:t.length,r=Array(i);++n<i;)r[n]=e(t[n],n,t);return r}var Bt=Array.isArray,$t=Mt?Mt.prototype:void 0,Ht=$t?$t.toString:void 0;function Ft(t){if("string"==typeof t)return t;if(Bt(t))return Ut(t,Ft)+"";if(Nt(t))return Ht?Ht.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function zt(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function jt(t){return t}function Vt(t){if(!zt(t))return!1;var e=It(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}var Gt=Ot["__core-js_shared__"],Wt=function(){var t=/[^.]+$/.exec(Gt&&Gt.keys&&Gt.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Yt=Function.prototype.toString;function Zt(t){if(null!=t){try{return Yt.call(t)}catch{}try{return t+""}catch{}}return""}var qt=/^\[object .+?Constructor\]$/,Xt=Function.prototype,Kt=Object.prototype,Qt=Xt.toString,Jt=Kt.hasOwnProperty,te=RegExp("^"+Qt.call(Jt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ee(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return function(t){return!(!zt(t)||function(t){return!!Wt&&Wt in t}(t))&&(Vt(t)?te:qt).test(Zt(t))}(n)?n:void 0}var ne=ee(Ot,"WeakMap"),ie=Object.create,re=function(){function t(){}return function(e){if(!zt(e))return{};if(ie)return ie(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function oe(t,e){var n=-1,i=t.length;for(e||(e=Array(i));++n<i;)e[n]=t[n];return e}var se=Date.now;function ae(t){return function(){return t}}var le=function(){try{var t=ee(Object,"defineProperty");return t({},"",{}),t}catch{}}(),ce=le?function(t,e){return le(t,"toString",{configurable:!0,enumerable:!1,value:ae(e),writable:!0})}:jt,ue=function(t){var e=0,n=0;return function(){var i=se(),r=16-(i-n);if(n=i,r>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(ce);function he(t){return t!=t}function de(t,e){return!(null==t||!t.length)&&function(t,e){return e==e?function(t,e){for(var n=-1,i=t.length;++n<i;)if(t[n]===e)return n;return-1}(t,e):function(t,e){for(var n=t.length,i=-1;++i<n;)if(e(t[i],i,t))return i;return-1}(t,he)}(t,e)>-1}var fe=/^(?:0|[1-9]\d*)$/;function pe(t,e){var n=typeof t;return!!(e=e??9007199254740991)&&("number"==n||"symbol"!=n&&fe.test(t))&&t>-1&&t%1==0&&t<e}function me(t,e,n){"__proto__"==e&&le?le(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function ge(t,e){return t===e||t!=t&&e!=e}var ve=Object.prototype.hasOwnProperty;function ye(t,e,n){var i=t[e];(!ve.call(t,e)||!ge(i,n)||void 0===n&&!(e in t))&&me(t,e,n)}function _e(t,e,n,i){var r=!n;n||(n={});for(var o=-1,s=e.length;++o<s;){var a=e[o],l=void 0;void 0===l&&(l=t[a]),r?me(n,a,l):ye(n,a,l)}return n}var be=Math.max;function we(t,e,n){return e=be(void 0===e?t.length-1:e,0),function(){for(var i=arguments,r=-1,o=be(i.length-e,0),s=Array(o);++r<o;)s[r]=i[e+r];r=-1;for(var a=Array(e+1);++r<e;)a[r]=i[r];return a[e]=n(s),function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}(t,this,a)}}function xe(t,e){return ue(we(t,e,jt),t+"")}function Ee(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function Te(t){return null!=t&&Ee(t.length)&&!Vt(t)}var Se=Object.prototype;function Oe(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Se)}function Me(t){return Pt(t)&&"[object Arguments]"==It(t)}var Ae=Object.prototype,Ce=Ae.hasOwnProperty,ke=Ae.propertyIsEnumerable,De=Me(function(){return arguments}())?Me:function(t){return Pt(t)&&Ce.call(t,"callee")&&!ke.call(t,"callee")},Le="object"==typeof exports&&exports&&!exports.nodeType&&exports,Re=Le&&"object"==typeof module&&module&&!module.nodeType&&module,Ie=Re&&Re.exports===Le?Ot.Buffer:void 0,Pe=(Ie?Ie.isBuffer:void 0)||function(){return!1},Ne={};function Ue(t){return function(e){return t(e)}}Ne["[object Float32Array]"]=Ne["[object Float64Array]"]=Ne["[object Int8Array]"]=Ne["[object Int16Array]"]=Ne["[object Int32Array]"]=Ne["[object Uint8Array]"]=Ne["[object Uint8ClampedArray]"]=Ne["[object Uint16Array]"]=Ne["[object Uint32Array]"]=!0,Ne["[object Arguments]"]=Ne["[object Array]"]=Ne["[object ArrayBuffer]"]=Ne["[object Boolean]"]=Ne["[object DataView]"]=Ne["[object Date]"]=Ne["[object Error]"]=Ne["[object Function]"]=Ne["[object Map]"]=Ne["[object Number]"]=Ne["[object Object]"]=Ne["[object RegExp]"]=Ne["[object Set]"]=Ne["[object String]"]=Ne["[object WeakMap]"]=!1;var Be="object"==typeof exports&&exports&&!exports.nodeType&&exports,$e=Be&&"object"==typeof module&&module&&!module.nodeType&&module,He=$e&&$e.exports===Be&&Tt.process,Fe=function(){try{return $e&&$e.require&&$e.require("util").types||He&&He.binding&&He.binding("util")}catch{}}(),ze=Fe&&Fe.isTypedArray,je=ze?Ue(ze):function(t){return Pt(t)&&Ee(t.length)&&!!Ne[It(t)]},Ve=Object.prototype.hasOwnProperty;function Ge(t,e){var n=Bt(t),i=!n&&De(t),r=!n&&!i&&Pe(t),o=!n&&!i&&!r&&je(t),s=n||i||r||o,a=s?function(t,e){for(var n=-1,i=Array(t);++n<t;)i[n]=e(n);return i}(t.length,String):[],l=a.length;for(var c in t)(e||Ve.call(t,c))&&(!s||!("length"==c||r&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||pe(c,l)))&&a.push(c);return a}function We(t,e){return function(n){return t(e(n))}}var Ye=We(Object.keys,Object),Ze=Object.prototype.hasOwnProperty;function qe(t){if(!Oe(t))return Ye(t);var e=[];for(var n in Object(t))Ze.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Xe(t){return Te(t)?Ge(t):qe(t)}var Ke=Object.prototype.hasOwnProperty;function Qe(t){return Te(t)?Ge(t,!0):function(t){if(!zt(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=Oe(t),n=[];for(var i in t)"constructor"==i&&(e||!Ke.call(t,i))||n.push(i);return n}(t)}var Je=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,tn=/^\w*$/;function en(t,e){if(Bt(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Nt(t))||tn.test(t)||!Je.test(t)||null!=e&&t in Object(e)}var nn=ee(Object,"create"),rn=Object.prototype.hasOwnProperty,on=Object.prototype.hasOwnProperty;function sn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function an(t,e){for(var n=t.length;n--;)if(ge(t[n][0],e))return n;return-1}sn.prototype.clear=function(){this.__data__=nn?nn(null):{},this.size=0},sn.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},sn.prototype.get=function(t){var e=this.__data__;if(nn){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return rn.call(e,t)?e[t]:void 0},sn.prototype.has=function(t){var e=this.__data__;return nn?void 0!==e[t]:on.call(e,t)},sn.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=nn&&void 0===e?"__lodash_hash_undefined__":e,this};var ln=Array.prototype.splice;function cn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}cn.prototype.clear=function(){this.__data__=[],this.size=0},cn.prototype.delete=function(t){var e=this.__data__,n=an(e,t);return!(n<0||(n==e.length-1?e.pop():ln.call(e,n,1),--this.size,0))},cn.prototype.get=function(t){var e=this.__data__,n=an(e,t);return n<0?void 0:e[n][1]},cn.prototype.has=function(t){return an(this.__data__,t)>-1},cn.prototype.set=function(t,e){var n=this.__data__,i=an(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this};var un=ee(Ot,"Map");function hn(t,e){var n=t.__data__;return function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}(e)?n["string"==typeof e?"string":"hash"]:n.map}function dn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function fn(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var i=arguments,r=e?e.apply(this,i):i[0],o=n.cache;if(o.has(r))return o.get(r);var s=t.apply(this,i);return n.cache=o.set(r,s)||o,s};return n.cache=new(fn.Cache||dn),n}dn.prototype.clear=function(){this.size=0,this.__data__={hash:new sn,map:new(un||cn),string:new sn}},dn.prototype.delete=function(t){var e=hn(this,t).delete(t);return this.size-=e?1:0,e},dn.prototype.get=function(t){return hn(this,t).get(t)},dn.prototype.has=function(t){return hn(this,t).has(t)},dn.prototype.set=function(t,e){var n=hn(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this},fn.Cache=dn;var pn,mn,gn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,vn=/\\(\\)?/g,yn=(pn=fn((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(gn,(function(t,n,i,r){e.push(i?r.replace(vn,"$1"):n||t)})),e}),(function(t){return 500===mn.size&&mn.clear(),t})),mn=pn.cache,pn);function _n(t){return null==t?"":Ft(t)}function bn(t,e){return Bt(t)?t:en(t,e)?[t]:yn(_n(t))}function wn(t){if("string"==typeof t||Nt(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function xn(t,e){for(var n=0,i=(e=bn(e,t)).length;null!=t&&n<i;)t=t[wn(e[n++])];return n&&n==i?t:void 0}function En(t,e,n){var i=null==t?void 0:xn(t,e);return void 0===i?n:i}function Tn(t,e){for(var n=-1,i=e.length,r=t.length;++n<i;)t[r+n]=e[n];return t}var Sn=Mt?Mt.isConcatSpreadable:void 0;function On(t){return Bt(t)||De(t)||!!(Sn&&t&&t[Sn])}function Mn(t,e,n,i,r){var o=-1,s=t.length;for(n||(n=On),r||(r=[]);++o<s;){var a=t[o];e>0&&n(a)?e>1?Mn(a,e-1,n,i,r):Tn(r,a):i||(r[r.length]=a)}return r}var An=We(Object.getPrototypeOf,Object),Cn=Function.prototype,kn=Object.prototype,Dn=Cn.toString,Ln=kn.hasOwnProperty,Rn=Dn.call(Object);function In(t){if(!Pt(t)||"[object Object]"!=It(t))return!1;var e=An(t);if(null===e)return!0;var n=Ln.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Dn.call(n)==Rn}function Pn(t){var e=this.__data__=new cn(t);this.size=e.size}Pn.prototype.clear=function(){this.__data__=new cn,this.size=0},Pn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Pn.prototype.get=function(t){return this.__data__.get(t)},Pn.prototype.has=function(t){return this.__data__.has(t)},Pn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof cn){var i=n.__data__;if(!un||i.length<199)return i.push([t,e]),this.size=++n.size,this;n=this.__data__=new dn(i)}return n.set(t,e),this.size=n.size,this};var Nn="object"==typeof exports&&exports&&!exports.nodeType&&exports,Un=Nn&&"object"==typeof module&&module&&!module.nodeType&&module,Bn=Un&&Un.exports===Nn?Ot.Buffer:void 0,$n=Bn?Bn.allocUnsafe:void 0;function Hn(t,e){if(e)return t.slice();var n=t.length,i=$n?$n(n):new t.constructor(n);return t.copy(i),i}function Fn(){return[]}var zn=Object.prototype.propertyIsEnumerable,jn=Object.getOwnPropertySymbols,Vn=jn?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,i=null==t?0:t.length,r=0,o=[];++n<i;){var s=t[n];e(s)&&(o[r++]=s)}return o}(jn(t),(function(e){return zn.call(t,e)})))}:Fn,Gn=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)Tn(e,Vn(t)),t=An(t);return e}:Fn;function Wn(t,e,n){var i=e(t);return Bt(t)?i:Tn(i,n(t))}function Yn(t){return Wn(t,Xe,Vn)}function Zn(t){return Wn(t,Qe,Gn)}var qn=ee(Ot,"DataView"),Xn=ee(Ot,"Promise"),Kn=ee(Ot,"Set"),Qn="[object Map]",Jn="[object Promise]",ti="[object Set]",ei="[object WeakMap]",ni="[object DataView]",ii=Zt(qn),ri=Zt(un),oi=Zt(Xn),si=Zt(Kn),ai=Zt(ne),li=It;(qn&&li(new qn(new ArrayBuffer(1)))!=ni||un&&li(new un)!=Qn||Xn&&li(Xn.resolve())!=Jn||Kn&&li(new Kn)!=ti||ne&&li(new ne)!=ei)&&(li=function(t){var e=It(t),n="[object Object]"==e?t.constructor:void 0,i=n?Zt(n):"";if(i)switch(i){case ii:return ni;case ri:return Qn;case oi:return Jn;case si:return ti;case ai:return ei}return e});var ci=Object.prototype.hasOwnProperty,ui=Ot.Uint8Array;function hi(t){var e=new t.constructor(t.byteLength);return new ui(e).set(new ui(t)),e}var di=/\w*$/,fi=Mt?Mt.prototype:void 0,pi=fi?fi.valueOf:void 0;function mi(t,e){var n=e?hi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function gi(t){return"function"!=typeof t.constructor||Oe(t)?{}:re(An(t))}var vi=Fe&&Fe.isMap,yi=vi?Ue(vi):function(t){return Pt(t)&&"[object Map]"==li(t)},_i=Fe&&Fe.isSet,bi=_i?Ue(_i):function(t){return Pt(t)&&"[object Set]"==li(t)},wi="[object Arguments]",xi="[object Function]",Ei="[object Object]",Ti={};function Si(t,e,n,i,r,o){var s,a=1&e,l=2&e,c=4&e;if(n&&(s=r?n(t,i,r,o):n(t)),void 0!==s)return s;if(!zt(t))return t;var u=Bt(t);if(u){if(s=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&ci.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!a)return oe(t,s)}else{var h=li(t),d=h==xi||"[object GeneratorFunction]"==h;if(Pe(t))return Hn(t,a);if(h==Ei||h==wi||d&&!r){if(s=l||d?{}:gi(t),!a)return l?function(t,e){return _e(t,Gn(t),e)}(t,function(t,e){return t&&_e(e,Qe(e),t)}(s,t)):function(t,e){return _e(t,Vn(t),e)}(t,function(t,e){return t&&_e(e,Xe(e),t)}(s,t))}else{if(!Ti[h])return r?t:{};s=function(t,e,n){var i=t.constructor;switch(e){case"[object ArrayBuffer]":return hi(t);case"[object Boolean]":case"[object Date]":return new i(+t);case"[object DataView]":return function(t,e){var n=e?hi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return mi(t,n);case"[object Map]":case"[object Set]":return new i;case"[object Number]":case"[object String]":return new i(t);case"[object RegExp]":return function(t){var e=new t.constructor(t.source,di.exec(t));return e.lastIndex=t.lastIndex,e}(t);case"[object Symbol]":return function(t){return pi?Object(pi.call(t)):{}}(t)}}(t,h,a)}}o||(o=new Pn);var f=o.get(t);if(f)return f;o.set(t,s),bi(t)?t.forEach((function(i){s.add(Si(i,e,n,i,t,o))})):yi(t)&&t.forEach((function(i,r){s.set(r,Si(i,e,n,r,t,o))}));var p=u?void 0:(c?l?Zn:Yn:l?Qe:Xe)(t);return function(t,e){for(var n=-1,i=null==t?0:t.length;++n<i&&!1!==e(t[n],n););}(p||t,(function(i,r){p&&(i=t[r=i]),ye(s,r,Si(i,e,n,r,t,o))})),s}function Oi(t){return Si(t,5)}function Mi(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new dn;++e<n;)this.add(t[e])}function Ai(t,e){for(var n=-1,i=null==t?0:t.length;++n<i;)if(e(t[n],n,t))return!0;return!1}function Ci(t,e){return t.has(e)}function ki(t,e,n,i,r,o){var s=1&n,a=t.length,l=e.length;if(a!=l&&!(s&&l>a))return!1;var c=o.get(t),u=o.get(e);if(c&&u)return c==e&&u==t;var h=-1,d=!0,f=2&n?new Mi:void 0;for(o.set(t,e),o.set(e,t);++h<a;){var p=t[h],m=e[h];if(i)var g=s?i(m,p,h,e,t,o):i(p,m,h,t,e,o);if(void 0!==g){if(g)continue;d=!1;break}if(f){if(!Ai(e,(function(t,e){if(!Ci(f,e)&&(p===t||r(p,t,n,i,o)))return f.push(e)}))){d=!1;break}}else if(p!==m&&!r(p,m,n,i,o)){d=!1;break}}return o.delete(t),o.delete(e),d}function Di(t){var e=-1,n=Array(t.size);return t.forEach((function(t,i){n[++e]=[i,t]})),n}function Li(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}Ti[wi]=Ti["[object Array]"]=Ti["[object ArrayBuffer]"]=Ti["[object DataView]"]=Ti["[object Boolean]"]=Ti["[object Date]"]=Ti["[object Float32Array]"]=Ti["[object Float64Array]"]=Ti["[object Int8Array]"]=Ti["[object Int16Array]"]=Ti["[object Int32Array]"]=Ti["[object Map]"]=Ti["[object Number]"]=Ti[Ei]=Ti["[object RegExp]"]=Ti["[object Set]"]=Ti["[object String]"]=Ti["[object Symbol]"]=Ti["[object Uint8Array]"]=Ti["[object Uint8ClampedArray]"]=Ti["[object Uint16Array]"]=Ti["[object Uint32Array]"]=!0,Ti["[object Error]"]=Ti[xi]=Ti["[object WeakMap]"]=!1,Mi.prototype.add=Mi.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Mi.prototype.has=function(t){return this.__data__.has(t)};var Ri=Mt?Mt.prototype:void 0,Ii=Ri?Ri.valueOf:void 0,Pi=Object.prototype.hasOwnProperty,Ni="[object Arguments]",Ui="[object Array]",Bi="[object Object]",$i=Object.prototype.hasOwnProperty;function Hi(t,e,n,i,r){return t===e||(null==t||null==e||!Pt(t)&&!Pt(e)?t!=t&&e!=e:function(t,e,n,i,r,o){var s=Bt(t),a=Bt(e),l=s?Ui:li(t),c=a?Ui:li(e),u=(l=l==Ni?Bi:l)==Bi,h=(c=c==Ni?Bi:c)==Bi,d=l==c;if(d&&Pe(t)){if(!Pe(e))return!1;s=!0,u=!1}if(d&&!u)return o||(o=new Pn),s||je(t)?ki(t,e,n,i,r,o):function(t,e,n,i,r,o,s){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!o(new ui(t),new ui(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return ge(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var a=Di;case"[object Set]":var l=1&i;if(a||(a=Li),t.size!=e.size&&!l)return!1;var c=s.get(t);if(c)return c==e;i|=2,s.set(t,e);var u=ki(a(t),a(e),i,r,o,s);return s.delete(t),u;case"[object Symbol]":if(Ii)return Ii.call(t)==Ii.call(e)}return!1}(t,e,l,n,i,r,o);if(!(1&n)){var f=u&&$i.call(t,"__wrapped__"),p=h&&$i.call(e,"__wrapped__");if(f||p){var m=f?t.value():t,g=p?e.value():e;return o||(o=new Pn),r(m,g,n,i,o)}}return!!d&&(o||(o=new Pn),function(t,e,n,i,r,o){var s=1&n,a=Yn(t),l=a.length;if(l!=Yn(e).length&&!s)return!1;for(var c=l;c--;){var u=a[c];if(!(s?u in e:Pi.call(e,u)))return!1}var h=o.get(t),d=o.get(e);if(h&&d)return h==e&&d==t;var f=!0;o.set(t,e),o.set(e,t);for(var p=s;++c<l;){var m=t[u=a[c]],g=e[u];if(i)var v=s?i(g,m,u,e,t,o):i(m,g,u,t,e,o);if(!(void 0===v?m===g||r(m,g,n,i,o):v)){f=!1;break}p||(p="constructor"==u)}if(f&&!p){var y=t.constructor,_=e.constructor;y!=_&&"constructor"in t&&"constructor"in e&&!("function"==typeof y&&y instanceof y&&"function"==typeof _&&_ instanceof _)&&(f=!1)}return o.delete(t),o.delete(e),f}(t,e,n,i,r,o))}(t,e,n,i,Hi,r))}function Fi(t){return t==t&&!zt(t)}function zi(t,e){return function(n){return null!=n&&n[t]===e&&(void 0!==e||t in Object(n))}}function ji(t,e){return null!=t&&e in Object(t)}function Vi(t){return"function"==typeof t?t:null==t?jt:"object"==typeof t?Bt(t)?function(t,e){return en(t)&&Fi(e)?zi(wn(t),e):function(n){var i=En(n,t);return void 0===i&&i===e?function(t,e){return null!=t&&function(t,e,n){for(var i=-1,r=(e=bn(e,t)).length,o=!1;++i<r;){var s=wn(e[i]);if(!(o=null!=t&&n(t,s)))break;t=t[s]}return o||++i!=r?o:!!(r=null==t?0:t.length)&&Ee(r)&&pe(s,r)&&(Bt(t)||De(t))}(t,e,ji)}(n,t):Hi(e,i,3)}}(t[0],t[1]):function(t){var e=function(t){for(var e=Xe(t),n=e.length;n--;){var i=e[n],r=t[i];e[n]=[i,r,Fi(r)]}return e}(t);return 1==e.length&&e[0][2]?zi(e[0][0],e[0][1]):function(n){return n===t||function(t,e,n){var i=n.length,r=i;if(null==t)return!r;for(t=Object(t);i--;){var o=n[i];if(o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++i<r;){var s=(o=n[i])[0],a=t[s],l=o[1];if(o[2]){if(void 0===a&&!(s in t))return!1}else if(!Hi(l,a,3,void 0,new Pn))return!1}return!0}(n,0,e)}}(t):function(t){return en(t)?function(t){return function(e){return null==e?void 0:e[t]}}(wn(t)):function(t){return function(e){return xn(e,t)}}(t)}(t)}var Gi=function(t,e,n){for(var i=-1,r=Object(t),o=n(t),s=o.length;s--;){var a=o[++i];if(!1===e(r[a],a,r))break}return t};function Wi(t,e,n){(void 0!==n&&!ge(t[e],n)||void 0===n&&!(e in t))&&me(t,e,n)}function Yi(t){return Pt(t)&&Te(t)}function Zi(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}function qi(t,e,n,i,r){t!==e&&Gi(e,(function(o,s){if(r||(r=new Pn),zt(o))!function(t,e,n,i,r,o,s){var a=Zi(t,n),l=Zi(e,n),c=s.get(l);if(c)Wi(t,n,c);else{var u=o?o(a,l,n+"",t,e,s):void 0,h=void 0===u;if(h){var d=Bt(l),f=!d&&Pe(l),p=!d&&!f&&je(l);u=l,d||f||p?Bt(a)?u=a:Yi(a)?u=oe(a):f?(h=!1,u=Hn(l,!0)):p?(h=!1,u=mi(l,!0)):u=[]:In(l)||De(l)?(u=a,De(a)?u=function(t){return _e(t,Qe(t))}(a):(!zt(a)||Vt(a))&&(u=gi(l))):h=!1}h&&(s.set(l,u),r(u,l,i,o,s),s.delete(l)),Wi(t,n,u)}}(t,e,s,n,qi,i,r);else{var a=i?i(Zi(t,s),o,s+"",t,e,r):void 0;void 0===a&&(a=o),Wi(t,s,a)}}),Qe)}function Xi(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}var Ki=Object.prototype.hasOwnProperty;var Qi=function(t){return xe((function(e,n){var i=-1,r=n.length,o=r>1?n[r-1]:void 0,s=r>2?n[2]:void 0;for(o=t.length>3&&"function"==typeof o?(r--,o):void 0,s&&function(t,e,n){if(!zt(n))return!1;var i=typeof e;return!!("number"==i?Te(n)&&pe(e,n.length):"string"==i&&e in n)&&ge(n[e],t)}(n[0],n[1],s)&&(o=r<3?void 0:o,r=1),e=Object(e);++i<r;){var a=n[i];a&&t(e,a,i)}return e}))}((function(t,e,n){qi(t,e,n)})),Ji=Kn&&1/Li(new Kn([,-0]))[1]==1/0?function(t){return new Kn(t)}:function(){};function tr(t,e,n){var i=-1,r=de,o=t.length,s=!0,a=[],l=a;if(o>=200){var c=e?null:Ji(t);if(c)return Li(c);s=!1,r=Ci,l=new Mi}else l=e?[]:a;t:for(;++i<o;){var u=t[i],h=e?e(u):u;if(u=0!==u?u:0,s&&h==h){for(var d=l.length;d--;)if(l[d]===h)continue t;e&&l.push(h),a.push(u)}else r(l,h,n)||(l!==a&&l.push(h),a.push(u))}return a}var er=xe((function(t){var e=Xi(t);return Yi(e)&&(e=void 0),tr(Mn(t,1,Yi,!0),Vi(e))}));function nr(t){return t&&t.length?tr(t):[]}function ir(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function rr(t,e){return null==t||null==e?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function or(t){let e,n,i;function r(t,i,r=0,o=t.length){if(r<o){if(0!==e(i,i))return o;do{const e=r+o>>>1;n(t[e],i)<0?r=e+1:o=e}while(r<o)}return r}return 2!==t.length?(e=ir,n=(e,n)=>ir(t(e),n),i=(e,n)=>t(e)-n):(e=t===ir||t===rr?t:sr,n=t,i=t),{left:r,center:function(t,e,n=0,o=t.length){const s=r(t,e,n,o-1);return s>n&&i(t[s-1],e)>-i(t[s],e)?s-1:s},right:function(t,i,r=0,o=t.length){if(r<o){if(0!==e(i,i))return o;do{const e=r+o>>>1;n(t[e],i)<=0?r=e+1:o=e}while(r<o)}return r}}}function sr(){return 0}const ar=or(ir).right;function lr(t,e){let n,i;if(void 0===e)for(const e of t)null!=e&&(void 0===n?e>=e&&(n=i=e):(n>e&&(n=e),i<e&&(i=e)));else{let r=-1;for(let o of t)null!=(o=e(o,++r,t))&&(void 0===n?o>=o&&(n=i=o):(n>o&&(n=o),i<o&&(i=o)))}return[n,i]}or((function(t){return null===t?NaN:+t})).center;let cr=class extends Map{constructor(t,e=hr){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(ur(this,t))}has(t){return super.has(ur(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},n){const i=e(n);return t.has(i)?t.get(i):(t.set(i,n),n)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},n){const i=e(n);return t.has(i)&&(n=t.get(i),t.delete(i)),n}(this,t))}};function ur({_intern:t,_key:e},n){const i=e(n);return t.has(i)?t.get(i):n}function hr(t){return null!==t&&"object"==typeof t?t.valueOf():t}const dr=Math.sqrt(50),fr=Math.sqrt(10),pr=Math.sqrt(2);function mr(t,e,n){const i=(e-t)/Math.max(0,n),r=Math.floor(Math.log10(i)),o=i/Math.pow(10,r),s=o>=dr?10:o>=fr?5:o>=pr?2:1;let a,l,c;return r<0?(c=Math.pow(10,-r)/s,a=Math.round(t*c),l=Math.round(e*c),a/c<t&&++a,l/c>e&&--l,c=-c):(c=Math.pow(10,r)*s,a=Math.round(t/c),l=Math.round(e/c),a*c<t&&++a,l*c>e&&--l),l<a&&.5<=n&&n<2?mr(t,e,2*n):[a,l,c]}function gr(t,e,n){if(!((n=+n)>0))return[];if((t=+t)===(e=+e))return[t];const i=e<t,[r,o,s]=i?mr(e,t,n):mr(t,e,n);if(!(o>=r))return[];const a=o-r+1,l=new Array(a);if(i)if(s<0)for(let t=0;t<a;++t)l[t]=(o-t)/-s;else for(let t=0;t<a;++t)l[t]=(o-t)*s;else if(s<0)for(let t=0;t<a;++t)l[t]=(r+t)/-s;else for(let t=0;t<a;++t)l[t]=(r+t)*s;return l}function vr(t,e,n){return mr(t=+t,e=+e,n=+n)[2]}function yr(t,e,n){n=+n;const i=(e=+e)<(t=+t),r=i?vr(e,t,n):vr(t,e,n);return(i?-1:1)*(r<0?1/-r:r)}function _r(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n<e||void 0===n&&e>=e)&&(n=e);else{let i=-1;for(let r of t)null!=(r=e(r,++i,t))&&(n<r||void 0===n&&r>=r)&&(n=r)}return n}var br={value:()=>{}};function wr(){for(var t,e=0,n=arguments.length,i={};e<n;++e){if(!(t=arguments[e]+"")||t in i||/[\s.]/.test(t))throw new Error("illegal type: "+t);i[t]=[]}return new xr(i)}function xr(t){this._=t}function Er(t,e){for(var n,i=0,r=t.length;i<r;++i)if((n=t[i]).name===e)return n.value}function Tr(t,e,n){for(var i=0,r=t.length;i<r;++i)if(t[i].name===e){t[i]=br,t=t.slice(0,i).concat(t.slice(i+1));break}return null!=n&&t.push({name:e,value:n}),t}xr.prototype=wr.prototype={constructor:xr,on:function(t,e){var n,i=this._,r=function(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",i=t.indexOf(".");if(i>=0&&(n=t.slice(i+1),t=t.slice(0,i)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}(t+"",i),o=-1,s=r.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o<s;)if(n=(t=r[o]).type)i[n]=Tr(i[n],t.name,e);else if(null==e)for(n in i)i[n]=Tr(i[n],t.name,null);return this}for(;++o<s;)if((n=(t=r[o]).type)&&(n=Er(i[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new xr(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,i,r=new Array(n),o=0;o<n;++o)r[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,n=(i=this._[t]).length;o<n;++o)i[o].value.apply(e,r)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],r=0,o=i.length;r<o;++r)i[r].value.apply(e,n)}};var Sr="http://www.w3.org/1999/xhtml";const Or={svg:"http://www.w3.org/2000/svg",xhtml:Sr,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Mr(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),Or.hasOwnProperty(e)?{space:Or[e],local:t}:t}function Ar(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Sr&&e.documentElement.namespaceURI===Sr?e.createElement(t):e.createElementNS(n,t)}}function Cr(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function kr(t){var e=Mr(t);return(e.local?Cr:Ar)(e)}function Dr(){}function Lr(t){return null==t?Dr:function(){return this.querySelector(t)}}function Rr(){return[]}function Ir(t){return null==t?Rr:function(){return this.querySelectorAll(t)}}function Pr(t){return function(){return this.matches(t)}}function Nr(t){return function(e){return e.matches(t)}}var Ur=Array.prototype.find;function Br(){return this.firstElementChild}var $r=Array.prototype.filter;function Hr(){return Array.from(this.children)}function Fr(t){return new Array(t.length)}function zr(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function jr(t,e,n,i,r,o){for(var s,a=0,l=e.length,c=o.length;a<c;++a)(s=e[a])?(s.__data__=o[a],i[a]=s):n[a]=new zr(t,o[a]);for(;a<l;++a)(s=e[a])&&(r[a]=s)}function Vr(t,e,n,i,r,o,s){var a,l,c,u=new Map,h=e.length,d=o.length,f=new Array(h);for(a=0;a<h;++a)(l=e[a])&&(f[a]=c=s.call(l,l.__data__,a,e)+"",u.has(c)?r[a]=l:u.set(c,l));for(a=0;a<d;++a)c=s.call(t,o[a],a,o)+"",(l=u.get(c))?(i[a]=l,l.__data__=o[a],u.delete(c)):n[a]=new zr(t,o[a]);for(a=0;a<h;++a)(l=e[a])&&u.get(f[a])===l&&(r[a]=l)}function Gr(t){return t.__data__}function Wr(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function Yr(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Zr(t){return function(){this.removeAttribute(t)}}function qr(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Xr(t,e){return function(){this.setAttribute(t,e)}}function Kr(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Qr(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Jr(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function to(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function eo(t){return function(){this.style.removeProperty(t)}}function no(t,e,n){return function(){this.style.setProperty(t,e,n)}}function io(t,e,n){return function(){var i=e.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,n)}}function ro(t,e){return t.style.getPropertyValue(e)||to(t).getComputedStyle(t,null).getPropertyValue(e)}function oo(t){return function(){delete this[t]}}function so(t,e){return function(){this[t]=e}}function ao(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function lo(t){return t.trim().split(/^|\s+/)}function co(t){return t.classList||new uo(t)}function uo(t){this._node=t,this._names=lo(t.getAttribute("class")||"")}function ho(t,e){for(var n=co(t),i=-1,r=e.length;++i<r;)n.add(e[i])}function fo(t,e){for(var n=co(t),i=-1,r=e.length;++i<r;)n.remove(e[i])}function po(t){return function(){ho(this,t)}}function mo(t){return function(){fo(this,t)}}function go(t,e){return function(){(e.apply(this,arguments)?ho:fo)(this,t)}}function vo(){this.textContent=""}function yo(t){return function(){this.textContent=t}}function _o(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function bo(){this.innerHTML=""}function wo(t){return function(){this.innerHTML=t}}function xo(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function Eo(){this.nextSibling&&this.parentNode.appendChild(this)}function To(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function So(){return null}function Oo(){var t=this.parentNode;t&&t.removeChild(this)}function Mo(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Ao(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Co(t){return function(){var e=this.__on;if(e){for(var n,i=0,r=-1,o=e.length;i<o;++i)n=e[i],t.type&&n.type!==t.type||n.name!==t.name?e[++r]=n:this.removeEventListener(n.type,n.listener,n.options);++r?e.length=r:delete this.__on}}}function ko(t,e,n){return function(){var i,r=this.__on,o=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(r)for(var s=0,a=r.length;s<a;++s)if((i=r[s]).type===t.type&&i.name===t.name)return this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),void(i.value=e);this.addEventListener(t.type,o,n),i={type:t.type,name:t.name,value:e,listener:o,options:n},r?r.push(i):this.__on=[i]}}function Do(t,e,n){var i=to(t),r=i.CustomEvent;"function"==typeof r?r=new r(e,n):(r=i.document.createEvent("Event"),n?(r.initEvent(e,n.bubbles,n.cancelable),r.detail=n.detail):r.initEvent(e,!1,!1)),t.dispatchEvent(r)}function Lo(t,e){return function(){return Do(this,t,e)}}function Ro(t,e){return function(){return Do(this,t,e.apply(this,arguments))}}zr.prototype={constructor:zr,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}},uo.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Io=[null];function Po(t,e){this._groups=t,this._parents=e}function No(){return new Po([[document.documentElement]],Io)}function Uo(t,e){if(t=function(t){let e;for(;e=t.sourceEvent;)t=e;return t}(t),void 0===e&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var i=n.createSVGPoint();return i.x=t.clientX,i.y=t.clientY,[(i=i.matrixTransform(e.getScreenCTM().inverse())).x,i.y]}if(e.getBoundingClientRect){var r=e.getBoundingClientRect();return[t.clientX-r.left-e.clientLeft,t.clientY-r.top-e.clientTop]}}return[t.pageX,t.pageY]}function Bo(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function $o(t,e){var n=Object.create(t.prototype);for(var i in e)n[i]=e[i];return n}function Ho(){}Po.prototype=No.prototype={constructor:Po,select:function(t){"function"!=typeof t&&(t=Lr(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var o,s,a=e[r],l=a.length,c=i[r]=new Array(l),u=0;u<l;++u)(o=a[u])&&(s=t.call(o,o.__data__,u,a))&&("__data__"in o&&(s.__data__=o.__data__),c[u]=s);return new Po(i,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return function(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}(t.apply(this,arguments))}}(t):Ir(t);for(var e=this._groups,n=e.length,i=[],r=[],o=0;o<n;++o)for(var s,a=e[o],l=a.length,c=0;c<l;++c)(s=a[c])&&(i.push(t.call(s,s.__data__,c,a)),r.push(s));return new Po(i,r)},selectChild:function(t){return this.select(null==t?Br:function(t){return function(){return Ur.call(this.children,t)}}("function"==typeof t?t:Nr(t)))},selectChildren:function(t){return this.selectAll(null==t?Hr:function(t){return function(){return $r.call(this.children,t)}}("function"==typeof t?t:Nr(t)))},filter:function(t){"function"!=typeof t&&(t=Pr(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var o,s=e[r],a=s.length,l=i[r]=[],c=0;c<a;++c)(o=s[c])&&t.call(o,o.__data__,c,s)&&l.push(o);return new Po(i,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,Gr);var n=e?Vr:jr,i=this._parents,r=this._groups;"function"!=typeof t&&(t=function(t){return function(){return t}}(t));for(var o=r.length,s=new Array(o),a=new Array(o),l=new Array(o),c=0;c<o;++c){var u=i[c],h=r[c],d=h.length,f=Wr(t.call(u,u&&u.__data__,c,i)),p=f.length,m=a[c]=new Array(p),g=s[c]=new Array(p);n(u,h,m,g,l[c]=new Array(d),f,e);for(var v,y,_=0,b=0;_<p;++_)if(v=m[_]){for(_>=b&&(b=_+1);!(y=g[b])&&++b<p;);v._next=y||null}}return(s=new Po(s,i))._enter=a,s._exit=l,s},enter:function(){return new Po(this._enter||this._groups.map(Fr),this._parents)},exit:function(){return new Po(this._exit||this._groups.map(Fr),this._parents)},join:function(t,e,n){var i=this.enter(),r=this,o=this.exit();return"function"==typeof t?(i=t(i))&&(i=i.selection()):i=i.append(t+""),null!=e&&(r=e(r))&&(r=r.selection()),null==n?o.remove():n(o),i&&r?i.merge(r).order():r},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,i=e._groups,r=n.length,o=i.length,s=Math.min(r,o),a=new Array(r),l=0;l<s;++l)for(var c,u=n[l],h=i[l],d=u.length,f=a[l]=new Array(d),p=0;p<d;++p)(c=u[p]||h[p])&&(f[p]=c);for(;l<r;++l)a[l]=n[l];return new Po(a,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var i,r=t[e],o=r.length-1,s=r[o];--o>=0;)(i=r[o])&&(s&&4^i.compareDocumentPosition(s)&&s.parentNode.insertBefore(i,s),s=i);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=Yr);for(var n=this._groups,i=n.length,r=new Array(i),o=0;o<i;++o){for(var s,a=n[o],l=a.length,c=r[o]=new Array(l),u=0;u<l;++u)(s=a[u])&&(c[u]=s);c.sort(e)}return new Po(r,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i=t[e],r=0,o=i.length;r<o;++r){var s=i[r];if(s)return s}return null},size:function(){let t=0;for(const e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,i=e.length;n<i;++n)for(var r,o=e[n],s=0,a=o.length;s<a;++s)(r=o[s])&&t.call(r,r.__data__,s,o);return this},attr:function(t,e){var n=Mr(t);if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((null==e?n.local?qr:Zr:"function"==typeof e?n.local?Jr:Qr:n.local?Kr:Xr)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?eo:"function"==typeof e?io:no)(t,e,n??"")):ro(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?oo:"function"==typeof e?ao:so)(t,e)):this.node()[t]},classed:function(t,e){var n=lo(t+"");if(arguments.length<2){for(var i=co(this.node()),r=-1,o=n.length;++r<o;)if(!i.contains(n[r]))return!1;return!0}return this.each(("function"==typeof e?go:e?po:mo)(n,e))},text:function(t){return arguments.length?this.each(null==t?vo:("function"==typeof t?_o:yo)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?bo:("function"==typeof t?xo:wo)(t)):this.node().innerHTML},raise:function(){return this.each(Eo)},lower:function(){return this.each(To)},append:function(t){var e="function"==typeof t?t:kr(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:kr(t),i=null==e?So:"function"==typeof e?e:Lr(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)}))},remove:function(){return this.each(Oo)},clone:function(t){return this.select(t?Ao:Mo)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var i,r,o=function(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}(t+""),s=o.length;if(!(arguments.length<2)){for(a=e?ko:Co,i=0;i<s;++i)this.each(a(o[i],e,n));return this}var a=this.node().__on;if(a)for(var l,c=0,u=a.length;c<u;++c)for(i=0,l=a[c];i<s;++i)if((r=o[i]).type===l.type&&r.name===l.name)return l.value},dispatch:function(t,e){return this.each(("function"==typeof e?Ro:Lo)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i,r=t[e],o=0,s=r.length;o<s;++o)(i=r[o])&&(yield i)}};var Fo=.7,zo=1/Fo,jo="\\s*([+-]?\\d+)\\s*",Vo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Go="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Wo=/^#([0-9a-f]{3,8})$/,Yo=new RegExp(`^rgb\\(${jo},${jo},${jo}\\)$`),Zo=new RegExp(`^rgb\\(${Go},${Go},${Go}\\)$`),qo=new RegExp(`^rgba\\(${jo},${jo},${jo},${Vo}\\)$`),Xo=new RegExp(`^rgba\\(${Go},${Go},${Go},${Vo}\\)$`),Ko=new RegExp(`^hsl\\(${Vo},${Go},${Go}\\)$`),Qo=new RegExp(`^hsla\\(${Vo},${Go},${Go},${Vo}\\)$`),Jo={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function ts(){return this.rgb().formatHex()}function es(){return this.rgb().formatRgb()}function ns(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Wo.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?is(e):3===n?new ss(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?rs(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?rs(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Yo.exec(t))?new ss(e[1],e[2],e[3],1):(e=Zo.exec(t))?new ss(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=qo.exec(t))?rs(e[1],e[2],e[3],e[4]):(e=Xo.exec(t))?rs(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Ko.exec(t))?ds(e[1],e[2]/100,e[3]/100,1):(e=Qo.exec(t))?ds(e[1],e[2]/100,e[3]/100,e[4]):Jo.hasOwnProperty(t)?is(Jo[t]):"transparent"===t?new ss(NaN,NaN,NaN,0):null}function is(t){return new ss(t>>16&255,t>>8&255,255&t,1)}function rs(t,e,n,i){return i<=0&&(t=e=n=NaN),new ss(t,e,n,i)}function os(t,e,n,i){return 1===arguments.length?function(t){return t instanceof Ho||(t=ns(t)),t?new ss((t=t.rgb()).r,t.g,t.b,t.opacity):new ss}(t):new ss(t,e,n,i??1)}function ss(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}function as(){return`#${hs(this.r)}${hs(this.g)}${hs(this.b)}`}function ls(){const t=cs(this.opacity);return`${1===t?"rgb(":"rgba("}${us(this.r)}, ${us(this.g)}, ${us(this.b)}${1===t?")":`, ${t})`}`}function cs(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function us(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function hs(t){return((t=us(t))<16?"0":"")+t.toString(16)}function ds(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new ps(t,e,n,i)}function fs(t){if(t instanceof ps)return new ps(t.h,t.s,t.l,t.opacity);if(t instanceof Ho||(t=ns(t)),!t)return new ps;if(t instanceof ps)return t;var e=(t=t.rgb()).r/255,n=t.g/255,i=t.b/255,r=Math.min(e,n,i),o=Math.max(e,n,i),s=NaN,a=o-r,l=(o+r)/2;return a?(s=e===o?(n-i)/a+6*(n<i):n===o?(i-e)/a+2:(e-n)/a+4,a/=l<.5?o+r:2-o-r,s*=60):a=l>0&&l<1?0:s,new ps(s,a,l,t.opacity)}function ps(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}function ms(t){return(t=(t||0)%360)<0?t+360:t}function gs(t){return Math.max(0,Math.min(1,t||0))}function vs(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}Bo(Ho,ns,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:ts,formatHex:ts,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return fs(this).formatHsl()},formatRgb:es,toString:es}),Bo(ss,os,$o(Ho,{brighter(t){return t=null==t?zo:Math.pow(zo,t),new ss(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?Fo:Math.pow(Fo,t),new ss(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new ss(us(this.r),us(this.g),us(this.b),cs(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:as,formatHex:as,formatHex8:function(){return`#${hs(this.r)}${hs(this.g)}${hs(this.b)}${hs(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:ls,toString:ls})),Bo(ps,(function(t,e,n,i){return 1===arguments.length?fs(t):new ps(t,e,n,i??1)}),$o(Ho,{brighter(t){return t=null==t?zo:Math.pow(zo,t),new ps(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?Fo:Math.pow(Fo,t),new ps(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,r=2*n-i;return new ss(vs(t>=240?t-240:t+120,r,i),vs(t,r,i),vs(t<120?t+240:t-120,r,i),this.opacity)},clamp(){return new ps(ms(this.h),gs(this.s),gs(this.l),cs(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=cs(this.opacity);return`${1===t?"hsl(":"hsla("}${ms(this.h)}, ${100*gs(this.s)}%, ${100*gs(this.l)}%${1===t?")":`, ${t})`}`}}));const ys=t=>()=>t;function _s(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):ys(isNaN(t)?e:t)}const bs=function t(e){var n=function(t){return 1==(t=+t)?_s:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}(e,n,t):ys(isNaN(e)?n:e)}}(e);function i(t,e){var i=n((t=os(t)).r,(e=os(e)).r),r=n(t.g,e.g),o=n(t.b,e.b),s=_s(t.opacity,e.opacity);return function(e){return t.r=i(e),t.g=r(e),t.b=o(e),t.opacity=s(e),t+""}}return i.gamma=t,i}(1);function ws(t,e){e||(e=[]);var n,i=t?Math.min(e.length,t.length):0,r=e.slice();return function(o){for(n=0;n<i;++n)r[n]=t[n]*(1-o)+e[n]*o;return r}}function xs(t,e){var n,i=e?e.length:0,r=t?Math.min(i,t.length):0,o=new Array(r),s=new Array(i);for(n=0;n<r;++n)o[n]=Cs(t[n],e[n]);for(;n<i;++n)s[n]=e[n];return function(t){for(n=0;n<r;++n)s[n]=o[n](t);return s}}function Es(t,e){var n=new Date;return t=+t,e=+e,function(i){return n.setTime(t*(1-i)+e*i),n}}function Ts(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Ss(t,e){var n,i={},r={};for(n in(null===t||"object"!=typeof t)&&(t={}),(null===e||"object"!=typeof e)&&(e={}),e)n in t?i[n]=Cs(t[n],e[n]):r[n]=e[n];return function(t){for(n in i)r[n]=i[n](t);return r}}var Os=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ms=new RegExp(Os.source,"g");function As(t,e){var n,i,r,o=Os.lastIndex=Ms.lastIndex=0,s=-1,a=[],l=[];for(t+="",e+="";(n=Os.exec(t))&&(i=Ms.exec(e));)(r=i.index)>o&&(r=e.slice(o,r),a[s]?a[s]+=r:a[++s]=r),(n=n[0])===(i=i[0])?a[s]?a[s]+=i:a[++s]=i:(a[++s]=null,l.push({i:s,x:Ts(n,i)})),o=Ms.lastIndex;return o<e.length&&(r=e.slice(o),a[s]?a[s]+=r:a[++s]=r),a.length<2?l[0]?function(t){return function(e){return t(e)+""}}(l[0].x):function(t){return function(){return t}}(e):(e=l.length,function(t){for(var n,i=0;i<e;++i)a[(n=l[i]).i]=n.x(t);return a.join("")})}function Cs(t,e){var n,i=typeof e;return null==e||"boolean"===i?ys(e):("number"===i?Ts:"string"===i?(n=ns(e))?(e=n,bs):As:e instanceof ns?bs:e instanceof Date?Es:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(e)?ws:Array.isArray(e)?xs:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?Ss:Ts)(t,e)}function ks(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var Ds,Ls=180/Math.PI,Rs={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Is(t,e,n,i,r,o){var s,a,l;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(l=t*n+e*i)&&(n-=t*l,i-=e*l),(a=Math.sqrt(n*n+i*i))&&(n/=a,i/=a,l/=a),t*i<e*n&&(t=-t,e=-e,l=-l,s=-s),{translateX:r,translateY:o,rotate:Math.atan2(e,t)*Ls,skewX:Math.atan(l)*Ls,scaleX:s,scaleY:a}}function Ps(t,e,n,i){function r(t){return t.length?t.pop()+" ":""}return function(o,s){var a=[],l=[];return o=t(o),s=t(s),function(t,i,r,o,s,a){if(t!==r||i!==o){var l=s.push("translate(",null,e,null,n);a.push({i:l-4,x:Ts(t,r)},{i:l-2,x:Ts(i,o)})}else(r||o)&&s.push("translate("+r+e+o+n)}(o.translateX,o.translateY,s.translateX,s.translateY,a,l),function(t,e,n,o){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(r(n)+"rotate(",null,i)-2,x:Ts(t,e)})):e&&n.push(r(n)+"rotate("+e+i)}(o.rotate,s.rotate,a,l),function(t,e,n,o){t!==e?o.push({i:n.push(r(n)+"skewX(",null,i)-2,x:Ts(t,e)}):e&&n.push(r(n)+"skewX("+e+i)}(o.skewX,s.skewX,a,l),function(t,e,n,i,o,s){if(t!==n||e!==i){var a=o.push(r(o)+"scale(",null,",",null,")");s.push({i:a-4,x:Ts(t,n)},{i:a-2,x:Ts(e,i)})}else(1!==n||1!==i)&&o.push(r(o)+"scale("+n+","+i+")")}(o.scaleX,o.scaleY,s.scaleX,s.scaleY,a,l),o=s=null,function(t){for(var e,n=-1,i=l.length;++n<i;)a[(e=l[n]).i]=e.x(t);return a.join("")}}}var Ns,Us,Bs=Ps((function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Rs:Is(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),$s=Ps((function(t){return null!=t&&(Ds||(Ds=document.createElementNS("http://www.w3.org/2000/svg","g")),Ds.setAttribute("transform",t),t=Ds.transform.baseVal.consolidate())?Is((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):Rs}),", ",")",")"),Hs=0,Fs=0,zs=0,js=0,Vs=0,Gs=0,Ws="object"==typeof performance&&performance.now?performance:Date,Ys="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Zs(){return Vs||(Ys(qs),Vs=Ws.now()+Gs)}function qs(){Vs=0}function Xs(){this._call=this._time=this._next=null}function Ks(t,e,n){var i=new Xs;return i.restart(t,e,n),i}function Qs(){Vs=(js=Ws.now())+Gs,Hs=Fs=0;try{!function(){Zs(),++Hs;for(var t,e=Ns;e;)(t=Vs-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Hs}()}finally{Hs=0,function(){for(var t,e,n=Ns,i=1/0;n;)n._call?(i>n._time&&(i=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Ns=e);Us=t,ta(i)}(),Vs=0}}function Js(){var t=Ws.now(),e=t-js;e>1e3&&(Gs-=e,js=t)}function ta(t){Hs||(Fs&&(Fs=clearTimeout(Fs)),t-Vs>24?(t<1/0&&(Fs=setTimeout(Qs,t-Ws.now()-Gs)),zs&&(zs=clearInterval(zs))):(zs||(js=Ws.now(),zs=setInterval(Js,1e3)),Hs=1,Ys(Qs)))}function ea(t,e,n){var i=new Xs;return e=null==e?0:+e,i.restart((n=>{i.stop(),t(n+e)}),e,n),i}Xs.prototype=Ks.prototype={constructor:Xs,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Zs():+n)+(null==e?0:+e),!this._next&&Us!==this&&(Us?Us._next=this:Ns=this,Us=this),this._call=t,this._time=n,ta()},stop:function(){this._call&&(this._call=null,this._time=1/0,ta())}};var na=wr("start","end","cancel","interrupt"),ia=[];function ra(t,e,n,i,r,o){var s=t.__transition;if(s){if(n in s)return}else t.__transition={};!function(t,e,n){var i,r=t.__transition;function o(l){var c,u,h,d;if(1!==n.state)return a();for(c in r)if((d=r[c]).name===n.name){if(3===d.state)return ea(o);4===d.state?(d.state=6,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete r[c]):+c<e&&(d.state=6,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete r[c])}if(ea((function(){3===n.state&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(l))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,i=new Array(h=n.tween.length),c=0,u=-1;c<h;++c)(d=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(i[++u]=d);i.length=u+1}}function s(e){for(var r=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(a),n.state=5,1),o=-1,s=i.length;++o<s;)i[o].call(t,r);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),a())}function a(){for(var i in n.state=6,n.timer.stop(),delete r[e],r)return;delete t.__transition}r[e]=n,n.timer=Ks((function(t){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=t&&o(t-n.delay)}),0,n.time)}(t,n,{name:e,index:i,group:r,on:na,tween:ia,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})}function oa(t,e){var n=aa(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function sa(t,e){var n=aa(t,e);if(n.state>3)throw new Error("too late; already running");return n}function aa(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function la(t,e){var n,i,r,o=t.__transition,s=!0;if(o){for(r in e=null==e?null:e+"",o)(n=o[r]).name===e?(i=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(i?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete o[r]):s=!1;s&&delete t.__transition}}function ca(t,e){var n,i;return function(){var r=sa(this,t),o=r.tween;if(o!==n)for(var s=0,a=(i=n=o).length;s<a;++s)if(i[s].name===e){(i=i.slice()).splice(s,1);break}r.tween=i}}function ua(t,e,n){var i,r;if("function"!=typeof n)throw new Error;return function(){var o=sa(this,t),s=o.tween;if(s!==i){r=(i=s).slice();for(var a={name:e,value:n},l=0,c=r.length;l<c;++l)if(r[l].name===e){r[l]=a;break}l===c&&r.push(a)}o.tween=r}}function ha(t,e,n){var i=t._id;return t.each((function(){var t=sa(this,i);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return aa(t,i).value[e]}}function da(t,e){var n;return("number"==typeof e?Ts:e instanceof ns?bs:(n=ns(e))?(e=n,bs):As)(t,e)}function fa(t){return function(){this.removeAttribute(t)}}function pa(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ma(t,e,n){var i,r,o=n+"";return function(){var s=this.getAttribute(t);return s===o?null:s===i?r:r=e(i=s,n)}}function ga(t,e,n){var i,r,o=n+"";return function(){var s=this.getAttributeNS(t.space,t.local);return s===o?null:s===i?r:r=e(i=s,n)}}function va(t,e,n){var i,r,o;return function(){var s,a,l=n(this);return null==l?void this.removeAttribute(t):(s=this.getAttribute(t))===(a=l+"")?null:s===i&&a===r?o:(r=a,o=e(i=s,l))}}function ya(t,e,n){var i,r,o;return function(){var s,a,l=n(this);return null==l?void this.removeAttributeNS(t.space,t.local):(s=this.getAttributeNS(t.space,t.local))===(a=l+"")?null:s===i&&a===r?o:(r=a,o=e(i=s,l))}}function _a(t,e){var n,i;function r(){var r=e.apply(this,arguments);return r!==i&&(n=(i=r)&&function(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}(t,r)),n}return r._value=e,r}function ba(t,e){var n,i;function r(){var r=e.apply(this,arguments);return r!==i&&(n=(i=r)&&function(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}(t,r)),n}return r._value=e,r}function wa(t,e){return function(){oa(this,t).delay=+e.apply(this,arguments)}}function xa(t,e){return e=+e,function(){oa(this,t).delay=e}}function Ea(t,e){return function(){sa(this,t).duration=+e.apply(this,arguments)}}function Ta(t,e){return e=+e,function(){sa(this,t).duration=e}}var Sa=No.prototype.constructor;function Oa(t){return function(){this.style.removeProperty(t)}}var Ma=0;function Aa(t,e,n,i){this._groups=t,this._parents=e,this._name=n,this._id=i}function Ca(){return++Ma}var ka=No.prototype;function Da(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}Aa.prototype={constructor:Aa,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Lr(t));for(var i=this._groups,r=i.length,o=new Array(r),s=0;s<r;++s)for(var a,l,c=i[s],u=c.length,h=o[s]=new Array(u),d=0;d<u;++d)(a=c[d])&&(l=t.call(a,a.__data__,d,c))&&("__data__"in a&&(l.__data__=a.__data__),h[d]=l,ra(h[d],e,n,d,h,aa(a,n)));return new Aa(o,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Ir(t));for(var i=this._groups,r=i.length,o=[],s=[],a=0;a<r;++a)for(var l,c=i[a],u=c.length,h=0;h<u;++h)if(l=c[h]){for(var d,f=t.call(l,l.__data__,h,c),p=aa(l,n),m=0,g=f.length;m<g;++m)(d=f[m])&&ra(d,e,n,m,f,p);o.push(f),s.push(l)}return new Aa(o,s,e,n)},selectChild:ka.selectChild,selectChildren:ka.selectChildren,filter:function(t){"function"!=typeof t&&(t=Pr(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var o,s=e[r],a=s.length,l=i[r]=[],c=0;c<a;++c)(o=s[c])&&t.call(o,o.__data__,c,s)&&l.push(o);return new Aa(i,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,i=e.length,r=n.length,o=Math.min(i,r),s=new Array(i),a=0;a<o;++a)for(var l,c=e[a],u=n[a],h=c.length,d=s[a]=new Array(h),f=0;f<h;++f)(l=c[f]||u[f])&&(d[f]=l);for(;a<i;++a)s[a]=e[a];return new Aa(s,this._parents,this._name,this._id)},selection:function(){return new Sa(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Ca(),i=this._groups,r=i.length,o=0;o<r;++o)for(var s,a=i[o],l=a.length,c=0;c<l;++c)if(s=a[c]){var u=aa(s,e);ra(s,t,n,c,a,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Aa(i,this._parents,t,n)},call:ka.call,nodes:ka.nodes,node:ka.node,size:ka.size,empty:ka.empty,each:ka.each,on:function(t,e){var n=this._id;return arguments.length<2?aa(this.node(),n).on.on(t):this.each(function(t,e,n){var i,r,o=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?oa:sa;return function(){var s=o(this,t),a=s.on;a!==i&&(r=(i=a).copy()).on(e,n),s.on=r}}(n,t,e))},attr:function(t,e){var n=Mr(t),i="transform"===n?$s:da;return this.attrTween(t,"function"==typeof e?(n.local?ya:va)(n,i,ha(this,"attr."+t,e)):null==e?(n.local?pa:fa)(n):(n.local?ga:ma)(n,i,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var i=Mr(t);return this.tween(n,(i.local?_a:ba)(i,e))},style:function(t,e,n){var i="transform"==(t+="")?Bs:da;return null==e?this.styleTween(t,function(t,e){var n,i,r;return function(){var o=ro(this,t),s=(this.style.removeProperty(t),ro(this,t));return o===s?null:o===n&&s===i?r:r=e(n=o,i=s)}}(t,i)).on("end.style."+t,Oa(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var i,r,o;return function(){var s=ro(this,t),a=n(this),l=a+"";return null==a&&(this.style.removeProperty(t),l=a=ro(this,t)),s===l?null:s===i&&l===r?o:(r=l,o=e(i=s,a))}}(t,i,ha(this,"style."+t,e))).each(function(t,e){var n,i,r,o,s="style."+e,a="end."+s;return function(){var l=sa(this,t),c=l.on,u=null==l.value[s]?o||(o=Oa(e)):void 0;(c!==n||r!==u)&&(i=(n=c).copy()).on(a,r=u),l.on=i}}(this._id,t)):this.styleTween(t,function(t,e,n){var i,r,o=n+"";return function(){var s=ro(this,t);return s===o?null:s===i?r:r=e(i=s,n)}}(t,i,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==e)return this.tween(i,null);if("function"!=typeof e)throw new Error;return this.tween(i,function(t,e,n){var i,r;function o(){var o=e.apply(this,arguments);return o!==r&&(i=(r=o)&&function(t,e,n){return function(i){this.style.setProperty(t,e.call(this,i),n)}}(t,o,n)),i}return o._value=e,o}(t,e,n??""))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=e??""}}(ha(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,function(t){var e,n;function i(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&function(t){return function(e){this.textContent=t.call(this,e)}}(i)),e}return i._value=t,i}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var i,r=aa(this.node(),n).tween,o=0,s=r.length;o<s;++o)if((i=r[o]).name===t)return i.value;return null}return this.each((null==e?ca:ua)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?wa:xa)(e,t)):aa(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Ea:Ta)(e,t)):aa(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(function(t,e){if("function"!=typeof e)throw new Error;return function(){sa(this,t).ease=e}}(e,t)):aa(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var n=e.apply(this,arguments);if("function"!=typeof n)throw new Error;sa(this,t).ease=n}}(this._id,t))},end:function(){var t,e,n=this,i=n._id,r=n.size();return new Promise((function(o,s){var a={value:s},l={value:function(){0===--r&&o()}};n.each((function(){var n=sa(this,i),r=n.on;r!==t&&((e=(t=r).copy())._.cancel.push(a),e._.interrupt.push(a),e._.end.push(l)),n.on=e})),0===r&&o()}))},[Symbol.iterator]:ka[Symbol.iterator]};var La={time:null,delay:0,duration:250,ease:Da};function Ra(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function Ia(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,i=t.slice(0,n);return[i.length>1?i[0]+i.slice(2):i,+t.slice(n+1)]}function Pa(t){return(t=Ia(Math.abs(t)))?t[1]:NaN}No.prototype.interrupt=function(t){return this.each((function(){la(this,t)}))},No.prototype.transition=function(t){var e,n;t instanceof Aa?(e=t._id,t=t._name):(e=Ca(),(n=La).time=Zs(),t=null==t?null:t+"");for(var i=this._groups,r=i.length,o=0;o<r;++o)for(var s,a=i[o],l=a.length,c=0;c<l;++c)(s=a[c])&&ra(s,t,e,c,a,n||Ra(s,e));return new Aa(i,this._parents,t,e)};var Na,Ua=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ba(t){if(!(e=Ua.exec(t)))throw new Error("invalid format: "+t);var e;return new $a({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function $a(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function Ha(t,e){var n=Ia(t,e);if(!n)return t+"";var i=n[0],r=n[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")}Ba.prototype=$a.prototype,$a.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const Fa={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Ha(100*t,e),r:Ha,s:function(t,e){var n=Ia(t,e);if(!n)return t+"";var i=n[0],r=n[1],o=r-(Na=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,s=i.length;return o===s?i:o>s?i+new Array(o-s+1).join("0"):o>0?i.slice(0,o)+"."+i.slice(o):"0."+new Array(1-o).join("0")+Ia(t,Math.max(0,e+o-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function za(t){return t}var ja,Va,Ga,Wa=Array.prototype.map,Ya=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Za(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}ja=function(t){var e=void 0===t.grouping||void 0===t.thousands?za:function(t,e){return function(n,i){for(var r=n.length,o=[],s=0,a=t[0],l=0;r>0&&a>0&&(l+a+1>i&&(a=Math.max(1,i-l)),o.push(n.substring(r-=a,r+a)),!((l+=a+1)>i));)a=t[s=(s+1)%t.length];return o.reverse().join(e)}}(Wa.call(t.grouping,Number),t.thousands+""),n=void 0===t.currency?"":t.currency[0]+"",i=void 0===t.currency?"":t.currency[1]+"",r=void 0===t.decimal?".":t.decimal+"",o=void 0===t.numerals?za:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(Wa.call(t.numerals,String)),s=void 0===t.percent?"%":t.percent+"",a=void 0===t.minus?"−":t.minus+"",l=void 0===t.nan?"NaN":t.nan+"";function c(t){var c=(t=Ba(t)).fill,u=t.align,h=t.sign,d=t.symbol,f=t.zero,p=t.width,m=t.comma,g=t.precision,v=t.trim,y=t.type;"n"===y?(m=!0,y="g"):Fa[y]||(void 0===g&&(g=12),v=!0,y="g"),(f||"0"===c&&"="===u)&&(f=!0,c="0",u="=");var _="$"===d?n:"#"===d&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",b="$"===d?i:/[%p]/.test(y)?s:"",w=Fa[y],x=/[defgprs%]/.test(y);function E(t){var n,i,s,d=_,E=b;if("c"===y)E=w(t)+E,t="";else{var T=(t=+t)<0||1/t<0;if(t=isNaN(t)?l:w(Math.abs(t),g),v&&(t=function(t){t:for(var e,n=t.length,i=1,r=-1;i<n;++i)switch(t[i]){case".":r=e=i;break;case"0":0===r&&(r=i),e=i;break;default:if(!+t[i])break t;r>0&&(r=0)}return r>0?t.slice(0,r)+t.slice(e+1):t}(t)),T&&0==+t&&"+"!==h&&(T=!1),d=(T?"("===h?h:a:"-"===h||"("===h?"":h)+d,E=("s"===y?Ya[8+Na/3]:"")+E+(T&&"("===h?")":""),x)for(n=-1,i=t.length;++n<i;)if(48>(s=t.charCodeAt(n))||s>57){E=(46===s?r+t.slice(n+1):t.slice(n))+E,t=t.slice(0,n);break}}m&&!f&&(t=e(t,1/0));var S=d.length+t.length+E.length,O=S<p?new Array(p-S+1).join(c):"";switch(m&&f&&(t=e(O+t,O.length?p-E.length:1/0),O=""),u){case"<":t=d+t+E+O;break;case"=":t=d+O+t+E;break;case"^":t=O.slice(0,S=O.length>>1)+d+t+E+O.slice(S);break;default:t=O+d+t+E}return o(t)}return g=void 0===g?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),E.toString=function(){return t+""},E}return{format:c,formatPrefix:function(t,e){var n=c(((t=Ba(t)).type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(Pa(e)/3))),r=Math.pow(10,-i),o=Ya[8+i/3];return function(t){return n(r*t)+o}}}}({thousands:",",grouping:[3],currency:["$",""]}),Va=ja.format,Ga=ja.formatPrefix;const qa=Symbol("implicit");function Xa(){var t=new cr,e=[],n=[],i=qa;function r(r){let o=t.get(r);if(void 0===o){if(i!==qa)return i;t.set(r,o=e.push(r)-1)}return n[o%n.length]}return r.domain=function(n){if(!arguments.length)return e.slice();e=[],t=new cr;for(const i of n)t.has(i)||t.set(i,e.push(i)-1);return r},r.range=function(t){return arguments.length?(n=Array.from(t),r):n.slice()},r.unknown=function(t){return arguments.length?(i=t,r):i},r.copy=function(){return Xa(e,n).unknown(i)},Za.apply(r,arguments),r}function Ka(t){return+t}var Qa=[0,1];function Ja(t){return t}function tl(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:function(t){return function(){return t}}(isNaN(e)?NaN:.5)}function el(t,e,n){var i=t[0],r=t[1],o=e[0],s=e[1];return r<i?(i=tl(r,i),o=n(s,o)):(i=tl(i,r),o=n(o,s)),function(t){return o(i(t))}}function nl(t,e,n){var i=Math.min(t.length,e.length)-1,r=new Array(i),o=new Array(i),s=-1;for(t[i]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<i;)r[s]=tl(t[s],t[s+1]),o[s]=n(e[s],e[s+1]);return function(e){var n=ar(t,e,1,i)-1;return o[n](r[n](e))}}function il(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function rl(){var t,e,n,i,r,o,s=Qa,a=Qa,l=Cs,c=Ja;function u(){var t=Math.min(s.length,a.length);return c!==Ja&&(c=function(t,e){var n;return t>e&&(n=t,t=e,e=n),function(n){return Math.max(t,Math.min(e,n))}}(s[0],s[t-1])),i=t>2?nl:el,r=o=null,h}function h(e){return null==e||isNaN(e=+e)?n:(r||(r=i(s.map(t),a,l)))(t(c(e)))}return h.invert=function(n){return c(e((o||(o=i(a,s.map(t),Ts)))(n)))},h.domain=function(t){return arguments.length?(s=Array.from(t,Ka),u()):s.slice()},h.range=function(t){return arguments.length?(a=Array.from(t),u()):a.slice()},h.rangeRound=function(t){return a=Array.from(t),l=ks,u()},h.clamp=function(t){return arguments.length?(c=!!t||Ja,u()):c!==Ja},h.interpolate=function(t){return arguments.length?(l=t,u()):l},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,i){return t=n,e=i,u()}}function ol(){return rl()(Ja,Ja)}function sl(t){var e=t.domain;return t.ticks=function(t){var n=e();return gr(n[0],n[n.length-1],t??10)},t.tickFormat=function(t,n){var i=e();return function(t,e,n,i){var r,o=yr(t,e,n);switch((i=Ba(i??",f")).type){case"s":var s=Math.max(Math.abs(t),Math.abs(e));return null==i.precision&&!isNaN(r=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Pa(e)/3)))-Pa(Math.abs(t)))}(o,s))&&(i.precision=r),Ga(i,s);case"":case"e":case"g":case"p":case"r":null==i.precision&&!isNaN(r=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Pa(e)-Pa(t))+1}(o,Math.max(Math.abs(t),Math.abs(e))))&&(i.precision=r-("e"===i.type));break;case"f":case"%":null==i.precision&&!isNaN(r=function(t){return Math.max(0,-Pa(Math.abs(t)))}(o))&&(i.precision=r-2*("%"===i.type))}return Va(i)}(i[0],i[i.length-1],t??10,n)},t.nice=function(n){null==n&&(n=10);var i,r,o=e(),s=0,a=o.length-1,l=o[s],c=o[a],u=10;for(c<l&&(r=l,l=c,c=r,r=s,s=a,a=r);u-- >0;){if((r=vr(l,c,n))===i)return o[s]=l,o[a]=c,e(o);if(r>0)l=Math.floor(l/r)*r,c=Math.ceil(c/r)*r;else{if(!(r<0))break;l=Math.ceil(l*r)/r,c=Math.floor(c*r)/r}i=r}return t},t}function al(){var t=ol();return t.copy=function(){return il(t,al())},Za.apply(t,arguments),sl(t)}function ll(t,e,n){this.k=t,this.x=e,this.y=n}ll.prototype={constructor:ll,scale:function(t){return 1===t?this:new ll(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new ll(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},ll.prototype;const cl="cds",ul=7,hl=2.5,dl=3.5,fl={reference:"value",compareTo:"marker"},pl=4,ml={duration:1e3,ease:Da,zoomLevel:3},gl={"1-color":4,"2-color":5,"3-color":5,"4-color":3,"5-color":2,"14-color":1},vl={defaultBins:10},yl={items:{status:{ACTIVE:1,DISABLED:0},horizontalSpace:12,verticalSpace:24,textYOffset:8,spaceAfter:4},checkbox:{radius:6.5},radius:{iconData:[{cx:7,cy:7,r:6.5},{cx:7,cy:10,r:3.5}],fill:null,stroke:"#8c8c8c"},line:{yPosition:6,width:24,strokeWidth:1.4,fill:null,stroke:"#999999"},area:{width:24,height:14,fill:"#6f6f6f",stroke:null},size:{iconData:[{width:23,height:12},{width:13,height:6}],fill:null,stroke:"#8D8D8D"},quartile:{iconData:[{x:0,y:0,width:24,height:13},{x:11,y:4,width:1,height:4}]},zoom:{iconData:[{x:0,y:0,width:12,height:12}],color:"#8D8D8D"},color:{barWidth:300,barHeight:8,axisYTranslation:10}},_l=.3,bl=1,wl=24,xl={defaultOffset:4,horizontalOffset:10},El={default:{duration:300},pie_slice_mouseover:{duration:100},pie_slice_mouseout:{duration:100},pie_chart_titles:{duration:375},graph_element_mouseover_fill_update:{duration:100},graph_element_mouseout_fill_update:{duration:100}},Tl={height:{[B.GRAPH_VIEW]:32,[B.SLIDER_VIEW]:10},spacerHeight:8,handleWidth:5,handleBarWidth:1,handleBarHeight:12},Sl=[{type:et.RADIUS,name:"Radius"},{type:et.AREA,name:"Poor area"},{type:et.AREA,name:"Satisfactory area"},{type:et.AREA,name:"Great area"},{type:et.QUARTILE,name:"Quartiles"}],Ol={type:$.END_LINE,threshold:16,numCharacter:14},Ml={code:typeof navigator<"u"&&(null==navigator?void 0:navigator.language)||"en-US",number:(t,e=(null==navigator?void 0:navigator.language)||"en-US")=>t.toLocaleString(e),date:(t,e=(null==navigator?void 0:navigator.language)||"en-US",n={},i=null)=>i||t.toLocaleDateString(e,n),time:(t,e=(null==navigator?void 0:navigator.language)||"en-US",n={},i=null)=>i||t.toLocaleTimeString(e,n),optionsObject:{"15seconds":{primary:{"MMM d, pp":{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit",hourCycle:"h12"},"MMM d, h:mm:ss.SSS a":{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",fractionalSecondDigits:3,hourCycle:"h12"}},secondary:{pp:{hour:"numeric",minute:"2-digit",second:"2-digit",hourCycle:"h12"},"h:mm:ss.SSS a":{hour:"numeric",minute:"2-digit",fractionalSecondDigits:3,hourCycle:"h12"}},type:"time"},minute:{primary:{"MMM d, p":{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hourCycle:"h12"}},secondary:{p:{hour:"numeric",minute:"2-digit",hourCycle:"h12"}},type:"time"},"30minutes":{primary:{"MMM d, p":{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hourCycle:"h12"}},secondary:{p:{hour:"numeric",minute:"2-digit",hourCycle:"h12"}},type:"time"},hourly:{primary:{"MMM d, hh a":{month:"short",day:"numeric",hour:"2-digit",hourCycle:"h12"}},secondary:{"hh a":{hour:"2-digit",hourCycle:"h12"}},type:"time"},daily:{primary:{"MMM d":{month:"short",day:"numeric"}},secondary:{d:{day:"numeric"}},type:"date"},weekly:{primary:{"eee, MMM d":{weekday:"short",month:"short",day:"numeric"}},secondary:{eee:{weekday:"short"}},type:"date"},monthly:{primary:{"MMM yyyy":{month:"short",year:"numeric"}},secondary:{MMM:{month:"short"}},type:"date"},quarterly:{primary:{},secondary:{},type:"date"},yearly:{primary:{yyyy:{year:"numeric"}},secondary:{yyyy:{year:"numeric"}},type:"date"}},translations:{group:"Group",total:"Total",meter:{title:""},tabularRep:{title:"Tabular representation",downloadAsCSV:"Download as CSV"},toolbar:{exportAsCSV:"Export to CSV",exportAsJPG:"Export to JPG",exportAsPNG:"Export to PNG",zoomIn:"Zoom in",zoomOut:"Zoom out",resetZoom:"Reset zoom",moreOptions:"More options",makeFullScreen:"Make fullscreen",exitFullScreen:"Exit fullscreen",showAsTable:"Show as table"}}},Al={enabled:!0,position:z.BOTTOM,clickable:!0,truncation:Ol,alignment:j.LEFT,order:null,additionalItems:[]},Cl={enabled:!0,showTotal:!0,truncation:Ol,groupLabel:"Group"},kl={top:{visible:!0,includeZero:!0,truncation:Ol},bottom:{visible:!0,includeZero:!0,truncation:Ol},left:{visible:!0,includeZero:!0,truncation:Ol},right:{visible:!0,includeZero:!0,truncation:Ol}},Dl={addSpaceOnEdges:1,showDayName:!1,localeObject:xt,timeIntervalFormats:{"15seconds":{primary:"MMM d, pp",secondary:"pp"},minute:{primary:"MMM d, p",secondary:"p"},"30minutes":{primary:"MMM d, p",secondary:"p"},hourly:{primary:"MMM d, hh a",secondary:"hh a"},daily:{primary:"MMM d",secondary:"d"},weekly:{primary:"eee, MMM d",secondary:"eee"},monthly:{primary:"MMM yyyy",secondary:"MMM"},quarterly:{primary:"QQQ ''yy",secondary:"QQQ"},yearly:{primary:"yyyy",secondary:"yyyy"}}};let Ll=!1;try{Ll=typeof document<"u"&&(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}catch(Et){console.warn("Fullscreen capabilities check failed: ",Et.message)}const Rl={width:null,height:null,resizable:!0,theme:P.WHITE,tooltip:Cl,legend:Al,locale:Ml,style:{prefix:"cc"},data:{groupMapsTo:"group",loading:!1,selectedGroups:[]},color:{scale:null,pairing:{numberOfVariants:null,option:1},gradient:{enabled:!1}},toolbar:{enabled:!0,numberOfIcons:3,controls:[{type:J.SHOW_AS_DATATABLE},...Ll?[{type:J.MAKE_FULLSCREEN}]:[],{type:J.EXPORT_CSV},{type:J.EXPORT_PNG},{type:J.EXPORT_JPG}]}},Il=Qi({},Rl,{thematic:{projection:rt.geoNaturalEarth1}}),Pl=Qi({},Rl,{axes:kl,timeScale:Dl,grid:{x:{enabled:!0,numberOfTicks:15,alignWithAxisTicks:!1},y:{enabled:!0,numberOfTicks:5,alignWithAxisTicks:!1}},ruler:{enabled:!0},zoomBar:{zoomRatio:.4,minZoomRatio:.01,top:{enabled:!1,type:B.GRAPH_VIEW}}}),Nl=Qi({},Pl,{bars:{maxWidth:16,spacingFactor:.25},timeScale:Qi(Dl,{addSpaceOnEdges:1})}),Ul=Qi({},Nl,{}),Bl=Qi({},Nl,{}),$l=Qi({},Nl,{bars:Qi({},Nl.bars,{dividerSize:1.5})}),Hl=Qi({},Nl,{}),Fl=Qi({},Pl,{points:{radius:4,fillOpacity:.3,filled:!0,enabled:!0}}),zl=Fl,jl=Qi({},Fl,{points:{radius:3,filled:!1,enabled:!0}}),Vl=Qi({},jl,{timeScale:Qi(Dl,{addSpaceOnEdges:0})}),Gl=Vl,Wl=Qi({},Pl,{bubble:{radiusMapsTo:"radius",radiusLabel:"Radius",radiusRange:t=>{const e=Math.min(t.width,t.height);return[3*e/400,25*e/400]},fillOpacity:.2,enabled:!0},points:{filled:!0},legend:{additionalItems:[{type:et.RADIUS,name:"Radius"}]}}),Yl=Qi({},Pl,{bullet:{performanceAreaTitles:["Poor","Satisfactory","Great"]},grid:{x:{enabled:!1},y:{enabled:!1}},legend:{additionalItems:[{type:et.AREA,name:"Poor area"},{type:et.AREA,name:"Satisfactory area"},{type:et.AREA,name:"Great area"},{type:et.QUARTILE,name:"Quartiles"}]}}),Zl=Qi({},Nl,{bars:{dividerSize:1.5},timeScale:Qi(Dl,{addSpaceOnEdges:0})}),ql=Qi({},Rl,{tooltip:Qi({},Cl,{wordLabel:"Word",valueLabel:"Value"}),wordCloud:{fontSizeMapsTo:"value",fontSizeRange:t=>{const e=Math.min(t.width,t.height);return[20*e/400,75*e/400]},wordMapsTo:"word"}}),Xl=Qi({},Rl,{pie:{labels:{formatter:null,enabled:!0},alignment:j.LEFT,sortFunction:null,valueMapsTo:"value"}}),Kl=Qi({},Rl,{legend:{enabled:!1},gauge:{type:X.SEMI,arcWidth:16,deltaArrow:{size:t=>t/8,enabled:!0},showPercentageSymbol:!0,status:null,numberSpacing:10,deltaFontSize:t=>t/8,valueFontSize:t=>t/2.5,alignment:j.LEFT}}),Ql=Qi({},Xl,{donut:{center:{numberFontSize:t=>`${Math.min(t/100*24,24)}px`,titleFontSize:t=>`${Math.min(t/100*15,15)}px`,titleYPosition:t=>Math.min(t/80*20,20)},alignment:j.LEFT}}),Jl=Qi({},Rl,{legend:{enabled:!1,clickable:!1},meter:{showLabels:!0,proportional:null,statusBar:{percentageIndicator:{enabled:!0}}}}),tc=Qi({},Jl,{legend:{enabled:!0}}),ec=Qi({},Rl,{radar:{axes:{angle:"key",value:"value"},alignment:j.LEFT},tooltip:{gridline:{enabled:!0}}}),nc=Qi({},Nl,{comboChartTypes:[]}),ic=Qi({tree:{type:G.TREE}},Rl,{}),rc=Qi({},Rl,{data:Qi(Rl.data,{groupMapsTo:"name"})}),oc=Qi({},Rl,{circles:{fillOpacity:.3,hover:{stroke:"#FFF"}},padding:{mainGroup:4,children:2},depth:2},{data:Qi(Rl.data,{groupMapsTo:"name"})}),sc=Qi({},Rl,{alluvial:{data:Qi(Rl.data,{groupMapsTo:"source"}),nodeAlignment:j.CENTER,nodePadding:24,monochrome:!1,nodes:[]}}),ac=Qi({},Rl,{axes:kl,heatmap:{divider:{state:nt.AUTO},colorLegend:{type:"linear"}}}),lc={alluvialChart:sc,areaChart:Vl,axisChart:Pl,boxplotChart:Hl,bubbleChart:Wl,bulletChart:Yl,chart:Rl,circlePackChart:oc,choroplethChart:Qi({},Il,{choropleth:{colorLegend:{type:"linear"}}}),comboChart:nc,donutChart:Ql,gaugeChart:Kl,groupedBarChart:Bl,heatmapChart:ac,histogramChart:Zl,lineChart:jl,lollipopChart:zl,meterChart:Jl,pieChart:Xl,proportionalMeterChart:tc,radarChart:ec,scatterChart:Fl,simpleBarChart:Ul,stackedAreaChart:Gl,stackedBarChart:$l,thematicChart:Il,treeChart:ic,treemapChart:rc,wordCloudChart:ql};function cc(t){if(!t)return;const e=t.getAttribute("transform").match(/translate\([0-9]+\.?[0-9]*,[0-9]+\.?[0-9]*\)/);if(!e)return null;if(e[0]){const t=e[0].replace(/translate\(/,"").replace(/\)/,"").split(",");return{tx:t[0],ty:t[1]}}return null}function uc(t,e,n){return n>t.length?t:e===$.MID_LINE?t.substr(0,n/2)+"..."+t.substr(-n/2):e===$.FRONT_LINE?"..."+t.substr(-n):e===$.END_LINE?t.substr(0,n)+"...":void 0}function hc(t,e){const n=dc(t,"legend","additionalItems"),i=dc(e,"legend","additionalItems");if(n&&i){const r=i.map((t=>t.type)),o=n.map((t=>t.type)),s=Sl.filter((t=>o.includes(t.type)&&!r.includes(t.type)));t.legend.additionalItems=s,e.legend.additionalItems=er(s,i,"name")}}const dc=(t,...e)=>{let n=t;if(n){for(const t of e){if(null===n[t]||void 0===n[t])return null;n=n[t]}return n}return null},fc=(t,e)=>e===H.HORIZONTAL?{y0:t.x0,y1:t.x1,x0:t.y0,x1:t.y1}:t;function pc(t,e,n){return n===H.VERTICAL?[t,e]:[e,t]}function mc(t){const e=gt(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function gc(t,e){const n=gt(t,void 0);return n.setHours(0,0,0,0),n}function vc(t,e,n){const[i,r]=ft(0,t,e),o=gc(i),s=gc(r),a=+o-mc(o),l=+s-mc(s);return Math.round((a-l)/864e5)}function yc(t,e){return vt(t,{...e,weekStartsOn:1})}function _c(t,e){const n=gt(t,void 0),i=n.getFullYear(),r=dt(n,0);r.setFullYear(i+1,0,4),r.setHours(0,0,0,0);const o=yc(r),s=dt(n,0);s.setFullYear(i,0,4),s.setHours(0,0,0,0);const a=yc(s);return n.getTime()>=o.getTime()?i+1:n.getTime()>=a.getTime()?i:i-1}function bc(t,e){var n,i,r,o;const s=gt(t,null==e?void 0:e.in),a=s.getFullYear(),l=mt(),c=(null==e?void 0:e.firstWeekContainsDate)??(null==(i=null==(n=null==e?void 0:e.locale)?void 0:n.options)?void 0:i.firstWeekContainsDate)??l.firstWeekContainsDate??(null==(o=null==(r=l.locale)?void 0:r.options)?void 0:o.firstWeekContainsDate)??1,u=dt((null==e?void 0:e.in)||t,0);u.setFullYear(a+1,0,c),u.setHours(0,0,0,0);const h=vt(u,e),d=dt((null==e?void 0:e.in)||t,0);d.setFullYear(a,0,c),d.setHours(0,0,0,0);const f=vt(d,e);return+s>=+h?a+1:+s>=+f?a:a-1}function wc(t,e){return(t<0?"-":"")+Math.abs(t).toString().padStart(e,"0")}const xc={y(t,e){const n=t.getFullYear(),i=n>0?n:1-n;return wc("yy"===e?i%100:i,e.length)},M(t,e){const n=t.getMonth();return"M"===e?String(n+1):wc(n+1,2)},d:(t,e)=>wc(t.getDate(),e.length),a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(t,e)=>wc(t.getHours()%12||12,e.length),H:(t,e)=>wc(t.getHours(),e.length),m:(t,e)=>wc(t.getMinutes(),e.length),s:(t,e)=>wc(t.getSeconds(),e.length),S(t,e){const n=e.length,i=t.getMilliseconds();return wc(Math.trunc(i*Math.pow(10,n-3)),e.length)}},Ec={G:function(t,e,n){const i=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});default:return n.era(i,{width:"wide"})}},y:function(t,e,n){if("yo"===e){const e=t.getFullYear(),i=e>0?e:1-e;return n.ordinalNumber(i,{unit:"year"})}return xc.y(t,e)},Y:function(t,e,n,i){const r=bc(t,i),o=r>0?r:1-r;return"YY"===e?wc(o%100,2):"Yo"===e?n.ordinalNumber(o,{unit:"year"}):wc(o,e.length)},R:function(t,e){return wc(_c(t),e.length)},u:function(t,e){return wc(t.getFullYear(),e.length)},Q:function(t,e,n){const i=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(i);case"QQ":return wc(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(t,e,n){const i=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(i);case"qq":return wc(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(t,e,n){const i=t.getMonth();switch(e){case"M":case"MM":return xc.M(t,e);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(t,e,n){const i=t.getMonth();switch(e){case"L":return String(i+1);case"LL":return wc(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(t,e,n,i){const r=function(t,e){const n=gt(t,null==e?void 0:e.in),i=+vt(n,e)-+function(t,e){var n,i,r,o;const s=mt(),a=(null==e?void 0:e.firstWeekContainsDate)??(null==(i=null==(n=null==e?void 0:e.locale)?void 0:n.options)?void 0:i.firstWeekContainsDate)??s.firstWeekContainsDate??(null==(o=null==(r=s.locale)?void 0:r.options)?void 0:o.firstWeekContainsDate)??1,l=bc(t,e),c=dt((null==e?void 0:e.in)||t,0);return c.setFullYear(l,0,a),c.setHours(0,0,0,0),vt(c,e)}(n,e);return Math.round(i/ct)+1}(t,i);return"wo"===e?n.ordinalNumber(r,{unit:"week"}):wc(r,e.length)},I:function(t,e,n){const i=function(t){const e=gt(t,void 0),n=+yc(e)-+function(t){const e=_c(t),n=dt(t,0);return n.setFullYear(e,0,4),n.setHours(0,0,0,0),yc(n)}(e);return Math.round(n/ct)+1}(t);return"Io"===e?n.ordinalNumber(i,{unit:"week"}):wc(i,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getDate(),{unit:"date"}):xc.d(t,e)},D:function(t,e,n){const i=function(t){const e=gt(t,void 0);return vc(e,function(t){const e=gt(t,void 0);return e.setFullYear(e.getFullYear(),0,1),e.setHours(0,0,0,0),e}(e))+1}(t);return"Do"===e?n.ordinalNumber(i,{unit:"dayOfYear"}):wc(i,e.length)},E:function(t,e,n){const i=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},e:function(t,e,n,i){const r=t.getDay(),o=(r-i.weekStartsOn+8)%7||7;switch(e){case"e":return String(o);case"ee":return wc(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},c:function(t,e,n,i){const r=t.getDay(),o=(r-i.weekStartsOn+8)%7||7;switch(e){case"c":return String(o);case"cc":return wc(o,e.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(r,{width:"narrow",context:"standalone"});case"cccccc":return n.day(r,{width:"short",context:"standalone"});default:return n.day(r,{width:"wide",context:"standalone"})}},i:function(t,e,n){const i=t.getDay(),r=0===i?7:i;switch(e){case"i":return String(r);case"ii":return wc(r,e.length);case"io":return n.ordinalNumber(r,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(t,e,n){const i=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(t,e,n){const i=t.getHours();let r;switch(r=12===i?"noon":0===i?"midnight":i/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(t,e,n){const i=t.getHours();let r;switch(r=i>=17?"evening":i>=12?"afternoon":i>=4?"morning":"night",e){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(t,e,n){if("ho"===e){let e=t.getHours()%12;return 0===e&&(e=12),n.ordinalNumber(e,{unit:"hour"})}return xc.h(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getHours(),{unit:"hour"}):xc.H(t,e)},K:function(t,e,n){const i=t.getHours()%12;return"Ko"===e?n.ordinalNumber(i,{unit:"hour"}):wc(i,e.length)},k:function(t,e,n){let i=t.getHours();return 0===i&&(i=24),"ko"===e?n.ordinalNumber(i,{unit:"hour"}):wc(i,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):xc.m(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getSeconds(),{unit:"second"}):xc.s(t,e)},S:function(t,e){return xc.S(t,e)},X:function(t,e,n){const i=t.getTimezoneOffset();if(0===i)return"Z";switch(e){case"X":return Sc(i);case"XXXX":case"XX":return Oc(i);default:return Oc(i,":")}},x:function(t,e,n){const i=t.getTimezoneOffset();switch(e){case"x":return Sc(i);case"xxxx":case"xx":return Oc(i);default:return Oc(i,":")}},O:function(t,e,n){const i=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Tc(i,":");default:return"GMT"+Oc(i,":")}},z:function(t,e,n){const i=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Tc(i,":");default:return"GMT"+Oc(i,":")}},t:function(t,e,n){return wc(Math.trunc(+t/1e3),e.length)},T:function(t,e,n){return wc(+t,e.length)}};function Tc(t,e=""){const n=t>0?"-":"+",i=Math.abs(t),r=Math.trunc(i/60),o=i%60;return 0===o?n+String(r):n+String(r)+e+wc(o,2)}function Sc(t,e){return t%60==0?(t>0?"-":"+")+wc(Math.abs(t)/60,2):Oc(t,e)}function Oc(t,e=""){const n=t>0?"-":"+",i=Math.abs(t);return n+wc(Math.trunc(i/60),2)+e+wc(i%60,2)}const Mc=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},Ac=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},Cc={p:Ac,P:(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],i=n[1],r=n[2];if(!r)return Mc(t,e);let o;switch(i){case"P":o=e.dateTime({width:"short"});break;case"PP":o=e.dateTime({width:"medium"});break;case"PPP":o=e.dateTime({width:"long"});break;default:o=e.dateTime({width:"full"})}return o.replace("{{date}}",Mc(i,e)).replace("{{time}}",Ac(r,e))}},kc=/^D+$/,Dc=/^Y+$/,Lc=["D","DD","YY","YYYY"];const Rc=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ic=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Pc=/^'([^]*?)'?$/,Nc=/''/g,Uc=/[a-zA-Z]/;function Bc(t,e,n){var i,r,o,s,a,l,c,u;const h=mt(),d=(null==n?void 0:n.locale)??h.locale??xt,f=(null==n?void 0:n.firstWeekContainsDate)??(null==(r=null==(i=null==n?void 0:n.locale)?void 0:i.options)?void 0:r.firstWeekContainsDate)??h.firstWeekContainsDate??(null==(s=null==(o=h.locale)?void 0:o.options)?void 0:s.firstWeekContainsDate)??1,p=(null==n?void 0:n.weekStartsOn)??(null==(l=null==(a=null==n?void 0:n.locale)?void 0:a.options)?void 0:l.weekStartsOn)??h.weekStartsOn??(null==(u=null==(c=h.locale)?void 0:c.options)?void 0:u.weekStartsOn)??0,m=gt(t,null==n?void 0:n.in);if(!function(t){return!(!function(t){return t instanceof Date||"object"==typeof t&&"[object Date]"===Object.prototype.toString.call(t)}(t)&&"number"!=typeof t||isNaN(+gt(t)))}(m))throw new RangeError("Invalid time value");let g=e.match(Ic).map((t=>{const e=t[0];return"p"===e||"P"===e?(0,Cc[e])(t,d.formatLong):t})).join("").match(Rc).map((t=>{if("''"===t)return{isToken:!1,value:"'"};const e=t[0];if("'"===e)return{isToken:!1,value:$c(t)};if(Ec[e])return{isToken:!0,value:t};if(e.match(Uc))throw new RangeError("Format string contains an unescaped latin alphabet character `"+e+"`");return{isToken:!1,value:t}}));d.localize.preprocessor&&(g=d.localize.preprocessor(m,g));const v={firstWeekContainsDate:f,weekStartsOn:p,locale:d};return g.map((i=>{if(!i.isToken)return i.value;const r=i.value;return((null==n||!n.useAdditionalWeekYearTokens)&&function(t){return Dc.test(t)}(r)||(null==n||!n.useAdditionalDayOfYearTokens)&&function(t){return kc.test(t)}(r))&&function(t,e,n){const i=function(t,e,n){const i="Y"===t[0]?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${i} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(t,e,n);if(console.warn(i),Lc.includes(t))throw new RangeError(i)}(r,e,String(t)),(0,Ec[r[0]])(m,r,d.localize,v)})).join("")}function $c(t){const e=t.match(Pc);return e?e[1].replace(Nc,"'"):t}const Hc=[["15seconds",15e3],["minute",6e4],["30minutes",18e5],["hourly",36e5],["daily",864e5],["monthly",2592e6],["quarterly",7776e6],["yearly",31104e6]];function Fc(t,e,n,i,r){const o=0===e,s=2===Number(Bc(new Date(t),"c")),a=1===Number(Bc(new Date(t),"q")),l=0!==e?n[e-1]:null;switch(i){case"15seconds":case"minute":case"30minutes":case"hourly":return o||function(t){const{s:e,m:n,H:i}=jc(t);return 0===i&&0===n&&0===e}(t)||Gc(t,l)||Wc(t);case"daily":return r?o||s||Wc(t):o||Gc(t,l)||Wc(t);case"weekly":return o||s||Wc(t);case"monthly":return o||Wc(t);case"quarterly":return o||a;case"yearly":return!1;default:throw new Error(`${i} is not a valid time interval.`)}}function zc(t,e,n,i,r,o){const s=r.showDayName,a="daily"===i&&s?"weekly":i,l=new Date(t),c=dc(r,"timeIntervalFormats")[a],u=dc(c,"primary"),h=dc(c,"secondary"),d=Fc(t,e,n,i,s);let f=d?u:h;"15seconds"===i&&0!==l.getMilliseconds()&&(f=f.replace("pp","h:mm:ss.SSS a"));const p=r.localeObject,{code:m,optionsObject:g}=o,v=g[i].type,y=g[i][d?"primary":"secondary"][f];if("quarterly"!==i&&y)return o[v](l,m,y);{const t=Bc(l,f,{locale:p}).split("").map((t=>{const e=Number(t);return" "===t||Number.isNaN(e)?t:e.toLocaleString(m)}));return o[v](l,m,{},t.join(""))}}function jc(t){const e=new Date(t);return{M:e.getMonth()+1,d:e.getDate(),H:e.getHours(),m:e.getMinutes(),s:e.getSeconds()}}function Vc(t,e){if(ot[e])return e;if(1===t.length)return"15seconds";const n=function(t){if(t)return t.slice(1).map(((e,n)=>e-t[n]))}(t);return function(t){const e=Hc.reduce(((e,[,n],i)=>{const r=Hc[e][1];return Math.abs(r-t)<Math.abs(n-t)?e:i}),0);return Hc[e][0]}(function(t){let e;for(const n of t)null!=n&&(e>n||void 0===e&&n>=n)&&(e=n);return e}(n))}function Gc(t,e){return jc(t).M!==jc(e).M}function Wc(t){const{M:e,d:n,s:i,m:r,H:o}=jc(t);return 1===e&&1===n&&0===o&&0===r&&0===i}function Yc(t){return void 0===t?"":t.toISOString()}var Zc=(t=>(t.GRAPHICS_DOCUMENT="graphics-document",t.GRAPHICS_OBJECT="graphics-object",t.GRAPHICS_SYMBOL="graphics-symbol",t.GROUP="group",t.DOCUMENT="document",t.CHECKBOX="checkbox",t.BUTTON="button",t.MENU="menu",t.MENU_ITEM="menuitem",t.IMG="img",t))(Zc||{}),qc=function(t,e){if(null==t)return t;if(!Te(t))return function(t,e){return t&&Gi(t,e,Xe)}(t,e);for(var n=t.length,i=-1,r=Object(t);++i<n&&!1!==e(r[i],i,r););return t};function Xc(t){return function(){return t}}function Kc(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function Qc(t,e,n,i){for(var r=-1,o=null==t?0:t.length;++r<o;){var s=t[r];e(i,s,n(s),t)}return i}function Jc(t,e,n,i){return qc(t,(function(t,r,o){e(i,t,n(t),o)})),i}Array.prototype.slice;var tu=Object.prototype.hasOwnProperty,eu=function(t){return function(e,n){return(Bt(e)?Qc:Jc)(e,t,Vi(n),{})}}((function(t,e,n){tu.call(t,n)?t[n].push(e):me(t,n,[e])}));function nu(t){return t}var iu=Array.prototype.slice;function ru(t){return()=>t}function ou(t){return Math.max(1,Math.ceil(Math.log(function(t){let e=0;for(let n of t)null!=n&&(n=+n)>=n&&++e;return e}(t))/Math.LN2)+1)}function su(t,e){if((r=t.length)>1)for(var n,i,r,o=1,s=t[e[0]],a=s.length;o<r;++o)for(i=s,s=t[e[o]],n=0;n<a;++n)s[n][1]+=s[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function au(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function lu(t,e){return t[e]}function cu(t){const e=[];return e.key=t,e}function uu(){var t=Xc([]),e=au,n=su,i=lu;function r(r){var o,s,a=Array.from(t.apply(this,arguments),cu),l=a.length,c=-1;for(const t of r)for(o=0,++c;o<l;++o)(a[o][c]=[0,+i(t,a[o].key,c,r)]).data=t;for(o=0,s=Kc(e(a));o<l;++o)a[s[o]].index=o;return n(a,s),a}return r.keys=function(e){return arguments.length?(t="function"==typeof e?e:Xc(Array.from(e)),r):t},r.value=function(t){return arguments.length?(i="function"==typeof t?t:Xc(+t),r):i},r.order=function(t){return arguments.length?(e=null==t?au:"function"==typeof t?t:Xc(Array.from(t)),r):e},r.offset=function(t){return arguments.length?(n=t??su,r):n},r}function hu(t,e){if((a=t.length)>0)for(var n,i,r,o,s,a,l=0,c=t[e[0]].length;l<c;++l)for(o=s=0,n=0;n<a;++n)(r=(i=t[e[n]][l])[1]-i[0])>0?(i[0]=o,i[1]=o+=r):r<0?(i[1]=s,i[0]=s+=r):(i[0]=0,i[1]=r)}class du{constructor(t){this.state={options:{}},this.colorScale={},this.colorClassNames={},this.services=t}formatTable({headers:t,cells:e}){const n=this.getOptions(),{code:i,date:r,number:o}=dc(n,"locale"),s=dc(n,"tabularRepModal","tableHeadingFormatter"),a=dc(n,"tabularRepModal","tableCellFormatter"),{cartesianScales:l}=this.services;let c;return(null==l?void 0:l.getDomainAxisScaleType())===F.TIME&&(c=t=>r(t,i,{month:"short",day:"numeric",year:"numeric"})),["function"==typeof s?s(t):t,..."function"==typeof a?a(e):e.map((t=>{c&&(t[1]=c(t[1]));for(const e in t){const n=t[e];"number"==typeof n&&(t[e]=o(n,i))}return t}))]}getAllDataFromDomain(t){if(!this.getData())return null;const e=this.getOptions();let n=this.getData();const i=this.getDataGroups(),{groupMapsTo:r}=dc(e,"data"),o=dc(e,"axes");return t&&(n=n.filter((e=>t.includes(e[r])))),o&&Object.keys(o).forEach((t=>{const e=o[t].mapsTo,i=o[t].scaleType;if((i===F.LINEAR||i===F.LOG)&&(n=n.map((t=>({...t,[e]:null===t[e]?t[e]:Number(t[e])})))),e&&o[t].domain)if(i===F.LABELS)n=n.filter((n=>o[t].domain.includes(n[e])));else{const[i,r]=o[t].domain;n=n.filter((t=>!(e in t)||t[e]>=i&&t[e]<=r))}})),n.filter((t=>i.find((e=>e.name===t[r]))))}getDisplayData(t){if(!this.get("data"))return null;const{ACTIVE:e}=yl.items.status,n=this.getDataGroups(t),{groupMapsTo:i}=this.getOptions().data;return this.getAllDataFromDomain(t).filter((t=>n.find((n=>n.name===t[i]&&n.status===e))))}getData(){return this.get("data")}isDataEmpty(){return!this.getData().length}setData(t){const e=this.sanitize(Oi(t)),n=this.generateDataGroups(e);return this.set({data:e,dataGroups:n}),e}getDataGroups(t){return dc(this.getOptions(),"data","loading")?[]:t?this.get("dataGroups").filter((e=>t.includes(e.name))):this.get("dataGroups")}getActiveDataGroups(t){const{ACTIVE:e}=yl.items.status;return this.getDataGroups(t).filter((t=>t.status===e))}getDataGroupNames(t){return this.getDataGroups(t).map((t=>t.name))}getActiveDataGroupNames(t){return this.getActiveDataGroups(t).map((t=>t.name))}aggregateBinDataByGroup(t){return eu(t,"group")}getBinConfigurations(){const t=this.getDisplayData(),e=this.getOptions(),n=this.services.cartesianScales.getMainXAxisPosition(),i=this.services.cartesianScales.getDomainIdentifier(),r=e.axes[n],{groupMapsTo:o}=e.data,{bins:s=vl.defaultBins}=r,a=Array.isArray(s),l=function(){var t=nu,e=lr,n=ou;function i(i){Array.isArray(i)||(i=Array.from(i));var r,o,s,a=i.length,l=new Array(a);for(r=0;r<a;++r)l[r]=t(i[r],r,i);var c=e(l),u=c[0],h=c[1],d=n(l,u,h);if(!Array.isArray(d)){const t=h,n=+d;if(e===lr&&([u,h]=function(t,e,n){let i;for(;;){const r=vr(t,e,n);if(r===i||0===r||!isFinite(r))return[t,e];r>0?(t=Math.floor(t/r)*r,e=Math.ceil(e/r)*r):r<0&&(t=Math.ceil(t*r)/r,e=Math.floor(e*r)/r),i=r}}(u,h,n)),(d=gr(u,h,n))[0]<=u&&(s=vr(u,h,n)),d[d.length-1]>=h)if(t>=h&&e===lr){const t=vr(u,h,n);isFinite(t)&&(t>0?h=(Math.floor(h/t)+1)*t:t<0&&(h=(Math.ceil(h*-t)+1)/-t))}else d.pop()}for(var f=d.length,p=0,m=f;d[p]<=u;)++p;for(;d[m-1]>h;)--m;(p||m<f)&&(d=d.slice(p,m),f=m-p);var g,v=new Array(f+1);for(r=0;r<=f;++r)(g=v[r]=[]).x0=r>0?d[r-1]:u,g.x1=r<f?d[r]:h;if(isFinite(s)){if(s>0)for(r=0;r<a;++r)null!=(o=l[r])&&u<=o&&o<=h&&v[Math.min(f,Math.floor((o-u)/s))].push(i[r]);else if(s<0)for(r=0;r<a;++r)if(null!=(o=l[r])&&u<=o&&o<=h){const t=Math.floor((u-o)*s);v[Math.min(f,t+(d[t]<=o))].push(i[r])}}else for(r=0;r<a;++r)null!=(o=l[r])&&u<=o&&o<=h&&v[ar(d,o,0,f)].push(i[r]);return v}return i.value=function(e){return arguments.length?(t="function"==typeof e?e:ru(e),i):t},i.domain=function(t){return arguments.length?(e="function"==typeof t?t:ru([t[0],t[1]]),i):e},i.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:ru(Array.isArray(t)?iu.call(t):t),i):n},i}().value((t=>t[i])).thresholds(s)(t);if(a)l[l.length-1].x1=s[s.length-1];else{const t=l[0].x1-l[0].x0;l[l.length-1].x1=+l[l.length-1].x0+t}const c=a?[s[0],s[s.length-1]]:[l[0].x0,l[l.length-1].x1],u=Array.from(new Set(t.map((t=>t[o])))),h=[];return l.forEach((t=>{const e=`${t.x0}-${t.x1}`,n=this.aggregateBinDataByGroup(t);u.forEach((i=>{h.push({group:i,key:e,value:n[i]||0,bin:t.x0})}))})),{bins:l,binsDomain:c}}getBinnedStackedData(){const t=this.getOptions(),{groupMapsTo:e}=t.data,n=this.getActiveDataGroupNames(),{bins:i}=this.getBinConfigurations(),r=this.getDataValuesGroupedByKeys({bins:i});return uu().keys(n)(r).map(((t,i)=>Object.keys(t).filter((t=>!isNaN(t))).map((r=>{const o=t[r];return o[e]=n[i],o}))))}getGroupedData(t){const e=this.getDisplayData(t),n={},{groupMapsTo:i}=this.getOptions().data;return e.map((t=>{const e=t[i];null!==n[e]&&void 0!==n[e]?n[e].push(t):n[e]=[t]})),Object.keys(n).map((t=>({name:t,data:n[t]})))}getStackKeys({bins:t=null,groups:e=null}={bins:null,groups:null}){const n=this.getOptions(),i=this.getDisplayData(e);let r;r=t?t.map((t=>`${t.x0}:${t.x1}`)):nr(i.map((t=>{const e=this.services.cartesianScales.getDomainIdentifier(t);return t[e]instanceof Date?Yc(t[e]):t[e]&&"function"==typeof t[e].toString?t[e].toString():t[e]})));const o=this.services.cartesianScales.domainAxisPosition,s=n.axes[o].scaleType;return s===F.TIME?r.sort(((t,e)=>new Date(t)-new Date(e))):(s===F.LOG||s===F.LINEAR)&&r.sort(((t,e)=>t-e)),r}getDataValuesGroupedByKeys({bins:t=null,groups:e=null}){const n=this.getOptions(),{groupMapsTo:i}=n.data,r=this.getDisplayData(e),o=this.getDataGroupNames(),s=this.getStackKeys({bins:t,groups:e});return t?s.map((e=>{const[n,r]=e.split(":"),s={x0:n,x1:r},a=t.find((t=>t.x0.toString()===n.toString()));return o.forEach((t=>{s[t]=a.filter((e=>e[i]===t)).length})),s})):s.map((t=>{const e={sharedStackKey:t};return o.forEach((n=>{const o=r.find((e=>{const r=this.services.cartesianScales.getDomainIdentifier(e);return e[i]===n&&Object.prototype.hasOwnProperty.call(e,r)&&(e[r]instanceof Date?Yc(e[r])===t:e[r].toString()===t)})),s=this.services.cartesianScales.getRangeIdentifier(e);e[n]=o?o[s]:null})),e}))}getStackedData({percentage:t=!1,groups:e=null,divergent:n=!1}){const i=this.getOptions(),{groupMapsTo:r}=i.data,o=this.getActiveDataGroupNames(e),s=this.getDataValuesGroupedByKeys({groups:e});if(t){const t=function(t){for(var e=-1,n=null==t?0:t.length,i={};++e<n;){var r=t[e];i[r[0]]=r[1]}return i}(s.map((t=>[t.sharedStackKey,0])));s.forEach((e=>{o.forEach((n=>{t[e.sharedStackKey]+=e[n]}))})),s.forEach((e=>{o.forEach((n=>{const i=t[e.sharedStackKey];t[e.sharedStackKey]?e[n]=e[n]/i*100:e[n]=0}))}))}return(n?uu().offset(hu):uu()).keys(o)(s).map(((t,e)=>Object.keys(t).filter((t=>!isNaN(t))).map((n=>{const i=t[n];return i[r]=o[e],i}))))}getOptions(){return this.state.options}set(t,e){this.state=Object.assign({},this.state,t);const n=Object.assign({skipUpdate:!1,animate:!0},e);n.skipUpdate||this.update(n.animate)}get(t){return t?this.state[t]:this.state}setOptions(t){const e=this.getOptions();hc(e,t),this.set({options:Qi(e,t)})}update(t=!0){this.getDisplayData()&&(this.updateAllDataGroups(),this.setCustomColorScale(),this.setColorClassNames(),this.services.events.dispatchEvent(R.Model.UPDATE,{animate:t}))}toggleDataLabel(t){const{ACTIVE:e,DISABLED:n}=yl.items.status,i=this.getDataGroups(),r=i.some((t=>t.status===n)),o=i.filter((t=>t.status===e));if(r)if(1===o.length&&o[0].name===t)i.forEach(((t,n)=>{i[n].status=e}));else{const r=i.findIndex((e=>e.name===t));i[r].status=i[r].status===n?e:n}else i.forEach(((r,o)=>{i[o].status=r.name===t?e:n}));const s=i.filter((t=>t.status===e)),a=this.getOptions();i.some((t=>t.status===n))?a.data.selectedGroups=s.map((t=>t.name)):a.data.selectedGroups=[],this.services.events.dispatchEvent(R.Legend.ITEMS_UPDATE,{dataGroups:i}),this.set({dataGroups:i})}getIsFilled(t,e,n,i){const r=this.getOptions();return r.getIsFilled?r.getIsFilled(t,e,n,i):i}getFillColor(t,e,n){const i=this.getOptions(),r=dc(this.colorScale,t);return i.getFillColor?i.getFillColor(t,e,n,r):r}getStrokeColor(t,e,n){const i=this.getOptions(),r=dc(this.colorScale,t);return i.getStrokeColor?i.getStrokeColor(t,e,n,r):r}isUserProvidedColorScaleValid(){const t=dc(this.getOptions(),"color","scale"),e=this.getDataGroups();return null!=t&&0!=Object.keys(t).length&&e.some((e=>Object.keys(t).includes(e.name)))}getColorClassName(t){const e=this.colorClassNames(t.dataGroupName);let n=t.originalClassName;return t.classNameTypes.forEach((i=>n=t.originalClassName?`${n} ${i}-${e}`:`${i}-${e}`)),n||""}getStatus(){return null}getAllDataGroupsNames(){return this.allDataGroups}transformToTabularData(t){console.warn("We've updated the charting data format to be tabular by default. The current format you're using is deprecated and will be removed in v1.0, read more here https://charts.carbondesignsystem.com/");const e=[],{datasets:n,labels:i}=t;return n.forEach((t=>{t.data.forEach(((n,r)=>{let o;const s=dc(t,"label");if(null===s){o=dc(i,r)||"Ungrouped"}else o=s;const a={group:o,key:i[r]};isNaN(n)?(a.value=n.value,a.date=n.date):a.value=n,e.push(a)}))})),e}getTabularDataArray(){return[]}exportToCSV(){const t=this.getTabularDataArray().map((t=>t.map((t=>`"${("–"===t?"–":t).split(/[,;'"`]/).map((t=>function(t){const e=t.trim();return["=","+","-","@","\t","\r"].includes(e.charAt(0))?` ${e}`:/[,\"\n]/.test(e)?`"${e}"`:e}(t))).join("")}"`)))).map((t=>t.join(","))).join("\n"),e=this.getOptions();let n="myChart";const i=dc(e,"fileDownload","fileName");"function"==typeof i?n=i("csv"):"string"==typeof i&&(n=i),this.services.files.downloadCSV(t,`${n}.csv`)}getTabularData(t){return Array.isArray(t)?t:this.transformToTabularData(t)}sanitize(t){return this.getTabularData(t)}updateAllDataGroups(){this.allDataGroups?this.getDataGroupNames().forEach((t=>{-1===this.allDataGroups.indexOf(t)&&this.allDataGroups.push(t)})):this.allDataGroups=this.getDataGroupNames()}generateDataGroups(t){const{groupMapsTo:e}=this.getOptions().data,{ACTIVE:n,DISABLED:i}=yl.items.status,r=this.getOptions(),o=nr(t.map((t=>t[e])));r.data.selectedGroups.length&&(r.data.selectedGroups.every((t=>o.includes(t)))||(r.data.selectedGroups=[]));const s=t=>!r.data.selectedGroups.length||r.data.selectedGroups.includes(t)?n:i;return o.map((t=>({name:t,status:s(t)})))}setCustomColorScale(){if(!this.isUserProvidedColorScaleValid())return;const t=this.getOptions(),e=dc(t,"color","scale");Object.keys(e).forEach((t=>{this.allDataGroups.includes(t)||console.warn(`"${t}" does not exist in data groups.`)})),this.allDataGroups.filter((t=>e[t])).forEach((t=>this.colorScale[t]=e[t]))}setColorClassNames(){const t=dc(this.getOptions(),"color","pairing");let e=dc(t,"numberOfVariants");(!e||e<this.allDataGroups.length)&&(e=this.allDataGroups.length);let n=dc(t,"option");const i=e>5?14:e;n=n<=gl[`${i}-color`]?n:1;const r=this.allDataGroups.map(((t,e)=>`${i}-${n}-${e%14+1}`));this.colorClassNames=Xa().range(r).domain(this.allDataGroups)}}class fu extends du{constructor(t){super(t),this.axisFlavor=it.DEFAULT}assignRangeAndDomains(){const{cartesianScales:t}=this.services,e=this.getOptions(),n=t.isDualAxes(),i={primaryDomain:t.domainAxisPosition,primaryRange:t.rangeAxisPosition,secondaryDomain:null,secondaryRange:null};return n&&(i.secondaryDomain=t.secondaryDomainAxisPosition,i.secondaryRange=t.secondaryRangeAxisPosition),Object.keys(i).forEach((n=>{const r=i[n];t.scales[r]?i[n]={position:r,label:t.getScaleLabel(r),identifier:dc(e,"axes",r,"mapsTo")}:i[n]=null})),i}getTabularDataArray(){const t=this.getDisplayData(),e=this.getOptions(),{groupMapsTo:n}=e.data,{primaryDomain:i,primaryRange:r,secondaryDomain:o,secondaryRange:s}=this.assignRangeAndDomains(),{number:a,code:l}=dc(this.getOptions(),"locale"),c=["Group",i.label,r.label,...o?[o.label]:[],...s?[s.label]:[]],u=t.map((t=>[t[n],null===t[i.identifier]?"–":t[i.identifier],null===t[r.identifier]||isNaN(t[r.identifier])?"–":a(t[r.identifier],l),...o?[null===t[o.identifier]?"–":t[o.identifier]]:[],...s?[null===t[s.identifier]||isNaN(t[s.identifier])?"–":t[s.identifier]]:[]]));return super.formatTable({headers:c,cells:u})}setData(t){let e;if(t&&(e=super.setData(t),dc(this.getOptions(),"zoomBar",U.TOP,"enabled"))){const t=dc(this.getOptions(),"zoomBar",U.TOP,"data");this.setZoomBarData(t)}return e}setZoomBarData(t){const e=t?this.sanitize(Oi(t)):this.getDisplayData();let n=e;const{cartesianScales:i}=this.services;if(e&&i.domainAxisPosition&&i.rangeAxisPosition){const t=i.getDomainIdentifier(),r=i.getRangeIdentifier();let o=e.map((e=>e[t].getTime()));o=nr(o).sort(),n=o.map((n=>{let i=0;const o={};return e.forEach((e=>{e[t].getTime()===n&&(i+=e[r])})),o[t]=new Date(n),o[r]=i,o}))}this.set({zoomBarData:n})}getZoomBarData(){return this.get("zoomBarData")}sanitizeDateValues(t){const e=this.getOptions();if(!e.axes)return t;const n=[];return Object.keys(U).forEach((t=>{const i=U[t],r=e.axes[i];if(r&&r.scaleType===F.TIME){const t=r.mapsTo;(null!==t||void 0!==t)&&n.push(t)}})),n.length>0&&t.forEach((t=>{n.forEach((e=>{null===dc(t,e,"getTime")&&(t[e]=new Date(t[e]))}))})),t}sanitize(t){return t=super.sanitize(t),this.sanitizeDateValues(t)}}var pu=/\s/,mu=/^\s+/;var gu=/^[-+]0x[0-9a-f]+$/i,vu=/^0b[01]+$/i,yu=/^0o[0-7]+$/i,_u=parseInt;function bu(t){if("number"==typeof t)return t;if(Nt(t))return NaN;if(zt(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=zt(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=function(t){return t&&t.slice(0,function(t){for(var e=t.length;e--&&pu.test(t.charAt(e)););return e}(t)+1).replace(mu,"")}(t);var n=vu.test(t);return n||yu.test(t)?_u(t.slice(2),n?2:8):gu.test(t)?NaN:+t}var wu=function(){return Ot.Date.now()},xu=Math.max,Eu=Math.min;function Tu(t){return"string"==typeof t?new Po([[document.querySelector(t)]],[document.documentElement]):new Po([[t]],Io)}function Su(){var t,e,n=Xa().unknown(void 0),i=n.domain,r=n.range,o=0,s=1,a=!1,l=0,c=0,u=.5;function h(){var n=i().length,h=s<o,d=h?s:o,f=h?o:s;t=(f-d)/Math.max(1,n-l+2*c),a&&(t=Math.floor(t)),d+=(f-d-t*(n-l))*u,e=t*(1-l),a&&(d=Math.round(d),e=Math.round(e));var p=function(t,e,n){t=+t,e=+e,n=(r=arguments.length)<2?(e=t,t=0,1):r<3?1:+n;for(var i=-1,r=0|Math.max(0,Math.ceil((e-t)/n)),o=new Array(r);++i<r;)o[i]=t+i*n;return o}(n).map((function(e){return d+t*e}));return r(h?p.reverse():p)}return delete n.unknown,n.domain=function(t){return arguments.length?(i(t),h()):i()},n.range=function(t){return arguments.length?([o,s]=t,o=+o,s=+s,h()):[o,s]},n.rangeRound=function(t){return[o,s]=t,o=+o,s=+s,a=!0,h()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(a=!!t,h()):a},n.padding=function(t){return arguments.length?(l=Math.min(1,c=+t),h()):l},n.paddingInner=function(t){return arguments.length?(l=Math.min(1,t),h()):l},n.paddingOuter=function(t){return arguments.length?(c=+t,h()):c},n.align=function(t){return arguments.length?(u=Math.max(0,Math.min(1,t)),h()):u},n.copy=function(){return Su(i(),[o,s]).round(a).paddingInner(l).paddingOuter(c).align(u)},Za.apply(h(),arguments)}function Ou(t,e){var n,i=0,r=(t=t.slice()).length-1,o=t[i],s=t[r];return s<o&&(n=i,i=r,r=n,n=o,o=s,s=n),t[i]=e.floor(o),t[r]=e.ceil(s),t}const Mu=new Date,Au=new Date;function Cu(t,e,n,i){function r(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return r.floor=e=>(t(e=new Date(+e)),e),r.ceil=n=>(t(n=new Date(n-1)),e(n,1),t(n),n),r.round=t=>{const e=r(t),n=r.ceil(t);return t-e<n-t?e:n},r.offset=(t,n)=>(e(t=new Date(+t),null==n?1:Math.floor(n)),t),r.range=(n,i,o)=>{const s=[];if(n=r.ceil(n),o=null==o?1:Math.floor(o),!(n<i&&o>0))return s;let a;do{s.push(a=new Date(+n)),e(n,o),t(n)}while(a<n&&n<i);return s},r.filter=n=>Cu((e=>{if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)}),((t,i)=>{if(t>=t)if(i<0)for(;++i<=0;)for(;e(t,-1),!n(t););else for(;--i>=0;)for(;e(t,1),!n(t););})),n&&(r.count=(e,i)=>(Mu.setTime(+e),Au.setTime(+i),t(Mu),t(Au),Math.floor(n(Mu,Au))),r.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?r.filter(i?e=>i(e)%t===0:e=>r.count(0,e)%t===0):r:null)),r}const ku=Cu((()=>{}),((t,e)=>{t.setTime(+t+e)}),((t,e)=>e-t));ku.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?Cu((e=>{e.setTime(Math.floor(e/t)*t)}),((e,n)=>{e.setTime(+e+n*t)}),((e,n)=>(n-e)/t)):ku:null),ku.range;const Du=1e3,Lu=6e4,Ru=60*Lu,Iu=24*Ru,Pu=7*Iu,Nu=30*Iu,Uu=365*Iu,Bu=Cu((t=>{t.setTime(t-t.getMilliseconds())}),((t,e)=>{t.setTime(+t+e*Du)}),((t,e)=>(e-t)/Du),(t=>t.getUTCSeconds()));Bu.range;const $u=Cu((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Du)}),((t,e)=>{t.setTime(+t+e*Lu)}),((t,e)=>(e-t)/Lu),(t=>t.getMinutes()));$u.range;const Hu=Cu((t=>{t.setUTCSeconds(0,0)}),((t,e)=>{t.setTime(+t+e*Lu)}),((t,e)=>(e-t)/Lu),(t=>t.getUTCMinutes()));Hu.range;const Fu=Cu((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Du-t.getMinutes()*Lu)}),((t,e)=>{t.setTime(+t+e*Ru)}),((t,e)=>(e-t)/Ru),(t=>t.getHours()));Fu.range;const zu=Cu((t=>{t.setUTCMinutes(0,0,0)}),((t,e)=>{t.setTime(+t+e*Ru)}),((t,e)=>(e-t)/Ru),(t=>t.getUTCHours()));zu.range;const ju=Cu((t=>t.setHours(0,0,0,0)),((t,e)=>t.setDate(t.getDate()+e)),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Lu)/Iu),(t=>t.getDate()-1));ju.range;const Vu=Cu((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/Iu),(t=>t.getUTCDate()-1));Vu.range;const Gu=Cu((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/Iu),(t=>Math.floor(t/Iu)));function Wu(t){return Cu((e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),((t,e)=>{t.setDate(t.getDate()+7*e)}),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Lu)/Pu))}Gu.range;const Yu=Wu(0),Zu=Wu(1),qu=Wu(2),Xu=Wu(3),Ku=Wu(4),Qu=Wu(5),Ju=Wu(6);function th(t){return Cu((e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+7*e)}),((t,e)=>(e-t)/Pu))}Yu.range,Zu.range,qu.range,Xu.range,Ku.range,Qu.range,Ju.range;const eh=th(0),nh=th(1),ih=th(2),rh=th(3),oh=th(4),sh=th(5),ah=th(6);eh.range,nh.range,ih.range,rh.range,oh.range,sh.range,ah.range;const lh=Cu((t=>{t.setDate(1),t.setHours(0,0,0,0)}),((t,e)=>{t.setMonth(t.getMonth()+e)}),((t,e)=>e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())),(t=>t.getMonth()));lh.range;const ch=Cu((t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)}),((t,e)=>e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())),(t=>t.getUTCMonth()));ch.range;const uh=Cu((t=>{t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,e)=>{t.setFullYear(t.getFullYear()+e)}),((t,e)=>e.getFullYear()-t.getFullYear()),(t=>t.getFullYear()));uh.every=t=>isFinite(t=Math.floor(t))&&t>0?Cu((e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),((e,n)=>{e.setFullYear(e.getFullYear()+n*t)})):null,uh.range;const hh=Cu((t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)}),((t,e)=>e.getUTCFullYear()-t.getUTCFullYear()),(t=>t.getUTCFullYear()));hh.every=t=>isFinite(t=Math.floor(t))&&t>0?Cu((e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),((e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null,hh.range;const[dh,fh]=function(t,e,n,i,r,o){const s=[[Bu,1,Du],[Bu,5,5e3],[Bu,15,15e3],[Bu,30,3e4],[o,1,Lu],[o,5,5*Lu],[o,15,15*Lu],[o,30,30*Lu],[r,1,Ru],[r,3,3*Ru],[r,6,6*Ru],[r,12,12*Ru],[i,1,Iu],[i,2,2*Iu],[n,1,Pu],[e,1,Nu],[e,3,3*Nu],[t,1,Uu]];function a(e,n,i){const r=Math.abs(n-e)/i,o=or((([,,t])=>t)).right(s,r);if(o===s.length)return t.every(yr(e/Uu,n/Uu,i));if(0===o)return ku.every(Math.max(yr(e,n,i),1));const[a,l]=s[r/s[o-1][2]<s[o][2]/r?o-1:o];return a.every(l)}return[function(t,e,n){const i=e<t;i&&([t,e]=[e,t]);const r=n&&"function"==typeof n.range?n:a(t,e,n),o=r?r.range(t,+e+1):[];return i?o.reverse():o},a]}(uh,lh,Yu,ju,Fu,$u);function ph(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function mh(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function gh(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}var vh,yh,_h={"-":"",_:" ",0:"0"},bh=/^\s*\d+/,wh=/^%/,xh=/[\\^$*+?|[\]().{}]/g;function Eh(t,e,n){var i=t<0?"-":"",r=(i?-t:t)+"",o=r.length;return i+(o<n?new Array(n-o+1).join(e)+r:r)}function Th(t){return t.replace(xh,"\\$&")}function Sh(t){return new RegExp("^(?:"+t.map(Th).join("|")+")","i")}function Oh(t){return new Map(t.map(((t,e)=>[t.toLowerCase(),e])))}function Mh(t,e,n){var i=bh.exec(e.slice(n,n+1));return i?(t.w=+i[0],n+i[0].length):-1}function Ah(t,e,n){var i=bh.exec(e.slice(n,n+1));return i?(t.u=+i[0],n+i[0].length):-1}function Ch(t,e,n){var i=bh.exec(e.slice(n,n+2));return i?(t.U=+i[0],n+i[0].length):-1}function kh(t,e,n){var i=bh.exec(e.slice(n,n+2));return i?(t.V=+i[0],n+i[0].length):-1}function Dh(t,e,n){var i=bh.exec(e.slice(n,n+2));return i?(t.W=+i[0],n+i[0].length):-1}function Lh(t,e,n){var i=bh.exec(e.slice(n,n+4));return i?(t.y=+i[0],n+i[0].length):-1}function Rh(t,e,n){var i=bh.exec(e.slice(n,n+2));return i?(t.y=+i[0]+(+i[0]>68?1900:2e3),n+i[0].length):-1}function Ih(t,e,n){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),n+i[0].length):-1}function Ph(t,e,n){var i=bh.exec(e.slice(n,n+1));return i?(t.q=3*i[0]-3,n+i[0].length):-1}function Nh(t,e,n){var i=bh.exec(e.slice(n,n+2));return i?(t.m=i[0]-1,n+i[0].length):-1}function Uh(t,e,n){var i=bh.exec(e.slice(n,n+2));return i?(t.d=+i[0],n+i[0].length):-1}function Bh(t,e,n){var i=bh.exec(e.slice(n,n+3));return i?(t.m=0,t.d=+i[0],n+i[0].length):-1}function $h(t,e,n){var i=bh.exec(e.slice(n,n+2));return i?(t.H=+i[0],n+i[0].length):-1}function Hh(t,e,n){var i=bh.exec(e.slice(n,n+2));return i?(t.M=+i[0],n+i[0].length):-1}function Fh(t,e,n){var i=bh.exec(e.slice(n,n+2));return i?(t.S=+i[0],n+i[0].length):-1}function zh(t,e,n){var i=bh.exec(e.slice(n,n+3));return i?(t.L=+i[0],n+i[0].length):-1}function jh(t,e,n){var i=bh.exec(e.slice(n,n+6));return i?(t.L=Math.floor(i[0]/1e3),n+i[0].length):-1}function Vh(t,e,n){var i=wh.exec(e.slice(n,n+1));return i?n+i[0].length:-1}function Gh(t,e,n){var i=bh.exec(e.slice(n));return i?(t.Q=+i[0],n+i[0].length):-1}function Wh(t,e,n){var i=bh.exec(e.slice(n));return i?(t.s=+i[0],n+i[0].length):-1}function Yh(t,e){return Eh(t.getDate(),e,2)}function Zh(t,e){return Eh(t.getHours(),e,2)}function qh(t,e){return Eh(t.getHours()%12||12,e,2)}function Xh(t,e){return Eh(1+ju.count(uh(t),t),e,3)}function Kh(t,e){return Eh(t.getMilliseconds(),e,3)}function Qh(t,e){return Kh(t,e)+"000"}function Jh(t,e){return Eh(t.getMonth()+1,e,2)}function td(t,e){return Eh(t.getMinutes(),e,2)}function ed(t,e){return Eh(t.getSeconds(),e,2)}function nd(t){var e=t.getDay();return 0===e?7:e}function id(t,e){return Eh(Yu.count(uh(t)-1,t),e,2)}function rd(t){var e=t.getDay();return e>=4||0===e?Ku(t):Ku.ceil(t)}function od(t,e){return t=rd(t),Eh(Ku.count(uh(t),t)+(4===uh(t).getDay()),e,2)}function sd(t){return t.getDay()}function ad(t,e){return Eh(Zu.count(uh(t)-1,t),e,2)}function ld(t,e){return Eh(t.getFullYear()%100,e,2)}function cd(t,e){return Eh((t=rd(t)).getFullYear()%100,e,2)}function ud(t,e){return Eh(t.getFullYear()%1e4,e,4)}function hd(t,e){var n=t.getDay();return Eh((t=n>=4||0===n?Ku(t):Ku.ceil(t)).getFullYear()%1e4,e,4)}function dd(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Eh(e/60|0,"0",2)+Eh(e%60,"0",2)}function fd(t,e){return Eh(t.getUTCDate(),e,2)}function pd(t,e){return Eh(t.getUTCHours(),e,2)}function md(t,e){return Eh(t.getUTCHours()%12||12,e,2)}function gd(t,e){return Eh(1+Vu.count(hh(t),t),e,3)}function vd(t,e){return Eh(t.getUTCMilliseconds(),e,3)}function yd(t,e){return vd(t,e)+"000"}function _d(t,e){return Eh(t.getUTCMonth()+1,e,2)}function bd(t,e){return Eh(t.getUTCMinutes(),e,2)}function wd(t,e){return Eh(t.getUTCSeconds(),e,2)}function xd(t){var e=t.getUTCDay();return 0===e?7:e}function Ed(t,e){return Eh(eh.count(hh(t)-1,t),e,2)}function Td(t){var e=t.getUTCDay();return e>=4||0===e?oh(t):oh.ceil(t)}function Sd(t,e){return t=Td(t),Eh(oh.count(hh(t),t)+(4===hh(t).getUTCDay()),e,2)}function Od(t){return t.getUTCDay()}function Md(t,e){return Eh(nh.count(hh(t)-1,t),e,2)}function Ad(t,e){return Eh(t.getUTCFullYear()%100,e,2)}function Cd(t,e){return Eh((t=Td(t)).getUTCFullYear()%100,e,2)}function kd(t,e){return Eh(t.getUTCFullYear()%1e4,e,4)}function Dd(t,e){var n=t.getUTCDay();return Eh((t=n>=4||0===n?oh(t):oh.ceil(t)).getUTCFullYear()%1e4,e,4)}function Ld(){return"+0000"}function Rd(){return"%"}function Id(t){return+t}function Pd(t){return Math.floor(+t/1e3)}function Nd(t){return new Date(t)}function Ud(t){return t instanceof Date?+t:+new Date(+t)}function Bd(t,e,n,i,r,o,s,a,l,c){var u=ol(),h=u.invert,d=u.domain,f=c(".%L"),p=c(":%S"),m=c("%I:%M"),g=c("%I %p"),v=c("%a %d"),y=c("%b %d"),_=c("%B"),b=c("%Y");function w(t){return(l(t)<t?f:a(t)<t?p:s(t)<t?m:o(t)<t?g:i(t)<t?r(t)<t?v:y:n(t)<t?_:b)(t)}return u.invert=function(t){return new Date(h(t))},u.domain=function(t){return arguments.length?d(Array.from(t,Ud)):d().map(Nd)},u.ticks=function(e){var n=d();return t(n[0],n[n.length-1],e??10)},u.tickFormat=function(t,e){return null==e?w:c(e)},u.nice=function(t){var n=d();return(!t||"function"!=typeof t.range)&&(t=e(n[0],n[n.length-1],t??10)),t?d(Ou(n,t)):u},u.copy=function(){return il(u,Bd(t,e,n,i,r,o,s,a,l,c))},u}function $d(){return Za.apply(Bd(dh,fh,uh,lh,Yu,ju,Fu,$u,Bu,yh).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}vh=function(t){var e=t.dateTime,n=t.date,i=t.time,r=t.periods,o=t.days,s=t.shortDays,a=t.months,l=t.shortMonths,c=Sh(r),u=Oh(r),h=Sh(o),d=Oh(o),f=Sh(s),p=Oh(s),m=Sh(a),g=Oh(a),v=Sh(l),y=Oh(l),_={a:function(t){return s[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return l[t.getMonth()]},B:function(t){return a[t.getMonth()]},c:null,d:Yh,e:Yh,f:Qh,g:cd,G:hd,H:Zh,I:qh,j:Xh,L:Kh,m:Jh,M:td,p:function(t){return r[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Id,s:Pd,S:ed,u:nd,U:id,V:od,w:sd,W:ad,x:null,X:null,y:ld,Y:ud,Z:dd,"%":Rd},b={a:function(t){return s[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return l[t.getUTCMonth()]},B:function(t){return a[t.getUTCMonth()]},c:null,d:fd,e:fd,f:yd,g:Cd,G:Dd,H:pd,I:md,j:gd,L:vd,m:_d,M:bd,p:function(t){return r[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Id,s:Pd,S:wd,u:xd,U:Ed,V:Sd,w:Od,W:Md,x:null,X:null,y:Ad,Y:kd,Z:Ld,"%":Rd},w={a:function(t,e,n){var i=f.exec(e.slice(n));return i?(t.w=p.get(i[0].toLowerCase()),n+i[0].length):-1},A:function(t,e,n){var i=h.exec(e.slice(n));return i?(t.w=d.get(i[0].toLowerCase()),n+i[0].length):-1},b:function(t,e,n){var i=v.exec(e.slice(n));return i?(t.m=y.get(i[0].toLowerCase()),n+i[0].length):-1},B:function(t,e,n){var i=m.exec(e.slice(n));return i?(t.m=g.get(i[0].toLowerCase()),n+i[0].length):-1},c:function(t,n,i){return T(t,e,n,i)},d:Uh,e:Uh,f:jh,g:Rh,G:Lh,H:$h,I:$h,j:Bh,L:zh,m:Nh,M:Hh,p:function(t,e,n){var i=c.exec(e.slice(n));return i?(t.p=u.get(i[0].toLowerCase()),n+i[0].length):-1},q:Ph,Q:Gh,s:Wh,S:Fh,u:Ah,U:Ch,V:kh,w:Mh,W:Dh,x:function(t,e,i){return T(t,n,e,i)},X:function(t,e,n){return T(t,i,e,n)},y:Rh,Y:Lh,Z:Ih,"%":Vh};function x(t,e){return function(n){var i,r,o,s=[],a=-1,l=0,c=t.length;for(n instanceof Date||(n=new Date(+n));++a<c;)37===t.charCodeAt(a)&&(s.push(t.slice(l,a)),null!=(r=_h[i=t.charAt(++a)])?i=t.charAt(++a):r="e"===i?" ":"0",(o=e[i])&&(i=o(n,r)),s.push(i),l=a+1);return s.push(t.slice(l,a)),s.join("")}}function E(t,e){return function(n){var i,r,o=gh(1900,void 0,1);if(T(o,t,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(e&&!("Z"in o)&&(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(r=(i=mh(gh(o.y,0,1))).getUTCDay(),i=r>4||0===r?nh.ceil(i):nh(i),i=Vu.offset(i,7*(o.V-1)),o.y=i.getUTCFullYear(),o.m=i.getUTCMonth(),o.d=i.getUTCDate()+(o.w+6)%7):(r=(i=ph(gh(o.y,0,1))).getDay(),i=r>4||0===r?Zu.ceil(i):Zu(i),i=ju.offset(i,7*(o.V-1)),o.y=i.getFullYear(),o.m=i.getMonth(),o.d=i.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),r="Z"in o?mh(gh(o.y,0,1)).getUTCDay():ph(gh(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(r+5)%7:o.w+7*o.U-(r+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,mh(o)):ph(o)}}function T(t,e,n,i){for(var r,o,s=0,a=e.length,l=n.length;s<a;){if(i>=l)return-1;if(37===(r=e.charCodeAt(s++))){if(r=e.charAt(s++),!(o=w[r in _h?e.charAt(s++):r])||(i=o(t,n,i))<0)return-1}else if(r!=n.charCodeAt(i++))return-1}return i}return _.x=x(n,_),_.X=x(i,_),_.c=x(e,_),b.x=x(n,b),b.X=x(i,b),b.c=x(e,b),{format:function(t){var e=x(t+="",_);return e.toString=function(){return t},e},parse:function(t){var e=E(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=x(t+="",b);return e.toString=function(){return t},e},utcParse:function(t){var e=E(t+="",!0);return e.toString=function(){return t},e}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),yh=vh.format,vh.parse,vh.utcFormat,vh.utcParse;const Hd=Math.abs,Fd=Math.atan2,zd=Math.cos,jd=Math.max,Vd=Math.min,Gd=Math.sin,Wd=Math.sqrt,Yd=1e-12,Zd=Math.PI,qd=Zd/2,Xd=2*Zd;function Kd(t){return t>=1?qd:t<=-1?-qd:Math.asin(t)}function Qd(t){this._context=t}function Jd(t){return new Qd(t)}function tf(){}function ef(t){this._context=t}function nf(t){return new ef(t)}Qd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}},ef.prototype={areaStart:tf,areaEnd:tf,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};const rf=(()=>{let t=0;return()=>(t+=1,`u${`0000${(Math.random()*36**4|0).toString(36)}`.slice(-4)}${t}`)})();function of(t){const e=[];for(let n=0,i=t.length;n<i;n++)e.push(t[n]);return e}function sf(t,e){const n=(t.ownerDocument.defaultView||window).getComputedStyle(t).getPropertyValue(e);return n?parseFloat(n.replace("px","")):0}function af(t,e={}){const n=e.width||function(t){const e=sf(t,"border-left-width"),n=sf(t,"border-right-width");return t.clientWidth+e+n}(t),i=e.height||function(t){const e=sf(t,"border-top-width"),n=sf(t,"border-bottom-width");return t.clientHeight+e+n}(t);return{width:n,height:i}}const lf=16384;function cf(t){return new Promise(((e,n)=>{const i=new Image;i.decode=()=>e(i),i.onload=()=>e(i),i.onerror=n,i.crossOrigin="anonymous",i.decoding="async",i.src=t}))}const uf=(t,e)=>{if(t instanceof e)return!0;const n=Object.getPrototypeOf(t);return null!==n&&(n.constructor.name===e.name||uf(n,e))};function hf(t,e,n){const i=window.getComputedStyle(t,n),r=i.getPropertyValue("content");if(""===r||"none"===r)return;const o=rf();try{e.className=`${e.className} ${o}`}catch{return}const s=document.createElement("style");s.appendChild(function(t,e,n){const i=`.${t}:${e}`,r=n.cssText?function(t){const e=t.getPropertyValue("content");return`${t.cssText} content: '${e.replace(/'|"/g,"")}';`}(n):function(t){return of(t).map((e=>`${e}: ${t.getPropertyValue(e)}${t.getPropertyPriority(e)?" !important":""};`)).join(" ")}(n);return document.createTextNode(`${i}{${r}}`)}(o,n,i)),e.appendChild(s)}const df="application/font-woff",ff="image/jpeg",pf={woff:df,woff2:df,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:ff,jpeg:ff,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function mf(t){const e=function(t){const e=/\.([^./]*?)$/g.exec(t);return e?e[1]:""}(t).toLowerCase();return pf[e]||""}function gf(t){return-1!==t.search(/^(data:)/)}async function vf(t,e,n){const i=await fetch(t,e);if(404===i.status)throw new Error(`Resource "${i.url}" not found`);const r=await i.blob();return new Promise(((t,e)=>{const o=new FileReader;o.onerror=e,o.onloadend=()=>{try{t(n({res:i,result:o.result}))}catch(t){e(t)}},o.readAsDataURL(r)}))}const yf={};async function _f(t,e,n){const i=function(t,e,n){let i=t.replace(/\?.*/,"");return n&&(i=t),/ttf|otf|eot|woff2?/i.test(i)&&(i=i.replace(/.*\//,"")),e?`[${e}]${i}`:i}(t,e,n.includeQueryParams);if(null!=yf[i])return yf[i];let r;n.cacheBust&&(t+=(/\?/.test(t)?"&":"?")+(new Date).getTime());try{const i=await vf(t,n.fetchRequestInit,(({res:t,result:n})=>(e||(e=t.headers.get("Content-Type")||""),function(t){return t.split(/,/)[1]}(n))));r=function(t,e){return`data:${e};base64,${t}`}(i,e)}catch(e){r=n.imagePlaceholder||"";let i=`Failed to fetch resource: ${t}`;e&&(i="string"==typeof e?e:e.message),i&&console.warn(i)}return yf[i]=r,r}const bf=t=>null!=t.tagName&&"SLOT"===t.tagName.toUpperCase();async function wf(t,e,n){return n||!e.filter||e.filter(t)?Promise.resolve(t).then((t=>async function(t,e){return uf(t,HTMLCanvasElement)?async function(t){const e=t.toDataURL();return"data:,"===e?t.cloneNode(!1):cf(e)}(t):uf(t,HTMLVideoElement)?async function(t,e){if(t.currentSrc){const e=document.createElement("canvas"),n=e.getContext("2d");return e.width=t.clientWidth,e.height=t.clientHeight,null==n||n.drawImage(t,0,0,e.width,e.height),cf(e.toDataURL())}const n=t.poster,i=mf(n);return cf(await _f(n,i,e))}(t,e):uf(t,HTMLIFrameElement)?async function(t){var e;try{if(null!==(e=null==t?void 0:t.contentDocument)&&void 0!==e&&e.body)return await wf(t.contentDocument.body,{},!0)}catch{}return t.cloneNode(!1)}(t):t.cloneNode(!1)}(t,e))).then((n=>async function(t,e,n){var i,r;let o=[];return o=bf(t)&&t.assignedNodes?of(t.assignedNodes()):uf(t,HTMLIFrameElement)&&null!==(i=t.contentDocument)&&void 0!==i&&i.body?of(t.contentDocument.body.childNodes):of((null!==(r=t.shadowRoot)&&void 0!==r?r:t).childNodes),0===o.length||uf(t,HTMLVideoElement)||await o.reduce(((t,i)=>t.then((()=>wf(i,n))).then((t=>{t&&e.appendChild(t)}))),Promise.resolve()),e}(t,n,e))).then((e=>function(t,e){return uf(e,Element)&&(function(t,e){const n=e.style;if(!n)return;const i=window.getComputedStyle(t);i.cssText?(n.cssText=i.cssText,n.transformOrigin=i.transformOrigin):of(i).forEach((r=>{let o=i.getPropertyValue(r);"font-size"===r&&o.endsWith("px")&&(o=Math.floor(parseFloat(o.substring(0,o.length-2)))-.1+"px"),uf(t,HTMLIFrameElement)&&"display"===r&&"inline"===o&&(o="block"),"d"===r&&e.getAttribute("d")&&(o=`path(${e.getAttribute("d")})`),n.setProperty(r,o,i.getPropertyPriority(r))}))}(t,e),function(t,e){hf(t,e,":before"),hf(t,e,":after")}(t,e),function(t,e){uf(t,HTMLTextAreaElement)&&(e.innerHTML=t.value),uf(t,HTMLInputElement)&&e.setAttribute("value",t.value)}(t,e),function(t,e){if(uf(t,HTMLSelectElement)){const n=e,i=Array.from(n.children).find((e=>t.value===e.getAttribute("value")));i&&i.setAttribute("selected","")}}(t,e)),e}(t,e))).then((t=>async function(t,e){const n=t.querySelectorAll?t.querySelectorAll("use"):[];if(0===n.length)return t;const i={};for(let r=0;r<n.length;r++){const o=n[r].getAttribute("xlink:href");if(o){const n=t.querySelector(o),r=document.querySelector(o);!n&&r&&!i[o]&&(i[o]=await wf(r,e,!0))}}const r=Object.values(i);if(r.length){const e="http://www.w3.org/1999/xhtml",n=document.createElementNS(e,"svg");n.setAttribute("xmlns",e),n.style.position="absolute",n.style.width="0",n.style.height="0",n.style.overflow="hidden",n.style.display="none";const i=document.createElementNS(e,"defs");n.appendChild(i);for(let t=0;t<r.length;t++)i.appendChild(r[t]);t.appendChild(n)}return t}(t,e))):null}const xf=/url\((['"]?)([^'"]+?)\1\)/g,Ef=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,Tf=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function Sf(t){return-1!==t.search(xf)}async function Of(t,e,n){if(!Sf(t))return t;const i=function(t,{preferredFontFormat:e}){return e?t.replace(Tf,(t=>{for(;;){const[n,,i]=Ef.exec(t)||[];if(!i)return"";if(i===e)return`src: ${n};`}})):t}(t,n);return function(t){const e=[];return t.replace(xf,((t,n,i)=>(e.push(i),t))),e.filter((t=>!gf(t)))}(i).reduce(((t,i)=>t.then((t=>async function(t,e,n,i,r){try{const o=n?function(t,e){if(t.match(/^[a-z]+:\/\//i))return t;if(t.match(/^\/\//))return window.location.protocol+t;if(t.match(/^[a-z]+:/i))return t;const n=document.implementation.createHTMLDocument(),i=n.createElement("base"),r=n.createElement("a");return n.head.appendChild(i),n.body.appendChild(r),e&&(i.href=e),r.href=t,r.href}(e,n):e,s=mf(e);let a;return r||(a=await _f(o,s,i)),t.replace(function(t){const e=t.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${e})(['"]?\\))`,"g")}(e),`$1${a}$3`)}catch{}return t}(t,i,e,n)))),Promise.resolve(i))}async function Mf(t,e,n){var i;const r=null===(i=e.style)||void 0===i?void 0:i.getPropertyValue(t);if(r){const i=await Of(r,null,n);return e.style.setProperty(t,i,e.style.getPropertyPriority(t)),!0}return!1}async function Af(t,e){uf(t,Element)&&(await async function(t,e){await Mf("background",t,e)||await Mf("background-image",t,e),await Mf("mask",t,e)||await Mf("mask-image",t,e)}(t,e),await async function(t,e){const n=uf(t,HTMLImageElement);if((!n||gf(t.src))&&(!uf(t,SVGImageElement)||gf(t.href.baseVal)))return;const i=n?t.src:t.href.baseVal,r=await _f(i,mf(i),e);await new Promise(((e,i)=>{t.onload=e,t.onerror=i;const o=t;o.decode&&(o.decode=e),"lazy"===o.loading&&(o.loading="eager"),n?(t.srcset="",t.src=r):t.href.baseVal=r}))}(t,e),await async function(t,e){const n=of(t.childNodes).map((t=>Af(t,e)));await Promise.all(n).then((()=>t))}(t,e))}const Cf={};async function kf(t){let e=Cf[t];return null!=e||(e={url:t,cssText:await(await fetch(t)).text()},Cf[t]=e),e}async function Df(t,e){let n=t.cssText;const i=/url\(["']?([^"')]+)["']?\)/g,r=(n.match(/url\([^)]+\)/g)||[]).map((async r=>{let o=r.replace(i,"$1");return o.startsWith("https://")||(o=new URL(o,t.url).href),vf(o,e.fetchRequestInit,(({result:t})=>(n=n.replace(r,`url(${t})`),[r,t])))}));return Promise.all(r).then((()=>n))}function Lf(t){if(null==t)return[];const e=[];let n=t.replace(/(\/\*[\s\S]*?\*\/)/gi,"");const i=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const t=i.exec(n);if(null===t)break;e.push(t[0])}n=n.replace(i,"");const r=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,o=new RegExp("((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})","gi");for(;;){let t=r.exec(n);if(null===t){if(t=o.exec(n),null===t)break;r.lastIndex=o.lastIndex}else o.lastIndex=r.lastIndex;e.push(t[0])}return e}async function Rf(t,e){const n=null!=e.fontEmbedCSS?e.fontEmbedCSS:e.skipFonts?null:await async function(t,e){const n=await async function(t,e){if(null==t.ownerDocument)throw new Error("Provided element is not within a Document");const n=of(t.ownerDocument.styleSheets),i=await async function(t,e){const n=[],i=[];return t.forEach((n=>{if("cssRules"in n)try{of(n.cssRules||[]).forEach(((t,r)=>{if(t.type===CSSRule.IMPORT_RULE){let o=r+1;const s=kf(t.href).then((t=>Df(t,e))).then((t=>Lf(t).forEach((t=>{try{n.insertRule(t,t.startsWith("@import")?o+=1:n.cssRules.length)}catch(e){console.error("Error inserting rule from remote css",{rule:t,error:e})}})))).catch((t=>{console.error("Error loading remote css",t.toString())}));i.push(s)}}))}catch(r){const o=t.find((t=>null==t.href))||document.styleSheets[0];null!=n.href&&i.push(kf(n.href).then((t=>Df(t,e))).then((t=>Lf(t).forEach((t=>{o.insertRule(t,n.cssRules.length)})))).catch((t=>{console.error("Error loading remote stylesheet",t)}))),console.error("Error inlining remote css file",r)}})),Promise.all(i).then((()=>(t.forEach((t=>{if("cssRules"in t)try{of(t.cssRules||[]).forEach((t=>{n.push(t)}))}catch(e){console.error(`Error while reading CSS rules from ${t.href}`,e)}})),n)))}(n,e);return function(t){return t.filter((t=>t.type===CSSRule.FONT_FACE_RULE)).filter((t=>Sf(t.style.getPropertyValue("src"))))}(i)}(t,e);return(await Promise.all(n.map((t=>{const n=t.parentStyleSheet?t.parentStyleSheet.href:null;return Of(t.cssText,n,e)})))).join("\n")}(t,e);if(n){const e=document.createElement("style"),i=document.createTextNode(n);e.appendChild(i),t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}}async function If(t,e={}){const{width:n,height:i}=af(t,e),r=await wf(t,e,!0);return await Rf(r,e),await Af(r,e),function(t,e){const{style:n}=t;e.backgroundColor&&(n.backgroundColor=e.backgroundColor),e.width&&(n.width=`${e.width}px`),e.height&&(n.height=`${e.height}px`);const i=e.style;null!=i&&Object.keys(i).forEach((t=>{n[t]=i[t]}))}(r,e),await async function(t,e,n){const i="http://www.w3.org/2000/svg",r=document.createElementNS(i,"svg"),o=document.createElementNS(i,"foreignObject");return r.setAttribute("width",`${e}`),r.setAttribute("height",`${n}`),r.setAttribute("viewBox",`0 0 ${e} ${n}`),o.setAttribute("width","100%"),o.setAttribute("height","100%"),o.setAttribute("x","0"),o.setAttribute("y","0"),o.setAttribute("externalResourcesRequired","true"),r.appendChild(o),o.appendChild(t),async function(t){return Promise.resolve().then((()=>(new XMLSerializer).serializeToString(t))).then(encodeURIComponent).then((t=>`data:image/svg+xml;charset=utf-8,${t}`))}(r)}(r,n,i)}async function Pf(t,e={}){const{width:n,height:i}=af(t,e),r=await If(t,e),o=await cf(r),s=document.createElement("canvas"),a=s.getContext("2d"),l=e.pixelRatio||function(){let t,e;try{e=process}catch{}const n=e&&e.env?e.env.devicePixelRatio:null;return n&&(t=parseInt(n,10),Number.isNaN(t)&&(t=1)),t||window.devicePixelRatio||1}(),c=e.canvasWidth||n,u=e.canvasHeight||i;return s.width=c*l,s.height=u*l,e.skipAutoScale||function(t){(t.width>lf||t.height>lf)&&(t.width>lf&&t.height>lf?t.width>t.height?(t.height*=lf/t.width,t.width=lf):(t.width*=lf/t.height,t.height=lf):t.width>lf?(t.height*=lf/t.width,t.width=lf):(t.width*=lf/t.height,t.height=lf))}(s),s.style.width=`${c}`,s.style.height=`${u}`,e.backgroundColor&&(a.fillStyle=e.backgroundColor,a.fillRect(0,0,s.width,s.height)),a.drawImage(o,0,0,s.width,s.height),s}let Nf=class{constructor(t,e){this.model=t,this.services=e,this.init()}init(){}update(){}setModel(t){this.model=t}setServices(t){this.services=t}},Uf=class t extends Nf{constructor(t,e){super(t,e)}static getHTMLElementSize(t){return{width:t.clientWidth,height:t.clientHeight}}static getSVGElementSize(t,e={useAttrs:!1,useClientDimensions:!1,useBBox:!1,useBoundingRect:!1}){t.attr||(t=Tu(t));const n={width:0,height:0},i=t=>{t&&Object.keys(n).forEach((e=>{if(t[e]){const i=t[e],r=parseFloat(i);i&&r>n[e]&&-1===(""+i).indexOf("%")&&(n[e]=r)}}))},r={width:t.attr("width"),height:t.attr("height")},o=t.node();let s,a,l,c,u;try{"function"==typeof o.getBBox&&(s=o.getBBox(),a={width:s.width,height:s.height})}catch(t){console.error(t)}try{"function"==typeof(null==o?void 0:o.getBoundingClientRect)&&(l=o.getBoundingClientRect(),c={width:l.width,height:l.height})}catch(t){console.error(t)}if(o instanceof SVGSVGElement&&(u={width:o.clientWidth,height:o.clientHeight}),e){if(e.useAttrs&&(i(r),n.width>0&&n.height>0))return n;if(e.useClientDimensions&&(i(u),n.width>0&&n.height>0))return u;if(e.useBBox&&(i(a),n.width>0&&n.height>0))return a;if(e.useBoundingRect&&(i(c),n.width>0&&n.height>0))return c}try{i({width:dc(t.node(),"width","baseVal","value"),height:dc(t.node(),"height","baseVal","value")})}catch{i(u),i(a),i(r)}return n}static appendOrSelect(t,e){const n=t.select(`${e}`);if(n.empty()){let n,i,r=e.split("#");return 2===r.length?(n=r[0],r=r[1].split("."),i=r[0]):(r=e.split("."),n=r[0]),t.append(n).attr("id",i).attr("class",r.slice(1).join(" "))}return n}init(){this.initializeID(),this.styleHolderElement(),this.addMainContainer(),this.model.getOptions().resizable&&this.addResizeListener(),this.addHolderListeners(),this.handleFullscreenChange()}getChartID(){return this.chartID}getElementOffset(t,e=!1){const n={left:0,top:0},i=t.getBoundingClientRect(),r=e?{left:0,top:0}:this.getHolder().getBoundingClientRect();try{n.left=i.left-r.left,n.top=i.top-r.top}catch(t){console.error(t)}return n}generateElementIDString(t){return`chart-${this.chartID}-${t}`}initializeID(){this.chartID=Math.floor(281474976710656*(1+Math.random())).toString(16)}addMainContainer(){const t=this.model.getOptions(),e=dc(t,"style","prefix"),n=Tu(this.getHolder()).append("div").classed(`${cl}--${e}--chart-wrapper`,!0).attr("id",`chart-${this.getChartID()}`).style("height","100%").style("width","100%");n.append("g").attr("class","DONT_STYLE_ME_css_styles_verifier"),this.mainContainer=n.node()}update(){this.styleHolderElement()}styleHolderElement(){const t=this.getHolder(),{width:e,height:n,theme:i}=this.model.getOptions();e!==this.width&&(t.style.width=e,this.width=e),n!==this.height&&(t.style.height=n,this.height=n),Tu(this.getHolder()).classed(`${cl}--chart-holder`,!0).attr("data-carbon-theme",i)}getHolder(){return this.model.get("holder")}exportToJPG(){const t=this,e=this.model.getOptions(),n=Tu(this.getHolder());n.classed("filled",!0),async function(t,e={}){return(await Pf(t,e)).toDataURL("image/jpeg",e.quality||1)}(this.getMainContainer(),{quality:1,filter:t=>!(t.classList&&t.classList.contains("cds--cc--toolbar"))}).then((function(i){var r;let o="myChart";const s=dc(e,"fileDownload","fileName");"function"==typeof s?o=s("jpg"):"string"==typeof s&&(o=s),null==(r=t.services.files)||r.downloadImage(i,`${o}.jpg`),n.classed("filled",!1)}))}exportToPNG(){const t=this,e=this.model.getOptions(),n=Tu(this.getHolder());n.classed("filled",!0),async function(t,e={}){return(await Pf(t,e)).toDataURL()}(this.getMainContainer(),{quality:1,filter:t=>!(t.classList&&t.classList.contains("cds--cc--toolbar"))}).then((function(i){var r;let o="myChart";const s=dc(e,"fileDownload","fileName");"function"==typeof s?o=s("png"):"string"==typeof s&&(o=s),null==(r=t.services.files)||r.downloadImage(i,`${o}.png`),n.classed("filled",!1)})).catch((function(t){console.error("oops, something went wrong!",t)}))}isFullScreenMode(){return Tu(this.getHolder()).classed("fullscreen")}toggleFullscreen(){const t=this.getHolder();Tu(t).classed("fullscreen")&&(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)?document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen():t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.msRequestFullscreen&&t.msRequestFullscreen()}handleFullscreenChange(){document.addEventListener("fullscreenchange",(()=>{const t=Tu(this.getHolder()),e=t.classed("fullscreen");t.classed("fullscreen",!e)}))}setSVGMaxHeight(){if(!this.model.getOptions().height){const{height:e}=t.getSVGElementSize(Tu(this.mainContainer),{useBBox:!0}),n=Tu(this.mainContainer).attr("class"),i=Tu(this.mainContainer).selectAll(`.${n} > svg`);let r=0;i.nodes().forEach((function(e){r+=Number(t.getSVGElementSize(Tu(e),{useBBox:!0}).height)})),r<=e?Tu(this.mainContainer).attr("height",r):Tu(this.mainContainer).attr("height","100%")}}getMainContainer(){return this.mainContainer}addHolderListeners(){const t=this.getHolder();t&&Tu(t).on("mouseover",(()=>{var t;null==(t=this.services.events)||t.dispatchEvent(R.Chart.MOUSEOVER)})).on("mouseout",(()=>{var t;null==(t=this.services.events)||t.dispatchEvent(R.Chart.MOUSEOUT)}))}addResizeListener(){const t=this.getHolder();if(!t)return;let e=t.clientWidth,n=t.clientHeight;const i=function(t,e,n){var i,r,o,s,a,l,c=0,u=!1,h=!1,d=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function f(e){var n=i,o=r;return i=r=void 0,c=e,s=t.apply(o,n)}function p(t){var n=t-l;return void 0===l||n>=e||n<0||h&&t-c>=o}function m(){var t=wu();if(p(t))return g(t);a=setTimeout(m,function(t){var n=e-(t-l);return h?Eu(n,o-(t-c)):n}(t))}function g(t){return a=void 0,d&&i?f(t):(i=r=void 0,s)}function v(){var t=wu(),n=p(t);if(i=arguments,r=this,l=t,n){if(void 0===a)return function(t){return c=t,a=setTimeout(m,e),u?f(t):s}(l);if(h)return clearTimeout(a),a=setTimeout(m,e),f(l)}return void 0===a&&(a=setTimeout(m,e)),s}return e=bu(e)||0,zt(n)&&(u=!!n.leading,o=(h="maxWait"in n)?xu(bu(n.maxWait)||0,e):o,d="trailing"in n?!!n.trailing:d),v.cancel=function(){void 0!==a&&clearTimeout(a),c=0,i=l=r=a=void 0},v.flush=function(){return void 0===a?s:g(wu())},v}((()=>{var i;t&&(Math.abs(e-t.clientWidth)>1||Math.abs(n-t.clientHeight)>1)&&(e=t.clientWidth,n=t.clientHeight,null==(i=this.services.events)||i.dispatchEvent(R.Chart.RESIZE))}),12.5);new ResizeObserver(i).observe(t)}},Bf=class t extends Nf{static appendOrUpdateLinearGradient(t){let e=t.svg.select(`defs linearGradient#${t.id}`);e.empty()&&(e=t.svg.append("defs").append("linearGradient").attr("id",t.id).attr("x1",t.x1).attr("x2",t.x2).attr("y1",t.y1).attr("y2",t.y2)),e.selectAll("stop").remove(),e.selectAll("stop").data(t.stops).enter().append("stop").attr("offset",(t=>t.offset)).style("stop-color",(t=>t.color)).style("stop-opacity",(t=>t.opacity))}static getOffsetRatio(t){return(100*Math.abs(t[1])/Math.abs(t[0]-t[1])).toFixed(2)+"%"}static getStops(e,n){let i=[{offset:"0%",color:n,opacity:"0.6"},{offset:"80%",color:n,opacity:"0"}];return e[0]<0&&e[1]>0&&(i=[{offset:"0%",color:n,opacity:"0.6"},{offset:t.getOffsetRatio(e),color:n,opacity:"0"},{offset:"100%",color:n,opacity:"0.6"}]),i}};var $f=function(t){return function(e){return null==t?void 0:t[e]}}({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),Hf=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ff=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g"),zf=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,jf=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Vf="\\ud800-\\udfff",Gf="\\u2700-\\u27bf",Wf="a-z\\xdf-\\xf6\\xf8-\\xff",Yf="A-Z\\xc0-\\xd6\\xd8-\\xde",Zf="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",qf="["+Zf+"]",Xf="\\d+",Kf="["+Gf+"]",Qf="["+Wf+"]",Jf="[^"+Vf+Zf+Xf+Gf+Wf+Yf+"]",tp="(?:\\ud83c[\\udde6-\\uddff]){2}",ep="[\\ud800-\\udbff][\\udc00-\\udfff]",np="["+Yf+"]",ip="(?:"+Qf+"|"+Jf+")",rp="(?:"+np+"|"+Jf+")",op="(?:['’](?:d|ll|m|re|s|t|ve))?",sp="(?:['’](?:D|LL|M|RE|S|T|VE))?",ap="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",lp="[\\ufe0e\\ufe0f]?",cp=lp+ap+"(?:\\u200d(?:"+["[^"+Vf+"]",tp,ep].join("|")+")"+lp+ap+")*",up="(?:"+[Kf,tp,ep].join("|")+")"+cp,hp=RegExp([np+"?"+Qf+"+"+op+"(?="+[qf,np,"$"].join("|")+")",rp+"+"+sp+"(?="+[qf,np+ip,"$"].join("|")+")",np+"?"+ip+"+"+op,np+"+"+sp,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Xf,up].join("|"),"g");var dp=RegExp("['’]","g");function fp(t){return function(e){return function(t,e,n){for(var i=-1,r=null==t?0:t.length;++i<r;)n=e(n,t[i],i,t);return n}(function(t,e){return t=_n(t),void 0===e?function(t){return jf.test(t)}(t)?function(t){return t.match(hp)||[]}(t):function(t){return t.match(zf)||[]}(t):t.match(e)||[]}(function(t){return(t=_n(t))&&t.replace(Hf,$f).replace(Ff,"")}(e).replace(dp,"")),t,"")}}function pp(t,e){var n;return qc(t,(function(t,i,r){return!(n=e(t,i,r))})),!!n}function mp(t,e,n){return(Bt(t)?Ai:pp)(t,Vi(e))}xe((function(t,e,n){return function(t,e,n){if("function"!=typeof t)throw new TypeError("Expected a function");return setTimeout((function(){t.apply(void 0,n)}),e)}(t,bu(e)||0,n)})),fp((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}));class gp{constructor(){this._partials=new Float64Array(32),this._n=0}add(t){const e=this._partials;let n=0;for(let i=0;i<this._n&&i<32;i++){const r=e[i],o=t+r,s=Math.abs(t)<Math.abs(r)?t-(o-r):r-(o-t);s&&(e[n++]=s),t=o}return e[n]=t,this._n=n+1,this}valueOf(){const t=this._partials;let e,n,i,r=this._n,o=0;if(r>0){for(o=t[--r];r>0&&(e=o,n=t[--r],o=e+n,i=n-(o-e),!i););r>0&&(i<0&&t[r-1]<0||i>0&&t[r-1]>0)&&(n=2*i,e=o+n,n==e-o&&(o=e))}return o}}function vp(t){return t}var yp=1e-6;function _p(t){return"translate("+t+",0)"}function bp(t){return"translate(0,"+t+")"}function wp(t){return e=>+t(e)}function xp(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function Ep(){return!this.__axis}function Tp(t,e){var n=[],i=null,r=null,o=6,s=6,a=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,c=1===t||4===t?-1:1,u=4===t||2===t?"x":"y",h=1===t||3===t?_p:bp;function d(d){var f=i??(e.ticks?e.ticks.apply(e,n):e.domain()),p=r??(e.tickFormat?e.tickFormat.apply(e,n):vp),m=Math.max(o,0)+a,g=e.range(),v=+g[0]+l,y=+g[g.length-1]+l,_=(e.bandwidth?xp:wp)(e.copy(),l),b=d.selection?d.selection():d,w=b.selectAll(".domain").data([null]),x=b.selectAll(".tick").data(f,e).order(),E=x.exit(),T=x.enter().append("g").attr("class","tick"),S=x.select("line"),O=x.select("text");w=w.merge(w.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),x=x.merge(T),S=S.merge(T.append("line").attr("stroke","currentColor").attr(u+"2",c*o)),O=O.merge(T.append("text").attr("fill","currentColor").attr(u,c*m).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),d!==b&&(w=w.transition(d),x=x.transition(d),S=S.transition(d),O=O.transition(d),E=E.transition(d).attr("opacity",yp).attr("transform",(function(t){return isFinite(t=_(t))?h(t+l):this.getAttribute("transform")})),T.attr("opacity",yp).attr("transform",(function(t){var e=this.parentNode.__axis;return h((e&&isFinite(e=e(t))?e:_(t))+l)}))),E.remove(),w.attr("d",4===t||2===t?s?"M"+c*s+","+v+"H"+l+"V"+y+"H"+c*s:"M"+l+","+v+"V"+y:s?"M"+v+","+c*s+"V"+l+"H"+y+"V"+c*s:"M"+v+","+l+"H"+y),x.attr("opacity",1).attr("transform",(function(t){return h(_(t)+l)})),S.attr(u+"2",c*o),O.attr(u,c*m).text(p),b.filter(Ep).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),b.each((function(){this.__axis=_}))}return d.scale=function(t){return arguments.length?(e=t,d):e},d.ticks=function(){return n=Array.from(arguments),d},d.tickArguments=function(t){return arguments.length?(n=null==t?[]:Array.from(t),d):n.slice()},d.tickValues=function(t){return arguments.length?(i=null==t?null:Array.from(t),d):i&&i.slice()},d.tickFormat=function(t){return arguments.length?(r=t,d):r},d.tickSize=function(t){return arguments.length?(o=s=+t,d):o},d.tickSizeInner=function(t){return arguments.length?(o=+t,d):o},d.tickSizeOuter=function(t){return arguments.length?(s=+t,d):s},d.tickPadding=function(t){return arguments.length?(a=+t,d):a},d.offset=function(t){return arguments.length?(l=+t,d):l},d}function Sp(t){return Tp(1,t)}function Op(t){return Tp(2,t)}function Mp(t){return Tp(3,t)}function Ap(t){return Tp(4,t)}const Cp={capture:!0,passive:!1};function kp(t){t.preventDefault(),t.stopImmediatePropagation()}const Dp=t=>+t,Lp=t=>()=>t;function Rp(t,{sourceEvent:e,target:n,selection:i,mode:r,dispatch:o}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},selection:{value:i,enumerable:!0,configurable:!0},mode:{value:r,enumerable:!0,configurable:!0},_:{value:o}})}function Ip(t){t.preventDefault(),t.stopImmediatePropagation()}var Pp={name:"drag"},Np={name:"space"},Up={name:"handle"},Bp={name:"center"};const{abs:$p,max:Hp,min:Fp}=Math;function zp(t){return[+t[0],+t[1]]}function jp(t){return[zp(t[0]),zp(t[1])]}var Vp={name:"x",handles:["w","e"].map(Kp),input:function(t,e){return null==t?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},Gp={},Wp={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Yp={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},Zp={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},qp={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},Xp={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Kp(t){return{type:t}}function Qp(t){return!t.ctrlKey&&!t.button}function Jp(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function tm(){return navigator.maxTouchPoints||"ontouchstart"in this}function em(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function nm(){return function(t){var e,n=Jp,i=Qp,r=tm,o=!0,s=wr("start","brush","end"),a=6;function l(e){var n=e.property("__brush",m).selectAll(".overlay").data([Kp("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Wp.overlay).merge(n).each((function(){var t=em(this).extent;Tu(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])})),e.selectAll(".selection").data([Kp("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Wp.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var i=e.selectAll(".handle").data(t.handles,(function(t){return t.type}));i.exit().remove(),i.enter().append("rect").attr("class",(function(t){return"handle handle--"+t.type})).attr("cursor",(function(t){return Wp[t.type]})),e.each(c).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",d).filter(r).on("touchstart.brush",d).on("touchmove.brush",f).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function c(){var t=Tu(this),e=em(this).selection;e?(t.selectAll(".selection").style("display",null).attr("x",e[0][0]).attr("y",e[0][1]).attr("width",e[1][0]-e[0][0]).attr("height",e[1][1]-e[0][1]),t.selectAll(".handle").style("display",null).attr("x",(function(t){return"e"===t.type[t.type.length-1]?e[1][0]-a/2:e[0][0]-a/2})).attr("y",(function(t){return"s"===t.type[0]?e[1][1]-a/2:e[0][1]-a/2})).attr("width",(function(t){return"n"===t.type||"s"===t.type?e[1][0]-e[0][0]+a:a})).attr("height",(function(t){return"e"===t.type||"w"===t.type?e[1][1]-e[0][1]+a:a}))):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function u(t,e,n){var i=t.__brush.emitter;return!i||n&&i.clean?new h(t,e,n):i}function h(t,e,n){this.that=t,this.args=e,this.state=t.__brush,this.active=0,this.clean=n}function d(n){if((!e||n.touches)&&i.apply(this,arguments)){var r,s,a,l,h,d,f,p,m,g,v,y=this,_=n.target.__data__.type,b="selection"===(o&&n.metaKey?_="overlay":_)?Pp:o&&n.altKey?Bp:Up,w=t===Gp?null:qp[_],x=t===Vp?null:Xp[_],E=em(y),T=E.extent,S=E.selection,O=T[0][0],M=T[0][1],A=T[1][0],C=T[1][1],k=0,D=0,L=w&&x&&o&&n.shiftKey,R=Array.from(n.touches||[n],(t=>{const e=t.identifier;return(t=Uo(t,y)).point0=t.slice(),t.identifier=e,t}));la(y);var I=u(y,arguments,!0).beforestart();if("overlay"===_){S&&(m=!0);const e=[R[0],R[1]||R[0]];E.selection=S=[[r=t===Gp?O:Fp(e[0][0],e[1][0]),a=t===Vp?M:Fp(e[0][1],e[1][1])],[h=t===Gp?A:Hp(e[0][0],e[1][0]),f=t===Vp?C:Hp(e[0][1],e[1][1])]],R.length>1&&$(n)}else r=S[0][0],a=S[0][1],h=S[1][0],f=S[1][1];s=r,l=a,d=h,p=f;var P=Tu(y).attr("pointer-events","none"),N=P.selectAll(".overlay").attr("cursor",Wp[_]);if(n.touches)I.moved=B,I.ended=H;else{var U=Tu(n.view).on("mousemove.brush",B,!0).on("mouseup.brush",H,!0);o&&U.on("keydown.brush",(function(t){switch(t.keyCode){case 16:L=w&&x;break;case 18:b===Up&&(w&&(h=d-k*w,r=s+k*w),x&&(f=p-D*x,a=l+D*x),b=Bp,$(t));break;case 32:(b===Up||b===Bp)&&(w<0?h=d-k:w>0&&(r=s-k),x<0?f=p-D:x>0&&(a=l-D),b=Np,N.attr("cursor",Wp.selection),$(t));break;default:return}Ip(t)}),!0).on("keyup.brush",(function(t){switch(t.keyCode){case 16:L&&(g=v=L=!1,$(t));break;case 18:b===Bp&&(w<0?h=d:w>0&&(r=s),x<0?f=p:x>0&&(a=l),b=Up,$(t));break;case 32:b===Np&&(t.altKey?(w&&(h=d-k*w,r=s+k*w),x&&(f=p-D*x,a=l+D*x),b=Bp):(w<0?h=d:w>0&&(r=s),x<0?f=p:x>0&&(a=l),b=Up),N.attr("cursor",Wp[_]),$(t));break;default:return}Ip(t)}),!0),function(t){var e=t.document.documentElement,n=Tu(t).on("dragstart.drag",kp,Cp);"onselectstart"in e?n.on("selectstart.drag",kp,Cp):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}(n.view)}c.call(y),I.start(n,b.name)}function B(t){for(const e of t.changedTouches||[t])for(const t of R)t.identifier===e.identifier&&(t.cur=Uo(e,y));if(L&&!g&&!v&&1===R.length){const t=R[0];$p(t.cur[0]-t[0])>$p(t.cur[1]-t[1])?v=!0:g=!0}for(const t of R)t.cur&&(t[0]=t.cur[0],t[1]=t.cur[1]);m=!0,Ip(t),$(t)}function $(t){const e=R[0],n=e.point0;var i;switch(k=e[0]-n[0],D=e[1]-n[1],b){case Np:case Pp:w&&(k=Hp(O-r,Fp(A-h,k)),s=r+k,d=h+k),x&&(D=Hp(M-a,Fp(C-f,D)),l=a+D,p=f+D);break;case Up:R[1]?(w&&(s=Hp(O,Fp(A,R[0][0])),d=Hp(O,Fp(A,R[1][0])),w=1),x&&(l=Hp(M,Fp(C,R[0][1])),p=Hp(M,Fp(C,R[1][1])),x=1)):(w<0?(k=Hp(O-r,Fp(A-r,k)),s=r+k,d=h):w>0&&(k=Hp(O-h,Fp(A-h,k)),s=r,d=h+k),x<0?(D=Hp(M-a,Fp(C-a,D)),l=a+D,p=f):x>0&&(D=Hp(M-f,Fp(C-f,D)),l=a,p=f+D));break;case Bp:w&&(s=Hp(O,Fp(A,r-k*w)),d=Hp(O,Fp(A,h+k*w))),x&&(l=Hp(M,Fp(C,a-D*x)),p=Hp(M,Fp(C,f+D*x)))}d<s&&(w*=-1,i=r,r=h,h=i,i=s,s=d,d=i,_ in Yp&&N.attr("cursor",Wp[_=Yp[_]])),p<l&&(x*=-1,i=a,a=f,f=i,i=l,l=p,p=i,_ in Zp&&N.attr("cursor",Wp[_=Zp[_]])),E.selection&&(S=E.selection),g&&(s=S[0][0],d=S[1][0]),v&&(l=S[0][1],p=S[1][1]),(S[0][0]!==s||S[0][1]!==l||S[1][0]!==d||S[1][1]!==p)&&(E.selection=[[s,l],[d,p]],c.call(y),I.brush(t,b.name))}function H(t){if(function(t){t.stopImmediatePropagation()}(t),t.touches){if(t.touches.length)return;e&&clearTimeout(e),e=setTimeout((function(){e=null}),500)}else(function(t,e){var n=t.document.documentElement,i=Tu(t).on("dragstart.drag",null);e&&(i.on("click.drag",kp,Cp),setTimeout((function(){i.on("click.drag",null)}),0)),"onselectstart"in n?i.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)})(t.view,m),U.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);P.attr("pointer-events","all"),N.attr("cursor",Wp.overlay),E.selection&&(S=E.selection),function(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}(S)&&(E.selection=null,c.call(y)),I.end(t,b.name)}}function f(t){u(this,arguments).moved(t)}function p(t){u(this,arguments).ended(t)}function m(){var e=this.__brush||{selection:null};return e.extent=jp(n.apply(this,arguments)),e.dim=t,e}return l.move=function(e,n,i){e.tween?e.on("start.brush",(function(t){u(this,arguments).beforestart().start(t)})).on("interrupt.brush end.brush",(function(t){u(this,arguments).end(t)})).tween("brush",(function(){var e=this,i=e.__brush,r=u(e,arguments),o=i.selection,s=t.input("function"==typeof n?n.apply(this,arguments):n,i.extent),a=Cs(o,s);function l(t){i.selection=1===t&&null===s?null:a(t),c.call(e),r.brush()}return null!==o&&null!==s?l:l(1)})):e.each((function(){var e=this,r=arguments,o=e.__brush,s=t.input("function"==typeof n?n.apply(e,r):n,o.extent),a=u(e,r).beforestart();la(e),o.selection=null===s?null:s,c.call(e),a.start(i).brush(i).end(i)}))},l.clear=function(t,e){l.move(t,null,e)},h.prototype={beforestart:function(){return 1===++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(t,e){return this.starting?(this.starting=!1,this.emit("start",t,e)):this.emit("brush",t),this},brush:function(t,e){return this.emit("brush",t,e),this},end:function(t,e){return 0===--this.active&&(delete this.state.emitter,this.emit("end",t,e)),this},emit:function(e,n,i){var r=Tu(this.that).datum();s.call(e,this.that,new Rp(e,{sourceEvent:n,target:l,selection:t.output(this.state.selection),mode:i,dispatch:s}),r)}},l.extent=function(t){return arguments.length?(n="function"==typeof t?t:Lp(jp(t)),l):n},l.filter=function(t){return arguments.length?(i="function"==typeof t?t:Lp(!!t),l):i},l.touchable=function(t){return arguments.length?(r="function"==typeof t?t:Lp(!!t),l):r},l.handleSize=function(t){return arguments.length?(a=+t,l):a},l.keyModifiers=function(t){return arguments.length?(o=!!t,l):o},l.on=function(){var t=s.on.apply(s,arguments);return t===s?l:t},l}(Vp)}const im=Math.PI,rm=2*im,om=1e-6,sm=rm-om;function am(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}let lm=class{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?am:function(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return am;const n=10**e;return function(t){this._+=t[0];for(let e=1,i=t.length;e<i;++e)this._+=Math.round(arguments[e]*n)/n+t[e]}}(t)}moveTo(t,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,e){this._append`L${this._x1=+t},${this._y1=+e}`}quadraticCurveTo(t,e,n,i){this._append`Q${+t},${+e},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(t,e,n,i,r,o){this._append`C${+t},${+e},${+n},${+i},${this._x1=+r},${this._y1=+o}`}arcTo(t,e,n,i,r){if(t=+t,e=+e,n=+n,i=+i,(r=+r)<0)throw new Error(`negative radius: ${r}`);let o=this._x1,s=this._y1,a=n-t,l=i-e,c=o-t,u=s-e,h=c*c+u*u;if(null===this._x1)this._append`M${this._x1=t},${this._y1=e}`;else if(h>om)if(Math.abs(u*a-l*c)>om&&r){let d=n-o,f=i-s,p=a*a+l*l,m=d*d+f*f,g=Math.sqrt(p),v=Math.sqrt(h),y=r*Math.tan((im-Math.acos((p+h-m)/(2*g*v)))/2),_=y/v,b=y/g;Math.abs(_-1)>om&&this._append`L${t+_*c},${e+_*u}`,this._append`A${r},${r},0,0,${+(u*d>c*f)},${this._x1=t+b*a},${this._y1=e+b*l}`}else this._append`L${this._x1=t},${this._y1=e}`}arc(t,e,n,i,r,o){if(t=+t,e=+e,o=!!o,(n=+n)<0)throw new Error(`negative radius: ${n}`);let s=n*Math.cos(i),a=n*Math.sin(i),l=t+s,c=e+a,u=1^o,h=o?i-r:r-i;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>om||Math.abs(this._y1-c)>om)&&this._append`L${l},${c}`,n&&(h<0&&(h=h%rm+rm),h>sm?this._append`A${n},${n},0,1,${u},${t-s},${e-a}A${n},${n},0,1,${u},${this._x1=l},${this._y1=c}`:h>om&&this._append`A${n},${n},0,${+(h>=im)},${u},${this._x1=t+n*Math.cos(r)},${this._y1=e+n*Math.sin(r)}`)}rect(t,e,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}};var cm=Math.PI,um=2*cm,hm=cm/180,dm=Math.abs,fm=(Math.atan,Math.atan2,Math.cos),pm=(Math.exp,Math.log,Math.sin,Math.sign,Math.sqrt);Math.tan;function mm(t,e){return dm(t)>cm&&(t-=Math.round(t/um)*um),[t,e]}function gm(){}function vm(t,e){return[t,e]}mm.invert=mm,new gp,new gp,new gp,gm.prototype={constructor:gm,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},fm(30*hm),vm.invert=vm;pm(3);function ym(t){var e=0,n=t.children,i=n&&n.length;if(i)for(;--i>=0;)e+=n[i].value;else e=1;t.value=e}function _m(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=wm)):void 0===e&&(e=bm);for(var n,i,r,o,s,a=new Tm(t),l=[a];n=l.pop();)if((r=e(n.data))&&(s=(r=Array.from(r)).length))for(n.children=r,o=s-1;o>=0;--o)l.push(i=r[o]=new Tm(r[o])),i.parent=n,i.depth=n.depth+1;return a.eachBefore(Em)}function bm(t){return t.children}function wm(t){return Array.isArray(t)?t[1]:null}function xm(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function Em(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function Tm(t){this.data=t,this.depth=this.height=0,this.parent=null}function Sm(t,e,n,i,r){for(var o,s=t.children,a=-1,l=s.length,c=t.value&&(i-e)/t.value;++a<l;)(o=s[a]).y0=n,o.y1=r,o.x0=e,o.x1=e+=o.value*c}function Om(t,e,n,i,r){for(var o,s=t.children,a=-1,l=s.length,c=t.value&&(r-n)/t.value;++a<l;)(o=s[a]).x0=e,o.x1=i,o.y0=n,o.y1=n+=o.value*c}function Mm(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(null==n)e=null;else{const t=Math.floor(n);if(!(t>=0))throw new RangeError(`invalid digits: ${n}`);e=t}return t},()=>new lm(e)}function Am(t){return t.innerRadius}function Cm(t){return t.outerRadius}function km(t){return t.startAngle}function Dm(t){return t.endAngle}function Lm(t){return t&&t.padAngle}function Rm(t,e,n,i,r,o,s){var a=t-n,l=e-i,c=(s?o:-o)/Wd(a*a+l*l),u=c*l,h=-c*a,d=t+u,f=e+h,p=n+u,m=i+h,g=(d+p)/2,v=(f+m)/2,y=p-d,_=m-f,b=y*y+_*_,w=r-o,x=d*m-p*f,E=(_<0?-1:1)*Wd(jd(0,w*w*b-x*x)),T=(x*_-y*E)/b,S=(-x*y-_*E)/b,O=(x*_+y*E)/b,M=(-x*y+_*E)/b,A=T-g,C=S-v,k=O-g,D=M-v;return A*A+C*C>k*k+D*D&&(T=O,S=M),{cx:T,cy:S,x01:-u,y01:-h,x11:T*(r/w-1),y11:S*(r/w-1)}}function Im(t){return t[0]}function Pm(t){return t[1]}function Nm(t,e){var n=Xc(!0),i=null,r=Jd,o=null,s=Mm(a);function a(a){var l,c,u,h=(a=Kc(a)).length,d=!1;for(null==i&&(o=r(u=s())),l=0;l<=h;++l)!(l<h&&n(c=a[l],l,a))===d&&((d=!d)?o.lineStart():o.lineEnd()),d&&o.point(+t(c,l,a),+e(c,l,a));if(u)return o=null,u+""||null}return t="function"==typeof t?t:void 0===t?Im:Xc(t),e="function"==typeof e?e:void 0===e?Pm:Xc(e),a.x=function(e){return arguments.length?(t="function"==typeof e?e:Xc(+e),a):t},a.y=function(t){return arguments.length?(e="function"==typeof t?t:Xc(+t),a):e},a.defined=function(t){return arguments.length?(n="function"==typeof t?t:Xc(!!t),a):n},a.curve=function(t){return arguments.length?(r=t,null!=i&&(o=r(i)),a):r},a.context=function(t){return arguments.length?(null==t?i=o=null:o=r(i=t),a):i},a}function Um(t,e,n){var i=null,r=Xc(!0),o=null,s=Jd,a=null,l=Mm(c);function c(c){var u,h,d,f,p,m=(c=Kc(c)).length,g=!1,v=new Array(m),y=new Array(m);for(null==o&&(a=s(p=l())),u=0;u<=m;++u){if(!(u<m&&r(f=c[u],u,c))===g)if(g=!g)h=u,a.areaStart(),a.lineStart();else{for(a.lineEnd(),a.lineStart(),d=u-1;d>=h;--d)a.point(v[d],y[d]);a.lineEnd(),a.areaEnd()}g&&(v[u]=+t(f,u,c),y[u]=+e(f,u,c),a.point(i?+i(f,u,c):v[u],n?+n(f,u,c):y[u]))}if(p)return a=null,p+""||null}function u(){return Nm().defined(r).curve(s).context(o)}return t="function"==typeof t?t:void 0===t?Im:Xc(+t),e="function"==typeof e?e:Xc(void 0===e?0:+e),n="function"==typeof n?n:void 0===n?Pm:Xc(+n),c.x=function(e){return arguments.length?(t="function"==typeof e?e:Xc(+e),i=null,c):t},c.x0=function(e){return arguments.length?(t="function"==typeof e?e:Xc(+e),c):t},c.x1=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:Xc(+t),c):i},c.y=function(t){return arguments.length?(e="function"==typeof t?t:Xc(+t),n=null,c):e},c.y0=function(t){return arguments.length?(e="function"==typeof t?t:Xc(+t),c):e},c.y1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:Xc(+t),c):n},c.lineX0=c.lineY0=function(){return u().x(t).y(e)},c.lineY1=function(){return u().x(t).y(n)},c.lineX1=function(){return u().x(i).y(e)},c.defined=function(t){return arguments.length?(r="function"==typeof t?t:Xc(!!t),c):r},c.curve=function(t){return arguments.length?(s=t,null!=o&&(a=s(o)),c):s},c.context=function(t){return arguments.length?(null==t?o=a=null:a=s(o=t),c):o},c}function Bm(t){this._curve=t}Tm.prototype=_m.prototype={constructor:Tm,count:function(){return this.eachAfter(ym)},each:function(t,e){let n=-1;for(const i of this)t.call(e,i,++n,this);return this},eachAfter:function(t,e){for(var n,i,r,o=this,s=[o],a=[],l=-1;o=s.pop();)if(a.push(o),n=o.children)for(i=0,r=n.length;i<r;++i)s.push(n[i]);for(;o=a.pop();)t.call(e,o,++l,this);return this},eachBefore:function(t,e){for(var n,i,r=this,o=[r],s=-1;r=o.pop();)if(t.call(e,r,++s,this),n=r.children)for(i=n.length-1;i>=0;--i)o.push(n[i]);return this},find:function(t,e){let n=-1;for(const i of this)if(t.call(e,i,++n,this))return i},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,i=e.children,r=i&&i.length;--r>=0;)n+=i[r].value;e.value=n}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),i=e.ancestors(),r=null;for(t=n.pop(),e=i.pop();t===e;)r=t,t=n.pop(),e=i.pop();return r}(e,t),i=[e];e!==n;)e=e.parent,i.push(e);for(var r=i.length;t!==n;)i.splice(r,0,t),t=t.parent;return i},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function(){return _m(this).eachBefore(xm)},[Symbol.iterator]:function*(){var t,e,n,i,r=this,o=[r];do{for(t=o.reverse(),o=[];r=t.pop();)if(yield r,e=r.children)for(n=0,i=e.length;n<i;++n)o.push(e[n])}while(o.length)}},Object.create(Tm.prototype),function t(e){function n(t,n,i,r,o){!function(t,e,n,i,r,o){for(var s,a,l,c,u,h,d,f,p,m,g,v=[],y=e.children,_=0,b=0,w=y.length,x=e.value;_<w;){l=r-n,c=o-i;do{u=y[b++].value}while(!u&&b<w);for(h=d=u,g=u*u*(m=Math.max(c/l,l/c)/(x*t)),p=Math.max(d/g,g/h);b<w;++b){if(u+=a=y[b].value,a<h&&(h=a),a>d&&(d=a),g=u*u*m,(f=Math.max(d/g,g/h))>p){u-=a;break}p=f}v.push(s={value:u,dice:l<c,children:y.slice(_,b)}),s.dice?Sm(s,n,i,r,x?i+=c*u/x:o):Om(s,n,i,x?n+=l*u/x:r,o),x-=u,_=b}}(e,t,n,i,r,o)}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}((1+Math.sqrt(5))/2),function(t){function e(e){return new Bm(t(e))}e._curve=t}(Jd),Bm.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};let $m=class{constructor(t,e,n){if(this.type="",this.renderType=I.HTML,this.id="",this.parent=void 0,this.configs={},this.model=t,this.services=e,n&&(this.configs=n,this.configs.id)){const t=dc(this.model.getOptions(),"style","prefix");this.id=`${t}--${this.configs.id}`}this.parent||this.setParent(Tu(this.services.domUtils.getMainContainer()))}init(){}render(t=!0){console.error("Error: Component did not provide the required render function.")}destroy(){}setModel(t){this.model=t}setServices(t){this.services=t}setParent(t){var e;const n=this.parent;if(this.parent=t,(!n||n.node()!==t.node())&&this.type){const t=dc(this.model.getOptions(),"style","prefix");null==(e=this.parent)||e.classed(`${cl}--${t}--${this.type}`,!0),n&&n.classed(`${cl}--${t}--${this.type}`,!1)}}getParent(){return this.parent}getComponentContainer(t={ariaLabel:null,isPresentational:!1,withinChartClip:!1}){if(this.type){const e=dc(this.model.getOptions(),"style","prefix"),n=this.id?`#${this.id}`:"",i=Uf.appendOrSelect(this.parent,`${this.renderType===I.SVG?"svg":"div"}${n}.${cl}--${e}--${this.type}`);if(t.ariaLabel&&i.attr("aria-label",t.ariaLabel),t.isPresentational&&i.attr("role","presentation"),t.withinChartClip){const t=this.model.get("chartClipId");if(t){const e=Tu(`#${t}`).select("rect");0!==e.size()&&parseFloat(e.attr("height"))>0&&i.attr("clip-path",`url(#${t})`)}}return i.attr("width","100%").attr("height","100%")}return this.parent}getOptions(){return this.configs.options?Qi({},this.model.getOptions(),this.configs.options):this.model.getOptions()}};const{entries:Hm,setPrototypeOf:Fm,isFrozen:zm,getPrototypeOf:jm,getOwnPropertyDescriptor:Vm}=Object;let{freeze:Gm,seal:Wm,create:Ym}=Object,{apply:Zm,construct:qm}=typeof Reflect<"u"&&Reflect;Gm||(Gm=function(t){return t}),Wm||(Wm=function(t){return t}),Zm||(Zm=function(t,e,n){return t.apply(e,n)}),qm||(qm=function(t,e){return new t(...e)});const Xm=ug(Array.prototype.forEach),Km=ug(Array.prototype.lastIndexOf),Qm=ug(Array.prototype.pop),Jm=ug(Array.prototype.push),tg=ug(Array.prototype.splice),eg=ug(String.prototype.toLowerCase),ng=ug(String.prototype.toString),ig=ug(String.prototype.match),rg=ug(String.prototype.replace),og=ug(String.prototype.indexOf),sg=ug(String.prototype.trim),ag=ug(Object.prototype.hasOwnProperty),lg=ug(RegExp.prototype.test),cg=function(t){return function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return qm(t,n)}}(TypeError);function ug(t){return function(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return Zm(t,e,i)}}function hg(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:eg;Fm&&Fm(t,null);let i=e.length;for(;i--;){let r=e[i];if("string"==typeof r){const t=n(r);t!==r&&(zm(e)||(e[i]=t),r=t)}t[r]=!0}return t}function dg(t){for(let e=0;e<t.length;e++)ag(t,e)||(t[e]=null);return t}function fg(t){const e=Ym(null);for(const[n,i]of Hm(t))ag(t,n)&&(Array.isArray(i)?e[n]=dg(i):i&&"object"==typeof i&&i.constructor===Object?e[n]=fg(i):e[n]=i);return e}function pg(t,e){for(;null!==t;){const n=Vm(t,e);if(n){if(n.get)return ug(n.get);if("function"==typeof n.value)return ug(n.value)}t=jm(t)}return function(){return null}}const mg=Gm(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),gg=Gm(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),vg=Gm(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),yg=Gm(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),_g=Gm(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),bg=Gm(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),wg=Gm(["#text"]),xg=Gm(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Eg=Gm(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Tg=Gm(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Sg=Gm(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Og=Wm(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Mg=Wm(/<%[\w\W]*|[\w\W]*%>/gm),Ag=Wm(/\$\{[\w\W]*/gm),Cg=Wm(/^data-[\-\w.\u00B7-\uFFFF]+$/),kg=Wm(/^aria-[\-\w]+$/),Dg=Wm(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Lg=Wm(/^(?:\w+script|data):/i),Rg=Wm(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ig=Wm(/^html$/i),Pg=Wm(/^[a-z][.\w]*(-[.\w]+)+$/i);var Ng=Object.freeze({__proto__:null,ARIA_ATTR:kg,ATTR_WHITESPACE:Rg,CUSTOM_ELEMENT:Pg,DATA_ATTR:Cg,DOCTYPE_NAME:Ig,ERB_EXPR:Mg,IS_ALLOWED_URI:Dg,IS_SCRIPT_OR_DATA:Lg,MUSTACHE_EXPR:Og,TMPLIT_EXPR:Ag});var Ug=function t(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:typeof window>"u"?null:window;const n=e=>t(e);if(n.version="3.2.4",n.removed=[],!e||!e.document||9!==e.document.nodeType||!e.Element)return n.isSupported=!1,n;let{document:i}=e;const r=i,o=r.currentScript,{DocumentFragment:s,HTMLTemplateElement:a,Node:l,Element:c,NodeFilter:u,NamedNodeMap:h=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:f,trustedTypes:p}=e,m=c.prototype,g=pg(m,"cloneNode"),v=pg(m,"remove"),y=pg(m,"nextSibling"),_=pg(m,"childNodes"),b=pg(m,"parentNode");if("function"==typeof a){const t=i.createElement("template");t.content&&t.content.ownerDocument&&(i=t.content.ownerDocument)}let w,x="";const{implementation:E,createNodeIterator:T,createDocumentFragment:S,getElementsByTagName:O}=i,{importNode:M}=r;let A={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof Hm&&"function"==typeof b&&E&&void 0!==E.createHTMLDocument;const{MUSTACHE_EXPR:C,ERB_EXPR:k,TMPLIT_EXPR:D,DATA_ATTR:L,ARIA_ATTR:R,IS_SCRIPT_OR_DATA:I,ATTR_WHITESPACE:P,CUSTOM_ELEMENT:N}=Ng;let{IS_ALLOWED_URI:U}=Ng,B=null;const $=hg({},[...mg,...gg,...vg,..._g,...wg]);let H=null;const F=hg({},[...xg,...Eg,...Tg,...Sg]);let z=Object.seal(Ym(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),j=null,V=null,G=!0,W=!0,Y=!1,Z=!0,q=!1,X=!0,K=!1,Q=!1,J=!1,tt=!1,et=!1,nt=!1,it=!0,rt=!1,ot=!0,st=!1,at={},lt=null;const ct=hg({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ut=null;const ht=hg({},["audio","video","img","source","image","track"]);let dt=null;const ft=hg({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),pt="http://www.w3.org/1998/Math/MathML",mt="http://www.w3.org/2000/svg",gt="http://www.w3.org/1999/xhtml";let vt=gt,yt=!1,_t=null;const bt=hg({},[pt,mt,gt],ng);let wt=hg({},["mi","mo","mn","ms","mtext"]),xt=hg({},["annotation-xml"]);const Et=hg({},["title","style","font","a","script"]);let Tt=null;const St=["application/xhtml+xml","text/html"];let Ot=null,Mt=null;const At=i.createElement("form"),Ct=function(t){return t instanceof RegExp||t instanceof Function},kt=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Mt||Mt!==t){if((!t||"object"!=typeof t)&&(t={}),t=fg(t),Tt=-1===St.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,Ot="application/xhtml+xml"===Tt?ng:eg,B=ag(t,"ALLOWED_TAGS")?hg({},t.ALLOWED_TAGS,Ot):$,H=ag(t,"ALLOWED_ATTR")?hg({},t.ALLOWED_ATTR,Ot):F,_t=ag(t,"ALLOWED_NAMESPACES")?hg({},t.ALLOWED_NAMESPACES,ng):bt,dt=ag(t,"ADD_URI_SAFE_ATTR")?hg(fg(ft),t.ADD_URI_SAFE_ATTR,Ot):ft,ut=ag(t,"ADD_DATA_URI_TAGS")?hg(fg(ht),t.ADD_DATA_URI_TAGS,Ot):ht,lt=ag(t,"FORBID_CONTENTS")?hg({},t.FORBID_CONTENTS,Ot):ct,j=ag(t,"FORBID_TAGS")?hg({},t.FORBID_TAGS,Ot):{},V=ag(t,"FORBID_ATTR")?hg({},t.FORBID_ATTR,Ot):{},at=!!ag(t,"USE_PROFILES")&&t.USE_PROFILES,G=!1!==t.ALLOW_ARIA_ATTR,W=!1!==t.ALLOW_DATA_ATTR,Y=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Z=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,q=t.SAFE_FOR_TEMPLATES||!1,X=!1!==t.SAFE_FOR_XML,K=t.WHOLE_DOCUMENT||!1,tt=t.RETURN_DOM||!1,et=t.RETURN_DOM_FRAGMENT||!1,nt=t.RETURN_TRUSTED_TYPE||!1,J=t.FORCE_BODY||!1,it=!1!==t.SANITIZE_DOM,rt=t.SANITIZE_NAMED_PROPS||!1,ot=!1!==t.KEEP_CONTENT,st=t.IN_PLACE||!1,U=t.ALLOWED_URI_REGEXP||Dg,vt=t.NAMESPACE||gt,wt=t.MATHML_TEXT_INTEGRATION_POINTS||wt,xt=t.HTML_INTEGRATION_POINTS||xt,z=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&Ct(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(z.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&Ct(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(z.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(z.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),q&&(W=!1),et&&(tt=!0),at&&(B=hg({},wg),H=[],!0===at.html&&(hg(B,mg),hg(H,xg)),!0===at.svg&&(hg(B,gg),hg(H,Eg),hg(H,Sg)),!0===at.svgFilters&&(hg(B,vg),hg(H,Eg),hg(H,Sg)),!0===at.mathMl&&(hg(B,_g),hg(H,Tg),hg(H,Sg))),t.ADD_TAGS&&(B===$&&(B=fg(B)),hg(B,t.ADD_TAGS,Ot)),t.ADD_ATTR&&(H===F&&(H=fg(H)),hg(H,t.ADD_ATTR,Ot)),t.ADD_URI_SAFE_ATTR&&hg(dt,t.ADD_URI_SAFE_ATTR,Ot),t.FORBID_CONTENTS&&(lt===ct&&(lt=fg(lt)),hg(lt,t.FORBID_CONTENTS,Ot)),ot&&(B["#text"]=!0),K&&hg(B,["html","head","body"]),B.table&&(hg(B,["tbody"]),delete j.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw cg('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw cg('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=t.TRUSTED_TYPES_POLICY,x=w.createHTML("")}else void 0===w&&(w=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let n=null;const i="data-tt-policy-suffix";e&&e.hasAttribute(i)&&(n=e.getAttribute(i));const r="dompurify"+(n?"#"+n:"");try{return t.createPolicy(r,{createHTML:t=>t,createScriptURL:t=>t})}catch{return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(p,o)),null!==w&&"string"==typeof x&&(x=w.createHTML(""));Gm&&Gm(t),Mt=t}},Dt=hg({},[...gg,...vg,...yg]),Lt=hg({},[..._g,...bg]),Rt=function(t){Jm(n.removed,{element:t});try{b(t).removeChild(t)}catch{v(t)}},It=function(t,e){try{Jm(n.removed,{attribute:e.getAttributeNode(t),from:e})}catch{Jm(n.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t)if(tt||et)try{Rt(e)}catch{}else try{e.setAttribute(t,"")}catch{}},Pt=function(t){let e=null,n=null;if(J)t="<remove></remove>"+t;else{const e=ig(t,/^[\r\n\t ]+/);n=e&&e[0]}"application/xhtml+xml"===Tt&&vt===gt&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const r=w?w.createHTML(t):t;if(vt===gt)try{e=(new f).parseFromString(r,Tt)}catch{}if(!e||!e.documentElement){e=E.createDocument(vt,"template",null);try{e.documentElement.innerHTML=yt?x:r}catch{}}const o=e.body||e.documentElement;return t&&n&&o.insertBefore(i.createTextNode(n),o.childNodes[0]||null),vt===gt?O.call(e,K?"html":"body")[0]:K?e.documentElement:o},Nt=function(t){return T.call(t.ownerDocument||t,t,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},Ut=function(t){return t instanceof d&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof h)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},Bt=function(t){return"function"==typeof l&&t instanceof l};function $t(t,e,i){Xm(t,(t=>{t.call(n,e,i,Mt)}))}const Ht=function(t){let e=null;if($t(A.beforeSanitizeElements,t,null),Ut(t))return Rt(t),!0;const i=Ot(t.nodeName);if($t(A.uponSanitizeElement,t,{tagName:i,allowedTags:B}),t.hasChildNodes()&&!Bt(t.firstElementChild)&&lg(/<[/\w]/g,t.innerHTML)&&lg(/<[/\w]/g,t.textContent)||7===t.nodeType||X&&8===t.nodeType&&lg(/<[/\w]/g,t.data))return Rt(t),!0;if(!B[i]||j[i]){if(!j[i]&&zt(i)&&(z.tagNameCheck instanceof RegExp&&lg(z.tagNameCheck,i)||z.tagNameCheck instanceof Function&&z.tagNameCheck(i)))return!1;if(ot&&!lt[i]){const e=b(t)||t.parentNode,n=_(t)||t.childNodes;if(n&&e)for(let i=n.length-1;i>=0;--i){const r=g(n[i],!0);r.__removalCount=(t.__removalCount||0)+1,e.insertBefore(r,y(t))}}return Rt(t),!0}return t instanceof c&&!function(t){let e=b(t);(!e||!e.tagName)&&(e={namespaceURI:vt,tagName:"template"});const n=eg(t.tagName),i=eg(e.tagName);return!!_t[t.namespaceURI]&&(t.namespaceURI===mt?e.namespaceURI===gt?"svg"===n:e.namespaceURI===pt?"svg"===n&&("annotation-xml"===i||wt[i]):!!Dt[n]:t.namespaceURI===pt?e.namespaceURI===gt?"math"===n:e.namespaceURI===mt?"math"===n&&xt[i]:!!Lt[n]:t.namespaceURI===gt?!(e.namespaceURI===mt&&!xt[i]||e.namespaceURI===pt&&!wt[i])&&!Lt[n]&&(Et[n]||!Dt[n]):!("application/xhtml+xml"!==Tt||!_t[t.namespaceURI]))}(t)||("noscript"===i||"noembed"===i||"noframes"===i)&&lg(/<\/no(script|embed|frames)/i,t.innerHTML)?(Rt(t),!0):(q&&3===t.nodeType&&(e=t.textContent,Xm([C,k,D],(t=>{e=rg(e,t," ")})),t.textContent!==e&&(Jm(n.removed,{element:t.cloneNode()}),t.textContent=e)),$t(A.afterSanitizeElements,t,null),!1)},Ft=function(t,e,n){if(it&&("id"===e||"name"===e)&&(n in i||n in At))return!1;if((!W||V[e]||!lg(L,e))&&(!G||!lg(R,e)))if(!H[e]||V[e]){if(!(zt(t)&&(z.tagNameCheck instanceof RegExp&&lg(z.tagNameCheck,t)||z.tagNameCheck instanceof Function&&z.tagNameCheck(t))&&(z.attributeNameCheck instanceof RegExp&&lg(z.attributeNameCheck,e)||z.attributeNameCheck instanceof Function&&z.attributeNameCheck(e))||"is"===e&&z.allowCustomizedBuiltInElements&&(z.tagNameCheck instanceof RegExp&&lg(z.tagNameCheck,n)||z.tagNameCheck instanceof Function&&z.tagNameCheck(n))))return!1}else if(!dt[e]&&!lg(U,rg(n,P,""))&&("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==og(n,"data:")||!ut[t])&&(!Y||lg(I,rg(n,P,"")))&&n)return!1;return!0},zt=function(t){return"annotation-xml"!==t&&ig(t,N)},jt=function(t){$t(A.beforeSanitizeAttributes,t,null);const{attributes:e}=t;if(!e||Ut(t))return;const i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:H,forceKeepAttr:void 0};let r=e.length;for(;r--;){const o=e[r],{name:s,namespaceURI:a,value:l}=o,c=Ot(s);let u="value"===s?l:sg(l);if(i.attrName=c,i.attrValue=u,i.keepAttr=!0,i.forceKeepAttr=void 0,$t(A.uponSanitizeAttribute,t,i),u=i.attrValue,rt&&("id"===c||"name"===c)&&(It(s,t),u="user-content-"+u),X&&lg(/((--!?|])>)|<\/(style|title)/i,u)){It(s,t);continue}if(i.forceKeepAttr||(It(s,t),!i.keepAttr))continue;if(!Z&&lg(/\/>/i,u)){It(s,t);continue}q&&Xm([C,k,D],(t=>{u=rg(u,t," ")}));const h=Ot(t.nodeName);if(Ft(h,c,u)){if(w&&"object"==typeof p&&"function"==typeof p.getAttributeType&&!a)switch(p.getAttributeType(h,c)){case"TrustedHTML":u=w.createHTML(u);break;case"TrustedScriptURL":u=w.createScriptURL(u)}try{a?t.setAttributeNS(a,s,u):t.setAttribute(s,u),Ut(t)?Rt(t):Qm(n.removed)}catch{}}}$t(A.afterSanitizeAttributes,t,null)},Vt=function t(e){let n=null;const i=Nt(e);for($t(A.beforeSanitizeShadowDOM,e,null);n=i.nextNode();)$t(A.uponSanitizeShadowNode,n,null),Ht(n),jt(n),n.content instanceof s&&t(n.content);$t(A.afterSanitizeShadowDOM,e,null)};return n.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null,o=null,a=null,c=null;if(yt=!t,yt&&(t="\x3c!--\x3e"),"string"!=typeof t&&!Bt(t)){if("function"!=typeof t.toString)throw cg("toString is not a function");if("string"!=typeof(t=t.toString()))throw cg("dirty is not a string, aborting")}if(!n.isSupported)return t;if(Q||kt(e),n.removed=[],"string"==typeof t&&(st=!1),st){if(t.nodeName){const e=Ot(t.nodeName);if(!B[e]||j[e])throw cg("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof l)i=Pt("\x3c!----\x3e"),o=i.ownerDocument.importNode(t,!0),1===o.nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?i=o:i.appendChild(o);else{if(!tt&&!q&&!K&&-1===t.indexOf("<"))return w&&nt?w.createHTML(t):t;if(i=Pt(t),!i)return tt?null:nt?x:""}i&&J&&Rt(i.firstChild);const u=Nt(st?t:i);for(;a=u.nextNode();)Ht(a),jt(a),a.content instanceof s&&Vt(a.content);if(st)return t;if(tt){if(et)for(c=S.call(i.ownerDocument);i.firstChild;)c.appendChild(i.firstChild);else c=i;return(H.shadowroot||H.shadowrootmode)&&(c=M.call(r,c,!0)),c}let h=K?i.outerHTML:i.innerHTML;return K&&B["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&lg(Ig,i.ownerDocument.doctype.name)&&(h="<!DOCTYPE "+i.ownerDocument.doctype.name+">\n"+h),q&&Xm([C,k,D],(t=>{h=rg(h,t," ")})),w&&nt?w.createHTML(h):h},n.setConfig=function(){kt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Q=!0},n.clearConfig=function(){Mt=null,Q=!1},n.isValidAttribute=function(t,e,n){Mt||kt({});const i=Ot(t),r=Ot(e);return Ft(i,r,n)},n.addHook=function(t,e){"function"==typeof e&&Jm(A[t],e)},n.removeHook=function(t,e){if(void 0!==e){const n=Km(A[t],e);return-1===n?void 0:tg(A[t],n,1)[0]}return Qm(A[t])},n.removeHooks=function(t){A[t]=[]},n.removeAllHooks=function(){A={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();const Bg=t=>Ug.sanitize(t,{USE_PROFILES:{html:!0,svg:!0,svgFilters:!0}}),$g=t=>Ug.sanitize(t,{ALLOWED_TAGS:[]}),Hg=class t extends $m{constructor(){super(...arguments),this.type="toolbar",this.renderType=I.HTML}init(){const t=()=>this.updateOverflowMenu(!1);this.services.events.addEventListener(R.Toolbar.SHOW_OVERFLOW_MENU,(()=>{this.renderOverflowMenu(),document.body.addEventListener("click",t)})),this.services.events.addEventListener(R.Toolbar.HIDE_OVERFLOW_MENU,(()=>{document.body.removeEventListener("click",t)}))}render(t=!0){const e=this.getComponentContainer({ariaLabel:"toolbar"}).attr("role","group");if(dc(this.getOptions(),"data","loading"))e.html(""),this.overflowMenu=null;else{this.overflowMenu||(this.overflowMenu=e.append("div").attr("class","cds--overflow-menu-options cds--overflow-menu--flip cds--overflow-menu-options cds--overflow-menu--flip").attr("tabindex",-1).html("<ul role='menu'></ul>"));const{buttonList:t,overflowMenuItemList:n}=this.getControlConfigs();n&&t.push(this.getOverflowButtonConfig());const i=e.selectAll("div.toolbar-control").data(t,(t=>t.id));i.exit().remove();const r=i.enter().append("div").attr("class","toolbar-control cds--overflow-menu cds--overflow-menu"),o=this;r.merge(i).classed("disabled",(t=>t.shouldBeDisabled())).attr("role","button").attr("aria-disabled",(t=>t.shouldBeDisabled())).attr("aria-label",(t=>t.title)).html((t=>`\n\t\t\t<button\n\t\t\t\tclass="cds--overflow-menu__trigger cds--overflow-menu__trigger"\n\t\t\t\taria-haspopup="true" aria-expanded="false" id="${this.services.domUtils.generateElementIDString(`control-${$g(t.id)}`)}" aria-label="${$g(t.title)}">\n\t\t\t\t<svg focusable="false" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" class="cds--overflow-menu__icon cds--overflow-menu__icon" viewBox="0 0 32 32" aria-hidden="true">\n\t\t\t\t\t${(t=>Ug.sanitize(t,{NAMESPACE:"http://www.w3.org/2000/svg",USE_PROFILES:{html:!0,svg:!0,svgFilters:!0}}))(t.iconSVG.content)}\n\t\t\t\t</svg>\n\t\t\t</button>`)).each((function(t,e){Tu(this).select("svg").style("pointer-events","none").style("will-change","transform").style("width",void 0!==t.iconSVG.width?t.iconSVG.width:"20px").style("height",void 0!==t.iconSVG.height?t.iconSVG.height:"20px"),Tu(this).select("button").on("mouseover focus",(function(e){const n=Tu(this);n.classed("hovered",!0),o.services.events.dispatchEvent(R.Toolbar.SHOW_TOOLTIP,{event:e,hoveredElement:n,content:t.title,noWrap:!0,placements:["top","bottom"]})})).on("mouseout blur",(function(){o.services.events.dispatchEvent(R.Toolbar.HIDE_TOOLTIP)})).on("click",(e=>{t.shouldBeDisabled()||o.triggerFunctionAndEvent(t,e,this)})).on("keydown",(n=>{n.key&&"Enter"===n.key||" "===n.key?(n.preventDefault(),o.triggerFunctionAndEvent(t,n,this)):n.key&&"ArrowLeft"===n.key?o.focusOnPreviousEnabledToolbarItem(e):n.key&&"ArrowRight"===n.key&&o.focusOnNextEnabledToolbarItem(e)}))})),this.overflowButton=this.getComponentContainer().select(`button.cds--overflow-menu__trigger#${this.services.domUtils.generateElementIDString("control-toolbar-overflow-menu")}`)}}renderOverflowMenu(){const{overflowMenuItemList:t}=this.getControlConfigs(),e=this.overflowMenu.select("ul").selectAll("li.cds--overflow-menu-options__option").data(t,(t=>dc(t,"id")));e.exit().remove();const n=e.enter().append("li").attr("id",(t=>this.services.domUtils.generateElementIDString(`control-${t.id}`))).attr("class","cds--overflow-menu-options__option cds--overflow-menu-options__option").attr("role","menuitem").attr("tabindex",1);n.append("button").attr("class","cds--overflow-menu-options__btn cds--overflow-menu-options__btn"),n.merge(e).classed("cds--overflow-menu-options__option--disabled",(t=>t.shouldBeDisabled())).classed("cds--overflow-menu-options__option--disabled",(t=>t.shouldBeDisabled())).attr("aria-disabled",(t=>t.shouldBeDisabled())).selectAll("button").text((t=>t.title))}isOverflowMenuOpen(){return this.overflowMenu.classed("is-open")}updateOverflowMenu(t){this.overflowMenu&&(this.overflowMenu.classed("is-open",t),this.overflowButton&&(this.overflowButton.attr("aria-expanded",t),Tu(this.overflowButton.node().parentNode).classed("cds--overflow-menu--open",t).classed("cds--overflow-menu--open",t)),t?this.services.events.dispatchEvent(R.Toolbar.SHOW_OVERFLOW_MENU):this.services.events.dispatchEvent(R.Toolbar.HIDE_OVERFLOW_MENU))}focusOnPreviousEnabledToolbarItem(t){const e=this.getToolbarButtonItems();let n=e.length;for(let i=t-1;i>=0;i--)if(!e[i].shouldBeDisabled()){n=i;break}if(n<e.length){const t=Tu(`button#${this.services.domUtils.generateElementIDString(`control-${e[n].id}`)}`).node();"focus"in t&&t.focus()}}focusOnNextEnabledToolbarItem(t){const e=this.getToolbarButtonItems();let n=-1;for(let i=t+1;i<e.length;i++)if(!e[i].shouldBeDisabled()){n=i;break}if(n>-1){const t=Tu(`button#${this.services.domUtils.generateElementIDString(`control-${e[n].id}`)}`).node();"focus"in t&&t.focus()}}focusOnPreviousEnabledMenuItem(t){const e=this.getOverflowMenuItems();let n=e.length;for(let i=t-1;i>=0;i--)if(!e[i].shouldBeDisabled()){n=i;break}if(n<e.length){const t=Tu(`#${this.services.domUtils.generateElementIDString(`control-${e[n].id}`)} button`).node();"focus"in t&&t.focus()}}focusOnNextEnabledMenuItem(t){const e=this.getOverflowMenuItems();let n=-1;for(let i=t+1;i<e.length;i++)if(!e[i].shouldBeDisabled()){n=i;break}if(n>-1){const t=Tu(`#${this.services.domUtils.generateElementIDString(`control-${e[n].id}`)} button`).node();"focus"in t&&t.focus()}}toggleOverflowMenu(t){if(this.isOverflowMenuOpen())this.updateOverflowMenu(!1);else{this.updateOverflowMenu(!0);const e=this;this.getOverflowMenuItems().forEach(((n,i)=>{const r=Tu(`#${this.services.domUtils.generateElementIDString(`control-${n.id}`)}`);null!==r&&(r.on("click",(()=>{e.triggerFunctionAndEvent(n,t,r.node()),e.updateOverflowMenu(!1)})),r.on("keydown",(o=>{o&&"Enter"===o.key?e.triggerFunctionAndEvent(n,t,r.node()):o&&"ArrowUp"===o.key?e.focusOnPreviousEnabledMenuItem(i):o&&"ArrowDown"===o.key?e.focusOnNextEnabledMenuItem(i):o&&"Escape"===o.key&&e.updateOverflowMenu(!1),o.preventDefault()})))})),e.focusOnNextEnabledMenuItem(-1)}t&&t.stopImmediatePropagation()}triggerFunctionAndEvent(t,e,n){"function"==typeof t.shouldBeDisabled&&t.shouldBeDisabled()||("function"==typeof t.clickFunction&&t.clickFunction(e),this.services.events.dispatchEvent(R.Toolbar.BUTTON_CLICK,{control:t,event:e,element:n}))}getControlConfigs(){const e=dc(this.getOptions(),"toolbar","numberOfIcons")-1,n=dc(this.getOptions(),"toolbar","controls"),i=[],r=[],o=[];return n.forEach((n=>{let s=null;if(n.type===J.CUSTOM)null===dc(n,"id")&&(n.id="toolbar-button-"+t.buttonID++),null===dc(n,"shouldBeDisabled")&&(n.shouldBeDisabled=()=>!1),s=n;else{const t=this.services.domUtils.isFullScreenMode();n.type===J.MAKE_FULLSCREEN&&t?n.type=J.EXIT_FULLSCREEN:n.type===J.EXIT_FULLSCREEN&&!t&&(n.type=J.MAKE_FULLSCREEN),s=this.getControlConfigByType(n.type)}s&&(s.text=n.text?n.text:n.type,-1!==s.id.indexOf("toolbar-export")?i.push(s):r.length<e?null===dc(s,"iconSVG","content")?o.push(s):r.push(s):o.push(s))})),o.push(...i),o.length?{buttonList:r,overflowMenuItemList:o}:{buttonList:r}}getToolbarButtonItems(){const{buttonList:t,overflowMenuItemList:e}=this.getControlConfigs();return e&&t.push(this.getOverflowButtonConfig()),t||[]}getOverflowMenuItems(){const{overflowMenuItemList:t}=this.getControlConfigs();return t||[]}getOverflowButtonConfig(){const{moreOptions:t}=dc(this.model.getOptions(),"locale","translations","toolbar");return{id:"toolbar-overflow-menu",title:t,shouldBeDisabled:()=>!1,iconSVG:{content:'<circle cx="16" cy="8" r="2"></circle>\n\t\t\t\t<circle cx="16" cy="16" r="2"></circle>\n\t\t\t\t<circle cx="16" cy="24" r="2"></circle>'},clickFunction:t=>this.toggleOverflowMenu(t)}}getControlConfigByType(t){const e=this.services.zoom&&this.services.zoom.isZoomBarEnabled()&&!this.services.zoom.isEmptyState(),n=this.model.getDisplayData(),i=this.model.getOptions(),{exportAsCSV:r,exportAsJPG:o,exportAsPNG:s,zoomIn:a,zoomOut:l,resetZoom:c,makeFullScreen:u,exitFullScreen:h,showAsTable:d}=dc(i,"locale","translations","toolbar");let f;switch(t){case J.ZOOM_IN:e&&(f={id:"toolbar-zoomIn",title:a,shouldBeDisabled:()=>this.services.zoom.isMinZoomDomain(),iconSVG:{content:this.getControlIconByType(t)},clickFunction:()=>this.services.zoom.zoomIn()});break;case J.ZOOM_OUT:e&&(f={id:"toolbar-zoomOut",title:l,shouldBeDisabled:()=>this.services.zoom.isMaxZoomDomain(),iconSVG:{content:this.getControlIconByType(t)},clickFunction:()=>this.services.zoom.zoomOut()});break;case J.RESET_ZOOM:e&&(f={id:"toolbar-resetZoom",title:c,shouldBeDisabled:()=>this.services.zoom.isMaxZoomDomain(),iconSVG:{content:this.getControlIconByType(t)},clickFunction:()=>this.services.zoom.resetZoomDomain()});break;case J.MAKE_FULLSCREEN:f={id:"toolbar-makefullscreen",iconSVG:{content:this.getControlIconByType(t),width:"15px",height:"15px"},title:u,shouldBeDisabled:()=>!1,clickFunction:()=>{this.services.domUtils.toggleFullscreen()}};break;case J.EXIT_FULLSCREEN:f={id:"toolbar-exitfullscreen",iconSVG:{content:this.getControlIconByType(t),width:"15px",height:"15px"},title:h,shouldBeDisabled:()=>!1,clickFunction:()=>{this.services.domUtils.toggleFullscreen()}};break;case J.SHOW_AS_DATATABLE:f={id:"toolbar-showasdatatable",iconSVG:{content:this.getControlIconByType(t)},title:d,shouldBeDisabled:()=>0===n.length,clickFunction:()=>this.services.events.dispatchEvent(R.Modal.SHOW)};break;case J.EXPORT_CSV:f={id:"toolbar-export-CSV",title:r,shouldBeDisabled:()=>!1,iconSVG:{content:this.getControlIconByType(t)},clickFunction:()=>this.model.exportToCSV()};break;case J.EXPORT_PNG:f={id:"toolbar-export-PNG",title:s,shouldBeDisabled:()=>!1,iconSVG:{content:this.getControlIconByType(t)},clickFunction:()=>this.services.domUtils.exportToPNG()};break;case J.EXPORT_JPG:f={id:"toolbar-export-JPG",title:o,shouldBeDisabled:()=>!1,iconSVG:{content:this.getControlIconByType(t)},clickFunction:()=>this.services.domUtils.exportToJPG()};break;default:throw Error("Not supported toolbar control type: "+t)}return f}getControlIconByType(t){switch(t){case J.ZOOM_IN:return'<polygon points="19 13 15 13 15 9 13 9 13 13 9 13 9 15 13 15 13 19 15 19 15 15 19 15 19 13"/>\n\t\t\t\t\t\t<path d="M22.45,21A10.87,10.87,0,0,0,25,14,11,11,0,1,0,14,25a10.87,10.87,0,0,0,7-2.55L28.59,30,30,28.59ZM14,23a9,9,0,1,1,9-9A9,9,0,0,1,14,23Z"/>';case J.ZOOM_OUT:return'<rect x="9" y="13" width="10" height="2"/>\n\t\t\t\t\t\t<path d="M22.45,21A10.87,10.87,0,0,0,25,14,11,11,0,1,0,14,25a10.87,10.87,0,0,0,7-2.55L28.59,30,30,28.59ZM14,23a9,9,0,1,1,9-9A9,9,0,0,1,14,23Z"/>';case J.RESET_ZOOM:return'<path d="M22.4478,21A10.855,10.855,0,0,0,25,14,10.99,10.99,0,0,0,6,6.4658V2H4v8h8V8H7.332a8.9768,8.9768,0,1,1-2.1,8H3.1912A11.0118,11.0118,0,0,0,14,25a10.855,10.855,0,0,0,7-2.5522L28.5859,30,30,28.5859Z"/>';case J.MAKE_FULLSCREEN:return'<polygon points="21 2 21 4 26.59 4 17 13.58 18.41 15 28 5.41 28 11 30 11 30 2 21 2"/><polygon points="15 18.42 13.59 17 4 26.59 4 21 2 21 2 30 11 30 11 28 5.41 28 15 18.42"/>';case J.EXIT_FULLSCREEN:return'<polygon points="4 18 4 20 10.586 20 2 28.582 3.414 30 12 21.414 12 28 14 28 14 18 4 18"/><polygon points="30 3.416 28.592 2 20 10.586 20 4 18 4 18 14 28 14 28 12 21.414 12 30 3.416"/>';case J.SHOW_AS_DATATABLE:return'<rect x="4" y="6" width="18" height="2"/><rect x="4" y="12" width="18" height="2"/><rect x="4" y="18" width="18" height="2"/><rect x="4" y="24" width="18" height="2"/><rect x="26" y="6" width="2" height="2"/><rect x="26" y="12" width="2" height="2"/><rect x="26" y="18" width="2" height="2"/><rect x="26" y="24" width="2" height="2"/>';case J.EXPORT_CSV:case J.EXPORT_JPG:case J.EXPORT_PNG:return'<path d="M22.4478,21A10.855,10.855,0,0,0,25,14,10.99,10.99,0,0,0,6,6.4658V2H4v8h8V8H7.332a8.9768,8.9768,0,1,1-2.1,8H3.1912A11.0118,11.0118,0,0,0,14,25a10.855,10.855,0,0,0,7-2.5522L28.5859,30,30,28.5859Z"/>';default:throw Error("Not supported toolbar control type: "+t)}}};Hg.buttonID=0;let Fg=Hg;const zg=class t extends $m{constructor(e,n,i,r){super(e,n,r),this.type="layout",this.configs=r,this.children=i,this._instanceID=t.instanceID++,this.init()}init(){this.children.forEach((t=>{t.components.forEach((t=>{t.init()}))}))}getPreferedAndFixedSizeSum(){const t=this.parent;let e=0;return t.selectAll(`div.layout-child-${this._instanceID}`).filter((t=>{const e=dc(t,"growth");return e===Y.PREFERRED||e===Y.FIXED})).each((function(t){e+=t.size})),e}getNumOfStretchChildren(){return this.parent.selectAll(`div.layout-child-${this._instanceID}`).filter((t=>dc(t,"growth")===Y.STRETCH)).size()}render(t=!0){const e=this.model.getOptions(),n=this.parent,{width:i,height:r}=Uf.getHTMLElementSize(n.node()),o=this.configs.direction===W.ROW||this.configs.direction===W.ROW_REVERSE,s=dc(this.model.getOptions(),"style","prefix"),a=n.classed(`${cl}--${s}--layout-row`,this.configs.direction===W.ROW).classed(`${cl}--${s}--layout-row-reverse`,this.configs.direction===W.ROW_REVERSE).classed(`${cl}--${s}--layout-column`,this.configs.direction===W.COLUMN).classed(`${cl}--${s}--layout-column-reverse`,this.configs.direction===W.COLUMN_REVERSE).classed(`${cl}--${s}--layout-alignitems-center`,this.configs.alignItems===Z.CENTER).selectAll(`div.layout-child-${this._instanceID}`).data(this.children,(t=>t.id));a.enter().append("div").merge(n.selectAll(`div.layout-child-${this._instanceID}`)).attr("class",(t=>`layout-child layout-child-${this._instanceID} ${t.id}`)).each((function(n){n.components.forEach((i=>{var r;const o=Tu(this),s=dc(n,"renderType")===I.SVG;i.setParent(s?Uf.appendOrSelect(o,"svg.layout-svg-wrapper").attr("width","100%").attr("height","100%"):o),s&&!o.select("svg.layout-svg-wrapper").attr("aria-label")&&o.select("svg.layout-svg-wrapper").attr("aria-label",(null==(r=null==e?void 0:e.accessibility)?void 0:r.svgAriaLabel)||(null==e?void 0:e.title));const a=dc(n,"growth");(a===Y.PREFERRED||a===Y.FIXED)&&i.render(t)}))})),n.selectAll(`div.layout-child-${this._instanceID}`).style("height",null).style("width",null).each((function(t){const e=dc(t,"growth"),n=dc(t,"renderType")===I.SVG?Uf.getSVGElementSize(Tu(this).select("svg.layout-svg-wrapper"),{useBBox:!0}):Uf.getHTMLElementSize(this);if(e===Y.PREFERRED){const e=o?n.width:n.height,s=o?i:r;t.size=e/s*100}})),a.exit().remove(),this.children.filter((t=>dc(t,"growth")===Y.STRETCH)).forEach((t=>{t.size=(100-+this.getPreferedAndFixedSizeSum())/+this.getNumOfStretchChildren()}));const l=n.selectAll(`div.layout-child-${this._instanceID}`).data(this.children,(t=>t.id));o?l.style("width",(t=>t.size/100*i+"px")).style("height","100%"):l.style("height",(t=>t.size/100*r+"px")).style("width","100%"),l.each((function(e){e.components.forEach((n=>{dc(e,"growth")===Y.STRETCH&&n.render(t)}))}))}setModel(t){super.setModel(t),this.children.forEach((e=>{e.components.forEach((e=>e.setModel(t)))}))}setServices(t){super.setServices(t),this.children.forEach((e=>{e.components.forEach((e=>e.setServices(t)))}))}destroy(){this.children.forEach((t=>{t.components.forEach((t=>t.destroy()))}))}};zg.instanceID=Math.floor(99999999999*Math.random());let jg=zg;class Vg extends $m{constructor(){super(...arguments),this.type="spacer"}render(t=!1){this.getComponentContainer({isPresentational:!0}).style("width",`${this.configs.size||wl}px`).style("height",`${this.configs.size||wl}px`).attr("opacity",0)}}class Gg extends $m{constructor(t,e,n){super(t,e,n),this.type="modal",this.isEventListenerAdded=!1,this.handleShowModal=()=>{const t=this.services.domUtils.getChartID();this.modal.attr("data-modal",!0).attr("class","cds--modal").attr("role","dialog").attr("aria-modal",!0).attr("aria-labelledby",`${t}__modal-title`).attr("aria-describedby",`${t}__modal-description`).attr("tabindex",-1).style("opacity",1).style("visibility","visible"),this.modal.html(this.getModalHTML()),this.modal.select("div.cds--modal-footer button.cds--btn").on("click",(()=>this.model.exportToCSV())),this.modal.on("click",this.handleHideModal),this.modal.select(".cds--modal-container").on("click",(t=>{t.stopPropagation()})),this.modal.select(".cds--modal-close").on("click",this.handleHideModal),typeof window<"u"&&window.addEventListener("keydown",this.handleEscapeKey)},this.handleEscapeKey=t=>{"Escape"===t.key&&this.handleHideModal()},this.handleHideModal=()=>{this.modal.attr("role",null).attr("aria-modal",null).attr("aria-labelledby",null).attr("aria-describedby",null).attr("tabindex",null).style("opacity",0).style("visibility","hidden"),this.modal.on("click",null),this.modal.select(".cds--modal-container").on("click",null),this.modal.select(".cds--modal-close").on("click",null),typeof window<"u"&&window.removeEventListener("keydown",this.handleEscapeKey)},this.init()}addEventListeners(){this.services.events.addEventListener(R.Modal.SHOW,this.handleShowModal)}removeEventListeners(){this.services.events.removeEventListener(R.Modal.SHOW,this.handleShowModal)}getModalHTML(){const t=this.services.domUtils.getChartID(),e=this.model.getOptions(),{title:n,downloadAsCSV:i}=dc(e,"locale","translations","tabularRep"),r=dc(e,"style","prefix"),o=this.model.getTabularDataArray();return`\n\t\t<div class="cds--modal-container">\n\t\t\t<div class="cds--modal-header">\n\n\t\t\t\t<p class="cds--modal-header__label cds--type-delta" id="modal-title">${n}</p>\n\n\t\t\t\t<p class="cds--modal-header__heading cds--type-beta" id="${t}__modal-description">${$g(e.title)}</p>\n\n\t\t\t\t<button class="cds--modal-close" type="button" data-modal-close aria-label="close modal" data-modal-primary-focus>\n\t\t\t\t\t<svg focusable="false" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" fill="currentColor" aria-label="Close" width="20" height="20" viewBox="0 0 32 32" role="img" class="cds--modal-close__icon">\n\t\t\t\t\t\t<path d="M24 9.4L22.6 8 16 14.6 9.4 8 8 9.4 14.6 16 8 22.6 9.4 24 16 17.4 22.6 24 24 22.6 17.4 16 24 9.4z"></path>\n\t\t\t\t\t</svg>\n\t\t\t\t</button>\n\t\t\t</div>\n\n\t\t\t<div class="cds--modal-content">\n\t\t\t\t<table class="cds--data-table cds--data-table--no-border">\n\t\t\t\t\t<thead>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t${En(o,0).map((t=>`<th scope="col">\n\t\t\t\t\t\t\t\t<div class="cds--table-header-label">${$g(t)}</div>\n\t\t\t\t\t\t\t</th>`)).join("")}\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</thead>\n\n\t\t\t\t\t<tbody>${o.slice(1).map((t=>`\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t${t.map((t=>`<td>${$g(t)}</td>`)).join("")}\n\t\t\t\t\t\t\t</tr>`)).join("")}\n\t\t\t\t\t</tbody>\n\t\t\t\t</table>\n\t\t\t</div>\n\n\t\t\t<div class="cds--modal-footer">\n\t\t\t <div class="${cl}--${r}-modal-footer-spacer"></div>\n\t\t\t <button class="cds--btn cds--btn--primary" type="button" data-modal-primary-focus>${i}</button>\n\t\t\t</div>\n\t\t</div>`}render(t=!1){const e=this.model.getOptions();if(!this.isEventListenerAdded){const t=Tu(this.services.domUtils.getHolder()),n=dc(e,"style","prefix");this.modal=Uf.appendOrSelect(t,`div.${cl}--${n}--modal`),this.addEventListeners(),this.isEventListenerAdded=!0}}destroy(){this.removeEventListeners(),this.isEventListenerAdded=!1}}class Wg extends $m{constructor(){super(...arguments),this.type="title",this.renderType=I.HTML}render(t=!1){const e=this.getComponentContainer(),n=dc(this.getOptions(),"title"),i=e.selectAll("p.title").data([n]);if(i.enter().append("p").classed("title",!0).attr("role","heading").attr("aria-level",2).merge(i).html((t=>$g(t))),i.node()&&i.node().offsetWidth<i.node().scrollWidth){const t=this;i.on("mouseover",(function(e){t.services.events.dispatchEvent(R.Tooltip.SHOW,{event:e,hoveredElement:i,content:i.text()})})).on("mousemove",(function(e){t.services.events.dispatchEvent(R.Tooltip.MOVE,{event:e})})).on("mouseout",(function(){t.services.events.dispatchEvent(R.Tooltip.HIDE)}))}i.exit().remove()}truncateTitle(t,e){if(e<=0)return;const n=t.text();if(t.node().getComputedTextLength()>e){t.append("tspan").text("...");const i=Uf.appendOrSelect(t,"tspan").node().getComputedTextLength(),r=t.text(),o=this.getSubstringIndex(t.node(),0,r.length-1,e-i);t.html(r.substring(0,o-1)).append("tspan").text("...");const s=this;t.on("mouseover",(function(e){s.services.events.dispatchEvent(R.Tooltip.SHOW,{event:e,hoveredElement:t,content:n})})).on("mousemove",(function(t){s.services.events.dispatchEvent(R.Tooltip.MOVE,{event:t})})).on("mouseout",(function(){s.services.events.dispatchEvent(R.Tooltip.HIDE)}))}}getMaxTitleWidth(){return Uf.getSVGElementSize(this.parent.node(),{useAttrs:!0}).width}getSubstringIndex(t,e,n,i){const r=Math.floor((n+e)/2);return t.getSubStringLength(0,r)>i?this.getSubstringIndex(t,e,r,i):t.getSubStringLength(0,r)<i?t.getSubStringLength(0,r+1)>i?r:this.getSubstringIndex(t,r,n,i):r}}class Yg extends $m{constructor(){super(...arguments),this.type="legend",this.renderType=I.HTML}render(t=!1){const e=this.getOptions(),n=dc(e,"legend"),i=dc(n,"alignment"),r=dc(e,"legend","orientation");let o=this.model.getDataGroups();const{DISABLED:s}=yl.items.status,a=o.some((t=>t.status===s)),l=dc(n,"order"),c=this.getComponentContainer().classed("center-aligned",i===j.CENTER).classed("right-aligned",i===j.RIGHT).classed(r,!0).classed("has-deactivated-items",a).attr("role",Zc.GROUP).attr("aria-label","Data groups").attr("data-name","legend-items");l&&(o=this.sortDataGroups(o,l));const u=c.selectAll("div.legend-item").data(o,(t=>t.name)),h=u.enter().append("div").attr("class","legend-item");h.merge(c.selectAll("div.legend-item")).classed("active",(function(t){return t.status===yl.items.status.ACTIVE}));const d=dc(this.getOptions(),"legend","clickable");c.classed("clickable",d&&o.length>1);const f=yl.checkbox.radius,p=h.append("div").classed("checkbox",!0),m=p.merge(u.select("div.checkbox")).attr("role",Zc.CHECKBOX).attr("tabindex",d?0:-1).attr("aria-labelledby",((t,e)=>this.services.domUtils.generateElementIDString(`legend-datagroup-${e}-title`))).attr("aria-checked",(({status:t})=>t===yl.items.status.ACTIVE)).attr("width",2*f).attr("height",2*f).attr("class",(t=>this.model.getColorClassName({classNameTypes:[N.BACKGROUND],dataGroupName:t.name,originalClassName:"checkbox"}))).style("background",(t=>t.status===yl.items.status.ACTIVE?this.model.getFillColor(t.name)||this.model.getStrokeColor(t.name):null)).classed("active",(function(t){return t.status===yl.items.status.ACTIVE}));p.append("svg").attr("focusable",!1).attr("preserveAspectRatio","xMidYMid meet").attr("xmlns","http://www.w3.org/2000/svg").attr("width","11").attr("height","11").attr("viewBox","0 0 31 28").attr("aria-hidden",!0).style("will-change","transform").append("path").attr("d","M13 21.2l-7.1-7.1-1.4 1.4 7.1 7.1L13 24 27.1 9.9l-1.4-1.5z"),h.append("p").merge(u.select("p"));const g=dc(e,"legend","additionalItems");if(g&&o.length){const t=this,e=c.selectAll("div.additional-item").data(g);e.exit().remove();const n=e.enter().append("div").merge(e).classed("legend-item",!0).classed("additional",!0).attr("aria-labelledby",((t,e)=>this.services.domUtils.generateElementIDString(`legend-datagroup-${m.size()+e}-title`)));n.selectAll("*").remove();let i,r=1;n.append("svg").classed("icon",!0).each((function(e){const n=Tu(this);i&&i==e.type?r++:(i=e.type,r=1),t.addAdditionalItem(n,e,r)})),n.append("p").merge(n.select("p")),this.truncateLegendText()}u.exit().on("mouseover",null).on("click",null).on("mouseout",null).remove(),d&&h.size()>1&&this.addEventListeners()}sortDataGroups(t,e){if(t.sort(((t,n)=>e.indexOf(t.name)-e.indexOf(n.name))),e.length<t.length){const n=t.length-e.length;return t.slice(n).concat(t.slice(0,n))}return t}addAdditionalItem(t,e,n){const{width:i,height:r}=yl.area;if(e.type===et.RADIUS?t.style("width",`${r}px`).style("height",`${r}px`):t.style("width",`${i}px`).style("height",`${r}px`),e.type===et.RADIUS){const{iconData:n,fill:i,stroke:r}=yl.radius;t.attr("fill","none").selectAll("circle").data(n).enter().append("circle").classed("radius",!0).attr("role",Zc.IMG).attr("aria-label","radius").attr("cx",(t=>t.cx)).attr("cy",(t=>t.cy)).attr("r",(t=>t.r)).style("fill",e.fill?e.fill:i).style("stroke",e.stroke?e.stroke:r)}else if(e.type===et.LINE){const r=yl.line;t.select("line.line").empty()&&t.append("line").classed(`line-${n}`,!0).attr("role",Zc.IMG).attr("aria-label","line").attr("x1",0).attr("y1",r.yPosition).attr("x2",i).attr("y2",r.yPosition).style("stroke",e.stroke?e.stroke:r.stroke).style("stroke-width",r.strokeWidth)}else if(e.type===et.AREA)t.select("rect.area").empty()&&t.append("rect").classed(`area-${n}`,!0).attr("role",Zc.IMG).attr("aria-label","area").attr("width",i).attr("height",r).style("fill",n>3&&!e.fill?yl.area.fill:e.fill).style("stroke",e.stroke);else if(e.type===et.SIZE){const{iconData:n,fill:i,stroke:r}=yl.size;t.attr("fill","none").attr("role",Zc.IMG).attr("aria-label","size").selectAll("rect").data(n).enter().append("rect").classed("size",!0).attr("width",(t=>t.width)).attr("height",(t=>t.height)).attr("y",(()=>0)).style("fill",e.fill?e.fill:i).style("stroke",e.stroke?e.stroke:r).style("stroke-width",1)}else if(e.type===et.QUARTILE){const{iconData:e}=yl.quartile;t.selectAll("rect").attr("role",Zc.IMG).attr("aria-label","quartile").data(e).enter().append("rect").attr("class",((t,e)=>"quartile-"+(0===e?"wrapper":"line"))).attr("x",(t=>t.x)).attr("y",(t=>t.y)).attr("width",(t=>t.width)).attr("height",(t=>t.height))}else if(e.type===et.ZOOM){const{iconData:n,color:i}=dc(yl,"zoom"),r=t.attr("role",Zc.IMG).attr("aria-label","zoom").selectAll("g.icon").data(n).enter();r.append("g").attr("x",(t=>t.x)).attr("y",(t=>t.y)).attr("width",(t=>t.width)).attr("height",(t=>t.height)).append("polygon").attr("points","7.7 4.82 5.78 4.82 5.78 2.89 4.82 2.89 4.82 4.82 2.89 4.82 2.89 5.78 4.82 5.78 4.82 7.7 5.78 7.7 5.78 5.78 7.7 5.78 7.7 4.82").attr("fill",(()=>e.color?e.color:i)),r.append("path").attr("d","M9.36,8.67A5.22,5.22,0,0,0,10.59,5.3,5.3,5.3,0,1,0,5.3,10.59,5.22,5.22,0,0,0,8.67,9.36L12.32,13l.68-.68Zm-4.06,1A4.34,4.34,0,1,1,9.63,5.3,4.33,4.33,0,0,1,5.3,9.63Z").attr("fill",(()=>e.color?e.color:i))}}truncateLegendText(){const t=this.getComponentContainer(),e=dc(this.getOptions(),"legend","truncation"),n=dc(e,"type"),i=dc(e,"threshold"),r=dc(e,"numCharacter"),o=t.selectAll("div.legend-item p");o.attr("id",(function(){return(this.parentNode.querySelector("div.checkbox")||this.parentNode).getAttribute("aria-labelledby")})),n!==$.NONE?o.html((function(t){const e=$g(t.name);return e.length>i&&e.length!==r?uc(e,n,r):e})):o.html((t=>$g(t.name)))}addEventListeners(){const t=this,e=this.getComponentContainer(),n=this.getOptions(),i=dc(n,"legend"),r=dc(i,"truncation");e.selectAll("div.legend-item").on("mouseover",(function(e){t.services.events.dispatchEvent(R.Legend.ITEM_HOVER,{hoveredElement:Tu(this)});const n=Tu(this);n.select("div.checkbox").classed("hovered",!0);const i=n.datum();i.name.length>r.threshold&&r.numCharacter<i.name.length&&r.type!==$.NONE&&t.services.events.dispatchEvent(R.Tooltip.SHOW,{event:e,hoveredElement:n,content:i.name})})).on("mousemove",(function(e){Tu(this).datum().name.length>r.threshold&&r.type!==$.NONE&&t.services.events.dispatchEvent(R.Tooltip.MOVE,{event:e})})).on("click",(function(){t.services.events.dispatchEvent(R.Legend.ITEM_CLICK,{clickedElement:Tu(this)});const e=Tu(this).datum();t.model.toggleDataLabel(e.name)})).on("mouseout",(function(){const e=Tu(this);e.select("div.checkbox").classed("hovered",!1),e.datum().name.length>r.threshold&&r.type!==$.NONE&&t.services.events.dispatchEvent(R.Tooltip.HIDE),t.services.events.dispatchEvent(R.Legend.ITEM_MOUSEOUT,{hoveredElement:e})})),e.selectAll("div.legend-item div.checkbox").on("keyup",(function(e){e.key&&"Tab"===e.key&&t.services.events.dispatchEvent(R.Legend.ITEM_HOVER,{hoveredElement:Tu(this)})})),e.selectAll("div.legend-item div.checkbox").on("keydown",(function(e,n){e.key&&" "===e.key?(e.preventDefault(),t.model.toggleDataLabel(n.name)):e.key&&"Tab"===e.key&&t.services.events.dispatchEvent(R.Legend.ITEM_MOUSEOUT,{hoveredElement:Tu(this)})})),e.selectAll("g.additional-item").on("mouseover",(function(e){const n=Tu(this),i=n.datum();i.name.length>r.threshold&&t.services.events.dispatchEvent(R.Tooltip.SHOW,{event:e,hoveredElement:n,content:i.name})}))}}class Zg extends $m{constructor(t,e,n){super(t,e,n),this.type="chart-clip",this.renderType=I.SVG,this.chartClipId="chart-clip-id-"+Math.floor(99999999999*Math.random()),this.init()}init(){this.model.set({chartClipId:this.chartClipId},{skipUpdate:!0})}render(t=!0){this.createClipPath()}createClipPath(){const t=this.parent,{cartesianScales:e}=this.services;if(!e)throw new Error("Service cartesianScales was undefined");const n=e.getMainXScale(),i=e.getMainYScale(),[r,o]=n.range(),[s,a]=i.range();if(!t)throw new Error("svg is undefined");this.chartClipPath=Uf.appendOrSelect(t,`clipPath.${this.type}`).attr("id",this.chartClipId);const l=Uf.appendOrSelect(this.chartClipPath,`rect.${this.type}`);o-r>0&&l.attr("x",r).attr("y",a).attr("width",o-r).attr("height",s-a),this.chartClipPath.merge(l).lower()}}class qg extends Zg{constructor(){super(...arguments),this.type="canvas-chart-clip",this.chartClipId="canvas-chart-clip-id-"+Math.floor(99999999999*Math.random())}createClipPath(){const t=this.parent,{width:e,height:n}=Uf.getSVGElementSize(this.parent,{useAttrs:!0});this.chartClipPath=Uf.appendOrSelect(t,`clipPath.${this.type}`).attr("id",this.chartClipId);const i=Uf.appendOrSelect(this.chartClipPath,`rect.${this.type}`);i.attr("x",0).attr("y",0).attr("width",e).attr("height",n),this.chartClipPath.merge(i).lower()}}var Xg,Kg;!function(t){t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom"}(Kg||(Kg={}));var Qg=((Xg={})[Kg.LEFT]=function(t,e,n){return{top:t.top-Math.round(e.offsetHeight/2)+Math.round(n.height/2),left:Math.round(t.left-e.offsetWidth)}},Xg[Kg.RIGHT]=function(t,e,n){return{top:t.top-Math.round(e.offsetHeight/2)+Math.round(n.height/2),left:Math.round(t.left+n.width)}},Xg[Kg.TOP]=function(t,e,n){return{top:Math.round(t.top-e.offsetHeight),left:t.left-Math.round(e.offsetWidth/2)+Math.round(n.width/2)}},Xg[Kg.BOTTOM]=function(t,e,n){return{top:Math.round(t.top+n.height),left:t.left-Math.round(e.offsetWidth/2)+Math.round(n.width/2)}},Xg),Jg=typeof window<"u"?window:{innerHeight:0,innerWidth:0},tv=function(){function t(t){void 0===t&&(t={}),this.positions=Qg,this.positions=Object.assign({},Qg,t)}return t.prototype.getRelativeOffset=function(t){for(var e={left:t.offsetLeft,top:t.offsetTop};t.offsetParent&&"static"===getComputedStyle(t.offsetParent).position;)e.left+=t.offsetLeft,e.top+=t.offsetTop,t=t.offsetParent;return e},t.prototype.getAbsoluteOffset=function(t){for(var e=t,n={top:0,left:0};e.offsetParent;){var i=getComputedStyle(e.offsetParent);"static"===i.position&&i.marginLeft&&i.marginTop&&(parseInt(i.marginTop,10)&&(n.top+=parseInt(i.marginTop,10)),parseInt(i.marginLeft,10)&&(n.left+=parseInt(i.marginLeft,10))),e=e.offsetParent}var r=t.getBoundingClientRect(),o=document.body.getBoundingClientRect();return{top:r.top-o.top+n.top,left:r.left-o.left+n.left}},t.prototype.findRelative=function(t,e,n){var i=this.getRelativeOffset(t),r=t.getBoundingClientRect();return this.calculatePosition(i,r,e,n)},t.prototype.findAbsolute=function(t,e,n){var i=this.getAbsoluteOffset(t),r=t.getBoundingClientRect();return this.calculatePosition(i,r,e,n)},t.prototype.findPosition=function(t,e,n,i){void 0===i&&(i=this.getAbsoluteOffset.bind(this));var r=i(t),o=t.getBoundingClientRect();return this.calculatePosition(r,o,e,n)},t.prototype.findPositionAt=function(t,e,n){return this.calculatePosition(t,{top:0,left:0,height:0,width:0},e,n)},t.prototype.getPlacementBox=function(t,e){var n=t.offsetHeight+e.top,i=t.offsetWidth+e.left;return{top:e.top,bottom:n,left:e.left,right:i}},t.prototype.addOffset=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),Object.assign({},t,{top:t.top+e,left:t.left+n})},t.prototype.setElement=function(t,e){t.style.top=e.top+"px",t.style.left=e.left+"px"},t.prototype.findBestPlacement=function(t,e,n,i,r){var o=this;void 0===i&&(i=this.defaultContainerFunction.bind(this)),void 0===r&&(r=this.findPosition.bind(this));var s=n.map((function(n){var s=r(t,e,n),a=o.getPlacementBox(e,s),l=0,c=0,u=i();a.top<u.top?l=u.top-a.top:a.bottom>u.height&&(l=a.bottom-u.height),a.left<u.left?c=u.left-a.left:a.right>u.width&&(c=a.right-u.width),l&&!c?c=1:c&&!l&&(l=1);var h=e.offsetHeight*e.offsetWidth;return{placement:n,weight:(h-l*c)/h}}));return s.sort((function(t,e){return e.weight-t.weight})),s[0].placement},t.prototype.findBestPlacementAt=function(t,e,n,i){var r=this;return void 0===i&&(i=this.defaultContainerFunction.bind(this)),this.findBestPlacement(null,e,n,i,(function(e,n,i){return r.findPositionAt(t,n,i)}))},t.prototype.defaultContainerFunction=function(){return{top:0,left:0,height:Jg.innerHeight,width:Jg.innerWidth}},t.prototype.calculatePosition=function(t,e,n,i){return this.positions[i]?this.positions[i](t,n,e):(console.error("No function found for placement, defaulting to 0,0"),{left:0,top:0})},t}();new tv;class ev extends $m{constructor(t,e,n){super(t,e,n),this.type="tooltip",this.renderType=I.HTML,this.isEventListenerAdded=!1,this.lastTriggeredEventType="",this.positionService=new tv,this.handleShowTooltip=t=>{const e=t.detail.data||t.detail.items,n=Tu(t.detail.event.target).datum();let i;const r=this.formatItems(this.getItems(t));i=t.detail.content?`<div class="title-tooltip"><p>${Bg(t.detail.content)}</p></div>`:Bg(this.getTooltipHTML(r));const o=Uf.appendOrSelect(this.tooltip,"div.content-box");if(dc(this.getOptions(),"tooltip","customHTML"))if(t.detail.content){const e=`<div class="title-tooltip"><p>${Bg(t.detail.content)}</p></div>`;o.html(e)}else o.html(`<div class="title-tooltip"><p>${Bg(this.model.getOptions().tooltip.customHTML(e,i,n))}</p></div>`);else o.html(i);o.selectAll(".datapoint-tooltip").each((function(t,e){const n=r[e];r[e]&&r[e].color&&Tu(this).select(".tooltip-color").attr("class","tooltip-color").style("background-color",n.color)})),this.positionTooltip(t),this.tooltip.classed("hidden",!1).attr("aria-hidden",!1),this.lastTriggeredEventType=t.type},this.handleHideTooltip=()=>{this.tooltip.classed("hidden",!0).attr("aria-hidden",!0)},this.init()}addTooltipEventListener(){this.services.events.addEventListener(R.Tooltip.MOVE,(t=>{this.lastTriggeredEventType!==R.Toolbar.SHOW_TOOLTIP&&!1===this.tooltip.classed("hidden")&&this.positionTooltip(t)})),this.services.events.addEventListener(R.Tooltip.SHOW,this.handleShowTooltip),this.services.events.addEventListener(R.Tooltip.HIDE,this.handleHideTooltip),this.services.events.addEventListener(R.Chart.MOUSEOUT,this.handleHideTooltip),this.services.events.addEventListener(R.Toolbar.SHOW_TOOLTIP,this.handleShowTooltip),this.services.events.addEventListener(R.Toolbar.HIDE_TOOLTIP,this.handleHideTooltip)}removeTooltipEventListener(){this.services.events.removeEventListener(R.Tooltip.MOVE,null),this.services.events.removeEventListener(R.Tooltip.SHOW,this.handleShowTooltip),this.services.events.removeEventListener(R.Tooltip.HIDE,this.handleHideTooltip),this.services.events.removeEventListener(R.Chart.MOUSEOUT,this.handleHideTooltip),this.services.events.removeEventListener(R.Toolbar.SHOW_TOOLTIP,this.handleShowTooltip),this.services.events.removeEventListener(R.Toolbar.HIDE_TOOLTIP,this.handleHideTooltip)}getItems(t){return t.detail.items?t.detail.items:[]}formatItems(t){const e=this.getOptions(),n=dc(e,"tooltip","truncation","type"),i=dc(e,"tooltip","truncation","threshold"),r=dc(e,"tooltip","truncation","numCharacter");return n!==$.NONE?t.map((t=>{const e=t.labelIcon?12:0;return t.value=t.value?this.valueFormatter(t.value,t.label):t.value,t.label&&t.label.length+e>i&&(t.label=uc(t.label,n,r)),t.value&&t.value.length>i&&(t.value=uc(t.value,n,r)),t})):t.map((t=>(t.value=t.value?this.valueFormatter(t.value,t.label):t.value,t)))}getTooltipHTML(t){return'<ul class="multi-tooltip">'+t.map((t=>`<li>\n\t\t\t\t\t<div class="datapoint-tooltip${t.bold?" bold":""}">\n\t\t\t\t\t\t${t.class||t.color?`<div class="tooltip-color ${t.class}"></div>`:""}\n\t\t\t\t\t\t<div class="label">\n\t\t\t\t\t\t<p>${t.label||""}</p>\n\t\t\t\t\t\t${t.labelIcon?`<span class="label-icon"/>${t.labelIcon}</span>`:""}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t${void 0===t.value||null===t.value?"":`<p class="value"/>${t.value}</p>`}\n\t\t\t\t\t</div>\n\t\t\t\t</li>`)).join("")+"</ul>"}isDate(t){return t instanceof Date}valueFormatter(t,e){const n=this.getOptions(),i=dc(n,"tooltip","valueFormatter"),{code:r,number:o,date:s}=dc(n,"locale");if(i)return i(t,e);if(this.isDate(t))return s(t,r,{month:"short",day:"numeric",year:"numeric"});try{if("string"==typeof t&&/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/.test(t))return s(new Date(t),r,{month:"short",day:"numeric",year:"numeric"})}catch{}return o(t,r)}render(t=!1){const e=this.getOptions(),n=dc(e,"tooltip","enabled");if(n){const t=Tu(this.services.domUtils.getHolder()),n=dc(e,"style","prefix");this.tooltip=Uf.appendOrSelect(t,`div.${cl}--${n}--tooltip`),this.tooltip.style("max-width",null).attr("role","tooltip"),this.isEventListenerAdded||(this.addTooltipEventListener(),this.isEventListenerAdded=!0),this.tooltip.classed("hidden",!0)}else!n&&this.isEventListenerAdded&&(this.removeTooltipEventListener(),this.isEventListenerAdded=!1)}addOffsetByPlacement(t,e,n){const i=Object.assign({},t);return e==Kg.LEFT?i.left-=n:e==Kg.RIGHT?i.left+=n:e==Kg.TOP?i.top-=n:e==Kg.BOTTOM&&(i.top+=n),i}positionTooltip(t){const e=this.services.domUtils.getHolder(),n=e.offsetWidth,i=e.offsetHeight,r=this.tooltip.node(),o=this.getOptions(),s=dc(o,"zoomBar","top","enabled"),a=!!dc(t,"detail","noWrap"),l=Array.isArray(dc(t,"detail","placements")),c=l?dc(t,"detail","placements"):[Kg.RIGHT,Kg.LEFT,Kg.TOP,Kg.BOTTOM];let u,{horizontalOffset:h}=xl;const{defaultOffset:d}=xl;if(this.tooltip.select("div.title-tooltip").classed("title-tooltip-nowrap",a),l){const e=dc(t,"detail","event","target"),o=this.services.domUtils.getElementOffset(e,!0);u=this.positionService.findBestPlacementAt(o,r,c,(()=>({top:0,left:0,width:n,height:i})));let s=this.positionService.findPosition(e,r,u,(()=>this.services.domUtils.getElementOffset(e)));return s=this.addOffsetByPlacement(s,u,d),void this.positionService.setElement(r,s)}let f=dc(t,"detail","mousePosition");if(f){const t=dc(o,"zoomBar","top","type"),e=Tl.height[t];s&&(f[1]+=e+Tl.spacerHeight)}else f=Uo(dc(t,"detail","event"),e);u=f[0]/n>.9?Kg.LEFT:f[0]/n<.1?Kg.RIGHT:this.positionService.findBestPlacementAt({left:f[0],top:f[1]},r,c,(()=>({top:void 0,left:void 0,width:n,height:i}))),u===Kg.LEFT&&(h*=-1);const p=this.positionService.findPositionAt({left:f[0]+h,top:f[1]},r,u);this.positionService.setElement(r,p)}}const nv=class t extends $m{constructor(){super(...arguments),this.type="grid-brush",this.renderType=I.SVG,this.selectionSelector="rect.selection",this.frontSelectionSelector="rect.frontSelection"}render(e=!0){const n=this.parent,i=this.getComponentContainer({isPresentational:!0});if(!n)throw new Error("SVG was not defined");const r=Uf.appendOrSelect(n,"svg.chart-grid-backdrop"),o=Uf.appendOrSelect(r,`g.${this.type}`),s=Uf.appendOrSelect(o,this.selectionSelector),{width:a,height:l}=Uf.getSVGElementSize(r,{useAttrs:!0}),{cartesianScales:c}=this.services,u=c.getMainXScaleType(),h=c.getMainXScale(),[d]=h.range();i.attr("transform",`translate(${d},0)`);const f=Uf.appendOrSelect(i,this.frontSelectionSelector);if(h&&u===F.TIME){let e=this.model.get("zoomDomain");void 0===e&&(e=this.services.zoom.getDefaultZoomBarDomain(),e&&this.model.set({zoomDomain:e},{animate:!1}));const n=e=>{const n=e[1]-e[0];let i="0,"+n.toString();const r=Math.floor(l/t.DASH_LENGTH),o=r*t.DASH_LENGTH;for(let e=0;e<r;e++)i+=","+t.DASH_LENGTH;i+=","+(l-o),r%2==1&&(i+=",0"),i+=","+n.toString(),i+=","+l.toString(),f.attr("stroke-dasharray",i)},i=t=>{const e=t.selection;null===e||e[0]===e[1]||(f.attr("x",parseFloat(s.attr("x"))+parseFloat(r.attr("x"))).attr("y",s.attr("y")).attr("width",s.attr("width")).attr("height",s.attr("height")).style("cursor","pointer").style("display",null),n(e))},c=(t,n)=>{const i=$d().range([0,a]).domain(e);let r=[i.invert(t),i.invert(n)];r[0].valueOf()===r[1].valueOf()&&(r=this.services.zoom.getDefaultZoomBarDomain()),(e[0].valueOf()!==r[0].valueOf()||e[1].valueOf()!==r[1].valueOf())&&this.services.zoom.handleDomainChange(r)};let u;const h=t=>{const e=t.selection;null!==e&&(c(e[0],e[1]),o.call(u.move,null),f.style("display","none"))};0!=l&&0!=a&&(u=nm().extent([[0,0],[a-1,l]]).on("start brush end",i).on("end.brushed",h),o.call(u));const d=this.services.zoom.getZoomRatio();r.on("click",(function(t){if(t.shiftKey){const t=this.services.domUtils.getHolder(),e=Uo(o.node(),t)[0];let n=e-a*d/2;n<0&&(n=0);let i=e+a*d/2;i>a&&(i=a),c(n,i)}}))}}};nv.DASH_LENGTH=4;let iv=nv;class rv extends $m{constructor(){super(...arguments),this.type="zoom-bar",this.renderType=I.SVG,this.MIN_SELECTION_DIFF=9e-10,this.brushSelector="g.zoom-bar-brush",this.clipId="zoomBarClip-"+Math.floor(99999999999*Math.random()),this.brush=nm(),this.highlightStrokeWidth=1}init(){this.services.events.addEventListener(R.ZoomBar.UPDATE,this.render.bind(this));const t=dc(this.getOptions(),"zoomBar",U.TOP,"data");this.model.setZoomBarData(t)}render(t=!0){const e=this.getComponentContainer({ariaLabel:"zoom bar"}),n=this.services.zoom.isZoomBarLoading(U.TOP),i=this.services.zoom.isZoomBarLocked(U.TOP),r=dc(this.getOptions(),"zoomBar",U.TOP,"type"),o=dc(this.getOptions(),"axes",U.BOTTOM,"highlights"),s=Tl.height[r],{width:a}=Uf.getSVGElementSize(this.parent,{useAttrs:!0});if(0===a)return;let l=0;const c=this.model.get("axesMargins");c&&c.left&&(l=c.left);const u=Uf.appendOrSelect(e,"svg.zoom-container").attr("width","100%").attr("height",s).attr("opacity",1);if(Uf.appendOrSelect(e,"rect.zoom-spacer").attr("x",0).attr("y",s).attr("width","100%").attr("height",Tl.spacerHeight).attr("opacity",1).attr("fill","none"),r===B.GRAPH_VIEW?Uf.appendOrSelect(u,"rect.zoom-bg").attr("x",l).attr("y",0).attr("width",a-l).attr("height","100%").classed("zoom-bg-skeleton",n).style("stroke",n?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null):r===B.SLIDER_VIEW&&Uf.appendOrSelect(u,"rect.zoom-slider-bg").attr("x",l).attr("y",s/2-1).attr("width",a-l).attr("height",2).classed("zoom-slider-bg-skeleton",n).style("stroke",n?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null),n)return void this.renderSkeleton(u,l,a);const{cartesianScales:h}=this.services,d=h.getMainXScale(),f=h.getMainYScale(),p=h.getMainXScaleType();if(d&&p===F.TIME){let t=this.services.zoom.getZoomBarData();if(function(t){if(null==t)return!0;if(Te(t)&&(Bt(t)||"string"==typeof t||"function"==typeof t.splice||Pe(t)||je(t)||De(t)))return!t.length;var e=li(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(Oe(t))return!qe(t).length;for(var n in t)if(Ki.call(t,n))return!1;return!0}(t)||1===t.length)return;this.xScale=d.copy(),this.yScale=f.copy();const n=this.services.zoom.getDefaultZoomBarDomain(t);t=this.compensateDataForDefaultDomain(t,n);const c=this.model.get("initialZoomDomain"),h=dc(this.getOptions(),"zoomBar",U.TOP,"initialZoomDomain");h&&h[0]&&h[1]&&(h[0]=new Date(h[0]),h[1]=new Date(h[1])),!h||c&&c[0].valueOf()===h[0].valueOf()&&c[1].valueOf()===h[1].valueOf()?null===h&&null!==c&&this.model.set({initialZoomDomain:null,zoomDomain:Qi([],n)},{skipUpdate:!0}):this.model.set({initialZoomDomain:Qi([],h),zoomDomain:h?Qi([],h):n},{skipUpdate:!0}),this.xScale.range([l,a]).domain(n),this.maxSelectionRange=this.xScale.range(),this.yScale.range([0,s-6]).domain(lr(t,(t=>t.value)));const p=this.model.get("zoomDomain");if(r===B.GRAPH_VIEW&&(this.renderZoomBarArea(u,"path.zoom-graph-area-unselected",t,null),this.updateClipPath(e,this.clipId,0,0,0,0),this.renderZoomBarArea(u,"path.zoom-graph-area",t,this.clipId),this.renderZoomBarBaseline(u,l,a),o)){const t=o.highlightStartMapsTo,e=o.highlightEndMapsTo,n=o.color,i=o.labelMapsTo;o.data.forEach(((r,o)=>{Uf.appendOrSelect(u,`rect.highlight-${o}`).attr("height",s-2*this.highlightStrokeWidth).attr("y",this.highlightStrokeWidth).attr("x",this.xScale(r[t])).attr("width",this.xScale(r[e])-this.xScale(r[t])).style("fill",n&&n.scale[r[i]]?n.scale[r[i]]:null).style("fill-opacity",.1).style("stroke",n&&n.scale[r[i]]?n.scale[r[i]]:null).style("stroke-dasharray","2, 2").attr("stroke-width","1px")}))}this.addBrushEventListener(p,l,a);const m=Uf.appendOrSelect(e,this.brushSelector).call(this.brush);if(void 0!==p)if(p[0].valueOf()===p[1].valueOf())m.call(this.brush.move,this.xScale.range()),this.updateBrushHandle(this.getComponentContainer(),this.xScale.range());else{const t=p.map((t=>this.xScale(t)));t[1]-t[0]<this.MIN_SELECTION_DIFF||(m.call(this.brush.move,t),this.updateBrushHandle(this.getComponentContainer(),t))}i&&(this.brush.filter((()=>!1)),m.selectAll("rect").attr("cursor","auto"))}}addBrushEventListener(t,e,n){const i=dc(this.getOptions(),"zoomBar",U.TOP,"type"),r=Tl.height[i];this.brush.extent([[e,0],[n,r]]).on("start brush end",null).on("start brush end",(e=>{const n=e.selection;null===n?this.handleBrushedEvent(e,t,this.xScale,this.xScale.range()):n[0]===n[1]||this.handleBrushedEvent(e,t,this.xScale,n)}))}handleBrushedEvent(t,e,n,i){const r=[n.invert(i[0]),n.invert(i[1])];if(this.updateBrushHandle(this.getComponentContainer(),i),null!=t.sourceEvent&&("mousemove"===t.sourceEvent.type||"mouseup"===t.sourceEvent.type||"mousedown"===t.sourceEvent.type||"touchstart"===t.sourceEvent.type||"touchmove"===t.sourceEvent.type||"touchend"===t.sourceEvent.type)){let n;(void 0===e||e[0]!==r[0]||e[1]!==r[1])&&this.services.zoom.handleDomainChange(r,{dispatchEvent:!1}),"start"===t.type?n=R.ZoomBar.SELECTION_START:"brush"===t.type?n=R.ZoomBar.SELECTION_IN_PROGRESS:"end"===t.type&&(n=R.ZoomBar.SELECTION_END,this.services.events.dispatchEvent(R.ZoomDomain.CHANGE,{newDomain:r})),this.services.events.dispatchEvent(n,{selection:i,newDomain:r})}}updateBrushHandle(t,e){const n=this,i=Tl.handleWidth,r=dc(this.getOptions(),"zoomBar",U.TOP,"type"),o=Tl.height[r],s=-i/2,a=Tl.handleBarWidth,l=r===B.GRAPH_VIEW?Tl.handleBarHeight:6,c=-a/2,u=(o-l)/2;t.select(this.brushSelector).selectAll("rect.handle").data([{type:"w"},{type:"e"}]).attr("x",(function(t){return"w"===t.type?Math.max(e[0]+s,n.maxSelectionRange[0]):"e"===t.type?Math.min(e[1]+s,n.maxSelectionRange[1]-i):void 0})).attr("y",0).attr("width",i).attr("height",o).attr("cursor","ew-resize").style("display",null);const h=t.select(this.brushSelector).selectAll("rect.handle-bar").data([{type:"w"},{type:"e"}]);h.enter().append("rect").attr("class",(function(t){return"handle-bar handle-bar--"+t.type})),h.attr("x",(function(t){return"w"===t.type?Math.max(e[0]+c,n.maxSelectionRange[0]-s+c):"e"===t.type?Math.min(e[1]+c,n.maxSelectionRange[1]+s+c):void 0})).attr("y",u).attr("width",a).attr("height",l).attr("cursor","ew-resize"),r===B.SLIDER_VIEW&&this.updateSliderSelectedArea(e),this.updateClipPath(t,this.clipId,e[0],0,e[1]-e[0],o)}updateSliderSelectedArea(t){const e=dc(this.getOptions(),"zoomBar",U.TOP,"type"),n=Tl.height[e],i=this.getComponentContainer().select("svg.zoom-container");Uf.appendOrSelect(i,"rect.zoom-slider-selected-area").attr("x",t[0]).attr("y",n/2-1).attr("width",t[1]-t[0]).attr("height",2)}renderZoomBarArea(t,e,n,i){const{cartesianScales:r}=this.services,o=r.getMainXAxisPosition(),s=r.getMainYAxisPosition(),a=r.getMainXScaleType(),l=r.getMainYScaleType(),c=(t,e,n)=>i=>r.getValueFromScale(t,e,n,i),u=c(this.xScale,a,o),h=c(this.yScale,l,s),d=dc(this.getOptions(),"zoomBar",U.TOP,"type"),f=Tl.height[d],p=Um().x((t=>u(t))).y0(f).y1((t=>f-h(t))),m=Uf.appendOrSelect(t,e).datum(n).attr("d",p);i&&m.attr("clip-path",`url(#${i})`)}updateClipPath(t,e,n,i,r,o){const s=Uf.appendOrSelect(t,"clipPath").attr("id",e);Uf.appendOrSelect(s,"rect").attr("x",n).attr("y",i).attr("width",r).attr("height",o)}compensateDataForDefaultDomain(t,e){if(!t||t.length<2)return;const n=Oi(t),i=this.services.cartesianScales.getDomainIdentifier(),r=this.services.cartesianScales.getRangeIdentifier();if(Number(e[0])<Number(n[0][i])){const t={};t[i]=e[0],t[r]=0,n.unshift(t)}if(Number(e[1])>Number(n[n.length-1][i])){const t={};t[i]=e[1],t[r]=0,n.push(t)}return n}renderZoomBarBaseline(t,e,n,i=!1){const r=dc(this.model.getOptions(),"zoomBar",U.TOP,"type"),o=Tl.height[r],s=Nm()([[e,o],[n,o]]);Uf.appendOrSelect(t,"path.zoom-bg-baseline").attr("d",s).classed("zoom-bg-baseline-skeleton",i).style("stroke",i?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}renderSkeleton(t,e,n){this.renderZoomBarArea(t,"path.zoom-graph-area-unselected",[],null),this.renderZoomBarArea(t,"path.zoom-graph-area",[],this.clipId),this.brush.on("start brush end",null),Uf.appendOrSelect(this.getComponentContainer(),this.brushSelector).html(null),dc(this.getOptions(),"zoomBar",U.TOP,"type")===B.GRAPH_VIEW&&this.renderZoomBarBaseline(t,e,n,!0)}destroy(){this.brush.on("start brush end",null),this.services.events.removeEventListener(R.ZoomBar.UPDATE,this.render.bind(this))}}class ov extends $m{constructor(t,e){super(t,e),this.type="threshold",this.renderType=I.SVG,this.positionService=new tv}render(t=!1){const e=dc(this.getOptions(),"axes"),n=[];Object.keys(e).forEach((t=>{if(Object.values(U).includes(t)){const i=e[t];i.thresholds&&i.thresholds.length>0&&n.push({axisPosition:t,thresholds:i.thresholds,correspondingDatasets:null==i?void 0:i.correspondingDatasets,mapsTo:null==i?void 0:i.mapsTo})}}));const i=this.getComponentContainer({ariaLabel:"threshold lines",withinChartClip:!0}).selectAll("g.axis-thresholds").data(n,(t=>t.axisPosition));i.exit().attr("opacity",0).remove();const r=i.enter().append("g").merge(i);r.attr("class",(t=>`axis-thresholds ${t.axisPosition}`));const o=r.selectAll("g.threshold-group").data((t=>t.thresholds.map((e=>(e.axisPosition=t.axisPosition,e.datum=this.constructDatumObj(t,e),e)))));o.exit().attr("opacity",0).remove();const s=o.enter().append("g");s.append("line").attr("class","threshold-line"),s.append("rect").attr("class","threshold-hoverable-area"),s.merge(o).attr("class","threshold-group");const a=this;r.each((function({axisPosition:e}){const n=a.services.cartesianScales.getScaleByPosition(e),i=a.services.cartesianScales.getScaleTypeByPosition(e);let r=null,o=null;e===U.LEFT||e===U.RIGHT?(o=n,r=a.services.cartesianScales.getMainXScale()):(r=n,o=a.services.cartesianScales.getMainYScale());const s=i===F.LABELS,[l,c]=r.range(),[u,h]=o.range(),{cartesianScales:d}=a.services,f=d.getOrientation(),[p,m]=pc((t=>d.getDomainValue(t)),(t=>d.getRangeValue(t)),f),g=Tu(this);e===U.TOP||e===U.BOTTOM?(g.selectAll("line.threshold-line").transition().call((e=>a.services.transitions.setupTransition({transition:e,name:"threshold-line-update",animate:t}))).attr("y1",h).attr("y2",u).attr("x1",(({datum:t})=>p(t)+(s?n.step()/2:0))).attr("x2",(({datum:t})=>p(t)+(s?n.step()/2:0))).style("stroke",(({fillColor:t})=>t)),g.selectAll("rect.threshold-hoverable-area").attr("x",0).attr("y",(({datum:t})=>-p(t))).attr("width",Math.abs(u-h)).classed("rotate",!0)):(g.selectAll("line.threshold-line").transition().call((e=>a.services.transitions.setupTransition({transition:e,name:"threshold-line-update",animate:t}))).attr("x1",l).attr("x2",c).attr("y1",(({datum:t})=>m(t)+(s?n.step()/2:0))).attr("y2",(({datum:t})=>m(t)+(s?n.step()/2:0))).style("stroke",(({fillColor:t})=>t)),g.selectAll("rect.threshold-hoverable-area").attr("x",l).attr("y",(({datum:t})=>m(t))).attr("width",Math.abs(c-l)).classed("rotate",!1))})),this.services.events.addEventListener(R.Threshold.SHOW,(t=>{this.setThresholdLabelPosition(t.detail),this.label.classed("hidden",!1)})),this.services.events.addEventListener(R.Threshold.HIDE,(()=>{this.label.classed("hidden",!0)})),this.appendThresholdLabel(),this.addEventListeners()}getFormattedValue(t){const{value:e,axisPosition:n}=t,i=this.getOptions(),r=this.services.cartesianScales.getScaleTypeByPosition(n),{code:o,number:s}=dc(i,"locale");if(r===F.TIME){const t=[U.LEFT,U.RIGHT].includes(n),r=this.services.cartesianScales.getMainXScale(),o=this.services.cartesianScales.getMainYScale(),s=t?o:r,a=dc(i,"timeScale"),l=Vc(s.ticks(),dc(a,"timeInterval"));return zc(e,0,s.ticks(),l,a,i.locale)}return s(e,o)}appendThresholdLabel(){const t=Tu(this.services.domUtils.getHolder()),e=dc(this.getOptions(),"style","prefix");this.label=Uf.appendOrSelect(t,`div.${cl}--${e}--threshold--label`).classed("hidden",!0)}setThresholdLabelPosition({event:t,datum:e}){const n=this.services.domUtils.getHolder(),i=Uo(t,n),r=e.valueFormatter?e.valueFormatter(e.value):this.getFormattedValue(e);this.label.html($g(`${e.label||"Threshold"}: ${r}`)).style("background-color",e.fillColor);const o=this.label.node(),s=this.positionService.findBestPlacementAt({left:i[0],top:i[1]},o,[Kg.RIGHT,Kg.LEFT,Kg.TOP,Kg.BOTTOM],(()=>({top:void 0,left:void 0,width:n.offsetWidth,height:n.offsetHeight}))),a=this.positionService.findPositionAt({left:i[0],top:i[1]},o,s);this.positionService.setElement(o,a)}constructDatumObj(t,e){const n={};return t.correspondingDatasets&&(n.group=dc(t,"correspondingDatasets",0)),n[t.mapsTo]=e.value,n}addEventListeners(){const t=this;this.getComponentContainer({withinChartClip:!0}).selectAll("rect.threshold-hoverable-area").on("mouseover mousemove",(function(e){Tu(this.parentNode).select("line.threshold-line").classed("active",!0),t.services.events.dispatchEvent(R.Threshold.SHOW,{event:e,hoveredElement:Tu(this),datum:Tu(this).datum()})})).on("mouseout",(function(e){Tu(this.parentNode).select("line.threshold-line").classed("active",!1),t.services.events.dispatchEvent(R.Threshold.HIDE,{event:e,hoveredElement:Tu(this),datum:Tu(this).datum()})}))}}class sv extends $m{constructor(t,e){super(t,e),this.type="highlight",this.renderType=I.SVG,this.positionService=new tv,this.highlightStrokeWidth=1}render(t=!1){const e=dc(this.getOptions(),"axes"),n=[];Object.keys(e).forEach((t=>{if(Object.values(U).includes(t)){const i=e[t];i.highlights&&i.highlights.data.length>0&&n.push({axisPosition:t,highlightStartMapsTo:i.highlights.highlightStartMapsTo,highlightEndMapsTo:i.highlights.highlightEndMapsTo,labelMapsTo:i.highlights.labelMapsTo,highlight:i.highlights.data,color:i.highlights.color})}}));const i=this.getComponentContainer({ariaLabel:"highlight areas",withinChartClip:!0}).selectAll("g.axis-highlight").data(n,(t=>t.axisPosition));i.exit().attr("opacity",0).remove();const r=i.enter().append("g").merge(i);r.attr("class",(t=>`axis-highlight ${t.axisPosition}`));const o=r.selectAll("g.highlight-group").data((t=>t.highlight.map((e=>(e.axisPosition=t.axisPosition,e.highlightStartMapsTo=t.highlightStartMapsTo,e.labelMapsTo=t.labelMapsTo,e.color=t.color,e.highlightEndMapsTo=t.highlightEndMapsTo,e)))));o.exit().attr("opacity",0).remove();const s=o.enter().append("g");s.append("rect").attr("class","highlight-bar"),s.append("line").attr("class","highlight-line"),s.merge(o).attr("class","highlight-group");const a=this;r.each((function({axisPosition:e}){const n=a.services.cartesianScales.getMainXScale(),i=a.services.cartesianScales.getMainYScale(),[r,o]=n.range(),[s,l]=i.range(),{cartesianScales:c}=a.services,u=c.getOrientation(),[h,d]=pc((t=>c.getDomainValue(t)),(t=>c.getRangeValue(t)),u),f=Tu(this);e===U.TOP||e===U.BOTTOM?f.selectAll("rect.highlight-bar").transition().call((e=>a.services.transitions.setupTransition({transition:e,name:"highlight-bar-update",animate:t}))).attr("y",Math.max(l+a.highlightStrokeWidth,0)).attr("height",Math.max(s-2*a.highlightStrokeWidth,0)).attr("x",(({highlightStartMapsTo:t,...e})=>h(e[t]))).attr("width",(({highlightStartMapsTo:t,highlightEndMapsTo:e,...n})=>Math.max(h(n[e])-h(n[t]),0))).style("stroke",(({color:t,labelMapsTo:e,...n})=>t&&t.scale[n[e]]?t.scale[n[e]]:null)).style("stroke-dasharray","2, 2").attr("stroke-width",a.highlightStrokeWidth+"px").style("fill-opacity",.1).style("fill",(({color:t,labelMapsTo:e,...n})=>t&&t.scale[n[e]]?t.scale[n[e]]:null)):f.selectAll("rect.highlight-bar").transition().call((e=>a.services.transitions.setupTransition({transition:e,name:"highlight-bar-update",animate:t}))).attr("x",r).attr("width",Math.max(o-r,0)).attr("y",(({highlightEndMapsTo:t,...e})=>d(e[t]))).attr("height",(({highlightStartMapsTo:t,highlightEndMapsTo:e,...n})=>Math.max(d(n[t])-d(n[e]),0))).style("stroke",(({color:t,labelMapsTo:e,...n})=>t&&t.scale[n[e]]?t.scale[n[e]]:null)).style("stroke-dasharray","2, 2").attr("stroke-width",a.highlightStrokeWidth+"px").style("fill-opacity",.1).style("fill",(({color:t,labelMapsTo:e,...n})=>t&&t.scale[n[e]]?t.scale[n[e]]:null))}))}}class av extends ev{getItems(t){if(t.detail.items)return t.detail.items;const{data:e}=t.detail;if(!e||!e.length||!e[0])return[];const n=this.getOptions(),{cartesianScales:i}=this.services,r=i.getDomainIdentifier(),o=i.isDualAxes(),{groupMapsTo:s}=n.data,a=i.getDomainLabel();let l=i.getRangeLabel();const c=e[0][r];let u;if(1===e.length){const r=e[0],h=i.getRangeIdentifier(r);if(o){const t=i.getRangeAxisPosition({datum:r,groups:[r[s]]});l=i.getScaleLabel(t)}const d=r[h];u=[{label:a,value:c},...Array.isArray(d)&&2===d.length?[{label:"Start",value:d[0]},{label:"End",value:d[1]}]:[{label:l,value:r[h]}]],t.detail.additionalItems&&t.detail.additionalItems.forEach((t=>u.push({label:t.label,value:t.value}))),u.push({label:En(n,"locale.translations.group")||En(n,"tooltip.groupLabel"),value:r[s],color:this.model.getFillColor(r[s]),class:this.model.getColorClassName({classNameTypes:[N.TOOLTIP],dataGroupName:r[s]})})}else if(e.length>1&&(u=[{label:a,value:c}],u=u.concat(e.map((t=>{const e=t[i.getRangeIdentifier(t)];return{label:t[s],value:Array.isArray(e)&&2===e.length?`${e[0]} - ${e[1]}`:e,color:this.model.getFillColor(t[s]),class:this.model.getColorClassName({classNameTypes:[N.TOOLTIP],dataGroupName:t[s]})}})).sort(((t,e)=>e.value-t.value))),!o&&!0===dc(n,"tooltip","showTotal"))){const t=i.getRangeIdentifier();u.push({label:En(n,"locale.translations.total")||En(n,"tooltip.totalLabel")||"Total",value:e.reduce(((e,n)=>e+n[t]),0),bold:!0})}return u}}var lv=Math.PI,cv=2*lv,uv=1e-6,hv=cv-uv;function dv(){this._x0=this._y0=this._x1=this._y1=null,this._=""}dv.prototype=function(){return new dv}.prototype={constructor:dv,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,i){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+i)},bezierCurveTo:function(t,e,n,i,r,o){this._+="C"+ +t+","+ +e+","+ +n+","+ +i+","+(this._x1=+r)+","+(this._y1=+o)},arcTo:function(t,e,n,i,r){t=+t,e=+e,n=+n,i=+i,r=+r;var o=this._x1,s=this._y1,a=n-t,l=i-e,c=o-t,u=s-e,h=c*c+u*u;if(r<0)throw new Error("negative radius: "+r);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(h>uv)if(Math.abs(u*a-l*c)>uv&&r){var d=n-o,f=i-s,p=a*a+l*l,m=d*d+f*f,g=Math.sqrt(p),v=Math.sqrt(h),y=r*Math.tan((lv-Math.acos((p+h-m)/(2*g*v)))/2),_=y/v,b=y/g;Math.abs(_-1)>uv&&(this._+="L"+(t+_*c)+","+(e+_*u)),this._+="A"+r+","+r+",0,0,"+ +(u*d>c*f)+","+(this._x1=t+b*a)+","+(this._y1=e+b*l)}else this._+="L"+(this._x1=t)+","+(this._y1=e)},arc:function(t,e,n,i,r,o){t=+t,e=+e,o=!!o;var s=(n=+n)*Math.cos(i),a=n*Math.sin(i),l=t+s,c=e+a,u=1^o,h=o?i-r:r-i;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>uv||Math.abs(this._y1-c)>uv)&&(this._+="L"+l+","+c),n&&(h<0&&(h=h%cv+cv),h>hv?this._+="A"+n+","+n+",0,1,"+u+","+(t-s)+","+(e-a)+"A"+n+","+n+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):h>uv&&(this._+="A"+n+","+n+",0,"+ +(h>=lv)+","+u+","+(this._x1=t+n*Math.cos(r))+","+(this._y1=e+n*Math.sin(r))))},rect:function(t,e,n,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +i+"h"+-n+"Z"},toString:function(){return this._}},Array.prototype.slice;class fv extends $m{constructor(){super(...arguments),this.type="grid",this.renderType=I.SVG}render(t=!0){const e=dc(this.getOptions(),"grid","x","enabled"),n=dc(this.getOptions(),"grid","y","enabled");this.drawBackdrop(e,n),(e||n)&&(e&&(Uf.appendOrSelect(this.backdrop,"g.x.grid"),this.drawXGrid(t)),n&&(Uf.appendOrSelect(this.backdrop,"g.y.grid"),this.drawYGrid(t)))}drawXGrid(t){const e=this.parent,n=this.backdrop.attr("height"),i=Mp(this.services.cartesianScales.getMainXScale()).tickSizeInner(-n).tickSizeOuter(0);if(dc(this.getOptions(),"grid","x","alignWithAxisTicks")){const t=this.services.cartesianScales.getDomainAxisPosition(),e=dc(this.getOptions(),"axes",t,"ticks","values");e&&i.tickValues(e)}else{const t=dc(this.getOptions(),"grid","x","numberOfTicks");i.ticks(t)}const r=e.select(".x.grid").attr("transform",`translate(${-this.backdrop.attr("x")}, ${n})`);t?r.transition().call((e=>this.services.transitions.setupTransition({transition:e,name:"grid-update",animate:t}))).call(i):r.call(i),this.cleanGrid(r)}drawYGrid(t){const e=this.parent,n=this.backdrop.attr("width"),i=Ap(this.services.cartesianScales.getMainYScale()).tickSizeInner(-n).tickSizeOuter(0);if(dc(this.getOptions(),"grid","y","alignWithAxisTicks")){const t=this.services.cartesianScales.getRangeAxisPosition(),e=dc(this.getOptions(),"axes",t,"ticks","values");e&&i.tickValues(e)}else{const t=dc(this.getOptions(),"grid","y","numberOfTicks");i.ticks(t)}const r=e.select(".y.grid").attr("transform",`translate(0, ${-this.backdrop.attr("y")})`);t?r.transition().call((e=>this.services.transitions.setupTransition({transition:e,name:"grid-update",animate:t}))).call(i):r.call(i),this.cleanGrid(r)}getGridlineThreshold(t){const e=this.parent,n=e.selectAll(".x.grid .tick").nodes().sort(((t,e)=>Number(cc(t).tx)-Number(cc(e).tx)));let i=-1;if(!n.length)return;n.forEach((e=>{t[0]>=+cc(e).tx&&i++}));const r=i+1<n.length?i+1:n.length,o=n[i],s=n[r];let a;if(o)if(s)a=+cc(s).tx-+cc(o).tx;else{const t=e.select("rect.chart-grid-backdrop").node();a=Uf.getSVGElementSize(t).width-+cc(o).tx}else a=+cc(s).tx;const{threshold:l}=this.getOptions().tooltip.gridline;return a*l}getActiveGridline(t){const e=dc(this.getOptions,"tooltip","gridline","threshold")||this.getGridlineThreshold(t);return this.parent.selectAll(".x.grid .tick").filter((function(){const n=cc(this),i=Number(n.tx)-e,r=Number(n.tx)+e;return i<=t[0]&&t[0]<=r}))}drawBackdrop(t,e){const n=this.parent,i=this.services.cartesianScales.getMainXScale(),r=this.services.cartesianScales.getMainYScale(),[o,s]=i.range(),[a,l]=r.range();this.backdrop=Uf.appendOrSelect(n,"svg.chart-grid-backdrop").attr("role","presentation");const c=Uf.appendOrSelect(this.backdrop,t||e?"rect.chart-grid-backdrop.stroked":"rect.chart-grid-backdrop");this.backdrop.merge(c).attr("x",o).attr("y",l).attr("width",Math.abs(s-o)).attr("height",Math.abs(a-l)).lower(),c.attr("width","100%").attr("height","100%")}cleanGrid(t){t.selectAll("text").remove(),t.select(".domain").remove()}}class pv extends $m{constructor(){super(...arguments),this.type="line",this.renderType=I.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:e}=t.detail;this.parent.selectAll("path.line").transition("legend-hover-line").call((t=>this.services.transitions.setupTransition({transition:t,name:"legend-hover-line"}))).attr("opacity",(t=>t.name!==e.datum().name?_l:bl))},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.line").transition("legend-mouseout-line").call((t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-line"}))).attr("opacity",bl)}}init(){const{events:t}=this.services;t.addEventListener(R.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(R.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t=!0){const e=this.getComponentContainer({ariaLabel:"lines",withinChartClip:!0}),{cartesianScales:n,curves:i}=this.services,[r,o]=pc((t=>n.getDomainValue(t)),(t=>n.getRangeValue(t)),n.getOrientation()),s=this.getOptions(),a=Nm().x(r).y(o).curve(i.getD3Curve()).defined((t=>null!=t[n.getRangeIdentifier(t)]));let l=[];if(this.configs.stacked){const t=Object.keys(s.axes).some((t=>s.axes[t].percentage)),{groupMapsTo:e}=s.data;l=this.model.getStackedData({groups:this.configs.groups,percentage:t}).map((t=>{const n=this.services.cartesianScales.getDomainIdentifier(t),i=this.services.cartesianScales.getRangeIdentifier(t);return{name:dc(t,0,e),data:t.map((t=>({[n]:t.data.sharedStackKey,[e]:t[e],[i]:t[1]}))),hidden:!mp(t,(t=>t[0]!==t[1]))}}))}else l=this.model.getGroupedData(this.configs.groups);const c=e.selectAll("path.line").data(l,(t=>t.name));c.exit().attr("opacity",0).remove(),c.enter().append("path").classed("line",!0).attr("opacity",0).merge(c).data(l,(t=>t.name)).attr("class",(t=>this.model.getColorClassName({classNameTypes:[N.STROKE],dataGroupName:t.name,originalClassName:"line"}))).style("stroke",(t=>this.model.getStrokeColor(t.name,null,t.data))).attr("role",Zc.GRAPHICS_SYMBOL).attr("aria-roledescription","line").attr("aria-label",(t=>{const{data:e}=t;return e.map((t=>t[this.services.cartesianScales.getRangeIdentifier(t)])).join(",")})).transition().call((e=>this.services.transitions.setupTransition({transition:e,name:"line-update-enter",animate:t}))).attr("opacity",(t=>t.hidden?0:1)).attr("d",(t=>{const{data:e}=t;return a(e)}))}destroy(){const t=this.services.events;t.removeEventListener(R.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(R.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}}class mv extends $m{constructor(){super(...arguments),this.type="ruler",this.renderType=I.SVG,this.isXGridEnabled=dc(this.getOptions(),"grid","x","enabled"),this.isYGridEnabled=dc(this.getOptions(),"grid","y","enabled"),this.isEventListenerAdded=!1}render(t=!1){const e=dc(this.getOptions(),"ruler","enabled");this.drawBackdrop(),e&&!this.isEventListenerAdded?this.addBackdropEventListeners():!e&&this.isEventListenerAdded&&this.removeBackdropEventListeners()}removeBackdropEventListeners(){this.isEventListenerAdded=!1,this.backdrop.on("mousemove mouseover mouseout",null)}formatTooltipData(t){return t}showRuler(t,[e,n]){const i=this.parent,r=this.services.cartesianScales.getOrientation(),o=this.model.getDisplayData(),s=this.services.cartesianScales.getRangeScale(),[a,l]=s.range(),c=r===H.HORIZONTAL?n:e,u=Uf.appendOrSelect(i,"g.ruler").attr("aria-label","ruler"),h=Uf.appendOrSelect(u,"line.ruler-line"),d=i.selectAll("[role=graphics-symbol]"),f=o.map((t=>({domainValue:this.services.cartesianScales.getDomainValue(t),originalData:t}))).filter((t=>function(t,e){return t>e-5&&t<e+5}(t.domainValue,c)));if(this.pointsWithinLine&&f.length===this.pointsWithinLine.length&&f.map((t=>t.domainValue)).join()===this.pointsWithinLine.map((t=>t.domainValue)).join())return this.pointsWithinLine=f,this.services.events.dispatchEvent(R.Tooltip.MOVE,{mousePosition:[e,n]});this.pointsWithinLine=f;const p=this.pointsWithinLine.reduce(((t,e)=>{if(0===t.length)return t.push(e),t;const n=t[0].domainValue,i=Math.abs(c-e.domainValue),r=Math.abs(c-n);return i>r||(i<r?t=[e]:t.push(e)),t}),[]);if(p.length>0){const i=p.map((t=>t.originalData)).filter((t=>null!=t[this.services.cartesianScales.getRangeIdentifier(t)])),o=p.map((t=>t.domainValue)),s=d.filter((t=>{const e=this.services.cartesianScales.getDomainValue(t);return o.includes(e)}));this.elementsToHighlight&&this.elementsToHighlight.size()>0&&!function(t,e){return Hi(t,e)}(this.elementsToHighlight,s)&&this.hideRuler(),s.dispatch("mouseover"),this.elementsToHighlight=s,this.services.events.dispatchEvent(R.Tooltip.SHOW,{event:t,mousePosition:[e,n],hoveredElement:h,data:this.formatTooltipData(i)}),u.attr("opacity",1);const c=p[0];"horizontal"===r?h.attr("x1",l).attr("x2",a).attr("y1",c.domainValue).attr("y2",c.domainValue):h.attr("y1",l).attr("y2",a).attr("x1",c.domainValue).attr("x2",c.domainValue)}else this.hideRuler()}hideRuler(){const t=this.parent,e=Uf.appendOrSelect(t,"g.ruler");t.selectAll("[role=graphics-symbol]").dispatch("mouseout"),this.services.events.dispatchEvent(R.Tooltip.HIDE),e.attr("opacity",0)}addBackdropEventListeners(){this.isEventListenerAdded=!0;const t=this,e=this.services.domUtils.getHolder(),n=this.model.getDisplayData();let i=function(e){const n=Uo(e,t.parent.node());t.showRuler(e,n)};n.length>100&&(i=function(t,e,n){let i=null;return function(...r){const o=this;o.mousePosition=Uo(r[0],n),clearTimeout(i),i=setTimeout((function(){t.apply(o,r)}),e)}}((function(e){const{mousePosition:n}=this;t.showRuler(e,n)}),n.length%50*12.5,e)),this.backdrop.on("mousemove mouseover",i).on("mouseout",this.hideRuler.bind(this))}drawBackdrop(){const t=this.parent;this.backdrop=Uf.appendOrSelect(t,"svg.chart-grid-backdrop")}}let gv=class extends $m{constructor(){super(...arguments),this.type="scatter",this.renderType=I.SVG,this.handleChartHolderOnHover=()=>{if(!this.parent)throw new Error("Parent not defined");this.parent.selectAll("circle.dot").transition("chart-holder-hover-scatter").call((t=>{var e;return null==(e=this.services.transitions)?void 0:e.setupTransition({transition:t,name:"chart-holder-hover-scatter"})})).attr("opacity",1)},this.handleChartHolderOnMouseOut=()=>{if(!this.parent)throw new Error("Parent not defined");this.parent.selectAll("circle.dot").transition("chart-holder-mouseout-scatter").call((t=>{var e;return null==(e=this.services.transitions)?void 0:e.setupTransition({transition:t,name:"chart-holder-mouseout-scatter"})})).attr("opacity",0)},this.handleLegendOnHover=t=>{const{hoveredElement:e}=t.detail,{groupMapsTo:n}=this.getOptions().data;if(!this.parent)throw new Error("Parent not defined");this.parent.selectAll("circle.dot").transition("legend-hover-scatter").call((t=>{var e;return null==(e=this.services.transitions)?void 0:e.setupTransition({transition:t,name:"legend-hover-scatter"})})).attr("opacity",(t=>t[n]!==e.datum().name?.3:1))},this.handleLegendMouseOut=()=>{if(!this.parent)throw new Error("Parent not defined");this.parent.selectAll("circle.dot").transition("legend-mouseout-scatter").call((t=>{var e;return null==(e=this.services.transitions)?void 0:e.setupTransition({transition:t,name:"legend-mouseout-scatter"})})).attr("opacity",1)}}init(){const{events:t}=this.services;if(!t)throw new Error("Services events are undefined.");t.addEventListener(R.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(R.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut);const{fadeInOnChartHolderMouseover:e}=this.configs;e&&(t.addEventListener(R.Chart.MOUSEOVER,this.handleChartHolderOnHover),t.addEventListener(R.Chart.MOUSEOUT,this.handleChartHolderOnMouseOut))}filterBasedOnZoomDomain(t){const{cartesianScales:e}=this.services;if(!e)throw new Error("Services cartesianScales are undefined.");const n=e.getDomainIdentifier(t),i=this.model.get("zoomDomain");return void 0!==i?t.filter((t=>t[n].getTime()>=i[0].getTime()&&t[n].getTime()<=i[1].getTime())):t}getScatterData(){const t=this.getOptions(),{stacked:e}=this.configs;let n;if(e){const e=Object.keys(t.axes).some((e=>t.axes[e].percentage));n=this.model.getStackedData({groups:this.configs.groups,percentage:e})}else{const{cartesianScales:t}=this.services;if(!t)throw new Error("Services cartesianScales are undefined.");n=this.model.getDisplayData(this.configs.groups).filter((e=>{const n=t.getRangeIdentifier(e);return void 0!==e[n]&&null!==e[n]}))}return this.filterBasedOnZoomDomain(n)}render(t){if(!dc(this.getOptions(),"points","enabled")&&!dc(this.getOptions(),"bubble","enabled"))return;const e=this.getComponentContainer({ariaLabel:"scatter points",withinChartClip:!0}),n=this.getOptions(),{groupMapsTo:i}=n.data,{cartesianScales:r}=this.services;if(!r)throw new Error("Services cartesianScales are undefined.");const o=r.getDomainIdentifier(),s=e.selectAll("circle.dot").data(this.getScatterData(),(t=>`${t[i]}-${t[o]}`));s.exit().attr("opacity",0).remove();const a=s.enter().append("circle").classed("dot",!0).attr("opacity",0).merge(s);this.styleCircles(a,t),this.addEventListeners()}isDatapointThresholdAnomaly(t){const{handleThresholds:e}=this.configs;if(!e)return!1;const{cartesianScales:n}=this.services;if(!n)throw new Error("Cartesian scales service is undefined");const i=n.getOrientation(),[r,o]=pc(n.getHighestDomainThreshold(),n.getHighestRangeThreshold(),i),[s,a]=pc((t=>n.getDomainValue(t)),(t=>n.getRangeValue(t)),i),l=s(t),c=a(t);return o&&r?c<=o.scaleValue&&l>=r.scaleValue:o?c<=o.scaleValue:!!r&&l>=r.scaleValue}styleCircles(t,e){const n=this.getOptions(),{filled:i,fillOpacity:r}=n.points,{cartesianScales:o}=this.services;if(!o)throw new Error("Cartesian scales service is undefined");const{groupMapsTo:s}=n.data,[a,l]=pc((t=>o.getDomainValue(t)),(t=>o.getRangeValue(t)),o.getOrientation()),{fadeInOnChartHolderMouseover:c}=this.configs;t.raise().classed("dot",!0).attr("class",(t=>{const e=o.getDomainIdentifier(t),n=this.model.getIsFilled(t[s],t[e],t,i)?[N.FILL,N.STROKE]:[N.STROKE];return this.model.getColorClassName({classNameTypes:n,dataGroupName:t[s],originalClassName:"dot"})||""})).classed("threshold-anomaly",(t=>this.isDatapointThresholdAnomaly(t))).classed("filled",(t=>{const e=o.getDomainIdentifier(t);return this.model.getIsFilled(t[s],t[e],t,i)})).classed("unfilled",(t=>{const e=o.getDomainIdentifier(t);return!this.model.getIsFilled(t[s],t[e],t,i)})).transition().call((t=>{var n;return null==(n=this.services.transitions)?void 0:n.setupTransition({transition:t,name:"scatter-update-enter",animate:e})})).attr("cx",a).attr("cy",l).attr("r",n.points.radius).style("fill",(t=>{const e=o.getDomainIdentifier(t);if(this.model.getIsFilled(t[s],t[e],t,i))return this.model.getFillColor(t[s],t[e],t)})).style("stroke",(t=>{const e=o.getDomainIdentifier(t);return this.model.getStrokeColor(t[s],t[e],t)})).attr("fill-opacity",i?r:1).attr("opacity",c?0:1).attr("role",Zc.GRAPHICS_SYMBOL).attr("aria-roledescription","point").attr("aria-label",(t=>t[o.getRangeIdentifier(t)])),this.addEventListeners()}getTooltipAdditionalItems(t){return null}addEventListeners(){const t=this,{groupMapsTo:e}=t.getOptions().data;if(!this.parent)throw new Error("Parent not defined");this.parent.selectAll("circle").on("mouseover",(function(n,i){var r,o;const s=Tu(this);s.classed("hovered",!0).attr("class",(n=>t.model.getColorClassName({classNameTypes:[N.FILL],dataGroupName:n[e],originalClassName:s.attr("class")}))).style("fill",(n=>{var i;const r=null==(i=t.services.cartesianScales)?void 0:i.getDomainIdentifier(n);return t.model.getFillColor(n[e],n[r],n)})).classed("unfilled",!1),null==(r=t.services.events)||r.dispatchEvent(R.Tooltip.SHOW,{event:n,hoveredElement:s,data:[i],additionalItems:t.getTooltipAdditionalItems(i)}),null==(o=t.services.events)||o.dispatchEvent(R.Scatter.SCATTER_MOUSEOVER,{event:n,element:s,datum:i})})).on("mousemove",(function(e,n){var i,r;const o=Tu(this);null==(i=t.services.events)||i.dispatchEvent(R.Scatter.SCATTER_MOUSEMOVE,{event:e,element:o,datum:n}),null==(r=t.services.events)||r.dispatchEvent(R.Tooltip.MOVE,{event:e})})).on("click",(function(e,n){var i;null==(i=t.services.events)||i.dispatchEvent(R.Scatter.SCATTER_CLICK,{event:e,element:Tu(this),datum:n})})).on("mouseout",(function(n,i){var r,o,s;const a=Tu(this);if(a.classed("hovered",!1),!t.configs.filled){const{filled:n}=t.getOptions().points,o=null==(r=t.services.cartesianScales)?void 0:r.getDomainIdentifier(i),s=t.model.getIsFilled(i[e],i[o],i,n);a.classed("unfilled",!s).style("fill",(i=>s||n?t.model.getFillColor(i[e],i[o],i):null))}null==(o=t.services.events)||o.dispatchEvent(R.Scatter.SCATTER_MOUSEOUT,{event:n,element:a,datum:i}),null==(s=t.services.events)||s.dispatchEvent(R.Tooltip.HIDE,{hoveredElement:a})}))}destroy(){var t;null==(t=this.parent)||t.selectAll("circle").on("mousemove",null).on("mouseout",null);const{events:e}=this.services;if(!e)throw new Error("Services events undefined");e.removeEventListener(R.Legend.ITEM_HOVER,this.handleLegendOnHover),e.removeEventListener(R.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),e.removeEventListener(R.Chart.MOUSEOVER,this.handleChartHolderOnHover),e.removeEventListener(R.Chart.MOUSEOUT,this.handleChartHolderOnMouseOut)}};class vv extends $m{constructor(t,e,n){super(t,e,n),this.type="axes",this.renderType=I.SVG,this.truncation={[U.LEFT]:!1,[U.RIGHT]:!1,[U.TOP]:!1,[U.BOTTOM]:!1},n&&(this.configs=n),this.margins=this.configs.margins}render(t=!0){const{position:e}=this.configs,n=this.getOptions(),i=dc(n,"axes",e,"visible"),r=this.getComponentContainer({ariaLabel:"axes"}),{width:o,height:s}=Uf.getSVGElementSize(r,{useAttrs:!0}),a=Uf.appendOrSelect(r,`g.axis.${e}`);let l,c;if(e===U.BOTTOM||e===U.TOP?(l=this.configs.axes[U.LEFT]?this.margins.left:0,c=this.configs.axes[U.RIGHT]?o-this.margins.right:o):(l=s-this.margins.bottom,c=this.margins.top),!this.services.cartesianScales)throw new Error("Services cartesianScales undefined");const u=this.services.cartesianScales.getScaleByPosition(e);let h;switch(this.scaleType===F.LABELS||this.scaleType===F.LABELS_RATIO?u.rangeRound([l,c]):u.range([l,c]),e){case U.LEFT:h=Ap;break;case U.BOTTOM:h=Mp;break;case U.RIGHT:h=Op;break;case U.TOP:h=Sp}a.attr("aria-label",`${e} axis`);const d=!a.select("g.ticks").empty();let f=Uf.appendOrSelect(a,"g.ticks");d||(f.attr("role",`${Zc.GRAPHICS_OBJECT} ${Zc.GROUP}`),f.attr("aria-label",`${e} ticks`));const p=Uf.appendOrSelect(a,"g.ticks.invisible").style("opacity","0").style("pointer-events","none").attr("aria-hidden",!0).attr("aria-label",`invisible ${e} ticks`),m=dc(n,"axes",e),g=this.scaleType===F.TIME||m.scaleType===F.TIME,v=e===U.LEFT||e===U.RIGHT,y=this.model.get("zoomDomain");if(y&&g&&!v&&u.domain(y),!i)return void f.attr("aria-hidden",!0);const _=dc(m,"scaleType"),b=dc(n,"data","loading"),w=dc(m,"ticks","number"),x=dc(m,"ticks","values"),E=dc(m,"truncation","type"),T=dc(m,"truncation","threshold"),S=dc(m,"truncation","numCharacter"),O=null!==w,M=dc(n,"timeScale"),A=Uf.appendOrSelect(p,"g.tick"),C=Uf.appendOrSelect(A,"text").text("0"),k=Uf.getSVGElementSize(C.node(),{useBBox:!0}).height;A.remove();const D=this.scaleType||m.scaleType||F.LINEAR,L=h(u).tickSizeOuter(0);if(u.ticks){let t;if(O?t=w:(t=ul,v&&(t=this.getNumberOfFittingTicks(s,k,hl))),1===u.ticks().length&&0===u.ticks()[0]&&(t=0),L.ticks(t),g)if(u.ticks(t).length){const i=dc(n,"timeScale","addSpaceOnEdges"),r=dc(n,"axes",e,"domain"),o=u.copy();i&&!r&&o.nice(t);const s=o.ticks(t);i&&s.length>2&&!r&&(s.splice(s.length-1,1),s.splice(0,1)),L.tickValues(s)}else L.tickValues([])}let R;const I=dc(m,"ticks","formatter"),{code:P,number:N}=dc(n,"locale");if(g){const t=Vc(L.tickValues(),dc(n,"timeScale","timeInterval"));R=null===I?(e,i)=>zc(e,i,L.tickValues(),t,M,n.locale):(e,i)=>{const r=zc(e,i,L.tickValues(),t,M,n.locale);return I(e,i,r)}}else null===I?D===F.LINEAR&&(R=t=>N(t,P)):R=I;L.tickFormat(R);const[B,H]=this.services.cartesianScales.getScaleByPosition(e).domain();let z;if(x){if(g)x.forEach(((t,e)=>{void 0===t.getTime&&(x[e]=new Date(t))})),z=x.filter((t=>{const e=t.getTime();return e>=new Date(B).getTime()&&e<=new Date(H).getTime()}));else if(_===F.LABELS){const t=this.services.cartesianScales.getScaleByPosition(e).domain();z=x.filter((e=>t.includes(e)))}else z=x.filter((t=>t>=B&&t<=H));L.tickValues(z)}switch(e){case U.LEFT:f.attr("transform",`translate(${this.margins.left}, 0)`);break;case U.BOTTOM:f.attr("transform",`translate(0, ${s-this.margins.bottom})`);break;case U.RIGHT:f.attr("transform",`translate(${o-this.margins.right}, 0)`);break;case U.TOP:f.attr("transform",`translate(0, ${this.margins.top})`)}const j=this.model.isDataEmpty();if(m.title){const t=Uf.appendOrSelect(a,"text.axis-title").html(j||b?"":$g(m.title)),n=dc(m,"titleOrientation");let i;switch(e){case U.LEFT:n===tt.RIGHT?t.attr("transform","rotate(90)").attr("y",0).attr("x",u.range()[0]/2).attr("dy","-0.5em").style("text-anchor","middle"):t.attr("transform","rotate(-90)").attr("y",0).attr("x",-u.range()[0]/2).attr("dy","0.75em").style("text-anchor","middle");break;case U.BOTTOM:t.attr("transform",`translate(${this.margins.left/2+u.range()[1]/2}, ${s+4})`).style("text-anchor","middle");break;case U.RIGHT:n===tt.LEFT?t.attr("transform","rotate(-90)").attr("y",o).attr("x",-u.range()[0]/2).style("text-anchor","middle"):t.attr("transform","rotate(90)").attr("y",-o).attr("x",u.range()[0]/2).attr("dy","0.75em").style("text-anchor","middle");break;case U.TOP:i=Uf.getSVGElementSize(t,{useBBox:!0}).height,t.attr("transform",`translate(${this.margins.left/2+u.range()[1]/2}, ${i/2})`).style("text-anchor","middle")}}if(g){const e=Vc(L.tickValues(),dc(n,"timeScale","timeInterval")),i=M.showDayName,r=f;t&&(f=f.transition().call((e=>this.services.transitions.setupTransition({transition:e,name:"axis-update",animate:t})))),f=f.call(L),r.selectAll(".tick").data(L.tickValues(),u).order().select("text").attr("class",((t,n)=>Fc(t,n,L.tickValues(),e,i)?"tick-label--primary":"tick-label"))}else f=t&&d?f.transition().call((e=>this.services.transitions.setupTransition({transition:e,name:"axis-update",animate:t}))).call(L):f.call(L);if(p.call(L),e===U.BOTTOM||e===U.TOP){let t=!1;const n=dc(m,"ticks","rotation");if(n===K.ALWAYS)t=!0;else if(n===K.NEVER)t=!1;else if(!n||n===K.AUTO)if(u.step)t=p.selectAll("g.tick text").nodes().some((t=>Uf.getSVGElementSize(t,{useBBox:!0}).width>=u.step()));else{t=!1;const e=p.append("text").text("A"),n=Uf.getSVGElementSize(e.node(),{useBBox:!0}).width;let i;p.selectAll("g.tick").each((function(){const e=Tu(this),r=parseFloat(dc(cc(this),"tx"));null!==r&&i+e.text().length*n*.8>=r&&(t=!0),i=r})),e.remove()}t?(O||(L.ticks(this.getNumberOfFittingTicks(o,k,dl)),p.call(L),f.call(L)),a.selectAll("g.ticks g.tick text").attr("transform","rotate(-45)").attr("text-anchor",e===U.TOP?"start":"end")):a.selectAll("g.ticks g.tick text").attr("transform",null).attr("text-anchor",null)}if(b?a.attr("opacity",0):a.attr("opacity",1),f.selectAll("g.tick").attr("aria-label",(t=>t)),p.selectAll("g.tick").attr("aria-label",(t=>t)),E!==$.NONE&&_===F.LABELS&&!x){const t=this.services.cartesianScales.getScaleDomain(e);if(t.length>0){const n=r.select(`g.axis.${e} g.ticks g.tick`).html();a.selectAll("g.ticks g.tick").html(n);const i=this;a.selectAll("g.tick text").data(t).text((function(t){return t.length>T?(i.truncation[e]=!0,uc(t,E,S)):t})),this.getInvisibleAxisRef().selectAll("g.tick text").data(t).text((function(t){return t.length>T?uc(t,E,S):t})),a.selectAll("g.ticks").html(this.getInvisibleAxisRef().html()),a.selectAll("g.tick text").data(t)}}this.addEventListeners()}addEventListeners(){const t=this.getComponentContainer(),{position:e}=this.configs,n=Uf.appendOrSelect(t,`g.axis.${e}`),i=this.getOptions(),r=dc(i,"axes",e),o=dc(r,"scaleType"),s=dc(r,"truncation","threshold"),a=this;n.selectAll("g.tick text").on("mouseover",(function(t,e){a.services.events.dispatchEvent(R.Axis.LABEL_MOUSEOVER,{event:t,element:Tu(this),datum:e}),o===F.LABELS&&e.length>s&&a.services.events.dispatchEvent(R.Tooltip.SHOW,{event:t,hoveredElement:Tu(this),content:e})})).on("mousemove",(function(t,e){a.services.events.dispatchEvent(R.Axis.LABEL_MOUSEMOVE,{event:t,element:Tu(this),datum:e}),o===F.LABELS&&e.length>s&&a.services.events.dispatchEvent(R.Tooltip.MOVE,{event:t})})).on("click",(function(t,e){a.services.events.dispatchEvent(R.Axis.LABEL_CLICK,{event:t,element:Tu(this),datum:e})})).on("mouseout",(function(t,e){a.services.events.dispatchEvent(R.Axis.LABEL_MOUSEOUT,{event:t,element:Tu(this),datum:e}),o===F.LABELS&&a.services.events.dispatchEvent(R.Tooltip.HIDE)}))}getInvisibleAxisRef(){const{position:t}=this.configs;return this.getComponentContainer().select(`g.axis.${t} g.ticks.invisible`)}getTitleRef(){const{position:t}=this.configs;return this.getComponentContainer().select(`g.axis.${t} text.axis-title`)}getNumberOfFittingTicks(t,e,n){return function(t,e,n){return void 0===n&&(n=e,e=void 0),void 0!==n&&(n=(n=bu(n))==n?n:0),void 0!==e&&(e=(e=bu(e))==e?e:0),function(t,e,n){return t==t&&(void 0!==n&&(t=t<=n?t:n),void 0!==e&&(t=t>=e?t:e)),t}(bu(t),e,n)}(Math.floor(t/(e*n)),2,ul)}destroy(){const t=this.getComponentContainer(),{position:e}=this.configs;Uf.appendOrSelect(t,`g.axis.${e}`).selectAll("g.tick text").on("mouseover",null).on("mousemove",null).on("mouseout",null)}}class yv extends vv{constructor(t,e,n){super(t,e,n)}render(t=!0){super.render(t),super.destroy();const e=this.configs.position,n=this.getComponentContainer({ariaLabel:"axes"}),i=Uf.appendOrSelect(n,`g.axis.${e}`),r=this;i.selectAll("g.tick").each((function(t,n){const i=Tu(this);i.classed("tick-hover",!0).attr("tabindex",0===n?0:-1);const o=i.select("text"),{width:s,height:a}=Uf.getSVGElementSize(o,{useBBox:!0}),l=Uf.appendOrSelect(i,"rect.axis-holder");let c=0,u=0;switch(e){case U.LEFT:c=-s+Number(o.attr("x")),u=-a/2;break;case U.RIGHT:c=Math.abs(Number(o.attr("x"))),u=-a/2;break;case U.TOP:c=-s/2,u=-a+Number(o.attr("y"))/2,r.truncation[e]&&(c=0,l.attr("transform","rotate(-45)"));break;case U.BOTTOM:c=-s/2,u=a/2-2,r.truncation[e]&&(c=-s,l.attr("transform","rotate(-45)"))}l.attr("x",c-pl).attr("y",u).attr("width",s+2*pl).attr("height",a).lower()})),this.addEventListeners()}addEventListeners(){const t=this.getComponentContainer(),{position:e}=this.configs,n=Uf.appendOrSelect(t,`g.axis.${e}`),i=this.getOptions(),r=dc(i,"axes",e),o=dc(r,"scaleType"),s=dc(r,"truncation","threshold"),a=this;n.selectAll("g.tick.tick-hover").on("mouseover",(function(t){const e=Tu(this).select("text"),n=e.datum();a.services.events.dispatchEvent(R.Axis.LABEL_MOUSEOVER,{event:t,element:e,datum:n}),o===F.LABELS&&n.length>s&&a.services.events.dispatchEvent(R.Tooltip.SHOW,{event:t,element:e,datum:n})})).on("mousemove",(function(t){const e=Tu(this).select("text"),n=e.datum();a.services.events.dispatchEvent(R.Axis.LABEL_MOUSEMOVE,{event:t,element:e,datum:n}),a.services.events.dispatchEvent(R.Tooltip.MOVE,{event:t})})).on("click",(function(t){a.services.events.dispatchEvent(R.Axis.LABEL_CLICK,{event:t,element:Tu(this).select("text"),datum:Tu(this).select("text").datum()})})).on("mouseout",(function(t){a.services.events.dispatchEvent(R.Axis.LABEL_MOUSEOUT,{event:t,element:Tu(this).select("text"),datum:Tu(this).select("text").datum()}),o===F.LABELS&&a.services.events.dispatchEvent(R.Tooltip.HIDE)})).on("focus",(function(t){const e={clientX:0,clientY:0};if(t.target){t.target.focus();const n=t.target.getBoundingClientRect();e.clientX=n.x,e.clientY=n.y}a.services.events.dispatchEvent(R.Axis.LABEL_FOCUS,{event:{...t,...e},element:Tu(this),datum:Tu(this).select("text").datum()})})).on("blur",(function(t){a.services.events.dispatchEvent(R.Axis.LABEL_BLUR,{event:t,element:Tu(this),datum:Tu(this).select("text").datum()})})).on("keydown",(function(t){t.key&&"Escape"===t.key&&(a.services.events.dispatchEvent(R.Tooltip.HIDE),a.services.events.dispatchEvent(R.Axis.LABEL_BLUR,{event:t,element:Tu(this),datum:Tu(this).select("text").datum()})),e===U.LEFT||e===U.RIGHT?t.key&&"ArrowUp"===t.key?a.goNext(this,t):t.key&&"ArrowDown"===t.key&&a.goPrevious(this,t):t.key&&"ArrowLeft"===t.key?a.goPrevious(this,t):t.key&&"ArrowRight"===t.key&&a.goNext(this,t)}))}goNext(t,e){t.nextElementSibling&&"path"!==t.nextElementSibling.tagName&&t.nextElementSibling.dispatchEvent(new Event("focus")),e.preventDefault()}goPrevious(t,e){t.previousElementSibling&&"path"!==t.previousElementSibling.tagName&&t.previousElementSibling.dispatchEvent(new Event("focus")),e.preventDefault()}destroy(){const t=this.getComponentContainer(),{position:e}=this.configs;Uf.appendOrSelect(t,`g.axis.${e}`).selectAll("g.tick.tick-hover").on("mouseover",null).on("mousemove",null).on("mouseout",null).on("focus",null).on("blur",null)}}class _v extends $m{constructor(){super(...arguments),this.type="2D-axes",this.renderType=I.SVG,this.children={},this.thresholds=[],this.margins={top:0,right:0,bottom:0,left:0}}render(t=!1){const e={},n=Object.keys(U),i=dc(this.getOptions(),"axes");n.forEach((t=>{i[U[t]]&&(e[U[t]]=!0)})),this.configs.axes=e,n.forEach((t=>{const e=U[t];if(this.configs.axes[e]&&!this.children[e]){const t={position:e,axes:this.configs.axes,margins:this.margins},n=this.model.axisFlavor===it.DEFAULT?new vv(this.model,this.services,t):new yv(this.model,this.services,t);n.setModel(this.model),n.setServices(this.services),n.setParent(this.parent),this.children[e]=n}})),Object.keys(this.children).forEach((e=>{this.children[e].render(t)}));const r={};Object.keys(this.children).forEach((t=>{const e=this.children[t],n=e.configs.position,i=e.getInvisibleAxisRef(),{width:o,height:s}=Uf.getSVGElementSize(i,{useBBox:!0});let a;switch(e.getTitleRef().empty()?a=0:(a=Uf.getSVGElementSize(e.getTitleRef(),{useBBox:!0}).height,(n===U.LEFT||n===U.RIGHT)&&(a+=5)),n){case U.TOP:r.top=s+a;break;case U.BOTTOM:r.bottom=s+a;break;case U.LEFT:r.left=o+a;break;case U.RIGHT:r.right=o+a}})),this.services.events.dispatchEvent(R.Axis.RENDER_COMPLETE),Object.keys(r).some((t=>this.margins[t]!==r[t]))&&(this.margins=Object.assign(this.margins,r),this.model.set({axesMargins:this.margins},{skipUpdate:!0}),this.services.events.dispatchEvent(R.ZoomBar.UPDATE),Object.keys(this.children).forEach((t=>{this.children[t].margins=this.margins})),this.render(!0))}}class bv extends $m{constructor(){super(...arguments),this.type="skeleton"}render(t=!0){const e=dc(this.getOptions(),"data","loading");e?this.renderSkeleton(e):this.removeSkeleton()}renderSkeleton(t){if(this.configs.skeleton===q.GRID)this.renderGridSkeleton(t);else if(this.configs.skeleton===q.VERT_OR_HORIZ)this.renderVertOrHorizSkeleton(t);else if(this.configs.skeleton===q.PIE)this.renderPieSkeleton(t);else{if(this.configs.skeleton!==q.DONUT)throw new Error(`"${this.configs.skeleton}" is not a valid Skeleton type.`);this.renderDonutSkeleton(t)}}renderGridSkeleton(t){this.setScales(),this.drawBackdrop(t),this.drawXGrid(t),this.drawYGrid(t),t&&this.setShimmerEffect("shimmer-lines")}renderVertOrHorizSkeleton(t){const e=this.services.cartesianScales.getOrientation();this.setScales(),this.drawBackdrop(t),e===H.VERTICAL&&this.drawYGrid(t),e===H.HORIZONTAL&&this.drawXGrid(t),this.setShimmerEffect("shimmer-lines")}renderPieSkeleton(t){const e=this.computeOuterRadius();this.drawRing(e,0,t),t&&this.setShimmerEffect("shimmer-areas")}renderDonutSkeleton(t){const e=this.computeOuterRadius(),n=this.computeInnerRadius();this.drawRing(e,n,t),t&&this.setShimmerEffect("shimmer-areas")}setScales(){const t=this.services.cartesianScales.getMainXScale().range(),e=this.services.cartesianScales.getMainYScale().range();this.xScale=al().domain([0,1]).range(t),this.yScale=al().domain([0,1]).range(e)}drawBackdrop(t){const e=this.parent,{width:n,height:i}=Uf.getSVGElementSize(e,{useAttrs:!0});this.backdrop=Uf.appendOrSelect(e,"svg.chart-skeleton.DAII").attr("width",n).attr("height",i);const r=Uf.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop");r.attr("width","100%").attr("height","100%");const[o]=this.xScale.range(),[,s]=this.yScale.range();this.backdrop.merge(r).attr("x",o).attr("y",s),r.classed("shimmer-effect-lines",t).classed("empty-state-lines",!t).style("stroke",t?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}drawXGrid(t){const e=+this.backdrop.attr("width"),n=dc(this.getOptions(),"grid","x","numberOfTicks"),i=this.xScale.ticks(n).map((t=>t*e)),r=Uf.appendOrSelect(this.backdrop,"g.x.skeleton"),o=r.selectAll("line").data(i);o.enter().append("line").merge(o).attr("x1",(t=>t)).attr("x2",(t=>t)).attr("y1",0).attr("y2","100%"),r.selectAll("line").classed("shimmer-effect-lines",t).classed("empty-state-lines",!t).style("stroke",t?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}drawYGrid(t){const e=+this.backdrop.attr("height"),n=this.backdrop.attr("width"),i=dc(this.getOptions(),"grid","y","numberOfTicks"),r=this.xScale.ticks(i).map((t=>t*e)),o=Uf.appendOrSelect(this.backdrop,"g.y.skeleton"),s=o.selectAll("line").data(r);s.enter().append("line").merge(s).attr("x1",0).attr("x2",n).attr("y1",(t=>t)).attr("y2",(t=>t)),o.selectAll("line").classed("shimmer-effect-lines",t).classed("empty-state-lines",!t).style("stroke",t?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}drawRing(t,e,n=!0){const i=this.parent,{width:r,height:o}=Uf.getSVGElementSize(i,{useAttrs:!0}),s=Uf.appendOrSelect(i,"svg.chart-skeleton").attr("width",r).attr("height",o),a=0===e?"pie":"donut",l=dc(this.getOptions(),a,"alignment");Uf.appendOrSelect(s,"rect.chart-skeleton-area-container").attr("width",r).attr("height",o).attr("fill","none");const c=function(){var t=Am,e=Cm,n=Xc(0),i=null,r=km,o=Dm,s=Lm,a=null,l=Mm(c);function c(){var c,u,h=+t.apply(this,arguments),d=+e.apply(this,arguments),f=r.apply(this,arguments)-qd,p=o.apply(this,arguments)-qd,m=Hd(p-f),g=p>f;if(a||(a=c=l()),d<h&&(u=d,d=h,h=u),d>Yd)if(m>Xd-Yd)a.moveTo(d*zd(f),d*Gd(f)),a.arc(0,0,d,f,p,!g),h>Yd&&(a.moveTo(h*zd(p),h*Gd(p)),a.arc(0,0,h,p,f,g));else{var v,y,_=f,b=p,w=f,x=p,E=m,T=m,S=s.apply(this,arguments)/2,O=S>Yd&&(i?+i.apply(this,arguments):Wd(h*h+d*d)),M=Vd(Hd(d-h)/2,+n.apply(this,arguments)),A=M,C=M;if(O>Yd){var k=Kd(O/h*Gd(S)),D=Kd(O/d*Gd(S));(E-=2*k)>Yd?(w+=k*=g?1:-1,x-=k):(E=0,w=x=(f+p)/2),(T-=2*D)>Yd?(_+=D*=g?1:-1,b-=D):(T=0,_=b=(f+p)/2)}var L=d*zd(_),R=d*Gd(_),I=h*zd(x),P=h*Gd(x);if(M>Yd){var N,U=d*zd(b),B=d*Gd(b),$=h*zd(w),H=h*Gd(w);if(m<Zd)if(N=function(t,e,n,i,r,o,s,a){var l=n-t,c=i-e,u=s-r,h=a-o,d=h*l-u*c;if(!(d*d<Yd))return[t+(d=(u*(e-o)-h*(t-r))/d)*l,e+d*c]}(L,R,$,H,U,B,I,P)){var F=L-N[0],z=R-N[1],j=U-N[0],V=B-N[1],G=1/Gd(function(t){return t>1?0:t<-1?Zd:Math.acos(t)}((F*j+z*V)/(Wd(F*F+z*z)*Wd(j*j+V*V)))/2),W=Wd(N[0]*N[0]+N[1]*N[1]);A=Vd(M,(h-W)/(G-1)),C=Vd(M,(d-W)/(G+1))}else A=C=0}T>Yd?C>Yd?(v=Rm($,H,L,R,d,C,g),y=Rm(U,B,I,P,d,C,g),a.moveTo(v.cx+v.x01,v.cy+v.y01),C<M?a.arc(v.cx,v.cy,C,Fd(v.y01,v.x01),Fd(y.y01,y.x01),!g):(a.arc(v.cx,v.cy,C,Fd(v.y01,v.x01),Fd(v.y11,v.x11),!g),a.arc(0,0,d,Fd(v.cy+v.y11,v.cx+v.x11),Fd(y.cy+y.y11,y.cx+y.x11),!g),a.arc(y.cx,y.cy,C,Fd(y.y11,y.x11),Fd(y.y01,y.x01),!g))):(a.moveTo(L,R),a.arc(0,0,d,_,b,!g)):a.moveTo(L,R),h>Yd&&E>Yd?A>Yd?(v=Rm(I,P,U,B,h,-A,g),y=Rm(L,R,$,H,h,-A,g),a.lineTo(v.cx+v.x01,v.cy+v.y01),A<M?a.arc(v.cx,v.cy,A,Fd(v.y01,v.x01),Fd(y.y01,y.x01),!g):(a.arc(v.cx,v.cy,A,Fd(v.y01,v.x01),Fd(v.y11,v.x11),!g),a.arc(0,0,h,Fd(v.cy+v.y11,v.cx+v.x11),Fd(y.cy+y.y11,y.cx+y.x11),g),a.arc(y.cx,y.cy,A,Fd(y.y11,y.x11),Fd(y.y01,y.x01),!g))):a.arc(0,0,h,x,w,g):a.lineTo(I,P)}else a.moveTo(0,0);if(a.closePath(),c)return a=null,c+""||null}return c.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,i=(+r.apply(this,arguments)+ +o.apply(this,arguments))/2-Zd/2;return[zd(i)*n,Gd(i)*n]},c.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:Xc(+e),c):t},c.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:Xc(+t),c):e},c.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:Xc(+t),c):n},c.padRadius=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:Xc(+t),c):i},c.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:Xc(+t),c):r},c.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:Xc(+t),c):o},c.padAngle=function(t){return arguments.length?(s="function"==typeof t?t:Xc(+t),c):s},c.context=function(t){return arguments.length?(a=t??null,c):a},c}().innerRadius(e).outerRadius(t).startAngle(0).endAngle(2*Math.PI),u=t+Math.abs(-15),h=t+(Math.min(r,o)-2*t)/2,d=Uf.appendOrSelect(s,"path").attr("class","skeleton-area-shape").attr("transform",`translate(${u}, ${h})`).attr("d",c).classed("shimmer-effect-areas",n).classed("empty-state-areas",!n).style("fill",n?`url(#${this.services.domUtils.generateElementIDString("shimmer-areas")})`:null);let f=t+30;l===j.CENTER?f=r/2:l===j.RIGHT&&(f=r-t-30);const p=t+20;d.attr("transform",`translate(${f}, ${p})`)}computeOuterRadius(){const{width:t,height:e}=Uf.getSVGElementSize(this.parent,{useAttrs:!0});return Math.min(t,e)/2-15}computeInnerRadius(){return this.computeOuterRadius()*(3/4)}setShimmerEffect(t){const e="stop-bg-shimmer",n=this.parent.select(".chart-skeleton"),{width:i}=Uf.getSVGElementSize(this.parent,{useAttrs:!0}),r=i,o=Uf.appendOrSelect(n,"defs").lower(),s=Uf.appendOrSelect(o,"linearGradient").attr("id",this.services.domUtils.generateElementIDString(t)).attr("class",t).attr("x1",0-3*.2*i).attr("x2",r).attr("y1",0).attr("y2",0).attr("gradientUnits","userSpaceOnUse").attr("gradientTransform","translate(0, 0)"),a=`\n\t\t\t<stop class="${e}" offset="0"></stop>\n\t\t\t<stop class="stop-shimmer" offset="0.2"></stop>\n\t\t\t<stop class="${e}" offset="0.4"></stop>\n\t\t`;s.html(a),function t(){s.attr("gradientTransform",`translate(${0-3*.2*i}, 0)`).transition().duration(2e3).delay(1e3).ease(Dp).attr("gradientTransform",`translate(${r+3*.2*i}, 0)`).on("end",t)}()}removeSkeleton(){this.parent.select(".chart-skeleton").remove()}}class wv extends $m{constructor(){super(...arguments),this.type="zero-line",this.renderType=I.SVG}render(t){const e=this.services.cartesianScales.getRangeAxisPosition({groups:this.configs.groups}),n=this.services.cartesianScales.getScaleByPosition(e),[i,r]=n.domain(),o=i>0&&r<0||i<0&&r>0,s=this.getComponentContainer({isPresentational:!0});if(!o)return void s.selectAll("line.domain").remove();const[a,l]=this.services.cartesianScales.getDomainScale().range();let c=+n(0)+.5;c||(c=n.range()[0]);const u=fc({x0:a,x1:l,y0:c,y1:c},this.services.cartesianScales.getOrientation());Uf.appendOrSelect(s,"line.domain").transition().call((e=>this.services.transitions.setupTransition({transition:e,name:"zero-line-update",animate:t}))).attr("y1",u.y0).attr("y2",u.y1).attr("x1",u.x0).attr("x2",u.x1)}}class xv extends bv{constructor(){super(...arguments),this.type="skeleton-lines"}render(t=!0){const e=dc(this.getOptions(),"data","loading"),n=!(dc(this.getOptions(),"grid","x","enabled")||dc(this.getOptions(),"grid","y","enabled")||dc(this.getOptions(),"axes","bottom","visible")||dc(this.getOptions(),"axes","left","visible"));e&&!n?super.renderGridSkeleton(e):e&&n?this.renderSparklineSkeleton(e):this.removeSkeleton()}renderSparklineSkeleton(t){this.setScales(),this.drawBackdrop(t),this.drawSparkline(t),this.updateBackdropStyle(),t&&this.setShimmerEffect("shimmer-lines")}drawSparkline(t){const e=this.backdrop.attr("width"),n=Uf.appendOrSelect(this.backdrop,"g.y.skeleton"),i=n.selectAll("line").data([100]);i.enter().append("line").merge(i).attr("x1",0).attr("x2",e).attr("y1",(t=>t)).attr("y2",(t=>t)),n.selectAll("line").classed("shimmer-effect-lines",t).classed("empty-state-lines",!t).style("stroke",t?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}updateBackdropStyle(){const t=this.parent;this.backdrop=Uf.appendOrSelect(t,"svg.chart-skeleton.DAII"),Uf.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop").classed("shimmer-effect-lines",!1).classed("shimmer-effect-sparkline",!0).style("stroke",null)}}function Ev(t){if(t.__esModule)return t;var e=t.default;if("function"==typeof e){var n=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach((function(e){var i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,i.get?i:{enumerable:!0,get:function(){return t[e]}})})),n}var Tv={value:function(){}};function Sv(){for(var t,e=0,n=arguments.length,i={};e<n;++e){if(!(t=arguments[e]+"")||t in i||/[\s.]/.test(t))throw new Error("illegal type: "+t);i[t]=[]}return new Ov(i)}function Ov(t){this._=t}function Mv(t,e){for(var n,i=0,r=t.length;i<r;++i)if((n=t[i]).name===e)return n.value}function Av(t,e,n){for(var i=0,r=t.length;i<r;++i)if(t[i].name===e){t[i]=Tv,t=t.slice(0,i).concat(t.slice(i+1));break}return null!=n&&t.push({name:e,value:n}),t}Ov.prototype=Sv.prototype={constructor:Ov,on:function(t,e){var n,i=this._,r=function(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",i=t.indexOf(".");if(i>=0&&(n=t.slice(i+1),t=t.slice(0,i)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}(t+"",i),o=-1,s=r.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o<s;)if(n=(t=r[o]).type)i[n]=Av(i[n],t.name,e);else if(null==e)for(n in i)i[n]=Av(i[n],t.name,null);return this}for(;++o<s;)if((n=(t=r[o]).type)&&(n=Mv(i[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Ov(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,i,r=new Array(n),o=0;o<n;++o)r[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,n=(i=this._[t]).length;o<n;++o)i[o].value.apply(e,r)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],r=0,o=i.length;r<o;++r)i[r].value.apply(e,n)}};const Cv=Ev(Object.freeze(Object.defineProperty({__proto__:null,dispatch:Sv},Symbol.toStringTag,{value:"Module"})));var kv,Dv;function Lv(t){return null!=t&&t.length?Mn(t,1):[]}function Rv(t,e,n){var i=-1,r=t.length;e<0&&(e=-e>r?0:r+e),(n=n>r?r:n)<0&&(n+=r),r=e>n?0:n-e>>>0,e>>>=0;for(var o=Array(r);++i<r;)o[i]=t[i+e];return o}function Iv(t,e){return null==(t=function(t,e){return e.length<2?t:xn(t,Rv(e,0,-1))}(t,e=bn(e,t)))||delete t[wn(Xi(e))]}function Pv(t){return In(t)?void 0:t}!function(){if(Dv)return kv;Dv=1;const t=Cv.dispatch,e=Math.PI/180,n={archimedean:p,rectangular:function(t){var e=4*t[0]/t[1],n=0,i=0;return function(t){var r=t<0?-1:1;switch(Math.sqrt(1+4*r*t)-r&3){case 0:n+=e;break;case 1:i+=4;break;case 2:n-=e;break;default:i-=4}return[n,i]}}},i=2048;function r(t){return t.text}function o(){return"serif"}function s(){return"normal"}function a(t){return Math.sqrt(t.value)}function l(){return 30*(~~(6*random())-3)}function c(){return 1}function u(t,n,r,o){if(!n.sprite){var s=t.context,a=t.ratio;s.clearRect(0,0,2048/a,i/a);var l=0,c=0,u=0,h=r.length;for(--o;++o<h;){n=r[o],s.save(),s.font=n.style+" "+n.weight+" "+~~((n.size+1)/a)+"px "+n.font;const t=s.measureText(n.text),h=-Math.floor(t.width/2);let y=(t.width+1)*a,_=n.size<<1;if(n.rotate){var d=Math.sin(n.rotate*e),f=Math.cos(n.rotate*e),p=y*f,m=y*d,g=_*f,v=_*d;y=Math.max(Math.abs(p+v),Math.abs(p-v))+31>>5<<5,_=~~Math.max(Math.abs(m+g),Math.abs(m-g))}else y=y+31>>5<<5;if(_>u&&(u=_),l+y>=2048&&(l=0,c+=u,u=0),c+_>=i)break;s.translate((l+(y>>1))/a,(c+(_>>1))/a),n.rotate&&s.rotate(n.rotate*e),s.fillText(n.text,h,0),n.padding&&(s.lineWidth=2*n.padding,s.strokeText(n.text,h,0)),s.restore(),n.width=y,n.height=_,n.xoff=l,n.yoff=c,n.x1=y>>1,n.y1=_>>1,n.x0=-n.x1,n.y0=-n.y1,n.hasText=!0,l+=y}for(var y=s.getImageData(0,0,2048/a,i/a).data,_=[];--o>=0;)if((n=r[o]).hasText){for(var b=n.width,w=b>>5,x=n.y1-n.y0,E=0;E<x*w;E++)_[E]=0;if(null==(l=n.xoff))return;c=n.yoff;for(var T=0,S=-1,O=0;O<x;O++){for(E=0;E<b;E++){var M=w*O+(E>>5),A=y[2048*(c+O)+(l+E)<<2]?1<<31-E%32:0;_[M]|=A,T|=A}T?S=O:(n.y0++,x--,O--,c++)}n.y1=n.y0+S,n.sprite=_.slice(0,(n.y1-n.y0)*w)}}}function h(t,e,n){n>>=5;for(var i,r=t.sprite,o=t.width>>5,s=t.x-(o<<4),a=127&s,l=32-a,c=t.y1-t.y0,u=(t.y+t.y0)*n+(s>>5),h=0;h<c;h++){i=0;for(var d=0;d<=o;d++)if((i<<l|(d<o?(i=r[h*o+d])>>>a:0))&e[u+d])return!0;u+=n}return!1}function d(t,e){var n=t[0],i=t[1];e.x+e.x0<n.x&&(n.x=e.x+e.x0),e.y+e.y0<n.y&&(n.y=e.y+e.y0),e.x+e.x1>i.x&&(i.x=e.x+e.x1),e.y+e.y1>i.y&&(i.y=e.y+e.y1)}function f(t,e){return t.x+t.x1>e[0].x&&t.x+t.x0<e[1].x&&t.y+t.y1>e[0].y&&t.y+t.y0<e[1].y}function p(t){var e=t[0]/t[1];return function(t){return[e*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function m(){return document.createElement("canvas")}function g(t){return"function"==typeof t?t:function(){return t}}kv=function(){var e=[256,256],v=r,y=o,_=a,b=s,w=s,x=l,E=c,T=p,S=[],O=1/0,M=t("word","end"),A=null,C=Math.random,k={},D=m;function L(t,n,i){e[0],e[1];for(var r,o,s,a=n.x,l=n.y,c=Math.sqrt(e[0]*e[0]+e[1]*e[1]),u=T(e),d=C()<.5?1:-1,p=-d;(r=u(p+=d))&&(o=~~r[0],s=~~r[1],!(Math.min(Math.abs(o),Math.abs(s))>=c));)if(n.x=a+o,n.y=l+s,!(n.x+n.x0<0||n.y+n.y0<0||n.x+n.x1>e[0]||n.y+n.y1>e[1])&&(!i||f(n,i))&&!h(n,t,e[0])){for(var m,g=n.sprite,v=n.width>>5,y=e[0]>>5,_=n.x-(v<<4),b=127&_,w=32-b,x=n.y1-n.y0,E=(n.y+n.y0)*y+(_>>5),S=0;S<x;S++){m=0;for(var O=0;O<=v;O++)t[E+O]|=m<<w|(O<v?(m=g[S*v+O])>>>b:0);E+=y}return!0}return!1}return k.canvas=function(t){return arguments.length?(D=g(t),k):D},k.start=function(){var t=function(t){const e=t.getContext("2d",{willReadFrequently:!0});t.width=t.height=1;const n=Math.sqrt(e.getImageData(0,0,1,1).data.length>>2);return t.width=2048/n,t.height=i/n,e.fillStyle=e.strokeStyle="red",{context:e,ratio:n}}(D()),n=function(t){for(var e=[],n=-1;++n<t;)e[n]=0;return e}((e[0]>>5)*e[1]),r=null,o=S.length,s=-1,a=[],l=S.map((function(t,e){return t.text=v.call(this,t,e),t.font=y.call(this,t,e),t.style=b.call(this,t,e),t.weight=w.call(this,t,e),t.rotate=x.call(this,t,e),t.size=~~_.call(this,t,e),t.padding=E.call(this,t,e),t})).sort((function(t,e){return e.size-t.size}));return A&&clearInterval(A),A=setInterval(c,0),c(),k;function c(){for(var i=Date.now();Date.now()-i<O&&++s<o&&A;){var c=l[s];c.x=e[0]*(C()+.5)>>1,c.y=e[1]*(C()+.5)>>1,u(t,c,l,s),c.hasText&&L(n,c,r)&&(a.push(c),M.call("word",k,c),r?d(r,c):r=[{x:c.x+c.x0,y:c.y+c.y0},{x:c.x+c.x1,y:c.y+c.y1}],c.x-=e[0]>>1,c.y-=e[1]>>1)}s>=o&&(k.stop(),M.call("end",k,a,r))}},k.stop=function(){A&&(clearInterval(A),A=null);for(const t of S)delete t.sprite;return k},k.timeInterval=function(t){return arguments.length?(O=t??1/0,k):O},k.words=function(t){return arguments.length?(S=t,k):S},k.size=function(t){return arguments.length?(e=[+t[0],+t[1]],k):e},k.font=function(t){return arguments.length?(y=g(t),k):y},k.fontStyle=function(t){return arguments.length?(b=g(t),k):b},k.fontWeight=function(t){return arguments.length?(w=g(t),k):w},k.rotate=function(t){return arguments.length?(x=g(t),k):x},k.text=function(t){return arguments.length?(v=g(t),k):v},k.spiral=function(t){return arguments.length?(T=n[t]||t,k):T},k.fontSize=function(t){return arguments.length?(_=g(t),k):_},k.padding=function(t){return arguments.length?(E=g(t),k):E},k.random=function(t){return arguments.length?(C=t,k):C},k.on=function(){var t=M.on.apply(M,arguments);return t===M?k:t},k}}();var Nv=function(t){return ue(we(t,void 0,Lv),t+"")}((function(t,e){var n={};if(null==t)return n;var i=!1;e=Ut(e,(function(e){return e=bn(e,t),i||(i=e.length>1),e})),_e(t,Zn(t),n),i&&(n=Si(n,7,Pv));for(var r=e.length;r--;)Iv(n,e[r]);return n}));function Uv(t){return Math.log(t)}function Bv(t){return Math.exp(t)}function $v(t){return-Math.log(-t)}function Hv(t){return-Math.exp(-t)}function Fv(t){return isFinite(t)?+("1e"+t):t<0?0:t}function zv(t){return(e,n)=>-t(-e,n)}function jv(){const t=function(t){const e=t(Uv,Bv),n=e.domain;let i,r,o=10;function s(){return i=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}(o),r=function(t){return 10===t?Fv:t===Math.E?Math.exp:e=>Math.pow(t,e)}(o),n()[0]<0?(i=zv(i),r=zv(r),t($v,Hv)):t(Uv,Bv),e}return e.base=function(t){return arguments.length?(o=+t,s()):o},e.domain=function(t){return arguments.length?(n(t),s()):n()},e.ticks=t=>{const e=n();let s=e[0],a=e[e.length-1];const l=a<s;l&&([s,a]=[a,s]);let c,u,h=i(s),d=i(a);const f=null==t?10:+t;let p=[];if(!(o%1)&&d-h<f){if(h=Math.floor(h),d=Math.ceil(d),s>0){for(;h<=d;++h)for(c=1;c<o;++c)if(u=h<0?c/r(-h):c*r(h),!(u<s)){if(u>a)break;p.push(u)}}else for(;h<=d;++h)for(c=o-1;c>=1;--c)if(u=h>0?c/r(-h):c*r(h),!(u<s)){if(u>a)break;p.push(u)}2*p.length<f&&(p=gr(s,a,f))}else p=gr(h,d,Math.min(d-h,f)).map(r);return l?p.reverse():p},e.tickFormat=(t,n)=>{if(null==t&&(t=10),null==n&&(n=10===o?"s":","),"function"!=typeof n&&(!(o%1)&&null==(n=Ba(n)).precision&&(n.trim=!0),n=Va(n)),t===1/0)return n;const s=Math.max(1,o*t/e.ticks().length);return t=>{let e=t/r(Math.round(i(t)));return e*o<o-.5&&(e*=o),e<=s?n(t):""}},e.nice=()=>n(Ou(n(),{floor:t=>r(Math.floor(i(t))),ceil:t=>r(Math.ceil(i(t)))})),e}(rl()).domain([1,10]);return t.copy=()=>il(t,jv()).base(t.base()),Za.apply(t,arguments),t}function Vv(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function Gv(t){this._context=t}function Wv(t){return new Gv(t)}function Yv(t){this._context=t}function Zv(t){return new Yv(t)}function qv(t){this._context=t}function Xv(t){return new qv(t)}function Kv(t,e){this._basis=new Gv(t),this._beta=e}Gv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Vv(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Vv(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Yv.prototype={areaStart:tf,areaEnd:tf,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:Vv(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},qv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,i=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,i):this._context.moveTo(n,i);break;case 3:this._point=4;default:Vv(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Kv.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var i,r=t[0],o=e[0],s=t[n]-r,a=e[n]-o,l=-1;++l<=n;)i=l/n,this._basis.point(this._beta*t[l]+(1-this._beta)*(r+i*s),this._beta*e[l]+(1-this._beta)*(o+i*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const Qv=function t(e){function n(t){return 1===e?new Gv(t):new Kv(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function Jv(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function ty(t,e){this._context=t,this._k=(1-e)/6}ty.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Jv(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:Jv(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const ey=function t(e){function n(t){return new ty(t,e)}return n.tension=function(e){return t(+e)},n}(0);function ny(t,e){this._context=t,this._k=(1-e)/6}ny.prototype={areaStart:tf,areaEnd:tf,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Jv(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const iy=function t(e){function n(t){return new ny(t,e)}return n.tension=function(e){return t(+e)},n}(0);function ry(t,e){this._context=t,this._k=(1-e)/6}ry.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Jv(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const oy=function t(e){function n(t){return new ry(t,e)}return n.tension=function(e){return t(+e)},n}(0);function sy(t,e,n){var i=t._x1,r=t._y1,o=t._x2,s=t._y2;if(t._l01_a>Yd){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,r=(r*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>Yd){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,u=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*c+t._x1*t._l23_2a-e*t._l12_2a)/u,s=(s*c+t._y1*t._l23_2a-n*t._l12_2a)/u}t._context.bezierCurveTo(i,r,o,s,t._x2,t._y2)}function ay(t,e){this._context=t,this._alpha=e}ay.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:sy(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const ly=function t(e){function n(t){return e?new ay(t,e):new ty(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function cy(t,e){this._context=t,this._alpha=e}cy.prototype={areaStart:tf,areaEnd:tf,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:sy(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const uy=function t(e){function n(t){return e?new cy(t,e):new ny(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function hy(t,e){this._context=t,this._alpha=e}hy.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:sy(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const dy=function t(e){function n(t){return e?new hy(t,e):new ry(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function fy(t){return t<0?-1:1}function py(t,e,n){var i=t._x1-t._x0,r=e-t._x1,o=(t._y1-t._y0)/(i||r<0&&-0),s=(n-t._y1)/(r||i<0&&-0),a=(o*r+s*i)/(i+r);return(fy(o)+fy(s))*Math.min(Math.abs(o),Math.abs(s),.5*Math.abs(a))||0}function my(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function gy(t,e,n){var i=t._x0,r=t._y0,o=t._x1,s=t._y1,a=(o-i)/3;t._context.bezierCurveTo(i+a,r+a*e,o-a,s-a*n,o,s)}function vy(t){this._context=t}function yy(t){this._context=new _y(t)}function _y(t){this._context=t}function by(t){return new vy(t)}function wy(t){return new yy(t)}function xy(t){this._context=t}function Ey(t){var e,n,i=t.length-1,r=new Array(i),o=new Array(i),s=new Array(i);for(r[0]=0,o[0]=2,s[0]=t[0]+2*t[1],e=1;e<i-1;++e)r[e]=1,o[e]=4,s[e]=4*t[e]+2*t[e+1];for(r[i-1]=2,o[i-1]=7,s[i-1]=8*t[i-1]+t[i],e=1;e<i;++e)n=r[e]/o[e-1],o[e]-=n,s[e]-=n*s[e-1];for(r[i-1]=s[i-1]/o[i-1],e=i-2;e>=0;--e)r[e]=(s[e]-r[e+1])/o[e];for(o[i-1]=(t[i]+r[i-1])/2,e=0;e<i-1;++e)o[e]=2*t[e+1]-r[e+1];return[r,o]}function Ty(t){return new xy(t)}function Sy(t,e){this._context=t,this._t=e}function Oy(t){return new Sy(t,.5)}function My(t){return new Sy(t,0)}function Ay(t){return new Sy(t,1)}vy.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:gy(this,this._t0,my(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,gy(this,my(this,n=py(this,t,e)),n);break;default:gy(this,this._t0,n=py(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(yy.prototype=Object.create(vy.prototype)).point=function(t,e){vy.prototype.point.call(this,e,t)},_y.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,i,r,o){this._context.bezierCurveTo(e,t,i,n,o,r)}},xy.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===n)this._context.lineTo(t[1],e[1]);else for(var i=Ey(t),r=Ey(e),o=0,s=1;s<n;++o,++s)this._context.bezierCurveTo(i[0][o],r[0][o],i[1][o],r[1][o],t[s],e[s]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}},Sy.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};class Cy extends Nf{zoomIn(t,e,n){let i,r,o;const s=n||ml;t&&(i=t.x,r=t.y,o=2);const{width:a,height:l}=Uf.getSVGElementSize(this.services.domUtils.getHolder(),{useClientDimensions:!0});e.transition().duration(s.duration).ease(s.ease).attr("transform",`translate(${a/2}, ${l/2}) scale(${o}) translate(${-i},${-r})`),this.services.events.dispatchEvent(R.CanvasZoom.CANVAS_ZOOM_IN,{element:Tu(t)})}zoomOut(t,e){const n=e||ml;t.transition().duration(n.duration).ease(n.ease).attr("transform",""),this.services.events.dispatchEvent(R.CanvasZoom.CANVAS_ZOOM_OUT)}}class ky extends Nf{init(){this.documentFragment=document.createDocumentFragment()}addEventListener(t,e){this.documentFragment.addEventListener(t,e)}removeEventListener(t,e){this.documentFragment.removeEventListener(t,e)}dispatchEvent(t,e){let n;e?n=new CustomEvent(t,{detail:e}):(n=document.createEvent("Event"),n.initEvent(t,!1,!0)),this.documentFragment.dispatchEvent(n)}}class Dy extends Nf{constructor(t,e){super(t,e)}downloadCSV(t,e){const n=document.createElement("a"),i="text/csv;encoding:utf-8";if(navigator.msSaveBlob)navigator.msSaveBlob(new Blob([t],{type:i}),e);else if(URL&&"download"in n){const r=URL.createObjectURL(new Blob([t],{type:i}));n.href=r,n.setAttribute("download",e),document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(r)}else location.href=`data:application/octet-stream,${encodeURIComponent(t)}`}downloadImage(t,e){const n=document.createElement("a");n.download=e,n.href=t,document.body.appendChild(n),n.click(),document.body.removeChild(n)}}class Ly extends Nf{constructor(){super(...arguments),this.pendingTransitions={}}init(){var t;null==(t=this.services.events)||t.addEventListener(R.Model.UPDATE,(()=>{this.pendingTransitions={}}))}setupTransition({transition:t,name:e,animate:n}){return this.pendingTransitions[t._id]=t,t.on("end interrupt cancel",(()=>{delete this.pendingTransitions[t._id]})),!1===this.model.getOptions().animations||!1===n?t.duration(0):t.duration(dc(El,e,"duration")||El.default.duration)}getPendingTransitions(){return this.pendingTransitions}}function Ry(t,e){const n=+gt(t)-+gt(e);return n<0?-1:n>0?1:n}function Iy(t,e,n){const i=gt(t,void 0);if(isNaN(e))return dt(t,NaN);if(!e)return i;const r=i.getDate(),o=dt(t,i.getTime());return o.setMonth(i.getMonth()+e+1,0),r>=o.getDate()?o:(i.setFullYear(o.getFullYear(),o.getMonth(),r),i)}function Py(t,e,n){return Iy(t,12*e)}function Ny(t,e,n){return Py(t,-e)}function Uy(t,e,n){const[i,r,o]=ft(0,t,t,e),s=Ry(r,o),a=Math.abs(function(t,e){const[n,i]=ft(0,t,e);return 12*(n.getFullYear()-i.getFullYear())+(n.getMonth()-i.getMonth())}(r,o));if(a<1)return 0;1===r.getMonth()&&r.getDate()>27&&r.setDate(30),r.setMonth(r.getMonth()-s*a);let l=Ry(r,o)===-s;(function(t){const e=gt(t,void 0);return+function(t){const e=gt(t,void 0);return e.setHours(23,59,59,999),e}(e)==+function(t){const e=gt(t,void 0),n=e.getMonth();return e.setFullYear(e.getFullYear(),n+1,0),e.setHours(23,59,59,999),e}(e)})(i)&&1===a&&1===Ry(i,o)&&(l=!1);const c=s*(a-+l);return 0===c?0:c}function By(t,e,n){return Iy(t,-e)}function $y(t,e){const n=t.getFullYear()-e.getFullYear()||t.getMonth()-e.getMonth()||t.getDate()-e.getDate()||t.getHours()-e.getHours()||t.getMinutes()-e.getMinutes()||t.getSeconds()-e.getSeconds()||t.getMilliseconds()-e.getMilliseconds();return n<0?-1:n>0?1:n}function Hy(t,e,n){const i=gt(t,void 0);return isNaN(e)?dt(t,NaN):(e&&i.setDate(i.getDate()+e),i)}function Fy(t,e,n){return Hy(t,-e)}function zy(t){return t=>{const e=(0,Math.trunc)(t);return 0===e?0:e}}function jy(t,e,n){return dt(t,+gt(t)+e)}function Vy(t,e,n){return jy(t,e*ut)}function Gy(t,e,n){return Vy(t,-e)}function Wy(t,e){return+gt(t)-+gt(e)}function Yy(t,e,n){const i=Wy(t,e)/6e4;return zy()(i)}function Zy(t,e,n){const i=gt(t,void 0);return i.setTime(i.getTime()+6e4*e),i}function qy(t,e,n){return Zy(t,-e)}function Xy(t,e,n){const i=Wy(t,e)/1e3;return zy()(i)}function Ky(t,e,n){return jy(t,1e3*e)}function Qy(t,e,n){return Ky(t,-e)}class Jy extends Nf{constructor(){super(...arguments),this.scaleTypes={top:null,right:null,bottom:null,left:null},this.scales={top:null,right:null,bottom:null,left:null}}getDomainAxisPosition({datum:t=null}={}){if(this.dualAxes&&t){const e=this.model.getOptions(),{groupMapsTo:n}=e.data,i=dc(e,"axes",this.secondaryDomainAxisPosition),r=t[n];if(null!=i&&i.correspondingDatasets&&i.correspondingDatasets.includes(r))return this.secondaryDomainAxisPosition}return this.domainAxisPosition}getRangeAxisPosition({datum:t=null,groups:e=null}={}){if(this.dualAxes){const n=this.model.getOptions(),{groupMapsTo:i}=n.data,r=dc(n,"axes",this.secondaryRangeAxisPosition);let o;if(null!==t?o=t[i]:e&&e.length>0&&(o=e[0]),null!=r&&r.correspondingDatasets&&r.correspondingDatasets.includes(o))return this.secondaryRangeAxisPosition}return this.rangeAxisPosition}getAxisOptions(t){return dc(this.model.getOptions(),"axes",t)}getDomainAxisOptions(){const t=this.getDomainAxisPosition();return this.getAxisOptions(t)}getRangeAxisOptions(){const t=this.getRangeAxisPosition();return this.getAxisOptions(t)}getScaleLabel(t){return this.getAxisOptions(t).title||(t===U.BOTTOM||t===U.TOP?"x-value":"y-value")}getDomainLabel(){return this.getScaleLabel(this.getDomainAxisPosition())}getRangeLabel(){return this.getScaleLabel(this.getRangeAxisPosition())}update(){this.determineAxisDuality(),this.findDomainAndRangeAxes(),this.determineOrientation(),Object.keys(U).map((t=>U[t])).forEach((t=>{this.scales[t]=this.createScale(t)}))}findDomainAndRangeAxes(){const t=this.findVerticalAxesPositions(),e=this.findHorizontalAxesPositions(),n=this.findDomainAndRangeAxesPositions(t,e);this.domainAxisPosition=n.primaryDomainAxisPosition,this.rangeAxisPosition=n.primaryRangeAxisPosition,this.isDualAxes()&&(this.secondaryDomainAxisPosition=n.secondaryDomainAxisPosition,this.secondaryRangeAxisPosition=n.secondaryRangeAxisPosition)}determineOrientation(){this.rangeAxisPosition!==U.LEFT&&this.rangeAxisPosition!==U.RIGHT||this.domainAxisPosition!==U.BOTTOM&&this.domainAxisPosition!==U.TOP?this.orientation=H.HORIZONTAL:this.orientation=H.VERTICAL}isDualAxes(){return this.dualAxes}determineAxisDuality(){var t,e,n,i;const r=this.model.getOptions(),o=dc(r,"axes");(null!=(t=o[U.LEFT])&&t.correspondingDatasets&&o[U.RIGHT]||null!=(e=o[U.RIGHT])&&e.correspondingDatasets&&o[U.LEFT]||null!=(n=o[U.TOP])&&n.correspondingDatasets&&o[U.BOTTOM]||null!=(i=o[U.BOTTOM])&&i.correspondingDatasets&&o[U.TOP])&&(this.dualAxes=!0)}getCustomDomainValuesByposition(t){const e=dc(this.model.getOptions(),"axes",t,"domain");if(e&&!Array.isArray(e))throw new Error(`Domain in ${t} axis is not a valid array`);if(Array.isArray(e)&&(this.scaleTypes[t]===F.LINEAR||this.scaleTypes[t]===F.TIME)&&2!==e.length)throw new Error(`There can only be 2 elements in domain for scale type: ${this.scaleTypes[t]}`);return e}getOrientation(){return this.orientation}getScaleByPosition(t){return this.scales[t]}getScaleTypeByPosition(t){return this.scaleTypes[t]}getDomainAxisScaleType(){const t=this.getDomainAxisPosition();return this.getScaleTypeByPosition(t)}getRangeAxisScaleType(){const t=this.getRangeAxisPosition();return this.getScaleTypeByPosition(t)}getDomainScale(){return this.scales[this.domainAxisPosition]}getRangeScale(){return this.scales[this.rangeAxisPosition]}getMainXAxisPosition(){const t=[U.BOTTOM,U.TOP];return[this.domainAxisPosition,this.rangeAxisPosition].find((e=>t.indexOf(e)>-1))}getMainYAxisPosition(){const t=[U.LEFT,U.RIGHT];return[this.domainAxisPosition,this.rangeAxisPosition].find((e=>t.indexOf(e)>-1))}getMainXScale(){return this.scales[this.getMainXAxisPosition()]}getMainYScale(){return this.scales[this.getMainYAxisPosition()]}getValueFromScale(t,e,n,i){const r=this.model.getOptions(),o=dc(r,"axes")[n],{mapsTo:s}=o,a=null!==dc(i,s)?i[s]:i;let l;switch(e){case F.LABELS:l=t(a)+t.step()/2;break;case F.TIME:l=t(new Date(a));break;default:l=t(a)}return l}getBoundedScaledValues(t){const{bounds:e}=this.model.getOptions(),n=this.getRangeAxisPosition({datum:t}),i=this.scales[n],r=this.model.getOptions(),o=dc(r,"axes")[n],{mapsTo:s}=o,a=void 0!==t[s]?t[s]:t;return[i(null!==dc(t,e.upperBoundMapsTo)?t[e.upperBoundMapsTo]:a),i(null!==dc(t,e.lowerBoundMapsTo)?t[e.lowerBoundMapsTo]:a)]}getValueThroughAxisPosition(t,e){const n=this.scaleTypes[t],i=this.scales[t];return this.getValueFromScale(i,n,t,e)}getDomainValue(t){const e=this.getDomainAxisPosition({datum:t});return this.getValueThroughAxisPosition(e,t)}getRangeValue(t){const e=this.getRangeAxisPosition({datum:t});return this.getValueThroughAxisPosition(e,t)}getMainXScaleType(){return this.getScaleTypeByPosition(this.getMainXAxisPosition())}getMainYScaleType(){return this.getScaleTypeByPosition(this.getMainYAxisPosition())}getDomainIdentifier(t){const e=this.model.getOptions();return dc(e,"axes",this.getDomainAxisPosition({datum:t}),"mapsTo")}getRangeIdentifier(t){const e=this.model.getOptions();return dc(e,"axes",this.getRangeAxisPosition({datum:t}),"mapsTo")}extendsDomain(t,e){const n=this.model.getOptions(),i=dc(n,"axes",t);return i.scaleType===F.TIME?function(t,e){const n=new Date(t[0]),i=new Date(t[1]);return function(t,e){const[n,i]=ft(0,t,e),r=Ry(n,i),o=Math.abs(function(t,e){const[n,i]=ft(0,t,e);return n.getFullYear()-i.getFullYear()}(n,i));n.setFullYear(1584),i.setFullYear(1584);const s=r*(o-+(Ry(n,i)===-r));return 0===s?0:s}(i,n)>1?[Ny(n,e),Py(i,e)]:Uy(i,n)>1?[By(n,e),Iy(i,e)]:function(t,e){const[n,i]=ft(0,t,e),r=$y(n,i),o=Math.abs(vc(n,i));n.setDate(n.getDate()-r*o);const s=r*(o-+($y(n,i)===-r));return 0===s?0:s}(i,n)>1?[Fy(n,e),Hy(i,e)]:function(t,e){const[n,i]=ft(0,t,e),r=(+n-+i)/ut;return zy()(r)}(i,n)>1?[Gy(n,e),Vy(i,e)]:Yy(i,n)>30?[qy(n,30*e),Zy(i,30*e)]:Yy(i,n)>1?[qy(n,e),Zy(i,e)]:Xy(i,n)>15?[Qy(n,15*e),Ky(i,15*e)]:Xy(i,n)>1?[Qy(n,e),Ky(i,e)]:[n,i]}(e,dc(n,"timeScale","addSpaceOnEdges")):function([t,e],n,i){const r=(e-t)*n,o=e<=0&&e+r>0?0:e+r;let s=t>=0&&t-r<0?0:t-r;if(i===F.LOG&&s<=0){if(t<=0)throw Error("Data must have values greater than 0 if log scale type is used.");s=t}return[s,o]}(e,.1,i.scaleType)}findVerticalAxesPositions(){const t=this.model.getOptions(),e=dc(t,"axes"),n=this.isDualAxes();return null===dc(e,U.LEFT)&&null!==dc(e,U.RIGHT)||!0===dc(e,U.RIGHT,"main")||n&&dc(e,U.LEFT,"correspondingDatasets")?{primary:U.RIGHT,secondary:U.LEFT}:{primary:U.LEFT,secondary:U.RIGHT}}findHorizontalAxesPositions(){const t=this.model.getOptions(),e=dc(t,"axes"),n=this.isDualAxes();return null===dc(e,U.BOTTOM)&&null!==dc(e,U.TOP)||!0===dc(e,U.TOP,"main")||n&&dc(e,U.BOTTOM,"correspondingDatasets")?{primary:U.TOP,secondary:U.BOTTOM}:{primary:U.BOTTOM,secondary:U.TOP}}findDomainAndRangeAxesPositions(t,e){const n=this.model.getOptions(),i=dc(n,"axes",t.primary),r=dc(n,"axes",e.primary),o=i.scaleType||F.LINEAR,s=r.scaleType||F.LINEAR,a={primaryDomainAxisPosition:null,secondaryDomainAxisPosition:null,primaryRangeAxisPosition:null,secondaryRangeAxisPosition:null};return a.primaryDomainAxisPosition=e.primary,a.primaryRangeAxisPosition=t.primary,a.secondaryDomainAxisPosition=e.secondary,a.secondaryRangeAxisPosition=t.secondary,(!(s===F.LABELS||s===F.TIME)&&o===F.LABELS||o===F.TIME)&&(a.primaryDomainAxisPosition=t.primary,a.primaryRangeAxisPosition=e.primary,a.secondaryDomainAxisPosition=t.secondary,a.secondaryRangeAxisPosition=e.secondary),a}getScaleDomain(t){const e=this.model.getOptions(),n=dc(e,"axes",t),i=dc(e,"bounds"),{includeZero:r}=n,o=dc(n,"scaleType")||F.LINEAR;if(this.model.isDataEmpty())return[];if(n.binned){const{bins:t}=this.model.getBinConfigurations();return[0,_r(t,(t=>t.length))]}if(n.limitDomainToBins){const{bins:t}=this.model.getBinConfigurations(),e=this.model.getStackKeys({bins:t});return[e[0].split(":")[0],e[e.length-1].split(":")[1]]}const s=this.model.getDisplayData(),{extendLinearDomainBy:a,mapsTo:l,percentage:c,thresholds:u}=n,{reference:h,compareTo:d}=fl;if(n.domain)return o===F.LABELS?n.domain:(o===F.TIME&&(n.domain=n.domain.map((t=>void 0===t.getTime?new Date(t):t))),this.extendsDomain(t,n.domain));if(c)return[0,100];if(n&&o===F.LABELS)return nr(s.map((t=>t[l])));let f,p;const m=this.model.getDataGroupNames();if(o===F.LABELS_RATIO)return s.map((t=>`${t[h]}/${t[d]}`));if(o===F.TIME)p=s.map((t=>+new Date(t[l])));else if(i&&e.axes)p=[],s.forEach((t=>{p.push(t[l]),t[i.upperBoundMapsTo]&&p.push(t[i.upperBoundMapsTo]),t[i.lowerBoundMapsTo]&&p.push(t[i.lowerBoundMapsTo])}));else if(!0===n.stacked&&m&&t===this.getRangeAxisPosition()){const{groupMapsTo:t}=e.data,n=this.model.getDataValuesGroupedByKeys({groups:m}),i=s.filter((e=>!m.includes(e[t]))),r=[];n.forEach((t=>{const{...e}=t;let n=0,i=0;Object.values(Nv(e,"sharedStackKey")).forEach((t=>{isNaN(t)||(t<0?i+=t:n+=t)})),r.push([i,n])})),p=[...Lv(r),...i.map((t=>t[l]))]}else p=[],s.forEach((t=>{const e=t[l];Array.isArray(e)&&2===e.length?(p.push(e[0]),p.push(e[1])):(a&&p.push(Math.max(t[l],t[a])),p.push(e))}));return o!==F.TIME&&o!==F.LOG&&r&&p.push(0),u&&u.length>0&&u.forEach((t=>{const e=dc(t,"value");null!==e&&p.push(e)})),f=lr(p),f=this.extendsDomain(t,f),f}createScale(t){const e=this.model.getOptions(),n=dc(e,"axes",t);if(!n)return null;const i=dc(n,"scaleType")||F.LINEAR;let r;return this.scaleTypes[t]=i,r=i===F.TIME?$d():i===F.LOG?jv().base(n.base||10):i===F.LABELS||i===F.LABELS_RATIO?Su():al(),r.domain(this.getScaleDomain(t)),r}getDomainLowerBound(t){let e,n=0;return e=this.getOrientation()===H.VERTICAL?this.getMainYScale().domain():this.getMainXScale().domain(),!1===dc(this.model.getOptions(),"axes",t,"includeZero")&&e[0]>0&&e[1]>0&&(n=e[0]),n}getHighestDomainThreshold(){const t=dc(this.model.getOptions(),"axes"),e=this.getDomainAxisPosition(),{thresholds:n}=t[e];if(!Array.isArray(n)||Array.isArray(n)&&!n.length)return null;const i=this.getDomainScale(),r=n.sort(((t,e)=>e.value-t.value))[0];return this.getScaleTypeByPosition(e)===F.TIME&&("string"==typeof r.value||void 0===r.value.getTime)&&(r.value=new Date(r.value)),{threshold:r,scaleValue:i(r.value)}}getHighestRangeThreshold(){const t=dc(this.model.getOptions(),"axes"),e=this.getRangeAxisPosition(),{thresholds:n}=t[e];if(!Array.isArray(n)||Array.isArray(n)&&!n.length)return null;const i=this.getRangeScale(),r=n.sort(((t,e)=>e.value-t.value))[0];return{threshold:r,scaleValue:i(r.value)}}}class t_ extends Nf{constructor(){super(...arguments),this.curveTypes={curveLinear:Jd,curveLinearClosed:nf,curveBasis:Wv,curveBasisClosed:Zv,curveBasisOpen:Xv,curveBundle:Qv,curveCardinal:ey,curveCardinalClosed:iy,curveCardinalOpen:oy,curveCatmullRom:ly,curveCatmullRomClosed:uy,curveCatmullRomOpen:dy,curveMonotoneX:by,curveMonotoneY:wy,curveNatural:Ty,curveStep:Oy,curveStepAfter:Ay,curveStepBefore:My}}getD3Curve(){let t="curveLinear";const e=this.model.getOptions().curve;if(e&&(t="string"==typeof e?e:e.name),this.curveTypes[t]){let n=this.curveTypes[t];return e&&Object.keys(e).forEach((t=>{n[t]&&(n=n[t](e[t]))})),n}return console.warn(`The curve type '${t}' is invalid, using 'curveLinear' instead`),this.curveTypes.curveLinear}}class e_ extends Nf{isZoomBarEnabled(){if(!this.services.cartesianScales||!dc(this.model.getOptions(),"zoomBar","top","enabled"))return!1;this.services.cartesianScales.findDomainAndRangeAxes();const t=this.services.cartesianScales.getMainXAxisPosition(),e=dc(this.model.getOptions(),"axes",t,"scaleType");return t===U.BOTTOM&&e===F.TIME}getZoomBarData(){const t=this.model.getZoomBarData();return t&&t.length>1?t:this.model.getDisplayData()}getDefaultZoomBarDomain(t){if(!this.services.zoom)throw new Error("Services zoom not defined");const e=t||this.services.zoom.getZoomBarData(),{cartesianScales:n}=this.services;if(!n)throw new Error("Services cartesianScales undefined");const i=n.getMainXAxisPosition(),r=n.getDomainIdentifier(),o=dc(this.model.getOptions(),"axes",i,"domain");if(Array.isArray(o)&&2===o.length)return o;if(!i)throw new Error("Not defined: mainXAxisPosition");return n.extendsDomain(i,lr(e,(t=>t[r])))}handleDomainChange(t,e={dispatchEvent:!0}){var n;this.model.set({zoomDomain:t},{animate:!1}),e.dispatchEvent&&(null==(n=this.services.events)||n.dispatchEvent(R.ZoomDomain.CHANGE,{newDomain:t}))}getZoomRatio(){return dc(this.model.getOptions(),"zoomBar","zoomRatio")}filterDataForRangeAxis(t,e){var n;const i=this.model.get("zoomDomain"),r=Object.assign({stacked:!1},e),o=dc(this.model.getOptions(),"zoomBar","updateRangeAxis");if(this.isZoomBarEnabled()&&o&&i){const e=r.stacked?"sharedStackKey":null==(n=this.services.cartesianScales)?void 0:n.getDomainIdentifier(),o=t.filter((t=>new Date(t[e])>=i[0]&&new Date(t[e])<=i[1]));if(o.length>0)return o}return t}zoomIn(t=this.getZoomRatio()){var e;const n=this.model.get("zoomDomain"),i=Tl.handleWidth,r=null==(e=this.services.cartesianScales)?void 0:e.getMainXScale().copy();r.domain(this.getDefaultZoomBarDomain());const o=r(n[0]),s=r(n[1]);if(s-o<i+1)return;const a=r.range(),l=s-o,c=Math.min((a[1]-a[0])/2*(t/2),l/2);let u=o+c,h=s-c;u>=h&&(u=o+l/2-i/2,h=s-l/2+i/2);const d=[r.invert(u),r.invert(h)];(n[0].valueOf()!==d[0].valueOf()||n[1].valueOf()!==d[1].valueOf())&&this.handleDomainChange(d)}zoomOut(t=this.getZoomRatio()){const e=this.model.get("zoomDomain");if(!this.services.cartesianScales)throw new Error("Services cartesianScales undefined");const n=this.services.cartesianScales.getMainXScale().copy();n.domain(this.getDefaultZoomBarDomain());const i=n(e[0]),r=n(e[1]),o=n.range(),s=(o[1]-o[0])/2*(t/2),a=Math.max(i-s,o[0]),l=Math.min(r+s,o[1]),c=[n.invert(a),n.invert(l)];(e[0].valueOf()!==c[0].valueOf()||e[1].valueOf()!==c[1].valueOf())&&this.handleDomainChange(c)}resetZoomDomain(){const t=this.model.get("zoomDomain"),e=this.getDefaultZoomBarDomain();(t[0].valueOf()!==e[0].valueOf()||t[1].valueOf()!==e[1].valueOf())&&this.handleDomainChange(e)}isMinZoomDomain(){const t=this.model.get("zoomDomain"),e=this.getDefaultZoomBarDomain();return!(!t||!e)&&(t[1].valueOf()-t[0].valueOf())/(e[1].valueOf()-e[0].valueOf())<dc(this.model.getOptions(),"zoomBar","minZoomRatio")}isMaxZoomDomain(){const t=this.model.get("zoomDomain"),e=this.getDefaultZoomBarDomain();return!(!t||!e||t[0].valueOf()!==e[0].valueOf()||t[1].valueOf()!==e[1].valueOf())}isEmptyState(){return 0===this.getZoomBarData().length}isZoomBarLoading(t){return dc(this.model.getOptions(),"zoomBar",t,"loading")}isZoomBarLocked(t){return dc(this.model.getOptions(),"zoomBar",t,"locked")}}var n_=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function i_(t){return n_.test(t)}var r_="\\ud800-\\udfff",o_="["+r_+"]",s_="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",a_="\\ud83c[\\udffb-\\udfff]",l_="[^"+r_+"]",c_="(?:\\ud83c[\\udde6-\\uddff]){2}",u_="[\\ud800-\\udbff][\\udc00-\\udfff]",h_="(?:"+s_+"|"+a_+")?",d_="[\\ufe0e\\ufe0f]?",f_=d_+h_+"(?:\\u200d(?:"+[l_,c_,u_].join("|")+")"+d_+h_+")*",p_="(?:"+[l_+s_+"?",s_,c_,u_,o_].join("|")+")",m_=RegExp(a_+"(?="+a_+")|"+p_+f_,"g");var g_=function(t){var e=i_(t=_n(t))?function(t){return i_(t)?function(t){return t.match(m_)||[]}(t):function(t){return t.split("")}(t)}(t):void 0,n=e?e[0]:t.charAt(0),i=e?function(t,e,n){var i=t.length;return Rv(t,1,n=void 0===n?i:n)}(e).join(""):t.slice(1);return n.toUpperCase()+i};fp((function(t,e,n){return e=e.toLowerCase(),t+(n?function(t){return g_(_n(t).toLowerCase())}(e):e)}));class v_{constructor(t,e){this.components=[],this.services={canvasZoom:Cy,domUtils:Uf,events:ky,files:Dy,gradientUtils:Bf,transitions:Ly},this.model=new du(this.services)}init(t,e){this.model.set({holder:t},{skipUpdate:!0}),Object.keys(this.services).forEach((t=>{const e=this.services[t];this.services[t]=new e(this.model,this.services)})),this.services.events.addEventListener(R.Model.UPDATE,(t=>{const e=!!dc(t,"detail","animate");this.update(e)})),this.model.setData(e.data),this.services.events.addEventListener(R.Chart.RESIZE,(()=>{this.update(!1)})),this.components=this.getComponents(),this.update()}getComponents(){return console.error("getComponents() method is not implemented"),[]}update(t=!0){if(!this.components)return;Object.keys(this.services).forEach((t=>{this.services[t].update()})),this.components.forEach((e=>e.render(t)));const e=this.services.transitions.getPendingTransitions(),n=Object.keys(e).map((t=>e[t].end().catch((t=>t))));Promise.all(n).then((()=>this.services.events.dispatchEvent(R.Chart.RENDER_FINISHED)))}destroy(){this.components.forEach((t=>t.destroy())),this.services.domUtils.getHolder().remove(),this.model.set({destroyed:!0},{skipUpdate:!0})}getChartComponents(t,e){const n=this.model.getOptions(),i=dc(n,"toolbar","enabled"),r={id:"legend",components:[new Yg(this.model,this.services)],growth:Y.PREFERRED},o=dc(n,"canvasZoom","enabled");o&&!0===o&&t.push(new qg(this.model,this.services));const s=!!this.model.getOptions().title,a={id:"title",components:[new Wg(this.model,this.services)],growth:Y.STRETCH},l={id:"toolbar",components:[new Fg(this.model,this.services)],growth:Y.PREFERRED},c={id:"header",components:[new jg(this.model,this.services,[a,...i?[l]:[]],{direction:W.ROW,alignItems:Z.CENTER})],growth:Y.PREFERRED},u={id:"graph-frame",components:t,growth:Y.STRETCH,renderType:dc(e,"graphFrameRenderType")||I.SVG},h=!0!==dc(e,"excludeLegend")&&!1!==n.legend.enabled;let d=W.COLUMN;if(h){const t=dc(n,"legend","position");"left"===t?(d=W.ROW,n.legend.orientation||(n.legend.orientation=V.VERTICAL)):"right"===t?(d=W.ROW_REVERSE,n.legend.orientation||(n.legend.orientation=V.VERTICAL)):"bottom"===t&&(d=W.COLUMN_REVERSE)}const f={id:"spacer",components:[new Vg(this.model,this.services)],growth:Y.PREFERRED},p={id:"full-frame",components:[new jg(this.model,this.services,[...h?[r]:[],...h?[f]:[],u],{direction:d})],growth:Y.STRETCH},m=[];if(s||i){m.push(c);const t={id:"spacer",components:[new Vg(this.model,this.services,i?{size:15}:void 0)],growth:Y.PREFERRED};m.push(t)}return m.push(p),[new ev(this.model,this.services),new Gg(this.model,this.services),new jg(this.model,this.services,m,{direction:W.COLUMN})]}}class y_ extends v_{constructor(t,e){super(t,e),this.services=Object.assign(this.services,{cartesianScales:Jy,curves:t_,zoom:e_}),this.model=new fu(this.services)}getAxisChartComponents(t,e){const n=this.model.getOptions(),i=dc(n,"zoomBar",U.TOP,"enabled"),r=dc(n,"toolbar","enabled");this.services.cartesianScales.determineAxisDuality(),this.services.cartesianScales.findDomainAndRangeAxes(),this.services.cartesianScales.determineOrientation();const o=this.services.cartesianScales.getMainXAxisPosition(),s=dc(n,"axes",o,"scaleType"),a=i&&o===U.BOTTOM&&s===F.TIME,l=this.services.zoom.isZoomBarLocked(U.TOP),c=!!this.model.getOptions().title,u={id:"title",components:[new Wg(this.model,this.services)],growth:Y.STRETCH},h={id:"toolbar",components:[new Fg(this.model,this.services)],growth:Y.PREFERRED},d={id:"header",components:[new jg(this.model,this.services,[u,...r?[h]:[]],{direction:W.ROW,alignItems:Z.CENTER})],growth:Y.PREFERRED},f={id:"legend",components:[new Yg(this.model,this.services)],growth:Y.PREFERRED};a&&!l&&t.push(new Zg(this.model,this.services),new iv(this.model,this.services)),t.push(new ov(this.model,this.services)),t.push(new sv(this.model,this.services));const p={id:"graph-frame",components:t,growth:Y.STRETCH,renderType:I.SVG},m=!1!==dc(e,"legend","enabled")&&!1!==this.model.getOptions().legend.enabled;let g=W.COLUMN;if(m){const t=dc(this.model.getOptions(),"legend","position");t===z.LEFT?(g=W.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=V.VERTICAL)):t===z.RIGHT?(g=W.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=V.VERTICAL)):t===z.BOTTOM&&(g=W.COLUMN_REVERSE)}const v={id:"spacer",components:[new Vg(this.model,this.services)],growth:Y.PREFERRED},y={id:"full-frame",components:[new jg(this.model,this.services,[...m?[f]:[],...m?[v]:[],p],{direction:g})],growth:Y.STRETCH},_={id:"zoom-bar",components:[new rv(this.model,this.services)],growth:Y.PREFERRED,renderType:I.SVG},b=[];if(c||r){b.push(d);const t={id:"spacer",components:[new Vg(this.model,this.services,r?{size:15}:void 0)],growth:Y.PREFERRED};b.push(t)}return a&&b.push(_),b.push(y),[new av(this.model,this.services),new Gg(this.model,this.services),new jg(this.model,this.services,b,{direction:W.COLUMN})]}}Q.LINE,Q.SCATTER,Q.AREA,Q.STACKED_AREA,Q.SIMPLE_BAR,Q.GROUPED_BAR,Q.STACKED_BAR;class __ extends y_{constructor(t,e){super(t,e),this.model.setOptions(function(t,e){var n;const i=Oi(t),r=Object.keys(e.axes||{});null!=(n=null==e?void 0:e.toolbar)&&n.controls&&delete i.toolbar.controls,0===r.length&&delete i.axes;for(const t in i.axes)if(r.includes(t)){const n=e.axes[t];if((n.primary||n.secondary)&&console.warn("`primary` & `secondary` are no longer needed for axis configurations. Read more here https://charts.carbondesignsystem.com/"),null==n.mapsTo){const t=n.scaleType;null==t?n.mapsTo="value":t===F.TIME?n.mapsTo="date":t===F.LABELS&&(n.mapsTo="key")}}else delete i.axes[t];return hc(i,e),Qi(i,e)}(lc.lineChart,e.options)),this.init(t,e)}getComponents(){const t=[new _v(this.model,this.services),new fv(this.model,this.services),new mv(this.model,this.services),new pv(this.model,this.services),new gv(this.model,this.services,{handleThresholds:!0}),new xv(this.model,this.services),new wv(this.model,this.services)];return this.getAxisChartComponents(t)}}class b_ extends i.PureComponent{constructor(){super(...arguments),o(this,"chart"),o(this,"chartRef",i.createRef())}createChart(t,e,n){throw new Error("Method not implemented.")}componentDidMount(){this.chartRef.current&&!this.chart&&(this.chart=this.createChart(this.chartRef.current,this.props.data,this.props.options))}componentDidUpdate(t){var e,n;this.props.data!==t.data&&(null==(e=this.chart)||e.model.setData(this.props.data)),this.props.options!==t.options&&(null==(n=this.chart)||n.model.setOptions(this.props.options))}render(){return i.createElement("div",{ref:this.chartRef,className:"chart-holder"})}}class w_ extends b_{createChart(t,e,n){return new __(t,{data:e,options:n})}}var x_;x_||(x_=1,function(t){!function(){var e={}.hasOwnProperty;function n(){for(var t="",e=0;e<arguments.length;e++){var n=arguments[e];n&&(t=r(t,i(n)))}return t}function i(t){if("string"==typeof t||"number"==typeof t)return t;if("object"!=typeof t)return"";if(Array.isArray(t))return n.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();var i="";for(var o in t)e.call(t,o)&&t[o]&&(i=r(i,o));return i}function r(t,e){return e?t?t+" "+e:t+e:t}t.exports?(n.default=n,t.exports=n):window.classNames=n}()}({exports:{}}))}}]);
|
|
1
|
+
/*! For license information please see 9595.js.LICENSE.txt */
|
|
2
|
+
(globalThis.webpackChunk_openmrs_esm_patient_vitals_app=globalThis.webpackChunk_openmrs_esm_patient_vitals_app||[]).push([[9595],{2326:(t,e,n)=>{"use strict";n.d(e,{XI:()=>a});var i,r=n(1343),o=n.n(r),s=n(9247);const a=o().forwardRef((function({children:t,size:e=16,...n},r){return o().createElement(s.A,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},i||(i=o().createElement("path",{d:"M29,5a2,2,0,0,0-2-2H5A2,2,0,0,0,3,5V27a2,2,0,0,0,2,2H27a2,2,0,0,0,2-2ZM27,5V9H5V5Zm0,22H5V23H27Zm0-6H5V17H27Zm0-6H5V11H27Z"})),t)}))},10279:function(t){t.exports=function(){"use strict";var t,e,n=1e3,i=6e4,r=36e5,o=864e5,s=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,a=31536e6,l=2628e6,c=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,u={years:a,months:l,days:o,hours:r,minutes:i,seconds:n,milliseconds:1,weeks:6048e5},h=function(t){return t instanceof y},d=function(t,e,n){return new y(t,n,e.$l)},f=function(t){return e.p(t)+"s"},p=function(t){return t<0},m=function(t){return p(t)?Math.ceil(t):Math.floor(t)},g=function(t){return Math.abs(t)},v=function(t,e){return t?p(t)?{negative:!0,format:""+g(t)+e}:{negative:!1,format:""+t+e}:{negative:!1,format:""}},y=function(){function p(t,e,n){var i=this;if(this.$d={},this.$l=n,void 0===t&&(this.$ms=0,this.parseFromMilliseconds()),e)return d(t*u[f(e)],this);if("number"==typeof t)return this.$ms=t,this.parseFromMilliseconds(),this;if("object"==typeof t)return Object.keys(t).forEach((function(e){i.$d[f(e)]=t[e]})),this.calMilliseconds(),this;if("string"==typeof t){var r=t.match(c);if(r){var o=r.slice(2).map((function(t){return null!=t?Number(t):0}));return this.$d.years=o[0],this.$d.months=o[1],this.$d.weeks=o[2],this.$d.days=o[3],this.$d.hours=o[4],this.$d.minutes=o[5],this.$d.seconds=o[6],this.calMilliseconds(),this}}return this}var g=p.prototype;return g.calMilliseconds=function(){var t=this;this.$ms=Object.keys(this.$d).reduce((function(e,n){return e+(t.$d[n]||0)*u[n]}),0)},g.parseFromMilliseconds=function(){var t=this.$ms;this.$d.years=m(t/a),t%=a,this.$d.months=m(t/l),t%=l,this.$d.days=m(t/o),t%=o,this.$d.hours=m(t/r),t%=r,this.$d.minutes=m(t/i),t%=i,this.$d.seconds=m(t/n),t%=n,this.$d.milliseconds=t},g.toISOString=function(){var t=v(this.$d.years,"Y"),e=v(this.$d.months,"M"),n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var i=v(n,"D"),r=v(this.$d.hours,"H"),o=v(this.$d.minutes,"M"),s=this.$d.seconds||0;this.$d.milliseconds&&(s+=this.$d.milliseconds/1e3,s=Math.round(1e3*s)/1e3);var a=v(s,"S"),l=t.negative||e.negative||i.negative||r.negative||o.negative||a.negative,c=r.format||o.format||a.format?"T":"",u=(l?"-":"")+"P"+t.format+e.format+i.format+c+r.format+o.format+a.format;return"P"===u||"-P"===u?"P0D":u},g.toJSON=function(){return this.toISOString()},g.format=function(t){var n=t||"YYYY-MM-DDTHH:mm:ss",i={Y:this.$d.years,YY:e.s(this.$d.years,2,"0"),YYYY:e.s(this.$d.years,4,"0"),M:this.$d.months,MM:e.s(this.$d.months,2,"0"),D:this.$d.days,DD:e.s(this.$d.days,2,"0"),H:this.$d.hours,HH:e.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:e.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:e.s(this.$d.seconds,2,"0"),SSS:e.s(this.$d.milliseconds,3,"0")};return n.replace(s,(function(t,e){return e||String(i[t])}))},g.as=function(t){return this.$ms/u[f(t)]},g.get=function(t){var e=this.$ms,n=f(t);return"milliseconds"===n?e%=1e3:e="weeks"===n?m(e/u[n]):this.$d[n],e||0},g.add=function(t,e,n){var i;return i=e?t*u[f(e)]:h(t)?t.$ms:d(t,this).$ms,d(this.$ms+i*(n?-1:1),this)},g.subtract=function(t,e){return this.add(t,e,!0)},g.locale=function(t){var e=this.clone();return e.$l=t,e},g.clone=function(){return d(this.$ms,this)},g.humanize=function(e){return t().add(this.$ms,"ms").locale(this.$l).fromNow(!e)},g.valueOf=function(){return this.asMilliseconds()},g.milliseconds=function(){return this.get("milliseconds")},g.asMilliseconds=function(){return this.as("milliseconds")},g.seconds=function(){return this.get("seconds")},g.asSeconds=function(){return this.as("seconds")},g.minutes=function(){return this.get("minutes")},g.asMinutes=function(){return this.as("minutes")},g.hours=function(){return this.get("hours")},g.asHours=function(){return this.as("hours")},g.days=function(){return this.get("days")},g.asDays=function(){return this.as("days")},g.weeks=function(){return this.get("weeks")},g.asWeeks=function(){return this.as("weeks")},g.months=function(){return this.get("months")},g.asMonths=function(){return this.as("months")},g.years=function(){return this.get("years")},g.asYears=function(){return this.as("years")},p}(),_=function(t,e,n){return t.add(e.years()*n,"y").add(e.months()*n,"M").add(e.days()*n,"d").add(e.hours()*n,"h").add(e.minutes()*n,"m").add(e.seconds()*n,"s").add(e.milliseconds()*n,"ms")};return function(n,i,r){t=r,e=r().$utils(),r.duration=function(t,e){var n=r.locale();return d(t,{$l:n},e)},r.isDuration=h;var o=i.prototype.add,s=i.prototype.subtract;i.prototype.add=function(t,e){return h(t)?_(this,t,1):o.bind(this)(t,e)},i.prototype.subtract=function(t,e){return h(t)?_(this,t,-1):s.bind(this)(t,e)}}}()},30723:function(t,e,n){var i,r;"undefined"!=typeof self&&self,t.exports=(i=n(1343),r=n(43144),function(){"use strict";var t={156:function(t){t.exports=i},111:function(t){t.exports=r},582:function(t,e,n){n.r(e),n.d(e,{__assign:function(){return o},__asyncDelegator:function(){return S},__asyncGenerator:function(){return T},__asyncValues:function(){return O},__await:function(){return E},__awaiter:function(){return p},__classPrivateFieldGet:function(){return D},__classPrivateFieldIn:function(){return R},__classPrivateFieldSet:function(){return L},__createBinding:function(){return g},__decorate:function(){return a},__esDecorate:function(){return c},__exportStar:function(){return v},__extends:function(){return r},__generator:function(){return m},__importDefault:function(){return k},__importStar:function(){return C},__makeTemplateObject:function(){return M},__metadata:function(){return f},__param:function(){return l},__propKey:function(){return h},__read:function(){return _},__rest:function(){return s},__runInitializers:function(){return u},__setFunctionName:function(){return d},__spread:function(){return b},__spreadArray:function(){return x},__spreadArrays:function(){return w},__values:function(){return y}});var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)};function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=function(){return o=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},o.apply(this,arguments)};function s(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]])}return n}function a(t,e,n,i){var r,o=arguments.length,s=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o<3?r(s):o>3?r(e,n,s):r(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s}function l(t,e){return function(n,i){e(n,i,t)}}function c(t,e,n,i,r,o){function s(t){if(void 0!==t&&"function"!=typeof t)throw new TypeError("Function expected");return t}for(var a,l=i.kind,c="getter"===l?"get":"setter"===l?"set":"value",u=!e&&t?i.static?t:t.prototype:null,h=e||(u?Object.getOwnPropertyDescriptor(u,i.name):{}),d=!1,f=n.length-1;f>=0;f--){var p={};for(var m in i)p[m]="access"===m?{}:i[m];for(var m in i.access)p.access[m]=i.access[m];p.addInitializer=function(t){if(d)throw new TypeError("Cannot add initializers after decoration has completed");o.push(s(t||null))};var g=(0,n[f])("accessor"===l?{get:h.get,set:h.set}:h[c],p);if("accessor"===l){if(void 0===g)continue;if(null===g||"object"!=typeof g)throw new TypeError("Object expected");(a=s(g.get))&&(h.get=a),(a=s(g.set))&&(h.set=a),(a=s(g.init))&&r.unshift(a)}else(a=s(g))&&("field"===l?r.unshift(a):h[c]=a)}u&&Object.defineProperty(u,i.name,h),d=!0}function u(t,e,n){for(var i=arguments.length>2,r=0;r<e.length;r++)n=i?e[r].call(t,n):e[r].call(t);return i?n:void 0}function h(t){return"symbol"==typeof t?t:"".concat(t)}function d(t,e,n){return"symbol"==typeof e&&(e=e.description?"[".concat(e.description,"]"):""),Object.defineProperty(t,"name",{configurable:!0,value:n?"".concat(n," ",e):e})}function f(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function p(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{l(i.next(t))}catch(t){o(t)}}function a(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}l((i=i.apply(t,e||[])).next())}))}function m(t,e){var n,i,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,i&&(r=2&a[0]?i.return:a[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,a[1])).done)return r;switch(i=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,i=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((r=(r=s.trys).length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){s.label=a[1];break}if(6===a[0]&&s.label<r[1]){s.label=r[1],r=a;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(a);break}r[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],i=0}finally{n=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}var g=Object.create?function(t,e,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);r&&!("get"in r?!e.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}:function(t,e,n,i){void 0===i&&(i=n),t[i]=e[n]};function v(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||g(e,t,n)}function y(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function _(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,o=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(i=o.next()).done;)s.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return s}function b(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(_(arguments[e]));return t}function w(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var i=Array(t),r=0;for(e=0;e<n;e++)for(var o=arguments[e],s=0,a=o.length;s<a;s++,r++)i[r]=o[s];return i}function x(t,e,n){if(n||2===arguments.length)for(var i,r=0,o=e.length;r<o;r++)!i&&r in e||(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))}function E(t){return this instanceof E?(this.v=t,this):new E(t)}function T(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,r=n.apply(t,e||[]),o=[];return i={},s("next"),s("throw"),s("return"),i[Symbol.asyncIterator]=function(){return this},i;function s(t){r[t]&&(i[t]=function(e){return new Promise((function(n,i){o.push([t,e,n,i])>1||a(t,e)}))})}function a(t,e){try{(n=r[t](e)).value instanceof E?Promise.resolve(n.value.v).then(l,c):u(o[0][2],n)}catch(t){u(o[0][3],t)}var n}function l(t){a("next",t)}function c(t){a("throw",t)}function u(t,e){t(e),o.shift(),o.length&&a(o[0][0],o[0][1])}}function S(t){var e,n;return e={},i("next"),i("throw",(function(t){throw t})),i("return"),e[Symbol.iterator]=function(){return this},e;function i(i,r){e[i]=t[i]?function(e){return(n=!n)?{value:E(t[i](e)),done:!1}:r?r(e):e}:r}}function O(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=y(t),e={},i("next"),i("throw"),i("return"),e[Symbol.asyncIterator]=function(){return this},e);function i(n){e[n]=t[n]&&function(e){return new Promise((function(i,r){!function(t,e,n,i){Promise.resolve(i).then((function(e){t({value:e,done:n})}),e)}(i,r,(e=t[n](e)).done,e.value)}))}}}function M(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}var A=Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e};function C(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&g(e,t,n);return A(e,t),e}function k(t){return t&&t.__esModule?t:{default:t}}function D(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)}function L(t,e,n,i,r){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?r.call(t,n):r?r.value=n:e.set(t,n),n}function R(t,e){if(null===e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof t?e===t:t.has(e)}e.default={__extends:r,__assign:o,__rest:s,__decorate:a,__param:l,__metadata:f,__awaiter:p,__generator:m,__createBinding:g,__exportStar:v,__values:y,__read:_,__spread:b,__spreadArrays:w,__spreadArray:x,__await:E,__asyncGenerator:T,__asyncDelegator:S,__asyncValues:O,__makeTemplateObject:M,__importStar:C,__importDefault:k,__classPrivateFieldGet:D,__classPrivateFieldSet:L,__classPrivateFieldIn:R}}},e={};function n(i){var r=e[i];if(void 0!==r)return r.exports;var o=e[i]={exports:{}};return t[i](o,o.exports,n),o.exports}n.d=function(t,e){for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};return function(){var t=o;Object.defineProperty(t,"__esModule",{value:!0}),t.useReactToPrint=t.PrintContextConsumer=void 0;var e=n(582),i=n(156),r=n(111),s=Object.prototype.hasOwnProperty.call(i,"createContext"),a=Object.prototype.hasOwnProperty.call(i,"useMemo")&&Object.prototype.hasOwnProperty.call(i,"useCallback"),l=s?i.createContext({}):null;t.PrintContextConsumer=l?l.Consumer:function(){return null};var c={copyStyles:!0,pageStyle:"\n @page {\n /* Remove browser default header (title) and footer (url) */\n margin: 0;\n }\n @media print {\n body {\n /* Tell browsers to print background colors */\n -webkit-print-color-adjust: exact; /* Chrome/Safari/Edge/Opera */\n color-adjust: exact; /* Firefox */\n }\n }\n ",removeAfterPrint:!1,suppressErrors:!1},u=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.startPrint=function(t){var e=n.props,i=e.onAfterPrint,r=e.onPrintError,o=e.print,s=e.documentTitle;setTimeout((function(){var e,a;if(t.contentWindow)if(t.contentWindow.focus(),o)o(t).then((function(){return null==i?void 0:i()})).then((function(){return n.handleRemoveIframe()})).catch((function(t){r?r("print",t):n.logMessages(["An error was thrown by the specified `print` function"])}));else{if(t.contentWindow.print){var l=null!==(a=null===(e=t.contentDocument)||void 0===e?void 0:e.title)&&void 0!==a?a:"",c=t.ownerDocument.title;s&&(t.ownerDocument.title=s,t.contentDocument&&(t.contentDocument.title=s)),t.contentWindow.print(),s&&(t.ownerDocument.title=c,t.contentDocument&&(t.contentDocument.title=l))}else n.logMessages(["Printing for this browser is not currently possible: the browser does not have a `print` method available for iframes."]);null==i||i(),n.handleRemoveIframe()}else n.logMessages(["Printing failed because the `contentWindow` of the print iframe did not load. This is possibly an error with `react-to-print`. Please file an issue: https://github.com/gregnb/react-to-print/issues/"])}),500)},n.triggerPrint=function(t){var e=n.props,i=e.onBeforePrint,r=e.onPrintError;if(i){var o=i();o&&"function"==typeof o.then?o.then((function(){n.startPrint(t)})).catch((function(t){r&&r("onBeforePrint",t)})):n.startPrint(t)}else n.startPrint(t)},n.handleClick=function(){var t=n.props,e=t.onBeforeGetContent,i=t.onPrintError;if(e){var r=e();r&&"function"==typeof r.then?r.then(n.handlePrint).catch((function(t){i&&i("onBeforeGetContent",t)})):n.handlePrint()}else n.handlePrint()},n.handlePrint=function(){var t=n.props,i=t.bodyClass,o=t.content,s=t.copyStyles,a=t.fonts,l=t.pageStyle,c=t.nonce,u=o();if(void 0!==u)if(null!==u){var h=document.createElement("iframe");h.width="".concat(document.documentElement.clientWidth,"px"),h.height="".concat(document.documentElement.clientHeight,"px"),h.style.position="absolute",h.style.top="-".concat(document.documentElement.clientHeight+100,"px"),h.style.left="-".concat(document.documentElement.clientWidth+100,"px"),h.id="printWindow",h.srcdoc="<!DOCTYPE html>";var d=(0,r.findDOMNode)(u);if(d){var f=d.cloneNode(!0),p=f instanceof Text,m=document.querySelectorAll("link[rel='stylesheet']"),g=p?[]:f.querySelectorAll("img"),v=p?[]:f.querySelectorAll("video"),y=a?a.length:0;n.numResourcesToLoad=m.length+g.length+v.length+y,n.resourcesLoaded=[],n.resourcesErrored=[];var _=function(t,i){n.resourcesLoaded.includes(t)?n.logMessages(["Tried to mark a resource that has already been handled",t],"debug"):(i?(n.logMessages(e.__spreadArray(['"react-to-print" was unable to load a resource but will continue attempting to print the page'],e.__read(i),!1)),n.resourcesErrored.push(t)):n.resourcesLoaded.push(t),n.resourcesLoaded.length+n.resourcesErrored.length===n.numResourcesToLoad&&n.triggerPrint(h))};h.onload=function(){var t,r,o,u;h.onload=null;var m=h.contentDocument||(null===(r=h.contentWindow)||void 0===r?void 0:r.document);if(m){m.body.appendChild(f),a&&((null===(o=h.contentDocument)||void 0===o?void 0:o.fonts)&&(null===(u=h.contentWindow)||void 0===u?void 0:u.FontFace)?a.forEach((function(t){var e=new FontFace(t.family,t.source,{weight:t.weight,style:t.style});h.contentDocument.fonts.add(e),e.loaded.then((function(){_(e)})).catch((function(t){_(e,["Failed loading the font:",e,"Load error:",t])}))})):(a.forEach((function(t){return _(t)})),n.logMessages(['"react-to-print" is not able to load custom fonts because the browser does not support the FontFace API but will continue attempting to print the page'])));var y="function"==typeof l?l():l;if("string"!=typeof y)n.logMessages(['"react-to-print" expected a "string" from `pageStyle` but received "'.concat(typeof y,'". Styles from `pageStyle` will not be applied.')]);else{var b=m.createElement("style");c&&(b.setAttribute("nonce",c),m.head.setAttribute("nonce",c)),b.appendChild(m.createTextNode(y)),m.head.appendChild(b)}if(i&&(t=m.body.classList).add.apply(t,e.__spreadArray([],e.__read(i.split(" ")),!1)),!p){for(var w=p?[]:d.querySelectorAll("canvas"),x=m.querySelectorAll("canvas"),E=0;E<w.length;++E){var T=w[E],S=x[E].getContext("2d");S&&S.drawImage(T,0,0)}var O=function(t){var e=g[t],n=e.getAttribute("src");if(n){var i=new Image;i.onload=function(){return _(e)},i.onerror=function(t,n,i,r,o){return _(e,["Error loading <img>",e,"Error",o])},i.src=n}else _(e,['Found an <img> tag with an empty "src" attribute. This prevents pre-loading it. The <img> is:',e])};for(E=0;E<g.length;E++)O(E);var M=function(t){var e=v[t];e.preload="auto";var n=e.getAttribute("poster");if(n){var i=new Image;i.onload=function(){return _(e)},i.onerror=function(t,i,r,o,s){return _(e,["Error loading video poster",n,"for video",e,"Error:",s])},i.src=n}else e.readyState>=2?_(e):(e.onloadeddata=function(){return _(e)},e.onerror=function(t,n,i,r,o){return _(e,["Error loading video",e,"Error",o])},e.onstalled=function(){return _(e,["Loading video stalled, skipping",e])})};for(E=0;E<v.length;E++)M(E);var A="input",C=d.querySelectorAll(A),k=m.querySelectorAll(A);for(E=0;E<C.length;E++)k[E].value=C[E].value;var D="input[type=checkbox],input[type=radio]",L=d.querySelectorAll(D),R=m.querySelectorAll(D);for(E=0;E<L.length;E++)R[E].checked=L[E].checked;var I="select",P=d.querySelectorAll(I),N=m.querySelectorAll(I);for(E=0;E<P.length;E++)N[E].value=P[E].value}if(s)for(var U=document.querySelectorAll("style, link[rel='stylesheet']"),B=function(t,e){var i=U[t];if("style"===i.tagName.toLowerCase()){var r=m.createElement(i.tagName),o=i.sheet;if(o){var s="";try{for(var a=o.cssRules.length,l=0;l<a;++l)"string"==typeof o.cssRules[l].cssText&&(s+="".concat(o.cssRules[l].cssText,"\r\n"))}catch(t){n.logMessages(["A stylesheet could not be accessed. This is likely due to the stylesheet having cross-origin imports, and many browsers block script access to cross-origin stylesheets. See https://github.com/gregnb/react-to-print/issues/429 for details. You may be able to load the sheet by both marking the stylesheet with the cross `crossorigin` attribute, and setting the `Access-Control-Allow-Origin` header on the server serving the stylesheet. Alternatively, host the stylesheet on your domain to avoid this issue entirely.",i],"warning")}r.setAttribute("id","react-to-print-".concat(t)),c&&r.setAttribute("nonce",c),r.appendChild(m.createTextNode(s)),m.head.appendChild(r)}}else if(i.getAttribute("href"))if(i.hasAttribute("disabled"))n.logMessages(["`react-to-print` encountered a <link> tag with a `disabled` attribute and will ignore it. Note that the `disabled` attribute is deprecated, and some browsers ignore it. You should stop using it. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-disabled. The <link> is:",i],"warning"),_(i);else{for(var u=m.createElement(i.tagName),h=(l=0,i.attributes.length);l<h;++l){var d=i.attributes[l];d&&u.setAttribute(d.nodeName,d.nodeValue||"")}u.onload=function(){return _(u)},u.onerror=function(t,e,n,i,r){return _(u,["Failed to load",u,"Error:",r])},c&&u.setAttribute("nonce",c),m.head.appendChild(u)}else n.logMessages(["`react-to-print` encountered a <link> tag with an empty `href` attribute. In addition to being invalid HTML, this can cause problems in many browsers, and so the <link> was not loaded. The <link> is:",i],"warning"),_(i)},H=(E=0,U.length);E<H;++E)B(E)}0!==n.numResourcesToLoad&&s||n.triggerPrint(h)},n.handleRemoveIframe(!0),document.body.appendChild(h)}else n.logMessages(['"react-to-print" could not locate the DOM node corresponding with the `content` prop'])}else n.logMessages(['There is nothing to print because the "content" prop returned "null". Please ensure "content" is renderable before allowing "react-to-print" to be called.']);else n.logMessages(["To print a functional component ensure it is wrapped with `React.forwardRef`, and ensure the forwarded ref is used. See the README for an example: https://github.com/gregnb/react-to-print#examples"])},n.handleRemoveIframe=function(t){var e=n.props.removeAfterPrint;if(t||e){var i=document.getElementById("printWindow");i&&document.body.removeChild(i)}},n.logMessages=function(t,e){void 0===e&&(e="error"),n.props.suppressErrors||("error"===e?console.error(t):"warning"===e?console.warn(t):"debug"===e&&console.debug(t))},n}return e.__extends(n,t),n.prototype.render=function(){var t=this.props,e=t.children,n=t.trigger;if(n)return i.cloneElement(n(),{onClick:this.handleClick});if(!l)return this.logMessages(['"react-to-print" requires React ^16.3.0 to be able to use "PrintContext"']),null;var r={handlePrint:this.handleClick};return i.createElement(l.Provider,{value:r},e)},n.defaultProps=c,n}(i.Component);t.default=u,t.useReactToPrint=function(t){if(!a)return t.suppressErrors||console.error('"react-to-print" requires React ^16.8.0 to be able to use "useReactToPrint"'),function(){throw new Error('"react-to-print" requires React ^16.8.0 to be able to use "useReactToPrint"')};var n=i.useMemo((function(){return new u(e.__assign(e.__assign({},c),t))}),[t]);return i.useCallback((function(){return n.handleClick()}),[n])}}(),o}())},51890:(t,e,n)=>{"use strict";n.d(e,{Wh:()=>F,bl:()=>w_});var i=n(1343),r=Object.defineProperty,o=(t,e,n)=>((t,e,n)=>e in t?r(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n)(t,"symbol"!=typeof e?e+"":e,n),s=(t=>(t.RENDER_FINISHED="render-finished",t.RESIZE="chart-resize",t.MOUSEOVER="chart-mouseover",t.MOUSEOUT="chart-mouseout",t))(s||{}),a=(t=>(t.SHOW="show-modal",t.HIDE="hide-modal",t))(a||{}),l=(t=>(t.UPDATE="model-update",t))(l||{}),c=(t=>(t.SHOW_OVERFLOW_MENU="show-toolbar-overflow-menu",t.HIDE_OVERFLOW_MENU="hide-toolbar-overflow-menu",t.BUTTON_CLICK="toolbar-button-click",t.SHOW_TOOLTIP="toolbar-show-tooltip",t.HIDE_TOOLTIP="toolbar-hide-tooltip",t))(c||{}),u=(t=>(t.UPDATE="zoom-bar-update",t.SELECTION_START="zoom-bar-selection-start",t.SELECTION_IN_PROGRESS="zoom-bar-selection-in-progress",t.SELECTION_END="zoom-bar-selection-end",t))(u||{}),h=(t=>(t.CHANGE="zoom-domain-change",t))(h||{}),d=(t=>(t.CANVAS_ZOOM_IN="canvas-zoom-in",t.CANVAS_ZOOM_OUT="canvas-zoom-out",t))(d||{}),f=(t=>(t.LABEL_MOUSEOVER="axis-label-mouseover",t.LABEL_MOUSEMOVE="axis-label-mousemove",t.LABEL_CLICK="axis-label-click",t.LABEL_MOUSEOUT="axis-label-mouseout",t.LABEL_FOCUS="axis-label-focus",t.LABEL_BLUR="axis-label-blur",t.RENDER_COMPLETE="axis-render-complete",t))(f||{}),p=(t=>(t.POINT_MOUSEOVER="scatter-mouseover",t.POINT_MOUSEMOVE="scatter-mousemove",t.POINT_CLICK="scatter-click",t.POINT_MOUSEOUT="scatter-mouseout",t))(p||{}),m=(t=>(t.WORD_MOUSEOVER="wordcloud-word-mouseover",t.WORD_MOUSEMOVE="wordcloud-word-mousemove",t.WORD_CLICK="wordcloud-word-click",t.WORD_MOUSEOUT="wordcloud-word-mouseout",t))(m||{}),g=(t=>(t.SLICE_MOUSEOVER="pie-slice-mouseover",t.SLICE_MOUSEMOVE="pie-slice-mousemove",t.SLICE_CLICK="pie-slice-click",t.SLICE_MOUSEOUT="pie-slice-mouseout",t))(g||{}),v=(t=>(t.ARC_MOUSEOVER="gauge-arc-mouseover",t.ARC_MOUSEMOVE="gauge-arc-mousemove",t.ARC_CLICK="gauge-arc-click",t.ARC_MOUSEOUT="gauge-arc-mouseout",t))(v||{}),y=(t=>(t.BAR_MOUSEOVER="bar-mouseover",t.BAR_MOUSEMOVE="bar-mousemove",t.BAR_CLICK="bar-click",t.BAR_MOUSEOUT="bar-mouseout",t))(y||{}),_=(t=>(t.BOX_MOUSEOVER="box-mouseover",t.BOX_MOUSEMOVE="box-mousemove",t.BOX_CLICK="box-click",t.BOX_MOUSEOUT="box-mouseout",t.OUTLIER_MOUSEOVER="outlier-mouseover",t.OUTLIER_MOUSEMOVE="outlier-mousemove",t.OUTLIER_CLICK="outlier-click",t.OUTLIER_MOUSEOUT="outlier-mouseout",t))(_||{}),b=(t=>(t.SCATTER_MOUSEOVER="scatter-mouseover",t.SCATTER_MOUSEMOVE="scatter-mousemove",t.SCATTER_CLICK="scatter-click",t.SCATTER_MOUSEOUT="scatter-mouseout",t))(b||{}),w=(t=>(t.POINT_MOUSEOVER="scatter-mouseover",t.POINT_MOUSEMOVE="scatter-mousemove",t.POINT_CLICK="scatter-click",t.POINT_MOUSEOUT="scatter-mouseout",t))(w||{}),x=(t=>(t.X_AXIS_MOUSEOVER="radar-x-axis-mouseover",t.X_AXIS_MOUSEMOVE="radar-x-axis-mousemove",t.X_AXIS_CLICK="radar-x-axis-click",t.X_AXIS_MOUSEOUT="radar-x-axis-mouseout",t))(x||{}),E=(t=>(t.NODE_MOUSEOVER="tree-node-mouseover",t.NODE_CLICK="tree-node-click",t.NODE_MOUSEOUT="tree-node-mouseout",t))(E||{}),T=(t=>(t.LEAF_MOUSEOVER="leaf-mouseover",t.LEAF_MOUSEMOVE="leaf-mousemove",t.LEAF_CLICK="leaf-click",t.LEAF_MOUSEOUT="leaf-mouseout",t))(T||{}),S=(t=>(t.SHOW="show-tooltip",t.MOVE="move-tooltip",t.HIDE="hide-tooltip",t))(S||{}),O=(t=>(t.SHOW="show-threshold",t.HIDE="hide-threshold",t))(O||{}),M=(t=>(t.ITEM_HOVER="legend-item-onhover",t.ITEM_CLICK="legend-item-onclick",t.ITEM_MOUSEOUT="legend-item-onmouseout",t.ITEMS_UPDATE="legend-items-update",t))(M||{}),A=(t=>(t.CIRCLE_MOUSEOVER="circle-leaf-mouseover",t.CIRCLE_CLICK="circle-leaf-click",t.CIRCLE_MOUSEOUT="circle-leaf-mouseout",t.CIRCLE_MOUSEMOVE="circle-leaf-mousemove",t))(A||{}),C=(t=>(t.NODE_MOUSEOVER="alluvial-node-mouseover",t.NODE_CLICK="alluvial-node-click",t.NODE_MOUSEOUT="alluvial-node-mouseout",t.NODE_MOUSEMOVE="alluvial-node-mousemove",t.LINE_MOUSEOVER="alluvial-line-mouseover",t.LINE_CLICK="alluvial-line-click",t.LINE_MOUSEOUT="alluvial-line-mouseout",t.LINE_MOUSEMOVE="alluvial-line-mousemove",t))(C||{}),k=(t=>(t.METER_MOUSEOVER="meter-mouseover",t.METER_CLICK="meter-click",t.METER_MOUSEOUT="meter-mouseout",t.METER_MOUSEMOVE="meter-mousemove",t))(k||{}),D=(t=>(t.HEATMAP_MOUSEOVER="heatmap-mouseover",t.HEATMAP_CLICK="heatmap-click",t.HEATMAP_MOUSEOUT="heatmap-mouseout",t.HEATMAP_MOUSEMOVE="hetmap-mousemove",t))(D||{}),L=(t=>(t.CHOROPLETH_MOUSEOVER="choropleth-mouseover",t.CHOROPLETH_CLICK="choropleth-click",t.CHOROPLETH_MOUSEOUT="choropleth-mouseout",t.CHOROPLETH_MOUSEMOVE="choropleth-mousemove",t))(L||{});const R=Object.freeze(Object.defineProperty({__proto__:null,Alluvial:C,Area:p,Axis:f,Bar:y,Boxplot:_,CanvasZoom:d,Chart:s,Choropleth:L,CirclePack:A,Gauge:v,Heatmap:D,Legend:M,Line:w,Meter:k,Modal:a,Model:l,Pie:g,Radar:x,Scatter:b,Threshold:O,Toolbar:c,Tooltip:S,Tree:E,Treemap:T,WordCloud:m,ZoomBar:u,ZoomDomain:h},Symbol.toStringTag,{value:"Module"}));var I=(t=>(t.HTML="html",t.SVG="svg",t))(I||{}),P=(t=>(t.WHITE="white",t.G100="g100",t.G90="g90",t.G10="g10",t))(P||{}),N=(t=>(t.BACKGROUND="background",t.FILL="fill",t.STROKE="stroke",t.TOOLTIP="tooltip",t))(N||{}),U=(t=>(t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom",t))(U||{}),B=(t=>(t.GRAPH_VIEW="graph_view",t.SLIDER_VIEW="slider_view",t))(B||{}),H=(t=>(t.END_LINE="end_line",t.MID_LINE="mid_line",t.FRONT_LINE="front_line",t.NONE="none",t))(H||{}),$=(t=>(t.VERTICAL="vertical",t.HORIZONTAL="horizontal",t))($||{}),F=(t=>(t.TIME="time",t.LINEAR="linear",t.LOG="log",t.LABELS="labels",t.LABELS_RATIO="labels-ratio",t))(F||{}),z=(t=>(t.RIGHT="right",t.LEFT="left",t.TOP="top",t.BOTTOM="bottom",t))(z||{}),j=(t=>(t.LEFT="left",t.CENTER="center",t.RIGHT="right",t))(j||{}),V=(t=>(t.HORIZONTAL="horizontal",t.VERTICAL="vertical",t))(V||{}),G=(t=>(t.TREE="tree",t.DENDROGRAM="dendrogram",t))(G||{}),W=(t=>(t.ROW="row",t.COLUMN="column",t.ROW_REVERSE="row-reverse",t.COLUMN_REVERSE="column-reverse",t))(W||{}),Y=(t=>(t.FIXED="fixed",t.PREFERRED="preferred",t.STRETCH="stretch",t))(Y||{}),Z=(t=>(t.CENTER="center",t))(Z||{}),q=(t=>(t.GRID="grid",t.VERT_OR_HORIZ="vertOrHoriz",t.PIE="pie",t.DONUT="donut",t))(q||{}),X=(t=>(t.SEMI="semi",t.FULL="full",t))(X||{}),K=(t=>(t.ALWAYS="always",t.AUTO="auto",t.NEVER="never",t))(K||{}),Q=(t=>(t.SCATTER="scatter",t.LINE="line",t.SIMPLE_BAR="simple-bar",t.STACKED_BAR="stacked-bar",t.GROUPED_BAR="grouped-bar",t.AREA="area",t.STACKED_AREA="stacked-area",t))(Q||{}),J=(t=>(t.EXPORT_CSV="Export as CSV",t.EXPORT_PNG="Export as PNG",t.EXPORT_JPG="Export as JPG",t.ZOOM_IN="Zoom in",t.ZOOM_OUT="Zoom out",t.RESET_ZOOM="Reset zoom",t.MAKE_FULLSCREEN="Make fullscreen",t.EXIT_FULLSCREEN="Exit fullscreen",t.SHOW_AS_DATATABLE="Show as data-table",t.CUSTOM="Custom",t))(J||{}),tt=(t=>(t.LEFT="left",t.RIGHT="right",t))(tt||{}),et=(t=>(t.CHECKBOX="checkbox",t.RADIUS="radius",t.AREA="area",t.SIZE="size",t.LINE="line",t.QUARTILE="quartile",t.ZOOM="zoom",t))(et||{}),nt=(t=>(t.ON="on",t.AUTO="auto",t.OFF="off",t))(nt||{}),it=(t=>(t.DEFAULT="default",t.HOVERABLE="hoverable",t))(it||{}),rt=(t=>(t.geoEqualEarth="geoEqualEarth",t.geoAlbers="geoAlbers",t.geoConicEqualArea="geoConicEqualArea",t.geoConicEquidistant="geoConicEquidistant",t.geoEquirectangular="geoEquirectangular",t.geoMercator="geoMercator",t.geoNaturalEarth1="geoNaturalEarth1",t))(rt||{}),ot=(t=>(t["15seconds"]="15seconds",t.minute="minute",t["30minutes"]="30minutes",t.hourly="hourly",t.daily="daily",t.weekly="weekly",t.monthly="monthly",t.quarterly="quarterly",t.yearly="yearly",t))(ot||{});function st(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}function at(t){return(e,n)=>{let i;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&t.formattingValues){const e=t.defaultFormattingWidth||t.defaultWidth,r=null!=n&&n.width?String(n.width):e;i=t.formattingValues[r]||t.formattingValues[e]}else{const e=t.defaultWidth,r=null!=n&&n.width?String(n.width):t.defaultWidth;i=t.values[r]||t.values[e]}return i[t.argumentCallback?t.argumentCallback(e):e]}}function lt(t){return(e,n={})=>{const i=n.width,r=i&&t.matchPatterns[i]||t.matchPatterns[t.defaultMatchWidth],o=e.match(r);if(!o)return null;const s=o[0],a=i&&t.parsePatterns[i]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(a)?function(t){for(let e=0;e<t.length;e++)if(t[e].test(s))return e}(a):function(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&t[e].test(s))return e}(a);let c;return c=t.valueCallback?t.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c,{value:c,rest:e.slice(s.length)}}}const ct=6048e5,ut=36e5,ht=Symbol.for("constructDateFrom");function dt(t,e){return"function"==typeof t?t(e):t&&"object"==typeof t&&ht in t?t[ht](e):t instanceof Date?new t.constructor(e):new Date(e)}function ft(t,...e){const n=dt.bind(null,e.find((t=>"object"==typeof t)));return e.map(n)}let pt={};function mt(){return pt}function gt(t,e){return dt(e||t,t)}function vt(t,e){var n,i,r,o;const s=mt(),a=(null==e?void 0:e.weekStartsOn)??(null==(i=null==(n=null==e?void 0:e.locale)?void 0:n.options)?void 0:i.weekStartsOn)??s.weekStartsOn??(null==(o=null==(r=s.locale)?void 0:r.options)?void 0:o.weekStartsOn)??0,l=gt(t,null==e?void 0:e.in),c=l.getDay(),u=(c<a?7:0)+c-a;return l.setDate(l.getDate()-u),l.setHours(0,0,0,0),l}const yt={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},_t={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},bt={ordinalNumber:(t,e)=>{const n=Number(t),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:at({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:at({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:t=>t-1}),month:at({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:at({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:at({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},wt={ordinalNumber:(Et={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:t=>parseInt(t,10)},(t,e={})=>{const n=t.match(Et.matchPattern);if(!n)return null;const i=n[0],r=t.match(Et.parsePattern);if(!r)return null;let o=Et.valueCallback?Et.valueCallback(r[0]):r[0];return o=e.valueCallback?e.valueCallback(o):o,{value:o,rest:t.slice(i.length)}}),era:lt({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:lt({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:t=>t+1}),month:lt({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:lt({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:lt({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},xt={code:"en-US",formatDistance:(t,e,n)=>{let i;const r=yt[t];return i="string"==typeof r?r:1===e?r.one:r.other.replace("{{count}}",e.toString()),null!=n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i},formatLong:{date:st({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:st({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:st({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},formatRelative:(t,e,n,i)=>_t[t],localize:bt,match:wt,options:{weekStartsOn:0,firstWeekContainsDate:1}};var Et,Tt="object"==typeof global&&global&&global.Object===Object&&global,St="object"==typeof self&&self&&self.Object===Object&&self,Ot=Tt||St||Function("return this")(),Mt=Ot.Symbol,At=Object.prototype,Ct=At.hasOwnProperty,kt=At.toString,Dt=Mt?Mt.toStringTag:void 0,Lt=Object.prototype.toString,Rt=Mt?Mt.toStringTag:void 0;function It(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Rt&&Rt in Object(t)?function(t){var e=Ct.call(t,Dt),n=t[Dt];try{t[Dt]=void 0;var i=!0}catch{}var r=kt.call(t);return i&&(e?t[Dt]=n:delete t[Dt]),r}(t):function(t){return Lt.call(t)}(t)}function Pt(t){return null!=t&&"object"==typeof t}function Nt(t){return"symbol"==typeof t||Pt(t)&&"[object Symbol]"==It(t)}function Ut(t,e){for(var n=-1,i=null==t?0:t.length,r=Array(i);++n<i;)r[n]=e(t[n],n,t);return r}var Bt=Array.isArray,Ht=Mt?Mt.prototype:void 0,$t=Ht?Ht.toString:void 0;function Ft(t){if("string"==typeof t)return t;if(Bt(t))return Ut(t,Ft)+"";if(Nt(t))return $t?$t.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function zt(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function jt(t){return t}function Vt(t){if(!zt(t))return!1;var e=It(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}var Gt=Ot["__core-js_shared__"],Wt=function(){var t=/[^.]+$/.exec(Gt&&Gt.keys&&Gt.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Yt=Function.prototype.toString;function Zt(t){if(null!=t){try{return Yt.call(t)}catch{}try{return t+""}catch{}}return""}var qt=/^\[object .+?Constructor\]$/,Xt=Function.prototype,Kt=Object.prototype,Qt=Xt.toString,Jt=Kt.hasOwnProperty,te=RegExp("^"+Qt.call(Jt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ee(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return function(t){return!(!zt(t)||function(t){return!!Wt&&Wt in t}(t))&&(Vt(t)?te:qt).test(Zt(t))}(n)?n:void 0}var ne=ee(Ot,"WeakMap"),ie=Object.create,re=function(){function t(){}return function(e){if(!zt(e))return{};if(ie)return ie(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function oe(t,e){var n=-1,i=t.length;for(e||(e=Array(i));++n<i;)e[n]=t[n];return e}var se=Date.now;function ae(t){return function(){return t}}var le=function(){try{var t=ee(Object,"defineProperty");return t({},"",{}),t}catch{}}(),ce=le?function(t,e){return le(t,"toString",{configurable:!0,enumerable:!1,value:ae(e),writable:!0})}:jt,ue=function(t){var e=0,n=0;return function(){var i=se(),r=16-(i-n);if(n=i,r>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(ce);function he(t){return t!=t}function de(t,e){return!(null==t||!t.length)&&function(t,e){return e==e?function(t,e){for(var n=-1,i=t.length;++n<i;)if(t[n]===e)return n;return-1}(t,e):function(t,e){for(var n=t.length,i=-1;++i<n;)if(e(t[i],i,t))return i;return-1}(t,he)}(t,e)>-1}var fe=/^(?:0|[1-9]\d*)$/;function pe(t,e){var n=typeof t;return!!(e=e??9007199254740991)&&("number"==n||"symbol"!=n&&fe.test(t))&&t>-1&&t%1==0&&t<e}function me(t,e,n){"__proto__"==e&&le?le(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function ge(t,e){return t===e||t!=t&&e!=e}var ve=Object.prototype.hasOwnProperty;function ye(t,e,n){var i=t[e];(!ve.call(t,e)||!ge(i,n)||void 0===n&&!(e in t))&&me(t,e,n)}function _e(t,e,n,i){var r=!n;n||(n={});for(var o=-1,s=e.length;++o<s;){var a=e[o],l=void 0;void 0===l&&(l=t[a]),r?me(n,a,l):ye(n,a,l)}return n}var be=Math.max;function we(t,e,n){return e=be(void 0===e?t.length-1:e,0),function(){for(var i=arguments,r=-1,o=be(i.length-e,0),s=Array(o);++r<o;)s[r]=i[e+r];r=-1;for(var a=Array(e+1);++r<e;)a[r]=i[r];return a[e]=n(s),function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}(t,this,a)}}function xe(t,e){return ue(we(t,e,jt),t+"")}function Ee(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function Te(t){return null!=t&&Ee(t.length)&&!Vt(t)}var Se=Object.prototype;function Oe(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Se)}function Me(t){return Pt(t)&&"[object Arguments]"==It(t)}var Ae=Object.prototype,Ce=Ae.hasOwnProperty,ke=Ae.propertyIsEnumerable,De=Me(function(){return arguments}())?Me:function(t){return Pt(t)&&Ce.call(t,"callee")&&!ke.call(t,"callee")},Le="object"==typeof exports&&exports&&!exports.nodeType&&exports,Re=Le&&"object"==typeof module&&module&&!module.nodeType&&module,Ie=Re&&Re.exports===Le?Ot.Buffer:void 0,Pe=(Ie?Ie.isBuffer:void 0)||function(){return!1},Ne={};function Ue(t){return function(e){return t(e)}}Ne["[object Float32Array]"]=Ne["[object Float64Array]"]=Ne["[object Int8Array]"]=Ne["[object Int16Array]"]=Ne["[object Int32Array]"]=Ne["[object Uint8Array]"]=Ne["[object Uint8ClampedArray]"]=Ne["[object Uint16Array]"]=Ne["[object Uint32Array]"]=!0,Ne["[object Arguments]"]=Ne["[object Array]"]=Ne["[object ArrayBuffer]"]=Ne["[object Boolean]"]=Ne["[object DataView]"]=Ne["[object Date]"]=Ne["[object Error]"]=Ne["[object Function]"]=Ne["[object Map]"]=Ne["[object Number]"]=Ne["[object Object]"]=Ne["[object RegExp]"]=Ne["[object Set]"]=Ne["[object String]"]=Ne["[object WeakMap]"]=!1;var Be="object"==typeof exports&&exports&&!exports.nodeType&&exports,He=Be&&"object"==typeof module&&module&&!module.nodeType&&module,$e=He&&He.exports===Be&&Tt.process,Fe=function(){try{return He&&He.require&&He.require("util").types||$e&&$e.binding&&$e.binding("util")}catch{}}(),ze=Fe&&Fe.isTypedArray,je=ze?Ue(ze):function(t){return Pt(t)&&Ee(t.length)&&!!Ne[It(t)]},Ve=Object.prototype.hasOwnProperty;function Ge(t,e){var n=Bt(t),i=!n&&De(t),r=!n&&!i&&Pe(t),o=!n&&!i&&!r&&je(t),s=n||i||r||o,a=s?function(t,e){for(var n=-1,i=Array(t);++n<t;)i[n]=e(n);return i}(t.length,String):[],l=a.length;for(var c in t)(e||Ve.call(t,c))&&(!s||!("length"==c||r&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||pe(c,l)))&&a.push(c);return a}function We(t,e){return function(n){return t(e(n))}}var Ye=We(Object.keys,Object),Ze=Object.prototype.hasOwnProperty;function qe(t){if(!Oe(t))return Ye(t);var e=[];for(var n in Object(t))Ze.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Xe(t){return Te(t)?Ge(t):qe(t)}var Ke=Object.prototype.hasOwnProperty;function Qe(t){return Te(t)?Ge(t,!0):function(t){if(!zt(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=Oe(t),n=[];for(var i in t)"constructor"==i&&(e||!Ke.call(t,i))||n.push(i);return n}(t)}var Je=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,tn=/^\w*$/;function en(t,e){if(Bt(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Nt(t))||tn.test(t)||!Je.test(t)||null!=e&&t in Object(e)}var nn=ee(Object,"create"),rn=Object.prototype.hasOwnProperty,on=Object.prototype.hasOwnProperty;function sn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function an(t,e){for(var n=t.length;n--;)if(ge(t[n][0],e))return n;return-1}sn.prototype.clear=function(){this.__data__=nn?nn(null):{},this.size=0},sn.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},sn.prototype.get=function(t){var e=this.__data__;if(nn){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return rn.call(e,t)?e[t]:void 0},sn.prototype.has=function(t){var e=this.__data__;return nn?void 0!==e[t]:on.call(e,t)},sn.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=nn&&void 0===e?"__lodash_hash_undefined__":e,this};var ln=Array.prototype.splice;function cn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}cn.prototype.clear=function(){this.__data__=[],this.size=0},cn.prototype.delete=function(t){var e=this.__data__,n=an(e,t);return!(n<0||(n==e.length-1?e.pop():ln.call(e,n,1),--this.size,0))},cn.prototype.get=function(t){var e=this.__data__,n=an(e,t);return n<0?void 0:e[n][1]},cn.prototype.has=function(t){return an(this.__data__,t)>-1},cn.prototype.set=function(t,e){var n=this.__data__,i=an(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this};var un=ee(Ot,"Map");function hn(t,e){var n=t.__data__;return function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}(e)?n["string"==typeof e?"string":"hash"]:n.map}function dn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function fn(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var i=arguments,r=e?e.apply(this,i):i[0],o=n.cache;if(o.has(r))return o.get(r);var s=t.apply(this,i);return n.cache=o.set(r,s)||o,s};return n.cache=new(fn.Cache||dn),n}dn.prototype.clear=function(){this.size=0,this.__data__={hash:new sn,map:new(un||cn),string:new sn}},dn.prototype.delete=function(t){var e=hn(this,t).delete(t);return this.size-=e?1:0,e},dn.prototype.get=function(t){return hn(this,t).get(t)},dn.prototype.has=function(t){return hn(this,t).has(t)},dn.prototype.set=function(t,e){var n=hn(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this},fn.Cache=dn;var pn,mn,gn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,vn=/\\(\\)?/g,yn=(pn=fn((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(gn,(function(t,n,i,r){e.push(i?r.replace(vn,"$1"):n||t)})),e}),(function(t){return 500===mn.size&&mn.clear(),t})),mn=pn.cache,pn);function _n(t){return null==t?"":Ft(t)}function bn(t,e){return Bt(t)?t:en(t,e)?[t]:yn(_n(t))}function wn(t){if("string"==typeof t||Nt(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function xn(t,e){for(var n=0,i=(e=bn(e,t)).length;null!=t&&n<i;)t=t[wn(e[n++])];return n&&n==i?t:void 0}function En(t,e,n){var i=null==t?void 0:xn(t,e);return void 0===i?n:i}function Tn(t,e){for(var n=-1,i=e.length,r=t.length;++n<i;)t[r+n]=e[n];return t}var Sn=Mt?Mt.isConcatSpreadable:void 0;function On(t){return Bt(t)||De(t)||!!(Sn&&t&&t[Sn])}function Mn(t,e,n,i,r){var o=-1,s=t.length;for(n||(n=On),r||(r=[]);++o<s;){var a=t[o];e>0&&n(a)?e>1?Mn(a,e-1,n,i,r):Tn(r,a):i||(r[r.length]=a)}return r}var An=We(Object.getPrototypeOf,Object),Cn=Function.prototype,kn=Object.prototype,Dn=Cn.toString,Ln=kn.hasOwnProperty,Rn=Dn.call(Object);function In(t){if(!Pt(t)||"[object Object]"!=It(t))return!1;var e=An(t);if(null===e)return!0;var n=Ln.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Dn.call(n)==Rn}function Pn(t){var e=this.__data__=new cn(t);this.size=e.size}Pn.prototype.clear=function(){this.__data__=new cn,this.size=0},Pn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Pn.prototype.get=function(t){return this.__data__.get(t)},Pn.prototype.has=function(t){return this.__data__.has(t)},Pn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof cn){var i=n.__data__;if(!un||i.length<199)return i.push([t,e]),this.size=++n.size,this;n=this.__data__=new dn(i)}return n.set(t,e),this.size=n.size,this};var Nn="object"==typeof exports&&exports&&!exports.nodeType&&exports,Un=Nn&&"object"==typeof module&&module&&!module.nodeType&&module,Bn=Un&&Un.exports===Nn?Ot.Buffer:void 0,Hn=Bn?Bn.allocUnsafe:void 0;function $n(t,e){if(e)return t.slice();var n=t.length,i=Hn?Hn(n):new t.constructor(n);return t.copy(i),i}function Fn(){return[]}var zn=Object.prototype.propertyIsEnumerable,jn=Object.getOwnPropertySymbols,Vn=jn?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,i=null==t?0:t.length,r=0,o=[];++n<i;){var s=t[n];e(s)&&(o[r++]=s)}return o}(jn(t),(function(e){return zn.call(t,e)})))}:Fn,Gn=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)Tn(e,Vn(t)),t=An(t);return e}:Fn;function Wn(t,e,n){var i=e(t);return Bt(t)?i:Tn(i,n(t))}function Yn(t){return Wn(t,Xe,Vn)}function Zn(t){return Wn(t,Qe,Gn)}var qn=ee(Ot,"DataView"),Xn=ee(Ot,"Promise"),Kn=ee(Ot,"Set"),Qn="[object Map]",Jn="[object Promise]",ti="[object Set]",ei="[object WeakMap]",ni="[object DataView]",ii=Zt(qn),ri=Zt(un),oi=Zt(Xn),si=Zt(Kn),ai=Zt(ne),li=It;(qn&&li(new qn(new ArrayBuffer(1)))!=ni||un&&li(new un)!=Qn||Xn&&li(Xn.resolve())!=Jn||Kn&&li(new Kn)!=ti||ne&&li(new ne)!=ei)&&(li=function(t){var e=It(t),n="[object Object]"==e?t.constructor:void 0,i=n?Zt(n):"";if(i)switch(i){case ii:return ni;case ri:return Qn;case oi:return Jn;case si:return ti;case ai:return ei}return e});var ci=Object.prototype.hasOwnProperty,ui=Ot.Uint8Array;function hi(t){var e=new t.constructor(t.byteLength);return new ui(e).set(new ui(t)),e}var di=/\w*$/,fi=Mt?Mt.prototype:void 0,pi=fi?fi.valueOf:void 0;function mi(t,e){var n=e?hi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function gi(t){return"function"!=typeof t.constructor||Oe(t)?{}:re(An(t))}var vi=Fe&&Fe.isMap,yi=vi?Ue(vi):function(t){return Pt(t)&&"[object Map]"==li(t)},_i=Fe&&Fe.isSet,bi=_i?Ue(_i):function(t){return Pt(t)&&"[object Set]"==li(t)},wi="[object Arguments]",xi="[object Function]",Ei="[object Object]",Ti={};function Si(t,e,n,i,r,o){var s,a=1&e,l=2&e,c=4&e;if(n&&(s=r?n(t,i,r,o):n(t)),void 0!==s)return s;if(!zt(t))return t;var u=Bt(t);if(u){if(s=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&ci.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!a)return oe(t,s)}else{var h=li(t),d=h==xi||"[object GeneratorFunction]"==h;if(Pe(t))return $n(t,a);if(h==Ei||h==wi||d&&!r){if(s=l||d?{}:gi(t),!a)return l?function(t,e){return _e(t,Gn(t),e)}(t,function(t,e){return t&&_e(e,Qe(e),t)}(s,t)):function(t,e){return _e(t,Vn(t),e)}(t,function(t,e){return t&&_e(e,Xe(e),t)}(s,t))}else{if(!Ti[h])return r?t:{};s=function(t,e,n){var i=t.constructor;switch(e){case"[object ArrayBuffer]":return hi(t);case"[object Boolean]":case"[object Date]":return new i(+t);case"[object DataView]":return function(t,e){var n=e?hi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return mi(t,n);case"[object Map]":case"[object Set]":return new i;case"[object Number]":case"[object String]":return new i(t);case"[object RegExp]":return function(t){var e=new t.constructor(t.source,di.exec(t));return e.lastIndex=t.lastIndex,e}(t);case"[object Symbol]":return function(t){return pi?Object(pi.call(t)):{}}(t)}}(t,h,a)}}o||(o=new Pn);var f=o.get(t);if(f)return f;o.set(t,s),bi(t)?t.forEach((function(i){s.add(Si(i,e,n,i,t,o))})):yi(t)&&t.forEach((function(i,r){s.set(r,Si(i,e,n,r,t,o))}));var p=u?void 0:(c?l?Zn:Yn:l?Qe:Xe)(t);return function(t,e){for(var n=-1,i=null==t?0:t.length;++n<i&&!1!==e(t[n],n););}(p||t,(function(i,r){p&&(i=t[r=i]),ye(s,r,Si(i,e,n,r,t,o))})),s}function Oi(t){return Si(t,5)}function Mi(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new dn;++e<n;)this.add(t[e])}function Ai(t,e){for(var n=-1,i=null==t?0:t.length;++n<i;)if(e(t[n],n,t))return!0;return!1}function Ci(t,e){return t.has(e)}function ki(t,e,n,i,r,o){var s=1&n,a=t.length,l=e.length;if(a!=l&&!(s&&l>a))return!1;var c=o.get(t),u=o.get(e);if(c&&u)return c==e&&u==t;var h=-1,d=!0,f=2&n?new Mi:void 0;for(o.set(t,e),o.set(e,t);++h<a;){var p=t[h],m=e[h];if(i)var g=s?i(m,p,h,e,t,o):i(p,m,h,t,e,o);if(void 0!==g){if(g)continue;d=!1;break}if(f){if(!Ai(e,(function(t,e){if(!Ci(f,e)&&(p===t||r(p,t,n,i,o)))return f.push(e)}))){d=!1;break}}else if(p!==m&&!r(p,m,n,i,o)){d=!1;break}}return o.delete(t),o.delete(e),d}function Di(t){var e=-1,n=Array(t.size);return t.forEach((function(t,i){n[++e]=[i,t]})),n}function Li(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}Ti[wi]=Ti["[object Array]"]=Ti["[object ArrayBuffer]"]=Ti["[object DataView]"]=Ti["[object Boolean]"]=Ti["[object Date]"]=Ti["[object Float32Array]"]=Ti["[object Float64Array]"]=Ti["[object Int8Array]"]=Ti["[object Int16Array]"]=Ti["[object Int32Array]"]=Ti["[object Map]"]=Ti["[object Number]"]=Ti[Ei]=Ti["[object RegExp]"]=Ti["[object Set]"]=Ti["[object String]"]=Ti["[object Symbol]"]=Ti["[object Uint8Array]"]=Ti["[object Uint8ClampedArray]"]=Ti["[object Uint16Array]"]=Ti["[object Uint32Array]"]=!0,Ti["[object Error]"]=Ti[xi]=Ti["[object WeakMap]"]=!1,Mi.prototype.add=Mi.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Mi.prototype.has=function(t){return this.__data__.has(t)};var Ri=Mt?Mt.prototype:void 0,Ii=Ri?Ri.valueOf:void 0,Pi=Object.prototype.hasOwnProperty,Ni="[object Arguments]",Ui="[object Array]",Bi="[object Object]",Hi=Object.prototype.hasOwnProperty;function $i(t,e,n,i,r){return t===e||(null==t||null==e||!Pt(t)&&!Pt(e)?t!=t&&e!=e:function(t,e,n,i,r,o){var s=Bt(t),a=Bt(e),l=s?Ui:li(t),c=a?Ui:li(e),u=(l=l==Ni?Bi:l)==Bi,h=(c=c==Ni?Bi:c)==Bi,d=l==c;if(d&&Pe(t)){if(!Pe(e))return!1;s=!0,u=!1}if(d&&!u)return o||(o=new Pn),s||je(t)?ki(t,e,n,i,r,o):function(t,e,n,i,r,o,s){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!o(new ui(t),new ui(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return ge(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var a=Di;case"[object Set]":var l=1&i;if(a||(a=Li),t.size!=e.size&&!l)return!1;var c=s.get(t);if(c)return c==e;i|=2,s.set(t,e);var u=ki(a(t),a(e),i,r,o,s);return s.delete(t),u;case"[object Symbol]":if(Ii)return Ii.call(t)==Ii.call(e)}return!1}(t,e,l,n,i,r,o);if(!(1&n)){var f=u&&Hi.call(t,"__wrapped__"),p=h&&Hi.call(e,"__wrapped__");if(f||p){var m=f?t.value():t,g=p?e.value():e;return o||(o=new Pn),r(m,g,n,i,o)}}return!!d&&(o||(o=new Pn),function(t,e,n,i,r,o){var s=1&n,a=Yn(t),l=a.length;if(l!=Yn(e).length&&!s)return!1;for(var c=l;c--;){var u=a[c];if(!(s?u in e:Pi.call(e,u)))return!1}var h=o.get(t),d=o.get(e);if(h&&d)return h==e&&d==t;var f=!0;o.set(t,e),o.set(e,t);for(var p=s;++c<l;){var m=t[u=a[c]],g=e[u];if(i)var v=s?i(g,m,u,e,t,o):i(m,g,u,t,e,o);if(!(void 0===v?m===g||r(m,g,n,i,o):v)){f=!1;break}p||(p="constructor"==u)}if(f&&!p){var y=t.constructor,_=e.constructor;y!=_&&"constructor"in t&&"constructor"in e&&!("function"==typeof y&&y instanceof y&&"function"==typeof _&&_ instanceof _)&&(f=!1)}return o.delete(t),o.delete(e),f}(t,e,n,i,r,o))}(t,e,n,i,$i,r))}function Fi(t){return t==t&&!zt(t)}function zi(t,e){return function(n){return null!=n&&n[t]===e&&(void 0!==e||t in Object(n))}}function ji(t,e){return null!=t&&e in Object(t)}function Vi(t){return"function"==typeof t?t:null==t?jt:"object"==typeof t?Bt(t)?function(t,e){return en(t)&&Fi(e)?zi(wn(t),e):function(n){var i=En(n,t);return void 0===i&&i===e?function(t,e){return null!=t&&function(t,e,n){for(var i=-1,r=(e=bn(e,t)).length,o=!1;++i<r;){var s=wn(e[i]);if(!(o=null!=t&&n(t,s)))break;t=t[s]}return o||++i!=r?o:!!(r=null==t?0:t.length)&&Ee(r)&&pe(s,r)&&(Bt(t)||De(t))}(t,e,ji)}(n,t):$i(e,i,3)}}(t[0],t[1]):function(t){var e=function(t){for(var e=Xe(t),n=e.length;n--;){var i=e[n],r=t[i];e[n]=[i,r,Fi(r)]}return e}(t);return 1==e.length&&e[0][2]?zi(e[0][0],e[0][1]):function(n){return n===t||function(t,e,n){var i=n.length,r=i;if(null==t)return!r;for(t=Object(t);i--;){var o=n[i];if(o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++i<r;){var s=(o=n[i])[0],a=t[s],l=o[1];if(o[2]){if(void 0===a&&!(s in t))return!1}else if(!$i(l,a,3,void 0,new Pn))return!1}return!0}(n,0,e)}}(t):function(t){return en(t)?function(t){return function(e){return null==e?void 0:e[t]}}(wn(t)):function(t){return function(e){return xn(e,t)}}(t)}(t)}var Gi=function(t,e,n){for(var i=-1,r=Object(t),o=n(t),s=o.length;s--;){var a=o[++i];if(!1===e(r[a],a,r))break}return t};function Wi(t,e,n){(void 0!==n&&!ge(t[e],n)||void 0===n&&!(e in t))&&me(t,e,n)}function Yi(t){return Pt(t)&&Te(t)}function Zi(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}function qi(t,e,n,i,r){t!==e&&Gi(e,(function(o,s){if(r||(r=new Pn),zt(o))!function(t,e,n,i,r,o,s){var a=Zi(t,n),l=Zi(e,n),c=s.get(l);if(c)Wi(t,n,c);else{var u=o?o(a,l,n+"",t,e,s):void 0,h=void 0===u;if(h){var d=Bt(l),f=!d&&Pe(l),p=!d&&!f&&je(l);u=l,d||f||p?Bt(a)?u=a:Yi(a)?u=oe(a):f?(h=!1,u=$n(l,!0)):p?(h=!1,u=mi(l,!0)):u=[]:In(l)||De(l)?(u=a,De(a)?u=function(t){return _e(t,Qe(t))}(a):(!zt(a)||Vt(a))&&(u=gi(l))):h=!1}h&&(s.set(l,u),r(u,l,i,o,s),s.delete(l)),Wi(t,n,u)}}(t,e,s,n,qi,i,r);else{var a=i?i(Zi(t,s),o,s+"",t,e,r):void 0;void 0===a&&(a=o),Wi(t,s,a)}}),Qe)}function Xi(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}var Ki=Object.prototype.hasOwnProperty;var Qi=function(t){return xe((function(e,n){var i=-1,r=n.length,o=r>1?n[r-1]:void 0,s=r>2?n[2]:void 0;for(o=t.length>3&&"function"==typeof o?(r--,o):void 0,s&&function(t,e,n){if(!zt(n))return!1;var i=typeof e;return!!("number"==i?Te(n)&&pe(e,n.length):"string"==i&&e in n)&&ge(n[e],t)}(n[0],n[1],s)&&(o=r<3?void 0:o,r=1),e=Object(e);++i<r;){var a=n[i];a&&t(e,a,i)}return e}))}((function(t,e,n){qi(t,e,n)})),Ji=Kn&&1/Li(new Kn([,-0]))[1]==1/0?function(t){return new Kn(t)}:function(){};function tr(t,e,n){var i=-1,r=de,o=t.length,s=!0,a=[],l=a;if(o>=200){var c=e?null:Ji(t);if(c)return Li(c);s=!1,r=Ci,l=new Mi}else l=e?[]:a;t:for(;++i<o;){var u=t[i],h=e?e(u):u;if(u=0!==u?u:0,s&&h==h){for(var d=l.length;d--;)if(l[d]===h)continue t;e&&l.push(h),a.push(u)}else r(l,h,n)||(l!==a&&l.push(h),a.push(u))}return a}var er=xe((function(t){var e=Xi(t);return Yi(e)&&(e=void 0),tr(Mn(t,1,Yi,!0),Vi(e))}));function nr(t){return t&&t.length?tr(t):[]}function ir(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function rr(t,e){return null==t||null==e?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function or(t){let e,n,i;function r(t,i,r=0,o=t.length){if(r<o){if(0!==e(i,i))return o;do{const e=r+o>>>1;n(t[e],i)<0?r=e+1:o=e}while(r<o)}return r}return 2!==t.length?(e=ir,n=(e,n)=>ir(t(e),n),i=(e,n)=>t(e)-n):(e=t===ir||t===rr?t:sr,n=t,i=t),{left:r,center:function(t,e,n=0,o=t.length){const s=r(t,e,n,o-1);return s>n&&i(t[s-1],e)>-i(t[s],e)?s-1:s},right:function(t,i,r=0,o=t.length){if(r<o){if(0!==e(i,i))return o;do{const e=r+o>>>1;n(t[e],i)<=0?r=e+1:o=e}while(r<o)}return r}}}function sr(){return 0}const ar=or(ir).right;function lr(t,e){let n,i;if(void 0===e)for(const e of t)null!=e&&(void 0===n?e>=e&&(n=i=e):(n>e&&(n=e),i<e&&(i=e)));else{let r=-1;for(let o of t)null!=(o=e(o,++r,t))&&(void 0===n?o>=o&&(n=i=o):(n>o&&(n=o),i<o&&(i=o)))}return[n,i]}or((function(t){return null===t?NaN:+t})).center;let cr=class extends Map{constructor(t,e=hr){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(ur(this,t))}has(t){return super.has(ur(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},n){const i=e(n);return t.has(i)?t.get(i):(t.set(i,n),n)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},n){const i=e(n);return t.has(i)&&(n=t.get(i),t.delete(i)),n}(this,t))}};function ur({_intern:t,_key:e},n){const i=e(n);return t.has(i)?t.get(i):n}function hr(t){return null!==t&&"object"==typeof t?t.valueOf():t}const dr=Math.sqrt(50),fr=Math.sqrt(10),pr=Math.sqrt(2);function mr(t,e,n){const i=(e-t)/Math.max(0,n),r=Math.floor(Math.log10(i)),o=i/Math.pow(10,r),s=o>=dr?10:o>=fr?5:o>=pr?2:1;let a,l,c;return r<0?(c=Math.pow(10,-r)/s,a=Math.round(t*c),l=Math.round(e*c),a/c<t&&++a,l/c>e&&--l,c=-c):(c=Math.pow(10,r)*s,a=Math.round(t/c),l=Math.round(e/c),a*c<t&&++a,l*c>e&&--l),l<a&&.5<=n&&n<2?mr(t,e,2*n):[a,l,c]}function gr(t,e,n){if(!((n=+n)>0))return[];if((t=+t)===(e=+e))return[t];const i=e<t,[r,o,s]=i?mr(e,t,n):mr(t,e,n);if(!(o>=r))return[];const a=o-r+1,l=new Array(a);if(i)if(s<0)for(let t=0;t<a;++t)l[t]=(o-t)/-s;else for(let t=0;t<a;++t)l[t]=(o-t)*s;else if(s<0)for(let t=0;t<a;++t)l[t]=(r+t)/-s;else for(let t=0;t<a;++t)l[t]=(r+t)*s;return l}function vr(t,e,n){return mr(t=+t,e=+e,n=+n)[2]}function yr(t,e,n){n=+n;const i=(e=+e)<(t=+t),r=i?vr(e,t,n):vr(t,e,n);return(i?-1:1)*(r<0?1/-r:r)}function _r(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n<e||void 0===n&&e>=e)&&(n=e);else{let i=-1;for(let r of t)null!=(r=e(r,++i,t))&&(n<r||void 0===n&&r>=r)&&(n=r)}return n}var br={value:()=>{}};function wr(){for(var t,e=0,n=arguments.length,i={};e<n;++e){if(!(t=arguments[e]+"")||t in i||/[\s.]/.test(t))throw new Error("illegal type: "+t);i[t]=[]}return new xr(i)}function xr(t){this._=t}function Er(t,e){for(var n,i=0,r=t.length;i<r;++i)if((n=t[i]).name===e)return n.value}function Tr(t,e,n){for(var i=0,r=t.length;i<r;++i)if(t[i].name===e){t[i]=br,t=t.slice(0,i).concat(t.slice(i+1));break}return null!=n&&t.push({name:e,value:n}),t}xr.prototype=wr.prototype={constructor:xr,on:function(t,e){var n,i=this._,r=function(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",i=t.indexOf(".");if(i>=0&&(n=t.slice(i+1),t=t.slice(0,i)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}(t+"",i),o=-1,s=r.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o<s;)if(n=(t=r[o]).type)i[n]=Tr(i[n],t.name,e);else if(null==e)for(n in i)i[n]=Tr(i[n],t.name,null);return this}for(;++o<s;)if((n=(t=r[o]).type)&&(n=Er(i[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new xr(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,i,r=new Array(n),o=0;o<n;++o)r[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,n=(i=this._[t]).length;o<n;++o)i[o].value.apply(e,r)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],r=0,o=i.length;r<o;++r)i[r].value.apply(e,n)}};var Sr="http://www.w3.org/1999/xhtml";const Or={svg:"http://www.w3.org/2000/svg",xhtml:Sr,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Mr(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),Or.hasOwnProperty(e)?{space:Or[e],local:t}:t}function Ar(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Sr&&e.documentElement.namespaceURI===Sr?e.createElement(t):e.createElementNS(n,t)}}function Cr(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function kr(t){var e=Mr(t);return(e.local?Cr:Ar)(e)}function Dr(){}function Lr(t){return null==t?Dr:function(){return this.querySelector(t)}}function Rr(){return[]}function Ir(t){return null==t?Rr:function(){return this.querySelectorAll(t)}}function Pr(t){return function(){return this.matches(t)}}function Nr(t){return function(e){return e.matches(t)}}var Ur=Array.prototype.find;function Br(){return this.firstElementChild}var Hr=Array.prototype.filter;function $r(){return Array.from(this.children)}function Fr(t){return new Array(t.length)}function zr(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function jr(t,e,n,i,r,o){for(var s,a=0,l=e.length,c=o.length;a<c;++a)(s=e[a])?(s.__data__=o[a],i[a]=s):n[a]=new zr(t,o[a]);for(;a<l;++a)(s=e[a])&&(r[a]=s)}function Vr(t,e,n,i,r,o,s){var a,l,c,u=new Map,h=e.length,d=o.length,f=new Array(h);for(a=0;a<h;++a)(l=e[a])&&(f[a]=c=s.call(l,l.__data__,a,e)+"",u.has(c)?r[a]=l:u.set(c,l));for(a=0;a<d;++a)c=s.call(t,o[a],a,o)+"",(l=u.get(c))?(i[a]=l,l.__data__=o[a],u.delete(c)):n[a]=new zr(t,o[a]);for(a=0;a<h;++a)(l=e[a])&&u.get(f[a])===l&&(r[a]=l)}function Gr(t){return t.__data__}function Wr(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function Yr(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Zr(t){return function(){this.removeAttribute(t)}}function qr(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Xr(t,e){return function(){this.setAttribute(t,e)}}function Kr(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Qr(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Jr(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function to(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function eo(t){return function(){this.style.removeProperty(t)}}function no(t,e,n){return function(){this.style.setProperty(t,e,n)}}function io(t,e,n){return function(){var i=e.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,n)}}function ro(t,e){return t.style.getPropertyValue(e)||to(t).getComputedStyle(t,null).getPropertyValue(e)}function oo(t){return function(){delete this[t]}}function so(t,e){return function(){this[t]=e}}function ao(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function lo(t){return t.trim().split(/^|\s+/)}function co(t){return t.classList||new uo(t)}function uo(t){this._node=t,this._names=lo(t.getAttribute("class")||"")}function ho(t,e){for(var n=co(t),i=-1,r=e.length;++i<r;)n.add(e[i])}function fo(t,e){for(var n=co(t),i=-1,r=e.length;++i<r;)n.remove(e[i])}function po(t){return function(){ho(this,t)}}function mo(t){return function(){fo(this,t)}}function go(t,e){return function(){(e.apply(this,arguments)?ho:fo)(this,t)}}function vo(){this.textContent=""}function yo(t){return function(){this.textContent=t}}function _o(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function bo(){this.innerHTML=""}function wo(t){return function(){this.innerHTML=t}}function xo(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function Eo(){this.nextSibling&&this.parentNode.appendChild(this)}function To(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function So(){return null}function Oo(){var t=this.parentNode;t&&t.removeChild(this)}function Mo(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Ao(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Co(t){return function(){var e=this.__on;if(e){for(var n,i=0,r=-1,o=e.length;i<o;++i)n=e[i],t.type&&n.type!==t.type||n.name!==t.name?e[++r]=n:this.removeEventListener(n.type,n.listener,n.options);++r?e.length=r:delete this.__on}}}function ko(t,e,n){return function(){var i,r=this.__on,o=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(r)for(var s=0,a=r.length;s<a;++s)if((i=r[s]).type===t.type&&i.name===t.name)return this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),void(i.value=e);this.addEventListener(t.type,o,n),i={type:t.type,name:t.name,value:e,listener:o,options:n},r?r.push(i):this.__on=[i]}}function Do(t,e,n){var i=to(t),r=i.CustomEvent;"function"==typeof r?r=new r(e,n):(r=i.document.createEvent("Event"),n?(r.initEvent(e,n.bubbles,n.cancelable),r.detail=n.detail):r.initEvent(e,!1,!1)),t.dispatchEvent(r)}function Lo(t,e){return function(){return Do(this,t,e)}}function Ro(t,e){return function(){return Do(this,t,e.apply(this,arguments))}}zr.prototype={constructor:zr,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}},uo.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Io=[null];function Po(t,e){this._groups=t,this._parents=e}function No(){return new Po([[document.documentElement]],Io)}function Uo(t,e){if(t=function(t){let e;for(;e=t.sourceEvent;)t=e;return t}(t),void 0===e&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var i=n.createSVGPoint();return i.x=t.clientX,i.y=t.clientY,[(i=i.matrixTransform(e.getScreenCTM().inverse())).x,i.y]}if(e.getBoundingClientRect){var r=e.getBoundingClientRect();return[t.clientX-r.left-e.clientLeft,t.clientY-r.top-e.clientTop]}}return[t.pageX,t.pageY]}function Bo(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Ho(t,e){var n=Object.create(t.prototype);for(var i in e)n[i]=e[i];return n}function $o(){}Po.prototype=No.prototype={constructor:Po,select:function(t){"function"!=typeof t&&(t=Lr(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var o,s,a=e[r],l=a.length,c=i[r]=new Array(l),u=0;u<l;++u)(o=a[u])&&(s=t.call(o,o.__data__,u,a))&&("__data__"in o&&(s.__data__=o.__data__),c[u]=s);return new Po(i,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return function(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}(t.apply(this,arguments))}}(t):Ir(t);for(var e=this._groups,n=e.length,i=[],r=[],o=0;o<n;++o)for(var s,a=e[o],l=a.length,c=0;c<l;++c)(s=a[c])&&(i.push(t.call(s,s.__data__,c,a)),r.push(s));return new Po(i,r)},selectChild:function(t){return this.select(null==t?Br:function(t){return function(){return Ur.call(this.children,t)}}("function"==typeof t?t:Nr(t)))},selectChildren:function(t){return this.selectAll(null==t?$r:function(t){return function(){return Hr.call(this.children,t)}}("function"==typeof t?t:Nr(t)))},filter:function(t){"function"!=typeof t&&(t=Pr(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var o,s=e[r],a=s.length,l=i[r]=[],c=0;c<a;++c)(o=s[c])&&t.call(o,o.__data__,c,s)&&l.push(o);return new Po(i,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,Gr);var n=e?Vr:jr,i=this._parents,r=this._groups;"function"!=typeof t&&(t=function(t){return function(){return t}}(t));for(var o=r.length,s=new Array(o),a=new Array(o),l=new Array(o),c=0;c<o;++c){var u=i[c],h=r[c],d=h.length,f=Wr(t.call(u,u&&u.__data__,c,i)),p=f.length,m=a[c]=new Array(p),g=s[c]=new Array(p);n(u,h,m,g,l[c]=new Array(d),f,e);for(var v,y,_=0,b=0;_<p;++_)if(v=m[_]){for(_>=b&&(b=_+1);!(y=g[b])&&++b<p;);v._next=y||null}}return(s=new Po(s,i))._enter=a,s._exit=l,s},enter:function(){return new Po(this._enter||this._groups.map(Fr),this._parents)},exit:function(){return new Po(this._exit||this._groups.map(Fr),this._parents)},join:function(t,e,n){var i=this.enter(),r=this,o=this.exit();return"function"==typeof t?(i=t(i))&&(i=i.selection()):i=i.append(t+""),null!=e&&(r=e(r))&&(r=r.selection()),null==n?o.remove():n(o),i&&r?i.merge(r).order():r},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,i=e._groups,r=n.length,o=i.length,s=Math.min(r,o),a=new Array(r),l=0;l<s;++l)for(var c,u=n[l],h=i[l],d=u.length,f=a[l]=new Array(d),p=0;p<d;++p)(c=u[p]||h[p])&&(f[p]=c);for(;l<r;++l)a[l]=n[l];return new Po(a,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var i,r=t[e],o=r.length-1,s=r[o];--o>=0;)(i=r[o])&&(s&&4^i.compareDocumentPosition(s)&&s.parentNode.insertBefore(i,s),s=i);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=Yr);for(var n=this._groups,i=n.length,r=new Array(i),o=0;o<i;++o){for(var s,a=n[o],l=a.length,c=r[o]=new Array(l),u=0;u<l;++u)(s=a[u])&&(c[u]=s);c.sort(e)}return new Po(r,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i=t[e],r=0,o=i.length;r<o;++r){var s=i[r];if(s)return s}return null},size:function(){let t=0;for(const e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,i=e.length;n<i;++n)for(var r,o=e[n],s=0,a=o.length;s<a;++s)(r=o[s])&&t.call(r,r.__data__,s,o);return this},attr:function(t,e){var n=Mr(t);if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((null==e?n.local?qr:Zr:"function"==typeof e?n.local?Jr:Qr:n.local?Kr:Xr)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?eo:"function"==typeof e?io:no)(t,e,n??"")):ro(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?oo:"function"==typeof e?ao:so)(t,e)):this.node()[t]},classed:function(t,e){var n=lo(t+"");if(arguments.length<2){for(var i=co(this.node()),r=-1,o=n.length;++r<o;)if(!i.contains(n[r]))return!1;return!0}return this.each(("function"==typeof e?go:e?po:mo)(n,e))},text:function(t){return arguments.length?this.each(null==t?vo:("function"==typeof t?_o:yo)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?bo:("function"==typeof t?xo:wo)(t)):this.node().innerHTML},raise:function(){return this.each(Eo)},lower:function(){return this.each(To)},append:function(t){var e="function"==typeof t?t:kr(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:kr(t),i=null==e?So:"function"==typeof e?e:Lr(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)}))},remove:function(){return this.each(Oo)},clone:function(t){return this.select(t?Ao:Mo)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var i,r,o=function(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}(t+""),s=o.length;if(!(arguments.length<2)){for(a=e?ko:Co,i=0;i<s;++i)this.each(a(o[i],e,n));return this}var a=this.node().__on;if(a)for(var l,c=0,u=a.length;c<u;++c)for(i=0,l=a[c];i<s;++i)if((r=o[i]).type===l.type&&r.name===l.name)return l.value},dispatch:function(t,e){return this.each(("function"==typeof e?Ro:Lo)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i,r=t[e],o=0,s=r.length;o<s;++o)(i=r[o])&&(yield i)}};var Fo=.7,zo=1/Fo,jo="\\s*([+-]?\\d+)\\s*",Vo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Go="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Wo=/^#([0-9a-f]{3,8})$/,Yo=new RegExp(`^rgb\\(${jo},${jo},${jo}\\)$`),Zo=new RegExp(`^rgb\\(${Go},${Go},${Go}\\)$`),qo=new RegExp(`^rgba\\(${jo},${jo},${jo},${Vo}\\)$`),Xo=new RegExp(`^rgba\\(${Go},${Go},${Go},${Vo}\\)$`),Ko=new RegExp(`^hsl\\(${Vo},${Go},${Go}\\)$`),Qo=new RegExp(`^hsla\\(${Vo},${Go},${Go},${Vo}\\)$`),Jo={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function ts(){return this.rgb().formatHex()}function es(){return this.rgb().formatRgb()}function ns(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Wo.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?is(e):3===n?new ss(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?rs(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?rs(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Yo.exec(t))?new ss(e[1],e[2],e[3],1):(e=Zo.exec(t))?new ss(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=qo.exec(t))?rs(e[1],e[2],e[3],e[4]):(e=Xo.exec(t))?rs(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Ko.exec(t))?ds(e[1],e[2]/100,e[3]/100,1):(e=Qo.exec(t))?ds(e[1],e[2]/100,e[3]/100,e[4]):Jo.hasOwnProperty(t)?is(Jo[t]):"transparent"===t?new ss(NaN,NaN,NaN,0):null}function is(t){return new ss(t>>16&255,t>>8&255,255&t,1)}function rs(t,e,n,i){return i<=0&&(t=e=n=NaN),new ss(t,e,n,i)}function os(t,e,n,i){return 1===arguments.length?function(t){return t instanceof $o||(t=ns(t)),t?new ss((t=t.rgb()).r,t.g,t.b,t.opacity):new ss}(t):new ss(t,e,n,i??1)}function ss(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}function as(){return`#${hs(this.r)}${hs(this.g)}${hs(this.b)}`}function ls(){const t=cs(this.opacity);return`${1===t?"rgb(":"rgba("}${us(this.r)}, ${us(this.g)}, ${us(this.b)}${1===t?")":`, ${t})`}`}function cs(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function us(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function hs(t){return((t=us(t))<16?"0":"")+t.toString(16)}function ds(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new ps(t,e,n,i)}function fs(t){if(t instanceof ps)return new ps(t.h,t.s,t.l,t.opacity);if(t instanceof $o||(t=ns(t)),!t)return new ps;if(t instanceof ps)return t;var e=(t=t.rgb()).r/255,n=t.g/255,i=t.b/255,r=Math.min(e,n,i),o=Math.max(e,n,i),s=NaN,a=o-r,l=(o+r)/2;return a?(s=e===o?(n-i)/a+6*(n<i):n===o?(i-e)/a+2:(e-n)/a+4,a/=l<.5?o+r:2-o-r,s*=60):a=l>0&&l<1?0:s,new ps(s,a,l,t.opacity)}function ps(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}function ms(t){return(t=(t||0)%360)<0?t+360:t}function gs(t){return Math.max(0,Math.min(1,t||0))}function vs(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}Bo($o,ns,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:ts,formatHex:ts,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return fs(this).formatHsl()},formatRgb:es,toString:es}),Bo(ss,os,Ho($o,{brighter(t){return t=null==t?zo:Math.pow(zo,t),new ss(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?Fo:Math.pow(Fo,t),new ss(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new ss(us(this.r),us(this.g),us(this.b),cs(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:as,formatHex:as,formatHex8:function(){return`#${hs(this.r)}${hs(this.g)}${hs(this.b)}${hs(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:ls,toString:ls})),Bo(ps,(function(t,e,n,i){return 1===arguments.length?fs(t):new ps(t,e,n,i??1)}),Ho($o,{brighter(t){return t=null==t?zo:Math.pow(zo,t),new ps(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?Fo:Math.pow(Fo,t),new ps(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,r=2*n-i;return new ss(vs(t>=240?t-240:t+120,r,i),vs(t,r,i),vs(t<120?t+240:t-120,r,i),this.opacity)},clamp(){return new ps(ms(this.h),gs(this.s),gs(this.l),cs(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=cs(this.opacity);return`${1===t?"hsl(":"hsla("}${ms(this.h)}, ${100*gs(this.s)}%, ${100*gs(this.l)}%${1===t?")":`, ${t})`}`}}));const ys=t=>()=>t;function _s(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):ys(isNaN(t)?e:t)}const bs=function t(e){var n=function(t){return 1==(t=+t)?_s:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}(e,n,t):ys(isNaN(e)?n:e)}}(e);function i(t,e){var i=n((t=os(t)).r,(e=os(e)).r),r=n(t.g,e.g),o=n(t.b,e.b),s=_s(t.opacity,e.opacity);return function(e){return t.r=i(e),t.g=r(e),t.b=o(e),t.opacity=s(e),t+""}}return i.gamma=t,i}(1);function ws(t,e){e||(e=[]);var n,i=t?Math.min(e.length,t.length):0,r=e.slice();return function(o){for(n=0;n<i;++n)r[n]=t[n]*(1-o)+e[n]*o;return r}}function xs(t,e){var n,i=e?e.length:0,r=t?Math.min(i,t.length):0,o=new Array(r),s=new Array(i);for(n=0;n<r;++n)o[n]=Cs(t[n],e[n]);for(;n<i;++n)s[n]=e[n];return function(t){for(n=0;n<r;++n)s[n]=o[n](t);return s}}function Es(t,e){var n=new Date;return t=+t,e=+e,function(i){return n.setTime(t*(1-i)+e*i),n}}function Ts(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Ss(t,e){var n,i={},r={};for(n in(null===t||"object"!=typeof t)&&(t={}),(null===e||"object"!=typeof e)&&(e={}),e)n in t?i[n]=Cs(t[n],e[n]):r[n]=e[n];return function(t){for(n in i)r[n]=i[n](t);return r}}var Os=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ms=new RegExp(Os.source,"g");function As(t,e){var n,i,r,o=Os.lastIndex=Ms.lastIndex=0,s=-1,a=[],l=[];for(t+="",e+="";(n=Os.exec(t))&&(i=Ms.exec(e));)(r=i.index)>o&&(r=e.slice(o,r),a[s]?a[s]+=r:a[++s]=r),(n=n[0])===(i=i[0])?a[s]?a[s]+=i:a[++s]=i:(a[++s]=null,l.push({i:s,x:Ts(n,i)})),o=Ms.lastIndex;return o<e.length&&(r=e.slice(o),a[s]?a[s]+=r:a[++s]=r),a.length<2?l[0]?function(t){return function(e){return t(e)+""}}(l[0].x):function(t){return function(){return t}}(e):(e=l.length,function(t){for(var n,i=0;i<e;++i)a[(n=l[i]).i]=n.x(t);return a.join("")})}function Cs(t,e){var n,i=typeof e;return null==e||"boolean"===i?ys(e):("number"===i?Ts:"string"===i?(n=ns(e))?(e=n,bs):As:e instanceof ns?bs:e instanceof Date?Es:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(e)?ws:Array.isArray(e)?xs:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?Ss:Ts)(t,e)}function ks(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var Ds,Ls=180/Math.PI,Rs={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Is(t,e,n,i,r,o){var s,a,l;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(l=t*n+e*i)&&(n-=t*l,i-=e*l),(a=Math.sqrt(n*n+i*i))&&(n/=a,i/=a,l/=a),t*i<e*n&&(t=-t,e=-e,l=-l,s=-s),{translateX:r,translateY:o,rotate:Math.atan2(e,t)*Ls,skewX:Math.atan(l)*Ls,scaleX:s,scaleY:a}}function Ps(t,e,n,i){function r(t){return t.length?t.pop()+" ":""}return function(o,s){var a=[],l=[];return o=t(o),s=t(s),function(t,i,r,o,s,a){if(t!==r||i!==o){var l=s.push("translate(",null,e,null,n);a.push({i:l-4,x:Ts(t,r)},{i:l-2,x:Ts(i,o)})}else(r||o)&&s.push("translate("+r+e+o+n)}(o.translateX,o.translateY,s.translateX,s.translateY,a,l),function(t,e,n,o){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(r(n)+"rotate(",null,i)-2,x:Ts(t,e)})):e&&n.push(r(n)+"rotate("+e+i)}(o.rotate,s.rotate,a,l),function(t,e,n,o){t!==e?o.push({i:n.push(r(n)+"skewX(",null,i)-2,x:Ts(t,e)}):e&&n.push(r(n)+"skewX("+e+i)}(o.skewX,s.skewX,a,l),function(t,e,n,i,o,s){if(t!==n||e!==i){var a=o.push(r(o)+"scale(",null,",",null,")");s.push({i:a-4,x:Ts(t,n)},{i:a-2,x:Ts(e,i)})}else(1!==n||1!==i)&&o.push(r(o)+"scale("+n+","+i+")")}(o.scaleX,o.scaleY,s.scaleX,s.scaleY,a,l),o=s=null,function(t){for(var e,n=-1,i=l.length;++n<i;)a[(e=l[n]).i]=e.x(t);return a.join("")}}}var Ns,Us,Bs=Ps((function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Rs:Is(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),Hs=Ps((function(t){return null!=t&&(Ds||(Ds=document.createElementNS("http://www.w3.org/2000/svg","g")),Ds.setAttribute("transform",t),t=Ds.transform.baseVal.consolidate())?Is((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):Rs}),", ",")",")"),$s=0,Fs=0,zs=0,js=0,Vs=0,Gs=0,Ws="object"==typeof performance&&performance.now?performance:Date,Ys="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Zs(){return Vs||(Ys(qs),Vs=Ws.now()+Gs)}function qs(){Vs=0}function Xs(){this._call=this._time=this._next=null}function Ks(t,e,n){var i=new Xs;return i.restart(t,e,n),i}function Qs(){Vs=(js=Ws.now())+Gs,$s=Fs=0;try{!function(){Zs(),++$s;for(var t,e=Ns;e;)(t=Vs-e._time)>=0&&e._call.call(void 0,t),e=e._next;--$s}()}finally{$s=0,function(){for(var t,e,n=Ns,i=1/0;n;)n._call?(i>n._time&&(i=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Ns=e);Us=t,ta(i)}(),Vs=0}}function Js(){var t=Ws.now(),e=t-js;e>1e3&&(Gs-=e,js=t)}function ta(t){$s||(Fs&&(Fs=clearTimeout(Fs)),t-Vs>24?(t<1/0&&(Fs=setTimeout(Qs,t-Ws.now()-Gs)),zs&&(zs=clearInterval(zs))):(zs||(js=Ws.now(),zs=setInterval(Js,1e3)),$s=1,Ys(Qs)))}function ea(t,e,n){var i=new Xs;return e=null==e?0:+e,i.restart((n=>{i.stop(),t(n+e)}),e,n),i}Xs.prototype=Ks.prototype={constructor:Xs,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Zs():+n)+(null==e?0:+e),!this._next&&Us!==this&&(Us?Us._next=this:Ns=this,Us=this),this._call=t,this._time=n,ta()},stop:function(){this._call&&(this._call=null,this._time=1/0,ta())}};var na=wr("start","end","cancel","interrupt"),ia=[];function ra(t,e,n,i,r,o){var s=t.__transition;if(s){if(n in s)return}else t.__transition={};!function(t,e,n){var i,r=t.__transition;function o(l){var c,u,h,d;if(1!==n.state)return a();for(c in r)if((d=r[c]).name===n.name){if(3===d.state)return ea(o);4===d.state?(d.state=6,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete r[c]):+c<e&&(d.state=6,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete r[c])}if(ea((function(){3===n.state&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(l))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,i=new Array(h=n.tween.length),c=0,u=-1;c<h;++c)(d=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(i[++u]=d);i.length=u+1}}function s(e){for(var r=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(a),n.state=5,1),o=-1,s=i.length;++o<s;)i[o].call(t,r);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),a())}function a(){for(var i in n.state=6,n.timer.stop(),delete r[e],r)return;delete t.__transition}r[e]=n,n.timer=Ks((function(t){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=t&&o(t-n.delay)}),0,n.time)}(t,n,{name:e,index:i,group:r,on:na,tween:ia,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})}function oa(t,e){var n=aa(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function sa(t,e){var n=aa(t,e);if(n.state>3)throw new Error("too late; already running");return n}function aa(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function la(t,e){var n,i,r,o=t.__transition,s=!0;if(o){for(r in e=null==e?null:e+"",o)(n=o[r]).name===e?(i=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(i?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete o[r]):s=!1;s&&delete t.__transition}}function ca(t,e){var n,i;return function(){var r=sa(this,t),o=r.tween;if(o!==n)for(var s=0,a=(i=n=o).length;s<a;++s)if(i[s].name===e){(i=i.slice()).splice(s,1);break}r.tween=i}}function ua(t,e,n){var i,r;if("function"!=typeof n)throw new Error;return function(){var o=sa(this,t),s=o.tween;if(s!==i){r=(i=s).slice();for(var a={name:e,value:n},l=0,c=r.length;l<c;++l)if(r[l].name===e){r[l]=a;break}l===c&&r.push(a)}o.tween=r}}function ha(t,e,n){var i=t._id;return t.each((function(){var t=sa(this,i);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return aa(t,i).value[e]}}function da(t,e){var n;return("number"==typeof e?Ts:e instanceof ns?bs:(n=ns(e))?(e=n,bs):As)(t,e)}function fa(t){return function(){this.removeAttribute(t)}}function pa(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ma(t,e,n){var i,r,o=n+"";return function(){var s=this.getAttribute(t);return s===o?null:s===i?r:r=e(i=s,n)}}function ga(t,e,n){var i,r,o=n+"";return function(){var s=this.getAttributeNS(t.space,t.local);return s===o?null:s===i?r:r=e(i=s,n)}}function va(t,e,n){var i,r,o;return function(){var s,a,l=n(this);return null==l?void this.removeAttribute(t):(s=this.getAttribute(t))===(a=l+"")?null:s===i&&a===r?o:(r=a,o=e(i=s,l))}}function ya(t,e,n){var i,r,o;return function(){var s,a,l=n(this);return null==l?void this.removeAttributeNS(t.space,t.local):(s=this.getAttributeNS(t.space,t.local))===(a=l+"")?null:s===i&&a===r?o:(r=a,o=e(i=s,l))}}function _a(t,e){var n,i;function r(){var r=e.apply(this,arguments);return r!==i&&(n=(i=r)&&function(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}(t,r)),n}return r._value=e,r}function ba(t,e){var n,i;function r(){var r=e.apply(this,arguments);return r!==i&&(n=(i=r)&&function(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}(t,r)),n}return r._value=e,r}function wa(t,e){return function(){oa(this,t).delay=+e.apply(this,arguments)}}function xa(t,e){return e=+e,function(){oa(this,t).delay=e}}function Ea(t,e){return function(){sa(this,t).duration=+e.apply(this,arguments)}}function Ta(t,e){return e=+e,function(){sa(this,t).duration=e}}var Sa=No.prototype.constructor;function Oa(t){return function(){this.style.removeProperty(t)}}var Ma=0;function Aa(t,e,n,i){this._groups=t,this._parents=e,this._name=n,this._id=i}function Ca(){return++Ma}var ka=No.prototype;function Da(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}Aa.prototype={constructor:Aa,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Lr(t));for(var i=this._groups,r=i.length,o=new Array(r),s=0;s<r;++s)for(var a,l,c=i[s],u=c.length,h=o[s]=new Array(u),d=0;d<u;++d)(a=c[d])&&(l=t.call(a,a.__data__,d,c))&&("__data__"in a&&(l.__data__=a.__data__),h[d]=l,ra(h[d],e,n,d,h,aa(a,n)));return new Aa(o,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Ir(t));for(var i=this._groups,r=i.length,o=[],s=[],a=0;a<r;++a)for(var l,c=i[a],u=c.length,h=0;h<u;++h)if(l=c[h]){for(var d,f=t.call(l,l.__data__,h,c),p=aa(l,n),m=0,g=f.length;m<g;++m)(d=f[m])&&ra(d,e,n,m,f,p);o.push(f),s.push(l)}return new Aa(o,s,e,n)},selectChild:ka.selectChild,selectChildren:ka.selectChildren,filter:function(t){"function"!=typeof t&&(t=Pr(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var o,s=e[r],a=s.length,l=i[r]=[],c=0;c<a;++c)(o=s[c])&&t.call(o,o.__data__,c,s)&&l.push(o);return new Aa(i,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,i=e.length,r=n.length,o=Math.min(i,r),s=new Array(i),a=0;a<o;++a)for(var l,c=e[a],u=n[a],h=c.length,d=s[a]=new Array(h),f=0;f<h;++f)(l=c[f]||u[f])&&(d[f]=l);for(;a<i;++a)s[a]=e[a];return new Aa(s,this._parents,this._name,this._id)},selection:function(){return new Sa(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Ca(),i=this._groups,r=i.length,o=0;o<r;++o)for(var s,a=i[o],l=a.length,c=0;c<l;++c)if(s=a[c]){var u=aa(s,e);ra(s,t,n,c,a,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Aa(i,this._parents,t,n)},call:ka.call,nodes:ka.nodes,node:ka.node,size:ka.size,empty:ka.empty,each:ka.each,on:function(t,e){var n=this._id;return arguments.length<2?aa(this.node(),n).on.on(t):this.each(function(t,e,n){var i,r,o=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?oa:sa;return function(){var s=o(this,t),a=s.on;a!==i&&(r=(i=a).copy()).on(e,n),s.on=r}}(n,t,e))},attr:function(t,e){var n=Mr(t),i="transform"===n?Hs:da;return this.attrTween(t,"function"==typeof e?(n.local?ya:va)(n,i,ha(this,"attr."+t,e)):null==e?(n.local?pa:fa)(n):(n.local?ga:ma)(n,i,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var i=Mr(t);return this.tween(n,(i.local?_a:ba)(i,e))},style:function(t,e,n){var i="transform"==(t+="")?Bs:da;return null==e?this.styleTween(t,function(t,e){var n,i,r;return function(){var o=ro(this,t),s=(this.style.removeProperty(t),ro(this,t));return o===s?null:o===n&&s===i?r:r=e(n=o,i=s)}}(t,i)).on("end.style."+t,Oa(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var i,r,o;return function(){var s=ro(this,t),a=n(this),l=a+"";return null==a&&(this.style.removeProperty(t),l=a=ro(this,t)),s===l?null:s===i&&l===r?o:(r=l,o=e(i=s,a))}}(t,i,ha(this,"style."+t,e))).each(function(t,e){var n,i,r,o,s="style."+e,a="end."+s;return function(){var l=sa(this,t),c=l.on,u=null==l.value[s]?o||(o=Oa(e)):void 0;(c!==n||r!==u)&&(i=(n=c).copy()).on(a,r=u),l.on=i}}(this._id,t)):this.styleTween(t,function(t,e,n){var i,r,o=n+"";return function(){var s=ro(this,t);return s===o?null:s===i?r:r=e(i=s,n)}}(t,i,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==e)return this.tween(i,null);if("function"!=typeof e)throw new Error;return this.tween(i,function(t,e,n){var i,r;function o(){var o=e.apply(this,arguments);return o!==r&&(i=(r=o)&&function(t,e,n){return function(i){this.style.setProperty(t,e.call(this,i),n)}}(t,o,n)),i}return o._value=e,o}(t,e,n??""))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=e??""}}(ha(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,function(t){var e,n;function i(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&function(t){return function(e){this.textContent=t.call(this,e)}}(i)),e}return i._value=t,i}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var i,r=aa(this.node(),n).tween,o=0,s=r.length;o<s;++o)if((i=r[o]).name===t)return i.value;return null}return this.each((null==e?ca:ua)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?wa:xa)(e,t)):aa(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Ea:Ta)(e,t)):aa(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(function(t,e){if("function"!=typeof e)throw new Error;return function(){sa(this,t).ease=e}}(e,t)):aa(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var n=e.apply(this,arguments);if("function"!=typeof n)throw new Error;sa(this,t).ease=n}}(this._id,t))},end:function(){var t,e,n=this,i=n._id,r=n.size();return new Promise((function(o,s){var a={value:s},l={value:function(){0===--r&&o()}};n.each((function(){var n=sa(this,i),r=n.on;r!==t&&((e=(t=r).copy())._.cancel.push(a),e._.interrupt.push(a),e._.end.push(l)),n.on=e})),0===r&&o()}))},[Symbol.iterator]:ka[Symbol.iterator]};var La={time:null,delay:0,duration:250,ease:Da};function Ra(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function Ia(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,i=t.slice(0,n);return[i.length>1?i[0]+i.slice(2):i,+t.slice(n+1)]}function Pa(t){return(t=Ia(Math.abs(t)))?t[1]:NaN}No.prototype.interrupt=function(t){return this.each((function(){la(this,t)}))},No.prototype.transition=function(t){var e,n;t instanceof Aa?(e=t._id,t=t._name):(e=Ca(),(n=La).time=Zs(),t=null==t?null:t+"");for(var i=this._groups,r=i.length,o=0;o<r;++o)for(var s,a=i[o],l=a.length,c=0;c<l;++c)(s=a[c])&&ra(s,t,e,c,a,n||Ra(s,e));return new Aa(i,this._parents,t,e)};var Na,Ua=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ba(t){if(!(e=Ua.exec(t)))throw new Error("invalid format: "+t);var e;return new Ha({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function Ha(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function $a(t,e){var n=Ia(t,e);if(!n)return t+"";var i=n[0],r=n[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")}Ba.prototype=Ha.prototype,Ha.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const Fa={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>$a(100*t,e),r:$a,s:function(t,e){var n=Ia(t,e);if(!n)return t+"";var i=n[0],r=n[1],o=r-(Na=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,s=i.length;return o===s?i:o>s?i+new Array(o-s+1).join("0"):o>0?i.slice(0,o)+"."+i.slice(o):"0."+new Array(1-o).join("0")+Ia(t,Math.max(0,e+o-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function za(t){return t}var ja,Va,Ga,Wa=Array.prototype.map,Ya=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Za(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}ja=function(t){var e=void 0===t.grouping||void 0===t.thousands?za:function(t,e){return function(n,i){for(var r=n.length,o=[],s=0,a=t[0],l=0;r>0&&a>0&&(l+a+1>i&&(a=Math.max(1,i-l)),o.push(n.substring(r-=a,r+a)),!((l+=a+1)>i));)a=t[s=(s+1)%t.length];return o.reverse().join(e)}}(Wa.call(t.grouping,Number),t.thousands+""),n=void 0===t.currency?"":t.currency[0]+"",i=void 0===t.currency?"":t.currency[1]+"",r=void 0===t.decimal?".":t.decimal+"",o=void 0===t.numerals?za:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(Wa.call(t.numerals,String)),s=void 0===t.percent?"%":t.percent+"",a=void 0===t.minus?"−":t.minus+"",l=void 0===t.nan?"NaN":t.nan+"";function c(t){var c=(t=Ba(t)).fill,u=t.align,h=t.sign,d=t.symbol,f=t.zero,p=t.width,m=t.comma,g=t.precision,v=t.trim,y=t.type;"n"===y?(m=!0,y="g"):Fa[y]||(void 0===g&&(g=12),v=!0,y="g"),(f||"0"===c&&"="===u)&&(f=!0,c="0",u="=");var _="$"===d?n:"#"===d&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",b="$"===d?i:/[%p]/.test(y)?s:"",w=Fa[y],x=/[defgprs%]/.test(y);function E(t){var n,i,s,d=_,E=b;if("c"===y)E=w(t)+E,t="";else{var T=(t=+t)<0||1/t<0;if(t=isNaN(t)?l:w(Math.abs(t),g),v&&(t=function(t){t:for(var e,n=t.length,i=1,r=-1;i<n;++i)switch(t[i]){case".":r=e=i;break;case"0":0===r&&(r=i),e=i;break;default:if(!+t[i])break t;r>0&&(r=0)}return r>0?t.slice(0,r)+t.slice(e+1):t}(t)),T&&0==+t&&"+"!==h&&(T=!1),d=(T?"("===h?h:a:"-"===h||"("===h?"":h)+d,E=("s"===y?Ya[8+Na/3]:"")+E+(T&&"("===h?")":""),x)for(n=-1,i=t.length;++n<i;)if(48>(s=t.charCodeAt(n))||s>57){E=(46===s?r+t.slice(n+1):t.slice(n))+E,t=t.slice(0,n);break}}m&&!f&&(t=e(t,1/0));var S=d.length+t.length+E.length,O=S<p?new Array(p-S+1).join(c):"";switch(m&&f&&(t=e(O+t,O.length?p-E.length:1/0),O=""),u){case"<":t=d+t+E+O;break;case"=":t=d+O+t+E;break;case"^":t=O.slice(0,S=O.length>>1)+d+t+E+O.slice(S);break;default:t=O+d+t+E}return o(t)}return g=void 0===g?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),E.toString=function(){return t+""},E}return{format:c,formatPrefix:function(t,e){var n=c(((t=Ba(t)).type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(Pa(e)/3))),r=Math.pow(10,-i),o=Ya[8+i/3];return function(t){return n(r*t)+o}}}}({thousands:",",grouping:[3],currency:["$",""]}),Va=ja.format,Ga=ja.formatPrefix;const qa=Symbol("implicit");function Xa(){var t=new cr,e=[],n=[],i=qa;function r(r){let o=t.get(r);if(void 0===o){if(i!==qa)return i;t.set(r,o=e.push(r)-1)}return n[o%n.length]}return r.domain=function(n){if(!arguments.length)return e.slice();e=[],t=new cr;for(const i of n)t.has(i)||t.set(i,e.push(i)-1);return r},r.range=function(t){return arguments.length?(n=Array.from(t),r):n.slice()},r.unknown=function(t){return arguments.length?(i=t,r):i},r.copy=function(){return Xa(e,n).unknown(i)},Za.apply(r,arguments),r}function Ka(t){return+t}var Qa=[0,1];function Ja(t){return t}function tl(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:function(t){return function(){return t}}(isNaN(e)?NaN:.5)}function el(t,e,n){var i=t[0],r=t[1],o=e[0],s=e[1];return r<i?(i=tl(r,i),o=n(s,o)):(i=tl(i,r),o=n(o,s)),function(t){return o(i(t))}}function nl(t,e,n){var i=Math.min(t.length,e.length)-1,r=new Array(i),o=new Array(i),s=-1;for(t[i]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<i;)r[s]=tl(t[s],t[s+1]),o[s]=n(e[s],e[s+1]);return function(e){var n=ar(t,e,1,i)-1;return o[n](r[n](e))}}function il(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function rl(){var t,e,n,i,r,o,s=Qa,a=Qa,l=Cs,c=Ja;function u(){var t=Math.min(s.length,a.length);return c!==Ja&&(c=function(t,e){var n;return t>e&&(n=t,t=e,e=n),function(n){return Math.max(t,Math.min(e,n))}}(s[0],s[t-1])),i=t>2?nl:el,r=o=null,h}function h(e){return null==e||isNaN(e=+e)?n:(r||(r=i(s.map(t),a,l)))(t(c(e)))}return h.invert=function(n){return c(e((o||(o=i(a,s.map(t),Ts)))(n)))},h.domain=function(t){return arguments.length?(s=Array.from(t,Ka),u()):s.slice()},h.range=function(t){return arguments.length?(a=Array.from(t),u()):a.slice()},h.rangeRound=function(t){return a=Array.from(t),l=ks,u()},h.clamp=function(t){return arguments.length?(c=!!t||Ja,u()):c!==Ja},h.interpolate=function(t){return arguments.length?(l=t,u()):l},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,i){return t=n,e=i,u()}}function ol(){return rl()(Ja,Ja)}function sl(t){var e=t.domain;return t.ticks=function(t){var n=e();return gr(n[0],n[n.length-1],t??10)},t.tickFormat=function(t,n){var i=e();return function(t,e,n,i){var r,o=yr(t,e,n);switch((i=Ba(i??",f")).type){case"s":var s=Math.max(Math.abs(t),Math.abs(e));return null==i.precision&&!isNaN(r=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Pa(e)/3)))-Pa(Math.abs(t)))}(o,s))&&(i.precision=r),Ga(i,s);case"":case"e":case"g":case"p":case"r":null==i.precision&&!isNaN(r=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Pa(e)-Pa(t))+1}(o,Math.max(Math.abs(t),Math.abs(e))))&&(i.precision=r-("e"===i.type));break;case"f":case"%":null==i.precision&&!isNaN(r=function(t){return Math.max(0,-Pa(Math.abs(t)))}(o))&&(i.precision=r-2*("%"===i.type))}return Va(i)}(i[0],i[i.length-1],t??10,n)},t.nice=function(n){null==n&&(n=10);var i,r,o=e(),s=0,a=o.length-1,l=o[s],c=o[a],u=10;for(c<l&&(r=l,l=c,c=r,r=s,s=a,a=r);u-- >0;){if((r=vr(l,c,n))===i)return o[s]=l,o[a]=c,e(o);if(r>0)l=Math.floor(l/r)*r,c=Math.ceil(c/r)*r;else{if(!(r<0))break;l=Math.ceil(l*r)/r,c=Math.floor(c*r)/r}i=r}return t},t}function al(){var t=ol();return t.copy=function(){return il(t,al())},Za.apply(t,arguments),sl(t)}function ll(t,e,n){this.k=t,this.x=e,this.y=n}ll.prototype={constructor:ll,scale:function(t){return 1===t?this:new ll(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new ll(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},ll.prototype;const cl="cds",ul=7,hl=2.5,dl=3.5,fl={reference:"value",compareTo:"marker"},pl=4,ml={duration:1e3,ease:Da,zoomLevel:3},gl={"1-color":4,"2-color":5,"3-color":5,"4-color":3,"5-color":2,"14-color":1},vl={defaultBins:10},yl={items:{status:{ACTIVE:1,DISABLED:0},horizontalSpace:12,verticalSpace:24,textYOffset:8,spaceAfter:4},checkbox:{radius:6.5},radius:{iconData:[{cx:7,cy:7,r:6.5},{cx:7,cy:10,r:3.5}],fill:null,stroke:"#8c8c8c"},line:{yPosition:6,width:24,strokeWidth:1.4,fill:null,stroke:"#999999"},area:{width:24,height:14,fill:"#6f6f6f",stroke:null},size:{iconData:[{width:23,height:12},{width:13,height:6}],fill:null,stroke:"#8D8D8D"},quartile:{iconData:[{x:0,y:0,width:24,height:13},{x:11,y:4,width:1,height:4}]},zoom:{iconData:[{x:0,y:0,width:12,height:12}],color:"#8D8D8D"},color:{barWidth:300,barHeight:8,axisYTranslation:10}},_l=.3,bl=1,wl=24,xl={defaultOffset:4,horizontalOffset:10},El={default:{duration:300},pie_slice_mouseover:{duration:100},pie_slice_mouseout:{duration:100},pie_chart_titles:{duration:375},graph_element_mouseover_fill_update:{duration:100},graph_element_mouseout_fill_update:{duration:100}},Tl={height:{[B.GRAPH_VIEW]:32,[B.SLIDER_VIEW]:10},spacerHeight:8,handleWidth:5,handleBarWidth:1,handleBarHeight:12},Sl=[{type:et.RADIUS,name:"Radius"},{type:et.AREA,name:"Poor area"},{type:et.AREA,name:"Satisfactory area"},{type:et.AREA,name:"Great area"},{type:et.QUARTILE,name:"Quartiles"}],Ol={type:H.END_LINE,threshold:16,numCharacter:14},Ml={code:typeof navigator<"u"&&(null==navigator?void 0:navigator.language)||"en-US",number:(t,e=(null==navigator?void 0:navigator.language)||"en-US")=>t.toLocaleString(e),date:(t,e=(null==navigator?void 0:navigator.language)||"en-US",n={},i=null)=>i||t.toLocaleDateString(e,n),time:(t,e=(null==navigator?void 0:navigator.language)||"en-US",n={},i=null)=>i||t.toLocaleTimeString(e,n),optionsObject:{"15seconds":{primary:{"MMM d, pp":{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit",hourCycle:"h12"},"MMM d, h:mm:ss.SSS a":{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",fractionalSecondDigits:3,hourCycle:"h12"}},secondary:{pp:{hour:"numeric",minute:"2-digit",second:"2-digit",hourCycle:"h12"},"h:mm:ss.SSS a":{hour:"numeric",minute:"2-digit",fractionalSecondDigits:3,hourCycle:"h12"}},type:"time"},minute:{primary:{"MMM d, p":{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hourCycle:"h12"}},secondary:{p:{hour:"numeric",minute:"2-digit",hourCycle:"h12"}},type:"time"},"30minutes":{primary:{"MMM d, p":{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hourCycle:"h12"}},secondary:{p:{hour:"numeric",minute:"2-digit",hourCycle:"h12"}},type:"time"},hourly:{primary:{"MMM d, hh a":{month:"short",day:"numeric",hour:"2-digit",hourCycle:"h12"}},secondary:{"hh a":{hour:"2-digit",hourCycle:"h12"}},type:"time"},daily:{primary:{"MMM d":{month:"short",day:"numeric"}},secondary:{d:{day:"numeric"}},type:"date"},weekly:{primary:{"eee, MMM d":{weekday:"short",month:"short",day:"numeric"}},secondary:{eee:{weekday:"short"}},type:"date"},monthly:{primary:{"MMM yyyy":{month:"short",year:"numeric"}},secondary:{MMM:{month:"short"}},type:"date"},quarterly:{primary:{},secondary:{},type:"date"},yearly:{primary:{yyyy:{year:"numeric"}},secondary:{yyyy:{year:"numeric"}},type:"date"}},translations:{group:"Group",total:"Total",meter:{title:""},tabularRep:{title:"Tabular representation",downloadAsCSV:"Download as CSV"},toolbar:{exportAsCSV:"Export to CSV",exportAsJPG:"Export to JPG",exportAsPNG:"Export to PNG",zoomIn:"Zoom in",zoomOut:"Zoom out",resetZoom:"Reset zoom",moreOptions:"More options",makeFullScreen:"Make fullscreen",exitFullScreen:"Exit fullscreen",showAsTable:"Show as table"}}},Al={enabled:!0,position:z.BOTTOM,clickable:!0,truncation:Ol,alignment:j.LEFT,order:null,additionalItems:[]},Cl={enabled:!0,showTotal:!0,truncation:Ol,groupLabel:"Group"},kl={top:{visible:!0,includeZero:!0,truncation:Ol},bottom:{visible:!0,includeZero:!0,truncation:Ol},left:{visible:!0,includeZero:!0,truncation:Ol},right:{visible:!0,includeZero:!0,truncation:Ol}},Dl={addSpaceOnEdges:1,showDayName:!1,localeObject:xt,timeIntervalFormats:{"15seconds":{primary:"MMM d, pp",secondary:"pp"},minute:{primary:"MMM d, p",secondary:"p"},"30minutes":{primary:"MMM d, p",secondary:"p"},hourly:{primary:"MMM d, hh a",secondary:"hh a"},daily:{primary:"MMM d",secondary:"d"},weekly:{primary:"eee, MMM d",secondary:"eee"},monthly:{primary:"MMM yyyy",secondary:"MMM"},quarterly:{primary:"QQQ ''yy",secondary:"QQQ"},yearly:{primary:"yyyy",secondary:"yyyy"}}};let Ll=!1;try{Ll=typeof document<"u"&&(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}catch(Et){console.warn("Fullscreen capabilities check failed: ",Et.message)}const Rl={width:null,height:null,resizable:!0,theme:P.WHITE,tooltip:Cl,legend:Al,locale:Ml,style:{prefix:"cc"},data:{groupMapsTo:"group",loading:!1,selectedGroups:[]},color:{scale:null,pairing:{numberOfVariants:null,option:1},gradient:{enabled:!1}},toolbar:{enabled:!0,numberOfIcons:3,controls:[{type:J.SHOW_AS_DATATABLE},...Ll?[{type:J.MAKE_FULLSCREEN}]:[],{type:J.EXPORT_CSV},{type:J.EXPORT_PNG},{type:J.EXPORT_JPG}]}},Il=Qi({},Rl,{thematic:{projection:rt.geoNaturalEarth1}}),Pl=Qi({},Rl,{axes:kl,timeScale:Dl,grid:{x:{enabled:!0,numberOfTicks:15,alignWithAxisTicks:!1},y:{enabled:!0,numberOfTicks:5,alignWithAxisTicks:!1}},ruler:{enabled:!0},zoomBar:{zoomRatio:.4,minZoomRatio:.01,top:{enabled:!1,type:B.GRAPH_VIEW}}}),Nl=Qi({},Pl,{bars:{maxWidth:16,spacingFactor:.25},timeScale:Qi(Dl,{addSpaceOnEdges:1})}),Ul=Qi({},Nl,{}),Bl=Qi({},Nl,{}),Hl=Qi({},Nl,{bars:Qi({},Nl.bars,{dividerSize:1.5})}),$l=Qi({},Nl,{}),Fl=Qi({},Pl,{points:{radius:4,fillOpacity:.3,filled:!0,enabled:!0}}),zl=Fl,jl=Qi({},Fl,{points:{radius:3,filled:!1,enabled:!0}}),Vl=Qi({},jl,{timeScale:Qi(Dl,{addSpaceOnEdges:0})}),Gl=Vl,Wl=Qi({},Pl,{bubble:{radiusMapsTo:"radius",radiusLabel:"Radius",radiusRange:t=>{const e=Math.min(t.width,t.height);return[3*e/400,25*e/400]},fillOpacity:.2,enabled:!0},points:{filled:!0},legend:{additionalItems:[{type:et.RADIUS,name:"Radius"}]}}),Yl=Qi({},Pl,{bullet:{performanceAreaTitles:["Poor","Satisfactory","Great"]},grid:{x:{enabled:!1},y:{enabled:!1}},legend:{additionalItems:[{type:et.AREA,name:"Poor area"},{type:et.AREA,name:"Satisfactory area"},{type:et.AREA,name:"Great area"},{type:et.QUARTILE,name:"Quartiles"}]}}),Zl=Qi({},Nl,{bars:{dividerSize:1.5},timeScale:Qi(Dl,{addSpaceOnEdges:0})}),ql=Qi({},Rl,{tooltip:Qi({},Cl,{wordLabel:"Word",valueLabel:"Value"}),wordCloud:{fontSizeMapsTo:"value",fontSizeRange:t=>{const e=Math.min(t.width,t.height);return[20*e/400,75*e/400]},wordMapsTo:"word"}}),Xl=Qi({},Rl,{pie:{labels:{formatter:null,enabled:!0},alignment:j.LEFT,sortFunction:null,valueMapsTo:"value"}}),Kl=Qi({},Rl,{legend:{enabled:!1},gauge:{type:X.SEMI,arcWidth:16,deltaArrow:{size:t=>t/8,enabled:!0},showPercentageSymbol:!0,status:null,numberSpacing:10,deltaFontSize:t=>t/8,valueFontSize:t=>t/2.5,alignment:j.LEFT}}),Ql=Qi({},Xl,{donut:{center:{numberFontSize:t=>`${Math.min(t/100*24,24)}px`,titleFontSize:t=>`${Math.min(t/100*15,15)}px`,titleYPosition:t=>Math.min(t/80*20,20)},alignment:j.LEFT}}),Jl=Qi({},Rl,{legend:{enabled:!1,clickable:!1},meter:{showLabels:!0,proportional:null,statusBar:{percentageIndicator:{enabled:!0}}}}),tc=Qi({},Jl,{legend:{enabled:!0}}),ec=Qi({},Rl,{radar:{axes:{angle:"key",value:"value"},alignment:j.LEFT},tooltip:{gridline:{enabled:!0}}}),nc=Qi({},Nl,{comboChartTypes:[]}),ic=Qi({tree:{type:G.TREE}},Rl,{}),rc=Qi({},Rl,{data:Qi(Rl.data,{groupMapsTo:"name"})}),oc=Qi({},Rl,{circles:{fillOpacity:.3,hover:{stroke:"#FFF"}},padding:{mainGroup:4,children:2},depth:2},{data:Qi(Rl.data,{groupMapsTo:"name"})}),sc=Qi({},Rl,{alluvial:{data:Qi(Rl.data,{groupMapsTo:"source"}),nodeAlignment:j.CENTER,nodePadding:24,monochrome:!1,nodes:[]}}),ac=Qi({},Rl,{axes:kl,heatmap:{divider:{state:nt.AUTO},colorLegend:{type:"linear"}}}),lc={alluvialChart:sc,areaChart:Vl,axisChart:Pl,boxplotChart:$l,bubbleChart:Wl,bulletChart:Yl,chart:Rl,circlePackChart:oc,choroplethChart:Qi({},Il,{choropleth:{colorLegend:{type:"linear"}}}),comboChart:nc,donutChart:Ql,gaugeChart:Kl,groupedBarChart:Bl,heatmapChart:ac,histogramChart:Zl,lineChart:jl,lollipopChart:zl,meterChart:Jl,pieChart:Xl,proportionalMeterChart:tc,radarChart:ec,scatterChart:Fl,simpleBarChart:Ul,stackedAreaChart:Gl,stackedBarChart:Hl,thematicChart:Il,treeChart:ic,treemapChart:rc,wordCloudChart:ql};function cc(t){if(!t)return;const e=t.getAttribute("transform").match(/translate\([0-9]+\.?[0-9]*,[0-9]+\.?[0-9]*\)/);if(!e)return null;if(e[0]){const t=e[0].replace(/translate\(/,"").replace(/\)/,"").split(",");return{tx:t[0],ty:t[1]}}return null}function uc(t,e,n){return n>t.length?t:e===H.MID_LINE?t.substr(0,n/2)+"..."+t.substr(-n/2):e===H.FRONT_LINE?"..."+t.substr(-n):e===H.END_LINE?t.substr(0,n)+"...":void 0}function hc(t,e){const n=dc(t,"legend","additionalItems"),i=dc(e,"legend","additionalItems");if(n&&i){const r=i.map((t=>t.type)),o=n.map((t=>t.type)),s=Sl.filter((t=>o.includes(t.type)&&!r.includes(t.type)));t.legend.additionalItems=s,e.legend.additionalItems=er(s,i,"name")}}const dc=(t,...e)=>{let n=t;if(n){for(const t of e){if(null===n[t]||void 0===n[t])return null;n=n[t]}return n}return null},fc=(t,e)=>e===$.HORIZONTAL?{y0:t.x0,y1:t.x1,x0:t.y0,x1:t.y1}:t;function pc(t,e,n){return n===$.VERTICAL?[t,e]:[e,t]}function mc(t){const e=gt(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function gc(t,e){const n=gt(t,void 0);return n.setHours(0,0,0,0),n}function vc(t,e,n){const[i,r]=ft(0,t,e),o=gc(i),s=gc(r),a=+o-mc(o),l=+s-mc(s);return Math.round((a-l)/864e5)}function yc(t,e){return vt(t,{...e,weekStartsOn:1})}function _c(t,e){const n=gt(t,void 0),i=n.getFullYear(),r=dt(n,0);r.setFullYear(i+1,0,4),r.setHours(0,0,0,0);const o=yc(r),s=dt(n,0);s.setFullYear(i,0,4),s.setHours(0,0,0,0);const a=yc(s);return n.getTime()>=o.getTime()?i+1:n.getTime()>=a.getTime()?i:i-1}function bc(t,e){var n,i,r,o;const s=gt(t,null==e?void 0:e.in),a=s.getFullYear(),l=mt(),c=(null==e?void 0:e.firstWeekContainsDate)??(null==(i=null==(n=null==e?void 0:e.locale)?void 0:n.options)?void 0:i.firstWeekContainsDate)??l.firstWeekContainsDate??(null==(o=null==(r=l.locale)?void 0:r.options)?void 0:o.firstWeekContainsDate)??1,u=dt((null==e?void 0:e.in)||t,0);u.setFullYear(a+1,0,c),u.setHours(0,0,0,0);const h=vt(u,e),d=dt((null==e?void 0:e.in)||t,0);d.setFullYear(a,0,c),d.setHours(0,0,0,0);const f=vt(d,e);return+s>=+h?a+1:+s>=+f?a:a-1}function wc(t,e){return(t<0?"-":"")+Math.abs(t).toString().padStart(e,"0")}const xc={y(t,e){const n=t.getFullYear(),i=n>0?n:1-n;return wc("yy"===e?i%100:i,e.length)},M(t,e){const n=t.getMonth();return"M"===e?String(n+1):wc(n+1,2)},d:(t,e)=>wc(t.getDate(),e.length),a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(t,e)=>wc(t.getHours()%12||12,e.length),H:(t,e)=>wc(t.getHours(),e.length),m:(t,e)=>wc(t.getMinutes(),e.length),s:(t,e)=>wc(t.getSeconds(),e.length),S(t,e){const n=e.length,i=t.getMilliseconds();return wc(Math.trunc(i*Math.pow(10,n-3)),e.length)}},Ec={G:function(t,e,n){const i=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});default:return n.era(i,{width:"wide"})}},y:function(t,e,n){if("yo"===e){const e=t.getFullYear(),i=e>0?e:1-e;return n.ordinalNumber(i,{unit:"year"})}return xc.y(t,e)},Y:function(t,e,n,i){const r=bc(t,i),o=r>0?r:1-r;return"YY"===e?wc(o%100,2):"Yo"===e?n.ordinalNumber(o,{unit:"year"}):wc(o,e.length)},R:function(t,e){return wc(_c(t),e.length)},u:function(t,e){return wc(t.getFullYear(),e.length)},Q:function(t,e,n){const i=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(i);case"QQ":return wc(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(t,e,n){const i=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(i);case"qq":return wc(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(t,e,n){const i=t.getMonth();switch(e){case"M":case"MM":return xc.M(t,e);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(t,e,n){const i=t.getMonth();switch(e){case"L":return String(i+1);case"LL":return wc(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(t,e,n,i){const r=function(t,e){const n=gt(t,null==e?void 0:e.in),i=+vt(n,e)-+function(t,e){var n,i,r,o;const s=mt(),a=(null==e?void 0:e.firstWeekContainsDate)??(null==(i=null==(n=null==e?void 0:e.locale)?void 0:n.options)?void 0:i.firstWeekContainsDate)??s.firstWeekContainsDate??(null==(o=null==(r=s.locale)?void 0:r.options)?void 0:o.firstWeekContainsDate)??1,l=bc(t,e),c=dt((null==e?void 0:e.in)||t,0);return c.setFullYear(l,0,a),c.setHours(0,0,0,0),vt(c,e)}(n,e);return Math.round(i/ct)+1}(t,i);return"wo"===e?n.ordinalNumber(r,{unit:"week"}):wc(r,e.length)},I:function(t,e,n){const i=function(t){const e=gt(t,void 0),n=+yc(e)-+function(t){const e=_c(t),n=dt(t,0);return n.setFullYear(e,0,4),n.setHours(0,0,0,0),yc(n)}(e);return Math.round(n/ct)+1}(t);return"Io"===e?n.ordinalNumber(i,{unit:"week"}):wc(i,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getDate(),{unit:"date"}):xc.d(t,e)},D:function(t,e,n){const i=function(t){const e=gt(t,void 0);return vc(e,function(t){const e=gt(t,void 0);return e.setFullYear(e.getFullYear(),0,1),e.setHours(0,0,0,0),e}(e))+1}(t);return"Do"===e?n.ordinalNumber(i,{unit:"dayOfYear"}):wc(i,e.length)},E:function(t,e,n){const i=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},e:function(t,e,n,i){const r=t.getDay(),o=(r-i.weekStartsOn+8)%7||7;switch(e){case"e":return String(o);case"ee":return wc(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},c:function(t,e,n,i){const r=t.getDay(),o=(r-i.weekStartsOn+8)%7||7;switch(e){case"c":return String(o);case"cc":return wc(o,e.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(r,{width:"narrow",context:"standalone"});case"cccccc":return n.day(r,{width:"short",context:"standalone"});default:return n.day(r,{width:"wide",context:"standalone"})}},i:function(t,e,n){const i=t.getDay(),r=0===i?7:i;switch(e){case"i":return String(r);case"ii":return wc(r,e.length);case"io":return n.ordinalNumber(r,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(t,e,n){const i=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(t,e,n){const i=t.getHours();let r;switch(r=12===i?"noon":0===i?"midnight":i/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(t,e,n){const i=t.getHours();let r;switch(r=i>=17?"evening":i>=12?"afternoon":i>=4?"morning":"night",e){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(t,e,n){if("ho"===e){let e=t.getHours()%12;return 0===e&&(e=12),n.ordinalNumber(e,{unit:"hour"})}return xc.h(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getHours(),{unit:"hour"}):xc.H(t,e)},K:function(t,e,n){const i=t.getHours()%12;return"Ko"===e?n.ordinalNumber(i,{unit:"hour"}):wc(i,e.length)},k:function(t,e,n){let i=t.getHours();return 0===i&&(i=24),"ko"===e?n.ordinalNumber(i,{unit:"hour"}):wc(i,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):xc.m(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getSeconds(),{unit:"second"}):xc.s(t,e)},S:function(t,e){return xc.S(t,e)},X:function(t,e,n){const i=t.getTimezoneOffset();if(0===i)return"Z";switch(e){case"X":return Sc(i);case"XXXX":case"XX":return Oc(i);default:return Oc(i,":")}},x:function(t,e,n){const i=t.getTimezoneOffset();switch(e){case"x":return Sc(i);case"xxxx":case"xx":return Oc(i);default:return Oc(i,":")}},O:function(t,e,n){const i=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Tc(i,":");default:return"GMT"+Oc(i,":")}},z:function(t,e,n){const i=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Tc(i,":");default:return"GMT"+Oc(i,":")}},t:function(t,e,n){return wc(Math.trunc(+t/1e3),e.length)},T:function(t,e,n){return wc(+t,e.length)}};function Tc(t,e=""){const n=t>0?"-":"+",i=Math.abs(t),r=Math.trunc(i/60),o=i%60;return 0===o?n+String(r):n+String(r)+e+wc(o,2)}function Sc(t,e){return t%60==0?(t>0?"-":"+")+wc(Math.abs(t)/60,2):Oc(t,e)}function Oc(t,e=""){const n=t>0?"-":"+",i=Math.abs(t);return n+wc(Math.trunc(i/60),2)+e+wc(i%60,2)}const Mc=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},Ac=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},Cc={p:Ac,P:(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],i=n[1],r=n[2];if(!r)return Mc(t,e);let o;switch(i){case"P":o=e.dateTime({width:"short"});break;case"PP":o=e.dateTime({width:"medium"});break;case"PPP":o=e.dateTime({width:"long"});break;default:o=e.dateTime({width:"full"})}return o.replace("{{date}}",Mc(i,e)).replace("{{time}}",Ac(r,e))}},kc=/^D+$/,Dc=/^Y+$/,Lc=["D","DD","YY","YYYY"];const Rc=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ic=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Pc=/^'([^]*?)'?$/,Nc=/''/g,Uc=/[a-zA-Z]/;function Bc(t,e,n){var i,r,o,s,a,l,c,u;const h=mt(),d=(null==n?void 0:n.locale)??h.locale??xt,f=(null==n?void 0:n.firstWeekContainsDate)??(null==(r=null==(i=null==n?void 0:n.locale)?void 0:i.options)?void 0:r.firstWeekContainsDate)??h.firstWeekContainsDate??(null==(s=null==(o=h.locale)?void 0:o.options)?void 0:s.firstWeekContainsDate)??1,p=(null==n?void 0:n.weekStartsOn)??(null==(l=null==(a=null==n?void 0:n.locale)?void 0:a.options)?void 0:l.weekStartsOn)??h.weekStartsOn??(null==(u=null==(c=h.locale)?void 0:c.options)?void 0:u.weekStartsOn)??0,m=gt(t,null==n?void 0:n.in);if(!function(t){return!(!function(t){return t instanceof Date||"object"==typeof t&&"[object Date]"===Object.prototype.toString.call(t)}(t)&&"number"!=typeof t||isNaN(+gt(t)))}(m))throw new RangeError("Invalid time value");let g=e.match(Ic).map((t=>{const e=t[0];return"p"===e||"P"===e?(0,Cc[e])(t,d.formatLong):t})).join("").match(Rc).map((t=>{if("''"===t)return{isToken:!1,value:"'"};const e=t[0];if("'"===e)return{isToken:!1,value:Hc(t)};if(Ec[e])return{isToken:!0,value:t};if(e.match(Uc))throw new RangeError("Format string contains an unescaped latin alphabet character `"+e+"`");return{isToken:!1,value:t}}));d.localize.preprocessor&&(g=d.localize.preprocessor(m,g));const v={firstWeekContainsDate:f,weekStartsOn:p,locale:d};return g.map((i=>{if(!i.isToken)return i.value;const r=i.value;return((null==n||!n.useAdditionalWeekYearTokens)&&function(t){return Dc.test(t)}(r)||(null==n||!n.useAdditionalDayOfYearTokens)&&function(t){return kc.test(t)}(r))&&function(t,e,n){const i=function(t,e,n){const i="Y"===t[0]?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${i} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(t,e,n);if(console.warn(i),Lc.includes(t))throw new RangeError(i)}(r,e,String(t)),(0,Ec[r[0]])(m,r,d.localize,v)})).join("")}function Hc(t){const e=t.match(Pc);return e?e[1].replace(Nc,"'"):t}const $c=[["15seconds",15e3],["minute",6e4],["30minutes",18e5],["hourly",36e5],["daily",864e5],["monthly",2592e6],["quarterly",7776e6],["yearly",31104e6]];function Fc(t,e,n,i,r){const o=0===e,s=2===Number(Bc(new Date(t),"c")),a=1===Number(Bc(new Date(t),"q")),l=0!==e?n[e-1]:null;switch(i){case"15seconds":case"minute":case"30minutes":case"hourly":return o||function(t){const{s:e,m:n,H:i}=jc(t);return 0===i&&0===n&&0===e}(t)||Gc(t,l)||Wc(t);case"daily":return r?o||s||Wc(t):o||Gc(t,l)||Wc(t);case"weekly":return o||s||Wc(t);case"monthly":return o||Wc(t);case"quarterly":return o||a;case"yearly":return!1;default:throw new Error(`${i} is not a valid time interval.`)}}function zc(t,e,n,i,r,o){const s=r.showDayName,a="daily"===i&&s?"weekly":i,l=new Date(t),c=dc(r,"timeIntervalFormats")[a],u=dc(c,"primary"),h=dc(c,"secondary"),d=Fc(t,e,n,i,s);let f=d?u:h;"15seconds"===i&&0!==l.getMilliseconds()&&(f=f.replace("pp","h:mm:ss.SSS a"));const p=r.localeObject,{code:m,optionsObject:g}=o,v=g[i].type,y=g[i][d?"primary":"secondary"][f];if("quarterly"!==i&&y)return o[v](l,m,y);{const t=Bc(l,f,{locale:p}).split("").map((t=>{const e=Number(t);return" "===t||Number.isNaN(e)?t:e.toLocaleString(m)}));return o[v](l,m,{},t.join(""))}}function jc(t){const e=new Date(t);return{M:e.getMonth()+1,d:e.getDate(),H:e.getHours(),m:e.getMinutes(),s:e.getSeconds()}}function Vc(t,e){if(ot[e])return e;if(1===t.length)return"15seconds";const n=function(t){if(t)return t.slice(1).map(((e,n)=>e-t[n]))}(t);return function(t){const e=$c.reduce(((e,[,n],i)=>{const r=$c[e][1];return Math.abs(r-t)<Math.abs(n-t)?e:i}),0);return $c[e][0]}(function(t){let e;for(const n of t)null!=n&&(e>n||void 0===e&&n>=n)&&(e=n);return e}(n))}function Gc(t,e){return jc(t).M!==jc(e).M}function Wc(t){const{M:e,d:n,s:i,m:r,H:o}=jc(t);return 1===e&&1===n&&0===o&&0===r&&0===i}function Yc(t){return void 0===t?"":t.toISOString()}var Zc=(t=>(t.GRAPHICS_DOCUMENT="graphics-document",t.GRAPHICS_OBJECT="graphics-object",t.GRAPHICS_SYMBOL="graphics-symbol",t.GROUP="group",t.DOCUMENT="document",t.CHECKBOX="checkbox",t.BUTTON="button",t.MENU="menu",t.MENU_ITEM="menuitem",t.IMG="img",t))(Zc||{}),qc=function(t,e){if(null==t)return t;if(!Te(t))return function(t,e){return t&&Gi(t,e,Xe)}(t,e);for(var n=t.length,i=-1,r=Object(t);++i<n&&!1!==e(r[i],i,r););return t};function Xc(t){return function(){return t}}function Kc(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function Qc(t,e,n,i){for(var r=-1,o=null==t?0:t.length;++r<o;){var s=t[r];e(i,s,n(s),t)}return i}function Jc(t,e,n,i){return qc(t,(function(t,r,o){e(i,t,n(t),o)})),i}Array.prototype.slice;var tu=Object.prototype.hasOwnProperty,eu=function(t){return function(e,n){return(Bt(e)?Qc:Jc)(e,t,Vi(n),{})}}((function(t,e,n){tu.call(t,n)?t[n].push(e):me(t,n,[e])}));function nu(t){return t}var iu=Array.prototype.slice;function ru(t){return()=>t}function ou(t){return Math.max(1,Math.ceil(Math.log(function(t){let e=0;for(let n of t)null!=n&&(n=+n)>=n&&++e;return e}(t))/Math.LN2)+1)}function su(t,e){if((r=t.length)>1)for(var n,i,r,o=1,s=t[e[0]],a=s.length;o<r;++o)for(i=s,s=t[e[o]],n=0;n<a;++n)s[n][1]+=s[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function au(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function lu(t,e){return t[e]}function cu(t){const e=[];return e.key=t,e}function uu(){var t=Xc([]),e=au,n=su,i=lu;function r(r){var o,s,a=Array.from(t.apply(this,arguments),cu),l=a.length,c=-1;for(const t of r)for(o=0,++c;o<l;++o)(a[o][c]=[0,+i(t,a[o].key,c,r)]).data=t;for(o=0,s=Kc(e(a));o<l;++o)a[s[o]].index=o;return n(a,s),a}return r.keys=function(e){return arguments.length?(t="function"==typeof e?e:Xc(Array.from(e)),r):t},r.value=function(t){return arguments.length?(i="function"==typeof t?t:Xc(+t),r):i},r.order=function(t){return arguments.length?(e=null==t?au:"function"==typeof t?t:Xc(Array.from(t)),r):e},r.offset=function(t){return arguments.length?(n=t??su,r):n},r}function hu(t,e){if((a=t.length)>0)for(var n,i,r,o,s,a,l=0,c=t[e[0]].length;l<c;++l)for(o=s=0,n=0;n<a;++n)(r=(i=t[e[n]][l])[1]-i[0])>0?(i[0]=o,i[1]=o+=r):r<0?(i[1]=s,i[0]=s+=r):(i[0]=0,i[1]=r)}class du{constructor(t){this.state={options:{}},this.colorScale={},this.colorClassNames={},this.services=t}formatTable({headers:t,cells:e}){const n=this.getOptions(),{code:i,date:r,number:o}=dc(n,"locale"),s=dc(n,"tabularRepModal","tableHeadingFormatter"),a=dc(n,"tabularRepModal","tableCellFormatter"),{cartesianScales:l}=this.services;let c;return(null==l?void 0:l.getDomainAxisScaleType())===F.TIME&&(c=t=>r(t,i,{month:"short",day:"numeric",year:"numeric"})),["function"==typeof s?s(t):t,..."function"==typeof a?a(e):e.map((t=>{c&&(t[1]=c(t[1]));for(const e in t){const n=t[e];"number"==typeof n&&(t[e]=o(n,i))}return t}))]}getAllDataFromDomain(t){if(!this.getData())return null;const e=this.getOptions();let n=this.getData();const i=this.getDataGroups(),{groupMapsTo:r}=dc(e,"data"),o=dc(e,"axes");return t&&(n=n.filter((e=>t.includes(e[r])))),o&&Object.keys(o).forEach((t=>{const e=o[t].mapsTo,i=o[t].scaleType;if((i===F.LINEAR||i===F.LOG)&&(n=n.map((t=>({...t,[e]:null===t[e]?t[e]:Number(t[e])})))),e&&o[t].domain)if(i===F.LABELS)n=n.filter((n=>o[t].domain.includes(n[e])));else{const[i,r]=o[t].domain;n=n.filter((t=>!(e in t)||t[e]>=i&&t[e]<=r))}})),n.filter((t=>i.find((e=>e.name===t[r]))))}getDisplayData(t){if(!this.get("data"))return null;const{ACTIVE:e}=yl.items.status,n=this.getDataGroups(t),{groupMapsTo:i}=this.getOptions().data;return this.getAllDataFromDomain(t).filter((t=>n.find((n=>n.name===t[i]&&n.status===e))))}getData(){return this.get("data")}isDataEmpty(){return!this.getData().length}setData(t){const e=this.sanitize(Oi(t)),n=this.generateDataGroups(e);return this.set({data:e,dataGroups:n}),e}getDataGroups(t){return dc(this.getOptions(),"data","loading")?[]:t?this.get("dataGroups").filter((e=>t.includes(e.name))):this.get("dataGroups")}getActiveDataGroups(t){const{ACTIVE:e}=yl.items.status;return this.getDataGroups(t).filter((t=>t.status===e))}getDataGroupNames(t){return this.getDataGroups(t).map((t=>t.name))}getActiveDataGroupNames(t){return this.getActiveDataGroups(t).map((t=>t.name))}aggregateBinDataByGroup(t){return eu(t,"group")}getBinConfigurations(){const t=this.getDisplayData(),e=this.getOptions(),n=this.services.cartesianScales.getMainXAxisPosition(),i=this.services.cartesianScales.getDomainIdentifier(),r=e.axes[n],{groupMapsTo:o}=e.data,{bins:s=vl.defaultBins}=r,a=Array.isArray(s),l=function(){var t=nu,e=lr,n=ou;function i(i){Array.isArray(i)||(i=Array.from(i));var r,o,s,a=i.length,l=new Array(a);for(r=0;r<a;++r)l[r]=t(i[r],r,i);var c=e(l),u=c[0],h=c[1],d=n(l,u,h);if(!Array.isArray(d)){const t=h,n=+d;if(e===lr&&([u,h]=function(t,e,n){let i;for(;;){const r=vr(t,e,n);if(r===i||0===r||!isFinite(r))return[t,e];r>0?(t=Math.floor(t/r)*r,e=Math.ceil(e/r)*r):r<0&&(t=Math.ceil(t*r)/r,e=Math.floor(e*r)/r),i=r}}(u,h,n)),(d=gr(u,h,n))[0]<=u&&(s=vr(u,h,n)),d[d.length-1]>=h)if(t>=h&&e===lr){const t=vr(u,h,n);isFinite(t)&&(t>0?h=(Math.floor(h/t)+1)*t:t<0&&(h=(Math.ceil(h*-t)+1)/-t))}else d.pop()}for(var f=d.length,p=0,m=f;d[p]<=u;)++p;for(;d[m-1]>h;)--m;(p||m<f)&&(d=d.slice(p,m),f=m-p);var g,v=new Array(f+1);for(r=0;r<=f;++r)(g=v[r]=[]).x0=r>0?d[r-1]:u,g.x1=r<f?d[r]:h;if(isFinite(s)){if(s>0)for(r=0;r<a;++r)null!=(o=l[r])&&u<=o&&o<=h&&v[Math.min(f,Math.floor((o-u)/s))].push(i[r]);else if(s<0)for(r=0;r<a;++r)if(null!=(o=l[r])&&u<=o&&o<=h){const t=Math.floor((u-o)*s);v[Math.min(f,t+(d[t]<=o))].push(i[r])}}else for(r=0;r<a;++r)null!=(o=l[r])&&u<=o&&o<=h&&v[ar(d,o,0,f)].push(i[r]);return v}return i.value=function(e){return arguments.length?(t="function"==typeof e?e:ru(e),i):t},i.domain=function(t){return arguments.length?(e="function"==typeof t?t:ru([t[0],t[1]]),i):e},i.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:ru(Array.isArray(t)?iu.call(t):t),i):n},i}().value((t=>t[i])).thresholds(s)(t);if(a)l[l.length-1].x1=s[s.length-1];else{const t=l[0].x1-l[0].x0;l[l.length-1].x1=+l[l.length-1].x0+t}const c=a?[s[0],s[s.length-1]]:[l[0].x0,l[l.length-1].x1],u=Array.from(new Set(t.map((t=>t[o])))),h=[];return l.forEach((t=>{const e=`${t.x0}-${t.x1}`,n=this.aggregateBinDataByGroup(t);u.forEach((i=>{h.push({group:i,key:e,value:n[i]||0,bin:t.x0})}))})),{bins:l,binsDomain:c}}getBinnedStackedData(){const t=this.getOptions(),{groupMapsTo:e}=t.data,n=this.getActiveDataGroupNames(),{bins:i}=this.getBinConfigurations(),r=this.getDataValuesGroupedByKeys({bins:i});return uu().keys(n)(r).map(((t,i)=>Object.keys(t).filter((t=>!isNaN(t))).map((r=>{const o=t[r];return o[e]=n[i],o}))))}getGroupedData(t){const e=this.getDisplayData(t),n={},{groupMapsTo:i}=this.getOptions().data;return e.map((t=>{const e=t[i];null!==n[e]&&void 0!==n[e]?n[e].push(t):n[e]=[t]})),Object.keys(n).map((t=>({name:t,data:n[t]})))}getStackKeys({bins:t=null,groups:e=null}={bins:null,groups:null}){const n=this.getOptions(),i=this.getDisplayData(e);let r;r=t?t.map((t=>`${t.x0}:${t.x1}`)):nr(i.map((t=>{const e=this.services.cartesianScales.getDomainIdentifier(t);return t[e]instanceof Date?Yc(t[e]):t[e]&&"function"==typeof t[e].toString?t[e].toString():t[e]})));const o=this.services.cartesianScales.domainAxisPosition,s=n.axes[o].scaleType;return s===F.TIME?r.sort(((t,e)=>new Date(t)-new Date(e))):(s===F.LOG||s===F.LINEAR)&&r.sort(((t,e)=>t-e)),r}getDataValuesGroupedByKeys({bins:t=null,groups:e=null}){const n=this.getOptions(),{groupMapsTo:i}=n.data,r=this.getDisplayData(e),o=this.getDataGroupNames(),s=this.getStackKeys({bins:t,groups:e});return t?s.map((e=>{const[n,r]=e.split(":"),s={x0:n,x1:r},a=t.find((t=>t.x0.toString()===n.toString()));return o.forEach((t=>{s[t]=a.filter((e=>e[i]===t)).length})),s})):s.map((t=>{const e={sharedStackKey:t};return o.forEach((n=>{const o=r.find((e=>{const r=this.services.cartesianScales.getDomainIdentifier(e);return e[i]===n&&Object.prototype.hasOwnProperty.call(e,r)&&(e[r]instanceof Date?Yc(e[r])===t:e[r].toString()===t)})),s=this.services.cartesianScales.getRangeIdentifier(e);e[n]=o?o[s]:null})),e}))}getStackedData({percentage:t=!1,groups:e=null,divergent:n=!1}){const i=this.getOptions(),{groupMapsTo:r}=i.data,o=this.getActiveDataGroupNames(e),s=this.getDataValuesGroupedByKeys({groups:e});if(t){const t=function(t){for(var e=-1,n=null==t?0:t.length,i={};++e<n;){var r=t[e];i[r[0]]=r[1]}return i}(s.map((t=>[t.sharedStackKey,0])));s.forEach((e=>{o.forEach((n=>{t[e.sharedStackKey]+=e[n]}))})),s.forEach((e=>{o.forEach((n=>{const i=t[e.sharedStackKey];t[e.sharedStackKey]?e[n]=e[n]/i*100:e[n]=0}))}))}return(n?uu().offset(hu):uu()).keys(o)(s).map(((t,e)=>Object.keys(t).filter((t=>!isNaN(t))).map((n=>{const i=t[n];return i[r]=o[e],i}))))}getOptions(){return this.state.options}set(t,e){this.state=Object.assign({},this.state,t);const n=Object.assign({skipUpdate:!1,animate:!0},e);n.skipUpdate||this.update(n.animate)}get(t){return t?this.state[t]:this.state}setOptions(t){const e=this.getOptions();hc(e,t),this.set({options:Qi(e,t)})}update(t=!0){this.getDisplayData()&&(this.updateAllDataGroups(),this.setCustomColorScale(),this.setColorClassNames(),this.services.events.dispatchEvent(R.Model.UPDATE,{animate:t}))}toggleDataLabel(t){const{ACTIVE:e,DISABLED:n}=yl.items.status,i=this.getDataGroups(),r=i.some((t=>t.status===n)),o=i.filter((t=>t.status===e));if(r)if(1===o.length&&o[0].name===t)i.forEach(((t,n)=>{i[n].status=e}));else{const r=i.findIndex((e=>e.name===t));i[r].status=i[r].status===n?e:n}else i.forEach(((r,o)=>{i[o].status=r.name===t?e:n}));const s=i.filter((t=>t.status===e)),a=this.getOptions();i.some((t=>t.status===n))?a.data.selectedGroups=s.map((t=>t.name)):a.data.selectedGroups=[],this.services.events.dispatchEvent(R.Legend.ITEMS_UPDATE,{dataGroups:i}),this.set({dataGroups:i})}getIsFilled(t,e,n,i){const r=this.getOptions();return r.getIsFilled?r.getIsFilled(t,e,n,i):i}getFillColor(t,e,n){const i=this.getOptions(),r=dc(this.colorScale,t);return i.getFillColor?i.getFillColor(t,e,n,r):r}getStrokeColor(t,e,n){const i=this.getOptions(),r=dc(this.colorScale,t);return i.getStrokeColor?i.getStrokeColor(t,e,n,r):r}isUserProvidedColorScaleValid(){const t=dc(this.getOptions(),"color","scale"),e=this.getDataGroups();return null!=t&&0!=Object.keys(t).length&&e.some((e=>Object.keys(t).includes(e.name)))}getColorClassName(t){const e=this.colorClassNames(t.dataGroupName);let n=t.originalClassName;return t.classNameTypes.forEach((i=>n=t.originalClassName?`${n} ${i}-${e}`:`${i}-${e}`)),n||""}getStatus(){return null}getAllDataGroupsNames(){return this.allDataGroups}transformToTabularData(t){console.warn("We've updated the charting data format to be tabular by default. The current format you're using is deprecated and will be removed in v1.0, read more here https://charts.carbondesignsystem.com/");const e=[],{datasets:n,labels:i}=t;return n.forEach((t=>{t.data.forEach(((n,r)=>{let o;const s=dc(t,"label");if(null===s){o=dc(i,r)||"Ungrouped"}else o=s;const a={group:o,key:i[r]};isNaN(n)?(a.value=n.value,a.date=n.date):a.value=n,e.push(a)}))})),e}getTabularDataArray(){return[]}exportToCSV(){const t=this.getTabularDataArray().map((t=>t.map((t=>`"${("–"===t?"–":t).split(/[,;'"`]/).map((t=>function(t){const e=t.trim();return["=","+","-","@","\t","\r"].includes(e.charAt(0))?` ${e}`:/[,\"\n]/.test(e)?`"${e}"`:e}(t))).join("")}"`)))).map((t=>t.join(","))).join("\n"),e=this.getOptions();let n="myChart";const i=dc(e,"fileDownload","fileName");"function"==typeof i?n=i("csv"):"string"==typeof i&&(n=i),this.services.files.downloadCSV(t,`${n}.csv`)}getTabularData(t){return Array.isArray(t)?t:this.transformToTabularData(t)}sanitize(t){return this.getTabularData(t)}updateAllDataGroups(){this.allDataGroups?this.getDataGroupNames().forEach((t=>{-1===this.allDataGroups.indexOf(t)&&this.allDataGroups.push(t)})):this.allDataGroups=this.getDataGroupNames()}generateDataGroups(t){const{groupMapsTo:e}=this.getOptions().data,{ACTIVE:n,DISABLED:i}=yl.items.status,r=this.getOptions(),o=nr(t.map((t=>t[e])));r.data.selectedGroups.length&&(r.data.selectedGroups.every((t=>o.includes(t)))||(r.data.selectedGroups=[]));const s=t=>!r.data.selectedGroups.length||r.data.selectedGroups.includes(t)?n:i;return o.map((t=>({name:t,status:s(t)})))}setCustomColorScale(){if(!this.isUserProvidedColorScaleValid())return;const t=this.getOptions(),e=dc(t,"color","scale");Object.keys(e).forEach((t=>{this.allDataGroups.includes(t)||console.warn(`"${t}" does not exist in data groups.`)})),this.allDataGroups.filter((t=>e[t])).forEach((t=>this.colorScale[t]=e[t]))}setColorClassNames(){const t=dc(this.getOptions(),"color","pairing");let e=dc(t,"numberOfVariants");(!e||e<this.allDataGroups.length)&&(e=this.allDataGroups.length);let n=dc(t,"option");const i=e>5?14:e;n=n<=gl[`${i}-color`]?n:1;const r=this.allDataGroups.map(((t,e)=>`${i}-${n}-${e%14+1}`));this.colorClassNames=Xa().range(r).domain(this.allDataGroups)}}class fu extends du{constructor(t){super(t),this.axisFlavor=it.DEFAULT}assignRangeAndDomains(){const{cartesianScales:t}=this.services,e=this.getOptions(),n=t.isDualAxes(),i={primaryDomain:t.domainAxisPosition,primaryRange:t.rangeAxisPosition,secondaryDomain:null,secondaryRange:null};return n&&(i.secondaryDomain=t.secondaryDomainAxisPosition,i.secondaryRange=t.secondaryRangeAxisPosition),Object.keys(i).forEach((n=>{const r=i[n];t.scales[r]?i[n]={position:r,label:t.getScaleLabel(r),identifier:dc(e,"axes",r,"mapsTo")}:i[n]=null})),i}getTabularDataArray(){const t=this.getDisplayData(),e=this.getOptions(),{groupMapsTo:n}=e.data,{primaryDomain:i,primaryRange:r,secondaryDomain:o,secondaryRange:s}=this.assignRangeAndDomains(),{number:a,code:l}=dc(this.getOptions(),"locale"),c=["Group",i.label,r.label,...o?[o.label]:[],...s?[s.label]:[]],u=t.map((t=>[t[n],null===t[i.identifier]?"–":t[i.identifier],null===t[r.identifier]||isNaN(t[r.identifier])?"–":a(t[r.identifier],l),...o?[null===t[o.identifier]?"–":t[o.identifier]]:[],...s?[null===t[s.identifier]||isNaN(t[s.identifier])?"–":t[s.identifier]]:[]]));return super.formatTable({headers:c,cells:u})}setData(t){let e;if(t&&(e=super.setData(t),dc(this.getOptions(),"zoomBar",U.TOP,"enabled"))){const t=dc(this.getOptions(),"zoomBar",U.TOP,"data");this.setZoomBarData(t)}return e}setZoomBarData(t){const e=t?this.sanitize(Oi(t)):this.getDisplayData();let n=e;const{cartesianScales:i}=this.services;if(e&&i.domainAxisPosition&&i.rangeAxisPosition){const t=i.getDomainIdentifier(),r=i.getRangeIdentifier();let o=e.map((e=>e[t].getTime()));o=nr(o).sort(),n=o.map((n=>{let i=0;const o={};return e.forEach((e=>{e[t].getTime()===n&&(i+=e[r])})),o[t]=new Date(n),o[r]=i,o}))}this.set({zoomBarData:n})}getZoomBarData(){return this.get("zoomBarData")}sanitizeDateValues(t){const e=this.getOptions();if(!e.axes)return t;const n=[];return Object.keys(U).forEach((t=>{const i=U[t],r=e.axes[i];if(r&&r.scaleType===F.TIME){const t=r.mapsTo;(null!==t||void 0!==t)&&n.push(t)}})),n.length>0&&t.forEach((t=>{n.forEach((e=>{null===dc(t,e,"getTime")&&(t[e]=new Date(t[e]))}))})),t}sanitize(t){return t=super.sanitize(t),this.sanitizeDateValues(t)}}var pu=/\s/,mu=/^\s+/;var gu=/^[-+]0x[0-9a-f]+$/i,vu=/^0b[01]+$/i,yu=/^0o[0-7]+$/i,_u=parseInt;function bu(t){if("number"==typeof t)return t;if(Nt(t))return NaN;if(zt(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=zt(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=function(t){return t&&t.slice(0,function(t){for(var e=t.length;e--&&pu.test(t.charAt(e)););return e}(t)+1).replace(mu,"")}(t);var n=vu.test(t);return n||yu.test(t)?_u(t.slice(2),n?2:8):gu.test(t)?NaN:+t}var wu=function(){return Ot.Date.now()},xu=Math.max,Eu=Math.min;function Tu(t){return"string"==typeof t?new Po([[document.querySelector(t)]],[document.documentElement]):new Po([[t]],Io)}function Su(){var t,e,n=Xa().unknown(void 0),i=n.domain,r=n.range,o=0,s=1,a=!1,l=0,c=0,u=.5;function h(){var n=i().length,h=s<o,d=h?s:o,f=h?o:s;t=(f-d)/Math.max(1,n-l+2*c),a&&(t=Math.floor(t)),d+=(f-d-t*(n-l))*u,e=t*(1-l),a&&(d=Math.round(d),e=Math.round(e));var p=function(t,e,n){t=+t,e=+e,n=(r=arguments.length)<2?(e=t,t=0,1):r<3?1:+n;for(var i=-1,r=0|Math.max(0,Math.ceil((e-t)/n)),o=new Array(r);++i<r;)o[i]=t+i*n;return o}(n).map((function(e){return d+t*e}));return r(h?p.reverse():p)}return delete n.unknown,n.domain=function(t){return arguments.length?(i(t),h()):i()},n.range=function(t){return arguments.length?([o,s]=t,o=+o,s=+s,h()):[o,s]},n.rangeRound=function(t){return[o,s]=t,o=+o,s=+s,a=!0,h()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(a=!!t,h()):a},n.padding=function(t){return arguments.length?(l=Math.min(1,c=+t),h()):l},n.paddingInner=function(t){return arguments.length?(l=Math.min(1,t),h()):l},n.paddingOuter=function(t){return arguments.length?(c=+t,h()):c},n.align=function(t){return arguments.length?(u=Math.max(0,Math.min(1,t)),h()):u},n.copy=function(){return Su(i(),[o,s]).round(a).paddingInner(l).paddingOuter(c).align(u)},Za.apply(h(),arguments)}function Ou(t,e){var n,i=0,r=(t=t.slice()).length-1,o=t[i],s=t[r];return s<o&&(n=i,i=r,r=n,n=o,o=s,s=n),t[i]=e.floor(o),t[r]=e.ceil(s),t}const Mu=new Date,Au=new Date;function Cu(t,e,n,i){function r(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return r.floor=e=>(t(e=new Date(+e)),e),r.ceil=n=>(t(n=new Date(n-1)),e(n,1),t(n),n),r.round=t=>{const e=r(t),n=r.ceil(t);return t-e<n-t?e:n},r.offset=(t,n)=>(e(t=new Date(+t),null==n?1:Math.floor(n)),t),r.range=(n,i,o)=>{const s=[];if(n=r.ceil(n),o=null==o?1:Math.floor(o),!(n<i&&o>0))return s;let a;do{s.push(a=new Date(+n)),e(n,o),t(n)}while(a<n&&n<i);return s},r.filter=n=>Cu((e=>{if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)}),((t,i)=>{if(t>=t)if(i<0)for(;++i<=0;)for(;e(t,-1),!n(t););else for(;--i>=0;)for(;e(t,1),!n(t););})),n&&(r.count=(e,i)=>(Mu.setTime(+e),Au.setTime(+i),t(Mu),t(Au),Math.floor(n(Mu,Au))),r.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?r.filter(i?e=>i(e)%t===0:e=>r.count(0,e)%t===0):r:null)),r}const ku=Cu((()=>{}),((t,e)=>{t.setTime(+t+e)}),((t,e)=>e-t));ku.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?Cu((e=>{e.setTime(Math.floor(e/t)*t)}),((e,n)=>{e.setTime(+e+n*t)}),((e,n)=>(n-e)/t)):ku:null),ku.range;const Du=1e3,Lu=6e4,Ru=60*Lu,Iu=24*Ru,Pu=7*Iu,Nu=30*Iu,Uu=365*Iu,Bu=Cu((t=>{t.setTime(t-t.getMilliseconds())}),((t,e)=>{t.setTime(+t+e*Du)}),((t,e)=>(e-t)/Du),(t=>t.getUTCSeconds()));Bu.range;const Hu=Cu((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Du)}),((t,e)=>{t.setTime(+t+e*Lu)}),((t,e)=>(e-t)/Lu),(t=>t.getMinutes()));Hu.range;const $u=Cu((t=>{t.setUTCSeconds(0,0)}),((t,e)=>{t.setTime(+t+e*Lu)}),((t,e)=>(e-t)/Lu),(t=>t.getUTCMinutes()));$u.range;const Fu=Cu((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Du-t.getMinutes()*Lu)}),((t,e)=>{t.setTime(+t+e*Ru)}),((t,e)=>(e-t)/Ru),(t=>t.getHours()));Fu.range;const zu=Cu((t=>{t.setUTCMinutes(0,0,0)}),((t,e)=>{t.setTime(+t+e*Ru)}),((t,e)=>(e-t)/Ru),(t=>t.getUTCHours()));zu.range;const ju=Cu((t=>t.setHours(0,0,0,0)),((t,e)=>t.setDate(t.getDate()+e)),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Lu)/Iu),(t=>t.getDate()-1));ju.range;const Vu=Cu((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/Iu),(t=>t.getUTCDate()-1));Vu.range;const Gu=Cu((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/Iu),(t=>Math.floor(t/Iu)));function Wu(t){return Cu((e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),((t,e)=>{t.setDate(t.getDate()+7*e)}),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Lu)/Pu))}Gu.range;const Yu=Wu(0),Zu=Wu(1),qu=Wu(2),Xu=Wu(3),Ku=Wu(4),Qu=Wu(5),Ju=Wu(6);function th(t){return Cu((e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+7*e)}),((t,e)=>(e-t)/Pu))}Yu.range,Zu.range,qu.range,Xu.range,Ku.range,Qu.range,Ju.range;const eh=th(0),nh=th(1),ih=th(2),rh=th(3),oh=th(4),sh=th(5),ah=th(6);eh.range,nh.range,ih.range,rh.range,oh.range,sh.range,ah.range;const lh=Cu((t=>{t.setDate(1),t.setHours(0,0,0,0)}),((t,e)=>{t.setMonth(t.getMonth()+e)}),((t,e)=>e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())),(t=>t.getMonth()));lh.range;const ch=Cu((t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)}),((t,e)=>e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())),(t=>t.getUTCMonth()));ch.range;const uh=Cu((t=>{t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,e)=>{t.setFullYear(t.getFullYear()+e)}),((t,e)=>e.getFullYear()-t.getFullYear()),(t=>t.getFullYear()));uh.every=t=>isFinite(t=Math.floor(t))&&t>0?Cu((e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),((e,n)=>{e.setFullYear(e.getFullYear()+n*t)})):null,uh.range;const hh=Cu((t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)}),((t,e)=>e.getUTCFullYear()-t.getUTCFullYear()),(t=>t.getUTCFullYear()));hh.every=t=>isFinite(t=Math.floor(t))&&t>0?Cu((e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),((e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null,hh.range;const[dh,fh]=function(t,e,n,i,r,o){const s=[[Bu,1,Du],[Bu,5,5e3],[Bu,15,15e3],[Bu,30,3e4],[o,1,Lu],[o,5,5*Lu],[o,15,15*Lu],[o,30,30*Lu],[r,1,Ru],[r,3,3*Ru],[r,6,6*Ru],[r,12,12*Ru],[i,1,Iu],[i,2,2*Iu],[n,1,Pu],[e,1,Nu],[e,3,3*Nu],[t,1,Uu]];function a(e,n,i){const r=Math.abs(n-e)/i,o=or((([,,t])=>t)).right(s,r);if(o===s.length)return t.every(yr(e/Uu,n/Uu,i));if(0===o)return ku.every(Math.max(yr(e,n,i),1));const[a,l]=s[r/s[o-1][2]<s[o][2]/r?o-1:o];return a.every(l)}return[function(t,e,n){const i=e<t;i&&([t,e]=[e,t]);const r=n&&"function"==typeof n.range?n:a(t,e,n),o=r?r.range(t,+e+1):[];return i?o.reverse():o},a]}(uh,lh,Yu,ju,Fu,Hu);function ph(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function mh(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function gh(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}var vh,yh,_h={"-":"",_:" ",0:"0"},bh=/^\s*\d+/,wh=/^%/,xh=/[\\^$*+?|[\]().{}]/g;function Eh(t,e,n){var i=t<0?"-":"",r=(i?-t:t)+"",o=r.length;return i+(o<n?new Array(n-o+1).join(e)+r:r)}function Th(t){return t.replace(xh,"\\$&")}function Sh(t){return new RegExp("^(?:"+t.map(Th).join("|")+")","i")}function Oh(t){return new Map(t.map(((t,e)=>[t.toLowerCase(),e])))}function Mh(t,e,n){var i=bh.exec(e.slice(n,n+1));return i?(t.w=+i[0],n+i[0].length):-1}function Ah(t,e,n){var i=bh.exec(e.slice(n,n+1));return i?(t.u=+i[0],n+i[0].length):-1}function Ch(t,e,n){var i=bh.exec(e.slice(n,n+2));return i?(t.U=+i[0],n+i[0].length):-1}function kh(t,e,n){var i=bh.exec(e.slice(n,n+2));return i?(t.V=+i[0],n+i[0].length):-1}function Dh(t,e,n){var i=bh.exec(e.slice(n,n+2));return i?(t.W=+i[0],n+i[0].length):-1}function Lh(t,e,n){var i=bh.exec(e.slice(n,n+4));return i?(t.y=+i[0],n+i[0].length):-1}function Rh(t,e,n){var i=bh.exec(e.slice(n,n+2));return i?(t.y=+i[0]+(+i[0]>68?1900:2e3),n+i[0].length):-1}function Ih(t,e,n){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),n+i[0].length):-1}function Ph(t,e,n){var i=bh.exec(e.slice(n,n+1));return i?(t.q=3*i[0]-3,n+i[0].length):-1}function Nh(t,e,n){var i=bh.exec(e.slice(n,n+2));return i?(t.m=i[0]-1,n+i[0].length):-1}function Uh(t,e,n){var i=bh.exec(e.slice(n,n+2));return i?(t.d=+i[0],n+i[0].length):-1}function Bh(t,e,n){var i=bh.exec(e.slice(n,n+3));return i?(t.m=0,t.d=+i[0],n+i[0].length):-1}function Hh(t,e,n){var i=bh.exec(e.slice(n,n+2));return i?(t.H=+i[0],n+i[0].length):-1}function $h(t,e,n){var i=bh.exec(e.slice(n,n+2));return i?(t.M=+i[0],n+i[0].length):-1}function Fh(t,e,n){var i=bh.exec(e.slice(n,n+2));return i?(t.S=+i[0],n+i[0].length):-1}function zh(t,e,n){var i=bh.exec(e.slice(n,n+3));return i?(t.L=+i[0],n+i[0].length):-1}function jh(t,e,n){var i=bh.exec(e.slice(n,n+6));return i?(t.L=Math.floor(i[0]/1e3),n+i[0].length):-1}function Vh(t,e,n){var i=wh.exec(e.slice(n,n+1));return i?n+i[0].length:-1}function Gh(t,e,n){var i=bh.exec(e.slice(n));return i?(t.Q=+i[0],n+i[0].length):-1}function Wh(t,e,n){var i=bh.exec(e.slice(n));return i?(t.s=+i[0],n+i[0].length):-1}function Yh(t,e){return Eh(t.getDate(),e,2)}function Zh(t,e){return Eh(t.getHours(),e,2)}function qh(t,e){return Eh(t.getHours()%12||12,e,2)}function Xh(t,e){return Eh(1+ju.count(uh(t),t),e,3)}function Kh(t,e){return Eh(t.getMilliseconds(),e,3)}function Qh(t,e){return Kh(t,e)+"000"}function Jh(t,e){return Eh(t.getMonth()+1,e,2)}function td(t,e){return Eh(t.getMinutes(),e,2)}function ed(t,e){return Eh(t.getSeconds(),e,2)}function nd(t){var e=t.getDay();return 0===e?7:e}function id(t,e){return Eh(Yu.count(uh(t)-1,t),e,2)}function rd(t){var e=t.getDay();return e>=4||0===e?Ku(t):Ku.ceil(t)}function od(t,e){return t=rd(t),Eh(Ku.count(uh(t),t)+(4===uh(t).getDay()),e,2)}function sd(t){return t.getDay()}function ad(t,e){return Eh(Zu.count(uh(t)-1,t),e,2)}function ld(t,e){return Eh(t.getFullYear()%100,e,2)}function cd(t,e){return Eh((t=rd(t)).getFullYear()%100,e,2)}function ud(t,e){return Eh(t.getFullYear()%1e4,e,4)}function hd(t,e){var n=t.getDay();return Eh((t=n>=4||0===n?Ku(t):Ku.ceil(t)).getFullYear()%1e4,e,4)}function dd(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Eh(e/60|0,"0",2)+Eh(e%60,"0",2)}function fd(t,e){return Eh(t.getUTCDate(),e,2)}function pd(t,e){return Eh(t.getUTCHours(),e,2)}function md(t,e){return Eh(t.getUTCHours()%12||12,e,2)}function gd(t,e){return Eh(1+Vu.count(hh(t),t),e,3)}function vd(t,e){return Eh(t.getUTCMilliseconds(),e,3)}function yd(t,e){return vd(t,e)+"000"}function _d(t,e){return Eh(t.getUTCMonth()+1,e,2)}function bd(t,e){return Eh(t.getUTCMinutes(),e,2)}function wd(t,e){return Eh(t.getUTCSeconds(),e,2)}function xd(t){var e=t.getUTCDay();return 0===e?7:e}function Ed(t,e){return Eh(eh.count(hh(t)-1,t),e,2)}function Td(t){var e=t.getUTCDay();return e>=4||0===e?oh(t):oh.ceil(t)}function Sd(t,e){return t=Td(t),Eh(oh.count(hh(t),t)+(4===hh(t).getUTCDay()),e,2)}function Od(t){return t.getUTCDay()}function Md(t,e){return Eh(nh.count(hh(t)-1,t),e,2)}function Ad(t,e){return Eh(t.getUTCFullYear()%100,e,2)}function Cd(t,e){return Eh((t=Td(t)).getUTCFullYear()%100,e,2)}function kd(t,e){return Eh(t.getUTCFullYear()%1e4,e,4)}function Dd(t,e){var n=t.getUTCDay();return Eh((t=n>=4||0===n?oh(t):oh.ceil(t)).getUTCFullYear()%1e4,e,4)}function Ld(){return"+0000"}function Rd(){return"%"}function Id(t){return+t}function Pd(t){return Math.floor(+t/1e3)}function Nd(t){return new Date(t)}function Ud(t){return t instanceof Date?+t:+new Date(+t)}function Bd(t,e,n,i,r,o,s,a,l,c){var u=ol(),h=u.invert,d=u.domain,f=c(".%L"),p=c(":%S"),m=c("%I:%M"),g=c("%I %p"),v=c("%a %d"),y=c("%b %d"),_=c("%B"),b=c("%Y");function w(t){return(l(t)<t?f:a(t)<t?p:s(t)<t?m:o(t)<t?g:i(t)<t?r(t)<t?v:y:n(t)<t?_:b)(t)}return u.invert=function(t){return new Date(h(t))},u.domain=function(t){return arguments.length?d(Array.from(t,Ud)):d().map(Nd)},u.ticks=function(e){var n=d();return t(n[0],n[n.length-1],e??10)},u.tickFormat=function(t,e){return null==e?w:c(e)},u.nice=function(t){var n=d();return(!t||"function"!=typeof t.range)&&(t=e(n[0],n[n.length-1],t??10)),t?d(Ou(n,t)):u},u.copy=function(){return il(u,Bd(t,e,n,i,r,o,s,a,l,c))},u}function Hd(){return Za.apply(Bd(dh,fh,uh,lh,Yu,ju,Fu,Hu,Bu,yh).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}vh=function(t){var e=t.dateTime,n=t.date,i=t.time,r=t.periods,o=t.days,s=t.shortDays,a=t.months,l=t.shortMonths,c=Sh(r),u=Oh(r),h=Sh(o),d=Oh(o),f=Sh(s),p=Oh(s),m=Sh(a),g=Oh(a),v=Sh(l),y=Oh(l),_={a:function(t){return s[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return l[t.getMonth()]},B:function(t){return a[t.getMonth()]},c:null,d:Yh,e:Yh,f:Qh,g:cd,G:hd,H:Zh,I:qh,j:Xh,L:Kh,m:Jh,M:td,p:function(t){return r[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Id,s:Pd,S:ed,u:nd,U:id,V:od,w:sd,W:ad,x:null,X:null,y:ld,Y:ud,Z:dd,"%":Rd},b={a:function(t){return s[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return l[t.getUTCMonth()]},B:function(t){return a[t.getUTCMonth()]},c:null,d:fd,e:fd,f:yd,g:Cd,G:Dd,H:pd,I:md,j:gd,L:vd,m:_d,M:bd,p:function(t){return r[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Id,s:Pd,S:wd,u:xd,U:Ed,V:Sd,w:Od,W:Md,x:null,X:null,y:Ad,Y:kd,Z:Ld,"%":Rd},w={a:function(t,e,n){var i=f.exec(e.slice(n));return i?(t.w=p.get(i[0].toLowerCase()),n+i[0].length):-1},A:function(t,e,n){var i=h.exec(e.slice(n));return i?(t.w=d.get(i[0].toLowerCase()),n+i[0].length):-1},b:function(t,e,n){var i=v.exec(e.slice(n));return i?(t.m=y.get(i[0].toLowerCase()),n+i[0].length):-1},B:function(t,e,n){var i=m.exec(e.slice(n));return i?(t.m=g.get(i[0].toLowerCase()),n+i[0].length):-1},c:function(t,n,i){return T(t,e,n,i)},d:Uh,e:Uh,f:jh,g:Rh,G:Lh,H:Hh,I:Hh,j:Bh,L:zh,m:Nh,M:$h,p:function(t,e,n){var i=c.exec(e.slice(n));return i?(t.p=u.get(i[0].toLowerCase()),n+i[0].length):-1},q:Ph,Q:Gh,s:Wh,S:Fh,u:Ah,U:Ch,V:kh,w:Mh,W:Dh,x:function(t,e,i){return T(t,n,e,i)},X:function(t,e,n){return T(t,i,e,n)},y:Rh,Y:Lh,Z:Ih,"%":Vh};function x(t,e){return function(n){var i,r,o,s=[],a=-1,l=0,c=t.length;for(n instanceof Date||(n=new Date(+n));++a<c;)37===t.charCodeAt(a)&&(s.push(t.slice(l,a)),null!=(r=_h[i=t.charAt(++a)])?i=t.charAt(++a):r="e"===i?" ":"0",(o=e[i])&&(i=o(n,r)),s.push(i),l=a+1);return s.push(t.slice(l,a)),s.join("")}}function E(t,e){return function(n){var i,r,o=gh(1900,void 0,1);if(T(o,t,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(e&&!("Z"in o)&&(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(r=(i=mh(gh(o.y,0,1))).getUTCDay(),i=r>4||0===r?nh.ceil(i):nh(i),i=Vu.offset(i,7*(o.V-1)),o.y=i.getUTCFullYear(),o.m=i.getUTCMonth(),o.d=i.getUTCDate()+(o.w+6)%7):(r=(i=ph(gh(o.y,0,1))).getDay(),i=r>4||0===r?Zu.ceil(i):Zu(i),i=ju.offset(i,7*(o.V-1)),o.y=i.getFullYear(),o.m=i.getMonth(),o.d=i.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),r="Z"in o?mh(gh(o.y,0,1)).getUTCDay():ph(gh(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(r+5)%7:o.w+7*o.U-(r+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,mh(o)):ph(o)}}function T(t,e,n,i){for(var r,o,s=0,a=e.length,l=n.length;s<a;){if(i>=l)return-1;if(37===(r=e.charCodeAt(s++))){if(r=e.charAt(s++),!(o=w[r in _h?e.charAt(s++):r])||(i=o(t,n,i))<0)return-1}else if(r!=n.charCodeAt(i++))return-1}return i}return _.x=x(n,_),_.X=x(i,_),_.c=x(e,_),b.x=x(n,b),b.X=x(i,b),b.c=x(e,b),{format:function(t){var e=x(t+="",_);return e.toString=function(){return t},e},parse:function(t){var e=E(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=x(t+="",b);return e.toString=function(){return t},e},utcParse:function(t){var e=E(t+="",!0);return e.toString=function(){return t},e}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),yh=vh.format,vh.parse,vh.utcFormat,vh.utcParse;const $d=Math.abs,Fd=Math.atan2,zd=Math.cos,jd=Math.max,Vd=Math.min,Gd=Math.sin,Wd=Math.sqrt,Yd=1e-12,Zd=Math.PI,qd=Zd/2,Xd=2*Zd;function Kd(t){return t>=1?qd:t<=-1?-qd:Math.asin(t)}function Qd(t){this._context=t}function Jd(t){return new Qd(t)}function tf(){}function ef(t){this._context=t}function nf(t){return new ef(t)}Qd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}},ef.prototype={areaStart:tf,areaEnd:tf,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};const rf=(()=>{let t=0;return()=>(t+=1,`u${`0000${(Math.random()*36**4|0).toString(36)}`.slice(-4)}${t}`)})();function of(t){const e=[];for(let n=0,i=t.length;n<i;n++)e.push(t[n]);return e}function sf(t,e){const n=(t.ownerDocument.defaultView||window).getComputedStyle(t).getPropertyValue(e);return n?parseFloat(n.replace("px","")):0}function af(t,e={}){const n=e.width||function(t){const e=sf(t,"border-left-width"),n=sf(t,"border-right-width");return t.clientWidth+e+n}(t),i=e.height||function(t){const e=sf(t,"border-top-width"),n=sf(t,"border-bottom-width");return t.clientHeight+e+n}(t);return{width:n,height:i}}const lf=16384;function cf(t){return new Promise(((e,n)=>{const i=new Image;i.decode=()=>e(i),i.onload=()=>e(i),i.onerror=n,i.crossOrigin="anonymous",i.decoding="async",i.src=t}))}const uf=(t,e)=>{if(t instanceof e)return!0;const n=Object.getPrototypeOf(t);return null!==n&&(n.constructor.name===e.name||uf(n,e))};function hf(t,e,n){const i=window.getComputedStyle(t,n),r=i.getPropertyValue("content");if(""===r||"none"===r)return;const o=rf();try{e.className=`${e.className} ${o}`}catch{return}const s=document.createElement("style");s.appendChild(function(t,e,n){const i=`.${t}:${e}`,r=n.cssText?function(t){const e=t.getPropertyValue("content");return`${t.cssText} content: '${e.replace(/'|"/g,"")}';`}(n):function(t){return of(t).map((e=>`${e}: ${t.getPropertyValue(e)}${t.getPropertyPriority(e)?" !important":""};`)).join(" ")}(n);return document.createTextNode(`${i}{${r}}`)}(o,n,i)),e.appendChild(s)}const df="application/font-woff",ff="image/jpeg",pf={woff:df,woff2:df,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:ff,jpeg:ff,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function mf(t){const e=function(t){const e=/\.([^./]*?)$/g.exec(t);return e?e[1]:""}(t).toLowerCase();return pf[e]||""}function gf(t){return-1!==t.search(/^(data:)/)}async function vf(t,e,n){const i=await fetch(t,e);if(404===i.status)throw new Error(`Resource "${i.url}" not found`);const r=await i.blob();return new Promise(((t,e)=>{const o=new FileReader;o.onerror=e,o.onloadend=()=>{try{t(n({res:i,result:o.result}))}catch(t){e(t)}},o.readAsDataURL(r)}))}const yf={};async function _f(t,e,n){const i=function(t,e,n){let i=t.replace(/\?.*/,"");return n&&(i=t),/ttf|otf|eot|woff2?/i.test(i)&&(i=i.replace(/.*\//,"")),e?`[${e}]${i}`:i}(t,e,n.includeQueryParams);if(null!=yf[i])return yf[i];let r;n.cacheBust&&(t+=(/\?/.test(t)?"&":"?")+(new Date).getTime());try{const i=await vf(t,n.fetchRequestInit,(({res:t,result:n})=>(e||(e=t.headers.get("Content-Type")||""),function(t){return t.split(/,/)[1]}(n))));r=function(t,e){return`data:${e};base64,${t}`}(i,e)}catch(e){r=n.imagePlaceholder||"";let i=`Failed to fetch resource: ${t}`;e&&(i="string"==typeof e?e:e.message),i&&console.warn(i)}return yf[i]=r,r}const bf=t=>null!=t.tagName&&"SLOT"===t.tagName.toUpperCase();async function wf(t,e,n){return n||!e.filter||e.filter(t)?Promise.resolve(t).then((t=>async function(t,e){return uf(t,HTMLCanvasElement)?async function(t){const e=t.toDataURL();return"data:,"===e?t.cloneNode(!1):cf(e)}(t):uf(t,HTMLVideoElement)?async function(t,e){if(t.currentSrc){const e=document.createElement("canvas"),n=e.getContext("2d");return e.width=t.clientWidth,e.height=t.clientHeight,null==n||n.drawImage(t,0,0,e.width,e.height),cf(e.toDataURL())}const n=t.poster,i=mf(n);return cf(await _f(n,i,e))}(t,e):uf(t,HTMLIFrameElement)?async function(t){var e;try{if(null!==(e=null==t?void 0:t.contentDocument)&&void 0!==e&&e.body)return await wf(t.contentDocument.body,{},!0)}catch{}return t.cloneNode(!1)}(t):t.cloneNode(!1)}(t,e))).then((n=>async function(t,e,n){var i,r;let o=[];return o=bf(t)&&t.assignedNodes?of(t.assignedNodes()):uf(t,HTMLIFrameElement)&&null!==(i=t.contentDocument)&&void 0!==i&&i.body?of(t.contentDocument.body.childNodes):of((null!==(r=t.shadowRoot)&&void 0!==r?r:t).childNodes),0===o.length||uf(t,HTMLVideoElement)||await o.reduce(((t,i)=>t.then((()=>wf(i,n))).then((t=>{t&&e.appendChild(t)}))),Promise.resolve()),e}(t,n,e))).then((e=>function(t,e){return uf(e,Element)&&(function(t,e){const n=e.style;if(!n)return;const i=window.getComputedStyle(t);i.cssText?(n.cssText=i.cssText,n.transformOrigin=i.transformOrigin):of(i).forEach((r=>{let o=i.getPropertyValue(r);"font-size"===r&&o.endsWith("px")&&(o=Math.floor(parseFloat(o.substring(0,o.length-2)))-.1+"px"),uf(t,HTMLIFrameElement)&&"display"===r&&"inline"===o&&(o="block"),"d"===r&&e.getAttribute("d")&&(o=`path(${e.getAttribute("d")})`),n.setProperty(r,o,i.getPropertyPriority(r))}))}(t,e),function(t,e){hf(t,e,":before"),hf(t,e,":after")}(t,e),function(t,e){uf(t,HTMLTextAreaElement)&&(e.innerHTML=t.value),uf(t,HTMLInputElement)&&e.setAttribute("value",t.value)}(t,e),function(t,e){if(uf(t,HTMLSelectElement)){const n=e,i=Array.from(n.children).find((e=>t.value===e.getAttribute("value")));i&&i.setAttribute("selected","")}}(t,e)),e}(t,e))).then((t=>async function(t,e){const n=t.querySelectorAll?t.querySelectorAll("use"):[];if(0===n.length)return t;const i={};for(let r=0;r<n.length;r++){const o=n[r].getAttribute("xlink:href");if(o){const n=t.querySelector(o),r=document.querySelector(o);!n&&r&&!i[o]&&(i[o]=await wf(r,e,!0))}}const r=Object.values(i);if(r.length){const e="http://www.w3.org/1999/xhtml",n=document.createElementNS(e,"svg");n.setAttribute("xmlns",e),n.style.position="absolute",n.style.width="0",n.style.height="0",n.style.overflow="hidden",n.style.display="none";const i=document.createElementNS(e,"defs");n.appendChild(i);for(let t=0;t<r.length;t++)i.appendChild(r[t]);t.appendChild(n)}return t}(t,e))):null}const xf=/url\((['"]?)([^'"]+?)\1\)/g,Ef=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,Tf=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function Sf(t){return-1!==t.search(xf)}async function Of(t,e,n){if(!Sf(t))return t;const i=function(t,{preferredFontFormat:e}){return e?t.replace(Tf,(t=>{for(;;){const[n,,i]=Ef.exec(t)||[];if(!i)return"";if(i===e)return`src: ${n};`}})):t}(t,n);return function(t){const e=[];return t.replace(xf,((t,n,i)=>(e.push(i),t))),e.filter((t=>!gf(t)))}(i).reduce(((t,i)=>t.then((t=>async function(t,e,n,i,r){try{const o=n?function(t,e){if(t.match(/^[a-z]+:\/\//i))return t;if(t.match(/^\/\//))return window.location.protocol+t;if(t.match(/^[a-z]+:/i))return t;const n=document.implementation.createHTMLDocument(),i=n.createElement("base"),r=n.createElement("a");return n.head.appendChild(i),n.body.appendChild(r),e&&(i.href=e),r.href=t,r.href}(e,n):e,s=mf(e);let a;return r||(a=await _f(o,s,i)),t.replace(function(t){const e=t.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${e})(['"]?\\))`,"g")}(e),`$1${a}$3`)}catch{}return t}(t,i,e,n)))),Promise.resolve(i))}async function Mf(t,e,n){var i;const r=null===(i=e.style)||void 0===i?void 0:i.getPropertyValue(t);if(r){const i=await Of(r,null,n);return e.style.setProperty(t,i,e.style.getPropertyPriority(t)),!0}return!1}async function Af(t,e){uf(t,Element)&&(await async function(t,e){await Mf("background",t,e)||await Mf("background-image",t,e),await Mf("mask",t,e)||await Mf("mask-image",t,e)}(t,e),await async function(t,e){const n=uf(t,HTMLImageElement);if((!n||gf(t.src))&&(!uf(t,SVGImageElement)||gf(t.href.baseVal)))return;const i=n?t.src:t.href.baseVal,r=await _f(i,mf(i),e);await new Promise(((e,i)=>{t.onload=e,t.onerror=i;const o=t;o.decode&&(o.decode=e),"lazy"===o.loading&&(o.loading="eager"),n?(t.srcset="",t.src=r):t.href.baseVal=r}))}(t,e),await async function(t,e){const n=of(t.childNodes).map((t=>Af(t,e)));await Promise.all(n).then((()=>t))}(t,e))}const Cf={};async function kf(t){let e=Cf[t];return null!=e||(e={url:t,cssText:await(await fetch(t)).text()},Cf[t]=e),e}async function Df(t,e){let n=t.cssText;const i=/url\(["']?([^"')]+)["']?\)/g,r=(n.match(/url\([^)]+\)/g)||[]).map((async r=>{let o=r.replace(i,"$1");return o.startsWith("https://")||(o=new URL(o,t.url).href),vf(o,e.fetchRequestInit,(({result:t})=>(n=n.replace(r,`url(${t})`),[r,t])))}));return Promise.all(r).then((()=>n))}function Lf(t){if(null==t)return[];const e=[];let n=t.replace(/(\/\*[\s\S]*?\*\/)/gi,"");const i=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const t=i.exec(n);if(null===t)break;e.push(t[0])}n=n.replace(i,"");const r=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,o=new RegExp("((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})","gi");for(;;){let t=r.exec(n);if(null===t){if(t=o.exec(n),null===t)break;r.lastIndex=o.lastIndex}else o.lastIndex=r.lastIndex;e.push(t[0])}return e}async function Rf(t,e){const n=null!=e.fontEmbedCSS?e.fontEmbedCSS:e.skipFonts?null:await async function(t,e){const n=await async function(t,e){if(null==t.ownerDocument)throw new Error("Provided element is not within a Document");const n=of(t.ownerDocument.styleSheets),i=await async function(t,e){const n=[],i=[];return t.forEach((n=>{if("cssRules"in n)try{of(n.cssRules||[]).forEach(((t,r)=>{if(t.type===CSSRule.IMPORT_RULE){let o=r+1;const s=kf(t.href).then((t=>Df(t,e))).then((t=>Lf(t).forEach((t=>{try{n.insertRule(t,t.startsWith("@import")?o+=1:n.cssRules.length)}catch(e){console.error("Error inserting rule from remote css",{rule:t,error:e})}})))).catch((t=>{console.error("Error loading remote css",t.toString())}));i.push(s)}}))}catch(r){const o=t.find((t=>null==t.href))||document.styleSheets[0];null!=n.href&&i.push(kf(n.href).then((t=>Df(t,e))).then((t=>Lf(t).forEach((t=>{o.insertRule(t,n.cssRules.length)})))).catch((t=>{console.error("Error loading remote stylesheet",t)}))),console.error("Error inlining remote css file",r)}})),Promise.all(i).then((()=>(t.forEach((t=>{if("cssRules"in t)try{of(t.cssRules||[]).forEach((t=>{n.push(t)}))}catch(e){console.error(`Error while reading CSS rules from ${t.href}`,e)}})),n)))}(n,e);return function(t){return t.filter((t=>t.type===CSSRule.FONT_FACE_RULE)).filter((t=>Sf(t.style.getPropertyValue("src"))))}(i)}(t,e);return(await Promise.all(n.map((t=>{const n=t.parentStyleSheet?t.parentStyleSheet.href:null;return Of(t.cssText,n,e)})))).join("\n")}(t,e);if(n){const e=document.createElement("style"),i=document.createTextNode(n);e.appendChild(i),t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}}async function If(t,e={}){const{width:n,height:i}=af(t,e),r=await wf(t,e,!0);return await Rf(r,e),await Af(r,e),function(t,e){const{style:n}=t;e.backgroundColor&&(n.backgroundColor=e.backgroundColor),e.width&&(n.width=`${e.width}px`),e.height&&(n.height=`${e.height}px`);const i=e.style;null!=i&&Object.keys(i).forEach((t=>{n[t]=i[t]}))}(r,e),await async function(t,e,n){const i="http://www.w3.org/2000/svg",r=document.createElementNS(i,"svg"),o=document.createElementNS(i,"foreignObject");return r.setAttribute("width",`${e}`),r.setAttribute("height",`${n}`),r.setAttribute("viewBox",`0 0 ${e} ${n}`),o.setAttribute("width","100%"),o.setAttribute("height","100%"),o.setAttribute("x","0"),o.setAttribute("y","0"),o.setAttribute("externalResourcesRequired","true"),r.appendChild(o),o.appendChild(t),async function(t){return Promise.resolve().then((()=>(new XMLSerializer).serializeToString(t))).then(encodeURIComponent).then((t=>`data:image/svg+xml;charset=utf-8,${t}`))}(r)}(r,n,i)}async function Pf(t,e={}){const{width:n,height:i}=af(t,e),r=await If(t,e),o=await cf(r),s=document.createElement("canvas"),a=s.getContext("2d"),l=e.pixelRatio||function(){let t,e;try{e=process}catch{}const n=e&&e.env?e.env.devicePixelRatio:null;return n&&(t=parseInt(n,10),Number.isNaN(t)&&(t=1)),t||window.devicePixelRatio||1}(),c=e.canvasWidth||n,u=e.canvasHeight||i;return s.width=c*l,s.height=u*l,e.skipAutoScale||function(t){(t.width>lf||t.height>lf)&&(t.width>lf&&t.height>lf?t.width>t.height?(t.height*=lf/t.width,t.width=lf):(t.width*=lf/t.height,t.height=lf):t.width>lf?(t.height*=lf/t.width,t.width=lf):(t.width*=lf/t.height,t.height=lf))}(s),s.style.width=`${c}`,s.style.height=`${u}`,e.backgroundColor&&(a.fillStyle=e.backgroundColor,a.fillRect(0,0,s.width,s.height)),a.drawImage(o,0,0,s.width,s.height),s}let Nf=class{constructor(t,e){this.model=t,this.services=e,this.init()}init(){}update(){}setModel(t){this.model=t}setServices(t){this.services=t}},Uf=class t extends Nf{constructor(t,e){super(t,e)}static getHTMLElementSize(t){return{width:t.clientWidth,height:t.clientHeight}}static getSVGElementSize(t,e={useAttrs:!1,useClientDimensions:!1,useBBox:!1,useBoundingRect:!1}){t.attr||(t=Tu(t));const n={width:0,height:0},i=t=>{t&&Object.keys(n).forEach((e=>{if(t[e]){const i=t[e],r=parseFloat(i);i&&r>n[e]&&-1===(""+i).indexOf("%")&&(n[e]=r)}}))},r={width:t.attr("width"),height:t.attr("height")},o=t.node();let s,a,l,c,u;try{"function"==typeof o.getBBox&&(s=o.getBBox(),a={width:s.width,height:s.height})}catch(t){console.error(t)}try{"function"==typeof(null==o?void 0:o.getBoundingClientRect)&&(l=o.getBoundingClientRect(),c={width:l.width,height:l.height})}catch(t){console.error(t)}if(o instanceof SVGSVGElement&&(u={width:o.clientWidth,height:o.clientHeight}),e){if(e.useAttrs&&(i(r),n.width>0&&n.height>0))return n;if(e.useClientDimensions&&(i(u),n.width>0&&n.height>0))return u;if(e.useBBox&&(i(a),n.width>0&&n.height>0))return a;if(e.useBoundingRect&&(i(c),n.width>0&&n.height>0))return c}try{i({width:dc(t.node(),"width","baseVal","value"),height:dc(t.node(),"height","baseVal","value")})}catch{i(u),i(a),i(r)}return n}static appendOrSelect(t,e){const n=t.select(`${e}`);if(n.empty()){let n,i,r=e.split("#");return 2===r.length?(n=r[0],r=r[1].split("."),i=r[0]):(r=e.split("."),n=r[0]),t.append(n).attr("id",i).attr("class",r.slice(1).join(" "))}return n}init(){this.initializeID(),this.styleHolderElement(),this.addMainContainer(),this.model.getOptions().resizable&&this.addResizeListener(),this.addHolderListeners(),this.handleFullscreenChange()}getChartID(){return this.chartID}getElementOffset(t,e=!1){const n={left:0,top:0},i=t.getBoundingClientRect(),r=e?{left:0,top:0}:this.getHolder().getBoundingClientRect();try{n.left=i.left-r.left,n.top=i.top-r.top}catch(t){console.error(t)}return n}generateElementIDString(t){return`chart-${this.chartID}-${t}`}initializeID(){this.chartID=Math.floor(281474976710656*(1+Math.random())).toString(16)}addMainContainer(){const t=this.model.getOptions(),e=dc(t,"style","prefix"),n=Tu(this.getHolder()).append("div").classed(`${cl}--${e}--chart-wrapper`,!0).attr("id",`chart-${this.getChartID()}`).style("height","100%").style("width","100%");n.append("g").attr("class","DONT_STYLE_ME_css_styles_verifier"),this.mainContainer=n.node()}update(){this.styleHolderElement()}styleHolderElement(){const t=this.getHolder(),{width:e,height:n,theme:i}=this.model.getOptions();e!==this.width&&(t.style.width=e,this.width=e),n!==this.height&&(t.style.height=n,this.height=n),Tu(this.getHolder()).classed(`${cl}--chart-holder`,!0).attr("data-carbon-theme",i)}getHolder(){return this.model.get("holder")}exportToJPG(){const t=this,e=this.model.getOptions(),n=Tu(this.getHolder());n.classed("filled",!0),async function(t,e={}){return(await Pf(t,e)).toDataURL("image/jpeg",e.quality||1)}(this.getMainContainer(),{quality:1,filter:t=>!(t.classList&&t.classList.contains("cds--cc--toolbar"))}).then((function(i){var r;let o="myChart";const s=dc(e,"fileDownload","fileName");"function"==typeof s?o=s("jpg"):"string"==typeof s&&(o=s),null==(r=t.services.files)||r.downloadImage(i,`${o}.jpg`),n.classed("filled",!1)}))}exportToPNG(){const t=this,e=this.model.getOptions(),n=Tu(this.getHolder());n.classed("filled",!0),async function(t,e={}){return(await Pf(t,e)).toDataURL()}(this.getMainContainer(),{quality:1,filter:t=>!(t.classList&&t.classList.contains("cds--cc--toolbar"))}).then((function(i){var r;let o="myChart";const s=dc(e,"fileDownload","fileName");"function"==typeof s?o=s("png"):"string"==typeof s&&(o=s),null==(r=t.services.files)||r.downloadImage(i,`${o}.png`),n.classed("filled",!1)})).catch((function(t){console.error("oops, something went wrong!",t)}))}isFullScreenMode(){return Tu(this.getHolder()).classed("fullscreen")}toggleFullscreen(){const t=this.getHolder();Tu(t).classed("fullscreen")&&(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)?document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen():t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.msRequestFullscreen&&t.msRequestFullscreen()}handleFullscreenChange(){document.addEventListener("fullscreenchange",(()=>{const t=Tu(this.getHolder()),e=t.classed("fullscreen");t.classed("fullscreen",!e)}))}setSVGMaxHeight(){if(!this.model.getOptions().height){const{height:e}=t.getSVGElementSize(Tu(this.mainContainer),{useBBox:!0}),n=Tu(this.mainContainer).attr("class"),i=Tu(this.mainContainer).selectAll(`.${n} > svg`);let r=0;i.nodes().forEach((function(e){r+=Number(t.getSVGElementSize(Tu(e),{useBBox:!0}).height)})),r<=e?Tu(this.mainContainer).attr("height",r):Tu(this.mainContainer).attr("height","100%")}}getMainContainer(){return this.mainContainer}addHolderListeners(){const t=this.getHolder();t&&Tu(t).on("mouseover",(()=>{var t;null==(t=this.services.events)||t.dispatchEvent(R.Chart.MOUSEOVER)})).on("mouseout",(()=>{var t;null==(t=this.services.events)||t.dispatchEvent(R.Chart.MOUSEOUT)}))}addResizeListener(){const t=this.getHolder();if(!t)return;let e=t.clientWidth,n=t.clientHeight;const i=function(t,e,n){var i,r,o,s,a,l,c=0,u=!1,h=!1,d=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function f(e){var n=i,o=r;return i=r=void 0,c=e,s=t.apply(o,n)}function p(t){var n=t-l;return void 0===l||n>=e||n<0||h&&t-c>=o}function m(){var t=wu();if(p(t))return g(t);a=setTimeout(m,function(t){var n=e-(t-l);return h?Eu(n,o-(t-c)):n}(t))}function g(t){return a=void 0,d&&i?f(t):(i=r=void 0,s)}function v(){var t=wu(),n=p(t);if(i=arguments,r=this,l=t,n){if(void 0===a)return function(t){return c=t,a=setTimeout(m,e),u?f(t):s}(l);if(h)return clearTimeout(a),a=setTimeout(m,e),f(l)}return void 0===a&&(a=setTimeout(m,e)),s}return e=bu(e)||0,zt(n)&&(u=!!n.leading,o=(h="maxWait"in n)?xu(bu(n.maxWait)||0,e):o,d="trailing"in n?!!n.trailing:d),v.cancel=function(){void 0!==a&&clearTimeout(a),c=0,i=l=r=a=void 0},v.flush=function(){return void 0===a?s:g(wu())},v}((()=>{var i;t&&(Math.abs(e-t.clientWidth)>1||Math.abs(n-t.clientHeight)>1)&&(e=t.clientWidth,n=t.clientHeight,null==(i=this.services.events)||i.dispatchEvent(R.Chart.RESIZE))}),12.5);new ResizeObserver(i).observe(t)}},Bf=class t extends Nf{static appendOrUpdateLinearGradient(t){let e=t.svg.select(`defs linearGradient#${t.id}`);e.empty()&&(e=t.svg.append("defs").append("linearGradient").attr("id",t.id).attr("x1",t.x1).attr("x2",t.x2).attr("y1",t.y1).attr("y2",t.y2)),e.selectAll("stop").remove(),e.selectAll("stop").data(t.stops).enter().append("stop").attr("offset",(t=>t.offset)).style("stop-color",(t=>t.color)).style("stop-opacity",(t=>t.opacity))}static getOffsetRatio(t){return(100*Math.abs(t[1])/Math.abs(t[0]-t[1])).toFixed(2)+"%"}static getStops(e,n){let i=[{offset:"0%",color:n,opacity:"0.6"},{offset:"80%",color:n,opacity:"0"}];return e[0]<0&&e[1]>0&&(i=[{offset:"0%",color:n,opacity:"0.6"},{offset:t.getOffsetRatio(e),color:n,opacity:"0"},{offset:"100%",color:n,opacity:"0.6"}]),i}};var Hf=function(t){return function(e){return null==t?void 0:t[e]}}({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),$f=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ff=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g"),zf=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,jf=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Vf="\\ud800-\\udfff",Gf="\\u2700-\\u27bf",Wf="a-z\\xdf-\\xf6\\xf8-\\xff",Yf="A-Z\\xc0-\\xd6\\xd8-\\xde",Zf="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",qf="["+Zf+"]",Xf="\\d+",Kf="["+Gf+"]",Qf="["+Wf+"]",Jf="[^"+Vf+Zf+Xf+Gf+Wf+Yf+"]",tp="(?:\\ud83c[\\udde6-\\uddff]){2}",ep="[\\ud800-\\udbff][\\udc00-\\udfff]",np="["+Yf+"]",ip="(?:"+Qf+"|"+Jf+")",rp="(?:"+np+"|"+Jf+")",op="(?:['’](?:d|ll|m|re|s|t|ve))?",sp="(?:['’](?:D|LL|M|RE|S|T|VE))?",ap="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",lp="[\\ufe0e\\ufe0f]?",cp=lp+ap+"(?:\\u200d(?:"+["[^"+Vf+"]",tp,ep].join("|")+")"+lp+ap+")*",up="(?:"+[Kf,tp,ep].join("|")+")"+cp,hp=RegExp([np+"?"+Qf+"+"+op+"(?="+[qf,np,"$"].join("|")+")",rp+"+"+sp+"(?="+[qf,np+ip,"$"].join("|")+")",np+"?"+ip+"+"+op,np+"+"+sp,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Xf,up].join("|"),"g");var dp=RegExp("['’]","g");function fp(t){return function(e){return function(t,e,n){for(var i=-1,r=null==t?0:t.length;++i<r;)n=e(n,t[i],i,t);return n}(function(t,e){return t=_n(t),void 0===e?function(t){return jf.test(t)}(t)?function(t){return t.match(hp)||[]}(t):function(t){return t.match(zf)||[]}(t):t.match(e)||[]}(function(t){return(t=_n(t))&&t.replace($f,Hf).replace(Ff,"")}(e).replace(dp,"")),t,"")}}function pp(t,e){var n;return qc(t,(function(t,i,r){return!(n=e(t,i,r))})),!!n}function mp(t,e,n){return(Bt(t)?Ai:pp)(t,Vi(e))}xe((function(t,e,n){return function(t,e,n){if("function"!=typeof t)throw new TypeError("Expected a function");return setTimeout((function(){t.apply(void 0,n)}),e)}(t,bu(e)||0,n)})),fp((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}));class gp{constructor(){this._partials=new Float64Array(32),this._n=0}add(t){const e=this._partials;let n=0;for(let i=0;i<this._n&&i<32;i++){const r=e[i],o=t+r,s=Math.abs(t)<Math.abs(r)?t-(o-r):r-(o-t);s&&(e[n++]=s),t=o}return e[n]=t,this._n=n+1,this}valueOf(){const t=this._partials;let e,n,i,r=this._n,o=0;if(r>0){for(o=t[--r];r>0&&(e=o,n=t[--r],o=e+n,i=n-(o-e),!i););r>0&&(i<0&&t[r-1]<0||i>0&&t[r-1]>0)&&(n=2*i,e=o+n,n==e-o&&(o=e))}return o}}function vp(t){return t}var yp=1e-6;function _p(t){return"translate("+t+",0)"}function bp(t){return"translate(0,"+t+")"}function wp(t){return e=>+t(e)}function xp(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function Ep(){return!this.__axis}function Tp(t,e){var n=[],i=null,r=null,o=6,s=6,a=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,c=1===t||4===t?-1:1,u=4===t||2===t?"x":"y",h=1===t||3===t?_p:bp;function d(d){var f=i??(e.ticks?e.ticks.apply(e,n):e.domain()),p=r??(e.tickFormat?e.tickFormat.apply(e,n):vp),m=Math.max(o,0)+a,g=e.range(),v=+g[0]+l,y=+g[g.length-1]+l,_=(e.bandwidth?xp:wp)(e.copy(),l),b=d.selection?d.selection():d,w=b.selectAll(".domain").data([null]),x=b.selectAll(".tick").data(f,e).order(),E=x.exit(),T=x.enter().append("g").attr("class","tick"),S=x.select("line"),O=x.select("text");w=w.merge(w.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),x=x.merge(T),S=S.merge(T.append("line").attr("stroke","currentColor").attr(u+"2",c*o)),O=O.merge(T.append("text").attr("fill","currentColor").attr(u,c*m).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),d!==b&&(w=w.transition(d),x=x.transition(d),S=S.transition(d),O=O.transition(d),E=E.transition(d).attr("opacity",yp).attr("transform",(function(t){return isFinite(t=_(t))?h(t+l):this.getAttribute("transform")})),T.attr("opacity",yp).attr("transform",(function(t){var e=this.parentNode.__axis;return h((e&&isFinite(e=e(t))?e:_(t))+l)}))),E.remove(),w.attr("d",4===t||2===t?s?"M"+c*s+","+v+"H"+l+"V"+y+"H"+c*s:"M"+l+","+v+"V"+y:s?"M"+v+","+c*s+"V"+l+"H"+y+"V"+c*s:"M"+v+","+l+"H"+y),x.attr("opacity",1).attr("transform",(function(t){return h(_(t)+l)})),S.attr(u+"2",c*o),O.attr(u,c*m).text(p),b.filter(Ep).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),b.each((function(){this.__axis=_}))}return d.scale=function(t){return arguments.length?(e=t,d):e},d.ticks=function(){return n=Array.from(arguments),d},d.tickArguments=function(t){return arguments.length?(n=null==t?[]:Array.from(t),d):n.slice()},d.tickValues=function(t){return arguments.length?(i=null==t?null:Array.from(t),d):i&&i.slice()},d.tickFormat=function(t){return arguments.length?(r=t,d):r},d.tickSize=function(t){return arguments.length?(o=s=+t,d):o},d.tickSizeInner=function(t){return arguments.length?(o=+t,d):o},d.tickSizeOuter=function(t){return arguments.length?(s=+t,d):s},d.tickPadding=function(t){return arguments.length?(a=+t,d):a},d.offset=function(t){return arguments.length?(l=+t,d):l},d}function Sp(t){return Tp(1,t)}function Op(t){return Tp(2,t)}function Mp(t){return Tp(3,t)}function Ap(t){return Tp(4,t)}const Cp={capture:!0,passive:!1};function kp(t){t.preventDefault(),t.stopImmediatePropagation()}const Dp=t=>+t,Lp=t=>()=>t;function Rp(t,{sourceEvent:e,target:n,selection:i,mode:r,dispatch:o}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},selection:{value:i,enumerable:!0,configurable:!0},mode:{value:r,enumerable:!0,configurable:!0},_:{value:o}})}function Ip(t){t.preventDefault(),t.stopImmediatePropagation()}var Pp={name:"drag"},Np={name:"space"},Up={name:"handle"},Bp={name:"center"};const{abs:Hp,max:$p,min:Fp}=Math;function zp(t){return[+t[0],+t[1]]}function jp(t){return[zp(t[0]),zp(t[1])]}var Vp={name:"x",handles:["w","e"].map(Kp),input:function(t,e){return null==t?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},Gp={},Wp={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Yp={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},Zp={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},qp={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},Xp={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Kp(t){return{type:t}}function Qp(t){return!t.ctrlKey&&!t.button}function Jp(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function tm(){return navigator.maxTouchPoints||"ontouchstart"in this}function em(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function nm(){return function(t){var e,n=Jp,i=Qp,r=tm,o=!0,s=wr("start","brush","end"),a=6;function l(e){var n=e.property("__brush",m).selectAll(".overlay").data([Kp("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Wp.overlay).merge(n).each((function(){var t=em(this).extent;Tu(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])})),e.selectAll(".selection").data([Kp("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Wp.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var i=e.selectAll(".handle").data(t.handles,(function(t){return t.type}));i.exit().remove(),i.enter().append("rect").attr("class",(function(t){return"handle handle--"+t.type})).attr("cursor",(function(t){return Wp[t.type]})),e.each(c).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",d).filter(r).on("touchstart.brush",d).on("touchmove.brush",f).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function c(){var t=Tu(this),e=em(this).selection;e?(t.selectAll(".selection").style("display",null).attr("x",e[0][0]).attr("y",e[0][1]).attr("width",e[1][0]-e[0][0]).attr("height",e[1][1]-e[0][1]),t.selectAll(".handle").style("display",null).attr("x",(function(t){return"e"===t.type[t.type.length-1]?e[1][0]-a/2:e[0][0]-a/2})).attr("y",(function(t){return"s"===t.type[0]?e[1][1]-a/2:e[0][1]-a/2})).attr("width",(function(t){return"n"===t.type||"s"===t.type?e[1][0]-e[0][0]+a:a})).attr("height",(function(t){return"e"===t.type||"w"===t.type?e[1][1]-e[0][1]+a:a}))):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function u(t,e,n){var i=t.__brush.emitter;return!i||n&&i.clean?new h(t,e,n):i}function h(t,e,n){this.that=t,this.args=e,this.state=t.__brush,this.active=0,this.clean=n}function d(n){if((!e||n.touches)&&i.apply(this,arguments)){var r,s,a,l,h,d,f,p,m,g,v,y=this,_=n.target.__data__.type,b="selection"===(o&&n.metaKey?_="overlay":_)?Pp:o&&n.altKey?Bp:Up,w=t===Gp?null:qp[_],x=t===Vp?null:Xp[_],E=em(y),T=E.extent,S=E.selection,O=T[0][0],M=T[0][1],A=T[1][0],C=T[1][1],k=0,D=0,L=w&&x&&o&&n.shiftKey,R=Array.from(n.touches||[n],(t=>{const e=t.identifier;return(t=Uo(t,y)).point0=t.slice(),t.identifier=e,t}));la(y);var I=u(y,arguments,!0).beforestart();if("overlay"===_){S&&(m=!0);const e=[R[0],R[1]||R[0]];E.selection=S=[[r=t===Gp?O:Fp(e[0][0],e[1][0]),a=t===Vp?M:Fp(e[0][1],e[1][1])],[h=t===Gp?A:$p(e[0][0],e[1][0]),f=t===Vp?C:$p(e[0][1],e[1][1])]],R.length>1&&H(n)}else r=S[0][0],a=S[0][1],h=S[1][0],f=S[1][1];s=r,l=a,d=h,p=f;var P=Tu(y).attr("pointer-events","none"),N=P.selectAll(".overlay").attr("cursor",Wp[_]);if(n.touches)I.moved=B,I.ended=$;else{var U=Tu(n.view).on("mousemove.brush",B,!0).on("mouseup.brush",$,!0);o&&U.on("keydown.brush",(function(t){switch(t.keyCode){case 16:L=w&&x;break;case 18:b===Up&&(w&&(h=d-k*w,r=s+k*w),x&&(f=p-D*x,a=l+D*x),b=Bp,H(t));break;case 32:(b===Up||b===Bp)&&(w<0?h=d-k:w>0&&(r=s-k),x<0?f=p-D:x>0&&(a=l-D),b=Np,N.attr("cursor",Wp.selection),H(t));break;default:return}Ip(t)}),!0).on("keyup.brush",(function(t){switch(t.keyCode){case 16:L&&(g=v=L=!1,H(t));break;case 18:b===Bp&&(w<0?h=d:w>0&&(r=s),x<0?f=p:x>0&&(a=l),b=Up,H(t));break;case 32:b===Np&&(t.altKey?(w&&(h=d-k*w,r=s+k*w),x&&(f=p-D*x,a=l+D*x),b=Bp):(w<0?h=d:w>0&&(r=s),x<0?f=p:x>0&&(a=l),b=Up),N.attr("cursor",Wp[_]),H(t));break;default:return}Ip(t)}),!0),function(t){var e=t.document.documentElement,n=Tu(t).on("dragstart.drag",kp,Cp);"onselectstart"in e?n.on("selectstart.drag",kp,Cp):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}(n.view)}c.call(y),I.start(n,b.name)}function B(t){for(const e of t.changedTouches||[t])for(const t of R)t.identifier===e.identifier&&(t.cur=Uo(e,y));if(L&&!g&&!v&&1===R.length){const t=R[0];Hp(t.cur[0]-t[0])>Hp(t.cur[1]-t[1])?v=!0:g=!0}for(const t of R)t.cur&&(t[0]=t.cur[0],t[1]=t.cur[1]);m=!0,Ip(t),H(t)}function H(t){const e=R[0],n=e.point0;var i;switch(k=e[0]-n[0],D=e[1]-n[1],b){case Np:case Pp:w&&(k=$p(O-r,Fp(A-h,k)),s=r+k,d=h+k),x&&(D=$p(M-a,Fp(C-f,D)),l=a+D,p=f+D);break;case Up:R[1]?(w&&(s=$p(O,Fp(A,R[0][0])),d=$p(O,Fp(A,R[1][0])),w=1),x&&(l=$p(M,Fp(C,R[0][1])),p=$p(M,Fp(C,R[1][1])),x=1)):(w<0?(k=$p(O-r,Fp(A-r,k)),s=r+k,d=h):w>0&&(k=$p(O-h,Fp(A-h,k)),s=r,d=h+k),x<0?(D=$p(M-a,Fp(C-a,D)),l=a+D,p=f):x>0&&(D=$p(M-f,Fp(C-f,D)),l=a,p=f+D));break;case Bp:w&&(s=$p(O,Fp(A,r-k*w)),d=$p(O,Fp(A,h+k*w))),x&&(l=$p(M,Fp(C,a-D*x)),p=$p(M,Fp(C,f+D*x)))}d<s&&(w*=-1,i=r,r=h,h=i,i=s,s=d,d=i,_ in Yp&&N.attr("cursor",Wp[_=Yp[_]])),p<l&&(x*=-1,i=a,a=f,f=i,i=l,l=p,p=i,_ in Zp&&N.attr("cursor",Wp[_=Zp[_]])),E.selection&&(S=E.selection),g&&(s=S[0][0],d=S[1][0]),v&&(l=S[0][1],p=S[1][1]),(S[0][0]!==s||S[0][1]!==l||S[1][0]!==d||S[1][1]!==p)&&(E.selection=[[s,l],[d,p]],c.call(y),I.brush(t,b.name))}function $(t){if(function(t){t.stopImmediatePropagation()}(t),t.touches){if(t.touches.length)return;e&&clearTimeout(e),e=setTimeout((function(){e=null}),500)}else(function(t,e){var n=t.document.documentElement,i=Tu(t).on("dragstart.drag",null);e&&(i.on("click.drag",kp,Cp),setTimeout((function(){i.on("click.drag",null)}),0)),"onselectstart"in n?i.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)})(t.view,m),U.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);P.attr("pointer-events","all"),N.attr("cursor",Wp.overlay),E.selection&&(S=E.selection),function(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}(S)&&(E.selection=null,c.call(y)),I.end(t,b.name)}}function f(t){u(this,arguments).moved(t)}function p(t){u(this,arguments).ended(t)}function m(){var e=this.__brush||{selection:null};return e.extent=jp(n.apply(this,arguments)),e.dim=t,e}return l.move=function(e,n,i){e.tween?e.on("start.brush",(function(t){u(this,arguments).beforestart().start(t)})).on("interrupt.brush end.brush",(function(t){u(this,arguments).end(t)})).tween("brush",(function(){var e=this,i=e.__brush,r=u(e,arguments),o=i.selection,s=t.input("function"==typeof n?n.apply(this,arguments):n,i.extent),a=Cs(o,s);function l(t){i.selection=1===t&&null===s?null:a(t),c.call(e),r.brush()}return null!==o&&null!==s?l:l(1)})):e.each((function(){var e=this,r=arguments,o=e.__brush,s=t.input("function"==typeof n?n.apply(e,r):n,o.extent),a=u(e,r).beforestart();la(e),o.selection=null===s?null:s,c.call(e),a.start(i).brush(i).end(i)}))},l.clear=function(t,e){l.move(t,null,e)},h.prototype={beforestart:function(){return 1===++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(t,e){return this.starting?(this.starting=!1,this.emit("start",t,e)):this.emit("brush",t),this},brush:function(t,e){return this.emit("brush",t,e),this},end:function(t,e){return 0===--this.active&&(delete this.state.emitter,this.emit("end",t,e)),this},emit:function(e,n,i){var r=Tu(this.that).datum();s.call(e,this.that,new Rp(e,{sourceEvent:n,target:l,selection:t.output(this.state.selection),mode:i,dispatch:s}),r)}},l.extent=function(t){return arguments.length?(n="function"==typeof t?t:Lp(jp(t)),l):n},l.filter=function(t){return arguments.length?(i="function"==typeof t?t:Lp(!!t),l):i},l.touchable=function(t){return arguments.length?(r="function"==typeof t?t:Lp(!!t),l):r},l.handleSize=function(t){return arguments.length?(a=+t,l):a},l.keyModifiers=function(t){return arguments.length?(o=!!t,l):o},l.on=function(){var t=s.on.apply(s,arguments);return t===s?l:t},l}(Vp)}const im=Math.PI,rm=2*im,om=1e-6,sm=rm-om;function am(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}let lm=class{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?am:function(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return am;const n=10**e;return function(t){this._+=t[0];for(let e=1,i=t.length;e<i;++e)this._+=Math.round(arguments[e]*n)/n+t[e]}}(t)}moveTo(t,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,e){this._append`L${this._x1=+t},${this._y1=+e}`}quadraticCurveTo(t,e,n,i){this._append`Q${+t},${+e},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(t,e,n,i,r,o){this._append`C${+t},${+e},${+n},${+i},${this._x1=+r},${this._y1=+o}`}arcTo(t,e,n,i,r){if(t=+t,e=+e,n=+n,i=+i,(r=+r)<0)throw new Error(`negative radius: ${r}`);let o=this._x1,s=this._y1,a=n-t,l=i-e,c=o-t,u=s-e,h=c*c+u*u;if(null===this._x1)this._append`M${this._x1=t},${this._y1=e}`;else if(h>om)if(Math.abs(u*a-l*c)>om&&r){let d=n-o,f=i-s,p=a*a+l*l,m=d*d+f*f,g=Math.sqrt(p),v=Math.sqrt(h),y=r*Math.tan((im-Math.acos((p+h-m)/(2*g*v)))/2),_=y/v,b=y/g;Math.abs(_-1)>om&&this._append`L${t+_*c},${e+_*u}`,this._append`A${r},${r},0,0,${+(u*d>c*f)},${this._x1=t+b*a},${this._y1=e+b*l}`}else this._append`L${this._x1=t},${this._y1=e}`}arc(t,e,n,i,r,o){if(t=+t,e=+e,o=!!o,(n=+n)<0)throw new Error(`negative radius: ${n}`);let s=n*Math.cos(i),a=n*Math.sin(i),l=t+s,c=e+a,u=1^o,h=o?i-r:r-i;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>om||Math.abs(this._y1-c)>om)&&this._append`L${l},${c}`,n&&(h<0&&(h=h%rm+rm),h>sm?this._append`A${n},${n},0,1,${u},${t-s},${e-a}A${n},${n},0,1,${u},${this._x1=l},${this._y1=c}`:h>om&&this._append`A${n},${n},0,${+(h>=im)},${u},${this._x1=t+n*Math.cos(r)},${this._y1=e+n*Math.sin(r)}`)}rect(t,e,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}};var cm=Math.PI,um=2*cm,hm=cm/180,dm=Math.abs,fm=(Math.atan,Math.atan2,Math.cos),pm=(Math.exp,Math.log,Math.sin,Math.sign,Math.sqrt);Math.tan;function mm(t,e){return dm(t)>cm&&(t-=Math.round(t/um)*um),[t,e]}function gm(){}function vm(t,e){return[t,e]}mm.invert=mm,new gp,new gp,new gp,gm.prototype={constructor:gm,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},fm(30*hm),vm.invert=vm;pm(3);function ym(t){var e=0,n=t.children,i=n&&n.length;if(i)for(;--i>=0;)e+=n[i].value;else e=1;t.value=e}function _m(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=wm)):void 0===e&&(e=bm);for(var n,i,r,o,s,a=new Tm(t),l=[a];n=l.pop();)if((r=e(n.data))&&(s=(r=Array.from(r)).length))for(n.children=r,o=s-1;o>=0;--o)l.push(i=r[o]=new Tm(r[o])),i.parent=n,i.depth=n.depth+1;return a.eachBefore(Em)}function bm(t){return t.children}function wm(t){return Array.isArray(t)?t[1]:null}function xm(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function Em(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function Tm(t){this.data=t,this.depth=this.height=0,this.parent=null}function Sm(t,e,n,i,r){for(var o,s=t.children,a=-1,l=s.length,c=t.value&&(i-e)/t.value;++a<l;)(o=s[a]).y0=n,o.y1=r,o.x0=e,o.x1=e+=o.value*c}function Om(t,e,n,i,r){for(var o,s=t.children,a=-1,l=s.length,c=t.value&&(r-n)/t.value;++a<l;)(o=s[a]).x0=e,o.x1=i,o.y0=n,o.y1=n+=o.value*c}function Mm(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(null==n)e=null;else{const t=Math.floor(n);if(!(t>=0))throw new RangeError(`invalid digits: ${n}`);e=t}return t},()=>new lm(e)}function Am(t){return t.innerRadius}function Cm(t){return t.outerRadius}function km(t){return t.startAngle}function Dm(t){return t.endAngle}function Lm(t){return t&&t.padAngle}function Rm(t,e,n,i,r,o,s){var a=t-n,l=e-i,c=(s?o:-o)/Wd(a*a+l*l),u=c*l,h=-c*a,d=t+u,f=e+h,p=n+u,m=i+h,g=(d+p)/2,v=(f+m)/2,y=p-d,_=m-f,b=y*y+_*_,w=r-o,x=d*m-p*f,E=(_<0?-1:1)*Wd(jd(0,w*w*b-x*x)),T=(x*_-y*E)/b,S=(-x*y-_*E)/b,O=(x*_+y*E)/b,M=(-x*y+_*E)/b,A=T-g,C=S-v,k=O-g,D=M-v;return A*A+C*C>k*k+D*D&&(T=O,S=M),{cx:T,cy:S,x01:-u,y01:-h,x11:T*(r/w-1),y11:S*(r/w-1)}}function Im(t){return t[0]}function Pm(t){return t[1]}function Nm(t,e){var n=Xc(!0),i=null,r=Jd,o=null,s=Mm(a);function a(a){var l,c,u,h=(a=Kc(a)).length,d=!1;for(null==i&&(o=r(u=s())),l=0;l<=h;++l)!(l<h&&n(c=a[l],l,a))===d&&((d=!d)?o.lineStart():o.lineEnd()),d&&o.point(+t(c,l,a),+e(c,l,a));if(u)return o=null,u+""||null}return t="function"==typeof t?t:void 0===t?Im:Xc(t),e="function"==typeof e?e:void 0===e?Pm:Xc(e),a.x=function(e){return arguments.length?(t="function"==typeof e?e:Xc(+e),a):t},a.y=function(t){return arguments.length?(e="function"==typeof t?t:Xc(+t),a):e},a.defined=function(t){return arguments.length?(n="function"==typeof t?t:Xc(!!t),a):n},a.curve=function(t){return arguments.length?(r=t,null!=i&&(o=r(i)),a):r},a.context=function(t){return arguments.length?(null==t?i=o=null:o=r(i=t),a):i},a}function Um(t,e,n){var i=null,r=Xc(!0),o=null,s=Jd,a=null,l=Mm(c);function c(c){var u,h,d,f,p,m=(c=Kc(c)).length,g=!1,v=new Array(m),y=new Array(m);for(null==o&&(a=s(p=l())),u=0;u<=m;++u){if(!(u<m&&r(f=c[u],u,c))===g)if(g=!g)h=u,a.areaStart(),a.lineStart();else{for(a.lineEnd(),a.lineStart(),d=u-1;d>=h;--d)a.point(v[d],y[d]);a.lineEnd(),a.areaEnd()}g&&(v[u]=+t(f,u,c),y[u]=+e(f,u,c),a.point(i?+i(f,u,c):v[u],n?+n(f,u,c):y[u]))}if(p)return a=null,p+""||null}function u(){return Nm().defined(r).curve(s).context(o)}return t="function"==typeof t?t:void 0===t?Im:Xc(+t),e="function"==typeof e?e:Xc(void 0===e?0:+e),n="function"==typeof n?n:void 0===n?Pm:Xc(+n),c.x=function(e){return arguments.length?(t="function"==typeof e?e:Xc(+e),i=null,c):t},c.x0=function(e){return arguments.length?(t="function"==typeof e?e:Xc(+e),c):t},c.x1=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:Xc(+t),c):i},c.y=function(t){return arguments.length?(e="function"==typeof t?t:Xc(+t),n=null,c):e},c.y0=function(t){return arguments.length?(e="function"==typeof t?t:Xc(+t),c):e},c.y1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:Xc(+t),c):n},c.lineX0=c.lineY0=function(){return u().x(t).y(e)},c.lineY1=function(){return u().x(t).y(n)},c.lineX1=function(){return u().x(i).y(e)},c.defined=function(t){return arguments.length?(r="function"==typeof t?t:Xc(!!t),c):r},c.curve=function(t){return arguments.length?(s=t,null!=o&&(a=s(o)),c):s},c.context=function(t){return arguments.length?(null==t?o=a=null:a=s(o=t),c):o},c}function Bm(t){this._curve=t}Tm.prototype=_m.prototype={constructor:Tm,count:function(){return this.eachAfter(ym)},each:function(t,e){let n=-1;for(const i of this)t.call(e,i,++n,this);return this},eachAfter:function(t,e){for(var n,i,r,o=this,s=[o],a=[],l=-1;o=s.pop();)if(a.push(o),n=o.children)for(i=0,r=n.length;i<r;++i)s.push(n[i]);for(;o=a.pop();)t.call(e,o,++l,this);return this},eachBefore:function(t,e){for(var n,i,r=this,o=[r],s=-1;r=o.pop();)if(t.call(e,r,++s,this),n=r.children)for(i=n.length-1;i>=0;--i)o.push(n[i]);return this},find:function(t,e){let n=-1;for(const i of this)if(t.call(e,i,++n,this))return i},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,i=e.children,r=i&&i.length;--r>=0;)n+=i[r].value;e.value=n}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),i=e.ancestors(),r=null;for(t=n.pop(),e=i.pop();t===e;)r=t,t=n.pop(),e=i.pop();return r}(e,t),i=[e];e!==n;)e=e.parent,i.push(e);for(var r=i.length;t!==n;)i.splice(r,0,t),t=t.parent;return i},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function(){return _m(this).eachBefore(xm)},[Symbol.iterator]:function*(){var t,e,n,i,r=this,o=[r];do{for(t=o.reverse(),o=[];r=t.pop();)if(yield r,e=r.children)for(n=0,i=e.length;n<i;++n)o.push(e[n])}while(o.length)}},Object.create(Tm.prototype),function t(e){function n(t,n,i,r,o){!function(t,e,n,i,r,o){for(var s,a,l,c,u,h,d,f,p,m,g,v=[],y=e.children,_=0,b=0,w=y.length,x=e.value;_<w;){l=r-n,c=o-i;do{u=y[b++].value}while(!u&&b<w);for(h=d=u,g=u*u*(m=Math.max(c/l,l/c)/(x*t)),p=Math.max(d/g,g/h);b<w;++b){if(u+=a=y[b].value,a<h&&(h=a),a>d&&(d=a),g=u*u*m,(f=Math.max(d/g,g/h))>p){u-=a;break}p=f}v.push(s={value:u,dice:l<c,children:y.slice(_,b)}),s.dice?Sm(s,n,i,r,x?i+=c*u/x:o):Om(s,n,i,x?n+=l*u/x:r,o),x-=u,_=b}}(e,t,n,i,r,o)}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}((1+Math.sqrt(5))/2),function(t){function e(e){return new Bm(t(e))}e._curve=t}(Jd),Bm.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};let Hm=class{constructor(t,e,n){if(this.type="",this.renderType=I.HTML,this.id="",this.parent=void 0,this.configs={},this.model=t,this.services=e,n&&(this.configs=n,this.configs.id)){const t=dc(this.model.getOptions(),"style","prefix");this.id=`${t}--${this.configs.id}`}this.parent||this.setParent(Tu(this.services.domUtils.getMainContainer()))}init(){}render(t=!0){console.error("Error: Component did not provide the required render function.")}destroy(){}setModel(t){this.model=t}setServices(t){this.services=t}setParent(t){var e;const n=this.parent;if(this.parent=t,(!n||n.node()!==t.node())&&this.type){const t=dc(this.model.getOptions(),"style","prefix");null==(e=this.parent)||e.classed(`${cl}--${t}--${this.type}`,!0),n&&n.classed(`${cl}--${t}--${this.type}`,!1)}}getParent(){return this.parent}getComponentContainer(t={ariaLabel:null,isPresentational:!1,withinChartClip:!1}){if(this.type){const e=dc(this.model.getOptions(),"style","prefix"),n=this.id?`#${this.id}`:"",i=Uf.appendOrSelect(this.parent,`${this.renderType===I.SVG?"svg":"div"}${n}.${cl}--${e}--${this.type}`);if(t.ariaLabel&&i.attr("aria-label",t.ariaLabel),t.isPresentational&&i.attr("role","presentation"),t.withinChartClip){const t=this.model.get("chartClipId");if(t){const e=Tu(`#${t}`).select("rect");0!==e.size()&&parseFloat(e.attr("height"))>0&&i.attr("clip-path",`url(#${t})`)}}return i.attr("width","100%").attr("height","100%")}return this.parent}getOptions(){return this.configs.options?Qi({},this.model.getOptions(),this.configs.options):this.model.getOptions()}};const{entries:$m,setPrototypeOf:Fm,isFrozen:zm,getPrototypeOf:jm,getOwnPropertyDescriptor:Vm}=Object;let{freeze:Gm,seal:Wm,create:Ym}=Object,{apply:Zm,construct:qm}=typeof Reflect<"u"&&Reflect;Gm||(Gm=function(t){return t}),Wm||(Wm=function(t){return t}),Zm||(Zm=function(t,e,n){return t.apply(e,n)}),qm||(qm=function(t,e){return new t(...e)});const Xm=ug(Array.prototype.forEach),Km=ug(Array.prototype.lastIndexOf),Qm=ug(Array.prototype.pop),Jm=ug(Array.prototype.push),tg=ug(Array.prototype.splice),eg=ug(String.prototype.toLowerCase),ng=ug(String.prototype.toString),ig=ug(String.prototype.match),rg=ug(String.prototype.replace),og=ug(String.prototype.indexOf),sg=ug(String.prototype.trim),ag=ug(Object.prototype.hasOwnProperty),lg=ug(RegExp.prototype.test),cg=function(t){return function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return qm(t,n)}}(TypeError);function ug(t){return function(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return Zm(t,e,i)}}function hg(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:eg;Fm&&Fm(t,null);let i=e.length;for(;i--;){let r=e[i];if("string"==typeof r){const t=n(r);t!==r&&(zm(e)||(e[i]=t),r=t)}t[r]=!0}return t}function dg(t){for(let e=0;e<t.length;e++)ag(t,e)||(t[e]=null);return t}function fg(t){const e=Ym(null);for(const[n,i]of $m(t))ag(t,n)&&(Array.isArray(i)?e[n]=dg(i):i&&"object"==typeof i&&i.constructor===Object?e[n]=fg(i):e[n]=i);return e}function pg(t,e){for(;null!==t;){const n=Vm(t,e);if(n){if(n.get)return ug(n.get);if("function"==typeof n.value)return ug(n.value)}t=jm(t)}return function(){return null}}const mg=Gm(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),gg=Gm(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),vg=Gm(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),yg=Gm(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),_g=Gm(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),bg=Gm(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),wg=Gm(["#text"]),xg=Gm(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Eg=Gm(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Tg=Gm(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Sg=Gm(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Og=Wm(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Mg=Wm(/<%[\w\W]*|[\w\W]*%>/gm),Ag=Wm(/\$\{[\w\W]*/gm),Cg=Wm(/^data-[\-\w.\u00B7-\uFFFF]+$/),kg=Wm(/^aria-[\-\w]+$/),Dg=Wm(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Lg=Wm(/^(?:\w+script|data):/i),Rg=Wm(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ig=Wm(/^html$/i),Pg=Wm(/^[a-z][.\w]*(-[.\w]+)+$/i);var Ng=Object.freeze({__proto__:null,ARIA_ATTR:kg,ATTR_WHITESPACE:Rg,CUSTOM_ELEMENT:Pg,DATA_ATTR:Cg,DOCTYPE_NAME:Ig,ERB_EXPR:Mg,IS_ALLOWED_URI:Dg,IS_SCRIPT_OR_DATA:Lg,MUSTACHE_EXPR:Og,TMPLIT_EXPR:Ag});var Ug=function t(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:typeof window>"u"?null:window;const n=e=>t(e);if(n.version="3.2.4",n.removed=[],!e||!e.document||9!==e.document.nodeType||!e.Element)return n.isSupported=!1,n;let{document:i}=e;const r=i,o=r.currentScript,{DocumentFragment:s,HTMLTemplateElement:a,Node:l,Element:c,NodeFilter:u,NamedNodeMap:h=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:f,trustedTypes:p}=e,m=c.prototype,g=pg(m,"cloneNode"),v=pg(m,"remove"),y=pg(m,"nextSibling"),_=pg(m,"childNodes"),b=pg(m,"parentNode");if("function"==typeof a){const t=i.createElement("template");t.content&&t.content.ownerDocument&&(i=t.content.ownerDocument)}let w,x="";const{implementation:E,createNodeIterator:T,createDocumentFragment:S,getElementsByTagName:O}=i,{importNode:M}=r;let A={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof $m&&"function"==typeof b&&E&&void 0!==E.createHTMLDocument;const{MUSTACHE_EXPR:C,ERB_EXPR:k,TMPLIT_EXPR:D,DATA_ATTR:L,ARIA_ATTR:R,IS_SCRIPT_OR_DATA:I,ATTR_WHITESPACE:P,CUSTOM_ELEMENT:N}=Ng;let{IS_ALLOWED_URI:U}=Ng,B=null;const H=hg({},[...mg,...gg,...vg,..._g,...wg]);let $=null;const F=hg({},[...xg,...Eg,...Tg,...Sg]);let z=Object.seal(Ym(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),j=null,V=null,G=!0,W=!0,Y=!1,Z=!0,q=!1,X=!0,K=!1,Q=!1,J=!1,tt=!1,et=!1,nt=!1,it=!0,rt=!1,ot=!0,st=!1,at={},lt=null;const ct=hg({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ut=null;const ht=hg({},["audio","video","img","source","image","track"]);let dt=null;const ft=hg({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),pt="http://www.w3.org/1998/Math/MathML",mt="http://www.w3.org/2000/svg",gt="http://www.w3.org/1999/xhtml";let vt=gt,yt=!1,_t=null;const bt=hg({},[pt,mt,gt],ng);let wt=hg({},["mi","mo","mn","ms","mtext"]),xt=hg({},["annotation-xml"]);const Et=hg({},["title","style","font","a","script"]);let Tt=null;const St=["application/xhtml+xml","text/html"];let Ot=null,Mt=null;const At=i.createElement("form"),Ct=function(t){return t instanceof RegExp||t instanceof Function},kt=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Mt||Mt!==t){if((!t||"object"!=typeof t)&&(t={}),t=fg(t),Tt=-1===St.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,Ot="application/xhtml+xml"===Tt?ng:eg,B=ag(t,"ALLOWED_TAGS")?hg({},t.ALLOWED_TAGS,Ot):H,$=ag(t,"ALLOWED_ATTR")?hg({},t.ALLOWED_ATTR,Ot):F,_t=ag(t,"ALLOWED_NAMESPACES")?hg({},t.ALLOWED_NAMESPACES,ng):bt,dt=ag(t,"ADD_URI_SAFE_ATTR")?hg(fg(ft),t.ADD_URI_SAFE_ATTR,Ot):ft,ut=ag(t,"ADD_DATA_URI_TAGS")?hg(fg(ht),t.ADD_DATA_URI_TAGS,Ot):ht,lt=ag(t,"FORBID_CONTENTS")?hg({},t.FORBID_CONTENTS,Ot):ct,j=ag(t,"FORBID_TAGS")?hg({},t.FORBID_TAGS,Ot):{},V=ag(t,"FORBID_ATTR")?hg({},t.FORBID_ATTR,Ot):{},at=!!ag(t,"USE_PROFILES")&&t.USE_PROFILES,G=!1!==t.ALLOW_ARIA_ATTR,W=!1!==t.ALLOW_DATA_ATTR,Y=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Z=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,q=t.SAFE_FOR_TEMPLATES||!1,X=!1!==t.SAFE_FOR_XML,K=t.WHOLE_DOCUMENT||!1,tt=t.RETURN_DOM||!1,et=t.RETURN_DOM_FRAGMENT||!1,nt=t.RETURN_TRUSTED_TYPE||!1,J=t.FORCE_BODY||!1,it=!1!==t.SANITIZE_DOM,rt=t.SANITIZE_NAMED_PROPS||!1,ot=!1!==t.KEEP_CONTENT,st=t.IN_PLACE||!1,U=t.ALLOWED_URI_REGEXP||Dg,vt=t.NAMESPACE||gt,wt=t.MATHML_TEXT_INTEGRATION_POINTS||wt,xt=t.HTML_INTEGRATION_POINTS||xt,z=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&Ct(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(z.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&Ct(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(z.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(z.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),q&&(W=!1),et&&(tt=!0),at&&(B=hg({},wg),$=[],!0===at.html&&(hg(B,mg),hg($,xg)),!0===at.svg&&(hg(B,gg),hg($,Eg),hg($,Sg)),!0===at.svgFilters&&(hg(B,vg),hg($,Eg),hg($,Sg)),!0===at.mathMl&&(hg(B,_g),hg($,Tg),hg($,Sg))),t.ADD_TAGS&&(B===H&&(B=fg(B)),hg(B,t.ADD_TAGS,Ot)),t.ADD_ATTR&&($===F&&($=fg($)),hg($,t.ADD_ATTR,Ot)),t.ADD_URI_SAFE_ATTR&&hg(dt,t.ADD_URI_SAFE_ATTR,Ot),t.FORBID_CONTENTS&&(lt===ct&&(lt=fg(lt)),hg(lt,t.FORBID_CONTENTS,Ot)),ot&&(B["#text"]=!0),K&&hg(B,["html","head","body"]),B.table&&(hg(B,["tbody"]),delete j.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw cg('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw cg('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=t.TRUSTED_TYPES_POLICY,x=w.createHTML("")}else void 0===w&&(w=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let n=null;const i="data-tt-policy-suffix";e&&e.hasAttribute(i)&&(n=e.getAttribute(i));const r="dompurify"+(n?"#"+n:"");try{return t.createPolicy(r,{createHTML:t=>t,createScriptURL:t=>t})}catch{return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(p,o)),null!==w&&"string"==typeof x&&(x=w.createHTML(""));Gm&&Gm(t),Mt=t}},Dt=hg({},[...gg,...vg,...yg]),Lt=hg({},[..._g,...bg]),Rt=function(t){Jm(n.removed,{element:t});try{b(t).removeChild(t)}catch{v(t)}},It=function(t,e){try{Jm(n.removed,{attribute:e.getAttributeNode(t),from:e})}catch{Jm(n.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t)if(tt||et)try{Rt(e)}catch{}else try{e.setAttribute(t,"")}catch{}},Pt=function(t){let e=null,n=null;if(J)t="<remove></remove>"+t;else{const e=ig(t,/^[\r\n\t ]+/);n=e&&e[0]}"application/xhtml+xml"===Tt&&vt===gt&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const r=w?w.createHTML(t):t;if(vt===gt)try{e=(new f).parseFromString(r,Tt)}catch{}if(!e||!e.documentElement){e=E.createDocument(vt,"template",null);try{e.documentElement.innerHTML=yt?x:r}catch{}}const o=e.body||e.documentElement;return t&&n&&o.insertBefore(i.createTextNode(n),o.childNodes[0]||null),vt===gt?O.call(e,K?"html":"body")[0]:K?e.documentElement:o},Nt=function(t){return T.call(t.ownerDocument||t,t,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},Ut=function(t){return t instanceof d&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof h)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},Bt=function(t){return"function"==typeof l&&t instanceof l};function Ht(t,e,i){Xm(t,(t=>{t.call(n,e,i,Mt)}))}const $t=function(t){let e=null;if(Ht(A.beforeSanitizeElements,t,null),Ut(t))return Rt(t),!0;const i=Ot(t.nodeName);if(Ht(A.uponSanitizeElement,t,{tagName:i,allowedTags:B}),t.hasChildNodes()&&!Bt(t.firstElementChild)&&lg(/<[/\w]/g,t.innerHTML)&&lg(/<[/\w]/g,t.textContent)||7===t.nodeType||X&&8===t.nodeType&&lg(/<[/\w]/g,t.data))return Rt(t),!0;if(!B[i]||j[i]){if(!j[i]&&zt(i)&&(z.tagNameCheck instanceof RegExp&&lg(z.tagNameCheck,i)||z.tagNameCheck instanceof Function&&z.tagNameCheck(i)))return!1;if(ot&&!lt[i]){const e=b(t)||t.parentNode,n=_(t)||t.childNodes;if(n&&e)for(let i=n.length-1;i>=0;--i){const r=g(n[i],!0);r.__removalCount=(t.__removalCount||0)+1,e.insertBefore(r,y(t))}}return Rt(t),!0}return t instanceof c&&!function(t){let e=b(t);(!e||!e.tagName)&&(e={namespaceURI:vt,tagName:"template"});const n=eg(t.tagName),i=eg(e.tagName);return!!_t[t.namespaceURI]&&(t.namespaceURI===mt?e.namespaceURI===gt?"svg"===n:e.namespaceURI===pt?"svg"===n&&("annotation-xml"===i||wt[i]):!!Dt[n]:t.namespaceURI===pt?e.namespaceURI===gt?"math"===n:e.namespaceURI===mt?"math"===n&&xt[i]:!!Lt[n]:t.namespaceURI===gt?!(e.namespaceURI===mt&&!xt[i]||e.namespaceURI===pt&&!wt[i])&&!Lt[n]&&(Et[n]||!Dt[n]):!("application/xhtml+xml"!==Tt||!_t[t.namespaceURI]))}(t)||("noscript"===i||"noembed"===i||"noframes"===i)&&lg(/<\/no(script|embed|frames)/i,t.innerHTML)?(Rt(t),!0):(q&&3===t.nodeType&&(e=t.textContent,Xm([C,k,D],(t=>{e=rg(e,t," ")})),t.textContent!==e&&(Jm(n.removed,{element:t.cloneNode()}),t.textContent=e)),Ht(A.afterSanitizeElements,t,null),!1)},Ft=function(t,e,n){if(it&&("id"===e||"name"===e)&&(n in i||n in At))return!1;if((!W||V[e]||!lg(L,e))&&(!G||!lg(R,e)))if(!$[e]||V[e]){if(!(zt(t)&&(z.tagNameCheck instanceof RegExp&&lg(z.tagNameCheck,t)||z.tagNameCheck instanceof Function&&z.tagNameCheck(t))&&(z.attributeNameCheck instanceof RegExp&&lg(z.attributeNameCheck,e)||z.attributeNameCheck instanceof Function&&z.attributeNameCheck(e))||"is"===e&&z.allowCustomizedBuiltInElements&&(z.tagNameCheck instanceof RegExp&&lg(z.tagNameCheck,n)||z.tagNameCheck instanceof Function&&z.tagNameCheck(n))))return!1}else if(!dt[e]&&!lg(U,rg(n,P,""))&&("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==og(n,"data:")||!ut[t])&&(!Y||lg(I,rg(n,P,"")))&&n)return!1;return!0},zt=function(t){return"annotation-xml"!==t&&ig(t,N)},jt=function(t){Ht(A.beforeSanitizeAttributes,t,null);const{attributes:e}=t;if(!e||Ut(t))return;const i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:$,forceKeepAttr:void 0};let r=e.length;for(;r--;){const o=e[r],{name:s,namespaceURI:a,value:l}=o,c=Ot(s);let u="value"===s?l:sg(l);if(i.attrName=c,i.attrValue=u,i.keepAttr=!0,i.forceKeepAttr=void 0,Ht(A.uponSanitizeAttribute,t,i),u=i.attrValue,rt&&("id"===c||"name"===c)&&(It(s,t),u="user-content-"+u),X&&lg(/((--!?|])>)|<\/(style|title)/i,u)){It(s,t);continue}if(i.forceKeepAttr||(It(s,t),!i.keepAttr))continue;if(!Z&&lg(/\/>/i,u)){It(s,t);continue}q&&Xm([C,k,D],(t=>{u=rg(u,t," ")}));const h=Ot(t.nodeName);if(Ft(h,c,u)){if(w&&"object"==typeof p&&"function"==typeof p.getAttributeType&&!a)switch(p.getAttributeType(h,c)){case"TrustedHTML":u=w.createHTML(u);break;case"TrustedScriptURL":u=w.createScriptURL(u)}try{a?t.setAttributeNS(a,s,u):t.setAttribute(s,u),Ut(t)?Rt(t):Qm(n.removed)}catch{}}}Ht(A.afterSanitizeAttributes,t,null)},Vt=function t(e){let n=null;const i=Nt(e);for(Ht(A.beforeSanitizeShadowDOM,e,null);n=i.nextNode();)Ht(A.uponSanitizeShadowNode,n,null),$t(n),jt(n),n.content instanceof s&&t(n.content);Ht(A.afterSanitizeShadowDOM,e,null)};return n.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null,o=null,a=null,c=null;if(yt=!t,yt&&(t="\x3c!--\x3e"),"string"!=typeof t&&!Bt(t)){if("function"!=typeof t.toString)throw cg("toString is not a function");if("string"!=typeof(t=t.toString()))throw cg("dirty is not a string, aborting")}if(!n.isSupported)return t;if(Q||kt(e),n.removed=[],"string"==typeof t&&(st=!1),st){if(t.nodeName){const e=Ot(t.nodeName);if(!B[e]||j[e])throw cg("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof l)i=Pt("\x3c!----\x3e"),o=i.ownerDocument.importNode(t,!0),1===o.nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?i=o:i.appendChild(o);else{if(!tt&&!q&&!K&&-1===t.indexOf("<"))return w&&nt?w.createHTML(t):t;if(i=Pt(t),!i)return tt?null:nt?x:""}i&&J&&Rt(i.firstChild);const u=Nt(st?t:i);for(;a=u.nextNode();)$t(a),jt(a),a.content instanceof s&&Vt(a.content);if(st)return t;if(tt){if(et)for(c=S.call(i.ownerDocument);i.firstChild;)c.appendChild(i.firstChild);else c=i;return($.shadowroot||$.shadowrootmode)&&(c=M.call(r,c,!0)),c}let h=K?i.outerHTML:i.innerHTML;return K&&B["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&lg(Ig,i.ownerDocument.doctype.name)&&(h="<!DOCTYPE "+i.ownerDocument.doctype.name+">\n"+h),q&&Xm([C,k,D],(t=>{h=rg(h,t," ")})),w&&nt?w.createHTML(h):h},n.setConfig=function(){kt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Q=!0},n.clearConfig=function(){Mt=null,Q=!1},n.isValidAttribute=function(t,e,n){Mt||kt({});const i=Ot(t),r=Ot(e);return Ft(i,r,n)},n.addHook=function(t,e){"function"==typeof e&&Jm(A[t],e)},n.removeHook=function(t,e){if(void 0!==e){const n=Km(A[t],e);return-1===n?void 0:tg(A[t],n,1)[0]}return Qm(A[t])},n.removeHooks=function(t){A[t]=[]},n.removeAllHooks=function(){A={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();const Bg=t=>Ug.sanitize(t,{USE_PROFILES:{html:!0,svg:!0,svgFilters:!0}}),Hg=t=>Ug.sanitize(t,{ALLOWED_TAGS:[]}),$g=class t extends Hm{constructor(){super(...arguments),this.type="toolbar",this.renderType=I.HTML}init(){const t=()=>this.updateOverflowMenu(!1);this.services.events.addEventListener(R.Toolbar.SHOW_OVERFLOW_MENU,(()=>{this.renderOverflowMenu(),document.body.addEventListener("click",t)})),this.services.events.addEventListener(R.Toolbar.HIDE_OVERFLOW_MENU,(()=>{document.body.removeEventListener("click",t)}))}render(t=!0){const e=this.getComponentContainer({ariaLabel:"toolbar"}).attr("role","group");if(dc(this.getOptions(),"data","loading"))e.html(""),this.overflowMenu=null;else{this.overflowMenu||(this.overflowMenu=e.append("div").attr("class","cds--overflow-menu-options cds--overflow-menu--flip cds--overflow-menu-options cds--overflow-menu--flip").attr("tabindex",-1).html("<ul role='menu'></ul>"));const{buttonList:t,overflowMenuItemList:n}=this.getControlConfigs();n&&t.push(this.getOverflowButtonConfig());const i=e.selectAll("div.toolbar-control").data(t,(t=>t.id));i.exit().remove();const r=i.enter().append("div").attr("class","toolbar-control cds--overflow-menu cds--overflow-menu"),o=this;r.merge(i).classed("disabled",(t=>t.shouldBeDisabled())).attr("role","button").attr("aria-disabled",(t=>t.shouldBeDisabled())).attr("aria-label",(t=>t.title)).html((t=>`\n\t\t\t<button\n\t\t\t\tclass="cds--overflow-menu__trigger cds--overflow-menu__trigger"\n\t\t\t\taria-haspopup="true" aria-expanded="false" id="${this.services.domUtils.generateElementIDString(`control-${Hg(t.id)}`)}" aria-label="${Hg(t.title)}">\n\t\t\t\t<svg focusable="false" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" class="cds--overflow-menu__icon cds--overflow-menu__icon" viewBox="0 0 32 32" aria-hidden="true">\n\t\t\t\t\t${(t=>Ug.sanitize(t,{NAMESPACE:"http://www.w3.org/2000/svg",USE_PROFILES:{html:!0,svg:!0,svgFilters:!0}}))(t.iconSVG.content)}\n\t\t\t\t</svg>\n\t\t\t</button>`)).each((function(t,e){Tu(this).select("svg").style("pointer-events","none").style("will-change","transform").style("width",void 0!==t.iconSVG.width?t.iconSVG.width:"20px").style("height",void 0!==t.iconSVG.height?t.iconSVG.height:"20px"),Tu(this).select("button").on("mouseover focus",(function(e){const n=Tu(this);n.classed("hovered",!0),o.services.events.dispatchEvent(R.Toolbar.SHOW_TOOLTIP,{event:e,hoveredElement:n,content:t.title,noWrap:!0,placements:["top","bottom"]})})).on("mouseout blur",(function(){o.services.events.dispatchEvent(R.Toolbar.HIDE_TOOLTIP)})).on("click",(e=>{t.shouldBeDisabled()||o.triggerFunctionAndEvent(t,e,this)})).on("keydown",(n=>{n.key&&"Enter"===n.key||" "===n.key?(n.preventDefault(),o.triggerFunctionAndEvent(t,n,this)):n.key&&"ArrowLeft"===n.key?o.focusOnPreviousEnabledToolbarItem(e):n.key&&"ArrowRight"===n.key&&o.focusOnNextEnabledToolbarItem(e)}))})),this.overflowButton=this.getComponentContainer().select(`button.cds--overflow-menu__trigger#${this.services.domUtils.generateElementIDString("control-toolbar-overflow-menu")}`)}}renderOverflowMenu(){const{overflowMenuItemList:t}=this.getControlConfigs(),e=this.overflowMenu.select("ul").selectAll("li.cds--overflow-menu-options__option").data(t,(t=>dc(t,"id")));e.exit().remove();const n=e.enter().append("li").attr("id",(t=>this.services.domUtils.generateElementIDString(`control-${t.id}`))).attr("class","cds--overflow-menu-options__option cds--overflow-menu-options__option").attr("role","menuitem").attr("tabindex",1);n.append("button").attr("class","cds--overflow-menu-options__btn cds--overflow-menu-options__btn"),n.merge(e).classed("cds--overflow-menu-options__option--disabled",(t=>t.shouldBeDisabled())).classed("cds--overflow-menu-options__option--disabled",(t=>t.shouldBeDisabled())).attr("aria-disabled",(t=>t.shouldBeDisabled())).selectAll("button").text((t=>t.title))}isOverflowMenuOpen(){return this.overflowMenu.classed("is-open")}updateOverflowMenu(t){this.overflowMenu&&(this.overflowMenu.classed("is-open",t),this.overflowButton&&(this.overflowButton.attr("aria-expanded",t),Tu(this.overflowButton.node().parentNode).classed("cds--overflow-menu--open",t).classed("cds--overflow-menu--open",t)),t?this.services.events.dispatchEvent(R.Toolbar.SHOW_OVERFLOW_MENU):this.services.events.dispatchEvent(R.Toolbar.HIDE_OVERFLOW_MENU))}focusOnPreviousEnabledToolbarItem(t){const e=this.getToolbarButtonItems();let n=e.length;for(let i=t-1;i>=0;i--)if(!e[i].shouldBeDisabled()){n=i;break}if(n<e.length){const t=Tu(`button#${this.services.domUtils.generateElementIDString(`control-${e[n].id}`)}`).node();"focus"in t&&t.focus()}}focusOnNextEnabledToolbarItem(t){const e=this.getToolbarButtonItems();let n=-1;for(let i=t+1;i<e.length;i++)if(!e[i].shouldBeDisabled()){n=i;break}if(n>-1){const t=Tu(`button#${this.services.domUtils.generateElementIDString(`control-${e[n].id}`)}`).node();"focus"in t&&t.focus()}}focusOnPreviousEnabledMenuItem(t){const e=this.getOverflowMenuItems();let n=e.length;for(let i=t-1;i>=0;i--)if(!e[i].shouldBeDisabled()){n=i;break}if(n<e.length){const t=Tu(`#${this.services.domUtils.generateElementIDString(`control-${e[n].id}`)} button`).node();"focus"in t&&t.focus()}}focusOnNextEnabledMenuItem(t){const e=this.getOverflowMenuItems();let n=-1;for(let i=t+1;i<e.length;i++)if(!e[i].shouldBeDisabled()){n=i;break}if(n>-1){const t=Tu(`#${this.services.domUtils.generateElementIDString(`control-${e[n].id}`)} button`).node();"focus"in t&&t.focus()}}toggleOverflowMenu(t){if(this.isOverflowMenuOpen())this.updateOverflowMenu(!1);else{this.updateOverflowMenu(!0);const e=this;this.getOverflowMenuItems().forEach(((n,i)=>{const r=Tu(`#${this.services.domUtils.generateElementIDString(`control-${n.id}`)}`);null!==r&&(r.on("click",(()=>{e.triggerFunctionAndEvent(n,t,r.node()),e.updateOverflowMenu(!1)})),r.on("keydown",(o=>{o&&"Enter"===o.key?e.triggerFunctionAndEvent(n,t,r.node()):o&&"ArrowUp"===o.key?e.focusOnPreviousEnabledMenuItem(i):o&&"ArrowDown"===o.key?e.focusOnNextEnabledMenuItem(i):o&&"Escape"===o.key&&e.updateOverflowMenu(!1),o.preventDefault()})))})),e.focusOnNextEnabledMenuItem(-1)}t&&t.stopImmediatePropagation()}triggerFunctionAndEvent(t,e,n){"function"==typeof t.shouldBeDisabled&&t.shouldBeDisabled()||("function"==typeof t.clickFunction&&t.clickFunction(e),this.services.events.dispatchEvent(R.Toolbar.BUTTON_CLICK,{control:t,event:e,element:n}))}getControlConfigs(){const e=dc(this.getOptions(),"toolbar","numberOfIcons")-1,n=dc(this.getOptions(),"toolbar","controls"),i=[],r=[],o=[];return n.forEach((n=>{let s=null;if(n.type===J.CUSTOM)null===dc(n,"id")&&(n.id="toolbar-button-"+t.buttonID++),null===dc(n,"shouldBeDisabled")&&(n.shouldBeDisabled=()=>!1),s=n;else{const t=this.services.domUtils.isFullScreenMode();n.type===J.MAKE_FULLSCREEN&&t?n.type=J.EXIT_FULLSCREEN:n.type===J.EXIT_FULLSCREEN&&!t&&(n.type=J.MAKE_FULLSCREEN),s=this.getControlConfigByType(n.type)}s&&(s.text=n.text?n.text:n.type,-1!==s.id.indexOf("toolbar-export")?i.push(s):r.length<e?null===dc(s,"iconSVG","content")?o.push(s):r.push(s):o.push(s))})),o.push(...i),o.length?{buttonList:r,overflowMenuItemList:o}:{buttonList:r}}getToolbarButtonItems(){const{buttonList:t,overflowMenuItemList:e}=this.getControlConfigs();return e&&t.push(this.getOverflowButtonConfig()),t||[]}getOverflowMenuItems(){const{overflowMenuItemList:t}=this.getControlConfigs();return t||[]}getOverflowButtonConfig(){const{moreOptions:t}=dc(this.model.getOptions(),"locale","translations","toolbar");return{id:"toolbar-overflow-menu",title:t,shouldBeDisabled:()=>!1,iconSVG:{content:'<circle cx="16" cy="8" r="2"></circle>\n\t\t\t\t<circle cx="16" cy="16" r="2"></circle>\n\t\t\t\t<circle cx="16" cy="24" r="2"></circle>'},clickFunction:t=>this.toggleOverflowMenu(t)}}getControlConfigByType(t){const e=this.services.zoom&&this.services.zoom.isZoomBarEnabled()&&!this.services.zoom.isEmptyState(),n=this.model.getDisplayData(),i=this.model.getOptions(),{exportAsCSV:r,exportAsJPG:o,exportAsPNG:s,zoomIn:a,zoomOut:l,resetZoom:c,makeFullScreen:u,exitFullScreen:h,showAsTable:d}=dc(i,"locale","translations","toolbar");let f;switch(t){case J.ZOOM_IN:e&&(f={id:"toolbar-zoomIn",title:a,shouldBeDisabled:()=>this.services.zoom.isMinZoomDomain(),iconSVG:{content:this.getControlIconByType(t)},clickFunction:()=>this.services.zoom.zoomIn()});break;case J.ZOOM_OUT:e&&(f={id:"toolbar-zoomOut",title:l,shouldBeDisabled:()=>this.services.zoom.isMaxZoomDomain(),iconSVG:{content:this.getControlIconByType(t)},clickFunction:()=>this.services.zoom.zoomOut()});break;case J.RESET_ZOOM:e&&(f={id:"toolbar-resetZoom",title:c,shouldBeDisabled:()=>this.services.zoom.isMaxZoomDomain(),iconSVG:{content:this.getControlIconByType(t)},clickFunction:()=>this.services.zoom.resetZoomDomain()});break;case J.MAKE_FULLSCREEN:f={id:"toolbar-makefullscreen",iconSVG:{content:this.getControlIconByType(t),width:"15px",height:"15px"},title:u,shouldBeDisabled:()=>!1,clickFunction:()=>{this.services.domUtils.toggleFullscreen()}};break;case J.EXIT_FULLSCREEN:f={id:"toolbar-exitfullscreen",iconSVG:{content:this.getControlIconByType(t),width:"15px",height:"15px"},title:h,shouldBeDisabled:()=>!1,clickFunction:()=>{this.services.domUtils.toggleFullscreen()}};break;case J.SHOW_AS_DATATABLE:f={id:"toolbar-showasdatatable",iconSVG:{content:this.getControlIconByType(t)},title:d,shouldBeDisabled:()=>0===n.length,clickFunction:()=>this.services.events.dispatchEvent(R.Modal.SHOW)};break;case J.EXPORT_CSV:f={id:"toolbar-export-CSV",title:r,shouldBeDisabled:()=>!1,iconSVG:{content:this.getControlIconByType(t)},clickFunction:()=>this.model.exportToCSV()};break;case J.EXPORT_PNG:f={id:"toolbar-export-PNG",title:s,shouldBeDisabled:()=>!1,iconSVG:{content:this.getControlIconByType(t)},clickFunction:()=>this.services.domUtils.exportToPNG()};break;case J.EXPORT_JPG:f={id:"toolbar-export-JPG",title:o,shouldBeDisabled:()=>!1,iconSVG:{content:this.getControlIconByType(t)},clickFunction:()=>this.services.domUtils.exportToJPG()};break;default:throw Error("Not supported toolbar control type: "+t)}return f}getControlIconByType(t){switch(t){case J.ZOOM_IN:return'<polygon points="19 13 15 13 15 9 13 9 13 13 9 13 9 15 13 15 13 19 15 19 15 15 19 15 19 13"/>\n\t\t\t\t\t\t<path d="M22.45,21A10.87,10.87,0,0,0,25,14,11,11,0,1,0,14,25a10.87,10.87,0,0,0,7-2.55L28.59,30,30,28.59ZM14,23a9,9,0,1,1,9-9A9,9,0,0,1,14,23Z"/>';case J.ZOOM_OUT:return'<rect x="9" y="13" width="10" height="2"/>\n\t\t\t\t\t\t<path d="M22.45,21A10.87,10.87,0,0,0,25,14,11,11,0,1,0,14,25a10.87,10.87,0,0,0,7-2.55L28.59,30,30,28.59ZM14,23a9,9,0,1,1,9-9A9,9,0,0,1,14,23Z"/>';case J.RESET_ZOOM:return'<path d="M22.4478,21A10.855,10.855,0,0,0,25,14,10.99,10.99,0,0,0,6,6.4658V2H4v8h8V8H7.332a8.9768,8.9768,0,1,1-2.1,8H3.1912A11.0118,11.0118,0,0,0,14,25a10.855,10.855,0,0,0,7-2.5522L28.5859,30,30,28.5859Z"/>';case J.MAKE_FULLSCREEN:return'<polygon points="21 2 21 4 26.59 4 17 13.58 18.41 15 28 5.41 28 11 30 11 30 2 21 2"/><polygon points="15 18.42 13.59 17 4 26.59 4 21 2 21 2 30 11 30 11 28 5.41 28 15 18.42"/>';case J.EXIT_FULLSCREEN:return'<polygon points="4 18 4 20 10.586 20 2 28.582 3.414 30 12 21.414 12 28 14 28 14 18 4 18"/><polygon points="30 3.416 28.592 2 20 10.586 20 4 18 4 18 14 28 14 28 12 21.414 12 30 3.416"/>';case J.SHOW_AS_DATATABLE:return'<rect x="4" y="6" width="18" height="2"/><rect x="4" y="12" width="18" height="2"/><rect x="4" y="18" width="18" height="2"/><rect x="4" y="24" width="18" height="2"/><rect x="26" y="6" width="2" height="2"/><rect x="26" y="12" width="2" height="2"/><rect x="26" y="18" width="2" height="2"/><rect x="26" y="24" width="2" height="2"/>';case J.EXPORT_CSV:case J.EXPORT_JPG:case J.EXPORT_PNG:return'<path d="M22.4478,21A10.855,10.855,0,0,0,25,14,10.99,10.99,0,0,0,6,6.4658V2H4v8h8V8H7.332a8.9768,8.9768,0,1,1-2.1,8H3.1912A11.0118,11.0118,0,0,0,14,25a10.855,10.855,0,0,0,7-2.5522L28.5859,30,30,28.5859Z"/>';default:throw Error("Not supported toolbar control type: "+t)}}};$g.buttonID=0;let Fg=$g;const zg=class t extends Hm{constructor(e,n,i,r){super(e,n,r),this.type="layout",this.configs=r,this.children=i,this._instanceID=t.instanceID++,this.init()}init(){this.children.forEach((t=>{t.components.forEach((t=>{t.init()}))}))}getPreferedAndFixedSizeSum(){const t=this.parent;let e=0;return t.selectAll(`div.layout-child-${this._instanceID}`).filter((t=>{const e=dc(t,"growth");return e===Y.PREFERRED||e===Y.FIXED})).each((function(t){e+=t.size})),e}getNumOfStretchChildren(){return this.parent.selectAll(`div.layout-child-${this._instanceID}`).filter((t=>dc(t,"growth")===Y.STRETCH)).size()}render(t=!0){const e=this.model.getOptions(),n=this.parent,{width:i,height:r}=Uf.getHTMLElementSize(n.node()),o=this.configs.direction===W.ROW||this.configs.direction===W.ROW_REVERSE,s=dc(this.model.getOptions(),"style","prefix"),a=n.classed(`${cl}--${s}--layout-row`,this.configs.direction===W.ROW).classed(`${cl}--${s}--layout-row-reverse`,this.configs.direction===W.ROW_REVERSE).classed(`${cl}--${s}--layout-column`,this.configs.direction===W.COLUMN).classed(`${cl}--${s}--layout-column-reverse`,this.configs.direction===W.COLUMN_REVERSE).classed(`${cl}--${s}--layout-alignitems-center`,this.configs.alignItems===Z.CENTER).selectAll(`div.layout-child-${this._instanceID}`).data(this.children,(t=>t.id));a.enter().append("div").merge(n.selectAll(`div.layout-child-${this._instanceID}`)).attr("class",(t=>`layout-child layout-child-${this._instanceID} ${t.id}`)).each((function(n){n.components.forEach((i=>{var r;const o=Tu(this),s=dc(n,"renderType")===I.SVG;i.setParent(s?Uf.appendOrSelect(o,"svg.layout-svg-wrapper").attr("width","100%").attr("height","100%"):o),s&&!o.select("svg.layout-svg-wrapper").attr("aria-label")&&o.select("svg.layout-svg-wrapper").attr("aria-label",(null==(r=null==e?void 0:e.accessibility)?void 0:r.svgAriaLabel)||(null==e?void 0:e.title));const a=dc(n,"growth");(a===Y.PREFERRED||a===Y.FIXED)&&i.render(t)}))})),n.selectAll(`div.layout-child-${this._instanceID}`).style("height",null).style("width",null).each((function(t){const e=dc(t,"growth"),n=dc(t,"renderType")===I.SVG?Uf.getSVGElementSize(Tu(this).select("svg.layout-svg-wrapper"),{useBBox:!0}):Uf.getHTMLElementSize(this);if(e===Y.PREFERRED){const e=o?n.width:n.height,s=o?i:r;t.size=e/s*100}})),a.exit().remove(),this.children.filter((t=>dc(t,"growth")===Y.STRETCH)).forEach((t=>{t.size=(100-+this.getPreferedAndFixedSizeSum())/+this.getNumOfStretchChildren()}));const l=n.selectAll(`div.layout-child-${this._instanceID}`).data(this.children,(t=>t.id));o?l.style("width",(t=>t.size/100*i+"px")).style("height","100%"):l.style("height",(t=>t.size/100*r+"px")).style("width","100%"),l.each((function(e){e.components.forEach((n=>{dc(e,"growth")===Y.STRETCH&&n.render(t)}))}))}setModel(t){super.setModel(t),this.children.forEach((e=>{e.components.forEach((e=>e.setModel(t)))}))}setServices(t){super.setServices(t),this.children.forEach((e=>{e.components.forEach((e=>e.setServices(t)))}))}destroy(){this.children.forEach((t=>{t.components.forEach((t=>t.destroy()))}))}};zg.instanceID=Math.floor(99999999999*Math.random());let jg=zg;class Vg extends Hm{constructor(){super(...arguments),this.type="spacer"}render(t=!1){this.getComponentContainer({isPresentational:!0}).style("width",`${this.configs.size||wl}px`).style("height",`${this.configs.size||wl}px`).attr("opacity",0)}}class Gg extends Hm{constructor(t,e,n){super(t,e,n),this.type="modal",this.isEventListenerAdded=!1,this.handleShowModal=()=>{const t=this.services.domUtils.getChartID();this.modal.attr("data-modal",!0).attr("class","cds--modal").attr("role","dialog").attr("aria-modal",!0).attr("aria-labelledby",`${t}__modal-title`).attr("aria-describedby",`${t}__modal-description`).attr("tabindex",-1).style("opacity",1).style("visibility","visible"),this.modal.html(this.getModalHTML()),this.modal.select("div.cds--modal-footer button.cds--btn").on("click",(()=>this.model.exportToCSV())),this.modal.on("click",this.handleHideModal),this.modal.select(".cds--modal-container").on("click",(t=>{t.stopPropagation()})),this.modal.select(".cds--modal-close").on("click",this.handleHideModal),typeof window<"u"&&window.addEventListener("keydown",this.handleEscapeKey)},this.handleEscapeKey=t=>{"Escape"===t.key&&this.handleHideModal()},this.handleHideModal=()=>{this.modal.attr("role",null).attr("aria-modal",null).attr("aria-labelledby",null).attr("aria-describedby",null).attr("tabindex",null).style("opacity",0).style("visibility","hidden"),this.modal.on("click",null),this.modal.select(".cds--modal-container").on("click",null),this.modal.select(".cds--modal-close").on("click",null),typeof window<"u"&&window.removeEventListener("keydown",this.handleEscapeKey)},this.init()}addEventListeners(){this.services.events.addEventListener(R.Modal.SHOW,this.handleShowModal)}removeEventListeners(){this.services.events.removeEventListener(R.Modal.SHOW,this.handleShowModal)}getModalHTML(){const t=this.services.domUtils.getChartID(),e=this.model.getOptions(),{title:n,downloadAsCSV:i}=dc(e,"locale","translations","tabularRep"),r=dc(e,"style","prefix"),o=this.model.getTabularDataArray();return`\n\t\t<div class="cds--modal-container">\n\t\t\t<div class="cds--modal-header">\n\n\t\t\t\t<p class="cds--modal-header__label cds--type-delta" id="modal-title">${n}</p>\n\n\t\t\t\t<p class="cds--modal-header__heading cds--type-beta" id="${t}__modal-description">${Hg(e.title)}</p>\n\n\t\t\t\t<button class="cds--modal-close" type="button" data-modal-close aria-label="close modal" data-modal-primary-focus>\n\t\t\t\t\t<svg focusable="false" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" fill="currentColor" aria-label="Close" width="20" height="20" viewBox="0 0 32 32" role="img" class="cds--modal-close__icon">\n\t\t\t\t\t\t<path d="M24 9.4L22.6 8 16 14.6 9.4 8 8 9.4 14.6 16 8 22.6 9.4 24 16 17.4 22.6 24 24 22.6 17.4 16 24 9.4z"></path>\n\t\t\t\t\t</svg>\n\t\t\t\t</button>\n\t\t\t</div>\n\n\t\t\t<div class="cds--modal-content">\n\t\t\t\t<table class="cds--data-table cds--data-table--no-border">\n\t\t\t\t\t<thead>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t${En(o,0).map((t=>`<th scope="col">\n\t\t\t\t\t\t\t\t<div class="cds--table-header-label">${Hg(t)}</div>\n\t\t\t\t\t\t\t</th>`)).join("")}\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</thead>\n\n\t\t\t\t\t<tbody>${o.slice(1).map((t=>`\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t${t.map((t=>`<td>${Hg(t)}</td>`)).join("")}\n\t\t\t\t\t\t\t</tr>`)).join("")}\n\t\t\t\t\t</tbody>\n\t\t\t\t</table>\n\t\t\t</div>\n\n\t\t\t<div class="cds--modal-footer">\n\t\t\t <div class="${cl}--${r}-modal-footer-spacer"></div>\n\t\t\t <button class="cds--btn cds--btn--primary" type="button" data-modal-primary-focus>${i}</button>\n\t\t\t</div>\n\t\t</div>`}render(t=!1){const e=this.model.getOptions();if(!this.isEventListenerAdded){const t=Tu(this.services.domUtils.getHolder()),n=dc(e,"style","prefix");this.modal=Uf.appendOrSelect(t,`div.${cl}--${n}--modal`),this.addEventListeners(),this.isEventListenerAdded=!0}}destroy(){this.removeEventListeners(),this.isEventListenerAdded=!1}}class Wg extends Hm{constructor(){super(...arguments),this.type="title",this.renderType=I.HTML}render(t=!1){const e=this.getComponentContainer(),n=dc(this.getOptions(),"title"),i=e.selectAll("p.title").data([n]);if(i.enter().append("p").classed("title",!0).attr("role","heading").attr("aria-level",2).merge(i).html((t=>Hg(t))),i.node()&&i.node().offsetWidth<i.node().scrollWidth){const t=this;i.on("mouseover",(function(e){t.services.events.dispatchEvent(R.Tooltip.SHOW,{event:e,hoveredElement:i,content:i.text()})})).on("mousemove",(function(e){t.services.events.dispatchEvent(R.Tooltip.MOVE,{event:e})})).on("mouseout",(function(){t.services.events.dispatchEvent(R.Tooltip.HIDE)}))}i.exit().remove()}truncateTitle(t,e){if(e<=0)return;const n=t.text();if(t.node().getComputedTextLength()>e){t.append("tspan").text("...");const i=Uf.appendOrSelect(t,"tspan").node().getComputedTextLength(),r=t.text(),o=this.getSubstringIndex(t.node(),0,r.length-1,e-i);t.html(r.substring(0,o-1)).append("tspan").text("...");const s=this;t.on("mouseover",(function(e){s.services.events.dispatchEvent(R.Tooltip.SHOW,{event:e,hoveredElement:t,content:n})})).on("mousemove",(function(t){s.services.events.dispatchEvent(R.Tooltip.MOVE,{event:t})})).on("mouseout",(function(){s.services.events.dispatchEvent(R.Tooltip.HIDE)}))}}getMaxTitleWidth(){return Uf.getSVGElementSize(this.parent.node(),{useAttrs:!0}).width}getSubstringIndex(t,e,n,i){const r=Math.floor((n+e)/2);return t.getSubStringLength(0,r)>i?this.getSubstringIndex(t,e,r,i):t.getSubStringLength(0,r)<i?t.getSubStringLength(0,r+1)>i?r:this.getSubstringIndex(t,r,n,i):r}}class Yg extends Hm{constructor(){super(...arguments),this.type="legend",this.renderType=I.HTML}render(t=!1){const e=this.getOptions(),n=dc(e,"legend"),i=dc(n,"alignment"),r=dc(e,"legend","orientation");let o=this.model.getDataGroups();const{DISABLED:s}=yl.items.status,a=o.some((t=>t.status===s)),l=dc(n,"order"),c=this.getComponentContainer().classed("center-aligned",i===j.CENTER).classed("right-aligned",i===j.RIGHT).classed(r,!0).classed("has-deactivated-items",a).attr("role",Zc.GROUP).attr("aria-label","Data groups").attr("data-name","legend-items");l&&(o=this.sortDataGroups(o,l));const u=c.selectAll("div.legend-item").data(o,(t=>t.name)),h=u.enter().append("div").attr("class","legend-item");h.merge(c.selectAll("div.legend-item")).classed("active",(function(t){return t.status===yl.items.status.ACTIVE}));const d=dc(this.getOptions(),"legend","clickable");c.classed("clickable",d&&o.length>1);const f=yl.checkbox.radius,p=h.append("div").classed("checkbox",!0),m=p.merge(u.select("div.checkbox")).attr("role",Zc.CHECKBOX).attr("tabindex",d?0:-1).attr("aria-labelledby",((t,e)=>this.services.domUtils.generateElementIDString(`legend-datagroup-${e}-title`))).attr("aria-checked",(({status:t})=>t===yl.items.status.ACTIVE)).attr("width",2*f).attr("height",2*f).attr("class",(t=>this.model.getColorClassName({classNameTypes:[N.BACKGROUND],dataGroupName:t.name,originalClassName:"checkbox"}))).style("background",(t=>t.status===yl.items.status.ACTIVE?this.model.getFillColor(t.name)||this.model.getStrokeColor(t.name):null)).classed("active",(function(t){return t.status===yl.items.status.ACTIVE}));p.append("svg").attr("focusable",!1).attr("preserveAspectRatio","xMidYMid meet").attr("xmlns","http://www.w3.org/2000/svg").attr("width","11").attr("height","11").attr("viewBox","0 0 31 28").attr("aria-hidden",!0).style("will-change","transform").append("path").attr("d","M13 21.2l-7.1-7.1-1.4 1.4 7.1 7.1L13 24 27.1 9.9l-1.4-1.5z"),h.append("p").merge(u.select("p"));const g=dc(e,"legend","additionalItems");if(g&&o.length){const t=this,e=c.selectAll("div.additional-item").data(g);e.exit().remove();const n=e.enter().append("div").merge(e).classed("legend-item",!0).classed("additional",!0).attr("aria-labelledby",((t,e)=>this.services.domUtils.generateElementIDString(`legend-datagroup-${m.size()+e}-title`)));n.selectAll("*").remove();let i,r=1;n.append("svg").classed("icon",!0).each((function(e){const n=Tu(this);i&&i==e.type?r++:(i=e.type,r=1),t.addAdditionalItem(n,e,r)})),n.append("p").merge(n.select("p")),this.truncateLegendText()}u.exit().on("mouseover",null).on("click",null).on("mouseout",null).remove(),d&&h.size()>1&&this.addEventListeners()}sortDataGroups(t,e){if(t.sort(((t,n)=>e.indexOf(t.name)-e.indexOf(n.name))),e.length<t.length){const n=t.length-e.length;return t.slice(n).concat(t.slice(0,n))}return t}addAdditionalItem(t,e,n){const{width:i,height:r}=yl.area;if(e.type===et.RADIUS?t.style("width",`${r}px`).style("height",`${r}px`):t.style("width",`${i}px`).style("height",`${r}px`),e.type===et.RADIUS){const{iconData:n,fill:i,stroke:r}=yl.radius;t.attr("fill","none").selectAll("circle").data(n).enter().append("circle").classed("radius",!0).attr("role",Zc.IMG).attr("aria-label","radius").attr("cx",(t=>t.cx)).attr("cy",(t=>t.cy)).attr("r",(t=>t.r)).style("fill",e.fill?e.fill:i).style("stroke",e.stroke?e.stroke:r)}else if(e.type===et.LINE){const r=yl.line;t.select("line.line").empty()&&t.append("line").classed(`line-${n}`,!0).attr("role",Zc.IMG).attr("aria-label","line").attr("x1",0).attr("y1",r.yPosition).attr("x2",i).attr("y2",r.yPosition).style("stroke",e.stroke?e.stroke:r.stroke).style("stroke-width",r.strokeWidth)}else if(e.type===et.AREA)t.select("rect.area").empty()&&t.append("rect").classed(`area-${n}`,!0).attr("role",Zc.IMG).attr("aria-label","area").attr("width",i).attr("height",r).style("fill",n>3&&!e.fill?yl.area.fill:e.fill).style("stroke",e.stroke);else if(e.type===et.SIZE){const{iconData:n,fill:i,stroke:r}=yl.size;t.attr("fill","none").attr("role",Zc.IMG).attr("aria-label","size").selectAll("rect").data(n).enter().append("rect").classed("size",!0).attr("width",(t=>t.width)).attr("height",(t=>t.height)).attr("y",(()=>0)).style("fill",e.fill?e.fill:i).style("stroke",e.stroke?e.stroke:r).style("stroke-width",1)}else if(e.type===et.QUARTILE){const{iconData:e}=yl.quartile;t.selectAll("rect").attr("role",Zc.IMG).attr("aria-label","quartile").data(e).enter().append("rect").attr("class",((t,e)=>"quartile-"+(0===e?"wrapper":"line"))).attr("x",(t=>t.x)).attr("y",(t=>t.y)).attr("width",(t=>t.width)).attr("height",(t=>t.height))}else if(e.type===et.ZOOM){const{iconData:n,color:i}=dc(yl,"zoom"),r=t.attr("role",Zc.IMG).attr("aria-label","zoom").selectAll("g.icon").data(n).enter();r.append("g").attr("x",(t=>t.x)).attr("y",(t=>t.y)).attr("width",(t=>t.width)).attr("height",(t=>t.height)).append("polygon").attr("points","7.7 4.82 5.78 4.82 5.78 2.89 4.82 2.89 4.82 4.82 2.89 4.82 2.89 5.78 4.82 5.78 4.82 7.7 5.78 7.7 5.78 5.78 7.7 5.78 7.7 4.82").attr("fill",(()=>e.color?e.color:i)),r.append("path").attr("d","M9.36,8.67A5.22,5.22,0,0,0,10.59,5.3,5.3,5.3,0,1,0,5.3,10.59,5.22,5.22,0,0,0,8.67,9.36L12.32,13l.68-.68Zm-4.06,1A4.34,4.34,0,1,1,9.63,5.3,4.33,4.33,0,0,1,5.3,9.63Z").attr("fill",(()=>e.color?e.color:i))}}truncateLegendText(){const t=this.getComponentContainer(),e=dc(this.getOptions(),"legend","truncation"),n=dc(e,"type"),i=dc(e,"threshold"),r=dc(e,"numCharacter"),o=t.selectAll("div.legend-item p");o.attr("id",(function(){return(this.parentNode.querySelector("div.checkbox")||this.parentNode).getAttribute("aria-labelledby")})),n!==H.NONE?o.html((function(t){const e=Hg(t.name);return e.length>i&&e.length!==r?uc(e,n,r):e})):o.html((t=>Hg(t.name)))}addEventListeners(){const t=this,e=this.getComponentContainer(),n=this.getOptions(),i=dc(n,"legend"),r=dc(i,"truncation");e.selectAll("div.legend-item").on("mouseover",(function(e){t.services.events.dispatchEvent(R.Legend.ITEM_HOVER,{hoveredElement:Tu(this)});const n=Tu(this);n.select("div.checkbox").classed("hovered",!0);const i=n.datum();i.name.length>r.threshold&&r.numCharacter<i.name.length&&r.type!==H.NONE&&t.services.events.dispatchEvent(R.Tooltip.SHOW,{event:e,hoveredElement:n,content:i.name})})).on("mousemove",(function(e){Tu(this).datum().name.length>r.threshold&&r.type!==H.NONE&&t.services.events.dispatchEvent(R.Tooltip.MOVE,{event:e})})).on("click",(function(){t.services.events.dispatchEvent(R.Legend.ITEM_CLICK,{clickedElement:Tu(this)});const e=Tu(this).datum();t.model.toggleDataLabel(e.name)})).on("mouseout",(function(){const e=Tu(this);e.select("div.checkbox").classed("hovered",!1),e.datum().name.length>r.threshold&&r.type!==H.NONE&&t.services.events.dispatchEvent(R.Tooltip.HIDE),t.services.events.dispatchEvent(R.Legend.ITEM_MOUSEOUT,{hoveredElement:e})})),e.selectAll("div.legend-item div.checkbox").on("keyup",(function(e){e.key&&"Tab"===e.key&&t.services.events.dispatchEvent(R.Legend.ITEM_HOVER,{hoveredElement:Tu(this)})})),e.selectAll("div.legend-item div.checkbox").on("keydown",(function(e,n){e.key&&" "===e.key?(e.preventDefault(),t.model.toggleDataLabel(n.name)):e.key&&"Tab"===e.key&&t.services.events.dispatchEvent(R.Legend.ITEM_MOUSEOUT,{hoveredElement:Tu(this)})})),e.selectAll("g.additional-item").on("mouseover",(function(e){const n=Tu(this),i=n.datum();i.name.length>r.threshold&&t.services.events.dispatchEvent(R.Tooltip.SHOW,{event:e,hoveredElement:n,content:i.name})}))}}class Zg extends Hm{constructor(t,e,n){super(t,e,n),this.type="chart-clip",this.renderType=I.SVG,this.chartClipId="chart-clip-id-"+Math.floor(99999999999*Math.random()),this.init()}init(){this.model.set({chartClipId:this.chartClipId},{skipUpdate:!0})}render(t=!0){this.createClipPath()}createClipPath(){const t=this.parent,{cartesianScales:e}=this.services;if(!e)throw new Error("Service cartesianScales was undefined");const n=e.getMainXScale(),i=e.getMainYScale(),[r,o]=n.range(),[s,a]=i.range();if(!t)throw new Error("svg is undefined");this.chartClipPath=Uf.appendOrSelect(t,`clipPath.${this.type}`).attr("id",this.chartClipId);const l=Uf.appendOrSelect(this.chartClipPath,`rect.${this.type}`);o-r>0&&l.attr("x",r).attr("y",a).attr("width",o-r).attr("height",s-a),this.chartClipPath.merge(l).lower()}}class qg extends Zg{constructor(){super(...arguments),this.type="canvas-chart-clip",this.chartClipId="canvas-chart-clip-id-"+Math.floor(99999999999*Math.random())}createClipPath(){const t=this.parent,{width:e,height:n}=Uf.getSVGElementSize(this.parent,{useAttrs:!0});this.chartClipPath=Uf.appendOrSelect(t,`clipPath.${this.type}`).attr("id",this.chartClipId);const i=Uf.appendOrSelect(this.chartClipPath,`rect.${this.type}`);i.attr("x",0).attr("y",0).attr("width",e).attr("height",n),this.chartClipPath.merge(i).lower()}}var Xg,Kg;!function(t){t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom"}(Kg||(Kg={}));var Qg=((Xg={})[Kg.LEFT]=function(t,e,n){return{top:t.top-Math.round(e.offsetHeight/2)+Math.round(n.height/2),left:Math.round(t.left-e.offsetWidth)}},Xg[Kg.RIGHT]=function(t,e,n){return{top:t.top-Math.round(e.offsetHeight/2)+Math.round(n.height/2),left:Math.round(t.left+n.width)}},Xg[Kg.TOP]=function(t,e,n){return{top:Math.round(t.top-e.offsetHeight),left:t.left-Math.round(e.offsetWidth/2)+Math.round(n.width/2)}},Xg[Kg.BOTTOM]=function(t,e,n){return{top:Math.round(t.top+n.height),left:t.left-Math.round(e.offsetWidth/2)+Math.round(n.width/2)}},Xg),Jg=typeof window<"u"?window:{innerHeight:0,innerWidth:0},tv=function(){function t(t){void 0===t&&(t={}),this.positions=Qg,this.positions=Object.assign({},Qg,t)}return t.prototype.getRelativeOffset=function(t){for(var e={left:t.offsetLeft,top:t.offsetTop};t.offsetParent&&"static"===getComputedStyle(t.offsetParent).position;)e.left+=t.offsetLeft,e.top+=t.offsetTop,t=t.offsetParent;return e},t.prototype.getAbsoluteOffset=function(t){for(var e=t,n={top:0,left:0};e.offsetParent;){var i=getComputedStyle(e.offsetParent);"static"===i.position&&i.marginLeft&&i.marginTop&&(parseInt(i.marginTop,10)&&(n.top+=parseInt(i.marginTop,10)),parseInt(i.marginLeft,10)&&(n.left+=parseInt(i.marginLeft,10))),e=e.offsetParent}var r=t.getBoundingClientRect(),o=document.body.getBoundingClientRect();return{top:r.top-o.top+n.top,left:r.left-o.left+n.left}},t.prototype.findRelative=function(t,e,n){var i=this.getRelativeOffset(t),r=t.getBoundingClientRect();return this.calculatePosition(i,r,e,n)},t.prototype.findAbsolute=function(t,e,n){var i=this.getAbsoluteOffset(t),r=t.getBoundingClientRect();return this.calculatePosition(i,r,e,n)},t.prototype.findPosition=function(t,e,n,i){void 0===i&&(i=this.getAbsoluteOffset.bind(this));var r=i(t),o=t.getBoundingClientRect();return this.calculatePosition(r,o,e,n)},t.prototype.findPositionAt=function(t,e,n){return this.calculatePosition(t,{top:0,left:0,height:0,width:0},e,n)},t.prototype.getPlacementBox=function(t,e){var n=t.offsetHeight+e.top,i=t.offsetWidth+e.left;return{top:e.top,bottom:n,left:e.left,right:i}},t.prototype.addOffset=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),Object.assign({},t,{top:t.top+e,left:t.left+n})},t.prototype.setElement=function(t,e){t.style.top=e.top+"px",t.style.left=e.left+"px"},t.prototype.findBestPlacement=function(t,e,n,i,r){var o=this;void 0===i&&(i=this.defaultContainerFunction.bind(this)),void 0===r&&(r=this.findPosition.bind(this));var s=n.map((function(n){var s=r(t,e,n),a=o.getPlacementBox(e,s),l=0,c=0,u=i();a.top<u.top?l=u.top-a.top:a.bottom>u.height&&(l=a.bottom-u.height),a.left<u.left?c=u.left-a.left:a.right>u.width&&(c=a.right-u.width),l&&!c?c=1:c&&!l&&(l=1);var h=e.offsetHeight*e.offsetWidth;return{placement:n,weight:(h-l*c)/h}}));return s.sort((function(t,e){return e.weight-t.weight})),s[0].placement},t.prototype.findBestPlacementAt=function(t,e,n,i){var r=this;return void 0===i&&(i=this.defaultContainerFunction.bind(this)),this.findBestPlacement(null,e,n,i,(function(e,n,i){return r.findPositionAt(t,n,i)}))},t.prototype.defaultContainerFunction=function(){return{top:0,left:0,height:Jg.innerHeight,width:Jg.innerWidth}},t.prototype.calculatePosition=function(t,e,n,i){return this.positions[i]?this.positions[i](t,n,e):(console.error("No function found for placement, defaulting to 0,0"),{left:0,top:0})},t}();new tv;class ev extends Hm{constructor(t,e,n){super(t,e,n),this.type="tooltip",this.renderType=I.HTML,this.isEventListenerAdded=!1,this.lastTriggeredEventType="",this.positionService=new tv,this.handleShowTooltip=t=>{const e=t.detail.data||t.detail.items,n=Tu(t.detail.event.target).datum();let i;const r=this.formatItems(this.getItems(t));i=t.detail.content?`<div class="title-tooltip"><p>${Bg(t.detail.content)}</p></div>`:Bg(this.getTooltipHTML(r));const o=Uf.appendOrSelect(this.tooltip,"div.content-box");if(dc(this.getOptions(),"tooltip","customHTML"))if(t.detail.content){const e=`<div class="title-tooltip"><p>${Bg(t.detail.content)}</p></div>`;o.html(e)}else o.html(`<div class="title-tooltip"><p>${Bg(this.model.getOptions().tooltip.customHTML(e,i,n))}</p></div>`);else o.html(i);o.selectAll(".datapoint-tooltip").each((function(t,e){const n=r[e];r[e]&&r[e].color&&Tu(this).select(".tooltip-color").attr("class","tooltip-color").style("background-color",n.color)})),this.positionTooltip(t),this.tooltip.classed("hidden",!1).attr("aria-hidden",!1),this.lastTriggeredEventType=t.type},this.handleHideTooltip=()=>{this.tooltip.classed("hidden",!0).attr("aria-hidden",!0)},this.init()}addTooltipEventListener(){this.services.events.addEventListener(R.Tooltip.MOVE,(t=>{this.lastTriggeredEventType!==R.Toolbar.SHOW_TOOLTIP&&!1===this.tooltip.classed("hidden")&&this.positionTooltip(t)})),this.services.events.addEventListener(R.Tooltip.SHOW,this.handleShowTooltip),this.services.events.addEventListener(R.Tooltip.HIDE,this.handleHideTooltip),this.services.events.addEventListener(R.Chart.MOUSEOUT,this.handleHideTooltip),this.services.events.addEventListener(R.Toolbar.SHOW_TOOLTIP,this.handleShowTooltip),this.services.events.addEventListener(R.Toolbar.HIDE_TOOLTIP,this.handleHideTooltip)}removeTooltipEventListener(){this.services.events.removeEventListener(R.Tooltip.MOVE,null),this.services.events.removeEventListener(R.Tooltip.SHOW,this.handleShowTooltip),this.services.events.removeEventListener(R.Tooltip.HIDE,this.handleHideTooltip),this.services.events.removeEventListener(R.Chart.MOUSEOUT,this.handleHideTooltip),this.services.events.removeEventListener(R.Toolbar.SHOW_TOOLTIP,this.handleShowTooltip),this.services.events.removeEventListener(R.Toolbar.HIDE_TOOLTIP,this.handleHideTooltip)}getItems(t){return t.detail.items?t.detail.items:[]}formatItems(t){const e=this.getOptions(),n=dc(e,"tooltip","truncation","type"),i=dc(e,"tooltip","truncation","threshold"),r=dc(e,"tooltip","truncation","numCharacter");return n!==H.NONE?t.map((t=>{const e=t.labelIcon?12:0;return t.value=t.value?this.valueFormatter(t.value,t.label):t.value,t.label&&t.label.length+e>i&&(t.label=uc(t.label,n,r)),t.value&&t.value.length>i&&(t.value=uc(t.value,n,r)),t})):t.map((t=>(t.value=t.value?this.valueFormatter(t.value,t.label):t.value,t)))}getTooltipHTML(t){return'<ul class="multi-tooltip">'+t.map((t=>`<li>\n\t\t\t\t\t<div class="datapoint-tooltip${t.bold?" bold":""}">\n\t\t\t\t\t\t${t.class||t.color?`<div class="tooltip-color ${t.class}"></div>`:""}\n\t\t\t\t\t\t<div class="label">\n\t\t\t\t\t\t<p>${t.label||""}</p>\n\t\t\t\t\t\t${t.labelIcon?`<span class="label-icon"/>${t.labelIcon}</span>`:""}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t${void 0===t.value||null===t.value?"":`<p class="value"/>${t.value}</p>`}\n\t\t\t\t\t</div>\n\t\t\t\t</li>`)).join("")+"</ul>"}isDate(t){return t instanceof Date}valueFormatter(t,e){const n=this.getOptions(),i=dc(n,"tooltip","valueFormatter"),{code:r,number:o,date:s}=dc(n,"locale");if(i)return i(t,e);if(this.isDate(t))return s(t,r,{month:"short",day:"numeric",year:"numeric"});try{if("string"==typeof t&&/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/.test(t))return s(new Date(t),r,{month:"short",day:"numeric",year:"numeric"})}catch{}return o(t,r)}render(t=!1){const e=this.getOptions(),n=dc(e,"tooltip","enabled");if(n){const t=Tu(this.services.domUtils.getHolder()),n=dc(e,"style","prefix");this.tooltip=Uf.appendOrSelect(t,`div.${cl}--${n}--tooltip`),this.tooltip.style("max-width",null).attr("role","tooltip"),this.isEventListenerAdded||(this.addTooltipEventListener(),this.isEventListenerAdded=!0),this.tooltip.classed("hidden",!0)}else!n&&this.isEventListenerAdded&&(this.removeTooltipEventListener(),this.isEventListenerAdded=!1)}addOffsetByPlacement(t,e,n){const i=Object.assign({},t);return e==Kg.LEFT?i.left-=n:e==Kg.RIGHT?i.left+=n:e==Kg.TOP?i.top-=n:e==Kg.BOTTOM&&(i.top+=n),i}positionTooltip(t){const e=this.services.domUtils.getHolder(),n=e.offsetWidth,i=e.offsetHeight,r=this.tooltip.node(),o=this.getOptions(),s=dc(o,"zoomBar","top","enabled"),a=!!dc(t,"detail","noWrap"),l=Array.isArray(dc(t,"detail","placements")),c=l?dc(t,"detail","placements"):[Kg.RIGHT,Kg.LEFT,Kg.TOP,Kg.BOTTOM];let u,{horizontalOffset:h}=xl;const{defaultOffset:d}=xl;if(this.tooltip.select("div.title-tooltip").classed("title-tooltip-nowrap",a),l){const e=dc(t,"detail","event","target"),o=this.services.domUtils.getElementOffset(e,!0);u=this.positionService.findBestPlacementAt(o,r,c,(()=>({top:0,left:0,width:n,height:i})));let s=this.positionService.findPosition(e,r,u,(()=>this.services.domUtils.getElementOffset(e)));return s=this.addOffsetByPlacement(s,u,d),void this.positionService.setElement(r,s)}let f=dc(t,"detail","mousePosition");if(f){const t=dc(o,"zoomBar","top","type"),e=Tl.height[t];s&&(f[1]+=e+Tl.spacerHeight)}else f=Uo(dc(t,"detail","event"),e);u=f[0]/n>.9?Kg.LEFT:f[0]/n<.1?Kg.RIGHT:this.positionService.findBestPlacementAt({left:f[0],top:f[1]},r,c,(()=>({top:void 0,left:void 0,width:n,height:i}))),u===Kg.LEFT&&(h*=-1);const p=this.positionService.findPositionAt({left:f[0]+h,top:f[1]},r,u);this.positionService.setElement(r,p)}}const nv=class t extends Hm{constructor(){super(...arguments),this.type="grid-brush",this.renderType=I.SVG,this.selectionSelector="rect.selection",this.frontSelectionSelector="rect.frontSelection"}render(e=!0){const n=this.parent,i=this.getComponentContainer({isPresentational:!0});if(!n)throw new Error("SVG was not defined");const r=Uf.appendOrSelect(n,"svg.chart-grid-backdrop"),o=Uf.appendOrSelect(r,`g.${this.type}`),s=Uf.appendOrSelect(o,this.selectionSelector),{width:a,height:l}=Uf.getSVGElementSize(r,{useAttrs:!0}),{cartesianScales:c}=this.services,u=c.getMainXScaleType(),h=c.getMainXScale(),[d]=h.range();i.attr("transform",`translate(${d},0)`);const f=Uf.appendOrSelect(i,this.frontSelectionSelector);if(h&&u===F.TIME){let e=this.model.get("zoomDomain");void 0===e&&(e=this.services.zoom.getDefaultZoomBarDomain(),e&&this.model.set({zoomDomain:e},{animate:!1}));const n=e=>{const n=e[1]-e[0];let i="0,"+n.toString();const r=Math.floor(l/t.DASH_LENGTH),o=r*t.DASH_LENGTH;for(let e=0;e<r;e++)i+=","+t.DASH_LENGTH;i+=","+(l-o),r%2==1&&(i+=",0"),i+=","+n.toString(),i+=","+l.toString(),f.attr("stroke-dasharray",i)},i=t=>{const e=t.selection;null===e||e[0]===e[1]||(f.attr("x",parseFloat(s.attr("x"))+parseFloat(r.attr("x"))).attr("y",s.attr("y")).attr("width",s.attr("width")).attr("height",s.attr("height")).style("cursor","pointer").style("display",null),n(e))},c=(t,n)=>{const i=Hd().range([0,a]).domain(e);let r=[i.invert(t),i.invert(n)];r[0].valueOf()===r[1].valueOf()&&(r=this.services.zoom.getDefaultZoomBarDomain()),(e[0].valueOf()!==r[0].valueOf()||e[1].valueOf()!==r[1].valueOf())&&this.services.zoom.handleDomainChange(r)};let u;const h=t=>{const e=t.selection;null!==e&&(c(e[0],e[1]),o.call(u.move,null),f.style("display","none"))};0!=l&&0!=a&&(u=nm().extent([[0,0],[a-1,l]]).on("start brush end",i).on("end.brushed",h),o.call(u));const d=this.services.zoom.getZoomRatio();r.on("click",(function(t){if(t.shiftKey){const t=this.services.domUtils.getHolder(),e=Uo(o.node(),t)[0];let n=e-a*d/2;n<0&&(n=0);let i=e+a*d/2;i>a&&(i=a),c(n,i)}}))}}};nv.DASH_LENGTH=4;let iv=nv;class rv extends Hm{constructor(){super(...arguments),this.type="zoom-bar",this.renderType=I.SVG,this.MIN_SELECTION_DIFF=9e-10,this.brushSelector="g.zoom-bar-brush",this.clipId="zoomBarClip-"+Math.floor(99999999999*Math.random()),this.brush=nm(),this.highlightStrokeWidth=1}init(){this.services.events.addEventListener(R.ZoomBar.UPDATE,this.render.bind(this));const t=dc(this.getOptions(),"zoomBar",U.TOP,"data");this.model.setZoomBarData(t)}render(t=!0){const e=this.getComponentContainer({ariaLabel:"zoom bar"}),n=this.services.zoom.isZoomBarLoading(U.TOP),i=this.services.zoom.isZoomBarLocked(U.TOP),r=dc(this.getOptions(),"zoomBar",U.TOP,"type"),o=dc(this.getOptions(),"axes",U.BOTTOM,"highlights"),s=Tl.height[r],{width:a}=Uf.getSVGElementSize(this.parent,{useAttrs:!0});if(0===a)return;let l=0;const c=this.model.get("axesMargins");c&&c.left&&(l=c.left);const u=Uf.appendOrSelect(e,"svg.zoom-container").attr("width","100%").attr("height",s).attr("opacity",1);if(Uf.appendOrSelect(e,"rect.zoom-spacer").attr("x",0).attr("y",s).attr("width","100%").attr("height",Tl.spacerHeight).attr("opacity",1).attr("fill","none"),r===B.GRAPH_VIEW?Uf.appendOrSelect(u,"rect.zoom-bg").attr("x",l).attr("y",0).attr("width",a-l).attr("height","100%").classed("zoom-bg-skeleton",n).style("stroke",n?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null):r===B.SLIDER_VIEW&&Uf.appendOrSelect(u,"rect.zoom-slider-bg").attr("x",l).attr("y",s/2-1).attr("width",a-l).attr("height",2).classed("zoom-slider-bg-skeleton",n).style("stroke",n?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null),n)return void this.renderSkeleton(u,l,a);const{cartesianScales:h}=this.services,d=h.getMainXScale(),f=h.getMainYScale(),p=h.getMainXScaleType();if(d&&p===F.TIME){let t=this.services.zoom.getZoomBarData();if(function(t){if(null==t)return!0;if(Te(t)&&(Bt(t)||"string"==typeof t||"function"==typeof t.splice||Pe(t)||je(t)||De(t)))return!t.length;var e=li(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(Oe(t))return!qe(t).length;for(var n in t)if(Ki.call(t,n))return!1;return!0}(t)||1===t.length)return;this.xScale=d.copy(),this.yScale=f.copy();const n=this.services.zoom.getDefaultZoomBarDomain(t);t=this.compensateDataForDefaultDomain(t,n);const c=this.model.get("initialZoomDomain"),h=dc(this.getOptions(),"zoomBar",U.TOP,"initialZoomDomain");h&&h[0]&&h[1]&&(h[0]=new Date(h[0]),h[1]=new Date(h[1])),!h||c&&c[0].valueOf()===h[0].valueOf()&&c[1].valueOf()===h[1].valueOf()?null===h&&null!==c&&this.model.set({initialZoomDomain:null,zoomDomain:Qi([],n)},{skipUpdate:!0}):this.model.set({initialZoomDomain:Qi([],h),zoomDomain:h?Qi([],h):n},{skipUpdate:!0}),this.xScale.range([l,a]).domain(n),this.maxSelectionRange=this.xScale.range(),this.yScale.range([0,s-6]).domain(lr(t,(t=>t.value)));const p=this.model.get("zoomDomain");if(r===B.GRAPH_VIEW&&(this.renderZoomBarArea(u,"path.zoom-graph-area-unselected",t,null),this.updateClipPath(e,this.clipId,0,0,0,0),this.renderZoomBarArea(u,"path.zoom-graph-area",t,this.clipId),this.renderZoomBarBaseline(u,l,a),o)){const t=o.highlightStartMapsTo,e=o.highlightEndMapsTo,n=o.color,i=o.labelMapsTo;o.data.forEach(((r,o)=>{Uf.appendOrSelect(u,`rect.highlight-${o}`).attr("height",s-2*this.highlightStrokeWidth).attr("y",this.highlightStrokeWidth).attr("x",this.xScale(r[t])).attr("width",this.xScale(r[e])-this.xScale(r[t])).style("fill",n&&n.scale[r[i]]?n.scale[r[i]]:null).style("fill-opacity",.1).style("stroke",n&&n.scale[r[i]]?n.scale[r[i]]:null).style("stroke-dasharray","2, 2").attr("stroke-width","1px")}))}this.addBrushEventListener(p,l,a);const m=Uf.appendOrSelect(e,this.brushSelector).call(this.brush);if(void 0!==p)if(p[0].valueOf()===p[1].valueOf())m.call(this.brush.move,this.xScale.range()),this.updateBrushHandle(this.getComponentContainer(),this.xScale.range());else{const t=p.map((t=>this.xScale(t)));t[1]-t[0]<this.MIN_SELECTION_DIFF||(m.call(this.brush.move,t),this.updateBrushHandle(this.getComponentContainer(),t))}i&&(this.brush.filter((()=>!1)),m.selectAll("rect").attr("cursor","auto"))}}addBrushEventListener(t,e,n){const i=dc(this.getOptions(),"zoomBar",U.TOP,"type"),r=Tl.height[i];this.brush.extent([[e,0],[n,r]]).on("start brush end",null).on("start brush end",(e=>{const n=e.selection;null===n?this.handleBrushedEvent(e,t,this.xScale,this.xScale.range()):n[0]===n[1]||this.handleBrushedEvent(e,t,this.xScale,n)}))}handleBrushedEvent(t,e,n,i){const r=[n.invert(i[0]),n.invert(i[1])];if(this.updateBrushHandle(this.getComponentContainer(),i),null!=t.sourceEvent&&("mousemove"===t.sourceEvent.type||"mouseup"===t.sourceEvent.type||"mousedown"===t.sourceEvent.type||"touchstart"===t.sourceEvent.type||"touchmove"===t.sourceEvent.type||"touchend"===t.sourceEvent.type)){let n;(void 0===e||e[0]!==r[0]||e[1]!==r[1])&&this.services.zoom.handleDomainChange(r,{dispatchEvent:!1}),"start"===t.type?n=R.ZoomBar.SELECTION_START:"brush"===t.type?n=R.ZoomBar.SELECTION_IN_PROGRESS:"end"===t.type&&(n=R.ZoomBar.SELECTION_END,this.services.events.dispatchEvent(R.ZoomDomain.CHANGE,{newDomain:r})),this.services.events.dispatchEvent(n,{selection:i,newDomain:r})}}updateBrushHandle(t,e){const n=this,i=Tl.handleWidth,r=dc(this.getOptions(),"zoomBar",U.TOP,"type"),o=Tl.height[r],s=-i/2,a=Tl.handleBarWidth,l=r===B.GRAPH_VIEW?Tl.handleBarHeight:6,c=-a/2,u=(o-l)/2;t.select(this.brushSelector).selectAll("rect.handle").data([{type:"w"},{type:"e"}]).attr("x",(function(t){return"w"===t.type?Math.max(e[0]+s,n.maxSelectionRange[0]):"e"===t.type?Math.min(e[1]+s,n.maxSelectionRange[1]-i):void 0})).attr("y",0).attr("width",i).attr("height",o).attr("cursor","ew-resize").style("display",null);const h=t.select(this.brushSelector).selectAll("rect.handle-bar").data([{type:"w"},{type:"e"}]);h.enter().append("rect").attr("class",(function(t){return"handle-bar handle-bar--"+t.type})),h.attr("x",(function(t){return"w"===t.type?Math.max(e[0]+c,n.maxSelectionRange[0]-s+c):"e"===t.type?Math.min(e[1]+c,n.maxSelectionRange[1]+s+c):void 0})).attr("y",u).attr("width",a).attr("height",l).attr("cursor","ew-resize"),r===B.SLIDER_VIEW&&this.updateSliderSelectedArea(e),this.updateClipPath(t,this.clipId,e[0],0,e[1]-e[0],o)}updateSliderSelectedArea(t){const e=dc(this.getOptions(),"zoomBar",U.TOP,"type"),n=Tl.height[e],i=this.getComponentContainer().select("svg.zoom-container");Uf.appendOrSelect(i,"rect.zoom-slider-selected-area").attr("x",t[0]).attr("y",n/2-1).attr("width",t[1]-t[0]).attr("height",2)}renderZoomBarArea(t,e,n,i){const{cartesianScales:r}=this.services,o=r.getMainXAxisPosition(),s=r.getMainYAxisPosition(),a=r.getMainXScaleType(),l=r.getMainYScaleType(),c=(t,e,n)=>i=>r.getValueFromScale(t,e,n,i),u=c(this.xScale,a,o),h=c(this.yScale,l,s),d=dc(this.getOptions(),"zoomBar",U.TOP,"type"),f=Tl.height[d],p=Um().x((t=>u(t))).y0(f).y1((t=>f-h(t))),m=Uf.appendOrSelect(t,e).datum(n).attr("d",p);i&&m.attr("clip-path",`url(#${i})`)}updateClipPath(t,e,n,i,r,o){const s=Uf.appendOrSelect(t,"clipPath").attr("id",e);Uf.appendOrSelect(s,"rect").attr("x",n).attr("y",i).attr("width",r).attr("height",o)}compensateDataForDefaultDomain(t,e){if(!t||t.length<2)return;const n=Oi(t),i=this.services.cartesianScales.getDomainIdentifier(),r=this.services.cartesianScales.getRangeIdentifier();if(Number(e[0])<Number(n[0][i])){const t={};t[i]=e[0],t[r]=0,n.unshift(t)}if(Number(e[1])>Number(n[n.length-1][i])){const t={};t[i]=e[1],t[r]=0,n.push(t)}return n}renderZoomBarBaseline(t,e,n,i=!1){const r=dc(this.model.getOptions(),"zoomBar",U.TOP,"type"),o=Tl.height[r],s=Nm()([[e,o],[n,o]]);Uf.appendOrSelect(t,"path.zoom-bg-baseline").attr("d",s).classed("zoom-bg-baseline-skeleton",i).style("stroke",i?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}renderSkeleton(t,e,n){this.renderZoomBarArea(t,"path.zoom-graph-area-unselected",[],null),this.renderZoomBarArea(t,"path.zoom-graph-area",[],this.clipId),this.brush.on("start brush end",null),Uf.appendOrSelect(this.getComponentContainer(),this.brushSelector).html(null),dc(this.getOptions(),"zoomBar",U.TOP,"type")===B.GRAPH_VIEW&&this.renderZoomBarBaseline(t,e,n,!0)}destroy(){this.brush.on("start brush end",null),this.services.events.removeEventListener(R.ZoomBar.UPDATE,this.render.bind(this))}}class ov extends Hm{constructor(t,e){super(t,e),this.type="threshold",this.renderType=I.SVG,this.positionService=new tv}render(t=!1){const e=dc(this.getOptions(),"axes"),n=[];Object.keys(e).forEach((t=>{if(Object.values(U).includes(t)){const i=e[t];i.thresholds&&i.thresholds.length>0&&n.push({axisPosition:t,thresholds:i.thresholds,correspondingDatasets:null==i?void 0:i.correspondingDatasets,mapsTo:null==i?void 0:i.mapsTo})}}));const i=this.getComponentContainer({ariaLabel:"threshold lines",withinChartClip:!0}).selectAll("g.axis-thresholds").data(n,(t=>t.axisPosition));i.exit().attr("opacity",0).remove();const r=i.enter().append("g").merge(i);r.attr("class",(t=>`axis-thresholds ${t.axisPosition}`));const o=r.selectAll("g.threshold-group").data((t=>t.thresholds.map((e=>(e.axisPosition=t.axisPosition,e.datum=this.constructDatumObj(t,e),e)))));o.exit().attr("opacity",0).remove();const s=o.enter().append("g");s.append("line").attr("class","threshold-line"),s.append("rect").attr("class","threshold-hoverable-area"),s.merge(o).attr("class","threshold-group");const a=this;r.each((function({axisPosition:e}){const n=a.services.cartesianScales.getScaleByPosition(e),i=a.services.cartesianScales.getScaleTypeByPosition(e);let r=null,o=null;e===U.LEFT||e===U.RIGHT?(o=n,r=a.services.cartesianScales.getMainXScale()):(r=n,o=a.services.cartesianScales.getMainYScale());const s=i===F.LABELS,[l,c]=r.range(),[u,h]=o.range(),{cartesianScales:d}=a.services,f=d.getOrientation(),[p,m]=pc((t=>d.getDomainValue(t)),(t=>d.getRangeValue(t)),f),g=Tu(this);e===U.TOP||e===U.BOTTOM?(g.selectAll("line.threshold-line").transition().call((e=>a.services.transitions.setupTransition({transition:e,name:"threshold-line-update",animate:t}))).attr("y1",h).attr("y2",u).attr("x1",(({datum:t})=>p(t)+(s?n.step()/2:0))).attr("x2",(({datum:t})=>p(t)+(s?n.step()/2:0))).style("stroke",(({fillColor:t})=>t)),g.selectAll("rect.threshold-hoverable-area").attr("x",0).attr("y",(({datum:t})=>-p(t))).attr("width",Math.abs(u-h)).classed("rotate",!0)):(g.selectAll("line.threshold-line").transition().call((e=>a.services.transitions.setupTransition({transition:e,name:"threshold-line-update",animate:t}))).attr("x1",l).attr("x2",c).attr("y1",(({datum:t})=>m(t)+(s?n.step()/2:0))).attr("y2",(({datum:t})=>m(t)+(s?n.step()/2:0))).style("stroke",(({fillColor:t})=>t)),g.selectAll("rect.threshold-hoverable-area").attr("x",l).attr("y",(({datum:t})=>m(t))).attr("width",Math.abs(c-l)).classed("rotate",!1))})),this.services.events.addEventListener(R.Threshold.SHOW,(t=>{this.setThresholdLabelPosition(t.detail),this.label.classed("hidden",!1)})),this.services.events.addEventListener(R.Threshold.HIDE,(()=>{this.label.classed("hidden",!0)})),this.appendThresholdLabel(),this.addEventListeners()}getFormattedValue(t){const{value:e,axisPosition:n}=t,i=this.getOptions(),r=this.services.cartesianScales.getScaleTypeByPosition(n),{code:o,number:s}=dc(i,"locale");if(r===F.TIME){const t=[U.LEFT,U.RIGHT].includes(n),r=this.services.cartesianScales.getMainXScale(),o=this.services.cartesianScales.getMainYScale(),s=t?o:r,a=dc(i,"timeScale"),l=Vc(s.ticks(),dc(a,"timeInterval"));return zc(e,0,s.ticks(),l,a,i.locale)}return s(e,o)}appendThresholdLabel(){const t=Tu(this.services.domUtils.getHolder()),e=dc(this.getOptions(),"style","prefix");this.label=Uf.appendOrSelect(t,`div.${cl}--${e}--threshold--label`).classed("hidden",!0)}setThresholdLabelPosition({event:t,datum:e}){const n=this.services.domUtils.getHolder(),i=Uo(t,n),r=e.valueFormatter?e.valueFormatter(e.value):this.getFormattedValue(e);this.label.html(Hg(`${e.label||"Threshold"}: ${r}`)).style("background-color",e.fillColor);const o=this.label.node(),s=this.positionService.findBestPlacementAt({left:i[0],top:i[1]},o,[Kg.RIGHT,Kg.LEFT,Kg.TOP,Kg.BOTTOM],(()=>({top:void 0,left:void 0,width:n.offsetWidth,height:n.offsetHeight}))),a=this.positionService.findPositionAt({left:i[0],top:i[1]},o,s);this.positionService.setElement(o,a)}constructDatumObj(t,e){const n={};return t.correspondingDatasets&&(n.group=dc(t,"correspondingDatasets",0)),n[t.mapsTo]=e.value,n}addEventListeners(){const t=this;this.getComponentContainer({withinChartClip:!0}).selectAll("rect.threshold-hoverable-area").on("mouseover mousemove",(function(e){Tu(this.parentNode).select("line.threshold-line").classed("active",!0),t.services.events.dispatchEvent(R.Threshold.SHOW,{event:e,hoveredElement:Tu(this),datum:Tu(this).datum()})})).on("mouseout",(function(e){Tu(this.parentNode).select("line.threshold-line").classed("active",!1),t.services.events.dispatchEvent(R.Threshold.HIDE,{event:e,hoveredElement:Tu(this),datum:Tu(this).datum()})}))}}class sv extends Hm{constructor(t,e){super(t,e),this.type="highlight",this.renderType=I.SVG,this.positionService=new tv,this.highlightStrokeWidth=1}render(t=!1){const e=dc(this.getOptions(),"axes"),n=[];Object.keys(e).forEach((t=>{if(Object.values(U).includes(t)){const i=e[t];i.highlights&&i.highlights.data.length>0&&n.push({axisPosition:t,highlightStartMapsTo:i.highlights.highlightStartMapsTo,highlightEndMapsTo:i.highlights.highlightEndMapsTo,labelMapsTo:i.highlights.labelMapsTo,highlight:i.highlights.data,color:i.highlights.color})}}));const i=this.getComponentContainer({ariaLabel:"highlight areas",withinChartClip:!0}).selectAll("g.axis-highlight").data(n,(t=>t.axisPosition));i.exit().attr("opacity",0).remove();const r=i.enter().append("g").merge(i);r.attr("class",(t=>`axis-highlight ${t.axisPosition}`));const o=r.selectAll("g.highlight-group").data((t=>t.highlight.map((e=>(e.axisPosition=t.axisPosition,e.highlightStartMapsTo=t.highlightStartMapsTo,e.labelMapsTo=t.labelMapsTo,e.color=t.color,e.highlightEndMapsTo=t.highlightEndMapsTo,e)))));o.exit().attr("opacity",0).remove();const s=o.enter().append("g");s.append("rect").attr("class","highlight-bar"),s.append("line").attr("class","highlight-line"),s.merge(o).attr("class","highlight-group");const a=this;r.each((function({axisPosition:e}){const n=a.services.cartesianScales.getMainXScale(),i=a.services.cartesianScales.getMainYScale(),[r,o]=n.range(),[s,l]=i.range(),{cartesianScales:c}=a.services,u=c.getOrientation(),[h,d]=pc((t=>c.getDomainValue(t)),(t=>c.getRangeValue(t)),u),f=Tu(this);e===U.TOP||e===U.BOTTOM?f.selectAll("rect.highlight-bar").transition().call((e=>a.services.transitions.setupTransition({transition:e,name:"highlight-bar-update",animate:t}))).attr("y",Math.max(l+a.highlightStrokeWidth,0)).attr("height",Math.max(s-2*a.highlightStrokeWidth,0)).attr("x",(({highlightStartMapsTo:t,...e})=>h(e[t]))).attr("width",(({highlightStartMapsTo:t,highlightEndMapsTo:e,...n})=>Math.max(h(n[e])-h(n[t]),0))).style("stroke",(({color:t,labelMapsTo:e,...n})=>t&&t.scale[n[e]]?t.scale[n[e]]:null)).style("stroke-dasharray","2, 2").attr("stroke-width",a.highlightStrokeWidth+"px").style("fill-opacity",.1).style("fill",(({color:t,labelMapsTo:e,...n})=>t&&t.scale[n[e]]?t.scale[n[e]]:null)):f.selectAll("rect.highlight-bar").transition().call((e=>a.services.transitions.setupTransition({transition:e,name:"highlight-bar-update",animate:t}))).attr("x",r).attr("width",Math.max(o-r,0)).attr("y",(({highlightEndMapsTo:t,...e})=>d(e[t]))).attr("height",(({highlightStartMapsTo:t,highlightEndMapsTo:e,...n})=>Math.max(d(n[t])-d(n[e]),0))).style("stroke",(({color:t,labelMapsTo:e,...n})=>t&&t.scale[n[e]]?t.scale[n[e]]:null)).style("stroke-dasharray","2, 2").attr("stroke-width",a.highlightStrokeWidth+"px").style("fill-opacity",.1).style("fill",(({color:t,labelMapsTo:e,...n})=>t&&t.scale[n[e]]?t.scale[n[e]]:null))}))}}class av extends ev{getItems(t){if(t.detail.items)return t.detail.items;const{data:e}=t.detail;if(!e||!e.length||!e[0])return[];const n=this.getOptions(),{cartesianScales:i}=this.services,r=i.getDomainIdentifier(),o=i.isDualAxes(),{groupMapsTo:s}=n.data,a=i.getDomainLabel();let l=i.getRangeLabel();const c=e[0][r];let u;if(1===e.length){const r=e[0],h=i.getRangeIdentifier(r);if(o){const t=i.getRangeAxisPosition({datum:r,groups:[r[s]]});l=i.getScaleLabel(t)}const d=r[h];u=[{label:a,value:c},...Array.isArray(d)&&2===d.length?[{label:"Start",value:d[0]},{label:"End",value:d[1]}]:[{label:l,value:r[h]}]],t.detail.additionalItems&&t.detail.additionalItems.forEach((t=>u.push({label:t.label,value:t.value}))),u.push({label:En(n,"locale.translations.group")||En(n,"tooltip.groupLabel"),value:r[s],color:this.model.getFillColor(r[s]),class:this.model.getColorClassName({classNameTypes:[N.TOOLTIP],dataGroupName:r[s]})})}else if(e.length>1&&(u=[{label:a,value:c}],u=u.concat(e.map((t=>{const e=t[i.getRangeIdentifier(t)];return{label:t[s],value:Array.isArray(e)&&2===e.length?`${e[0]} - ${e[1]}`:e,color:this.model.getFillColor(t[s]),class:this.model.getColorClassName({classNameTypes:[N.TOOLTIP],dataGroupName:t[s]})}})).sort(((t,e)=>e.value-t.value))),!o&&!0===dc(n,"tooltip","showTotal"))){const t=i.getRangeIdentifier();u.push({label:En(n,"locale.translations.total")||En(n,"tooltip.totalLabel")||"Total",value:e.reduce(((e,n)=>e+n[t]),0),bold:!0})}return u}}var lv=Math.PI,cv=2*lv,uv=1e-6,hv=cv-uv;function dv(){this._x0=this._y0=this._x1=this._y1=null,this._=""}dv.prototype=function(){return new dv}.prototype={constructor:dv,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,i){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+i)},bezierCurveTo:function(t,e,n,i,r,o){this._+="C"+ +t+","+ +e+","+ +n+","+ +i+","+(this._x1=+r)+","+(this._y1=+o)},arcTo:function(t,e,n,i,r){t=+t,e=+e,n=+n,i=+i,r=+r;var o=this._x1,s=this._y1,a=n-t,l=i-e,c=o-t,u=s-e,h=c*c+u*u;if(r<0)throw new Error("negative radius: "+r);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(h>uv)if(Math.abs(u*a-l*c)>uv&&r){var d=n-o,f=i-s,p=a*a+l*l,m=d*d+f*f,g=Math.sqrt(p),v=Math.sqrt(h),y=r*Math.tan((lv-Math.acos((p+h-m)/(2*g*v)))/2),_=y/v,b=y/g;Math.abs(_-1)>uv&&(this._+="L"+(t+_*c)+","+(e+_*u)),this._+="A"+r+","+r+",0,0,"+ +(u*d>c*f)+","+(this._x1=t+b*a)+","+(this._y1=e+b*l)}else this._+="L"+(this._x1=t)+","+(this._y1=e)},arc:function(t,e,n,i,r,o){t=+t,e=+e,o=!!o;var s=(n=+n)*Math.cos(i),a=n*Math.sin(i),l=t+s,c=e+a,u=1^o,h=o?i-r:r-i;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>uv||Math.abs(this._y1-c)>uv)&&(this._+="L"+l+","+c),n&&(h<0&&(h=h%cv+cv),h>hv?this._+="A"+n+","+n+",0,1,"+u+","+(t-s)+","+(e-a)+"A"+n+","+n+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):h>uv&&(this._+="A"+n+","+n+",0,"+ +(h>=lv)+","+u+","+(this._x1=t+n*Math.cos(r))+","+(this._y1=e+n*Math.sin(r))))},rect:function(t,e,n,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +i+"h"+-n+"Z"},toString:function(){return this._}},Array.prototype.slice;class fv extends Hm{constructor(){super(...arguments),this.type="grid",this.renderType=I.SVG}render(t=!0){const e=dc(this.getOptions(),"grid","x","enabled"),n=dc(this.getOptions(),"grid","y","enabled");this.drawBackdrop(e,n),(e||n)&&(e&&(Uf.appendOrSelect(this.backdrop,"g.x.grid"),this.drawXGrid(t)),n&&(Uf.appendOrSelect(this.backdrop,"g.y.grid"),this.drawYGrid(t)))}drawXGrid(t){const e=this.parent,n=this.backdrop.attr("height"),i=Mp(this.services.cartesianScales.getMainXScale()).tickSizeInner(-n).tickSizeOuter(0);if(dc(this.getOptions(),"grid","x","alignWithAxisTicks")){const t=this.services.cartesianScales.getDomainAxisPosition(),e=dc(this.getOptions(),"axes",t,"ticks","values");e&&i.tickValues(e)}else{const t=dc(this.getOptions(),"grid","x","numberOfTicks");i.ticks(t)}const r=e.select(".x.grid").attr("transform",`translate(${-this.backdrop.attr("x")}, ${n})`);t?r.transition().call((e=>this.services.transitions.setupTransition({transition:e,name:"grid-update",animate:t}))).call(i):r.call(i),this.cleanGrid(r)}drawYGrid(t){const e=this.parent,n=this.backdrop.attr("width"),i=Ap(this.services.cartesianScales.getMainYScale()).tickSizeInner(-n).tickSizeOuter(0);if(dc(this.getOptions(),"grid","y","alignWithAxisTicks")){const t=this.services.cartesianScales.getRangeAxisPosition(),e=dc(this.getOptions(),"axes",t,"ticks","values");e&&i.tickValues(e)}else{const t=dc(this.getOptions(),"grid","y","numberOfTicks");i.ticks(t)}const r=e.select(".y.grid").attr("transform",`translate(0, ${-this.backdrop.attr("y")})`);t?r.transition().call((e=>this.services.transitions.setupTransition({transition:e,name:"grid-update",animate:t}))).call(i):r.call(i),this.cleanGrid(r)}getGridlineThreshold(t){const e=this.parent,n=e.selectAll(".x.grid .tick").nodes().sort(((t,e)=>Number(cc(t).tx)-Number(cc(e).tx)));let i=-1;if(!n.length)return;n.forEach((e=>{t[0]>=+cc(e).tx&&i++}));const r=i+1<n.length?i+1:n.length,o=n[i],s=n[r];let a;if(o)if(s)a=+cc(s).tx-+cc(o).tx;else{const t=e.select("rect.chart-grid-backdrop").node();a=Uf.getSVGElementSize(t).width-+cc(o).tx}else a=+cc(s).tx;const{threshold:l}=this.getOptions().tooltip.gridline;return a*l}getActiveGridline(t){const e=dc(this.getOptions,"tooltip","gridline","threshold")||this.getGridlineThreshold(t);return this.parent.selectAll(".x.grid .tick").filter((function(){const n=cc(this),i=Number(n.tx)-e,r=Number(n.tx)+e;return i<=t[0]&&t[0]<=r}))}drawBackdrop(t,e){const n=this.parent,i=this.services.cartesianScales.getMainXScale(),r=this.services.cartesianScales.getMainYScale(),[o,s]=i.range(),[a,l]=r.range();this.backdrop=Uf.appendOrSelect(n,"svg.chart-grid-backdrop").attr("role","presentation");const c=Uf.appendOrSelect(this.backdrop,t||e?"rect.chart-grid-backdrop.stroked":"rect.chart-grid-backdrop");this.backdrop.merge(c).attr("x",o).attr("y",l).attr("width",Math.abs(s-o)).attr("height",Math.abs(a-l)).lower(),c.attr("width","100%").attr("height","100%")}cleanGrid(t){t.selectAll("text").remove(),t.select(".domain").remove()}}class pv extends Hm{constructor(){super(...arguments),this.type="line",this.renderType=I.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:e}=t.detail;this.parent.selectAll("path.line").transition("legend-hover-line").call((t=>this.services.transitions.setupTransition({transition:t,name:"legend-hover-line"}))).attr("opacity",(t=>t.name!==e.datum().name?_l:bl))},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.line").transition("legend-mouseout-line").call((t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-line"}))).attr("opacity",bl)}}init(){const{events:t}=this.services;t.addEventListener(R.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(R.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t=!0){const e=this.getComponentContainer({ariaLabel:"lines",withinChartClip:!0}),{cartesianScales:n,curves:i}=this.services,[r,o]=pc((t=>n.getDomainValue(t)),(t=>n.getRangeValue(t)),n.getOrientation()),s=this.getOptions(),a=Nm().x(r).y(o).curve(i.getD3Curve()).defined((t=>null!=t[n.getRangeIdentifier(t)]));let l=[];if(this.configs.stacked){const t=Object.keys(s.axes).some((t=>s.axes[t].percentage)),{groupMapsTo:e}=s.data;l=this.model.getStackedData({groups:this.configs.groups,percentage:t}).map((t=>{const n=this.services.cartesianScales.getDomainIdentifier(t),i=this.services.cartesianScales.getRangeIdentifier(t);return{name:dc(t,0,e),data:t.map((t=>({[n]:t.data.sharedStackKey,[e]:t[e],[i]:t[1]}))),hidden:!mp(t,(t=>t[0]!==t[1]))}}))}else l=this.model.getGroupedData(this.configs.groups);const c=e.selectAll("path.line").data(l,(t=>t.name));c.exit().attr("opacity",0).remove(),c.enter().append("path").classed("line",!0).attr("opacity",0).merge(c).data(l,(t=>t.name)).attr("class",(t=>this.model.getColorClassName({classNameTypes:[N.STROKE],dataGroupName:t.name,originalClassName:"line"}))).style("stroke",(t=>this.model.getStrokeColor(t.name,null,t.data))).attr("role",Zc.GRAPHICS_SYMBOL).attr("aria-roledescription","line").attr("aria-label",(t=>{const{data:e}=t;return e.map((t=>t[this.services.cartesianScales.getRangeIdentifier(t)])).join(",")})).transition().call((e=>this.services.transitions.setupTransition({transition:e,name:"line-update-enter",animate:t}))).attr("opacity",(t=>t.hidden?0:1)).attr("d",(t=>{const{data:e}=t;return a(e)}))}destroy(){const t=this.services.events;t.removeEventListener(R.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(R.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}}class mv extends Hm{constructor(){super(...arguments),this.type="ruler",this.renderType=I.SVG,this.isXGridEnabled=dc(this.getOptions(),"grid","x","enabled"),this.isYGridEnabled=dc(this.getOptions(),"grid","y","enabled"),this.isEventListenerAdded=!1}render(t=!1){const e=dc(this.getOptions(),"ruler","enabled");this.drawBackdrop(),e&&!this.isEventListenerAdded?this.addBackdropEventListeners():!e&&this.isEventListenerAdded&&this.removeBackdropEventListeners()}removeBackdropEventListeners(){this.isEventListenerAdded=!1,this.backdrop.on("mousemove mouseover mouseout",null)}formatTooltipData(t){return t}showRuler(t,[e,n]){const i=this.parent,r=this.services.cartesianScales.getOrientation(),o=this.model.getDisplayData(),s=this.services.cartesianScales.getRangeScale(),[a,l]=s.range(),c=r===$.HORIZONTAL?n:e,u=Uf.appendOrSelect(i,"g.ruler").attr("aria-label","ruler"),h=Uf.appendOrSelect(u,"line.ruler-line"),d=i.selectAll("[role=graphics-symbol]"),f=o.map((t=>({domainValue:this.services.cartesianScales.getDomainValue(t),originalData:t}))).filter((t=>function(t,e){return t>e-5&&t<e+5}(t.domainValue,c)));if(this.pointsWithinLine&&f.length===this.pointsWithinLine.length&&f.map((t=>t.domainValue)).join()===this.pointsWithinLine.map((t=>t.domainValue)).join())return this.pointsWithinLine=f,this.services.events.dispatchEvent(R.Tooltip.MOVE,{mousePosition:[e,n]});this.pointsWithinLine=f;const p=this.pointsWithinLine.reduce(((t,e)=>{if(0===t.length)return t.push(e),t;const n=t[0].domainValue,i=Math.abs(c-e.domainValue),r=Math.abs(c-n);return i>r||(i<r?t=[e]:t.push(e)),t}),[]);if(p.length>0){const i=p.map((t=>t.originalData)).filter((t=>null!=t[this.services.cartesianScales.getRangeIdentifier(t)])),o=p.map((t=>t.domainValue)),s=d.filter((t=>{const e=this.services.cartesianScales.getDomainValue(t);return o.includes(e)}));this.elementsToHighlight&&this.elementsToHighlight.size()>0&&!function(t,e){return $i(t,e)}(this.elementsToHighlight,s)&&this.hideRuler(),s.dispatch("mouseover"),this.elementsToHighlight=s,this.services.events.dispatchEvent(R.Tooltip.SHOW,{event:t,mousePosition:[e,n],hoveredElement:h,data:this.formatTooltipData(i)}),u.attr("opacity",1);const c=p[0];"horizontal"===r?h.attr("x1",l).attr("x2",a).attr("y1",c.domainValue).attr("y2",c.domainValue):h.attr("y1",l).attr("y2",a).attr("x1",c.domainValue).attr("x2",c.domainValue)}else this.hideRuler()}hideRuler(){const t=this.parent,e=Uf.appendOrSelect(t,"g.ruler");t.selectAll("[role=graphics-symbol]").dispatch("mouseout"),this.services.events.dispatchEvent(R.Tooltip.HIDE),e.attr("opacity",0)}addBackdropEventListeners(){this.isEventListenerAdded=!0;const t=this,e=this.services.domUtils.getHolder(),n=this.model.getDisplayData();let i=function(e){const n=Uo(e,t.parent.node());t.showRuler(e,n)};n.length>100&&(i=function(t,e,n){let i=null;return function(...r){const o=this;o.mousePosition=Uo(r[0],n),clearTimeout(i),i=setTimeout((function(){t.apply(o,r)}),e)}}((function(e){const{mousePosition:n}=this;t.showRuler(e,n)}),n.length%50*12.5,e)),this.backdrop.on("mousemove mouseover",i).on("mouseout",this.hideRuler.bind(this))}drawBackdrop(){const t=this.parent;this.backdrop=Uf.appendOrSelect(t,"svg.chart-grid-backdrop")}}let gv=class extends Hm{constructor(){super(...arguments),this.type="scatter",this.renderType=I.SVG,this.handleChartHolderOnHover=()=>{if(!this.parent)throw new Error("Parent not defined");this.parent.selectAll("circle.dot").transition("chart-holder-hover-scatter").call((t=>{var e;return null==(e=this.services.transitions)?void 0:e.setupTransition({transition:t,name:"chart-holder-hover-scatter"})})).attr("opacity",1)},this.handleChartHolderOnMouseOut=()=>{if(!this.parent)throw new Error("Parent not defined");this.parent.selectAll("circle.dot").transition("chart-holder-mouseout-scatter").call((t=>{var e;return null==(e=this.services.transitions)?void 0:e.setupTransition({transition:t,name:"chart-holder-mouseout-scatter"})})).attr("opacity",0)},this.handleLegendOnHover=t=>{const{hoveredElement:e}=t.detail,{groupMapsTo:n}=this.getOptions().data;if(!this.parent)throw new Error("Parent not defined");this.parent.selectAll("circle.dot").transition("legend-hover-scatter").call((t=>{var e;return null==(e=this.services.transitions)?void 0:e.setupTransition({transition:t,name:"legend-hover-scatter"})})).attr("opacity",(t=>t[n]!==e.datum().name?.3:1))},this.handleLegendMouseOut=()=>{if(!this.parent)throw new Error("Parent not defined");this.parent.selectAll("circle.dot").transition("legend-mouseout-scatter").call((t=>{var e;return null==(e=this.services.transitions)?void 0:e.setupTransition({transition:t,name:"legend-mouseout-scatter"})})).attr("opacity",1)}}init(){const{events:t}=this.services;if(!t)throw new Error("Services events are undefined.");t.addEventListener(R.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(R.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut);const{fadeInOnChartHolderMouseover:e}=this.configs;e&&(t.addEventListener(R.Chart.MOUSEOVER,this.handleChartHolderOnHover),t.addEventListener(R.Chart.MOUSEOUT,this.handleChartHolderOnMouseOut))}filterBasedOnZoomDomain(t){const{cartesianScales:e}=this.services;if(!e)throw new Error("Services cartesianScales are undefined.");const n=e.getDomainIdentifier(t),i=this.model.get("zoomDomain");return void 0!==i?t.filter((t=>t[n].getTime()>=i[0].getTime()&&t[n].getTime()<=i[1].getTime())):t}getScatterData(){const t=this.getOptions(),{stacked:e}=this.configs;let n;if(e){const e=Object.keys(t.axes).some((e=>t.axes[e].percentage));n=this.model.getStackedData({groups:this.configs.groups,percentage:e})}else{const{cartesianScales:t}=this.services;if(!t)throw new Error("Services cartesianScales are undefined.");n=this.model.getDisplayData(this.configs.groups).filter((e=>{const n=t.getRangeIdentifier(e);return void 0!==e[n]&&null!==e[n]}))}return this.filterBasedOnZoomDomain(n)}render(t){if(!dc(this.getOptions(),"points","enabled")&&!dc(this.getOptions(),"bubble","enabled"))return;const e=this.getComponentContainer({ariaLabel:"scatter points",withinChartClip:!0}),n=this.getOptions(),{groupMapsTo:i}=n.data,{cartesianScales:r}=this.services;if(!r)throw new Error("Services cartesianScales are undefined.");const o=r.getDomainIdentifier(),s=e.selectAll("circle.dot").data(this.getScatterData(),(t=>`${t[i]}-${t[o]}`));s.exit().attr("opacity",0).remove();const a=s.enter().append("circle").classed("dot",!0).attr("opacity",0).merge(s);this.styleCircles(a,t),this.addEventListeners()}isDatapointThresholdAnomaly(t){const{handleThresholds:e}=this.configs;if(!e)return!1;const{cartesianScales:n}=this.services;if(!n)throw new Error("Cartesian scales service is undefined");const i=n.getOrientation(),[r,o]=pc(n.getHighestDomainThreshold(),n.getHighestRangeThreshold(),i),[s,a]=pc((t=>n.getDomainValue(t)),(t=>n.getRangeValue(t)),i),l=s(t),c=a(t);return o&&r?c<=o.scaleValue&&l>=r.scaleValue:o?c<=o.scaleValue:!!r&&l>=r.scaleValue}styleCircles(t,e){const n=this.getOptions(),{filled:i,fillOpacity:r}=n.points,{cartesianScales:o}=this.services;if(!o)throw new Error("Cartesian scales service is undefined");const{groupMapsTo:s}=n.data,[a,l]=pc((t=>o.getDomainValue(t)),(t=>o.getRangeValue(t)),o.getOrientation()),{fadeInOnChartHolderMouseover:c}=this.configs;t.raise().classed("dot",!0).attr("class",(t=>{const e=o.getDomainIdentifier(t),n=this.model.getIsFilled(t[s],t[e],t,i)?[N.FILL,N.STROKE]:[N.STROKE];return this.model.getColorClassName({classNameTypes:n,dataGroupName:t[s],originalClassName:"dot"})||""})).classed("threshold-anomaly",(t=>this.isDatapointThresholdAnomaly(t))).classed("filled",(t=>{const e=o.getDomainIdentifier(t);return this.model.getIsFilled(t[s],t[e],t,i)})).classed("unfilled",(t=>{const e=o.getDomainIdentifier(t);return!this.model.getIsFilled(t[s],t[e],t,i)})).transition().call((t=>{var n;return null==(n=this.services.transitions)?void 0:n.setupTransition({transition:t,name:"scatter-update-enter",animate:e})})).attr("cx",a).attr("cy",l).attr("r",n.points.radius).style("fill",(t=>{const e=o.getDomainIdentifier(t);if(this.model.getIsFilled(t[s],t[e],t,i))return this.model.getFillColor(t[s],t[e],t)})).style("stroke",(t=>{const e=o.getDomainIdentifier(t);return this.model.getStrokeColor(t[s],t[e],t)})).attr("fill-opacity",i?r:1).attr("opacity",c?0:1).attr("role",Zc.GRAPHICS_SYMBOL).attr("aria-roledescription","point").attr("aria-label",(t=>t[o.getRangeIdentifier(t)])),this.addEventListeners()}getTooltipAdditionalItems(t){return null}addEventListeners(){const t=this,{groupMapsTo:e}=t.getOptions().data;if(!this.parent)throw new Error("Parent not defined");this.parent.selectAll("circle").on("mouseover",(function(n,i){var r,o;const s=Tu(this);s.classed("hovered",!0).attr("class",(n=>t.model.getColorClassName({classNameTypes:[N.FILL],dataGroupName:n[e],originalClassName:s.attr("class")}))).style("fill",(n=>{var i;const r=null==(i=t.services.cartesianScales)?void 0:i.getDomainIdentifier(n);return t.model.getFillColor(n[e],n[r],n)})).classed("unfilled",!1),null==(r=t.services.events)||r.dispatchEvent(R.Tooltip.SHOW,{event:n,hoveredElement:s,data:[i],additionalItems:t.getTooltipAdditionalItems(i)}),null==(o=t.services.events)||o.dispatchEvent(R.Scatter.SCATTER_MOUSEOVER,{event:n,element:s,datum:i})})).on("mousemove",(function(e,n){var i,r;const o=Tu(this);null==(i=t.services.events)||i.dispatchEvent(R.Scatter.SCATTER_MOUSEMOVE,{event:e,element:o,datum:n}),null==(r=t.services.events)||r.dispatchEvent(R.Tooltip.MOVE,{event:e})})).on("click",(function(e,n){var i;null==(i=t.services.events)||i.dispatchEvent(R.Scatter.SCATTER_CLICK,{event:e,element:Tu(this),datum:n})})).on("mouseout",(function(n,i){var r,o,s;const a=Tu(this);if(a.classed("hovered",!1),!t.configs.filled){const{filled:n}=t.getOptions().points,o=null==(r=t.services.cartesianScales)?void 0:r.getDomainIdentifier(i),s=t.model.getIsFilled(i[e],i[o],i,n);a.classed("unfilled",!s).style("fill",(i=>s||n?t.model.getFillColor(i[e],i[o],i):null))}null==(o=t.services.events)||o.dispatchEvent(R.Scatter.SCATTER_MOUSEOUT,{event:n,element:a,datum:i}),null==(s=t.services.events)||s.dispatchEvent(R.Tooltip.HIDE,{hoveredElement:a})}))}destroy(){var t;null==(t=this.parent)||t.selectAll("circle").on("mousemove",null).on("mouseout",null);const{events:e}=this.services;if(!e)throw new Error("Services events undefined");e.removeEventListener(R.Legend.ITEM_HOVER,this.handleLegendOnHover),e.removeEventListener(R.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),e.removeEventListener(R.Chart.MOUSEOVER,this.handleChartHolderOnHover),e.removeEventListener(R.Chart.MOUSEOUT,this.handleChartHolderOnMouseOut)}};class vv extends Hm{constructor(t,e,n){super(t,e,n),this.type="axes",this.renderType=I.SVG,this.truncation={[U.LEFT]:!1,[U.RIGHT]:!1,[U.TOP]:!1,[U.BOTTOM]:!1},n&&(this.configs=n),this.margins=this.configs.margins}render(t=!0){const{position:e}=this.configs,n=this.getOptions(),i=dc(n,"axes",e,"visible"),r=this.getComponentContainer({ariaLabel:"axes"}),{width:o,height:s}=Uf.getSVGElementSize(r,{useAttrs:!0}),a=Uf.appendOrSelect(r,`g.axis.${e}`);let l,c;if(e===U.BOTTOM||e===U.TOP?(l=this.configs.axes[U.LEFT]?this.margins.left:0,c=this.configs.axes[U.RIGHT]?o-this.margins.right:o):(l=s-this.margins.bottom,c=this.margins.top),!this.services.cartesianScales)throw new Error("Services cartesianScales undefined");const u=this.services.cartesianScales.getScaleByPosition(e);let h;switch(this.scaleType===F.LABELS||this.scaleType===F.LABELS_RATIO?u.rangeRound([l,c]):u.range([l,c]),e){case U.LEFT:h=Ap;break;case U.BOTTOM:h=Mp;break;case U.RIGHT:h=Op;break;case U.TOP:h=Sp}a.attr("aria-label",`${e} axis`);const d=!a.select("g.ticks").empty();let f=Uf.appendOrSelect(a,"g.ticks");d||(f.attr("role",`${Zc.GRAPHICS_OBJECT} ${Zc.GROUP}`),f.attr("aria-label",`${e} ticks`));const p=Uf.appendOrSelect(a,"g.ticks.invisible").style("opacity","0").style("pointer-events","none").attr("aria-hidden",!0).attr("aria-label",`invisible ${e} ticks`),m=dc(n,"axes",e),g=this.scaleType===F.TIME||m.scaleType===F.TIME,v=e===U.LEFT||e===U.RIGHT,y=this.model.get("zoomDomain");if(y&&g&&!v&&u.domain(y),!i)return void f.attr("aria-hidden",!0);const _=dc(m,"scaleType"),b=dc(n,"data","loading"),w=dc(m,"ticks","number"),x=dc(m,"ticks","values"),E=dc(m,"truncation","type"),T=dc(m,"truncation","threshold"),S=dc(m,"truncation","numCharacter"),O=null!==w,M=dc(n,"timeScale"),A=Uf.appendOrSelect(p,"g.tick"),C=Uf.appendOrSelect(A,"text").text("0"),k=Uf.getSVGElementSize(C.node(),{useBBox:!0}).height;A.remove();const D=this.scaleType||m.scaleType||F.LINEAR,L=h(u).tickSizeOuter(0);if(u.ticks){let t;if(O?t=w:(t=ul,v&&(t=this.getNumberOfFittingTicks(s,k,hl))),1===u.ticks().length&&0===u.ticks()[0]&&(t=0),L.ticks(t),g)if(u.ticks(t).length){const i=dc(n,"timeScale","addSpaceOnEdges"),r=dc(n,"axes",e,"domain"),o=u.copy();i&&!r&&o.nice(t);const s=o.ticks(t);i&&s.length>2&&!r&&(s.splice(s.length-1,1),s.splice(0,1)),L.tickValues(s)}else L.tickValues([])}let R;const I=dc(m,"ticks","formatter"),{code:P,number:N}=dc(n,"locale");if(g){const t=Vc(L.tickValues(),dc(n,"timeScale","timeInterval"));R=null===I?(e,i)=>zc(e,i,L.tickValues(),t,M,n.locale):(e,i)=>{const r=zc(e,i,L.tickValues(),t,M,n.locale);return I(e,i,r)}}else null===I?D===F.LINEAR&&(R=t=>N(t,P)):R=I;L.tickFormat(R);const[B,$]=this.services.cartesianScales.getScaleByPosition(e).domain();let z;if(x){if(g)x.forEach(((t,e)=>{void 0===t.getTime&&(x[e]=new Date(t))})),z=x.filter((t=>{const e=t.getTime();return e>=new Date(B).getTime()&&e<=new Date($).getTime()}));else if(_===F.LABELS){const t=this.services.cartesianScales.getScaleByPosition(e).domain();z=x.filter((e=>t.includes(e)))}else z=x.filter((t=>t>=B&&t<=$));L.tickValues(z)}switch(e){case U.LEFT:f.attr("transform",`translate(${this.margins.left}, 0)`);break;case U.BOTTOM:f.attr("transform",`translate(0, ${s-this.margins.bottom})`);break;case U.RIGHT:f.attr("transform",`translate(${o-this.margins.right}, 0)`);break;case U.TOP:f.attr("transform",`translate(0, ${this.margins.top})`)}const j=this.model.isDataEmpty();if(m.title){const t=Uf.appendOrSelect(a,"text.axis-title").html(j||b?"":Hg(m.title)),n=dc(m,"titleOrientation");let i;switch(e){case U.LEFT:n===tt.RIGHT?t.attr("transform","rotate(90)").attr("y",0).attr("x",u.range()[0]/2).attr("dy","-0.5em").style("text-anchor","middle"):t.attr("transform","rotate(-90)").attr("y",0).attr("x",-u.range()[0]/2).attr("dy","0.75em").style("text-anchor","middle");break;case U.BOTTOM:t.attr("transform",`translate(${this.margins.left/2+u.range()[1]/2}, ${s+4})`).style("text-anchor","middle");break;case U.RIGHT:n===tt.LEFT?t.attr("transform","rotate(-90)").attr("y",o).attr("x",-u.range()[0]/2).style("text-anchor","middle"):t.attr("transform","rotate(90)").attr("y",-o).attr("x",u.range()[0]/2).attr("dy","0.75em").style("text-anchor","middle");break;case U.TOP:i=Uf.getSVGElementSize(t,{useBBox:!0}).height,t.attr("transform",`translate(${this.margins.left/2+u.range()[1]/2}, ${i/2})`).style("text-anchor","middle")}}if(g){const e=Vc(L.tickValues(),dc(n,"timeScale","timeInterval")),i=M.showDayName,r=f;t&&(f=f.transition().call((e=>this.services.transitions.setupTransition({transition:e,name:"axis-update",animate:t})))),f=f.call(L),r.selectAll(".tick").data(L.tickValues(),u).order().select("text").attr("class",((t,n)=>Fc(t,n,L.tickValues(),e,i)?"tick-label--primary":"tick-label"))}else f=t&&d?f.transition().call((e=>this.services.transitions.setupTransition({transition:e,name:"axis-update",animate:t}))).call(L):f.call(L);if(p.call(L),e===U.BOTTOM||e===U.TOP){let t=!1;const n=dc(m,"ticks","rotation");if(n===K.ALWAYS)t=!0;else if(n===K.NEVER)t=!1;else if(!n||n===K.AUTO)if(u.step)t=p.selectAll("g.tick text").nodes().some((t=>Uf.getSVGElementSize(t,{useBBox:!0}).width>=u.step()));else{t=!1;const e=p.append("text").text("A"),n=Uf.getSVGElementSize(e.node(),{useBBox:!0}).width;let i;p.selectAll("g.tick").each((function(){const e=Tu(this),r=parseFloat(dc(cc(this),"tx"));null!==r&&i+e.text().length*n*.8>=r&&(t=!0),i=r})),e.remove()}t?(O||(L.ticks(this.getNumberOfFittingTicks(o,k,dl)),p.call(L),f.call(L)),a.selectAll("g.ticks g.tick text").attr("transform","rotate(-45)").attr("text-anchor",e===U.TOP?"start":"end")):a.selectAll("g.ticks g.tick text").attr("transform",null).attr("text-anchor",null)}if(b?a.attr("opacity",0):a.attr("opacity",1),f.selectAll("g.tick").attr("aria-label",(t=>t)),p.selectAll("g.tick").attr("aria-label",(t=>t)),E!==H.NONE&&_===F.LABELS&&!x){const t=this.services.cartesianScales.getScaleDomain(e);if(t.length>0){const n=r.select(`g.axis.${e} g.ticks g.tick`).html();a.selectAll("g.ticks g.tick").html(n);const i=this;a.selectAll("g.tick text").data(t).text((function(t){return t.length>T?(i.truncation[e]=!0,uc(t,E,S)):t})),this.getInvisibleAxisRef().selectAll("g.tick text").data(t).text((function(t){return t.length>T?uc(t,E,S):t})),a.selectAll("g.ticks").html(this.getInvisibleAxisRef().html()),a.selectAll("g.tick text").data(t)}}this.addEventListeners()}addEventListeners(){const t=this.getComponentContainer(),{position:e}=this.configs,n=Uf.appendOrSelect(t,`g.axis.${e}`),i=this.getOptions(),r=dc(i,"axes",e),o=dc(r,"scaleType"),s=dc(r,"truncation","threshold"),a=this;n.selectAll("g.tick text").on("mouseover",(function(t,e){a.services.events.dispatchEvent(R.Axis.LABEL_MOUSEOVER,{event:t,element:Tu(this),datum:e}),o===F.LABELS&&e.length>s&&a.services.events.dispatchEvent(R.Tooltip.SHOW,{event:t,hoveredElement:Tu(this),content:e})})).on("mousemove",(function(t,e){a.services.events.dispatchEvent(R.Axis.LABEL_MOUSEMOVE,{event:t,element:Tu(this),datum:e}),o===F.LABELS&&e.length>s&&a.services.events.dispatchEvent(R.Tooltip.MOVE,{event:t})})).on("click",(function(t,e){a.services.events.dispatchEvent(R.Axis.LABEL_CLICK,{event:t,element:Tu(this),datum:e})})).on("mouseout",(function(t,e){a.services.events.dispatchEvent(R.Axis.LABEL_MOUSEOUT,{event:t,element:Tu(this),datum:e}),o===F.LABELS&&a.services.events.dispatchEvent(R.Tooltip.HIDE)}))}getInvisibleAxisRef(){const{position:t}=this.configs;return this.getComponentContainer().select(`g.axis.${t} g.ticks.invisible`)}getTitleRef(){const{position:t}=this.configs;return this.getComponentContainer().select(`g.axis.${t} text.axis-title`)}getNumberOfFittingTicks(t,e,n){return function(t,e,n){return void 0===n&&(n=e,e=void 0),void 0!==n&&(n=(n=bu(n))==n?n:0),void 0!==e&&(e=(e=bu(e))==e?e:0),function(t,e,n){return t==t&&(void 0!==n&&(t=t<=n?t:n),void 0!==e&&(t=t>=e?t:e)),t}(bu(t),e,n)}(Math.floor(t/(e*n)),2,ul)}destroy(){const t=this.getComponentContainer(),{position:e}=this.configs;Uf.appendOrSelect(t,`g.axis.${e}`).selectAll("g.tick text").on("mouseover",null).on("mousemove",null).on("mouseout",null)}}class yv extends vv{constructor(t,e,n){super(t,e,n)}render(t=!0){super.render(t),super.destroy();const e=this.configs.position,n=this.getComponentContainer({ariaLabel:"axes"}),i=Uf.appendOrSelect(n,`g.axis.${e}`),r=this;i.selectAll("g.tick").each((function(t,n){const i=Tu(this);i.classed("tick-hover",!0).attr("tabindex",0===n?0:-1);const o=i.select("text"),{width:s,height:a}=Uf.getSVGElementSize(o,{useBBox:!0}),l=Uf.appendOrSelect(i,"rect.axis-holder");let c=0,u=0;switch(e){case U.LEFT:c=-s+Number(o.attr("x")),u=-a/2;break;case U.RIGHT:c=Math.abs(Number(o.attr("x"))),u=-a/2;break;case U.TOP:c=-s/2,u=-a+Number(o.attr("y"))/2,r.truncation[e]&&(c=0,l.attr("transform","rotate(-45)"));break;case U.BOTTOM:c=-s/2,u=a/2-2,r.truncation[e]&&(c=-s,l.attr("transform","rotate(-45)"))}l.attr("x",c-pl).attr("y",u).attr("width",s+2*pl).attr("height",a).lower()})),this.addEventListeners()}addEventListeners(){const t=this.getComponentContainer(),{position:e}=this.configs,n=Uf.appendOrSelect(t,`g.axis.${e}`),i=this.getOptions(),r=dc(i,"axes",e),o=dc(r,"scaleType"),s=dc(r,"truncation","threshold"),a=this;n.selectAll("g.tick.tick-hover").on("mouseover",(function(t){const e=Tu(this).select("text"),n=e.datum();a.services.events.dispatchEvent(R.Axis.LABEL_MOUSEOVER,{event:t,element:e,datum:n}),o===F.LABELS&&n.length>s&&a.services.events.dispatchEvent(R.Tooltip.SHOW,{event:t,element:e,datum:n})})).on("mousemove",(function(t){const e=Tu(this).select("text"),n=e.datum();a.services.events.dispatchEvent(R.Axis.LABEL_MOUSEMOVE,{event:t,element:e,datum:n}),a.services.events.dispatchEvent(R.Tooltip.MOVE,{event:t})})).on("click",(function(t){a.services.events.dispatchEvent(R.Axis.LABEL_CLICK,{event:t,element:Tu(this).select("text"),datum:Tu(this).select("text").datum()})})).on("mouseout",(function(t){a.services.events.dispatchEvent(R.Axis.LABEL_MOUSEOUT,{event:t,element:Tu(this).select("text"),datum:Tu(this).select("text").datum()}),o===F.LABELS&&a.services.events.dispatchEvent(R.Tooltip.HIDE)})).on("focus",(function(t){const e={clientX:0,clientY:0};if(t.target){t.target.focus();const n=t.target.getBoundingClientRect();e.clientX=n.x,e.clientY=n.y}a.services.events.dispatchEvent(R.Axis.LABEL_FOCUS,{event:{...t,...e},element:Tu(this),datum:Tu(this).select("text").datum()})})).on("blur",(function(t){a.services.events.dispatchEvent(R.Axis.LABEL_BLUR,{event:t,element:Tu(this),datum:Tu(this).select("text").datum()})})).on("keydown",(function(t){t.key&&"Escape"===t.key&&(a.services.events.dispatchEvent(R.Tooltip.HIDE),a.services.events.dispatchEvent(R.Axis.LABEL_BLUR,{event:t,element:Tu(this),datum:Tu(this).select("text").datum()})),e===U.LEFT||e===U.RIGHT?t.key&&"ArrowUp"===t.key?a.goNext(this,t):t.key&&"ArrowDown"===t.key&&a.goPrevious(this,t):t.key&&"ArrowLeft"===t.key?a.goPrevious(this,t):t.key&&"ArrowRight"===t.key&&a.goNext(this,t)}))}goNext(t,e){t.nextElementSibling&&"path"!==t.nextElementSibling.tagName&&t.nextElementSibling.dispatchEvent(new Event("focus")),e.preventDefault()}goPrevious(t,e){t.previousElementSibling&&"path"!==t.previousElementSibling.tagName&&t.previousElementSibling.dispatchEvent(new Event("focus")),e.preventDefault()}destroy(){const t=this.getComponentContainer(),{position:e}=this.configs;Uf.appendOrSelect(t,`g.axis.${e}`).selectAll("g.tick.tick-hover").on("mouseover",null).on("mousemove",null).on("mouseout",null).on("focus",null).on("blur",null)}}class _v extends Hm{constructor(){super(...arguments),this.type="2D-axes",this.renderType=I.SVG,this.children={},this.thresholds=[],this.margins={top:0,right:0,bottom:0,left:0}}render(t=!1){const e={},n=Object.keys(U),i=dc(this.getOptions(),"axes");n.forEach((t=>{i[U[t]]&&(e[U[t]]=!0)})),this.configs.axes=e,n.forEach((t=>{const e=U[t];if(this.configs.axes[e]&&!this.children[e]){const t={position:e,axes:this.configs.axes,margins:this.margins},n=this.model.axisFlavor===it.DEFAULT?new vv(this.model,this.services,t):new yv(this.model,this.services,t);n.setModel(this.model),n.setServices(this.services),n.setParent(this.parent),this.children[e]=n}})),Object.keys(this.children).forEach((e=>{this.children[e].render(t)}));const r={};Object.keys(this.children).forEach((t=>{const e=this.children[t],n=e.configs.position,i=e.getInvisibleAxisRef(),{width:o,height:s}=Uf.getSVGElementSize(i,{useBBox:!0});let a;switch(e.getTitleRef().empty()?a=0:(a=Uf.getSVGElementSize(e.getTitleRef(),{useBBox:!0}).height,(n===U.LEFT||n===U.RIGHT)&&(a+=5)),n){case U.TOP:r.top=s+a;break;case U.BOTTOM:r.bottom=s+a;break;case U.LEFT:r.left=o+a;break;case U.RIGHT:r.right=o+a}})),this.services.events.dispatchEvent(R.Axis.RENDER_COMPLETE),Object.keys(r).some((t=>this.margins[t]!==r[t]))&&(this.margins=Object.assign(this.margins,r),this.model.set({axesMargins:this.margins},{skipUpdate:!0}),this.services.events.dispatchEvent(R.ZoomBar.UPDATE),Object.keys(this.children).forEach((t=>{this.children[t].margins=this.margins})),this.render(!0))}}class bv extends Hm{constructor(){super(...arguments),this.type="skeleton"}render(t=!0){const e=dc(this.getOptions(),"data","loading");e?this.renderSkeleton(e):this.removeSkeleton()}renderSkeleton(t){if(this.configs.skeleton===q.GRID)this.renderGridSkeleton(t);else if(this.configs.skeleton===q.VERT_OR_HORIZ)this.renderVertOrHorizSkeleton(t);else if(this.configs.skeleton===q.PIE)this.renderPieSkeleton(t);else{if(this.configs.skeleton!==q.DONUT)throw new Error(`"${this.configs.skeleton}" is not a valid Skeleton type.`);this.renderDonutSkeleton(t)}}renderGridSkeleton(t){this.setScales(),this.drawBackdrop(t),this.drawXGrid(t),this.drawYGrid(t),t&&this.setShimmerEffect("shimmer-lines")}renderVertOrHorizSkeleton(t){const e=this.services.cartesianScales.getOrientation();this.setScales(),this.drawBackdrop(t),e===$.VERTICAL&&this.drawYGrid(t),e===$.HORIZONTAL&&this.drawXGrid(t),this.setShimmerEffect("shimmer-lines")}renderPieSkeleton(t){const e=this.computeOuterRadius();this.drawRing(e,0,t),t&&this.setShimmerEffect("shimmer-areas")}renderDonutSkeleton(t){const e=this.computeOuterRadius(),n=this.computeInnerRadius();this.drawRing(e,n,t),t&&this.setShimmerEffect("shimmer-areas")}setScales(){const t=this.services.cartesianScales.getMainXScale().range(),e=this.services.cartesianScales.getMainYScale().range();this.xScale=al().domain([0,1]).range(t),this.yScale=al().domain([0,1]).range(e)}drawBackdrop(t){const e=this.parent,{width:n,height:i}=Uf.getSVGElementSize(e,{useAttrs:!0});this.backdrop=Uf.appendOrSelect(e,"svg.chart-skeleton.DAII").attr("width",n).attr("height",i);const r=Uf.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop");r.attr("width","100%").attr("height","100%");const[o]=this.xScale.range(),[,s]=this.yScale.range();this.backdrop.merge(r).attr("x",o).attr("y",s),r.classed("shimmer-effect-lines",t).classed("empty-state-lines",!t).style("stroke",t?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}drawXGrid(t){const e=+this.backdrop.attr("width"),n=dc(this.getOptions(),"grid","x","numberOfTicks"),i=this.xScale.ticks(n).map((t=>t*e)),r=Uf.appendOrSelect(this.backdrop,"g.x.skeleton"),o=r.selectAll("line").data(i);o.enter().append("line").merge(o).attr("x1",(t=>t)).attr("x2",(t=>t)).attr("y1",0).attr("y2","100%"),r.selectAll("line").classed("shimmer-effect-lines",t).classed("empty-state-lines",!t).style("stroke",t?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}drawYGrid(t){const e=+this.backdrop.attr("height"),n=this.backdrop.attr("width"),i=dc(this.getOptions(),"grid","y","numberOfTicks"),r=this.xScale.ticks(i).map((t=>t*e)),o=Uf.appendOrSelect(this.backdrop,"g.y.skeleton"),s=o.selectAll("line").data(r);s.enter().append("line").merge(s).attr("x1",0).attr("x2",n).attr("y1",(t=>t)).attr("y2",(t=>t)),o.selectAll("line").classed("shimmer-effect-lines",t).classed("empty-state-lines",!t).style("stroke",t?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}drawRing(t,e,n=!0){const i=this.parent,{width:r,height:o}=Uf.getSVGElementSize(i,{useAttrs:!0}),s=Uf.appendOrSelect(i,"svg.chart-skeleton").attr("width",r).attr("height",o),a=0===e?"pie":"donut",l=dc(this.getOptions(),a,"alignment");Uf.appendOrSelect(s,"rect.chart-skeleton-area-container").attr("width",r).attr("height",o).attr("fill","none");const c=function(){var t=Am,e=Cm,n=Xc(0),i=null,r=km,o=Dm,s=Lm,a=null,l=Mm(c);function c(){var c,u,h=+t.apply(this,arguments),d=+e.apply(this,arguments),f=r.apply(this,arguments)-qd,p=o.apply(this,arguments)-qd,m=$d(p-f),g=p>f;if(a||(a=c=l()),d<h&&(u=d,d=h,h=u),d>Yd)if(m>Xd-Yd)a.moveTo(d*zd(f),d*Gd(f)),a.arc(0,0,d,f,p,!g),h>Yd&&(a.moveTo(h*zd(p),h*Gd(p)),a.arc(0,0,h,p,f,g));else{var v,y,_=f,b=p,w=f,x=p,E=m,T=m,S=s.apply(this,arguments)/2,O=S>Yd&&(i?+i.apply(this,arguments):Wd(h*h+d*d)),M=Vd($d(d-h)/2,+n.apply(this,arguments)),A=M,C=M;if(O>Yd){var k=Kd(O/h*Gd(S)),D=Kd(O/d*Gd(S));(E-=2*k)>Yd?(w+=k*=g?1:-1,x-=k):(E=0,w=x=(f+p)/2),(T-=2*D)>Yd?(_+=D*=g?1:-1,b-=D):(T=0,_=b=(f+p)/2)}var L=d*zd(_),R=d*Gd(_),I=h*zd(x),P=h*Gd(x);if(M>Yd){var N,U=d*zd(b),B=d*Gd(b),H=h*zd(w),$=h*Gd(w);if(m<Zd)if(N=function(t,e,n,i,r,o,s,a){var l=n-t,c=i-e,u=s-r,h=a-o,d=h*l-u*c;if(!(d*d<Yd))return[t+(d=(u*(e-o)-h*(t-r))/d)*l,e+d*c]}(L,R,H,$,U,B,I,P)){var F=L-N[0],z=R-N[1],j=U-N[0],V=B-N[1],G=1/Gd(function(t){return t>1?0:t<-1?Zd:Math.acos(t)}((F*j+z*V)/(Wd(F*F+z*z)*Wd(j*j+V*V)))/2),W=Wd(N[0]*N[0]+N[1]*N[1]);A=Vd(M,(h-W)/(G-1)),C=Vd(M,(d-W)/(G+1))}else A=C=0}T>Yd?C>Yd?(v=Rm(H,$,L,R,d,C,g),y=Rm(U,B,I,P,d,C,g),a.moveTo(v.cx+v.x01,v.cy+v.y01),C<M?a.arc(v.cx,v.cy,C,Fd(v.y01,v.x01),Fd(y.y01,y.x01),!g):(a.arc(v.cx,v.cy,C,Fd(v.y01,v.x01),Fd(v.y11,v.x11),!g),a.arc(0,0,d,Fd(v.cy+v.y11,v.cx+v.x11),Fd(y.cy+y.y11,y.cx+y.x11),!g),a.arc(y.cx,y.cy,C,Fd(y.y11,y.x11),Fd(y.y01,y.x01),!g))):(a.moveTo(L,R),a.arc(0,0,d,_,b,!g)):a.moveTo(L,R),h>Yd&&E>Yd?A>Yd?(v=Rm(I,P,U,B,h,-A,g),y=Rm(L,R,H,$,h,-A,g),a.lineTo(v.cx+v.x01,v.cy+v.y01),A<M?a.arc(v.cx,v.cy,A,Fd(v.y01,v.x01),Fd(y.y01,y.x01),!g):(a.arc(v.cx,v.cy,A,Fd(v.y01,v.x01),Fd(v.y11,v.x11),!g),a.arc(0,0,h,Fd(v.cy+v.y11,v.cx+v.x11),Fd(y.cy+y.y11,y.cx+y.x11),g),a.arc(y.cx,y.cy,A,Fd(y.y11,y.x11),Fd(y.y01,y.x01),!g))):a.arc(0,0,h,x,w,g):a.lineTo(I,P)}else a.moveTo(0,0);if(a.closePath(),c)return a=null,c+""||null}return c.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,i=(+r.apply(this,arguments)+ +o.apply(this,arguments))/2-Zd/2;return[zd(i)*n,Gd(i)*n]},c.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:Xc(+e),c):t},c.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:Xc(+t),c):e},c.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:Xc(+t),c):n},c.padRadius=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:Xc(+t),c):i},c.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:Xc(+t),c):r},c.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:Xc(+t),c):o},c.padAngle=function(t){return arguments.length?(s="function"==typeof t?t:Xc(+t),c):s},c.context=function(t){return arguments.length?(a=t??null,c):a},c}().innerRadius(e).outerRadius(t).startAngle(0).endAngle(2*Math.PI),u=t+Math.abs(-15),h=t+(Math.min(r,o)-2*t)/2,d=Uf.appendOrSelect(s,"path").attr("class","skeleton-area-shape").attr("transform",`translate(${u}, ${h})`).attr("d",c).classed("shimmer-effect-areas",n).classed("empty-state-areas",!n).style("fill",n?`url(#${this.services.domUtils.generateElementIDString("shimmer-areas")})`:null);let f=t+30;l===j.CENTER?f=r/2:l===j.RIGHT&&(f=r-t-30);const p=t+20;d.attr("transform",`translate(${f}, ${p})`)}computeOuterRadius(){const{width:t,height:e}=Uf.getSVGElementSize(this.parent,{useAttrs:!0});return Math.min(t,e)/2-15}computeInnerRadius(){return this.computeOuterRadius()*(3/4)}setShimmerEffect(t){const e="stop-bg-shimmer",n=this.parent.select(".chart-skeleton"),{width:i}=Uf.getSVGElementSize(this.parent,{useAttrs:!0}),r=i,o=Uf.appendOrSelect(n,"defs").lower(),s=Uf.appendOrSelect(o,"linearGradient").attr("id",this.services.domUtils.generateElementIDString(t)).attr("class",t).attr("x1",0-3*.2*i).attr("x2",r).attr("y1",0).attr("y2",0).attr("gradientUnits","userSpaceOnUse").attr("gradientTransform","translate(0, 0)"),a=`\n\t\t\t<stop class="${e}" offset="0"></stop>\n\t\t\t<stop class="stop-shimmer" offset="0.2"></stop>\n\t\t\t<stop class="${e}" offset="0.4"></stop>\n\t\t`;s.html(a),function t(){s.attr("gradientTransform",`translate(${0-3*.2*i}, 0)`).transition().duration(2e3).delay(1e3).ease(Dp).attr("gradientTransform",`translate(${r+3*.2*i}, 0)`).on("end",t)}()}removeSkeleton(){this.parent.select(".chart-skeleton").remove()}}class wv extends Hm{constructor(){super(...arguments),this.type="zero-line",this.renderType=I.SVG}render(t){const e=this.services.cartesianScales.getRangeAxisPosition({groups:this.configs.groups}),n=this.services.cartesianScales.getScaleByPosition(e),[i,r]=n.domain(),o=i>0&&r<0||i<0&&r>0,s=this.getComponentContainer({isPresentational:!0});if(!o)return void s.selectAll("line.domain").remove();const[a,l]=this.services.cartesianScales.getDomainScale().range();let c=+n(0)+.5;c||(c=n.range()[0]);const u=fc({x0:a,x1:l,y0:c,y1:c},this.services.cartesianScales.getOrientation());Uf.appendOrSelect(s,"line.domain").transition().call((e=>this.services.transitions.setupTransition({transition:e,name:"zero-line-update",animate:t}))).attr("y1",u.y0).attr("y2",u.y1).attr("x1",u.x0).attr("x2",u.x1)}}class xv extends bv{constructor(){super(...arguments),this.type="skeleton-lines"}render(t=!0){const e=dc(this.getOptions(),"data","loading"),n=!(dc(this.getOptions(),"grid","x","enabled")||dc(this.getOptions(),"grid","y","enabled")||dc(this.getOptions(),"axes","bottom","visible")||dc(this.getOptions(),"axes","left","visible"));e&&!n?super.renderGridSkeleton(e):e&&n?this.renderSparklineSkeleton(e):this.removeSkeleton()}renderSparklineSkeleton(t){this.setScales(),this.drawBackdrop(t),this.drawSparkline(t),this.updateBackdropStyle(),t&&this.setShimmerEffect("shimmer-lines")}drawSparkline(t){const e=this.backdrop.attr("width"),n=Uf.appendOrSelect(this.backdrop,"g.y.skeleton"),i=n.selectAll("line").data([100]);i.enter().append("line").merge(i).attr("x1",0).attr("x2",e).attr("y1",(t=>t)).attr("y2",(t=>t)),n.selectAll("line").classed("shimmer-effect-lines",t).classed("empty-state-lines",!t).style("stroke",t?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}updateBackdropStyle(){const t=this.parent;this.backdrop=Uf.appendOrSelect(t,"svg.chart-skeleton.DAII"),Uf.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop").classed("shimmer-effect-lines",!1).classed("shimmer-effect-sparkline",!0).style("stroke",null)}}function Ev(t){if(t.__esModule)return t;var e=t.default;if("function"==typeof e){var n=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach((function(e){var i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,i.get?i:{enumerable:!0,get:function(){return t[e]}})})),n}var Tv={value:function(){}};function Sv(){for(var t,e=0,n=arguments.length,i={};e<n;++e){if(!(t=arguments[e]+"")||t in i||/[\s.]/.test(t))throw new Error("illegal type: "+t);i[t]=[]}return new Ov(i)}function Ov(t){this._=t}function Mv(t,e){for(var n,i=0,r=t.length;i<r;++i)if((n=t[i]).name===e)return n.value}function Av(t,e,n){for(var i=0,r=t.length;i<r;++i)if(t[i].name===e){t[i]=Tv,t=t.slice(0,i).concat(t.slice(i+1));break}return null!=n&&t.push({name:e,value:n}),t}Ov.prototype=Sv.prototype={constructor:Ov,on:function(t,e){var n,i=this._,r=function(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",i=t.indexOf(".");if(i>=0&&(n=t.slice(i+1),t=t.slice(0,i)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}(t+"",i),o=-1,s=r.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o<s;)if(n=(t=r[o]).type)i[n]=Av(i[n],t.name,e);else if(null==e)for(n in i)i[n]=Av(i[n],t.name,null);return this}for(;++o<s;)if((n=(t=r[o]).type)&&(n=Mv(i[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Ov(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,i,r=new Array(n),o=0;o<n;++o)r[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,n=(i=this._[t]).length;o<n;++o)i[o].value.apply(e,r)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],r=0,o=i.length;r<o;++r)i[r].value.apply(e,n)}};const Cv=Ev(Object.freeze(Object.defineProperty({__proto__:null,dispatch:Sv},Symbol.toStringTag,{value:"Module"})));var kv,Dv;function Lv(t){return null!=t&&t.length?Mn(t,1):[]}function Rv(t,e,n){var i=-1,r=t.length;e<0&&(e=-e>r?0:r+e),(n=n>r?r:n)<0&&(n+=r),r=e>n?0:n-e>>>0,e>>>=0;for(var o=Array(r);++i<r;)o[i]=t[i+e];return o}function Iv(t,e){return null==(t=function(t,e){return e.length<2?t:xn(t,Rv(e,0,-1))}(t,e=bn(e,t)))||delete t[wn(Xi(e))]}function Pv(t){return In(t)?void 0:t}!function(){if(Dv)return kv;Dv=1;const t=Cv.dispatch,e=Math.PI/180,n={archimedean:p,rectangular:function(t){var e=4*t[0]/t[1],n=0,i=0;return function(t){var r=t<0?-1:1;switch(Math.sqrt(1+4*r*t)-r&3){case 0:n+=e;break;case 1:i+=4;break;case 2:n-=e;break;default:i-=4}return[n,i]}}},i=2048;function r(t){return t.text}function o(){return"serif"}function s(){return"normal"}function a(t){return Math.sqrt(t.value)}function l(){return 30*(~~(6*random())-3)}function c(){return 1}function u(t,n,r,o){if(!n.sprite){var s=t.context,a=t.ratio;s.clearRect(0,0,2048/a,i/a);var l=0,c=0,u=0,h=r.length;for(--o;++o<h;){n=r[o],s.save(),s.font=n.style+" "+n.weight+" "+~~((n.size+1)/a)+"px "+n.font;const t=s.measureText(n.text),h=-Math.floor(t.width/2);let y=(t.width+1)*a,_=n.size<<1;if(n.rotate){var d=Math.sin(n.rotate*e),f=Math.cos(n.rotate*e),p=y*f,m=y*d,g=_*f,v=_*d;y=Math.max(Math.abs(p+v),Math.abs(p-v))+31>>5<<5,_=~~Math.max(Math.abs(m+g),Math.abs(m-g))}else y=y+31>>5<<5;if(_>u&&(u=_),l+y>=2048&&(l=0,c+=u,u=0),c+_>=i)break;s.translate((l+(y>>1))/a,(c+(_>>1))/a),n.rotate&&s.rotate(n.rotate*e),s.fillText(n.text,h,0),n.padding&&(s.lineWidth=2*n.padding,s.strokeText(n.text,h,0)),s.restore(),n.width=y,n.height=_,n.xoff=l,n.yoff=c,n.x1=y>>1,n.y1=_>>1,n.x0=-n.x1,n.y0=-n.y1,n.hasText=!0,l+=y}for(var y=s.getImageData(0,0,2048/a,i/a).data,_=[];--o>=0;)if((n=r[o]).hasText){for(var b=n.width,w=b>>5,x=n.y1-n.y0,E=0;E<x*w;E++)_[E]=0;if(null==(l=n.xoff))return;c=n.yoff;for(var T=0,S=-1,O=0;O<x;O++){for(E=0;E<b;E++){var M=w*O+(E>>5),A=y[2048*(c+O)+(l+E)<<2]?1<<31-E%32:0;_[M]|=A,T|=A}T?S=O:(n.y0++,x--,O--,c++)}n.y1=n.y0+S,n.sprite=_.slice(0,(n.y1-n.y0)*w)}}}function h(t,e,n){n>>=5;for(var i,r=t.sprite,o=t.width>>5,s=t.x-(o<<4),a=127&s,l=32-a,c=t.y1-t.y0,u=(t.y+t.y0)*n+(s>>5),h=0;h<c;h++){i=0;for(var d=0;d<=o;d++)if((i<<l|(d<o?(i=r[h*o+d])>>>a:0))&e[u+d])return!0;u+=n}return!1}function d(t,e){var n=t[0],i=t[1];e.x+e.x0<n.x&&(n.x=e.x+e.x0),e.y+e.y0<n.y&&(n.y=e.y+e.y0),e.x+e.x1>i.x&&(i.x=e.x+e.x1),e.y+e.y1>i.y&&(i.y=e.y+e.y1)}function f(t,e){return t.x+t.x1>e[0].x&&t.x+t.x0<e[1].x&&t.y+t.y1>e[0].y&&t.y+t.y0<e[1].y}function p(t){var e=t[0]/t[1];return function(t){return[e*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function m(){return document.createElement("canvas")}function g(t){return"function"==typeof t?t:function(){return t}}kv=function(){var e=[256,256],v=r,y=o,_=a,b=s,w=s,x=l,E=c,T=p,S=[],O=1/0,M=t("word","end"),A=null,C=Math.random,k={},D=m;function L(t,n,i){e[0],e[1];for(var r,o,s,a=n.x,l=n.y,c=Math.sqrt(e[0]*e[0]+e[1]*e[1]),u=T(e),d=C()<.5?1:-1,p=-d;(r=u(p+=d))&&(o=~~r[0],s=~~r[1],!(Math.min(Math.abs(o),Math.abs(s))>=c));)if(n.x=a+o,n.y=l+s,!(n.x+n.x0<0||n.y+n.y0<0||n.x+n.x1>e[0]||n.y+n.y1>e[1])&&(!i||f(n,i))&&!h(n,t,e[0])){for(var m,g=n.sprite,v=n.width>>5,y=e[0]>>5,_=n.x-(v<<4),b=127&_,w=32-b,x=n.y1-n.y0,E=(n.y+n.y0)*y+(_>>5),S=0;S<x;S++){m=0;for(var O=0;O<=v;O++)t[E+O]|=m<<w|(O<v?(m=g[S*v+O])>>>b:0);E+=y}return!0}return!1}return k.canvas=function(t){return arguments.length?(D=g(t),k):D},k.start=function(){var t=function(t){const e=t.getContext("2d",{willReadFrequently:!0});t.width=t.height=1;const n=Math.sqrt(e.getImageData(0,0,1,1).data.length>>2);return t.width=2048/n,t.height=i/n,e.fillStyle=e.strokeStyle="red",{context:e,ratio:n}}(D()),n=function(t){for(var e=[],n=-1;++n<t;)e[n]=0;return e}((e[0]>>5)*e[1]),r=null,o=S.length,s=-1,a=[],l=S.map((function(t,e){return t.text=v.call(this,t,e),t.font=y.call(this,t,e),t.style=b.call(this,t,e),t.weight=w.call(this,t,e),t.rotate=x.call(this,t,e),t.size=~~_.call(this,t,e),t.padding=E.call(this,t,e),t})).sort((function(t,e){return e.size-t.size}));return A&&clearInterval(A),A=setInterval(c,0),c(),k;function c(){for(var i=Date.now();Date.now()-i<O&&++s<o&&A;){var c=l[s];c.x=e[0]*(C()+.5)>>1,c.y=e[1]*(C()+.5)>>1,u(t,c,l,s),c.hasText&&L(n,c,r)&&(a.push(c),M.call("word",k,c),r?d(r,c):r=[{x:c.x+c.x0,y:c.y+c.y0},{x:c.x+c.x1,y:c.y+c.y1}],c.x-=e[0]>>1,c.y-=e[1]>>1)}s>=o&&(k.stop(),M.call("end",k,a,r))}},k.stop=function(){A&&(clearInterval(A),A=null);for(const t of S)delete t.sprite;return k},k.timeInterval=function(t){return arguments.length?(O=t??1/0,k):O},k.words=function(t){return arguments.length?(S=t,k):S},k.size=function(t){return arguments.length?(e=[+t[0],+t[1]],k):e},k.font=function(t){return arguments.length?(y=g(t),k):y},k.fontStyle=function(t){return arguments.length?(b=g(t),k):b},k.fontWeight=function(t){return arguments.length?(w=g(t),k):w},k.rotate=function(t){return arguments.length?(x=g(t),k):x},k.text=function(t){return arguments.length?(v=g(t),k):v},k.spiral=function(t){return arguments.length?(T=n[t]||t,k):T},k.fontSize=function(t){return arguments.length?(_=g(t),k):_},k.padding=function(t){return arguments.length?(E=g(t),k):E},k.random=function(t){return arguments.length?(C=t,k):C},k.on=function(){var t=M.on.apply(M,arguments);return t===M?k:t},k}}();var Nv=function(t){return ue(we(t,void 0,Lv),t+"")}((function(t,e){var n={};if(null==t)return n;var i=!1;e=Ut(e,(function(e){return e=bn(e,t),i||(i=e.length>1),e})),_e(t,Zn(t),n),i&&(n=Si(n,7,Pv));for(var r=e.length;r--;)Iv(n,e[r]);return n}));function Uv(t){return Math.log(t)}function Bv(t){return Math.exp(t)}function Hv(t){return-Math.log(-t)}function $v(t){return-Math.exp(-t)}function Fv(t){return isFinite(t)?+("1e"+t):t<0?0:t}function zv(t){return(e,n)=>-t(-e,n)}function jv(){const t=function(t){const e=t(Uv,Bv),n=e.domain;let i,r,o=10;function s(){return i=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}(o),r=function(t){return 10===t?Fv:t===Math.E?Math.exp:e=>Math.pow(t,e)}(o),n()[0]<0?(i=zv(i),r=zv(r),t(Hv,$v)):t(Uv,Bv),e}return e.base=function(t){return arguments.length?(o=+t,s()):o},e.domain=function(t){return arguments.length?(n(t),s()):n()},e.ticks=t=>{const e=n();let s=e[0],a=e[e.length-1];const l=a<s;l&&([s,a]=[a,s]);let c,u,h=i(s),d=i(a);const f=null==t?10:+t;let p=[];if(!(o%1)&&d-h<f){if(h=Math.floor(h),d=Math.ceil(d),s>0){for(;h<=d;++h)for(c=1;c<o;++c)if(u=h<0?c/r(-h):c*r(h),!(u<s)){if(u>a)break;p.push(u)}}else for(;h<=d;++h)for(c=o-1;c>=1;--c)if(u=h>0?c/r(-h):c*r(h),!(u<s)){if(u>a)break;p.push(u)}2*p.length<f&&(p=gr(s,a,f))}else p=gr(h,d,Math.min(d-h,f)).map(r);return l?p.reverse():p},e.tickFormat=(t,n)=>{if(null==t&&(t=10),null==n&&(n=10===o?"s":","),"function"!=typeof n&&(!(o%1)&&null==(n=Ba(n)).precision&&(n.trim=!0),n=Va(n)),t===1/0)return n;const s=Math.max(1,o*t/e.ticks().length);return t=>{let e=t/r(Math.round(i(t)));return e*o<o-.5&&(e*=o),e<=s?n(t):""}},e.nice=()=>n(Ou(n(),{floor:t=>r(Math.floor(i(t))),ceil:t=>r(Math.ceil(i(t)))})),e}(rl()).domain([1,10]);return t.copy=()=>il(t,jv()).base(t.base()),Za.apply(t,arguments),t}function Vv(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function Gv(t){this._context=t}function Wv(t){return new Gv(t)}function Yv(t){this._context=t}function Zv(t){return new Yv(t)}function qv(t){this._context=t}function Xv(t){return new qv(t)}function Kv(t,e){this._basis=new Gv(t),this._beta=e}Gv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Vv(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Vv(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Yv.prototype={areaStart:tf,areaEnd:tf,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:Vv(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},qv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,i=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,i):this._context.moveTo(n,i);break;case 3:this._point=4;default:Vv(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Kv.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var i,r=t[0],o=e[0],s=t[n]-r,a=e[n]-o,l=-1;++l<=n;)i=l/n,this._basis.point(this._beta*t[l]+(1-this._beta)*(r+i*s),this._beta*e[l]+(1-this._beta)*(o+i*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const Qv=function t(e){function n(t){return 1===e?new Gv(t):new Kv(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function Jv(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function ty(t,e){this._context=t,this._k=(1-e)/6}ty.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Jv(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:Jv(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const ey=function t(e){function n(t){return new ty(t,e)}return n.tension=function(e){return t(+e)},n}(0);function ny(t,e){this._context=t,this._k=(1-e)/6}ny.prototype={areaStart:tf,areaEnd:tf,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Jv(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const iy=function t(e){function n(t){return new ny(t,e)}return n.tension=function(e){return t(+e)},n}(0);function ry(t,e){this._context=t,this._k=(1-e)/6}ry.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Jv(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const oy=function t(e){function n(t){return new ry(t,e)}return n.tension=function(e){return t(+e)},n}(0);function sy(t,e,n){var i=t._x1,r=t._y1,o=t._x2,s=t._y2;if(t._l01_a>Yd){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,r=(r*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>Yd){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,u=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*c+t._x1*t._l23_2a-e*t._l12_2a)/u,s=(s*c+t._y1*t._l23_2a-n*t._l12_2a)/u}t._context.bezierCurveTo(i,r,o,s,t._x2,t._y2)}function ay(t,e){this._context=t,this._alpha=e}ay.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:sy(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const ly=function t(e){function n(t){return e?new ay(t,e):new ty(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function cy(t,e){this._context=t,this._alpha=e}cy.prototype={areaStart:tf,areaEnd:tf,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:sy(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const uy=function t(e){function n(t){return e?new cy(t,e):new ny(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function hy(t,e){this._context=t,this._alpha=e}hy.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:sy(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const dy=function t(e){function n(t){return e?new hy(t,e):new ry(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function fy(t){return t<0?-1:1}function py(t,e,n){var i=t._x1-t._x0,r=e-t._x1,o=(t._y1-t._y0)/(i||r<0&&-0),s=(n-t._y1)/(r||i<0&&-0),a=(o*r+s*i)/(i+r);return(fy(o)+fy(s))*Math.min(Math.abs(o),Math.abs(s),.5*Math.abs(a))||0}function my(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function gy(t,e,n){var i=t._x0,r=t._y0,o=t._x1,s=t._y1,a=(o-i)/3;t._context.bezierCurveTo(i+a,r+a*e,o-a,s-a*n,o,s)}function vy(t){this._context=t}function yy(t){this._context=new _y(t)}function _y(t){this._context=t}function by(t){return new vy(t)}function wy(t){return new yy(t)}function xy(t){this._context=t}function Ey(t){var e,n,i=t.length-1,r=new Array(i),o=new Array(i),s=new Array(i);for(r[0]=0,o[0]=2,s[0]=t[0]+2*t[1],e=1;e<i-1;++e)r[e]=1,o[e]=4,s[e]=4*t[e]+2*t[e+1];for(r[i-1]=2,o[i-1]=7,s[i-1]=8*t[i-1]+t[i],e=1;e<i;++e)n=r[e]/o[e-1],o[e]-=n,s[e]-=n*s[e-1];for(r[i-1]=s[i-1]/o[i-1],e=i-2;e>=0;--e)r[e]=(s[e]-r[e+1])/o[e];for(o[i-1]=(t[i]+r[i-1])/2,e=0;e<i-1;++e)o[e]=2*t[e+1]-r[e+1];return[r,o]}function Ty(t){return new xy(t)}function Sy(t,e){this._context=t,this._t=e}function Oy(t){return new Sy(t,.5)}function My(t){return new Sy(t,0)}function Ay(t){return new Sy(t,1)}vy.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:gy(this,this._t0,my(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,gy(this,my(this,n=py(this,t,e)),n);break;default:gy(this,this._t0,n=py(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(yy.prototype=Object.create(vy.prototype)).point=function(t,e){vy.prototype.point.call(this,e,t)},_y.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,i,r,o){this._context.bezierCurveTo(e,t,i,n,o,r)}},xy.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===n)this._context.lineTo(t[1],e[1]);else for(var i=Ey(t),r=Ey(e),o=0,s=1;s<n;++o,++s)this._context.bezierCurveTo(i[0][o],r[0][o],i[1][o],r[1][o],t[s],e[s]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}},Sy.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};class Cy extends Nf{zoomIn(t,e,n){let i,r,o;const s=n||ml;t&&(i=t.x,r=t.y,o=2);const{width:a,height:l}=Uf.getSVGElementSize(this.services.domUtils.getHolder(),{useClientDimensions:!0});e.transition().duration(s.duration).ease(s.ease).attr("transform",`translate(${a/2}, ${l/2}) scale(${o}) translate(${-i},${-r})`),this.services.events.dispatchEvent(R.CanvasZoom.CANVAS_ZOOM_IN,{element:Tu(t)})}zoomOut(t,e){const n=e||ml;t.transition().duration(n.duration).ease(n.ease).attr("transform",""),this.services.events.dispatchEvent(R.CanvasZoom.CANVAS_ZOOM_OUT)}}class ky extends Nf{init(){this.documentFragment=document.createDocumentFragment()}addEventListener(t,e){this.documentFragment.addEventListener(t,e)}removeEventListener(t,e){this.documentFragment.removeEventListener(t,e)}dispatchEvent(t,e){let n;e?n=new CustomEvent(t,{detail:e}):(n=document.createEvent("Event"),n.initEvent(t,!1,!0)),this.documentFragment.dispatchEvent(n)}}class Dy extends Nf{constructor(t,e){super(t,e)}downloadCSV(t,e){const n=document.createElement("a"),i="text/csv;encoding:utf-8";if(navigator.msSaveBlob)navigator.msSaveBlob(new Blob([t],{type:i}),e);else if(URL&&"download"in n){const r=URL.createObjectURL(new Blob([t],{type:i}));n.href=r,n.setAttribute("download",e),document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(r)}else location.href=`data:application/octet-stream,${encodeURIComponent(t)}`}downloadImage(t,e){const n=document.createElement("a");n.download=e,n.href=t,document.body.appendChild(n),n.click(),document.body.removeChild(n)}}class Ly extends Nf{constructor(){super(...arguments),this.pendingTransitions={}}init(){var t;null==(t=this.services.events)||t.addEventListener(R.Model.UPDATE,(()=>{this.pendingTransitions={}}))}setupTransition({transition:t,name:e,animate:n}){return this.pendingTransitions[t._id]=t,t.on("end interrupt cancel",(()=>{delete this.pendingTransitions[t._id]})),!1===this.model.getOptions().animations||!1===n?t.duration(0):t.duration(dc(El,e,"duration")||El.default.duration)}getPendingTransitions(){return this.pendingTransitions}}function Ry(t,e){const n=+gt(t)-+gt(e);return n<0?-1:n>0?1:n}function Iy(t,e,n){const i=gt(t,void 0);if(isNaN(e))return dt(t,NaN);if(!e)return i;const r=i.getDate(),o=dt(t,i.getTime());return o.setMonth(i.getMonth()+e+1,0),r>=o.getDate()?o:(i.setFullYear(o.getFullYear(),o.getMonth(),r),i)}function Py(t,e,n){return Iy(t,12*e)}function Ny(t,e,n){return Py(t,-e)}function Uy(t,e,n){const[i,r,o]=ft(0,t,t,e),s=Ry(r,o),a=Math.abs(function(t,e){const[n,i]=ft(0,t,e);return 12*(n.getFullYear()-i.getFullYear())+(n.getMonth()-i.getMonth())}(r,o));if(a<1)return 0;1===r.getMonth()&&r.getDate()>27&&r.setDate(30),r.setMonth(r.getMonth()-s*a);let l=Ry(r,o)===-s;(function(t){const e=gt(t,void 0);return+function(t){const e=gt(t,void 0);return e.setHours(23,59,59,999),e}(e)==+function(t){const e=gt(t,void 0),n=e.getMonth();return e.setFullYear(e.getFullYear(),n+1,0),e.setHours(23,59,59,999),e}(e)})(i)&&1===a&&1===Ry(i,o)&&(l=!1);const c=s*(a-+l);return 0===c?0:c}function By(t,e,n){return Iy(t,-e)}function Hy(t,e){const n=t.getFullYear()-e.getFullYear()||t.getMonth()-e.getMonth()||t.getDate()-e.getDate()||t.getHours()-e.getHours()||t.getMinutes()-e.getMinutes()||t.getSeconds()-e.getSeconds()||t.getMilliseconds()-e.getMilliseconds();return n<0?-1:n>0?1:n}function $y(t,e,n){const i=gt(t,void 0);return isNaN(e)?dt(t,NaN):(e&&i.setDate(i.getDate()+e),i)}function Fy(t,e,n){return $y(t,-e)}function zy(t){return t=>{const e=(0,Math.trunc)(t);return 0===e?0:e}}function jy(t,e,n){return dt(t,+gt(t)+e)}function Vy(t,e,n){return jy(t,e*ut)}function Gy(t,e,n){return Vy(t,-e)}function Wy(t,e){return+gt(t)-+gt(e)}function Yy(t,e,n){const i=Wy(t,e)/6e4;return zy()(i)}function Zy(t,e,n){const i=gt(t,void 0);return i.setTime(i.getTime()+6e4*e),i}function qy(t,e,n){return Zy(t,-e)}function Xy(t,e,n){const i=Wy(t,e)/1e3;return zy()(i)}function Ky(t,e,n){return jy(t,1e3*e)}function Qy(t,e,n){return Ky(t,-e)}class Jy extends Nf{constructor(){super(...arguments),this.scaleTypes={top:null,right:null,bottom:null,left:null},this.scales={top:null,right:null,bottom:null,left:null}}getDomainAxisPosition({datum:t=null}={}){if(this.dualAxes&&t){const e=this.model.getOptions(),{groupMapsTo:n}=e.data,i=dc(e,"axes",this.secondaryDomainAxisPosition),r=t[n];if(null!=i&&i.correspondingDatasets&&i.correspondingDatasets.includes(r))return this.secondaryDomainAxisPosition}return this.domainAxisPosition}getRangeAxisPosition({datum:t=null,groups:e=null}={}){if(this.dualAxes){const n=this.model.getOptions(),{groupMapsTo:i}=n.data,r=dc(n,"axes",this.secondaryRangeAxisPosition);let o;if(null!==t?o=t[i]:e&&e.length>0&&(o=e[0]),null!=r&&r.correspondingDatasets&&r.correspondingDatasets.includes(o))return this.secondaryRangeAxisPosition}return this.rangeAxisPosition}getAxisOptions(t){return dc(this.model.getOptions(),"axes",t)}getDomainAxisOptions(){const t=this.getDomainAxisPosition();return this.getAxisOptions(t)}getRangeAxisOptions(){const t=this.getRangeAxisPosition();return this.getAxisOptions(t)}getScaleLabel(t){return this.getAxisOptions(t).title||(t===U.BOTTOM||t===U.TOP?"x-value":"y-value")}getDomainLabel(){return this.getScaleLabel(this.getDomainAxisPosition())}getRangeLabel(){return this.getScaleLabel(this.getRangeAxisPosition())}update(){this.determineAxisDuality(),this.findDomainAndRangeAxes(),this.determineOrientation(),Object.keys(U).map((t=>U[t])).forEach((t=>{this.scales[t]=this.createScale(t)}))}findDomainAndRangeAxes(){const t=this.findVerticalAxesPositions(),e=this.findHorizontalAxesPositions(),n=this.findDomainAndRangeAxesPositions(t,e);this.domainAxisPosition=n.primaryDomainAxisPosition,this.rangeAxisPosition=n.primaryRangeAxisPosition,this.isDualAxes()&&(this.secondaryDomainAxisPosition=n.secondaryDomainAxisPosition,this.secondaryRangeAxisPosition=n.secondaryRangeAxisPosition)}determineOrientation(){this.rangeAxisPosition!==U.LEFT&&this.rangeAxisPosition!==U.RIGHT||this.domainAxisPosition!==U.BOTTOM&&this.domainAxisPosition!==U.TOP?this.orientation=$.HORIZONTAL:this.orientation=$.VERTICAL}isDualAxes(){return this.dualAxes}determineAxisDuality(){var t,e,n,i;const r=this.model.getOptions(),o=dc(r,"axes");(null!=(t=o[U.LEFT])&&t.correspondingDatasets&&o[U.RIGHT]||null!=(e=o[U.RIGHT])&&e.correspondingDatasets&&o[U.LEFT]||null!=(n=o[U.TOP])&&n.correspondingDatasets&&o[U.BOTTOM]||null!=(i=o[U.BOTTOM])&&i.correspondingDatasets&&o[U.TOP])&&(this.dualAxes=!0)}getCustomDomainValuesByposition(t){const e=dc(this.model.getOptions(),"axes",t,"domain");if(e&&!Array.isArray(e))throw new Error(`Domain in ${t} axis is not a valid array`);if(Array.isArray(e)&&(this.scaleTypes[t]===F.LINEAR||this.scaleTypes[t]===F.TIME)&&2!==e.length)throw new Error(`There can only be 2 elements in domain for scale type: ${this.scaleTypes[t]}`);return e}getOrientation(){return this.orientation}getScaleByPosition(t){return this.scales[t]}getScaleTypeByPosition(t){return this.scaleTypes[t]}getDomainAxisScaleType(){const t=this.getDomainAxisPosition();return this.getScaleTypeByPosition(t)}getRangeAxisScaleType(){const t=this.getRangeAxisPosition();return this.getScaleTypeByPosition(t)}getDomainScale(){return this.scales[this.domainAxisPosition]}getRangeScale(){return this.scales[this.rangeAxisPosition]}getMainXAxisPosition(){const t=[U.BOTTOM,U.TOP];return[this.domainAxisPosition,this.rangeAxisPosition].find((e=>t.indexOf(e)>-1))}getMainYAxisPosition(){const t=[U.LEFT,U.RIGHT];return[this.domainAxisPosition,this.rangeAxisPosition].find((e=>t.indexOf(e)>-1))}getMainXScale(){return this.scales[this.getMainXAxisPosition()]}getMainYScale(){return this.scales[this.getMainYAxisPosition()]}getValueFromScale(t,e,n,i){const r=this.model.getOptions(),o=dc(r,"axes")[n],{mapsTo:s}=o,a=null!==dc(i,s)?i[s]:i;let l;switch(e){case F.LABELS:l=t(a)+t.step()/2;break;case F.TIME:l=t(new Date(a));break;default:l=t(a)}return l}getBoundedScaledValues(t){const{bounds:e}=this.model.getOptions(),n=this.getRangeAxisPosition({datum:t}),i=this.scales[n],r=this.model.getOptions(),o=dc(r,"axes")[n],{mapsTo:s}=o,a=void 0!==t[s]?t[s]:t;return[i(null!==dc(t,e.upperBoundMapsTo)?t[e.upperBoundMapsTo]:a),i(null!==dc(t,e.lowerBoundMapsTo)?t[e.lowerBoundMapsTo]:a)]}getValueThroughAxisPosition(t,e){const n=this.scaleTypes[t],i=this.scales[t];return this.getValueFromScale(i,n,t,e)}getDomainValue(t){const e=this.getDomainAxisPosition({datum:t});return this.getValueThroughAxisPosition(e,t)}getRangeValue(t){const e=this.getRangeAxisPosition({datum:t});return this.getValueThroughAxisPosition(e,t)}getMainXScaleType(){return this.getScaleTypeByPosition(this.getMainXAxisPosition())}getMainYScaleType(){return this.getScaleTypeByPosition(this.getMainYAxisPosition())}getDomainIdentifier(t){const e=this.model.getOptions();return dc(e,"axes",this.getDomainAxisPosition({datum:t}),"mapsTo")}getRangeIdentifier(t){const e=this.model.getOptions();return dc(e,"axes",this.getRangeAxisPosition({datum:t}),"mapsTo")}extendsDomain(t,e){const n=this.model.getOptions(),i=dc(n,"axes",t);return i.scaleType===F.TIME?function(t,e){const n=new Date(t[0]),i=new Date(t[1]);return function(t,e){const[n,i]=ft(0,t,e),r=Ry(n,i),o=Math.abs(function(t,e){const[n,i]=ft(0,t,e);return n.getFullYear()-i.getFullYear()}(n,i));n.setFullYear(1584),i.setFullYear(1584);const s=r*(o-+(Ry(n,i)===-r));return 0===s?0:s}(i,n)>1?[Ny(n,e),Py(i,e)]:Uy(i,n)>1?[By(n,e),Iy(i,e)]:function(t,e){const[n,i]=ft(0,t,e),r=Hy(n,i),o=Math.abs(vc(n,i));n.setDate(n.getDate()-r*o);const s=r*(o-+(Hy(n,i)===-r));return 0===s?0:s}(i,n)>1?[Fy(n,e),$y(i,e)]:function(t,e){const[n,i]=ft(0,t,e),r=(+n-+i)/ut;return zy()(r)}(i,n)>1?[Gy(n,e),Vy(i,e)]:Yy(i,n)>30?[qy(n,30*e),Zy(i,30*e)]:Yy(i,n)>1?[qy(n,e),Zy(i,e)]:Xy(i,n)>15?[Qy(n,15*e),Ky(i,15*e)]:Xy(i,n)>1?[Qy(n,e),Ky(i,e)]:[n,i]}(e,dc(n,"timeScale","addSpaceOnEdges")):function([t,e],n,i){const r=(e-t)*n,o=e<=0&&e+r>0?0:e+r;let s=t>=0&&t-r<0?0:t-r;if(i===F.LOG&&s<=0){if(t<=0)throw Error("Data must have values greater than 0 if log scale type is used.");s=t}return[s,o]}(e,.1,i.scaleType)}findVerticalAxesPositions(){const t=this.model.getOptions(),e=dc(t,"axes"),n=this.isDualAxes();return null===dc(e,U.LEFT)&&null!==dc(e,U.RIGHT)||!0===dc(e,U.RIGHT,"main")||n&&dc(e,U.LEFT,"correspondingDatasets")?{primary:U.RIGHT,secondary:U.LEFT}:{primary:U.LEFT,secondary:U.RIGHT}}findHorizontalAxesPositions(){const t=this.model.getOptions(),e=dc(t,"axes"),n=this.isDualAxes();return null===dc(e,U.BOTTOM)&&null!==dc(e,U.TOP)||!0===dc(e,U.TOP,"main")||n&&dc(e,U.BOTTOM,"correspondingDatasets")?{primary:U.TOP,secondary:U.BOTTOM}:{primary:U.BOTTOM,secondary:U.TOP}}findDomainAndRangeAxesPositions(t,e){const n=this.model.getOptions(),i=dc(n,"axes",t.primary),r=dc(n,"axes",e.primary),o=i.scaleType||F.LINEAR,s=r.scaleType||F.LINEAR,a={primaryDomainAxisPosition:null,secondaryDomainAxisPosition:null,primaryRangeAxisPosition:null,secondaryRangeAxisPosition:null};return a.primaryDomainAxisPosition=e.primary,a.primaryRangeAxisPosition=t.primary,a.secondaryDomainAxisPosition=e.secondary,a.secondaryRangeAxisPosition=t.secondary,(!(s===F.LABELS||s===F.TIME)&&o===F.LABELS||o===F.TIME)&&(a.primaryDomainAxisPosition=t.primary,a.primaryRangeAxisPosition=e.primary,a.secondaryDomainAxisPosition=t.secondary,a.secondaryRangeAxisPosition=e.secondary),a}getScaleDomain(t){const e=this.model.getOptions(),n=dc(e,"axes",t),i=dc(e,"bounds"),{includeZero:r}=n,o=dc(n,"scaleType")||F.LINEAR;if(this.model.isDataEmpty())return[];if(n.binned){const{bins:t}=this.model.getBinConfigurations();return[0,_r(t,(t=>t.length))]}if(n.limitDomainToBins){const{bins:t}=this.model.getBinConfigurations(),e=this.model.getStackKeys({bins:t});return[e[0].split(":")[0],e[e.length-1].split(":")[1]]}const s=this.model.getDisplayData(),{extendLinearDomainBy:a,mapsTo:l,percentage:c,thresholds:u}=n,{reference:h,compareTo:d}=fl;if(n.domain)return o===F.LABELS?n.domain:(o===F.TIME&&(n.domain=n.domain.map((t=>void 0===t.getTime?new Date(t):t))),this.extendsDomain(t,n.domain));if(c)return[0,100];if(n&&o===F.LABELS)return nr(s.map((t=>t[l])));let f,p;const m=this.model.getDataGroupNames();if(o===F.LABELS_RATIO)return s.map((t=>`${t[h]}/${t[d]}`));if(o===F.TIME)p=s.map((t=>+new Date(t[l])));else if(i&&e.axes)p=[],s.forEach((t=>{p.push(t[l]),t[i.upperBoundMapsTo]&&p.push(t[i.upperBoundMapsTo]),t[i.lowerBoundMapsTo]&&p.push(t[i.lowerBoundMapsTo])}));else if(!0===n.stacked&&m&&t===this.getRangeAxisPosition()){const{groupMapsTo:t}=e.data,n=this.model.getDataValuesGroupedByKeys({groups:m}),i=s.filter((e=>!m.includes(e[t]))),r=[];n.forEach((t=>{const{...e}=t;let n=0,i=0;Object.values(Nv(e,"sharedStackKey")).forEach((t=>{isNaN(t)||(t<0?i+=t:n+=t)})),r.push([i,n])})),p=[...Lv(r),...i.map((t=>t[l]))]}else p=[],s.forEach((t=>{const e=t[l];Array.isArray(e)&&2===e.length?(p.push(e[0]),p.push(e[1])):(a&&p.push(Math.max(t[l],t[a])),p.push(e))}));return o!==F.TIME&&o!==F.LOG&&r&&p.push(0),u&&u.length>0&&u.forEach((t=>{const e=dc(t,"value");null!==e&&p.push(e)})),f=lr(p),f=this.extendsDomain(t,f),f}createScale(t){const e=this.model.getOptions(),n=dc(e,"axes",t);if(!n)return null;const i=dc(n,"scaleType")||F.LINEAR;let r;return this.scaleTypes[t]=i,r=i===F.TIME?Hd():i===F.LOG?jv().base(n.base||10):i===F.LABELS||i===F.LABELS_RATIO?Su():al(),r.domain(this.getScaleDomain(t)),r}getDomainLowerBound(t){let e,n=0;return e=this.getOrientation()===$.VERTICAL?this.getMainYScale().domain():this.getMainXScale().domain(),!1===dc(this.model.getOptions(),"axes",t,"includeZero")&&e[0]>0&&e[1]>0&&(n=e[0]),n}getHighestDomainThreshold(){const t=dc(this.model.getOptions(),"axes"),e=this.getDomainAxisPosition(),{thresholds:n}=t[e];if(!Array.isArray(n)||Array.isArray(n)&&!n.length)return null;const i=this.getDomainScale(),r=n.sort(((t,e)=>e.value-t.value))[0];return this.getScaleTypeByPosition(e)===F.TIME&&("string"==typeof r.value||void 0===r.value.getTime)&&(r.value=new Date(r.value)),{threshold:r,scaleValue:i(r.value)}}getHighestRangeThreshold(){const t=dc(this.model.getOptions(),"axes"),e=this.getRangeAxisPosition(),{thresholds:n}=t[e];if(!Array.isArray(n)||Array.isArray(n)&&!n.length)return null;const i=this.getRangeScale(),r=n.sort(((t,e)=>e.value-t.value))[0];return{threshold:r,scaleValue:i(r.value)}}}class t_ extends Nf{constructor(){super(...arguments),this.curveTypes={curveLinear:Jd,curveLinearClosed:nf,curveBasis:Wv,curveBasisClosed:Zv,curveBasisOpen:Xv,curveBundle:Qv,curveCardinal:ey,curveCardinalClosed:iy,curveCardinalOpen:oy,curveCatmullRom:ly,curveCatmullRomClosed:uy,curveCatmullRomOpen:dy,curveMonotoneX:by,curveMonotoneY:wy,curveNatural:Ty,curveStep:Oy,curveStepAfter:Ay,curveStepBefore:My}}getD3Curve(){let t="curveLinear";const e=this.model.getOptions().curve;if(e&&(t="string"==typeof e?e:e.name),this.curveTypes[t]){let n=this.curveTypes[t];return e&&Object.keys(e).forEach((t=>{n[t]&&(n=n[t](e[t]))})),n}return console.warn(`The curve type '${t}' is invalid, using 'curveLinear' instead`),this.curveTypes.curveLinear}}class e_ extends Nf{isZoomBarEnabled(){if(!this.services.cartesianScales||!dc(this.model.getOptions(),"zoomBar","top","enabled"))return!1;this.services.cartesianScales.findDomainAndRangeAxes();const t=this.services.cartesianScales.getMainXAxisPosition(),e=dc(this.model.getOptions(),"axes",t,"scaleType");return t===U.BOTTOM&&e===F.TIME}getZoomBarData(){const t=this.model.getZoomBarData();return t&&t.length>1?t:this.model.getDisplayData()}getDefaultZoomBarDomain(t){if(!this.services.zoom)throw new Error("Services zoom not defined");const e=t||this.services.zoom.getZoomBarData(),{cartesianScales:n}=this.services;if(!n)throw new Error("Services cartesianScales undefined");const i=n.getMainXAxisPosition(),r=n.getDomainIdentifier(),o=dc(this.model.getOptions(),"axes",i,"domain");if(Array.isArray(o)&&2===o.length)return o;if(!i)throw new Error("Not defined: mainXAxisPosition");return n.extendsDomain(i,lr(e,(t=>t[r])))}handleDomainChange(t,e={dispatchEvent:!0}){var n;this.model.set({zoomDomain:t},{animate:!1}),e.dispatchEvent&&(null==(n=this.services.events)||n.dispatchEvent(R.ZoomDomain.CHANGE,{newDomain:t}))}getZoomRatio(){return dc(this.model.getOptions(),"zoomBar","zoomRatio")}filterDataForRangeAxis(t,e){var n;const i=this.model.get("zoomDomain"),r=Object.assign({stacked:!1},e),o=dc(this.model.getOptions(),"zoomBar","updateRangeAxis");if(this.isZoomBarEnabled()&&o&&i){const e=r.stacked?"sharedStackKey":null==(n=this.services.cartesianScales)?void 0:n.getDomainIdentifier(),o=t.filter((t=>new Date(t[e])>=i[0]&&new Date(t[e])<=i[1]));if(o.length>0)return o}return t}zoomIn(t=this.getZoomRatio()){var e;const n=this.model.get("zoomDomain"),i=Tl.handleWidth,r=null==(e=this.services.cartesianScales)?void 0:e.getMainXScale().copy();r.domain(this.getDefaultZoomBarDomain());const o=r(n[0]),s=r(n[1]);if(s-o<i+1)return;const a=r.range(),l=s-o,c=Math.min((a[1]-a[0])/2*(t/2),l/2);let u=o+c,h=s-c;u>=h&&(u=o+l/2-i/2,h=s-l/2+i/2);const d=[r.invert(u),r.invert(h)];(n[0].valueOf()!==d[0].valueOf()||n[1].valueOf()!==d[1].valueOf())&&this.handleDomainChange(d)}zoomOut(t=this.getZoomRatio()){const e=this.model.get("zoomDomain");if(!this.services.cartesianScales)throw new Error("Services cartesianScales undefined");const n=this.services.cartesianScales.getMainXScale().copy();n.domain(this.getDefaultZoomBarDomain());const i=n(e[0]),r=n(e[1]),o=n.range(),s=(o[1]-o[0])/2*(t/2),a=Math.max(i-s,o[0]),l=Math.min(r+s,o[1]),c=[n.invert(a),n.invert(l)];(e[0].valueOf()!==c[0].valueOf()||e[1].valueOf()!==c[1].valueOf())&&this.handleDomainChange(c)}resetZoomDomain(){const t=this.model.get("zoomDomain"),e=this.getDefaultZoomBarDomain();(t[0].valueOf()!==e[0].valueOf()||t[1].valueOf()!==e[1].valueOf())&&this.handleDomainChange(e)}isMinZoomDomain(){const t=this.model.get("zoomDomain"),e=this.getDefaultZoomBarDomain();return!(!t||!e)&&(t[1].valueOf()-t[0].valueOf())/(e[1].valueOf()-e[0].valueOf())<dc(this.model.getOptions(),"zoomBar","minZoomRatio")}isMaxZoomDomain(){const t=this.model.get("zoomDomain"),e=this.getDefaultZoomBarDomain();return!(!t||!e||t[0].valueOf()!==e[0].valueOf()||t[1].valueOf()!==e[1].valueOf())}isEmptyState(){return 0===this.getZoomBarData().length}isZoomBarLoading(t){return dc(this.model.getOptions(),"zoomBar",t,"loading")}isZoomBarLocked(t){return dc(this.model.getOptions(),"zoomBar",t,"locked")}}var n_=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function i_(t){return n_.test(t)}var r_="\\ud800-\\udfff",o_="["+r_+"]",s_="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",a_="\\ud83c[\\udffb-\\udfff]",l_="[^"+r_+"]",c_="(?:\\ud83c[\\udde6-\\uddff]){2}",u_="[\\ud800-\\udbff][\\udc00-\\udfff]",h_="(?:"+s_+"|"+a_+")?",d_="[\\ufe0e\\ufe0f]?",f_=d_+h_+"(?:\\u200d(?:"+[l_,c_,u_].join("|")+")"+d_+h_+")*",p_="(?:"+[l_+s_+"?",s_,c_,u_,o_].join("|")+")",m_=RegExp(a_+"(?="+a_+")|"+p_+f_,"g");var g_=function(t){var e=i_(t=_n(t))?function(t){return i_(t)?function(t){return t.match(m_)||[]}(t):function(t){return t.split("")}(t)}(t):void 0,n=e?e[0]:t.charAt(0),i=e?function(t,e,n){var i=t.length;return Rv(t,1,n=void 0===n?i:n)}(e).join(""):t.slice(1);return n.toUpperCase()+i};fp((function(t,e,n){return e=e.toLowerCase(),t+(n?function(t){return g_(_n(t).toLowerCase())}(e):e)}));class v_{constructor(t,e){this.components=[],this.services={canvasZoom:Cy,domUtils:Uf,events:ky,files:Dy,gradientUtils:Bf,transitions:Ly},this.model=new du(this.services)}init(t,e){this.model.set({holder:t},{skipUpdate:!0}),Object.keys(this.services).forEach((t=>{const e=this.services[t];this.services[t]=new e(this.model,this.services)})),this.services.events.addEventListener(R.Model.UPDATE,(t=>{const e=!!dc(t,"detail","animate");this.update(e)})),this.model.setData(e.data),this.services.events.addEventListener(R.Chart.RESIZE,(()=>{this.update(!1)})),this.components=this.getComponents(),this.update()}getComponents(){return console.error("getComponents() method is not implemented"),[]}update(t=!0){if(!this.components)return;Object.keys(this.services).forEach((t=>{this.services[t].update()})),this.components.forEach((e=>e.render(t)));const e=this.services.transitions.getPendingTransitions(),n=Object.keys(e).map((t=>e[t].end().catch((t=>t))));Promise.all(n).then((()=>this.services.events.dispatchEvent(R.Chart.RENDER_FINISHED)))}destroy(){this.components.forEach((t=>t.destroy())),this.services.domUtils.getHolder().remove(),this.model.set({destroyed:!0},{skipUpdate:!0})}getChartComponents(t,e){const n=this.model.getOptions(),i=dc(n,"toolbar","enabled"),r={id:"legend",components:[new Yg(this.model,this.services)],growth:Y.PREFERRED},o=dc(n,"canvasZoom","enabled");o&&!0===o&&t.push(new qg(this.model,this.services));const s=!!this.model.getOptions().title,a={id:"title",components:[new Wg(this.model,this.services)],growth:Y.STRETCH},l={id:"toolbar",components:[new Fg(this.model,this.services)],growth:Y.PREFERRED},c={id:"header",components:[new jg(this.model,this.services,[a,...i?[l]:[]],{direction:W.ROW,alignItems:Z.CENTER})],growth:Y.PREFERRED},u={id:"graph-frame",components:t,growth:Y.STRETCH,renderType:dc(e,"graphFrameRenderType")||I.SVG},h=!0!==dc(e,"excludeLegend")&&!1!==n.legend.enabled;let d=W.COLUMN;if(h){const t=dc(n,"legend","position");"left"===t?(d=W.ROW,n.legend.orientation||(n.legend.orientation=V.VERTICAL)):"right"===t?(d=W.ROW_REVERSE,n.legend.orientation||(n.legend.orientation=V.VERTICAL)):"bottom"===t&&(d=W.COLUMN_REVERSE)}const f={id:"spacer",components:[new Vg(this.model,this.services)],growth:Y.PREFERRED},p={id:"full-frame",components:[new jg(this.model,this.services,[...h?[r]:[],...h?[f]:[],u],{direction:d})],growth:Y.STRETCH},m=[];if(s||i){m.push(c);const t={id:"spacer",components:[new Vg(this.model,this.services,i?{size:15}:void 0)],growth:Y.PREFERRED};m.push(t)}return m.push(p),[new ev(this.model,this.services),new Gg(this.model,this.services),new jg(this.model,this.services,m,{direction:W.COLUMN})]}}class y_ extends v_{constructor(t,e){super(t,e),this.services=Object.assign(this.services,{cartesianScales:Jy,curves:t_,zoom:e_}),this.model=new fu(this.services)}getAxisChartComponents(t,e){const n=this.model.getOptions(),i=dc(n,"zoomBar",U.TOP,"enabled"),r=dc(n,"toolbar","enabled");this.services.cartesianScales.determineAxisDuality(),this.services.cartesianScales.findDomainAndRangeAxes(),this.services.cartesianScales.determineOrientation();const o=this.services.cartesianScales.getMainXAxisPosition(),s=dc(n,"axes",o,"scaleType"),a=i&&o===U.BOTTOM&&s===F.TIME,l=this.services.zoom.isZoomBarLocked(U.TOP),c=!!this.model.getOptions().title,u={id:"title",components:[new Wg(this.model,this.services)],growth:Y.STRETCH},h={id:"toolbar",components:[new Fg(this.model,this.services)],growth:Y.PREFERRED},d={id:"header",components:[new jg(this.model,this.services,[u,...r?[h]:[]],{direction:W.ROW,alignItems:Z.CENTER})],growth:Y.PREFERRED},f={id:"legend",components:[new Yg(this.model,this.services)],growth:Y.PREFERRED};a&&!l&&t.push(new Zg(this.model,this.services),new iv(this.model,this.services)),t.push(new ov(this.model,this.services)),t.push(new sv(this.model,this.services));const p={id:"graph-frame",components:t,growth:Y.STRETCH,renderType:I.SVG},m=!1!==dc(e,"legend","enabled")&&!1!==this.model.getOptions().legend.enabled;let g=W.COLUMN;if(m){const t=dc(this.model.getOptions(),"legend","position");t===z.LEFT?(g=W.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=V.VERTICAL)):t===z.RIGHT?(g=W.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=V.VERTICAL)):t===z.BOTTOM&&(g=W.COLUMN_REVERSE)}const v={id:"spacer",components:[new Vg(this.model,this.services)],growth:Y.PREFERRED},y={id:"full-frame",components:[new jg(this.model,this.services,[...m?[f]:[],...m?[v]:[],p],{direction:g})],growth:Y.STRETCH},_={id:"zoom-bar",components:[new rv(this.model,this.services)],growth:Y.PREFERRED,renderType:I.SVG},b=[];if(c||r){b.push(d);const t={id:"spacer",components:[new Vg(this.model,this.services,r?{size:15}:void 0)],growth:Y.PREFERRED};b.push(t)}return a&&b.push(_),b.push(y),[new av(this.model,this.services),new Gg(this.model,this.services),new jg(this.model,this.services,b,{direction:W.COLUMN})]}}Q.LINE,Q.SCATTER,Q.AREA,Q.STACKED_AREA,Q.SIMPLE_BAR,Q.GROUPED_BAR,Q.STACKED_BAR;class __ extends y_{constructor(t,e){super(t,e),this.model.setOptions(function(t,e){var n;const i=Oi(t),r=Object.keys(e.axes||{});null!=(n=null==e?void 0:e.toolbar)&&n.controls&&delete i.toolbar.controls,0===r.length&&delete i.axes;for(const t in i.axes)if(r.includes(t)){const n=e.axes[t];if((n.primary||n.secondary)&&console.warn("`primary` & `secondary` are no longer needed for axis configurations. Read more here https://charts.carbondesignsystem.com/"),null==n.mapsTo){const t=n.scaleType;null==t?n.mapsTo="value":t===F.TIME?n.mapsTo="date":t===F.LABELS&&(n.mapsTo="key")}}else delete i.axes[t];return hc(i,e),Qi(i,e)}(lc.lineChart,e.options)),this.init(t,e)}getComponents(){const t=[new _v(this.model,this.services),new fv(this.model,this.services),new mv(this.model,this.services),new pv(this.model,this.services),new gv(this.model,this.services,{handleThresholds:!0}),new xv(this.model,this.services),new wv(this.model,this.services)];return this.getAxisChartComponents(t)}}class b_ extends i.PureComponent{constructor(){super(...arguments),o(this,"chart"),o(this,"chartRef",i.createRef())}createChart(t,e,n){throw new Error("Method not implemented.")}componentDidMount(){this.chartRef.current&&!this.chart&&(this.chart=this.createChart(this.chartRef.current,this.props.data,this.props.options))}componentDidUpdate(t){var e,n;this.props.data!==t.data&&(null==(e=this.chart)||e.model.setData(this.props.data)),this.props.options!==t.options&&(null==(n=this.chart)||n.model.setOptions(this.props.options))}render(){return i.createElement("div",{ref:this.chartRef,className:"chart-holder"})}}class w_ extends b_{createChart(t,e,n){return new __(t,{data:e,options:n})}}var x_;x_||(x_=1,function(t){!function(){var e={}.hasOwnProperty;function n(){for(var t="",e=0;e<arguments.length;e++){var n=arguments[e];n&&(t=r(t,i(n)))}return t}function i(t){if("string"==typeof t||"number"==typeof t)return t;if("object"!=typeof t)return"";if(Array.isArray(t))return n.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();var i="";for(var o in t)e.call(t,o)&&t[o]&&(i=r(i,o));return i}function r(t,e){return e?t?t+" "+e:t+e:t}t.exports?(n.default=n,t.exports=n):window.classNames=n}()}({exports:{}}))}}]);
|