@openmrs/esm-generic-patient-widgets-app 8.0.2-pre.4821 → 8.0.2-pre.4836

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/dist/main.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see main.js.LICENSE.txt */
2
- (()=>{var e,t,n={7604:(e,t,n)=>{"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}n.d(t,{Z:()=>p});var s=["width","height","viewBox"],l=["tabindex"],c={focusable:"false",preserveAspectRatio:"xMidYMid meet"};var u=n(3980),d=n.n(u),h=n(7900),f=n.n(h);const p=f().forwardRef((function(e,t){let{className:n,children:r,tabIndex:o,xmlns:u="http://www.w3.org/2000/svg",preserveAspectRatio:d="xMidYMid meet",...h}=e;const{tabindex:p,...m}=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.width,n=e.height,r=e.viewBox,o=void 0===r?"0 0 ".concat(t," ").concat(n):r,u=a(e,s),d=u.tabindex,h=a(u,l),f=i(i(i({},c),h),{},{width:t,height:n,viewBox:o});return f["aria-label"]||f["aria-labelledby"]||f.title?(f.role="img",null!=d&&(f.focusable="true",f.tabindex=d)):f["aria-hidden"]=!0,f}({...h,tabindex:o}),g=m;return n&&(g.className=n),null!=p&&(g.tabIndex="number"==typeof p?p:Number(o)),t&&(g.ref=t),u&&(g.xmlns=u),d&&(g.preserveAspectRatio=d),f().createElement("svg",g,r)}));p.displayName="Icon",p.propTypes={"aria-hidden":d().oneOfType([d().bool,d().oneOf(["true","false"])]),"aria-label":d().string,"aria-labelledby":d().string,children:d().node,className:d().string,height:d().oneOfType([d().number,d().string]),preserveAspectRatio:d().string,tabIndex:d().oneOfType([d().number,d().string]),viewBox:d().string,width:d().oneOfType([d().number,d().string]),xmlns:d().string}},5508:(e,t,n)=>{"use strict";n.d(t,{iA:()=>s});var r,i=n(7900),o=n.n(i),a=n(7604);const s=o().forwardRef((function(e,t){let{children:n,size:i=16,...s}=e;return o().createElement(a.Z,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...s},r||(r=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"})),n)}))},2074:(e,t,n)=>{"use strict";n.d(t,{BV:()=>k,XZ:()=>C,_M:()=>N,_Q:()=>R,eA:()=>A,kF:()=>M,s$:()=>D});var r,i,o,a,s,l,c,u,d,h,f,p,m,g,v,y,b,w,_,E,x,S=n(7900),T=n.n(S),O=n(7604);const A=T().forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return T().createElement(O.Z,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},r||(r=T().createElement("path",{d:"M13,15c1.4854,0,2.5544,1.4966,3.6863,3.0811C17.9983,19.918,19.4854,22,22,22c5.6709,0,7.78-10.79,8-12l-1.9678-.3584C27.55,12.2827,25.3938,20,22,20c-1.4854,0-2.5544-1.4966-3.6863-3.0811C17.0017,15.082,15.5146,13,13,13c-4.186,0-7.4448,7.4043-9,11.7617V2H2V28a2.0025,2.0025,0,0,0,2,2H30V28H5.0439C6.5544,22.8574,9.9634,15,13,15Z"})),n)})),C=T().forwardRef((function(e,t){let{children:n,size:r=16,...o}=e;return T().createElement(O.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},i||(i=T().createElement("path",{d:"M26,4H6A2,2,0,0,0,4,6V26a2,2,0,0,0,2,2H26a2,2,0,0,0,2-2V6A2,2,0,0,0,26,4ZM6,26V6H26V26Z"})),n)})),k=T().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return T().createElement(O.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},o||(o=T().createElement("path",{d:"M26,4H6A2,2,0,0,0,4,6V26a2,2,0,0,0,2,2H26a2,2,0,0,0,2-2V6A2,2,0,0,0,26,4ZM14,21.5,9,16.5427,10.5908,15,14,18.3456,21.4087,11l1.5918,1.5772Z"})),a||(a=T().createElement("path",{fill:"none",d:"M14,21.5,9,16.5427,10.5908,15,14,18.3456,21.4087,11l1.5918,1.5772Z","data-icon-path":"inner-path"})),n)})),M=T().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return 16===r||"16"===r||"16px"===r?T().createElement(O.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},s||(s=T().createElement("path",{d:"M8,1C4.1,1,1,4.1,1,8c0,3.9,3.1,7,7,7s7-3.1,7-7C15,4.1,11.9,1,8,1z M7,11L4.3,8.3l0.9-0.8L7,9.3l4-3.9l0.9,0.8L7,11z"})),l||(l=T().createElement("path",{d:"M7,11L4.3,8.3l0.9-0.8L7,9.3l4-3.9l0.9,0.8L7,11z","data-icon-path":"inner-path",opacity:"0"})),n):20===r||"20"===r||"20px"===r?T().createElement(O.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...i},c||(c=T().createElement("path",{d:"M10,1c-4.9,0-9,4.1-9,9s4.1,9,9,9s9-4,9-9S15,1,10,1z M8.7,13.5l-3.2-3.2l1-1l2.2,2.2l4.8-4.8l1,1L8.7,13.5z"})),u||(u=T().createElement("path",{fill:"none",d:"M8.7,13.5l-3.2-3.2l1-1l2.2,2.2l4.8-4.8l1,1L8.7,13.5z","data-icon-path":"inner-path",opacity:"0"})),n):24===r||"24"===r||"24px"===r?T().createElement(O.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...i},d||(d=T().createElement("path",{d:"M12,1C6,1,1,6,1,12s5,11,11,11s11-4.9,11-11S18.1,1,12,1z M10.4,16.3l-3.9-3.9l1.3-1.2l2.7,2.7l5.8-5.8l1.3,1.3L10.4,16.3z"})),h||(h=T().createElement("path",{fill:"none",d:"M10.4,16.3l-3.9-3.9l1.3-1.2l2.7,2.7l5.8-5.8l1.3,1.3L10.4,16.3z","data-icon-path":"inner-path",opacity:"0"})),n):T().createElement(O.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},f||(f=T().createElement("path",{d:"M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2ZM14,21.5908l-5-5L10.5906,15,14,18.4092,21.41,11l1.5957,1.5859Z"})),p||(p=T().createElement("path",{fill:"none",d:"M14 21.591L9 16.591 10.591 15 14 18.409 21.41 11 23.005 12.585 14 21.591z","data-icon-path":"inner-path"})),n)})),N=T().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return"glyph"===r||"glyph"===r||"glyphpx"===r?T().createElement(O.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 6",fill:"currentColor",...i},m||(m=T().createElement("path",{d:"M5 6L0 1 0.7 0.3 5 4.6 9.3 0.3 10 1z"})),n):16===r||"16"===r||"16px"===r?T().createElement(O.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},g||(g=T().createElement("path",{d:"M8 11L3 6 3.7 5.3 8 9.6 12.3 5.3 13 6z"})),n):T().createElement(O.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},v||(v=T().createElement("path",{d:"M16 22L6 12 7.4 10.6 16 19.2 24.6 10.6 26 12z"})),n)})),D=T().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return"glyph"===r||"glyph"===r||"glyphpx"===r?T().createElement(O.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6 10",fill:"currentColor",...i},y||(y=T().createElement("path",{d:"M0 5L5 0 5.7 0.7 1.4 5 5.7 9.3 5 10z"})),n):16===r||"16"===r||"16px"===r?T().createElement(O.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},b||(b=T().createElement("path",{d:"M5 8L10 3 10.7 3.7 6.4 8 10.7 12.3 10 13z"})),n):T().createElement(O.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},w||(w=T().createElement("path",{d:"M10 16L20 6 21.4 7.4 12.8 16 21.4 24.6 20 26z"})),n)})),R=T().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return"glyph"===r||"glyph"===r||"glyphpx"===r?T().createElement(O.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6 10",fill:"currentColor",...i},_||(_=T().createElement("path",{d:"M6 5L1 10 0.3 9.3 4.6 5 0.3 0.7 1 0z"})),n):16===r||"16"===r||"16px"===r?T().createElement(O.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},E||(E=T().createElement("path",{d:"M11 8L6 13 5.3 12.3 9.6 8 5.3 3.7 6 3z"})),n):T().createElement(O.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},x||(x=T().createElement("path",{d:"M22 16L12 26 10.6 24.6 19.2 16 10.6 7.4 12 6z"})),n)}))},526:(e,t,n)=>{"use strict";n.d(t,{UQy:()=>T,Qdk:()=>X,zxk:()=>de,wQF:()=>zr,gqd:()=>pe,lSo:()=>Tt,mh4:()=>xt,tlE:()=>hi,OK9:()=>Ie,tdY:()=>Le,iA_:()=>jt,RMI:()=>qt,pj1:()=>Yt,xJi:()=>Kt,ssF:()=>tn,xDH:()=>an,SCH:()=>cn,mQc:()=>Re,n9L:()=>pt});var r={};try{process.env.CARBON_ENABLE_CSS_CUSTOM_PROPERTIES&&"true"===process.env.CARBON_ENABLE_CSS_CUSTOM_PROPERTIES?r.enableCssCustomProperties=!0:r.enableCssCustomProperties=!1,process.env.CARBON_ENABLE_USE_CONTROLLED_STATE_WITH_VALUE&&"true"===process.env.CARBON_ENABLE_USE_CONTROLLED_STATE_WITH_VALUE?r.enableUseControlledStateWithValue=!0:r.enableUseControlledStateWithValue=!1,process.env.CARBON_ENABLE_CSS_GRID&&"true"===process.env.CARBON_ENABLE_CSS_GRID?r.enableCssGrid=!0:r.enableCssGrid=!1,process.env.CARBON_ENABLE_V11_RELEASE?"true"===process.env.CARBON_ENABLE_V11_RELEASE?r.enableV11Release=!0:r.enableV11Release=!1:r.enableV11Release=!0,process.env.CARBON_ENABLE_EXPERIMENTAL_TILE_CONTRAST&&"true"===process.env.CARBON_ENABLE_EXPERIMENTAL_TILE_CONTRAST?r.enableExperimentalTileContrast=!0:r.enableExperimentalTileContrast=!1,process.env.CARBON_ENABLE_V12_TILE_DEFAULT_ICONS&&"true"===process.env.CARBON_ENABLE_V12_TILE_DEFAULT_ICONS?r.enableV12TileDefaultIcons=!0:r.enableV12TileDefaultIcons=!1,process.env.CARBON_ENABLE_V12_OVERFLOWMENU&&"true"===process.env.CARBON_ENABLE_V12_OVERFLOWMENU?r.enableV12Overflowmenu=!0:r.enableV12Overflowmenu=!1}catch(e){r.enableCssCustomProperties=!1,r.enableUseControlledStateWithValue=!1,r.enableCssGrid=!1,r.enableV11Release=!0,r.enableExperimentalTileContrast=!1,r.enableV12TileDefaultIcons=!1,r.enableV12Overflowmenu=!1}var i=[{name:"enable-css-custom-properties",description:"Describe what the flag does",enabled:r.enableCssCustomProperties},{name:"enable-use-controlled-state-with-value",description:"Enable components to be created in either a controlled or uncontrolled mode\n",enabled:r.enableUseControlledStateWithValue},{name:"enable-css-grid",description:"Enable CSS Grid Layout in the Grid and Column React components\n",enabled:r.enableCssGrid},{name:"enable-v11-release",description:"Enable the features and functionality for the v11 Release\n",enabled:r.enableV11Release},{name:"enable-experimental-tile-contrast",description:"Enable the experimental tile improved contrast styles\n",enabled:r.enableExperimentalTileContrast},{name:"enable-v12-tile-default-icons",description:"Enable rendering of default icons in the tile components\n",enabled:r.enableV12TileDefaultIcons},{name:"enable-v12-overflowmenu",description:"Enable the use of the v12 OverflowMenu leveraging the Menu subcomponents\n",enabled:r.enableV12Overflowmenu}];function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,"symbol"==typeof(i=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key))?i:String(i)),r)}var i}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||s(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}for(var c=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.flags=new Map,t&&Object.keys(t).forEach((function(e){n.flags.set(e,t[e])}))}var t,n;return t=e,n=[{key:"checkForFlag",value:function(e){if(!this.flags.has(e))throw new Error("Unable to find a feature flag with the name: `".concat(e,"`"))}},{key:"add",value:function(e,t){if(this.flags.has(e))throw new Error("The feature flag: ".concat(e," already exists"));this.flags.set(e,t)}},{key:"enable",value:function(e){this.checkForFlag(e),this.flags.set(e,!0)}},{key:"disable",value:function(e){this.checkForFlag(e),this.flags.set(e,!1)}},{key:"merge",value:function(e){var t=this;Object.keys(e).forEach((function(n){t.flags.set(n,e[n])}))}},{key:"mergeWithScope",value:function(e){var t,n=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=s(e))){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw o}}}}(e.flags);try{for(n.s();!(t=n.n()).done;){var r=a(t.value,2),i=r[0],o=r[1];this.flags.has(i)||this.flags.set(i,o)}}catch(e){n.e(e)}finally{n.f()}}},{key:"enabled",value:function(e){return this.checkForFlag(e),this.flags.get(e)}}],n&&o(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),u=new c(void 0),d=0;d<i.length;d++){var h=i[d];u.add(h.name,h.enabled)}function f(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p.apply(this,arguments)}!function(){u.merge.apply(u,arguments)}({"enable-css-custom-properties":!0,"enable-css-grid":!0,"enable-v11-release":!0,"enable-experimental-tile-contrast":!1});var m=n(2192),g=n.n(m),v=n(7900),y=n.n(v);const b=y().createContext("cds");function w(){return y().useContext(b)}var _=n(3980),E=n.n(_);const x=(0,v.createContext)({disabled:!1}),S=e=>{let{disabled:t,children:n}=e;return y().createElement(x.Provider,{value:{disabled:t}},n)};function T(e){let{align:t="end",children:n,className:r,disabled:i=!1,isFlush:o=!1,size:a,...s}=e;const l=w(),c=g()(`${l}--accordion`,r,{[`${l}--accordion--${t}`]:t,[`${l}--accordion--${a}`]:a,[`${l}--layout--size-${a}`]:a,[`${l}--accordion--flush`]:o&&"start"!==t});return y().createElement(S,{disabled:i},y().createElement("ul",p({className:c},s),n))}T.propTypes={align:E().oneOf(["start","end"]),children:E().node,className:E().string,disabled:E().bool,isFlush:E().bool,size:E().oneOf(["sm","md","lg"])};var O=n(2074);function A(){let e=0;return function(){return++e}}const C=!("undefined"==typeof window||!window.document||!window.document.createElement),k=y().createContext(null),M=A(),N=C?v.useLayoutEffect:v.useEffect;let D=!1;function R(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"id";const t=y().useContext(k),[n,r]=(0,v.useState)((()=>D?`${t?`${t}-`:""}${e}-${M()}`:null));if(N((()=>{null===n&&r(`${t?`${t}-`:""}${e}-${M()}`)}),[M]),(0,v.useEffect)((()=>{!1===D&&(D=!0)}),[]),"function"==typeof y().useId){const n=function(e,t){return`${e?`${e}-`:""}${t}-${y().useId()}`}(t,e);return n}return n}const L={};function P(e,t){return function(t,n,r){if(void 0!==t[n]){L[r]&&L[r][n]||(L[r]={...L[r],[n]:!0});for(var i=arguments.length,o=new Array(i>3?i-3:0),a=3;a<i;a++)o[a-3]=arguments[a];return e(t,n,r,...o)}}}const I=(0,v.createContext)(null);function $(e){let{as:t,children:n,dir:r,...i}=e;const o=(0,v.useContext)(I),a={},s=t??"span",l={...o};if(o){const{direction:e,getTextDirection:t}=o;if(t&&t.current){const r=function(e){if("string"==typeof e)return e;const t=y().Children.map(e,(e=>"string"==typeof e?e:null))?.filter((e=>null!==e));return 1===t?.length?t[0]:t}(n),i=t.current(r);e!==i?(a.dir=i,l.direction=i):"auto"===e&&(a.dir=i)}else e!==r?(a.dir=r,l.direction=r):"auto"===e&&(a.dir=r)}else a.dir=r,l.direction=r;return y().createElement(I.Provider,{value:l},y().createElement(s,p({},i,a),n))}function z(e,t){for(let n=0;n<t.length;n++)if(B(e,t[n]))return!0;return!1}function B(e){let{key:t,which:n,keyCode:r,code:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e?e===t:"number"==typeof e?e===n||e===r:e.key&&Array.isArray(t)?-1!==t.indexOf(e.key):e.key===t||e.which===n||e.keyCode===r||e.code===i}$.propTypes={as:E().oneOfType([E().func,E().string,E().elementType]),children:E().node.isRequired,dir:E().oneOf(["ltr","rtl","auto"])};const j={key:"Enter",which:13,keyCode:13,code:"Enter"},F={key:["Escape","Esc"],which:27,keyCode:27,code:"Esc"},U={key:" ",which:32,keyCode:32,code:"Space"},H={key:"End",which:35,keyCode:35,code:"Numpad1"},V={key:"Home",which:36,keyCode:36,code:"Numpad7"},Z={key:"ArrowLeft",which:37,keyCode:37,code:"ArrowLeft"},W={key:"ArrowUp",which:38,keyCode:38,code:"ArrowUp"},G={key:"ArrowRight",which:39,keyCode:39,code:"ArrowRight"},q={key:"ArrowDown",which:40,keyCode:40,code:"ArrowDown"},Y={key:"Delete",which:8,keyCode:8,code:"ArrowDecimal"},K=e=>y().createElement("button",p({type:"button"},e));function X(e){let{children:t,className:n="",open:r=!1,onHeadingClick:i,renderExpando:o=K,renderToggle:a,title:s="title",disabled:l,handleAnimationEnd:c,...u}=e;const[d,h]=(0,v.useState)(r),[f,m]=(0,v.useState)(r),[b,_]=(0,v.useState)(""),E=(0,v.useContext)(x),S="boolean"==typeof l?l:E.disabled,T=R("accordion-item"),A=w(),C=g()({[`${A}--accordion__item`]:!0,[`${A}--accordion__item--active`]:d,[`${A}--accordion__item--${b}`]:b,[`${A}--accordion__item--disabled`]:S,[n]:!!n}),k=a||o;return r!==f&&(_(d?"collapsing":"expanding"),h(r),m(r)),y().createElement("li",p({className:C},u,{onAnimationEnd:function(e){c&&c(e),_("")}}),y().createElement(k,{disabled:S,"aria-controls":T,"aria-expanded":d,className:`${A}--accordion__heading`,onClick:function(e){const t=!d;_(d?"collapsing":"expanding"),h(t),i&&i({isOpen:t,event:e})},onKeyDown:function(e){d&&B(e,F)&&h(!1)},type:"button"},y().createElement(O._Q,{className:`${A}--accordion__arrow`}),y().createElement($,{as:"div",className:`${A}--accordion__title`},s)),y().createElement("div",{id:T,className:`${A}--accordion__content`},t))}X.propTypes={children:E().node,className:E().string,disabled:E().bool,onClick:E().func,onHeadingClick:E().func,open:E().bool,renderExpando:P(E().func),renderToggle:E().func,title:E().node};var Q="undefined"!=typeof window?v.useLayoutEffect:v.useEffect;const J=e=>(0,v.useCallback)((t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}),e);function ee(e,t,n){const r=(0,v.useRef)(null);(0,v.useEffect)((()=>{r.current=n}),[n]),(0,v.useEffect)((()=>{const n=e=>{r.current&&r.current(e)},i="current"in e?e.current:e;return i?.addEventListener?.(t,n),()=>{i?.removeEventListener?.(t,n)}}),[e,t])}function te(e,t){const n=(0,v.useRef)(null);(0,v.useEffect)((()=>{n.current=t}),[t]),(0,v.useEffect)((()=>{function t(e){n.current&&n.current(e)}return window.addEventListener(e,t),()=>{window.removeEventListener(e,t)}}),[e])}const ne=y().createContext({floating:{current:null}}),re=y().forwardRef((function(e,t){let{isTabTip:n,align:r=(n?"bottom-left":"bottom"),as:i="span",autoAlign:o=!1,caret:a=!n,className:s,children:l,dropShadow:c=!0,highContrast:u=!1,onRequestClose:d,open:h,...f}=e;const m=w(),b=(0,v.useRef)(null),_=(0,v.useRef)(null);te("blur",(()=>{h&&d?.()})),te("click",(e=>{h&&!_?.current?.contains(e.target)&&d?.()}));const E=(0,v.useMemo)((()=>({floating:b})),[]);n&&(["bottom-left","bottom-right"].includes(r)||(r="bottom-left"));const x=J([t,_]),[S,T]=(0,v.useState)(!1),[O,A]=(0,v.useState)(r),C=g()({[`${m}--popover-container`]:!0,[`${m}--popover--caret`]:a,[`${m}--popover--drop-shadow`]:c,[`${m}--popover--high-contrast`]:u,[`${m}--popover--open`]:h,[`${m}--popover--${O}`]:S&&!n,[`${m}--popover--${r}`]:!S,[`${m}--popover--tab-tip`]:n},s);Q((()=>{if(!h)return;if(!o||n)return void T(!1);if(!b.current)return;if(!0===S)return;const e=b.current.getBoundingClientRect(),t=e.x<-16,i=e.y<-16,a=e.x+(e.width-16)>document.documentElement.clientWidth,s=e.y+(e.height-16)>document.documentElement.clientHeight;if(!(t||i||a||s))return void T(!1);const l=["top","top-left","right-bottom","right","right-top","bottom-left","bottom","bottom-right","left-top","left","left-bottom","top-right"],c=[r];let u=l[(l.indexOf(r)+1)%l.length];for(;u&&!c.includes(u);)c.push(u),u=l[(l.indexOf(u)+1)%l.length];function d(e){if(!_.current||!b.current)return!1;_.current.classList.add(`${m}--popover--${e}`);const t=b.current.getBoundingClientRect();return t.x<-16||t.y<-16||t.x+(t.width-16)>document.documentElement.clientWidth||t.y+(t.height-16)>document.documentElement.clientHeight?(_.current.classList.remove(`${m}--popover--${e}`),!1):(_.current.classList.remove(`${m}--popover--${e}`),!0)}let f=null;for(let e=0;e<c.length;e++){const t=c[e];if(d(t)){f=t;break}}f&&(T(!0),A(f))}),[S,r,o,m,h,n]);const k=y().Children.map(l,(e=>{const t=e;if("button"===t?.type){const{className:e}=t.props,n=g()(`${m}--popover--tab-tip__button`,e);return y().cloneElement(t,{className:n})}return t})),M=i;return y().createElement(ne.Provider,{value:E},y().createElement(M,p({},f,{className:C,ref:x}),n?k:l))}));function ie(e,t){let{className:n,children:r,...i}=e;const o=w(),{floating:a}=y().useContext(ne),s=J([a,t]);return y().createElement("span",p({},i,{className:`${o}--popover`}),y().createElement("span",{className:g()(`${o}--popover-content`,n),ref:s},r),y().createElement("span",{className:`${o}--popover-caret`}))}re.propTypes={align:E().oneOf(["top","top-left","top-right","bottom","bottom-left","bottom-right","left","left-bottom","left-top","right","right-bottom","right-top"]),as:E().oneOfType([E().string,E().elementType]),autoAlign:E().bool,caret:E().bool,children:E().node,className:E().string,dropShadow:E().bool,highContrast:E().bool,isTabTip:E().bool,onRequestClose:E().func,open:E().bool.isRequired};const oe=y().forwardRef(ie);function ae(e){if(!e||!e.childNodes)return null;if(function(e){if(e.tabIndex<0)return!1;if(e.disabled)return!1;switch(e.nodeName){case"A":return!!e.href&&"ignore"!==e.rel;case"INPUT":return"hidden"!==e.type;case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}}(e))return e;for(const t of e.childNodes){const e=ae(t);if(e)return e}return null}function se(e){if(!e||!e.childNodes)return null;if(e?.getAttribute?.("role")&&""!==e.getAttribute("role"))return e;for(const t of e.childNodes){const e=se(t);if(e)return e}return null}function le(e){let{align:t="top",className:n,children:r,label:i,description:o,enterDelayMs:a=100,leaveDelayMs:s=300,defaultOpen:l=!1,closeOnActivation:c=!1,...u}=e;const d=(0,v.useRef)(null),h=(0,v.useRef)(null),[f,m]=function(e){const[t,n]=(0,v.useState)(e),r=(0,v.useRef)(null),i=(0,v.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;window.clearTimeout(r.current??void 0),r.current=null,0!==t?r.current=window.setTimeout((()=>{n(e),r.current=null}),t):n(e)}),[]);return(0,v.useEffect)((()=>()=>{window.clearTimeout(r.current??void 0)}),[]),[t,i]}(l),b=R("tooltip"),_=w(),E=y().Children.only(r),x={onFocus:()=>m(!0),onBlur:()=>m(!1),onClick:()=>c&&m(!1),onMouseEnter:function(){m(!0,a)}};return i?x["aria-labelledby"]=b:x["aria-describedby"]=b,(0,v.useEffect)((()=>{null!==d&&d.current&&(ae(d.current)||m(!1))})),y().createElement(re,p({},u,{align:t,className:g()(`${_}--tooltip`,n),dropShadow:!1,highContrast:!0,onKeyDown:function(e){f&&B(e,F)&&(e.stopPropagation(),m(!1)),f&&c&&(B(e,j)||B(e,U))&&m(!1)},onMouseLeave:function(){m(!1,s)},open:f,ref:d}),y().createElement("div",{className:`${_}--tooltip-trigger__wrapper`},void 0!==E?y().cloneElement(E,{...x,...function(e){const t={};return["onFocus","onBlur","onClick","onMouseEnter"].forEach((n=>{t[n]=t=>{x[n](),e?.[n]&&e?.[n](t)}})),t}(E.props)}):null),y().createElement(oe,{"aria-hidden":f?"false":"true",className:`${_}--tooltip-content`,id:b,ref:h,role:"tooltip"},i||o))}oe.propTypes={children:E().node,className:E().string},le.propTypes={align:E().oneOf(["top","top-left","top-right","bottom","bottom-left","bottom-right","left","left-bottom","left-top","right","right-bottom","right-top"]),children:E().node,className:E().string,closeOnActivation:E().bool,defaultOpen:E().bool,description:E().node,enterDelayMs:E().number,label:E().node,leaveDelayMs:E().number};const ce=y().forwardRef((function(e,t){const{align:n,children:r,className:i,closeOnActivation:o=!0,defaultOpen:a=!1,disabled:s,enterDelayMs:l=100,kind:c,label:u,leaveDelayMs:d=100,wrapperClasses:h,size:f,isSelected:m,...v}=e,b=w(),_=g()(h,`${b}--icon-tooltip`,{[`${b}--icon-tooltip--disabled`]:s});return y().createElement(le,{align:n,closeOnActivation:o,className:_,defaultOpen:a,enterDelayMs:l,label:u,leaveDelayMs:d},y().createElement(de,p({},v,{disabled:s,kind:c,ref:t,size:f,className:g()(`${b}--btn--icon-only`,{[`${b}--btn--selected`]:m},i)}),r))}));ce.propTypes={align:E().oneOf(["top","top-left","top-right","bottom","bottom-left","bottom-right","left","right"]),children:E().node,className:E().string,closeOnActivation:E().bool,defaultOpen:E().bool,disabled:E().bool,enterDelayMs:E().number,isSelected:E().bool,kind:E().oneOf(["primary","secondary","ghost","tertiary"]),label:E().node.isRequired,leaveDelayMs:E().number,size:E().oneOf(["sm","md","lg"]),wrapperClasses:E().string};const ue=e=>function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];for(let n=0;n<e.length&&!t.defaultPrevented;n++){const i=e[n];"function"==typeof i&&i(t,...r)}},de=y().forwardRef((function(e,t){let{as:n,children:r,className:i,dangerDescription:o="danger",disabled:a=!1,hasIconOnly:s=!1,href:l,iconDescription:c,isExpressive:u=!1,isSelected:d,kind:h="primary",onBlur:f,onClick:m,onFocus:b,onMouseEnter:_,onMouseLeave:E,renderIcon:x,size:S,tabIndex:T,tooltipAlignment:O="center",tooltipPosition:A="top",type:C="button",...k}=e;const M=(0,v.useRef)(null),N=w(),D=e=>{e.target!==M.current||e.preventDefault()},L={tabIndex:T,className:g()(i,{[`${N}--btn`]:!0,[`${N}--btn--sm`]:"sm"===S&&!u,[`${N}--btn--md`]:"md"===S&&!u,[`${N}--btn--xl`]:"xl"===S,[`${N}--btn--2xl`]:"2xl"===S,[`${N}--layout--size-${S}`]:S,[`${N}--btn--${h}`]:h,[`${N}--btn--disabled`]:a,[`${N}--btn--expressive`]:u,[`${N}--btn--icon-only`]:s,[`${N}--btn--selected`]:s&&d&&"ghost"===h}),ref:t},P=x?y().createElement(x,{"aria-label":c,className:`${N}--btn__icon`,"aria-hidden":"true"}):null,I=x?y().createElement(x,null):null,$=["danger","danger--tertiary","danger--ghost"];let z="button";const B=R("danger-description"),{"aria-pressed":j}=k;let F={disabled:a,type:C,"aria-describedby":$.includes(h)?B:void 0,"aria-pressed":j??(s&&"ghost"===h?d:void 0)};const U={href:l};let H=null;if($.includes(h)&&(H=y().createElement("span",{id:B,className:`${N}--visually-hidden`},o)),n?(z=n,F={...F,...U}):l&&!a&&(z="a",F=U),s){let e;return"top"!==A&&"bottom"!==A||("center"===O&&(e=A),"end"===O&&(e=`${A}-right`),"start"===O&&(e=`${A}-left`)),"right"!==A&&"left"!==A||(e=A),y().createElement(ce,p({as:n,align:e,label:c,kind:h,size:S,onMouseEnter:_,onMouseLeave:E,onFocus:b,onBlur:f,onClick:ue([m,D])},k,L,F),I||r)}return y().createElement(z,{onMouseEnter:_,onMouseLeave:E,onFocus:b,onBlur:f,onClick:m,...k,...L,...F},H,r,P)}));var he,fe;de.displayName="Button",de.propTypes={as:E().oneOfType([E().func,E().string,E().elementType]),children:E().node,className:E().string,dangerDescription:E().string,disabled:E().bool,hasIconOnly:E().bool,href:E().string,iconDescription:e=>!e.renderIcon||e.children||e.iconDescription?null:new Error("renderIcon property specified without also providing an iconDescription property."),isExpressive:E().bool,isSelected:E().bool,kind:E().oneOf(["primary","secondary","danger","ghost","danger--primary","danger--ghost","danger--tertiary","tertiary"]),onBlur:E().func,onClick:E().func,onFocus:E().func,onMouseEnter:E().func,onMouseLeave:E().func,renderIcon:E().oneOfType([E().func,E().object]),role:E().string,size:E().oneOf(["sm","md","lg","xl","2xl"]),tabIndex:E().number,tooltipAlignment:E().oneOf(["start","center","end"]),tooltipPosition:E().oneOf(["top","right","bottom","left"]),type:E().oneOf(["button","reset","submit"])};const pe=e=>{let{headers:t,rowCount:n=5,columnCount:r=5,zebra:i=!1,compact:o=!1,className:a,showHeader:s=!0,showToolbar:l=!0,...c}=e;const u=w(),d=g()(a,{[`${u}--skeleton`]:!0,[`${u}--data-table`]:!0,[`${u}--data-table--zebra`]:i,[`${u}--data-table--compact`]:o}),h=n,f=Array(h),m=Array.from({length:r},((e,t)=>t));for(let e=0;e<h;e++)f[e]=y().createElement("tr",{key:e},m.map((e=>y().createElement("td",{key:e},he||(he=y().createElement("span",null))))));return y().createElement("div",{className:`${u}--skeleton ${u}--data-table-container`},s?y().createElement("div",{className:`${u}--data-table-header`},y().createElement("div",{className:`${u}--data-table-header__title`}),y().createElement("div",{className:`${u}--data-table-header__description`})):null,l?y().createElement("section",{"aria-label":"data table toolbar",className:`${u}--table-toolbar`},y().createElement("div",{className:`${u}--toolbar-content`},y().createElement("span",{className:`${u}--skeleton ${u}--btn ${u}--btn--sm`}))):null,y().createElement("table",p({className:d},c),y().createElement("thead",null,y().createElement("tr",null,m.map((e=>y().createElement("th",{key:e},t?y().createElement("div",{className:"bx--table-header-label"},t[e]?.header):fe||(fe=y().createElement("span",null))))))),y().createElement("tbody",null,f)))};pe.propTypes={className:E().string,columnCount:E().number,compact:E().bool,headers:E().arrayOf(E().shape({header:E().node.isRequired}).isRequired),rowCount:E().number,showHeader:E().bool,showToolbar:E().bool,zebra:E().bool};var me,ge=n(7604);const ve=y().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return y().createElement(ge.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},me||(me=y().createElement("path",{d:"M17.4141 16L24 9.4141 22.5859 8 16 14.5859 9.4143 8 8 9.4141 14.5859 16 8 22.5859 9.4143 24 16 17.4141 22.5859 24 24 22.5859 17.4141 16z"})),n)}));var ye=16;function be(e){return"".concat(e/ye,"rem")}be(320),be(672),be(16);var we={width:be(1056),columns:16,margin:be(16)};be(1312),be(16),be(1584),be(24);function _e(e){return be(8*e)}_e(.25),_e(.5),_e(1),_e(1.5),_e(2),_e(3),_e(4),_e(5),_e(6),_e(8),_e(10),_e(12),_e(20),_e(2),_e(3),_e(4),_e(6),_e(8),_e(12),_e(20),_e(3),_e(4),_e(5),_e(6),_e(8),be(24),be(32),be(40),be(48),be(64),be(80);var Ee,xe,Se=n(594),Te=n.n(Se),Oe=n(8570);function Ae(e){const t=(0,v.useRef)(e),n=(0,v.useRef)(!1);(0,v.useEffect)((()=>{t.current=e})),(0,v.useEffect)((()=>{!0!==n.current&&(n.current=!0,t.current())}),[])}function Ce(e){let{onPress:t,onPressIn:n,onPressOut:r,onLongPress:i,delayLongPressMs:o=500}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const a=(0,v.useRef)(t),s=(0,v.useRef)(n),l=(0,v.useRef)(r),c=(0,v.useRef)(i),[u,d]=(0,v.useState)(!1),[h,f]=(0,v.useState)(!1),p=(0,v.useRef)({longPress:!1});(0,v.useEffect)((()=>{a.current=t}),[t]),(0,v.useEffect)((()=>{s.current=n}),[n]),(0,v.useEffect)((()=>{l.current=r}),[r]),(0,v.useEffect)((()=>{c.current=i}),[i]),(0,v.useEffect)((()=>{const{current:t}=e;function n(e){d(!0),s.current?.(),e.preventDefault()}function r(){d(!1),f(!1),l.current?.(p.current)}function i(){d(!1),f(!1),l.current?.(),p.current.longPress=!1}function o(){d(!1),f(!1),l.current?.(),p.current.longPress=!1}function c(){f(!1),d(!1),a.current?.(p.current),p.current.longPress=!1}function u(e){e.preventDefault()}return t.addEventListener("pointerdown",n),t.addEventListener("pointerup",r),t.addEventListener("pointercancel",i),t.addEventListener("pointerleave",o),t.addEventListener("click",c),t.addEventListener("contextmenu",u),()=>{t.removeEventListener("pointerdown",n),t.removeEventListener("pointerup",r),t.removeEventListener("pointercancel",i),t.removeEventListener("pointerleave",o),t.removeEventListener("click",c),t.removeEventListener("contextmenu",u)}}),[e]),(0,v.useEffect)((()=>{if(u){const e=setTimeout((()=>{d(!1),f(!0)}),o);return()=>{clearTimeout(e)}}}),[u,o]),(0,v.useEffect)((()=>{if(h)return p.current.longPress=!0,c.current?.()}),[h])}const ke=y().createContext({baseId:"",activeIndex:0,defaultSelectedIndex:0,dismissable:!1,onTabCloseRequest(){},setActiveIndex(){},selectedIndex:0,setSelectedIndex(){}}),Me=y().createContext({index:0,hasSecondaryLabel:!1}),Ne=`(min-width: ${we.width})`,De=y().createContext(0);function Re(e){let{children:t,defaultSelectedIndex:n=0,onChange:r,selectedIndex:i,dismissable:o,onTabCloseRequest:a}=e;const s=R("ccs"),[l,c]=(0,v.useState)(n),[u,d]=function(e){let{defaultValue:t,name:n="custom",onChange:r,value:i}=e;const[o,a]=(0,v.useState)(i??t),s=(0,v.useRef)(null);function l(e){const t="function"==typeof e?e(o):e;!1===s.current&&a(t),r&&r(t)}return null===s.current&&(s.current=void 0!==i),(0,v.useEffect)((()=>{s.current,s.current}),[n,i]),!0===s.current?[i,l]:[o,l]}({value:i,defaultValue:n,onChange:e=>r?.({selectedIndex:e})}),h={baseId:s,activeIndex:l,defaultSelectedIndex:n,dismissable:o,onTabCloseRequest:a,setActiveIndex:c,selectedIndex:u,setSelectedIndex:d};return y().createElement(ke.Provider,{value:h},t)}function Le(e){let{activation:t="automatic","aria-label":n,children:r,className:i,contained:o=!1,fullWidth:a=!1,iconSize:s,leftOverflowButtonProps:l,light:c,rightOverflowButtonProps:u,scrollDebounceWait:d=200,scrollIntoView:h,...f}=e;const{activeIndex:m,selectedIndex:b,setSelectedIndex:_,setActiveIndex:E,dismissable:x}=y().useContext(ke),S=w(),T=(0,v.useRef)(null),A=(0,v.useRef)(null),k=(0,v.useRef)(null),[M,N]=(0,v.useState)(!1),[D,R]=(0,v.useState)(0);let L=!1;o&&(L=y().Children.toArray(r).some((e=>(0,Oe.isElement)(e)&&!!e.props.secondaryLabel)));const P=function(e){const[t,n]=(0,v.useState)((()=>!!C&&window.matchMedia(e).matches));return(0,v.useEffect)((()=>{function t(e){n(e.matches)}const r=window.matchMedia(e);return r.addEventListener?r.addEventListener("change",t):r.addListener(t),n(r.matches),()=>{r.addEventListener?r.removeEventListener("change",t):r.removeListener(t)}}),[e]),t}(Ne),I=a&&o&&P&&y().Children.toArray(r).length<9,$=g()(`${S}--tabs`,{[`${S}--tabs--contained`]:o,[`${S}--tabs--light`]:c,[`${S}--tabs__icon--default`]:"default"===s,[`${S}--tabs__icon--lg`]:"lg"===s,[`${S}--layout--size-lg`]:"lg"===s,[`${S}--tabs--tall`]:L,[`${S}--tabs--full-width`]:I},i),j=44,[F,U]=(0,v.useState)(!!T.current&&D+j+T.current.clientWidth<T.current.scrollWidth),W=!!T.current&&M&&D>0,q=g()(`${S}--tab--overflow-nav-button`,`${S}--tab--overflow-nav-button--previous`,{[`${S}--tab--overflow-nav-button--hidden`]:!W}),Y=g()(`${S}--tab--overflow-nav-button`,`${S}--tab--overflow-nav-button--next`,{[`${S}--tab--overflow-nav-button--hidden`]:!F}),K=(0,v.useRef)([]),X=(0,v.useCallback)((()=>Te()((e=>{R(e.target.scrollLeft)}),d)),[d]);return Ae((()=>{const e=K.current[b];h&&e&&e.scrollIntoView({block:"nearest",inline:"nearest"})})),(0,v.useEffect)((()=>{U(!!T.current&&D+j+T.current.clientWidth<T.current.scrollWidth),x&&T.current&&N(T.current.scrollWidth>T.current.clientWidth)}),[D,r,x]),Ae((()=>{if(K.current[b].disabled){const e=K.current.filter((e=>!e.disabled));if(e.length>0){const t=e[0];_(K.current.indexOf(t))}}})),Q((()=>{T.current&&N(T.current.scrollWidth>T.current.clientWidth);const e=Te()((function(){T.current&&N(T.current.scrollWidth>T.current.clientWidth)}),200);return window.addEventListener("resize",e),()=>{e.cancel(),window.removeEventListener("resize",e)}}),[]),Q((()=>{null!==D&&T.current&&(T.current.scrollLeft=D)}),[D]),Q((()=>{if(!M||!T.current)return;const e="manual"===t?K.current[m]:K.current[b];if(e){const{width:t}=e.getBoundingClientRect(),n=e.offsetLeft,r=e.offsetLeft+t,i=T.current.scrollLeft+j,o=T.current.scrollLeft+T.current.clientWidth-j;n<i&&R(n-j),r>o&&R(r+j-T.current.clientWidth)}}),[t,m,b,M,r]),Ce(A,{onPress(e){let{longPress:t}=e;!t&&T.current&&R(Math.max(D-T.current.scrollWidth/K.current.length*1.5,0))},onLongPress:()=>Pe(T,"backward",R)}),Ce(k,{onPress(e){let{longPress:t}=e;!t&&T.current&&R(Math.min(D+T.current.scrollWidth/K.current.length*1.5,T.current.scrollWidth-T.current.clientWidth))},onLongPress:()=>Pe(T,"forward",R)}),y().createElement("div",{className:$},y().createElement("button",p({"aria-hidden":"true",tabIndex:-1,"aria-label":"Scroll left",ref:A,className:q,type:"button"},l),Ee||(Ee=y().createElement(O.s$,null))),y().createElement("div",p({},f,{"aria-label":n,ref:T,role:"tablist",className:`${S}--tab--list`,onScroll:X,onKeyDown:function(e){if(z(e,[G,Z,V,H])){e.preventDefault();const n=K.current.filter((e=>!e.disabled)),r=n.indexOf(K.current["automatic"===t?b:m]),i=K.current.indexOf(n[function(e,t,n){switch(!0){case B(e,G):return(n+1)%t;case B(e,Z):return(t+n-1)%t;case B(e,V):return 0;case B(e,H):return t-1;default:return n}}(e,n.length,r)]);"automatic"===t?_(i):"manual"===t&&E(i),K.current[i]?.focus()}}}),y().Children.map(r,((e,t)=>(0,Oe.isElement)(e)?y().createElement(Me.Provider,{value:{index:t,hasSecondaryLabel:L,contained:o}},y().cloneElement(e,{ref:e=>{K.current[t]=e}})):null))),y().createElement("button",p({"aria-hidden":"true",tabIndex:-1,"aria-label":"Scroll right",ref:k,className:Y,type:"button"},u),xe||(xe=y().createElement(O._Q,null))))}function Pe(e,t,n){const r=e.current;if(!r)return()=>{};const i=r?.style["scroll-behavior"];r.style["scroll-behavior"]="auto";const o="forward"===t?5:-5;let a=null;return a=requestAnimationFrame((function e(){r&&(r.scrollLeft=r.scrollLeft+o,a=requestAnimationFrame(e))})),()=>{r.style["scroll-behavior"]=i,n(r.scrollLeft),a&&cancelAnimationFrame(a)}}Re.propTypes={children:E().node,defaultSelectedIndex:E().number,dismissable:E().bool,onChange:E().func,onTabCloseRequest:e=>{if(e.dismissable&&!e.onTabCloseRequest)return new Error("dismissable property specified without also providing an onTabCloseRequest property.")},selectedIndex:E().number},Le.propTypes={activation:E().oneOf(["automatic","manual"]),"aria-label":E().string.isRequired,children:E().node,className:E().string,contained:E().bool,fullWidth:E().bool,iconSize:E().oneOf(["default","lg"]),leftOverflowButtonProps:E().object,light:P(E().bool),rightOverflowButtonProps:E().object,scrollDebounceWait:E().number,scrollIntoView:E().bool};const Ie=(0,v.forwardRef)((function(e,t){let{as:n="button",children:r,className:i,disabled:o,onClick:a,onKeyDown:s,secondaryLabel:l,renderIcon:c,...u}=e;const d=w(),{selectedIndex:h,setSelectedIndex:f,baseId:m,dismissable:b,onTabCloseRequest:_}=y().useContext(ke),{index:E,hasSecondaryLabel:x,contained:S}=y().useContext(Me),T=(0,v.useRef)(null),O=(0,v.useRef)(null),A=J([t,O]),[C,k]=(0,v.useState)(!1),M=`${m}-tab-${E}`,N=`${m}-tabpanel-${E}`,D=g()(`${d}--tabs__nav-item`,`${d}--tabs__nav-link`,{[`${d}--tabs__nav-item--selected`]:h===E,[`${d}--tabs__nav-item--disabled`]:o,[`${d}--tabs__nav-item--hover-off`]:C},i),R=n;ee(T,"mouseover",(e=>{S&&O.current&&(e.stopPropagation(),k(!0),O.current.classList.add(`${d}--tabs__nav-item--hover-off`))})),ee(T,"mouseleave",(()=>{S&&O.current&&(O.current.classList.remove(`${d}--tabs__nav-item--hover-off`),k(!1))}));const L=e=>{e.stopPropagation(),_?.(E)},P=y().createElement("div",{tabIndex:-1,"aria-hidden":!0,className:g()(`${d}--tabs__nav-item--close-icon`,{[`${d}--visually-hidden`]:!b}),onClick:L,title:"Close tab",ref:T},y().createElement(ve,{"aria-hidden":b?"false":"true","aria-label":"Press delete to close tab"})),I=c??b;return y().createElement(R,p({},u,{"aria-controls":N,"aria-disabled":o,"aria-selected":h===E,ref:A,id:M,role:"tab",className:D,disabled:o,onClick:e=>{o||(f(E),a?.(e))},onKeyDown:e=>{b&&B(e,Y)&&L(e),s?.(e)},tabIndex:h===E?"0":"-1",type:"button"}),y().createElement("div",{className:`${d}--tabs__nav-item-label-wrapper`},b&&c&&y().createElement("div",{className:`${d}--tabs__nav-item--icon-left`},y().createElement(c,{size:16})),y().createElement("span",{className:`${d}--tabs__nav-item-label`,title:r},r),y().createElement("div",{className:g()(`${d}--tabs__nav-item--icon`,{[`${d}--visually-hidden`]:!I})},P,!b&&c&&y().createElement(c,{size:16}))),x&&y().createElement("div",{className:`${d}--tabs__nav-item-secondary-label`,title:l},l))}));var $e,ze,Be,je,Fe,Ue,He,Ve,Ze;Ie.propTypes={as:E().oneOfType([E().string,E().elementType]),children:E().node,className:E().string,disabled:E().bool,onClick:E().func,onKeyDown:E().func,renderButton:E().func,renderIcon:E().oneOfType([E().func,E().object]),secondaryLabel:E().string},y().forwardRef((function(e,t){let{children:n,className:r,defaultOpen:i=!1,enterDelayMs:o,leaveDelayMs:a,label:s,...l}=e;const c=w(),u=g()(`${c}--tabs__nav-item--icon-only`,r);return y().createElement(le,{align:"bottom",defaultOpen:i,className:`${c}--icon-tooltip`,enterDelayMs:o,label:s,leaveDelayMs:a},y().createElement(Ie,p({className:u,ref:t},l),n))})).propTypes={children:E().node,className:E().string,defaultOpen:E().bool,enterDelayMs:E().number,label:E().node.isRequired,leaveDelayMs:E().number},y().forwardRef((function(e,t){let{children:n,className:r,...i}=e;const o=w(),a=(0,v.useRef)(null),s=J([t,a]),[l,c]=(0,v.useState)(0),[u,d]=(0,v.useState)(!1),{selectedIndex:h,baseId:f}=y().useContext(ke),m=y().useContext(De),b=`${f}-tabpanel-${m}`,_=`${f}-tab-${m}`,E=g()(`${o}--tab-content`,r,{[`${o}--tab-content--interactive`]:u});return Ae((()=>{a.current&&ae(a.current)&&(d(!0),c(-1))})),(0,v.useEffect)((()=>{const e=a.current;if(!e)return;const t=new MutationObserver((function(){ae(e)?(d(!0),c(-1)):(d(!1),c(0))}));return t.observe(e,{childList:!0,subtree:!0}),()=>t.disconnect()}),[]),y().createElement("div",p({},i,{"aria-labelledby":_,id:b,className:E,ref:s,role:"tabpanel",tabIndex:l,hidden:h!==m}),n)})).propTypes={children:E().node,className:E().string},E().node;const We=y().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return y().createElement(ge.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},$e||($e=y().createElement("path",{d:"M16,2A14.1725,14.1725,0,0,0,2,16,14.1725,14.1725,0,0,0,16,30,14.1725,14.1725,0,0,0,30,16,14.1725,14.1725,0,0,0,16,2Zm8,15H17v7H15V17H8V15h7V8h2v7h7Z"})),ze||(ze=y().createElement("path",{fill:"none",d:"M24 17L17 17 17 24 15 24 15 17 8 17 8 15 15 15 15 8 17 8 17 15 24 15 24 17z","data-icon-path":"inner-path"})),n)})),Ge=y().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return 16===r||"16"===r||"16px"===r?y().createElement(ge.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},Be||(Be=y().createElement("path",{d:"M9.3 3.7L13.1 7.5 1 7.5 1 8.5 13.1 8.5 9.3 12.3 10 13 15 8 10 3z"})),n):20===r||"20"===r||"20px"===r?y().createElement(ge.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...i},je||(je=y().createElement("path",{d:"M11.8 2.8L10.8 3.8 16.2 9.3 1 9.3 1 10.7 16.2 10.7 10.8 16.2 11.8 17.2 19 10z"})),n):24===r||"24"===r||"24px"===r?y().createElement(ge.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...i},Fe||(Fe=y().createElement("path",{d:"M14 4L12.9 5.1 18.9 11.2 2 11.2 2 12.8 18.9 12.8 12.9 18.9 14 20 22 12z"})),n):y().createElement(ge.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},Ue||(Ue=y().createElement("path",{d:"M18 6L16.57 7.393 24.15 15 4 15 4 17 24.15 17 16.57 24.573 18 26 28 16 18 6z"})),n)})),qe=y().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return 16===r||"16"===r||"16px"===r?y().createElement(ge.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},He||(He=y().createElement("path",{d:"M3.7 6.7L7.5 2.9 7.5 15 8.5 15 8.5 2.9 12.3 6.7 13 6 8 1 3 6z"})),n):y().createElement(ge.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},Ve||(Ve=y().createElement("path",{d:"M16 4L6 14 7.41 15.41 15 7.83 15 28 17 28 17 7.83 24.59 15.41 26 14 16 4z"})),n)})),Ye=y().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return y().createElement(ge.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},Ze||(Ze=y().createElement("path",{d:"M27.6 20.6L24 24.2 24 4 22 4 22 24.2 18.4 20.6 17 22 23 28 29 22zM9 4L3 10 4.4 11.4 8 7.8 8 28 10 28 10 7.8 13.6 11.4 15 10z"})),n)}));var Ke,Xe,Qe,Je,et,tt,nt,rt,it;const ot=y().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return y().createElement(ge.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},Ke||(Ke=y().createElement("path",{d:"M2,16H2A14,14,0,1,0,16,2,14,14,0,0,0,2,16Zm23.15,7.75L8.25,6.85a12,12,0,0,1,16.9,16.9ZM8.24,25.16A12,12,0,0,1,6.84,8.27L23.73,25.16a12,12,0,0,1-15.49,0Z"})),n)})),at=y().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return 16===r||"16"===r||"16px"===r?y().createElement(ge.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},Xe||(Xe=y().createElement("path",{d:"M8,1C4.1,1,1,4.1,1,8s3.1,7,7,7s7-3.1,7-7S11.9,1,8,1z M10.7,11.5L4.5,5.3l0.8-0.8l6.2,6.2L10.7,11.5z"})),Qe||(Qe=y().createElement("path",{fill:"none",d:"M10.7,11.5L4.5,5.3l0.8-0.8l6.2,6.2L10.7,11.5z","data-icon-path":"inner-path",opacity:"0"})),n):20===r||"20"===r||"20px"===r?y().createElement(ge.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...i},Je||(Je=y().createElement("path",{d:"M10,1c-5,0-9,4-9,9s4,9,9,9s9-4,9-9S15,1,10,1z M13.5,14.5l-8-8l1-1l8,8L13.5,14.5z"})),et||(et=y().createElement("path",{d:"M13.5,14.5l-8-8l1-1l8,8L13.5,14.5z","data-icon-path":"inner-path",opacity:"0"})),n):24===r||"24"===r||"24px"===r?y().createElement(ge.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...i},tt||(tt=y().createElement("path",{d:"M12,1C5.9,1,1,5.9,1,12s4.9,11,11,11s11-4.9,11-11S18.1,1,12,1z M16.3,17.5L6.5,7.7l1.2-1.2l9.8,9.8L16.3,17.5z"})),nt||(nt=y().createElement("path",{fill:"none",d:"M16.3,17.5L6.5,7.7l1.2-1.2l9.8,9.8L16.3,17.5z","data-icon-path":"inner-path",opacity:"0"})),n):y().createElement(ge.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},rt||(rt=y().createElement("path",{fill:"none",d:"M14.9 7.2H17.1V24.799H14.9z","data-icon-path":"inner-path",transform:"rotate(-45 16 16)"})),it||(it=y().createElement("path",{d:"M16,2A13.914,13.914,0,0,0,2,16,13.914,13.914,0,0,0,16,30,13.914,13.914,0,0,0,30,16,13.914,13.914,0,0,0,16,2Zm5.4449,21L9,10.5557,10.5557,9,23,21.4448Z"})),n)})),st=y().forwardRef((function(e,t){let{children:n,className:r,href:i,disabled:o=!1,inline:a=!1,visited:s=!1,renderIcon:l,size:c,target:u,...d}=e;const h=w(),f={className:g()(`${h}--link`,r,{[`${h}--link--disabled`]:o,[`${h}--link--inline`]:a,[`${h}--link--visited`]:s,[`${h}--link--${c}`]:c}),rel:"_blank"===u?"noopener":void 0,target:u};return o?(f.role="link",f["aria-disabled"]=!0):f.href=i,y().createElement("a",p({ref:t},f,d),n,!a&&l&&y().createElement("div",{className:`${h}--link__icon`},y().createElement(l,null)))}));st.displayName="Link",st.propTypes={children:E().node,className:E().string,disabled:E().bool,href:E().string,inline:E().bool,renderIcon:E().oneOfType([E().func,E().object]),size:E().oneOf(["sm","md","lg"]),visited:E().bool};const lt=(0,v.createContext)(u);function ct(e){return(0,v.useContext)(lt).enabled(e)}var ut,dt,ht,ft;E().node,E().objectOf(E().bool);const pt=y().forwardRef((function(e,t){let{children:n,className:r,light:i=!1,...o}=e;const a=w(),s=g()(`${a}--tile`,i&&`${a}--tile--light`,r);return y().createElement("div",p({className:s,ref:t},o),n)}));pt.displayName="Tile",pt.propTypes={children:E().node,className:E().string,light:P(E().bool)};const mt=y().forwardRef((function(e,t){let{children:n,className:r,clicked:i=!1,disabled:o,href:a,light:s,onClick:l=(()=>{}),onKeyDown:c=(()=>{}),renderIcon:u,...d}=e;const h=w(),f=g()(`${h}--tile`,`${h}--tile--clickable`,i&&`${h}--tile--is-clicked`,s&&`${h}--tile--light`,r),[m,b]=(0,v.useState)(i),_=ct("enable-v12-tile-default-icons");_&&(u||(u=Ge),o&&(u=ot));const E=g()({[`${h}--tile--icon`]:!_||_&&!o,[`${h}--tile--disabled-icon`]:_&&o});return y().createElement(st,p({className:f,href:a,onClick:o?void 0:function(e){e?.persist?.(),b(!m),l(e)},onKeyDown:function(e){e?.persist?.(),z(e,[j,U])&&(e.preventDefault(),b(!m),c(e)),c(e)},ref:t,disabled:o},d),n,u&&y().createElement(u,{className:E,"aria-hidden":"true"}))}));mt.displayName="ClickableTile",mt.propTypes={children:E().node,className:E().string,clicked:E().bool,disabled:E().bool,href:E().string,light:P(E().bool),onClick:E().func,onKeyDown:E().func,rel:E().string,renderIcon:E().oneOfType([E().func,E().object])};const gt=y().forwardRef((function(e,t){let{children:n,className:r,disabled:i,id:o,light:a,onClick:s=(()=>{}),onChange:l=(()=>{}),onKeyDown:c=(()=>{}),selected:u=!1,tabIndex:d=0,title:h="title",...f}=e;const m=w(),b=s,_=c,[E,x]=(0,v.useState)(u),[S,T]=(0,v.useState)(u),A=g()(`${m}--tile`,`${m}--tile--selectable`,E&&`${m}--tile--is-selected`,a&&`${m}--tile--light`,i&&`${m}--tile--disabled`,r);return u!==S&&(x(u),T(u)),y().createElement("div",p({className:A,onClick:i?void 0:function(e){e.preventDefault(),e?.persist?.(),x(!E),b(e),l(e)},role:"checkbox","aria-checked":E,onKeyDown:i?void 0:function(e){e?.persist?.(),z(e,[j,U])&&(e.preventDefault(),x(!E),l(e)),_(e)},tabIndex:i?void 0:d,ref:t,id:o,onChange:i?void 0:function(e){x(e.target.checked),l(e)},title:h},f),y().createElement("span",{className:`${m}--tile__checkmark ${m}--tile__checkmark--persistent`},E?ut||(ut=y().createElement(O.BV,null)):dt||(dt=y().createElement(O.XZ,null))),y().createElement("label",{htmlFor:o,className:`${m}--tile-content`},n))}));gt.displayName="SelectableTile",gt.propTypes={children:E().node,className:E().string,disabled:E().bool,id:E().string,light:P(E().bool),name:E().string,onChange:E().func,onClick:E().func,onKeyDown:E().func,selected:E().bool,tabIndex:E().number,title:E().string,value:E().oneOfType([E().string,E().number]).isRequired};const vt=y().forwardRef((function(e,t){let{tabIndex:n=0,className:r,children:i,expanded:o=!1,tileMaxHeight:a=0,tilePadding:s=0,onClick:l,onKeyUp:c,tileCollapsedIconText:u="Interact to expand Tile",tileExpandedIconText:d="Interact to collapse Tile",tileCollapsedLabel:h,tileExpandedLabel:f,light:m,...b}=e;const[_,E]=(0,v.useState)(a),[x,S]=(0,v.useState)(s),[T,A]=(0,v.useState)(o),[C,k]=(0,v.useState)(a),[M,N]=(0,v.useState)(s),[D,L]=(0,v.useState)(o),[P,I]=(0,v.useState)(!0),$=(0,v.useRef)(null),B=(0,v.useRef)(null),F=(0,v.useRef)(null),H=(0,v.useRef)(null),V=J([t,H]),Z=w();function W(){D&&F.current&&E(F.current.getBoundingClientRect()?.height),$.current&&E($.current.getBoundingClientRect().height)}function G(e){e?.persist?.(),L(!D),W()}function q(e){e.target!==H.current&&z(e,[j,U])&&e.preventDefault()}o!==T&&(L(o),A(o),W()),a!==C&&(E(a),k(a)),s!==M&&(S(s),N(s));const Y=g()(`${Z}--tile`,`${Z}--tile--expandable`,{[`${Z}--tile--is-expanded`]:D,[`${Z}--tile--light`]:m},r),K=g()(`${Z}--tile`,`${Z}--tile--expandable`,`${Z}--tile--expandable--interactive`,D&&`${Z}--tile--is-expanded`,m&&`${Z}--tile--light`,r),X=g()(`${Z}--tile__chevron`,`${Z}--tile__chevron--interactive`),ee=y().Children.toArray(i);Q((()=>{if(!H.current||!$.current)return;const e=window.getComputedStyle(H.current,null),{current:t}=$,{height:n}=t.getBoundingClientRect(),r=parseInt(e.getPropertyValue("padding-top"),10),i=parseInt(e.getPropertyValue("padding-bottom"),10);E(n),S(r+i)}),[_]),Q((()=>{$.current&&B.current&&(ae(B.current)||se(B.current)||ae($.current)||se($.current)||I(!1))}),[]),Q((()=>{H.current&&(H.current.style.maxHeight=D?"":_+x+"px")}),[D,_,x]),(0,v.useEffect)((()=>{if(!$.current)return;const e=new ResizeObserver((e=>{const[t]=e;E(t.contentRect.height)}));return e.observe($.current),()=>e.disconnect()}),[]);const te=R("expandable-tile-interactive");return P?y().createElement("div",p({ref:V,className:K},b),y().createElement("div",{ref:F},y().createElement("div",{ref:$,className:`${Z}--tile-content`},ee[0]),y().createElement("button",{type:"button","aria-expanded":D,"aria-controls":te,onKeyUp:ue([c,q]),onClick:ue([l,G]),"aria-label":D?d:u,className:X},ht||(ht=y().createElement(O._M,null))),y().createElement("div",{ref:B,className:`${Z}--tile-content`,id:te},ee[1]))):y().createElement("button",p({type:"button",ref:V,className:Y,"aria-expanded":D,title:D?d:u},b,{onKeyUp:ue([c,q]),onClick:ue([l,G]),tabIndex:n}),y().createElement("div",{ref:F},y().createElement("div",{ref:$,className:`${Z}--tile-content`},ee[0]),y().createElement("div",{className:`${Z}--tile__chevron`},y().createElement("span",null,D?f:h),ft||(ft=y().createElement(O._M,null))),y().createElement("div",{ref:B,className:`${Z}--tile-content`},ee[1])))}));vt.propTypes={children:E().node,className:E().string,expanded:E().bool,id:E().string,light:P(E().bool),onClick:E().func,onKeyUp:E().func,tabIndex:E().number,tileCollapsedIconText:E().string,tileCollapsedLabel:E().string,tileExpandedIconText:E().string,tileExpandedLabel:E().string},vt.displayName="ExpandableTile";const yt=y().forwardRef((function(e,t){let{children:n}=e;const r=w();return y().createElement("span",{ref:t,className:`${r}--tile-content__above-the-fold`},n)}));yt.propTypes={children:E().node},yt.displayName="TileAboveTheFoldContent";const bt=y().forwardRef((function(e,t){let{children:n}=e;const r=w();return y().createElement("span",{ref:t,className:`${r}--tile-content__below-the-fold`},n)}));bt.propTypes={children:E().node},bt.displayName="TileBelowTheFoldContent";const wt=y().createContext(1),_t=["one","two","three"],Et=_t.length-1,xt=y().forwardRef((function(e,t){let{as:n="div",className:r,children:i,level:o,...a}=e;const s=y().useContext(wt),l=o??s,c=w(),u=g()(`${c}--layer-${_t[l]}`,r),d=Math.max(0,Math.min(l+1,Et));return y().createElement(wt.Provider,{value:d},y().createElement(n,p({ref:t},a,{className:u}),i))}));function St(e){let{active:t=!0,className:n,withOverlay:r=!0,small:i=!1,description:o="loading",...a}=e;const s=w(),l=g()(n,{[`${s}--loading`]:!0,[`${s}--loading--small`]:i,[`${s}--loading--stop`]:!t}),c=g()({[`${s}--loading-overlay`]:!0,[`${s}--loading-overlay--stop`]:!t}),u=y().createElement("div",p({},a,{"aria-atomic":"true","aria-live":t?"assertive":"off",className:l}),y().createElement("svg",{className:`${s}--loading__svg`,viewBox:"0 0 100 100"},y().createElement("title",null,o),i?y().createElement("circle",{className:`${s}--loading__background`,cx:"50%",cy:"50%",r:"44"}):null,y().createElement("circle",{className:`${s}--loading__stroke`,cx:"50%",cy:"50%",r:"44"})));return r?y().createElement("div",{className:c},u):u}function Tt(e){let{className:t,status:n="active",iconDescription:r,description:i,onSuccess:o,successDelay:a=1500,...s}=e;const l=w(),c=g()(`${l}--inline-loading`,t),u=y().createElement("div",{className:`${l}--inline-loading__text`},i),d=(()=>{let e=r||n;return"error"===n?y().createElement(at,{className:`${l}--inline-loading--error`},y().createElement("title",null,e)):"finished"===n?(setTimeout((()=>{o&&o()}),a),y().createElement(O.kF,{className:`${l}--inline-loading__checkmark-container`},y().createElement("title",null,e))):"inactive"===n||"active"===n?(r||(e="active"===n?"loading":"not loading"),y().createElement(St,{small:!0,description:e,withOverlay:!1,active:"active"===n})):void 0})(),h=d&&y().createElement("div",{className:`${l}--inline-loading__animation`},d);return y().createElement("div",p({className:c},s,{"aria-live":"assertive"}),h,i&&u)}xt.propTypes={as:E().oneOfType([E().func,E().string,E().elementType]),children:E().node,className:E().string,level:E().oneOf([0,1,2])},St.propTypes={active:E().bool,className:E().string,description:E().string,id:P(E().string),small:E().bool,withOverlay:E().bool},Tt.propTypes={className:E().string,description:E().node,iconDescription:E().string,onSuccess:E().func,status:E().oneOf(["inactive","active","finished","error"]),successDelay:E().number};var Ot=n(3958),At=n.n(Ot);const Ct={NONE:"NONE",DESC:"DESC",ASC:"ASC"},kt=(e,t)=>`${e}:${t}`,Mt=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en";return null===e&&(e=""),null===t&&(t=""),"number"==typeof e&&"number"==typeof t?e-t:"string"==typeof e&&"string"==typeof t?Nt(e,t,n):"object"==typeof e&&"object"==typeof t&&"string"==typeof e.props.children&&"string"==typeof t.props.children?Nt(e.props.children,t.props.children,n):Nt(""+e,""+t,n)},Nt=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en";return isNaN(e)||isNaN(parseFloat(e))||isNaN(t)||isNaN(parseFloat(t))?e.localeCompare(t,n):e.localeCompare(t,n,{numeric:!0})},Dt=Ct.NONE,Rt=(e,t,n)=>{let{key:r}=n;const{sortDirection:i,sortHeaderKey:o}=t,a=(s=i,r===o?"NONE"===s?Ct.ASC:"ASC"===s?Ct.DESC:Ct.NONE:Ct.ASC);var s;return Lt(e,t,r,a)},Lt=(e,t,n,r)=>{const{rowIds:i,cellsById:o,initialRowOrder:a}=t,{locale:s,sortRow:l}=e,c=r!==Ct.NONE?(e=>{let{rowIds:t,cellsById:n,sortDirection:r,key:i,locale:o,sortRow:a}=e;return t.slice().sort(((e,t)=>{const s=n[kt(e,i)],l=n[kt(t,i)];return a(s&&s.value,l&&l.value,{key:i,sortDirection:r,locale:o,sortStates:Ct,compare:Mt,rowIds:[e,t]})}))})({rowIds:i,cellsById:o,sortDirection:r,key:n,locale:s,sortRow:l}):a;return{sortHeaderKey:n,sortDirection:r,rowIds:c}};var Pt=(e,t)=>{const{rowIds:n,rowsById:r,cellsById:i}=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{rowsById:r}=n,i=new Array(e.length),o={},a={};return e.forEach(((e,n)=>{i[n]=e.id;const{id:s,isSelected:l=!1,isExpanded:c=!1,disabled:u=!1}=e;o[s]={id:s,isSelected:l,isExpanded:c,disabled:u,cells:new Array(t.length)},r&&void 0!==r[e.id]&&(o[e.id].isSelected=r[e.id].isSelected,o[e.id].isExpanded=r[e.id].isExpanded),t.forEach(((t,n)=>{let{key:r}=t;const i=kt(e.id,r);a[i]={id:i,value:e[r],isEditable:!1,isEditing:!1,isValid:!0,errors:null,info:{header:r}},o[e.id].cells[n]=i}))})),{rowIds:i,rowsById:o,cellsById:a}}(e.rows,e.headers,t),o={rowIds:n,rowsById:r,cellsById:i,sortDirection:t.sortDirection||Dt,sortHeaderKey:t.sortHeaderKey||null,initialRowOrder:n.slice(),filterInputValue:t.filterInputValue||null,shouldShowBatchActions:t.shouldShowBatchActions||!1};if(t.sortDirection&&t.sortHeaderKey){const{rowIds:n}=Lt(e,o,t.sortHeaderKey,t.sortDirection);o.rowIds=n}return o.isExpandedAll=o.rowIds.every((e=>!0===o.rowsById[e].isExpanded)),o},It=(e,t,n)=>e.map((e=>({...t[e],cells:t[e].cells.map((e=>n[e]))}))),$t=()=>{let e=0;return function(){return++e}};const zt=(0,v.createContext)({titleId:void 0,descriptionId:void 0}),Bt=(e,t)=>{if(e.children.length>0)return!1;const n=window.getComputedStyle(e);t.font=n.font?n.font:`${n.fontSize}" "${n.fontFamily}`;const r=t?.measureText(e.textContent??"");let i=r.width??0;const o=n.letterSpacing?.split("px");o&&o.length&&!isNaN(Number(o[0]))&&(i+=Number(o[0])*(e.textContent?.length??0));const a=n.paddingLeft?.split("px");a&&a.length&&!isNaN(Number(a[0]))&&(i+=Number(a[0]));const s=n.paddingLeft?.split("px");return s&&s.length&&!isNaN(Number(s[0]))&&(i+=Number(s[0])),i>e.getBoundingClientRect().width},jt=e=>{let{className:t,children:n,useZebraStyles:r,size:i="lg",isSortable:o=!1,useStaticWidth:a,stickyHeader:s,overflowMenuOnHover:l=!0,experimentalAutoAlign:c=!1,...u}=e;const{titleId:d,descriptionId:h}=(0,v.useContext)(zt),f=w(),[m,b]=(0,v.useState)(!1),_=(0,v.useRef)(null),E=g()(`${f}--data-table`,t,{[`${f}--data-table--${i}`]:i,[`${f}--data-table--sort`]:o,[`${f}--data-table--zebra`]:r,[`${f}--data-table--static`]:a,[`${f}--data-table--sticky-header`]:s,[`${f}--data-table--visible-overflow-menu`]:!l}),x=(0,v.useCallback)((function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]?_.current?.classList.add(`${f}--data-table--top-aligned-body`):_.current?.classList.remove(`${f}--data-table--top-aligned-body`)}),[f]),S=(0,v.useCallback)((function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]?_.current?.classList.add(`${f}--data-table--top-aligned-header`):_.current?.classList.remove(`${f}--data-table--top-aligned-header`)}),[f]),T=(0,v.useCallback)((()=>{if(c){const e=document.createElement("canvas").getContext("2d");if(_.current&&e){const t=Array.from(_.current.querySelectorAll("td")).some((t=>Bt(t,e))),n=Array.from(_.current.querySelectorAll("th")).some((t=>{const n=t.querySelector(`.${f}--table-header-label`);return n&&Bt(n,e)}));x(t),S(n)}}else x(!1),S(!1)}),[c,x,S,f]);te("resize",Te()(T,100));const O=(0,v.useCallback)((()=>{const e=_?.current?.parentNode,t=_?.current?.firstChild;b(t?.scrollWidth>e?.clientWidth)}),[]);te("resize",Te()(O,100)),(0,v.useLayoutEffect)((()=>{O()}),[O]),"undefined"!=typeof document&&document?.fonts?.status&&"loaded"!==document.fonts.status&&document.fonts.ready.then((()=>{T()})),(0,v.useLayoutEffect)((()=>{T()}),[T,i]);const A=y().createElement("div",{className:`${f}--data-table-content`,tabIndex:m?0:void 0},y().createElement("table",p({"aria-labelledby":d,"aria-describedby":h},u,{className:E,ref:_}),n));return s?y().createElement("section",{className:`${f}--data-table_inner-container`},A):A};jt.propTypes={children:E().node,className:E().string,experimentalAutoAlign:E().bool,isSortable:E().bool,overflowMenuOnHover:E().bool,size:E().oneOf(["xs","sm","md","lg","xl"]),stickyHeader:E().bool,useStaticWidth:E().bool,useZebraStyles:E().bool},jt.defaultProps={isSortable:!1,overflowMenuOnHover:!0};var Ft=e=>{let{name:t,className:n,type:r}=e;function i(e){let{className:t,...i}=e;const o=w(),a=g()("function"==typeof n?n(o):n,t);return y().createElement(r,{...i,className:a||void 0})}return i.displayName=t,i.propTypes={className:E().string},i},Ut=Ft({name:"TableActionList",type:"div",className:e=>`${e}--action-list`});const Ht=e=>y().createElement(de,e);Ht.propTypes={hasIconOnly:E().bool,iconDescription:e=>{if(e.renderIcon&&!e.children&&!e.iconDescription)return new Error("renderIcon property specified without also providing an iconDescription property.")},renderIcon:E().oneOfType([E().func,E().object])},Ht.defaultProps={renderIcon:We,iconDescription:"Add"};var Vt=Ht;const Zt={"carbon.table.batch.cancel":"Cancel","carbon.table.batch.items.selected":"items selected","carbon.table.batch.item.selected":"item selected","carbon.table.batch.selectAll":"Select all"},Wt=function(e){let{totalSelected:t,totalCount:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{totalSelected:0,totalCount:0};return"carbon.table.batch.cancel"===e?Zt[e]:"carbon.table.batch.selectAll"===e?`${Zt[e]} (${n})`:`${t} ${Zt[e]}`},Gt=e=>{let{className:t,children:n,shouldShowBatchActions:r,totalSelected:i,totalCount:o,onCancel:a,onSelectAll:s,translateWithId:l=Wt,...c}=e;const[u,d]=y().useState(!1),h=w(),f=g()({[`${h}--batch-actions`]:!0,[`${h}--batch-actions--active`]:r},t),m=g()(`${h}--batch-summary`,{[`${h}--batch-summary__scroll`]:u});return y().createElement("div",p({onScroll:()=>{d(!u)},"aria-hidden":!r,className:f},c),y().createElement("div",{className:m},y().createElement("p",{className:`${h}--batch-summary__para`},y().createElement($,{as:"span"},l(i>1||0===i?"carbon.table.batch.items.selected":"carbon.table.batch.item.selected",{totalSelected:i}))),s&&y().createElement(y().Fragment,null,y().createElement("span",{className:`${h}--batch-summary__divider`},"|"),y().createElement(de,{onClick:s,tabIndex:r?0:-1},l("carbon.table.batch.selectAll",{totalCount:o})))),y().createElement(Ut,null,n,y().createElement(de,{className:`${h}--batch-summary__cancel`,tabIndex:r?0:-1,onClick:a},l("carbon.table.batch.cancel"))))};Gt.translationKeys=["carbon.table.batch.cancel","carbon.table.batch.items.selected","carbon.table.batch.item.selected","carbon.table.batch.selectAll"],Gt.propTypes={children:E().node,className:E().string,onCancel:E().func.isRequired,onSelectAll:E().func,shouldShowBatchActions:E().bool,totalCount:E().number,totalSelected:E().number.isRequired,translateWithId:E().func},Gt.defaultProps={translateWithId:Wt};const qt=e=>{let{children:t,className:n,...r}=e;return y().createElement("tbody",p({className:n},r),t)};qt.propTypes={"aria-live":E().oneOf(["polite","assertive","off"]),children:E().node,className:E().string},qt.defaultProps={"aria-live":"polite"};const Yt=Ft({name:"TableCell",type:"td"}),Kt=e=>{let{className:t,children:n,title:r,description:i,stickyHeader:o,useStaticWidth:a,...s}=e;const l=R("tc"),c=`${l}-title`,u=`${l}-description`,d=w(),h=g()(t,`${d}--data-table-container`,{[`${d}--data-table--max-width`]:o,[`${d}--data-table-container--static`]:a}),f=(0,v.useMemo)((()=>({titleId:r?c:void 0,descriptionId:i?u:void 0})),[r,i,c,u]);return y().createElement(zt.Provider,{value:f},y().createElement("div",p({},s,{className:h}),r&&y().createElement("div",{className:`${d}--data-table-header`},y().createElement("h4",{className:`${d}--data-table-header__title`,id:c},r),y().createElement("p",{className:`${d}--data-table-header__description`,id:u},i)),n))};function Xt(e,t){return function(e,n,r){for(var i=arguments.length,o=new Array(i>3?i-3:0),a=3;a<i;a++)o[a-3]=arguments[a];return t(e,n,r,...o)}}Kt.propTypes={children:E().node,className:E().string,description:E().node,stickyHeader:E().bool,title:E().node,useStaticWidth:E().bool};const Qt=e=>{let{"aria-controls":t,"aria-label":n,ariaLabel:r,className:i,enableExpando:o,enableToggle:a,id:s="expand",isExpanded:l,onExpand:c,expandIconDescription:u,children:d,...h}=e;const f=w(),m=g()(`${f}--table-expand`,i),v=l?"collapsed":void 0;return y().createElement("th",p({scope:"col",className:m,"data-previous-value":v,id:s},h),o||a?y().createElement("button",{type:"button",className:`${f}--table-expand__button`,onClick:c,title:u,"aria-label":r||n,"aria-expanded":l,"aria-controls":t},y().createElement(O._Q,{className:`${f}--table-expand__svg`,"aria-label":u})):null,d)};Qt.propTypes={"aria-controls":E().string,"aria-label":E().string,ariaLabel:E().string,children:E().node,className:E().string,enableExpando:P(E().bool),enableToggle:E().bool,expandIconDescription:E().string,id:E().string,isExpanded:Xt(0,E().bool),onExpand:E().oneOfType([Xt(0,E().func),Xt(0,E().func)])};const Jt=e=>{let{"aria-controls":t,"aria-label":n,ariaLabel:r,className:i,children:o,isExpanded:a,onExpand:s,expandIconDescription:l,isSelected:c,expandHeader:u="expand",...d}=e;const h=w(),f=g()({[`${h}--parent-row`]:!0,[`${h}--expandable-row`]:a,[`${h}--data-table--selected`]:c},i),m=a?"collapsed":void 0;return y().createElement("tr",p({},d,{className:f,"data-parent-row":!0}),y().createElement(Yt,{className:`${h}--table-expand`,"data-previous-value":m,headers:u},y().createElement("button",{type:"button",className:`${h}--table-expand__button`,onClick:s,title:l,"aria-label":r||n,"aria-expanded":a,"aria-controls":t},y().createElement(O._Q,{className:`${h}--table-expand__svg`,"aria-label":l}))),o)};Jt.propTypes={"aria-controls":E().string,"aria-label":E().string,ariaLabel:E().string,children:E().node,className:E().string,expandHeader:E().string,expandIconDescription:E().string,isExpanded:E().bool.isRequired,isSelected:E().bool,onExpand:E().func.isRequired};const en=e=>{let{className:t,children:n,colSpan:r,...i}=e;const o=(0,v.useRef)(null),a=w(),s=g()(`${a}--expandable-row`,t),l=e=>{if(o&&o.current&&o.current.previousElementSibling){const t=o.current.previousElementSibling;"enter"===e?t.classList.add(`${a}--expandable-row--hover`):t.classList.remove(`${a}--expandable-row--hover`)}};return y().createElement("tr",p({ref:o,onMouseEnter:()=>l("enter"),onMouseLeave:()=>l("leave")},i,{className:s,"data-child-row":!0}),y().createElement(Yt,{colSpan:r},y().createElement("div",{className:`${a}--child-row-inner-container`},n)))};en.propTypes={children:E().node,className:E().string,colSpan:E().number.isRequired};const tn=Ft({name:"TableHead",type:"thead"}),nn="col",rn={buttonDescription:"carbon.table.header.icon.description"},on={[Ct.NONE]:"none",[Ct.ASC]:"ascending",[Ct.DESC]:"descending"},an=y().forwardRef((function(e,t){let{className:n,children:r,colSpan:i,isSortable:o,isSortHeader:a,onClick:s,scope:l=nn,sortDirection:c,translateWithId:u,id:d,...h}=e;const f=w(),m=R("table-sort");if(!o)return y().createElement("th",p({},h,{id:d,className:n,scope:l,colSpan:i,ref:t}),r?y().createElement("div",{className:`${f}--table-header-label`},r):null);const v=g()(n,{[`${f}--table-sort`]:!0,[`${f}--table-sort--active`]:a&&c!==Ct.NONE,[`${f}--table-sort--descending`]:a&&c===Ct.DESC}),b=a&&c?on[c]:"none",_=u&&u("carbon.table.header.icon.description",{header:r,sortDirection:c,isSortHeader:a,sortStates:Ct}),E=g()(n,`${f}--table-sort__header`);return y().createElement("th",{id:d,"aria-sort":b,className:E,colSpan:i,ref:t,scope:l},y().createElement("div",{className:`${f}--table-sort__description`,id:m},_),y().createElement("button",p({type:"button","aria-describedby":m,className:v,onClick:s},h),y().createElement("span",{className:`${f}--table-sort__flex`},y().createElement("div",{className:`${f}--table-header-label`},r),y().createElement(qe,{size:20,className:`${f}--table-sort__icon`}),y().createElement(Ye,{size:20,className:`${f}--table-sort__icon-unsorted`}))))}));an.propTypes={children:E().node,className:E().string,colSpan:E().number,id:E().string,isSortHeader:E().bool,isSortable:E().bool,onClick:E().func,scope:E().string.isRequired,sortDirection:E().oneOf(Object.values(Ct)),translateWithId:E().func},an.defaultProps={isSortable:!1,scope:nn,translateWithId:(e,t)=>t&&e===rn.buttonDescription?t.isSortHeader&&Ct?t.sortDirection===Ct.NONE?`Click to sort rows by ${t.header} header in ascending order`:t.sortDirection===Ct.ASC?`Click to sort rows by ${t.header} header in descending order`:`Click to unsort rows by ${t.header} header`:`Click to sort rows by ${t.header} header in ascending order`:""},an.translationKeys=Object.values(rn),an.displayName="TableHeader";var sn=n(8979),ln=n.n(sn);const cn=e=>{const t=w(),n=g()(e.className,{[`${t}--data-table--selected`]:e.isSelected}),r={...ln()(e,["ariaLabel","aria-label","aria-controls","onExpand","isExpanded","isSelected"]),className:n||void 0};return y().createElement("tr",r)};cn.propTypes={className:E().string,isSelected:E().bool};const un=y().forwardRef((function(e,t){const{"aria-label":n,ariaLabel:r,checked:i=!1,disabled:o,id:a,indeterminate:s,name:l,onChange:c=(()=>{}),onClick:u,onKeyDown:d,title:h}=e,f=w(),p=(0,v.useRef)(null),m=J([p,t]),g={checked:i,className:`${f}--checkbox`,disabled:o,id:a,name:l,onClick:u,onChange:e=>{c(e.target.checked,a,e)},onKeyDown:d,ref:m,type:"checkbox"};return s&&(g.checked=!1),(0,v.useEffect)((()=>{p?.current&&(p.current.indeterminate=s)}),[s]),y().createElement("div",{className:`${f}--checkbox--inline`},y().createElement("input",g),y().createElement("label",{htmlFor:a,className:`${f}--checkbox-label`,title:h,onClick:e=>{e.stopPropagation()}},y().createElement("span",{className:`${f}--visually-hidden`},r||n)))}));un.propTypes={"aria-label":E().string.isRequired,ariaLabel:P(E().string.isRequired),checked:E().bool,disabled:E().bool,id:E().string.isRequired,indeterminate:E().bool,name:E().string.isRequired,onChange:E().func,onClick:E().func,onKeyDown:E().func,title:E().string};var dn=un;const hn=e=>{let{ariaLabel:t,checked:n,id:r,indeterminate:i,name:o,onSelect:a,disabled:s,className:l}=e;const c=w();return y().createElement("th",{"aria-live":"off",scope:"col",className:g()(`${c}--table-column-checkbox`,l)},y().createElement(dn,{"aria-label":t,checked:n,id:r,indeterminate:i,name:o,onClick:a,disabled:s}))};hn.propTypes={ariaLabel:E().string.isRequired,checked:E().bool.isRequired,className:E().string,disabled:E().bool,id:E().string.isRequired,indeterminate:E().bool,name:E().string.isRequired,onSelect:E().func.isRequired},hn.defaultProps={ariaLabel:"Select all rows in the table"};var fn=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return e=>{t.forEach((t=>{"function"==typeof t?t(e):Object(t)===t&&(t.current=e)}))}};const pn=y().forwardRef(((e,t)=>{const{className:n,disabled:r,hideLabel:i,id:o,labelPosition:a="right",labelText:s="",name:l,onChange:c=(()=>{}),value:u="",...d}=e,h=w(),f=R("radio-button"),m=o||f,b=g()(`${h}--radio-button__label-text`,{[`${h}--visually-hidden`]:i}),_=g()(n,`${h}--radio-button-wrapper`,{[`${h}--radio-button-wrapper--label-${a}`]:"right"!==a}),E=(0,v.useRef)(null);return y().createElement("div",{className:_},y().createElement("input",p({},d,{type:"radio",className:`${h}--radio-button`,onChange:function(e){c(u,l,e)},id:m,ref:fn(E,t),disabled:r,value:u,name:l})),y().createElement("label",{htmlFor:m,className:`${h}--radio-button__label`},y().createElement("span",{className:`${h}--radio-button__appearance`}),s&&y().createElement($,{className:b},s)))}));pn.displayName="RadioButton",pn.propTypes={checked:E().bool,className:E().string,defaultChecked:E().bool,disabled:E().bool,hideLabel:E().bool,id:E().string,labelPosition:E().oneOf(["right","left"]),labelText:E().node.isRequired,name:E().string,onChange:E().func,onClick:E().func,value:E().oneOfType([E().string,E().number])};const mn=e=>{let{ariaLabel:t,checked:n,id:r,name:i,onSelect:o,onChange:a,disabled:s,radio:l,className:c}=e;const u=w(),d={id:r,name:i,onClick:o,onChange:a,checked:n,disabled:s},h=l?pn:dn,f=g()(`${u}--table-column-checkbox`,{...c&&{[c]:!0},[`${u}--table-column-radio`]:l});return y().createElement("td",{className:f,"aria-live":"off"},y().createElement(h,p({},d,l&&{labelText:t,hideLabel:!0},!l&&{"aria-label":t})))};mn.propTypes={ariaLabel:E().string.isRequired,checked:E().bool.isRequired,className:E().string,disabled:E().bool,id:E().string.isRequired,name:E().string.isRequired,onChange:E().func,onSelect:E().func.isRequired,radio:E().bool};const gn=(vn={"aria-label":E().string,"aria-labelledby":E().string},Object.keys(vn).reduce(((e,t)=>{return{...e,[t]:(n=vn[t],function(e,t,r){for(var i=arguments.length,o=new Array(i>3?i-3:0),a=3;a<i;a++)o[a-3]=arguments[a];return n(e,t,r,...o)})};var n}),{}));var vn;const yn=e=>{let{children:t,size:n,...r}=e;const i=w(),o=g()({[`${i}--table-toolbar`]:!0,[`${i}--table-toolbar--${n}`]:n});return y().createElement("section",p({},r,{className:o}),t)};yn.propTypes={...gn,children:E().node,size:E().oneOf(["sm","lg"])},yn.defaultProps={"aria-label":"data table toolbar"};const bn=y().forwardRef((function(e,t){let{className:n,closeMenu:r,disabled:i=!1,handleOverflowMenuItemFocus:o,hasDivider:a=!1,href:s,isDelete:l=!1,index:c,itemText:u="Provide itemText",onClick:d=(()=>{}),onKeyDown:h=(()=>{}),requireTitle:f,title:m,wrapperClassName:v,...b}=e;const _=w(),E=g()(`${_}--overflow-menu-options__btn`,n),x=g()(`${_}--overflow-menu-options__option`,{[`${_}--overflow-menu--divider`]:a,[`${_}--overflow-menu-options__option--danger`]:l,[`${_}--overflow-menu-options__option--disabled`]:i},v),S=s?"a":"button",T="string"!=typeof u?u:y().createElement("div",{className:`${_}--overflow-menu-options__option-content`},u);return y().createElement("li",{className:x,role:"none"},y().createElement(S,p({className:E,disabled:i,href:s,onClick:function(e){d(e),r&&r()},onKeyDown:e=>{!function(e){B(e,q)&&o?.({currentIndex:c,direction:1}),B(e,W)&&o?.({currentIndex:c,direction:-1})}(e),h(e)},role:"menuitem",ref:t,tabIndex:-1,title:f?m||u:void 0},b),T))}));bn.propTypes={className:E().string,closeMenu:E().func,disabled:E().bool,handleOverflowMenuItemFocus:E().func,hasDivider:E().bool,href:E().string,index:E().number,isDelete:E().bool,itemText:E().node.isRequired,onBlur:E().func,onClick:E().func,onFocus:E().func,onKeyDown:E().func,onKeyUp:E().func,onMouseDown:E().func,onMouseEnter:E().func,onMouseLeave:E().func,onMouseUp:E().func,requireTitle:E().bool,title:E().string,wrapperClassName:E().string};const wn=y().forwardRef(((e,t)=>{let{children:n,...r}=e;return y().createElement(bn,p({ref:t,itemText:n},r))}));wn.displayName="TableToolbarAction",wn.propTypes={children:E().node,className:E().string,onClick:E().func.isRequired};const _n=Ft({name:"TableToolbarContent",type:"div",className:e=>`${e}--toolbar-content`});var En,xn,Sn,Tn,On,An;const Cn=y().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return 16===r||"16"===r||"16px"===r?y().createElement(ge.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},En||(En=y().createElement("path",{d:"M15,14.3L10.7,10c1.9-2.3,1.6-5.8-0.7-7.7S4.2,0.7,2.3,3S0.7,8.8,3,10.7c2,1.7,5,1.7,7,0l4.3,4.3L15,14.3z M2,6.5 C2,4,4,2,6.5,2S11,4,11,6.5S9,11,6.5,11S2,9,2,6.5z"})),n):y().createElement(ge.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},xn||(xn=y().createElement("path",{d:"M29,27.5859l-7.5521-7.5521a11.0177,11.0177,0,1,0-1.4141,1.4141L27.5859,29ZM4,13a9,9,0,1,1,9,9A9.01,9.01,0,0,1,4,13Z"})),n)})),kn=y().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return 16===r||"16"===r||"16px"===r?y().createElement(ge.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},Sn||(Sn=y().createElement("path",{d:"M13.5,8.4c0-0.1,0-0.3,0-0.4c0-0.1,0-0.3,0-0.4l1-0.8c0.4-0.3,0.4-0.9,0.2-1.3l-1.2-2C13.3,3.2,13,3,12.6,3 c-0.1,0-0.2,0-0.3,0.1l-1.2,0.4c-0.2-0.1-0.4-0.3-0.7-0.4l-0.3-1.3C10.1,1.3,9.7,1,9.2,1H6.8c-0.5,0-0.9,0.3-1,0.8L5.6,3.1 C5.3,3.2,5.1,3.3,4.9,3.4L3.7,3C3.6,3,3.5,3,3.4,3C3,3,2.7,3.2,2.5,3.5l-1.2,2C1.1,5.9,1.2,6.4,1.6,6.8l0.9,0.9c0,0.1,0,0.3,0,0.4 c0,0.1,0,0.3,0,0.4L1.6,9.2c-0.4,0.3-0.5,0.9-0.2,1.3l1.2,2C2.7,12.8,3,13,3.4,13c0.1,0,0.2,0,0.3-0.1l1.2-0.4 c0.2,0.1,0.4,0.3,0.7,0.4l0.3,1.3c0.1,0.5,0.5,0.8,1,0.8h2.4c0.5,0,0.9-0.3,1-0.8l0.3-1.3c0.2-0.1,0.4-0.2,0.7-0.4l1.2,0.4 c0.1,0,0.2,0.1,0.3,0.1c0.4,0,0.7-0.2,0.9-0.5l1.1-2c0.2-0.4,0.2-0.9-0.2-1.3L13.5,8.4z M12.6,12l-1.7-0.6c-0.4,0.3-0.9,0.6-1.4,0.8 L9.2,14H6.8l-0.4-1.8c-0.5-0.2-0.9-0.5-1.4-0.8L3.4,12l-1.2-2l1.4-1.2c-0.1-0.5-0.1-1.1,0-1.6L2.2,6l1.2-2l1.7,0.6 C5.5,4.2,6,4,6.5,3.8L6.8,2h2.4l0.4,1.8c0.5,0.2,0.9,0.5,1.4,0.8L12.6,4l1.2,2l-1.4,1.2c0.1,0.5,0.1,1.1,0,1.6l1.4,1.2L12.6,12z"})),Tn||(Tn=y().createElement("path",{d:"M8,11c-1.7,0-3-1.3-3-3s1.3-3,3-3s3,1.3,3,3C11,9.6,9.7,11,8,11C8,11,8,11,8,11z M8,6C6.9,6,6,6.8,6,7.9C6,7.9,6,8,6,8 c0,1.1,0.8,2,1.9,2c0,0,0.1,0,0.1,0c1.1,0,2-0.8,2-1.9c0,0,0-0.1,0-0.1C10,6.9,9.2,6,8,6C8.1,6,8,6,8,6z"})),n):y().createElement(ge.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},On||(On=y().createElement("path",{d:"M27,16.76c0-.25,0-.5,0-.76s0-.51,0-.77l1.92-1.68A2,2,0,0,0,29.3,11L26.94,7a2,2,0,0,0-1.73-1,2,2,0,0,0-.64.1l-2.43.82a11.35,11.35,0,0,0-1.31-.75l-.51-2.52a2,2,0,0,0-2-1.61H13.64a2,2,0,0,0-2,1.61l-.51,2.52a11.48,11.48,0,0,0-1.32.75L7.43,6.06A2,2,0,0,0,6.79,6,2,2,0,0,0,5.06,7L2.7,11a2,2,0,0,0,.41,2.51L5,15.24c0,.25,0,.5,0,.76s0,.51,0,.77L3.11,18.45A2,2,0,0,0,2.7,21L5.06,25a2,2,0,0,0,1.73,1,2,2,0,0,0,.64-.1l2.43-.82a11.35,11.35,0,0,0,1.31.75l.51,2.52a2,2,0,0,0,2,1.61h4.72a2,2,0,0,0,2-1.61l.51-2.52a11.48,11.48,0,0,0,1.32-.75l2.42.82a2,2,0,0,0,.64.1,2,2,0,0,0,1.73-1L29.3,21a2,2,0,0,0-.41-2.51ZM25.21,24l-3.43-1.16a8.86,8.86,0,0,1-2.71,1.57L18.36,28H13.64l-.71-3.55a9.36,9.36,0,0,1-2.7-1.57L6.79,24,4.43,20l2.72-2.4a8.9,8.9,0,0,1,0-3.13L4.43,12,6.79,8l3.43,1.16a8.86,8.86,0,0,1,2.71-1.57L13.64,4h4.72l.71,3.55a9.36,9.36,0,0,1,2.7,1.57L25.21,8,27.57,12l-2.72,2.4a8.9,8.9,0,0,1,0,3.13L27.57,20Z"})),An||(An=y().createElement("path",{d:"M16,22a6,6,0,1,1,6-6A5.94,5.94,0,0,1,16,22Zm0-10a3.91,3.91,0,0,0-4,4,3.91,3.91,0,0,0,4,4,3.91,3.91,0,0,0,4-4A3.91,3.91,0,0,0,16,12Z"})),n)})),Mn=(0,v.createContext)({isFluid:!1});var Nn;const Dn=y().forwardRef((function(e,t){let{autoComplete:n="off",className:r,closeButtonLabelText:i="Clear search input",defaultValue:o,disabled:a,isExpanded:s=!0,id:l,labelText:c,light:u,onChange:d=(()=>{}),onClear:h=(()=>{}),onKeyDown:f,onExpand:m,placeholder:b="Search",renderIcon:_,role:E="searchbox",size:x="md",type:S="text",value:T,...O}=e;const A=!(!T&&!o),C=w(),{isFluid:k}=(0,v.useContext)(Mn),M=(0,v.useRef)(null),N=J([t,M]),D=(0,v.useRef)(null),L=R("search-input"),P=l||L,I=`${P}-search`,[$,z]=(0,v.useState)(A||!1),[H,V]=(0,v.useState)(T),Z=g()({[`${C}--search`]:!0,[`${C}--search--sm`]:"sm"===x,[`${C}--search--md`]:"md"===x,[`${C}--search--lg`]:"lg"===x,[`${C}--search--light`]:u,[`${C}--search--disabled`]:a,[`${C}--search--fluid`]:k},r),W=g()({[`${C}--search-close`]:!0,[`${C}--search-close--hidden`]:!$||!s});function G(){!T&&M.current&&(M.current.value="");const e=Object.assign({},M.current,{value:""});d({target:e,type:"change"}),h(),z(!1),function(e){const t=e.current||e;t&&t.focus&&document.activeElement!==t&&t.focus()}(M)}return T!==H&&(z(!!T),V(T)),y().createElement("div",{role:"search","aria-label":b,className:Z},y().createElement("div",{"aria-labelledby":m?P:void 0,role:m?"button":void 0,className:`${C}--search-magnifier`,onClick:m,onKeyDown:function(e){(B(e,j)||B(e,U))&&(e.stopPropagation(),m&&m(e))},tabIndex:m&&!s?0:-1,ref:D,"aria-expanded":!(!m||!s)||void 0,"aria-controls":m?P:void 0},y().createElement(Rn,{icon:_})),y().createElement("label",{id:I,htmlFor:P,className:`${C}--label`},c),y().createElement("input",p({autoComplete:n,className:`${C}--search-input`,defaultValue:o,disabled:a,role:E,ref:N,id:P,onChange:ue([d,function(e){z(""!==e.target.value)}]),onKeyDown:ue([f,function(e){B(e,F)&&(e.stopPropagation(),M.current?.value?G():m&&s&&D.current?.focus())}]),placeholder:b,type:S,value:T,tabIndex:m&&!s?-1:void 0},O)),y().createElement("button",{"aria-label":i,className:W,disabled:a,onClick:G,title:i,type:"button"},Nn||(Nn=y().createElement(ve,null))))}));function Rn(e){let{icon:t}=e;const n=w();return t?y().createElement(t,{className:`${n}--search-magnifier-icon`}):y().createElement(Cn,{className:`${n}--search-magnifier-icon`})}Dn.displayName="Search",Dn.propTypes={autoComplete:E().string,className:E().string,closeButtonLabelText:E().string,defaultValue:E().oneOfType([E().string,E().number]),disabled:E().bool,id:E().string,isExpanded:E().bool,labelText:E().node.isRequired,light:P(E().bool),onChange:E().func,onClear:E().func,onExpand:E().func,onKeyDown:E().func,placeholder:E().string,renderIcon:E().oneOfType([E().func,E().object]),role:E().string,size:E().oneOf(["sm","md","lg"]),type:E().string,value:E().oneOfType([E().string,E().number])},Rn.propTypes={icon:E().oneOfType([E().func,E().object])};const Ln=$t(),Pn={"carbon.table.toolbar.search.label":"Filter table","carbon.table.toolbar.search.placeholder":"Filter table"},In=e=>{let{className:t,searchContainerClass:n,onChange:r,onClear:i,translateWithId:o,placeholder:a,labelText:s,expanded:l,defaultExpanded:c,defaultValue:u,disabled:d,onExpand:h,persistent:f,id:m,onBlur:b,onFocus:_,size:E="lg",tabIndex:x,...S}=e;const{current:T}=(0,v.useRef)(void 0!==l),[O,A]=(0,v.useState)(c||u),C=T?l:O,[k,M]=(0,v.useState)(u||""),N=(0,v.useMemo)(Ln,[]),[D,R]=(0,v.useState)(null),L=w();(0,v.useEffect)((()=>{D&&(D.current?.querySelector?.("input")?.focus(),R(null))}),[D]),(0,v.useEffect)((()=>{u&&r?.("",u)}),[]);const P=g()(t,{[n]:n,[`${L}--toolbar-search-container-active`]:C,[`${L}--toolbar-search-container-disabled`]:d,[`${L}--toolbar-search-container-expandable`]:!f,[`${L}--toolbar-search-container-persistent`]:f}),I=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:!C;d||(T||f||A(t),h&&h(e,t))};return y().createElement(Dn,p({disabled:d,className:P,value:k,id:void 0!==m?m:N.toString(),labelText:s||o("carbon.table.toolbar.search.label"),placeholder:a||o("carbon.table.toolbar.search.placeholder"),onChange:e=>{M(e.target.value),r&&r(e)},onClear:i,onFocus:_?e=>_(e,I):e=>I(e,!0),onBlur:b?e=>b(e,I):e=>!k&&I(e,!1),size:E,tabIndex:x},S))};var $n,zn,Bn;In.propTypes={children:E().node,className:E().string,defaultExpanded:E().bool,defaultValue:E().string,disabled:E().bool,expanded:E().bool,id:E().string,labelText:E().string,onBlur:E().func,onChange:E().func,onClear:E().func,onExpand:E().func,onFocus:E().func,persistent:E().bool,placeholder:E().string,searchContainerClass:E().string,size:E().oneOf(["sm","md","lg"]),tabIndex:E().oneOfType([E().number,E().string]),translateWithId:E().func.isRequired},In.defaultProps={tabIndex:"0",translateWithId:e=>Pn[e],persistent:!1,onClear:()=>{}};const jn=y().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return y().createElement(ge.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},$n||($n=y().createElement("circle",{cx:"16",cy:"8",r:"2"})),zn||(zn=y().createElement("circle",{cx:"16",cy:"16",r:"2"})),Bn||(Bn=y().createElement("circle",{cx:"16",cy:"24",r:"2"})),n)}));var Fn=n(8316);function Un(e,t){switch(t.type){case"enableIcons":return{...e,hasIcons:!0};case"registerItem":return{...e,items:[...e.items,t.payload].filter((e=>null!==e.ref.current))}}}const Hn=y().createContext({state:{isRoot:!0,hasIcons:!1,size:null,items:[],requestCloseRoot:()=>{}},dispatch:()=>{}}),Vn=y().createContext({direction:"ltr"}),Zn=y().forwardRef((function(e,t){let{children:n,className:r,label:i,onClose:o,onOpen:a,open:s,size:l="sm",target:c=document.body,x:u=0,y:d=0,...h}=e;const f=w(),m=(0,v.useRef)(null),b=(0,v.useContext)(Hn),_=b.state.isRoot,E=_?l:b.state.size,[x,S]=(0,v.useReducer)(Un,{...b.state,isRoot:!1,size:l,requestCloseRoot:_?R:b.state.requestCloseRoot}),T=(0,v.useMemo)((()=>({state:x,dispatch:S})),[x,S]),O=(0,v.useRef)(),A=J([t,O]),[C,k]=(0,v.useState)([-1,-1]),M=T.state.items.filter((e=>!e.disabled&&e.ref.current)),{direction:N}=(0,v.useContext)(Vn);function D(){m.current&&m.current.focus()}function R(e){/^key/.test(e.type)?window.addEventListener("keyup",D,{once:!0}):"click"===e.type&&O.current?O.current.addEventListener("focusout",D,{once:!0}):D(),o&&o()}function L(e){const t=M.findIndex((e=>e.ref.current.contains(document.activeElement)));let n=t;-1===t?n=0:e&&(B(e,W)&&(n-=1),B(e,q)&&(n+=1)),n<0&&(n=M.length-1),n>=M.length&&(n=0),n!==t&&M[n].ref.current.focus()}function P(e,t){const{width:n,height:r}=O.current.getBoundingClientRect(),i=_?"vertical":"horizontal",o={x:{max:window.innerWidth,size:n,anchor:"horizontal"===i?e[1]:e[0],reversedAnchor:"horizontal"===i?e[0]:e[1],offset:0},y:{max:window.innerHeight,size:r,anchor:"horizontal"===i?e[0]:e[1],reversedAnchor:"horizontal"===i?e[1]:e[0],offset:_?0:4}},{max:a,size:s,anchor:l,reversedAnchor:c,offset:u}=o[t],d=[a-8-s-l>=0&&l-u,c-s>=0&&c-s+u,a-8-s].find((e=>!1!==e));return d>=8?d:8}(0,v.useEffect)((()=>{s&&M.length>0&&L()}),[s,M]),(0,v.useEffect)((()=>{s?function(){if(O.current){m.current=document.activeElement;const e=function(){if(O.current){const e={x:"object"==typeof u&&2===u.length?u:[u,u],y:"object"==typeof d&&2===d.length?d:[d,d]};return[P(e.x,"x"),P(e.y,"y")]}return[-1,-1]}();"rtl"!==document?.dir&&"rtl"!==N||h?.id?.includes("MenuButton")?(O.current.style.insetInlineStart=`${e[0]}px`,O.current.style.insetInlineEnd="initial"):(O.current.style.insetInlineStart="initial",O.current.style.insetInlineEnd=`${e[0]}px`),O.current.style.insetBlockStart=`${e[1]}px`,k(e),O.current.focus(),a&&a()}}():k(-1,-1)}),[s]);const I=g()(r,`${f}--menu`,`${f}--menu--${E}`,{[`${f}--menu--open`]:s,[`${f}--menu--shown`]:C[0]>=0&&C[1]>=0,[`${f}--menu--with-icons`]:T.state.hasIcons}),$=y().createElement(Hn.Provider,{value:T},y().createElement("ul",p({},h,{className:I,role:"menu",ref:A,"aria-label":i,tabIndex:-1,onKeyDown:function(e){e.stopPropagation(),(B(e,F)||!_&&B(e,Z))&&o?R(e):L(e)},onBlur:function(e){s&&o&&_&&!O.current.contains(e.relatedTarget)&&R(e)}}),n));return _?s&&(0,Fn.createPortal)($,c)||null:$}));Zn.propTypes={children:E().node,className:E().string,label:E().string,onClose:E().func,onOpen:E().func,open:E().bool,size:E().oneOf(["xs","sm","md","lg"]),target:E().object,x:E().oneOfType([E().number,E().arrayOf(E().number)]),y:E().oneOfType([E().number,E().arrayOf(E().number)])};const Wn="md",Gn=y().forwardRef((function(e,t){let{children:n,className:r,label:i="Options",renderIcon:o=jn,size:a=Wn,tooltipAlignment:s,...l}=e;const c=R("overflowmenu"),u=w(),d=(0,v.useRef)(null),{open:h,x:f,y:m,handleClick:b,handleMousedown:_,handleClose:E}=function(e){const[t,n]=(0,v.useState)(!1),[r,i]=(0,v.useState)([[-1,-1],[-1,-1]]);function o(){n(!1)}return{open:t,x:r[0],y:r[1],handleClick:function(){t?o():function(){const t=e?.current||e;if(t){const{left:e,top:n,right:r,bottom:o}=t.getBoundingClientRect();i([[e,r],[n,o]])}n(!0)}()},handleMousedown:function(e){e.preventDefault()},handleClose:o}}(d),x=g()(r,`${u}--overflow-menu__container`),S=g()(`${u}--overflow-menu`,{[`${u}--overflow-menu--open`]:h},a!==Wn&&`${u}--overflow-menu--${a}`);return y().createElement("div",p({},l,{className:x,"aria-owns":h?c:null,ref:t}),y().createElement(ce,{"aria-controls":h?c:null,"aria-haspopup":!0,"aria-expanded":h,className:S,onClick:b,onMouseDown:_,ref:d,label:i,align:s},y().createElement(o,{className:`${u}--overflow-menu__icon`})),y().createElement(Zn,{id:c,size:a,open:h,onClose:E,x:f,y:m,label:i},n))}));Gn.propTypes={children:E().node,className:E().string,label:E().string,renderIcon:E().oneOfType([E().func,E().object]),size:E().oneOf(["sm","md","lg"]),tooltipAlignment:E().oneOf(["top","top-left","top-right","bottom","bottom-left","bottom-right","left","right"])},n(7677);class qn extends y().Component{static getEventTarget(e){return e.composed&&"function"==typeof e.composedPath?e.composedPath()[0]:e.target}constructor(e){super(e),this.handleRef=this.handleRef.bind(this),this.handleDocumentClick=this.handleDocumentClick.bind(this)}componentDidMount(){document.addEventListener("click",this.handleDocumentClick)}componentWillUnmount(){document.removeEventListener("click",this.handleDocumentClick)}handleDocumentClick(e){this.element&&this.element.contains&&!this.element.contains(qn.getEventTarget(e))&&this.props.onClickOutside(e)}handleRef(e){const{children:t}=this.props;this.element=e,t.ref&&"function"==typeof t.ref&&t.ref(e)}render(){return y().cloneElement(this.props.children,{ref:this.handleRef})}}f(qn,"propTypes",{children:E().element.isRequired,onClickOutside:E().func.isRequired});var Yn=n(3883),Kn=n.n(Yn),Xn=function(){const e=[];let t=!1;function n(){e.forEach((e=>{e()})),t=!1}function r(){t||(t=!0,Kn().requestAnimationFrame(n))}return{add:t=>(e.length||Kn().addEventListener("resize",r),function(t){t&&e.indexOf(t)<0&&e.push(t)}(t),{release(){const n=e.indexOf(t);n>=0&&e.splice(n,1)}})}}();const Qn="undefined"!=typeof Node&&Node.DOCUMENT_POSITION_PRECEDING|Node.DOCUMENT_POSITION_CONTAINS,Jn="undefined"!=typeof Node&&Node.DOCUMENT_POSITION_FOLLOWING|Node.DOCUMENT_POSITION_CONTAINED_BY,er="\n a[href], area[href], input:not([disabled]):not([tabindex='-1']),\n button:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']),\n textarea:not([disabled]):not([tabindex='-1']),\n iframe, object, embed, *[tabindex]:not([tabindex='-1']):not([disabled]), *[contenteditable=true]\n";var tr=n(8233),nr=n(3282),rr=n(2198);var ir=n(1960),or=/\s/;var ar=/^\s+/;const sr=function(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&or.test(e.charAt(t)););return t}(e)+1).replace(ar,""):e};var lr=n(3122),cr=n(2758),ur=/^[-+]0x[0-9a-f]+$/i,dr=/^0b[01]+$/i,hr=/^0o[0-7]+$/i,fr=parseInt;const pr=function(e){return e?Infinity===(e=function(e){if("number"==typeof e)return e;if((0,cr.Z)(e))return NaN;if((0,lr.Z)(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=(0,lr.Z)(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=sr(e);var n=dr.test(e);return n||hr.test(e)?fr(e.slice(2),n?2:8):ur.test(e)?NaN:+e}(e))||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0};var mr=Math.max,gr=Math.min;const vr=(yr=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i,o,a=r-1;return void 0!==n&&(i=pr(n),o=i%1,a=i==i?o?i-o:i:0,a=n<0?mr(r+a,0):gr(a,r-1)),(0,ir.Z)(e,(0,tr.Z)(t,3),a,!0)},function(e,t,n){var r=Object(e);if(!(0,nr.Z)(e)){var i=(0,tr.Z)(t,3);e=(0,rr.Z)(e),t=function(e){return i(r[e],e,r)}}var o=yr(e,t,n);return o>-1?r[i?e[o]:o]:void 0});var yr;const br="left",wr="top",_r="right",Er="bottom",xr=e=>{let{menuSize:t,refPosition:n={},offset:r={},direction:i=Er,scrollX:o=0,scrollY:a=0,container:s}=e;const{left:l=0,top:c=0,right:u=0,bottom:d=0}=n,h="static"!==s.position?0:o,f="static"!==s.position?0:a,p="static"!==s.position?s.rect.top:0,m="static"!==s.position?s.rect.left:0,{width:g,height:v}=t,{top:y=0,left:b=0}=r,w=(l+u)/2,_=(c+d)/2;return{[br]:()=>({left:l-g+h-b-m,top:_-v/2+f+y-9-p}),[wr]:()=>({left:w-g/2+h+b-m,top:c-v+f-y-p}),[_r]:()=>({left:u+h+b-m,top:_-v/2+f+y+3-p}),[Er]:()=>({left:w-g/2+h+b-m,top:d+f+y-p})}[i]()};class Sr extends y().Component{constructor(){var e;super(...arguments),e=this,f(this,"_placeInProgress",!1),f(this,"state",{floatingPosition:void 0}),f(this,"_menuContainer",null),f(this,"_menuBody",null),f(this,"startSentinel",y().createRef()),f(this,"endSentinel",y().createRef()),f(this,"_updateMenuSize",(function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const r=e._menuBody;if(!r)return;const{menuOffset:i={},menuDirection:o}=t,{menuOffset:a={},menuDirection:s}=e.props;if(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return typeof e!=typeof t||(Object(t)===t&&"function"!=typeof t?e.top!==t.top||e.left!==t.left:e!==t)}(i,a)||o!==s||n){const{flipped:t,triggerRef:i,updateOrientation:o}=e.props,{current:l}=i,c=r.getBoundingClientRect(),u=l&&l.getBoundingClientRect(),d="function"!=typeof a?a:a(r,s,l,t);o&&o({menuSize:c,refPosition:u,direction:s,offset:d,scrollX:Kn().pageXOffset,scrollY:Kn().pageYOffset,container:{rect:e.props.target().getBoundingClientRect(),position:getComputedStyle(e.props.target()).position}}),(c.width>0&&c.height>0||!d)&&e.setState({floatingPosition:xr({menuSize:c,refPosition:u,direction:s,offset:d,scrollX:Kn().pageXOffset,scrollY:Kn().pageYOffset,container:{rect:e.props.target().getBoundingClientRect(),position:getComputedStyle(e.props.target()).position}})},(()=>{n||r.getBoundingClientRect()!==c&&e._updateMenuSize(e.props,!0)}))}})),f(this,"_focusMenuContent",(e=>{const t=e.querySelector(this.props.selectorPrimaryFocus||null),n=e.querySelector(er),r=e.querySelector("\n a[href], area[href], input:not([disabled]),\n button:not([disabled]),select:not([disabled]),\n textarea:not([disabled]),\n iframe, object, embed, *[tabindex]:not([disabled]), *[contenteditable=true]\n");(t||n||r||e).focus()})),f(this,"_menuRef",(e=>{const{menuRef:t}=this.props;this._placeInProgress=!!e,t&&t(this._menuBody=e),e&&this._updateMenuSize()})),f(this,"_getChildrenWithProps",(()=>{const{styles:e,children:t}=this.props,{floatingPosition:n}=this.state,r=n?{left:`${n.left}px`,top:`${n.top}px`,right:"auto"}:{visibility:"hidden",top:"0px"};return y().cloneElement(t,{ref:this._menuRef,style:{...e,...r,position:"absolute",opacity:1}})})),f(this,"handleBlur",(e=>{let{target:t,relatedTarget:n}=e;if(n&&t){const{current:e}=this.startSentinel,{current:r}=this.endSentinel;!function(e){let{bodyNode:t,startTrapNode:n,endTrapNode:r,currentActiveNode:i,oldActiveNode:o,selectorsFloatingMenus:a}=e;if(t&&i&&o&&!t.contains(i)&&!function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(e&&"function"==typeof e.closest)return[".cds--overflow-menu-options",".cds--tooltip",".flatpickr-calendar",...t].some((t=>e.closest(t)))}(i,a)){const e=o.compareDocumentPosition(i);if(i===n||e&Qn){const e=vr(t.querySelectorAll(er),(e=>Boolean(e.offsetParent)));e?e.focus():t!==o&&t.focus()}else if(i===r||e&Jn){const e=Array.prototype.find.call(t.querySelectorAll(er),(e=>Boolean(e.offsetParent)));e?e.focus():t!==o&&t.focus()}}}({bodyNode:this._menuBody,startSentinelNode:e,endSentinelNode:r,currentActiveNode:n,oldActiveNode:t})}}))}componentWillUnmount(){this.hResize.release()}componentDidMount(){this.hResize=Xn.add((()=>{this._updateMenuSize()}))}componentDidUpdate(e){this._updateMenuSize(e);const{onPlace:t}=this.props;this._placeInProgress&&this.state.floatingPosition&&(this._menuBody&&!this._menuBody.contains(document.activeElement)&&this._focusMenuContent(this._menuBody),"function"==typeof t&&(t(this._menuBody),this._placeInProgress=!1))}render(){const{context:e}=this;if("undefined"!=typeof document){const{focusTrap:t,target:n}=this.props;return Fn.createPortal(y().createElement("div",{onBlur:t?this.handleBlur:null},y().createElement("span",{ref:this.startSentinel,tabIndex:"0",role:"link",className:`${e}--visually-hidden`},"Focus sentinel"),this._getChildrenWithProps(),y().createElement("span",{ref:this.endSentinel,tabIndex:"0",role:"link",className:`${e}--visually-hidden`},"Focus sentinel")),n?n():document.body)}return null}}f(Sr,"contextType",b),f(Sr,"propTypes",{children:E().object,flipped:E().bool,focusTrap:E().bool,menuDirection:E().oneOf([br,wr,_r,Er]),menuOffset:E().oneOfType([E().shape({top:E().number,left:E().number}),E().func]),menuRef:E().func,onPlace:E().func,selectorPrimaryFocus:E().string,styles:E().object,target:E().func,triggerRef:E().oneOfType([E().func,E().shape({current:E().any})]),updateOrientation:E().func}),f(Sr,"defaultProps",{menuOffset:{},menuDirection:Er,updateOrientation:null});var Tr=Sr;const Or=A(),Ar={[wr]:"bottom",[Er]:"top"},Cr=(e,t,n,r)=>{const i=Ar[t],{offsetWidth:o,offsetHeight:a}=e;switch(i){case"top":case"bottom":return{left:(r?-1:1)*(o/2-(n?n.offsetWidth:0)/2),top:0};case"left":case"right":return{left:0,top:(r?-1:1)*(a/2-(n?n.offsetHeight:0)/2)}}};class kr extends v.Component{constructor(){super(...arguments),f(this,"state",{}),f(this,"instanceId",Or()),f(this,"_hFocusIn",null),f(this,"_hBlurTimeout",void 0),f(this,"_triggerRef",y().createRef()),f(this,"handleClick",(e=>{e.stopPropagation(),this._menuBody&&this._menuBody.contains(e.target)||(this.setState({open:!this.state.open}),this.props.onClick(e))})),f(this,"closeMenuAndFocus",(()=>{let e=this.state.open;this.closeMenu((()=>{e&&this.focusMenuEl()}))})),f(this,"handleKeyPress",(e=>{this.state.open&&z(e,[W,G,q,Z])&&e.preventDefault(),z(e,[F])&&(this.closeMenuAndFocus(),e.stopPropagation())})),f(this,"handleClickOutside",(e=>{!this.state.open||this._menuBody&&this._menuBody.contains(e.target)||this.closeMenu()})),f(this,"closeMenu",(e=>{this.setState({open:!1},(()=>{e&&e(),this.props.onClose()}))})),f(this,"focusMenuEl",(()=>{const{current:e}=this._triggerRef;e&&e.focus()})),f(this,"handleOverflowMenuItemFocus",(e=>{let{currentIndex:t,direction:n}=e;const r=y().Children.toArray(this.props.children).reduce(((e,t,n)=>(t.props.disabled||e.push(n),e)),[]),i=(()=>{const e=r.indexOf(t)+n;switch(e){case-1:return r.length-1;case r.length:return 0;default:return e}})(),o=this[`overflowMenuItem${r[i]}`];o?.focus()})),f(this,"_bindMenuBody",(e=>{e||(this._menuBody=e),!e&&this._hFocusIn&&(this._hFocusIn=this._hFocusIn.release())})),f(this,"_handlePlace",(e=>{if(e){this._menuBody=e;const t="onfocusin"in window,n=t?"focusin":"focus";this._hFocusIn=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.addEventListener(...n),{release:()=>(e.removeEventListener(...n),null)}}(e.ownerDocument,n,(t=>{const n=qn.getEventTarget(t),{current:r}=this._triggerRef;"function"==typeof n.matches&&(e.contains(n)||!r||n.matches(`.${this.context}--overflow-menu,.${this.context}--overflow-menu-options`)||this.closeMenuAndFocus())}),!t),this.props.onOpen()}})),f(this,"_getTarget",(()=>{const{current:e}=this._triggerRef;return e&&e.closest("[data-floating-menu-container]")||document.body}))}componentDidUpdate(e,t){const{onClose:n}=this.props;!this.state.open&&t.open&&n()}componentDidMount(){this._triggerRef.current&&this.setState({hasMountedTrigger:!0})}static getDerivedStateFromProps(e,t){let{open:n}=e;const{prevOpen:r}=t;return r===n?null:{open:n,prevOpen:n}}componentWillUnmount(){"number"==typeof this._hBlurTimeout&&(clearTimeout(this._hBlurTimeout),this._hBlurTimeout=void 0)}render(){const e=this.context,{id:t,"aria-label":n,ariaLabel:r,children:i,iconDescription:o,direction:a,flipped:s,focusTrap:l,menuOffset:c,menuOffsetFlip:u,iconClass:d,onClick:h,onOpen:f,selectorPrimaryFocus:m="[data-floating-menu-primary-focus]",renderIcon:v,innerRef:b,menuOptionsClass:w,light:_,size:E="md",...x}=this.props,{open:S}=this.state,T=g()(this.props.className,`${e}--overflow-menu`,{[`${e}--overflow-menu--open`]:S,[`${e}--overflow-menu--light`]:_,[`${e}--overflow-menu--${E}`]:E}),O=g()(w,`${e}--overflow-menu-options`,{[`${e}--overflow-menu--flip`]:this.props.flipped,[`${e}--overflow-menu-options--open`]:S,[`${e}--overflow-menu-options--light`]:_,[`${e}--overflow-menu-options--${E}`]:E}),A=g()(`${e}--overflow-menu__icon`,d),C=y().Children.toArray(i).map(((e,t)=>y().cloneElement(e,{closeMenu:e?.props?.closeMenu||this.closeMenuAndFocus,handleOverflowMenuItemFocus:this.handleOverflowMenuItemFocus,ref:e=>{this[`overflowMenuItem${t}`]=e},index:t}))),k=`overflow-menu-${this.instanceId}__menu-body`,M=y().createElement("ul",{className:O,tabIndex:"-1",role:"menu","aria-label":n||r,onKeyDown:this.handleKeyPress,id:k},C),N=y().createElement(Tr,{focusTrap:l,triggerRef:this._triggerRef,menuDirection:a,menuOffset:s?u:c,menuRef:this._bindMenuBody,flipped:this.props.flipped,target:this._getTarget,onPlace:this._handlePlace,selectorPrimaryFocus:this.props.selectorPrimaryFocus},y().cloneElement(M,{"data-floating-menu-direction":a})),D={className:A,"aria-label":o};return y().createElement(qn,{onClickOutside:this.handleClickOutside},y().createElement("span",{className:`${e}--overflow-menu__wrapper`,"aria-owns":S?k:null},y().createElement(ce,p({},x,{type:"button","aria-haspopup":!0,"aria-expanded":this.state.open,"aria-controls":S?k:null,className:T,onClick:this.handleClick,id:t,ref:fn(this._triggerRef,b),size:E,label:o}),y().createElement(v,D)),S&&this.state.hasMountedTrigger&&N))}}f(kr,"propTypes",{"aria-label":E().string,ariaLabel:P(E().string),children:E().node,className:E().string,direction:E().oneOf([wr,Er]),flipped:E().bool,focusTrap:E().bool,iconClass:E().string,iconDescription:E().string.isRequired,id:E().string,light:P(E().bool),menuOffset:E().oneOfType([E().shape({top:E().number,left:E().number}),E().func]),menuOffsetFlip:E().oneOfType([E().shape({top:E().number,left:E().number}),E().func]),menuOptionsClass:E().string,onClick:E().func,onClose:E().func,onFocus:E().func,onKeyDown:E().func,onOpen:E().func,open:E().bool,renderIcon:E().oneOfType([E().func,E().object]),selectorPrimaryFocus:E().string,size:E().oneOf(["sm","md","lg"])}),f(kr,"contextType",b),f(kr,"defaultProps",{"aria-label":null,iconDescription:"Options",open:!1,direction:Er,flipped:!1,focusTrap:!0,renderIcon:jn,onClick:()=>{},onKeyDown:()=>{},onClose:()=>{},onOpen:()=>{},menuOffset:Cr,menuOffsetFlip:Cr,selectorPrimaryFocus:"[data-overflow-menu-primary-focus]"});const Mr=function(e){function t(t){return y().createElement(e,t)}const n=e.displayName||e.name;return t.displayName=`ClassWrapper(${n})`,t}(kr);function Nr(e){return ct("enable-v12-overflowmenu")?y().createElement(Gn,e):y().createElement(Mr,e)}Nr.displayName="OverflowMenu";const Dr="Settings",Rr=e=>{let{className:t,renderIcon:n,iconDescription:r=Dr,children:i,...o}=e;const a=w(),s=g()(t,`${a}--toolbar-action ${a}--overflow-menu`);return y().createElement(Nr,p({"aria-label":r,renderIcon:n,className:s,title:r,iconDescription:r,flipped:!0},o),i)};Rr.defaultProps={renderIcon:kn,iconDescription:Dr},Rr.propTypes={children:E().node.isRequired,className:E().string,iconDescription:E().string.isRequired,renderIcon:E().oneOfType([E().func,E().object])};const Lr=$t(),Pr={expandRow:"carbon.table.row.expand",collapseRow:"carbon.table.row.collapse",expandAll:"carbon.table.all.expand",collapseAll:"carbon.table.all.collapse",selectAll:"carbon.table.all.select",unselectAll:"carbon.table.all.unselect",selectRow:"carbon.table.row.select",unselectRow:"carbon.table.row.unselect"},Ir={[Pr.expandAll]:"Expand all rows",[Pr.collapseAll]:"Collapse all rows",[Pr.expandRow]:"Expand current row",[Pr.collapseRow]:"Collapse current row",[Pr.selectAll]:"Select all rows",[Pr.unselectAll]:"Unselect all rows",[Pr.selectRow]:"Select row",[Pr.unselectRow]:"Unselect row"},$r={filterRows:e=>{let{rowIds:t,headers:n,cellsById:r,inputValue:i,getCellId:o}=e;return t.filter((e=>n.some((t=>{let{key:n}=t;const a=o(e,n);return"boolean"!=typeof r[a].value&&(""+r[a].value).toLowerCase().includes(i.toLowerCase())}))))},locale:"en",overflowMenuOnHover:!0,size:"lg",sortRow:(e,t,n)=>{let{sortDirection:r,sortStates:i,locale:o}=n;return r===i.ASC?Mt(e,t,o):Mt(t,e,o)},translateWithId:e=>Ir[e]};class zr extends y().Component{constructor(e){var t;super(e),t=this,f(this,"instanceId",void 0),f(this,"getHeaderProps",(e=>{let{header:t,onClick:n,isSortable:r=this.props.isSortable,...i}=e;const{sortDirection:o,sortHeaderKey:a}=this.state;return{...i,key:t.key,sortDirection:o,isSortable:r,isSortHeader:a===t.key,onClick:e=>{const r=Rt(this.props,this.state,{key:t.key});this.setState(r,(()=>{n&&this.handleOnHeaderClick(n,{sortHeaderKey:t.key,sortDirection:r.sortDirection})(e)}))}}})),f(this,"getExpandHeaderProps",(function(){let{onClick:e,onExpand:n,...r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{translateWithId:i}=t.props,{isExpandedAll:o,rowIds:a,rowsById:s}=t.state,l=o||a.every((e=>s[e].isExpanded)),c=l?Pr.collapseAll:Pr.expandAll;return{...r,ariaLabel:i(c),"aria-label":i(c),"aria-controls":a.map((e=>`expanded-row-${e}`)).join(" "),isExpanded:l,onExpand:ue([t.handleOnExpandAll,n,e&&t.handleOnExpandHeaderClick(e,{isExpanded:l})])}})),f(this,"handleOnHeaderClick",((e,t)=>n=>e(n,t))),f(this,"handleOnExpandHeaderClick",((e,t)=>n=>e(n,t))),f(this,"getRowProps",(e=>{let{row:t,onClick:n,...r}=e;const{translateWithId:i}=this.props,o=t.isExpanded?Pr.collapseRow:Pr.expandRow;return{...r,key:t.id,onExpand:ue([this.handleOnExpandRow(t.id),n]),isExpanded:t.isExpanded,ariaLabel:i(o),"aria-label":i(o),"aria-controls":`expanded-row-${t.id}`,isSelected:t.isSelected,disabled:t.disabled}})),f(this,"getExpandedRowProps",(e=>{let{row:t,...n}=e;return{...n,id:`expanded-row-${t.id}`}})),f(this,"getSelectionProps",(function(){let{onClick:e,row:n,...r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{translateWithId:i}=t.props;if(n){const o=n.isSelected?Pr.unselectRow:Pr.selectRow;return{...r,checked:n.isSelected,onSelect:ue([t.handleOnSelectRow(n.id),e]),id:`${t.getTablePrefix()}__select-row-${n.id}`,name:"select-row",ariaLabel:i(o),disabled:n.disabled,radio:t.props.radio||null}}const o=t.state.rowIds.length,a=t.getSelectedRows().length,s=o>0&&a===o,l=o>0&&a>0&&a!==o,c=s||l?Pr.unselectAll:Pr.selectAll;return{...r,ariaLabel:i(c),checked:s,id:`${t.getTablePrefix()}__select-all`,indeterminate:l,name:"select-all",onSelect:ue([t.handleSelectAll,e])}})),f(this,"getToolbarProps",(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{size:n}=t.props;return{...e,size:"xs"===n||"sm"===n?"sm":void 0}})),f(this,"getBatchActionProps",(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{shouldShowBatchActions:n}=t.state,r=t.getSelectedRows().length;return{onSelectAll:void 0,totalCount:t.state.rowIds.length||0,...e,shouldShowBatchActions:n&&r>0,totalSelected:r,onCancel:t.handleOnCancel}})),f(this,"getTableProps",(()=>{const{useZebraStyles:e,size:t,isSortable:n,useStaticWidth:r,stickyHeader:i,overflowMenuOnHover:o,experimentalAutoAlign:a}=this.props;return{useZebraStyles:e,size:t,isSortable:n,useStaticWidth:r,stickyHeader:i,overflowMenuOnHover:o,experimentalAutoAlign:a}})),f(this,"getTableContainerProps",(()=>{const{stickyHeader:e,useStaticWidth:t}=this.props;return{stickyHeader:e,useStaticWidth:t}})),f(this,"getSelectedRows",(()=>this.state.rowIds.filter((e=>{const t=this.state.rowsById[e];return t.isSelected&&!t.disabled})))),f(this,"getFilteredRowIds",(()=>{const e="string"==typeof this.state.filterInputValue?this.props.filterRows({rowIds:this.state.rowIds,headers:this.props.headers,cellsById:this.state.cellsById,inputValue:this.state.filterInputValue,getCellId:kt}):this.state.rowIds;return 0==e.length?[]:e})),f(this,"getTablePrefix",(()=>`data-table-${this.instanceId}`)),f(this,"setAllSelectedState",((e,t,n)=>{const{rowIds:r}=e,i=r.length!=n.length;return{rowsById:r.reduce(((r,o)=>{const a={...e.rowsById[o]};return a.disabled||i&&!n.includes(o)||(a.isSelected=t),r[o]=a,r}),{})}})),f(this,"handleOnCancel",(()=>{this.setState((e=>({shouldShowBatchActions:!1,...this.setAllSelectedState(e,!1,this.getFilteredRowIds())})))})),f(this,"handleSelectAll",(()=>{this.setState((e=>{const t=this.getFilteredRowIds(),{rowsById:n}=e,r=!(Object.values(n).filter((e=>e.isSelected&&!e.disabled)).length>0);return{shouldShowBatchActions:r,...this.setAllSelectedState(e,r,t)}}))})),f(this,"handleOnSelectRow",(e=>()=>{this.setState((t=>{const n=t.rowsById[e];if(this.props.radio)return{shouldShowBatchActions:!1,rowsById:{...Object.entries(t.rowsById).reduce(((e,t)=>{const[n,r]=t;return r.isSelected=!1,e[n]=r,e}),{}),[e]:{...n,isSelected:!n.isSelected}}};const r=t.rowIds.filter((e=>t.rowsById[e].isSelected)).length,i=n.isSelected?r-1:r+1;return{shouldShowBatchActions:!n.isSelected||i>0,rowsById:{...t.rowsById,[e]:{...n,isSelected:!n.isSelected}}}}))})),f(this,"handleOnExpandRow",(e=>()=>{this.setState((t=>{const n=t.rowsById[e],{isExpandedAll:r}=t;return{isExpandedAll:!n.isExpanded&&r,rowsById:{...t.rowsById,[e]:{...n,isExpanded:!n.isExpanded}}}}))})),f(this,"handleOnExpandAll",(()=>{this.setState((e=>{const{rowIds:t,isExpandedAll:n}=e;return{isExpandedAll:!n,rowsById:t.reduce(((t,r)=>({...t,[r]:{...e.rowsById[r],isExpanded:!n}})),{})}}))})),f(this,"handleSortBy",(e=>()=>{this.setState((t=>Rt(this.props,t,{key:e})))})),f(this,"handleOnInputValueChange",((e,t)=>{e.target&&this.setState({filterInputValue:e.target.value}),t&&this.setState({filterInputValue:t})})),this.state={...Pt(e,{}),isExpandedAll:!1},this.instanceId=Lr()}shouldComponentUpdate(e){if(this.props!==e){const t=e.rows.map((e=>e.id)),n=this.props.rows.map((e=>e.id));if(!At()(t,n))return this.setState((e=>Pt(this.props,e))),!1;const r=e.headers.map((e=>e.key)),i=this.props.headers.map((e=>e.key));if(!At()(r,i))return this.setState((e=>Pt(this.props,e))),!1;if(!At()(e.rows,this.props.rows))return this.setState((e=>Pt(this.props,e))),!1}return!0}render(){const{children:e,filterRows:t,headers:n,render:r}=this.props,{filterInputValue:i,rowIds:o,rowsById:a,cellsById:s}=this.state,l="string"==typeof i?t({rowIds:o,headers:n,cellsById:s,inputValue:i,getCellId:kt}):o,c={rows:It(l,a,s),headers:this.props.headers,selectedRows:It(this.getSelectedRows(),a,s),getHeaderProps:this.getHeaderProps,getExpandHeaderProps:this.getExpandHeaderProps,getRowProps:this.getRowProps,getExpandedRowProps:this.getExpandedRowProps,getSelectionProps:this.getSelectionProps,getToolbarProps:this.getToolbarProps,getBatchActionProps:this.getBatchActionProps,getTableProps:this.getTableProps,getTableContainerProps:this.getTableContainerProps,onInputChange:this.handleOnInputValueChange,sortBy:e=>this.handleSortBy(e)(),selectAll:this.handleSelectAll,selectRow:e=>this.handleOnSelectRow(e)(),expandRow:e=>this.handleOnExpandRow(e)(),expandAll:this.handleOnExpandAll,radio:this.props.radio};return void 0!==r?r(c):void 0!==e?e(c):null}}var Br,jr,Fr,Ur;f(zr,"defaultProps",$r),f(zr,"propTypes",{experimentalAutoAlign:E().bool,filterRows:E().func,headers:E().arrayOf(E().shape({key:E().string.isRequired,header:E().node.isRequired})).isRequired,isSortable:E().bool,locale:E().string,overflowMenuOnHover:E().bool,radio:E().bool,rows:E().arrayOf(E().shape({id:E().string.isRequired,disabled:E().bool,isSelected:E().bool,isExpanded:E().bool})).isRequired,size:E().oneOf(["xs","sm","md","lg","xl"]),sortRow:E().func,stickyHeader:E().bool,translateWithId:E().func,useStaticWidth:E().bool,useZebraStyles:E().bool}),f(zr,"translationKeys",Object.values(Pr)),f(zr,"Table",void 0),f(zr,"TableActionList",void 0),f(zr,"TableBatchAction",void 0),f(zr,"TableBatchActions",void 0),f(zr,"TableBody",void 0),f(zr,"TableCell",void 0),f(zr,"TableContainer",void 0),f(zr,"TableExpandHeader",void 0),f(zr,"TableExpandRow",void 0),f(zr,"TableExpandedRow",void 0),f(zr,"TableHead",void 0),f(zr,"TableHeader",void 0),f(zr,"TableRow",void 0),f(zr,"TableSelectAll",void 0),f(zr,"TableSelectRow",void 0),f(zr,"TableToolbar",void 0),f(zr,"TableToolbarAction",void 0),f(zr,"TableToolbarContent",void 0),f(zr,"TableToolbarSearch",void 0),f(zr,"TableToolbarMenu",void 0),zr.Table=jt,zr.TableActionList=Ut,zr.TableBatchAction=Vt,zr.TableBatchActions=Gt,zr.TableBody=qt,zr.TableCell=Yt,zr.TableContainer=Kt,zr.TableExpandHeader=Qt,zr.TableExpandRow=Jt,zr.TableExpandedRow=en,zr.TableHead=tn,zr.TableHeader=an,zr.TableRow=cn,zr.TableSelectAll=hn,zr.TableSelectRow=mn,zr.TableToolbar=yn,zr.TableToolbarAction=wn,zr.TableToolbarContent=_n,zr.TableToolbarSearch=In,zr.TableToolbarMenu=Rr;const Hr=y().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return"glyph"===r||"glyph"===r||"glyphpx"===r?y().createElement(ge.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 5 8",fill:"currentColor",...i},Br||(Br=y().createElement("path",{d:"M5 8L0 4 5 0z"})),n):y().createElement(ge.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},jr||(jr=y().createElement("path",{d:"M20 24L10 16 20 8z"})),n)})),Vr=y().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return"glyph"===r||"glyph"===r||"glyphpx"===r?y().createElement(ge.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 5 8",fill:"currentColor",...i},Fr||(Fr=y().createElement("path",{d:"M0 0L5 4 0 8z"})),n):y().createElement(ge.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},Ur||(Ur=y().createElement("path",{d:"M12 8L22 16 12 24z"})),n)}));var Zr,Wr,Gr,qr,Yr,Kr,Xr,Qr,Jr,ei,ti;const ni=y().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return y().createElement(ge.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},Zr||(Zr=y().createElement("path",{fill:"none",d:"M16,26a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,16,26Zm-1.125-5h2.25V12h-2.25Z","data-icon-path":"inner-path"})),Wr||(Wr=y().createElement("path",{d:"M16.002,6.1714h-.004L4.6487,27.9966,4.6506,28H27.3494l.0019-.0034ZM14.875,12h2.25v9h-2.25ZM16,26a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,16,26Z"})),Gr||(Gr=y().createElement("path",{d:"M29,30H3a1,1,0,0,1-.8872-1.4614l13-25a1,1,0,0,1,1.7744,0l13,25A1,1,0,0,1,29,30ZM4.6507,28H27.3493l.002-.0033L16.002,6.1714h-.004L4.6487,27.9967Z"})),n)})),ri=y().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return 16===r||"16"===r||"16px"===r?y().createElement(ge.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},qr||(qr=y().createElement("path",{d:"M8,1C4.2,1,1,4.2,1,8s3.2,7,7,7s7-3.1,7-7S11.9,1,8,1z M7.5,4h1v5h-1C7.5,9,7.5,4,7.5,4z M8,12.2 c-0.4,0-0.8-0.4-0.8-0.8s0.3-0.8,0.8-0.8c0.4,0,0.8,0.4,0.8,0.8S8.4,12.2,8,12.2z"})),Yr||(Yr=y().createElement("path",{d:"M7.5,4h1v5h-1C7.5,9,7.5,4,7.5,4z M8,12.2c-0.4,0-0.8-0.4-0.8-0.8s0.3-0.8,0.8-0.8 c0.4,0,0.8,0.4,0.8,0.8S8.4,12.2,8,12.2z","data-icon-path":"inner-path",opacity:"0"})),n):20===r||"20"===r||"20px"===r?y().createElement(ge.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...i},Kr||(Kr=y().createElement("path",{d:"M10,1c-5,0-9,4-9,9s4,9,9,9s9-4,9-9S15,1,10,1z M9.2,5h1.5v7H9.2V5z M10,16c-0.6,0-1-0.4-1-1s0.4-1,1-1 s1,0.4,1,1S10.6,16,10,16z"})),Xr||(Xr=y().createElement("path",{d:"M9.2,5h1.5v7H9.2V5z M10,16c-0.6,0-1-0.4-1-1s0.4-1,1-1s1,0.4,1,1S10.6,16,10,16z","data-icon-path":"inner-path",opacity:"0"})),n):24===r||"24"===r||"24px"===r?y().createElement(ge.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...i},Qr||(Qr=y().createElement("path",{d:"M12,1C5.9,1,1,5.9,1,12s4.9,11,11,11s11-4.9,11-11C23,5.9,18.1,1,12,1z M11.1,6h1.8v8h-1.8V6z M12,19.2 c-0.7,0-1.2-0.6-1.2-1.2s0.6-1.2,1.2-1.2s1.2,0.6,1.2,1.2S12.7,19.2,12,19.2z"})),Jr||(Jr=y().createElement("path",{fill:"none",d:"M13.2,18c0,0.7-0.6,1.2-1.2,1.2s-1.2-0.6-1.2-1.2s0.6-1.2,1.2-1.2S13.2,17.3,13.2,18z M12.9,6 h-1.8v8h1.8V6z","data-icon-path":"inner-path",opacity:"0"})),n):y().createElement(ge.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},ei||(ei=y().createElement("path",{d:"M16,2C8.3,2,2,8.3,2,16s6.3,14,14,14s14-6.3,14-14C30,8.3,23.7,2,16,2z M14.9,8h2.2v11h-2.2V8z M16,25 c-0.8,0-1.5-0.7-1.5-1.5S15.2,22,16,22c0.8,0,1.5,0.7,1.5,1.5S16.8,25,16,25z"})),ti||(ti=y().createElement("path",{fill:"none",d:"M17.5,23.5c0,0.8-0.7,1.5-1.5,1.5c-0.8,0-1.5-0.7-1.5-1.5S15.2,22,16,22 C16.8,22,17.5,22.7,17.5,23.5z M17.1,8h-2.2v11h2.2V8z","data-icon-path":"inner-path",opacity:"0"})),n)})),ii=A(),oi=y().forwardRef((function(e,t){let{className:n,id:r,inline:i=!1,labelText:o,disabled:a=!1,children:s,noLabel:l=!1,hideLabel:c=!1,invalid:u=!1,invalidText:d,helperText:h,light:f=!1,readOnly:m,size:b,warn:_=!1,warnText:E,onChange:x,...S}=e;const T=w(),{isFluid:A}=(0,v.useContext)(Mn),[C,k]=(0,v.useState)(!1),[M,N]=(0,v.useState)(""),{current:D}=(0,v.useRef)(ii()),R=g()({[`${T}--select`]:!0,[`${T}--select--inline`]:i,[`${T}--select--light`]:f,[`${T}--select--invalid`]:u,[`${T}--select--disabled`]:a,[`${T}--select--readonly`]:m,[`${T}--select--warning`]:_,[`${T}--select--fluid--invalid`]:A&&u,[`${T}--select--fluid--focus`]:A&&C}),L=g()(`${T}--label`,{[`${T}--visually-hidden`]:c,[`${T}--label--disabled`]:a}),P=g()({[`${T}--select-input`]:!0,[`${T}--select-input--${b}`]:b}),I=`${r}-error-msg`,$=u?d:_?E:void 0,z=u||_?y().createElement("div",{className:`${T}--form-requirement`,id:I},$):null,B=g()(`${T}--form__helper-text`,{[`${T}--form__helper-text--disabled`]:a}),j=h?`select-helper-text-${D}`:void 0,F=h?y().createElement("div",{id:j,className:B},h):null,U={};u?U["aria-describedby"]=I:i||A||(U["aria-describedby"]=F?j:void 0);const H=e=>{k("focus"===e.type)},V={onMouseDown:e=>{m&&(e.preventDefault(),e.target.focus())},onKeyDown:e=>{m&&["ArrowDown","ArrowUp"," "].includes(e.key)&&e.preventDefault()}},Z=y().createElement(y().Fragment,null,y().createElement("select",p({},S,U,{id:r,className:P,disabled:a||void 0,"aria-invalid":u||void 0,"aria-readonly":m||void 0,title:M,onChange:ue([x,e=>{N(e?.target?.value)}])},V,{ref:t}),s),y().createElement(O._M,{className:`${T}--select__arrow`}),u&&y().createElement(ri,{className:`${T}--select__invalid-icon`}),!u&&_&&y().createElement(ni,{className:`${T}--select__invalid-icon ${T}--select__invalid-icon--warning`}));return y().createElement("div",{className:g()(`${T}--form-item`,n)},y().createElement("div",{className:R},!l&&y().createElement("label",{htmlFor:r,className:L},o),i&&y().createElement("div",{className:`${T}--select-input--inline__wrapper`},y().createElement("div",{className:`${T}--select-input__wrapper`,"data-invalid":u||null},Z),z),!i&&y().createElement("div",{className:`${T}--select-input__wrapper`,"data-invalid":u||null,onFocus:H,onBlur:H},Z,A&&y().createElement("hr",{className:`${T}--select__divider`}),A&&z?z:null),i||A||!z?F:z))}));oi.displayName="Select",oi.propTypes={children:E().node,className:E().string,defaultValue:E().any,disabled:E().bool,helperText:E().node,hideLabel:E().bool,id:E().string.isRequired,inline:E().bool,invalid:E().bool,invalidText:E().node,labelText:E().node,light:P(E().bool),noLabel:E().bool,onChange:E().func,readOnly:E().bool,size:E().oneOf(["sm","md","lg"]),warn:E().bool,warnText:E().node},oi.defaultProps={disabled:!1,labelText:"Select",inline:!1,invalid:!1,invalidText:"",helperText:""};const ai=e=>{let{className:t,value:n,disabled:r,hidden:i,text:o,...a}=e;const s=w(),l=g()({[`${s}--select-option`]:!0,...t&&{[t]:t}});return y().createElement("option",p({},a,{className:l,value:n,disabled:r,hidden:i}),o)};var si,li;function ci(e){return"object"==typeof e[0]&&null!==e[0]?e:e.map((e=>({text:e,value:e})))}function ui(e,t){return t&&e.find((e=>t===e.value))?t:e[0].value}ai.propTypes={className:E().string,disabled:E().bool,hidden:E().bool,text:E().string.isRequired,value:E().any.isRequired},ai.defaultProps={disabled:!1,hidden:!1,value:"",text:""};const di=y().forwardRef((function(e,t){let{backwardText:n="Previous page",className:r,disabled:i=!1,forwardText:o="Next page",id:a,isLastPage:s=!1,itemText:l=((e,t)=>`${e}–${t} items`),itemRangeText:c=((e,t,n)=>`${e}–${t} of ${n} items`),itemsPerPageText:u="Items per page:",onChange:d,pageNumberText:h="Page Number",pageRangeText:f=((e,t)=>`of ${t} ${1===t?"page":"pages"}`),page:m=1,pageInputDisabled:b,pageSize:_,pageSizeInputDisabled:E,pageSizes:x,pageText:S=((e,t)=>`page ${t?"":e}`),pagesUnknown:T=!1,size:O="md",totalItems:A,...C}=e;const k=w(),M=function(e){const t=R();return e??t}(a),N=(0,v.useRef)(null),D=(0,v.useRef)(null),[L,P]=(0,v.useState)((()=>ci(x))),[I,$]=(0,v.useState)(x),[z,B]=(0,v.useState)(m),[j,F]=(0,v.useState)(m),[U,H]=(0,v.useState)((()=>ui(L,_))),[V,Z]=(0,v.useState)(_),W=g()({[`${k}--pagination`]:!0,[`${k}--pagination--${O}`]:O,[r]:!!r}),G=Math.max(Math.ceil(A/U),1),q=i||1===z,Y=g()({[`${k}--pagination__button`]:!0,[`${k}--pagination__button--backward`]:!0,[`${k}--pagination__button--no-index`]:q}),K=i||z===G,X=g()({[`${k}--pagination__button`]:!0,[`${k}--pagination__button--forward`]:!0,[`${k}--pagination__button--no-index`]:K}),Q=function(e){let t=1,n=[];for(;t<=e;)n.push(y().createElement(ai,{key:t,value:t,text:String(t)})),t++;return n}(G);if(m!==j&&(B(m),F(m)),_!==V&&(H(ui(L,_)),Z(_)),!function(e,t){if(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length)return!1;if(e===t)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(x,I)){const e=ci(x),t=e.find((e=>e.value===U));t||B(1),P(e),$(x)}return y().createElement("div",p({className:W,ref:t},C),y().createElement("div",{className:`${k}--pagination__left`},y().createElement("label",{id:`${k}-pagination-select-${M}-count-label`,className:`${k}--pagination__text`,htmlFor:`${k}-pagination-select-${M}`},u),y().createElement(oi,{id:`${k}-pagination-select-${M}`,className:`${k}--select__item-count`,labelText:"",hideLabel:!0,noLabel:!0,inline:!0,onChange:function(e){const t={pageSize:Number(e.target.value),page:1};B(t.page),H(t.pageSize),d&&d(t)},disabled:E||i,value:U},L.map((e=>y().createElement(ai,{key:e.value,value:e.value,text:String(e.text)})))),y().createElement("span",{className:`${k}--pagination__text ${k}--pagination__items-count`},T?l(U*(z-1)+1,z*U):c(Math.min(U*(z-1)+1,A),Math.min(z*U,A),A))),y().createElement("div",{className:`${k}--pagination__right`},T?y().createElement("span",{className:`${k}--pagination__text ${k}--pagination__page-text`},T?S(z,T):f(z,G)):null,y().createElement(oi,{id:`${k}-pagination-select-${M}-right`,className:`${k}--select__page-number`,labelText:`Page number, of ${G} pages`,inline:!0,hideLabel:!0,onChange:function(e){const t=Number(e.target.value);t>0&&t<=Math.max(Math.ceil(A/U),1)&&(B(t),d&&d({page:t,pageSize:U}))},value:z,disabled:b||i},Q),T?null:y().createElement("span",{className:`${k}--pagination__text`},T?S(z,T):f(z,G)),y().createElement("div",{className:`${k}--pagination__control-buttons`},y().createElement(ce,{align:"top",disabled:q,kind:"ghost",className:Y,label:n,onClick:function(){const e=z-1;B(e),1===e&&D.current.focus(),d&&d({page:e,pageSize:U,forwardBtnRef:D})},ref:N},si||(si=y().createElement(Hr,null))),y().createElement(ce,{align:"top-right",disabled:K||s,kind:"ghost",className:X,label:o,onClick:function(){const e=z+1;B(e),e===G&&N.current.focus(),d&&d({page:e,pageSize:U,backBtnRef:N})},ref:D},li||(li=y().createElement(Vr,null))))))}));di.propTypes={backwardText:E().string,className:E().string,disabled:E().bool,forwardText:E().string,id:E().oneOfType([E().string,E().number]),isLastPage:E().bool,itemRangeText:E().func,itemText:E().func,itemsPerPageText:E().string,onChange:E().func,page:E().number,pageInputDisabled:E().bool,pageNumberText:E().string,pageRangeText:E().func,pageSize:E().number,pageSizeInputDisabled:E().bool,pageSizes:E().oneOfType([E().arrayOf(E().number),E().arrayOf(E().shape({text:E().text,value:E().number}))]).isRequired,pageText:E().func,pagesUnknown:E().bool,size:E().oneOf(["sm","md","lg"]),totalItems:E().number};var hi=di},2192:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var o=typeof n;if("string"===o||"number"===o)e.push(n);else if(Array.isArray(n)){if(n.length){var a=i.apply(null,n);a&&e.push(a)}}else if("object"===o){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){e.push(n.toString());continue}for(var s in n)r.call(n,s)&&n[s]&&e.push(s)}}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(n=function(){return i}.apply(t,[]))||(e.exports=n)}()},321:e=>{"use strict";var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var o={},a=[],s=0;s<e.length;s++){var l=e[s],c=r.base?l[0]+r.base:l[0],u=o[c]||0,d="".concat(c," ").concat(u);o[c]=u+1;var h=n(d),f={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==h)t[h].references++,t[h].updater(f);else{var p=i(f,r);r.byIndex=s,t.splice(s,0,{identifier:d,updater:p,references:1})}a.push(d)}return a}function i(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,i){var o=r(e=e||[],i=i||{});return function(e){e=e||[];for(var a=0;a<o.length;a++){var s=n(o[a]);t[s].references--}for(var l=r(e,i),c=0;c<o.length;c++){var u=n(o[c]);0===t[u].references&&(t[u].updater(),t.splice(u,1))}o=l}}},3275:e=>{"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},2094:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},7162:(e,t,n)=>{"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},1195:e=>{"use strict";e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var i=void 0!==n.layer;i&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,i&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var o=n.sourceMap;o&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},757:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},4512:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(272),i=n.n(r),o=n(2609),a=n.n(o)()(i());a.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79;--bottom-nav-height: 4rem;--workspace-header-height: 3rem;--tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));--desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height))}.-esm-generic-patient-widgets__obs-graph__label01___nqHbU,.-esm-generic-patient-widgets__obs-graph__conceptLabel___JcAin{font-size:var(--cds-label-01-font-size, 0.75rem);font-weight:var(--cds-label-01-font-weight, 400);line-height:var(--cds-label-01-line-height, 1.33333);letter-spacing:var(--cds-label-01-letter-spacing, 0.32px)}.-esm-generic-patient-widgets__obs-graph__bodyShort01___MXPMj{font-size:var(--cds-body-compact-01-font-size, 0.875rem);font-weight:var(--cds-body-compact-01-font-weight, 400);line-height:var(--cds-body-compact-01-line-height, 1.28572);letter-spacing:var(--cds-body-compact-01-letter-spacing, 0.16px)}.-esm-generic-patient-widgets__obs-graph__graphContainer___peSeT{display:flex;margin:0rem 1rem;flex-direction:row;justify-content:space-between}.-esm-generic-patient-widgets__obs-graph__conceptPickerTabs___Gk0Ph{flex-grow:1;margin:.5rem 0;padding-right:1rem}.-esm-generic-patient-widgets__obs-graph__lineChartContainer___DWcve{flex-grow:4;padding:0 1rem 3rem}.-esm-generic-patient-widgets__obs-graph__lineChartContainer___DWcve .cds--cc--layout-row{height:0}.-esm-generic-patient-widgets__obs-graph__lineChartContainer___DWcve .layout-child{margin-top:.5rem}.-esm-generic-patient-widgets__obs-graph__conceptLabel___JcAin{margin-bottom:1rem;display:inline-block}.-esm-generic-patient-widgets__obs-graph__verticalTabs___PGFpw{margin:1rem 0;scroll-behavior:smooth}.-esm-generic-patient-widgets__obs-graph__verticalTabs___PGFpw>ul{flex-direction:column !important}.-esm-generic-patient-widgets__obs-graph__verticalTabs___PGFpw .cds--tabs--scrollable .cds--tabs--scrollable__nav-item+.cds--tabs--scrollable__nav-item{margin-left:0rem}.-esm-generic-patient-widgets__obs-graph__verticalTabs___PGFpw .cds--tabs--scrollable .cds--tabs--scrollable__nav-link{border-bottom:0 !important;border-left:2px solid #c6c6c6}.-esm-generic-patient-widgets__obs-graph__tab___dw7mi{outline:0;outline-offset:0}.-esm-generic-patient-widgets__obs-graph__tab___dw7mi:active,.-esm-generic-patient-widgets__obs-graph__tab___dw7mi:focus{outline:2px solid var(--brand-03) !important}.-esm-generic-patient-widgets__obs-graph__tab___dw7mi[aria-selected=true]{border-left:3px solid var(--brand-03);border-bottom:none;font-weight:600;margin-left:0rem !important}.-esm-generic-patient-widgets__obs-graph__tab___dw7mi[aria-selected=false]{border-bottom:none;border-left:2px solid #e0e0e0;margin-left:0rem !important}.-esm-generic-patient-widgets__obs-graph__tablist___f25Mm .cds--tab--list{flex-direction:column;max-height:fit-content;overflow-x:visible}.-esm-generic-patient-widgets__obs-graph__tablist___f25Mm>button .cds--tabs .cds--tabs__nav-link{border-bottom:none}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/obs-graph/obs-graph.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss","webpack://./../../node_modules/@carbon/layout/scss/generated/_spacing.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CACA,yBAAA,CACA,+BAAA,CACA,oGAAA,CACA,2GAAA,CCvDF,yHC81BI,gDAAA,CAAA,gDAAA,CAAA,oDAAA,CAAA,yDAAA,CD11BJ,8DC01BI,wDAAA,CAAA,uDAAA,CAAA,2DAAA,CAAA,gEAAA,CDt1BJ,iEACE,YAAA,CACA,gBAAA,CACA,kBAAA,CACA,6BAAA,CAGF,oEACE,WAAA,CACA,cAAA,CACA,kBESW,CFNb,qEACE,WAAA,CACA,mBAAA,CAEA,0FACE,QAAA,CAGF,mFACE,gBEbS,CFiBb,+DAEE,kBETW,CFUX,oBAAA,CAGF,+DACE,aAAA,CACA,sBAAA,CAEA,kEACE,gCAAA,CAGF,wJACE,gBAAA,CAGF,uHACE,0BAAA,CACA,6BAAA,CAIJ,sDACE,SAAA,CACA,gBAAA,CAEA,yHACE,4CAAA,CAGF,0EACE,qCAAA,CACA,kBAAA,CACA,eAAA,CACA,2BAAA,CAGF,2EACE,kBAAA,CACA,6BAAA,CACA,2BAAA,CAKF,0EACE,qBAAA,CACA,sBAAA,CACA,kBAAA,CAGF,iGACE,kBAAA",sourceRoot:""}]),a.locals={label01:"-esm-generic-patient-widgets__obs-graph__label01___nqHbU",conceptLabel:"-esm-generic-patient-widgets__obs-graph__conceptLabel___JcAin",bodyShort01:"-esm-generic-patient-widgets__obs-graph__bodyShort01___MXPMj",graphContainer:"-esm-generic-patient-widgets__obs-graph__graphContainer___peSeT",conceptPickerTabs:"-esm-generic-patient-widgets__obs-graph__conceptPickerTabs___Gk0Ph",lineChartContainer:"-esm-generic-patient-widgets__obs-graph__lineChartContainer___DWcve",verticalTabs:"-esm-generic-patient-widgets__obs-graph__verticalTabs___PGFpw",tab:"-esm-generic-patient-widgets__obs-graph__tab___dw7mi",tablist:"-esm-generic-patient-widgets__obs-graph__tablist___f25Mm"};const s=a},1897:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(272),i=n.n(r),o=n(2609),a=n.n(o)()(i());a.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79;--bottom-nav-height: 4rem;--workspace-header-height: 3rem;--tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));--desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height))}.-esm-generic-patient-widgets__obs-switchable__widgetContainer___MDvE6{background-color:#fff;border:1px solid #e0e0e0}.-esm-generic-patient-widgets__obs-switchable__headerContainer___Nd3VW{display:flex;justify-content:space-between;align-items:center;padding:.75rem 0 .75rem 1rem}.-esm-generic-patient-widgets__obs-switchable__toggleButtons___ObgOI{width:fit-content;margin:0 .5rem}.-esm-generic-patient-widgets__obs-switchable__toggle___IoDvg{padding:.5rem;color:#0f62fe;min-height:0px}.-esm-generic-patient-widgets__obs-switchable__toggle___IoDvg.cds--btn--tertiary{border-color:#0f62fe}.-esm-generic-patient-widgets__obs-switchable__toggle___IoDvg.cds--tooltip__trigger:active:not([disabled]){border-color:#0f62fe}.-esm-generic-patient-widgets__obs-switchable__toggle___IoDvg.cds--btn--tertiary:active{border-color:#0f62fe;background-color:#edf5ff;color:#edf5ff}.-esm-generic-patient-widgets__obs-switchable__toggle___IoDvg.cds--btn--tertiary:focus{background-color:#0f62fe;color:#fff}.-esm-generic-patient-widgets__obs-switchable__toggle___IoDvg.cds--btn--tertiary:hover{color:#fff;background-color:#0f62fe}.-esm-generic-patient-widgets__obs-switchable__toggle___IoDvg.cds--btn--ghost{border-color:#a6c8ff}.-esm-generic-patient-widgets__obs-switchable__toggle___IoDvg.cds--btn--ghost:hover{color:#000;background-color:#f4f4f4}.-esm-generic-patient-widgets__obs-switchable__toggle___IoDvg:first-of-type{border-radius:.25rem 0 0 .25rem}.-esm-generic-patient-widgets__obs-switchable__toggle___IoDvg:first-of-type.cds--btn--ghost{border-right:0}.-esm-generic-patient-widgets__obs-switchable__toggle___IoDvg:last-of-type{border-radius:0 .25rem .25rem 0}.-esm-generic-patient-widgets__obs-switchable__toggle___IoDvg:last-of-type.cds--btn--ghost{border-left:0rem}.-esm-generic-patient-widgets__obs-switchable__widgetContainer___MDvE6{background-color:#fff;position:relative}.-esm-generic-patient-widgets__obs-switchable__headerActionItems___yfiRq{align-items:center;display:flex;flex:1 1 0%;justify-content:end}.-esm-generic-patient-widgets__obs-switchable__backgroundDataFetchingIndicator___V8vgZ{align-items:center;display:flex;flex:1 1 0%;justify-content:end}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/obs-switchable/obs-switchable.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CACA,yBAAA,CACA,+BAAA,CACA,oGAAA,CACA,2GAAA,CCxDF,uEACE,qBDGc,CCFd,wBAAA,CAGF,uEACE,YAAA,CACA,6BAAA,CACA,kBAAA,CACA,4BAAA,CAGF,qEACE,iBAAA,CACA,cAAA,CAGF,8DACE,aAAA,CACA,aDDe,CCEf,cAAA,CAEA,iFACE,oBDLa,CCQf,2GACE,oBDTa,CCYf,wFACE,oBDba,CCcb,wBAAA,CACA,aAAA,CAGF,uFACE,wBDnBa,CCoBb,UDlCY,CCqCd,uFACE,UDtCY,CCuCZ,wBDzBa,CC4Bf,8EACE,oBAAA,CAGF,oFACE,UAAA,CACA,wBDvDI,CC2DR,4EACE,+BAAA,CAEA,4FACE,cAAA,CAIJ,2EACE,+BAAA,CAEA,2FACE,gBAAA,CAIJ,uEACE,qBDrEc,CCsEd,iBAAA,CAGF,yEACE,kBAAA,CACA,YAAA,CACA,WAAA,CACA,mBAAA,CAGF,uFACE,kBAAA,CACA,YAAA,CACA,WAAA,CACA,mBAAA",sourceRoot:""}]),a.locals={widgetContainer:"-esm-generic-patient-widgets__obs-switchable__widgetContainer___MDvE6",headerContainer:"-esm-generic-patient-widgets__obs-switchable__headerContainer___Nd3VW",toggleButtons:"-esm-generic-patient-widgets__obs-switchable__toggleButtons___ObgOI",toggle:"-esm-generic-patient-widgets__obs-switchable__toggle___IoDvg",headerActionItems:"-esm-generic-patient-widgets__obs-switchable__headerActionItems___yfiRq",backgroundDataFetchingIndicator:"-esm-generic-patient-widgets__obs-switchable__backgroundDataFetchingIndicator___V8vgZ"};const s=a},5136:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(272),i=n.n(r),o=n(2609),a=n.n(o)()(i());a.push([e.id,".-esm-generic-patient-widgets__obs-table__customRow___Kp7z_ tbody{white-space:nowrap}.-esm-generic-patient-widgets__obs-table__tableHeader___i_IBK{width:max-content;max-width:300px}","",{version:3,sources:["webpack://./src/obs-table/obs-table.scss"],names:[],mappings:"AAAA,kEACE,kBAAA,CAGF,8DACE,iBAAA,CACA,eAAA",sourceRoot:""}]),a.locals={customRow:"-esm-generic-patient-widgets__obs-table__customRow___Kp7z_",tableHeader:"-esm-generic-patient-widgets__obs-table__tableHeader___i_IBK"};const s=a},2609:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,i,o){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(r)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(a[l]=!0)}for(var c=0;c<e.length;c++){var u=[].concat(e[c]);r&&a[u[0]]||(void 0!==o&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=o),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),i&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=i):u[4]="".concat(i)),t.push(u))}},t}},272:e=>{"use strict";e.exports=function(e){var t=e[1],n=e[3];if(!n)return t;if("function"==typeof btoa){var r=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),o="/*# ".concat(i," */");return[t].concat([o]).join("\n")}return[t].join("\n")}},7677:e=>{"use strict";e.exports=function(e,t,n,r,i,o,a,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,i,o,a,s],u=0;(l=new Error(t.replace(/%s/g,(function(){return c[u++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},594:(e,t,n)=>{var r=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt,l="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,c="object"==typeof self&&self&&self.Object===Object&&self,u=l||c||Function("return this")(),d=Object.prototype.toString,h=Math.max,f=Math.min,p=function(){return u.Date.now()};function m(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==d.call(e)}(e))return NaN;if(m(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=m(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var n=o.test(e);return n||a.test(e)?s(e.slice(2),n?2:8):i.test(e)?NaN:+e}e.exports=function(e,t,n){var r,i,o,a,s,l,c=0,u=!1,d=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=r,o=i;return r=i=void 0,c=t,a=e.apply(o,n)}function b(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-c>=o}function w(){var e=p();if(b(e))return _(e);s=setTimeout(w,function(e){var n=t-(e-l);return d?f(n,o-(e-c)):n}(e))}function _(e){return s=void 0,v&&r?y(e):(r=i=void 0,a)}function E(){var e=p(),n=b(e);if(r=arguments,i=this,l=e,n){if(void 0===s)return function(e){return c=e,s=setTimeout(w,t),u?y(e):a}(l);if(d)return s=setTimeout(w,t),y(l)}return void 0===s&&(s=setTimeout(w,t)),a}return t=g(t)||0,m(n)&&(u=!!n.leading,o=(d="maxWait"in n)?h(g(n.maxWait)||0,t):o,v="trailing"in n?!!n.trailing:v),E.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=l=i=s=void 0},E.flush=function(){return void 0===s?a:_(p())},E}},3958:(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",i=1,o=2,a=9007199254740991,s="[object Arguments]",l="[object Array]",c="[object AsyncFunction]",u="[object Boolean]",d="[object Date]",h="[object Error]",f="[object Function]",p="[object GeneratorFunction]",m="[object Map]",g="[object Number]",v="[object Null]",y="[object Object]",b="[object Promise]",w="[object Proxy]",_="[object RegExp]",E="[object Set]",x="[object String]",S="[object Undefined]",T="[object WeakMap]",O="[object ArrayBuffer]",A="[object DataView]",C=/^\[object .+?Constructor\]$/,k=/^(?:0|[1-9]\d*)$/,M={};M["[object Float32Array]"]=M["[object Float64Array]"]=M["[object Int8Array]"]=M["[object Int16Array]"]=M["[object Int32Array]"]=M["[object Uint8Array]"]=M["[object Uint8ClampedArray]"]=M["[object Uint16Array]"]=M["[object Uint32Array]"]=!0,M[s]=M[l]=M[O]=M[u]=M[A]=M[d]=M[h]=M[f]=M[m]=M[g]=M[y]=M[_]=M[E]=M[x]=M[T]=!1;var N="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,D="object"==typeof self&&self&&self.Object===Object&&self,R=N||D||Function("return this")(),L=t&&!t.nodeType&&t,P=L&&e&&!e.nodeType&&e,I=P&&P.exports===L,$=I&&N.process,z=function(){try{return $&&$.binding&&$.binding("util")}catch(e){}}(),B=z&&z.isTypedArray;function j(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function F(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function U(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var H,V,Z,W=Array.prototype,G=Function.prototype,q=Object.prototype,Y=R["__core-js_shared__"],K=G.toString,X=q.hasOwnProperty,Q=(H=/[^.]+$/.exec(Y&&Y.keys&&Y.keys.IE_PROTO||""))?"Symbol(src)_1."+H:"",J=q.toString,ee=RegExp("^"+K.call(X).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),te=I?R.Buffer:void 0,ne=R.Symbol,re=R.Uint8Array,ie=q.propertyIsEnumerable,oe=W.splice,ae=ne?ne.toStringTag:void 0,se=Object.getOwnPropertySymbols,le=te?te.isBuffer:void 0,ce=(V=Object.keys,Z=Object,function(e){return V(Z(e))}),ue=Pe(R,"DataView"),de=Pe(R,"Map"),he=Pe(R,"Promise"),fe=Pe(R,"Set"),pe=Pe(R,"WeakMap"),me=Pe(Object,"create"),ge=Be(ue),ve=Be(de),ye=Be(he),be=Be(fe),we=Be(pe),_e=ne?ne.prototype:void 0,Ee=_e?_e.valueOf:void 0;function xe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Se(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Te(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Oe(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Te;++t<n;)this.add(e[t])}function Ae(e){var t=this.__data__=new Se(e);this.size=t.size}function Ce(e,t){for(var n=e.length;n--;)if(je(e[n][0],t))return n;return-1}function ke(e){return null==e?void 0===e?S:v:ae&&ae in Object(e)?function(e){var t=X.call(e,ae),n=e[ae];try{e[ae]=void 0;var r=!0}catch(e){}var i=J.call(e);return r&&(t?e[ae]=n:delete e[ae]),i}(e):function(e){return J.call(e)}(e)}function Me(e){return Ge(e)&&ke(e)==s}function Ne(e,t,n,r,a){return e===t||(null==e||null==t||!Ge(e)&&!Ge(t)?e!=e&&t!=t:function(e,t,n,r,a,c){var f=Ue(e),p=Ue(t),v=f?l:$e(e),b=p?l:$e(t),w=(v=v==s?y:v)==y,S=(b=b==s?y:b)==y,T=v==b;if(T&&He(e)){if(!He(t))return!1;f=!0,w=!1}if(T&&!w)return c||(c=new Ae),f||qe(e)?De(e,t,n,r,a,c):function(e,t,n,r,a,s,l){switch(n){case A:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case O:return!(e.byteLength!=t.byteLength||!s(new re(e),new re(t)));case u:case d:case g:return je(+e,+t);case h:return e.name==t.name&&e.message==t.message;case _:case x:return e==t+"";case m:var c=F;case E:var f=r&i;if(c||(c=U),e.size!=t.size&&!f)return!1;var p=l.get(e);if(p)return p==t;r|=o,l.set(e,t);var v=De(c(e),c(t),r,a,s,l);return l.delete(e),v;case"[object Symbol]":if(Ee)return Ee.call(e)==Ee.call(t)}return!1}(e,t,v,n,r,a,c);if(!(n&i)){var C=w&&X.call(e,"__wrapped__"),k=S&&X.call(t,"__wrapped__");if(C||k){var M=C?e.value():e,N=k?t.value():t;return c||(c=new Ae),a(M,N,n,r,c)}}return!!T&&(c||(c=new Ae),function(e,t,n,r,o,a){var s=n&i,l=Re(e),c=l.length;if(c!=Re(t).length&&!s)return!1;for(var u=c;u--;){var d=l[u];if(!(s?d in t:X.call(t,d)))return!1}var h=a.get(e);if(h&&a.get(t))return h==t;var f=!0;a.set(e,t),a.set(t,e);for(var p=s;++u<c;){var m=e[d=l[u]],g=t[d];if(r)var v=s?r(g,m,d,t,e,a):r(m,g,d,e,t,a);if(!(void 0===v?m===g||o(m,g,n,r,a):v)){f=!1;break}p||(p="constructor"==d)}if(f&&!p){var y=e.constructor,b=t.constructor;y==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b||(f=!1)}return a.delete(e),a.delete(t),f}(e,t,n,r,a,c))}(e,t,n,r,Ne,a))}function De(e,t,n,r,a,s){var l=n&i,c=e.length,u=t.length;if(c!=u&&!(l&&u>c))return!1;var d=s.get(e);if(d&&s.get(t))return d==t;var h=-1,f=!0,p=n&o?new Oe:void 0;for(s.set(e,t),s.set(t,e);++h<c;){var m=e[h],g=t[h];if(r)var v=l?r(g,m,h,t,e,s):r(m,g,h,e,t,s);if(void 0!==v){if(v)continue;f=!1;break}if(p){if(!j(t,(function(e,t){if(i=t,!p.has(i)&&(m===e||a(m,e,n,r,s)))return p.push(t);var i}))){f=!1;break}}else if(m!==g&&!a(m,g,n,r,s)){f=!1;break}}return s.delete(e),s.delete(t),f}function Re(e){return function(e,t,n){var r=t(e);return Ue(e)?r:function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}(r,n(e))}(e,Ye,Ie)}function Le(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function Pe(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!We(e)||function(e){return!!Q&&Q in e}(e))&&(Ve(e)?ee:C).test(Be(e))}(n)?n:void 0}xe.prototype.clear=function(){this.__data__=me?me(null):{},this.size=0},xe.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},xe.prototype.get=function(e){var t=this.__data__;if(me){var n=t[e];return n===r?void 0:n}return X.call(t,e)?t[e]:void 0},xe.prototype.has=function(e){var t=this.__data__;return me?void 0!==t[e]:X.call(t,e)},xe.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=me&&void 0===t?r:t,this},Se.prototype.clear=function(){this.__data__=[],this.size=0},Se.prototype.delete=function(e){var t=this.__data__,n=Ce(t,e);return!(n<0||(n==t.length-1?t.pop():oe.call(t,n,1),--this.size,0))},Se.prototype.get=function(e){var t=this.__data__,n=Ce(t,e);return n<0?void 0:t[n][1]},Se.prototype.has=function(e){return Ce(this.__data__,e)>-1},Se.prototype.set=function(e,t){var n=this.__data__,r=Ce(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Te.prototype.clear=function(){this.size=0,this.__data__={hash:new xe,map:new(de||Se),string:new xe}},Te.prototype.delete=function(e){var t=Le(this,e).delete(e);return this.size-=t?1:0,t},Te.prototype.get=function(e){return Le(this,e).get(e)},Te.prototype.has=function(e){return Le(this,e).has(e)},Te.prototype.set=function(e,t){var n=Le(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Oe.prototype.add=Oe.prototype.push=function(e){return this.__data__.set(e,r),this},Oe.prototype.has=function(e){return this.__data__.has(e)},Ae.prototype.clear=function(){this.__data__=new Se,this.size=0},Ae.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Ae.prototype.get=function(e){return this.__data__.get(e)},Ae.prototype.has=function(e){return this.__data__.has(e)},Ae.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Se){var r=n.__data__;if(!de||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Te(r)}return n.set(e,t),this.size=n.size,this};var Ie=se?function(e){return null==e?[]:(e=Object(e),function(t,n){for(var r=-1,i=null==t?0:t.length,o=0,a=[];++r<i;){var s=t[r];l=s,ie.call(e,l)&&(a[o++]=s)}var l;return a}(se(e)))}:function(){return[]},$e=ke;function ze(e,t){return!!(t=null==t?a:t)&&("number"==typeof e||k.test(e))&&e>-1&&e%1==0&&e<t}function Be(e){if(null!=e){try{return K.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function je(e,t){return e===t||e!=e&&t!=t}(ue&&$e(new ue(new ArrayBuffer(1)))!=A||de&&$e(new de)!=m||he&&$e(he.resolve())!=b||fe&&$e(new fe)!=E||pe&&$e(new pe)!=T)&&($e=function(e){var t=ke(e),n=t==y?e.constructor:void 0,r=n?Be(n):"";if(r)switch(r){case ge:return A;case ve:return m;case ye:return b;case be:return E;case we:return T}return t});var Fe=Me(function(){return arguments}())?Me:function(e){return Ge(e)&&X.call(e,"callee")&&!ie.call(e,"callee")},Ue=Array.isArray,He=le||function(){return!1};function Ve(e){if(!We(e))return!1;var t=ke(e);return t==f||t==p||t==c||t==w}function Ze(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=a}function We(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ge(e){return null!=e&&"object"==typeof e}var qe=B?function(e){return function(t){return e(t)}}(B):function(e){return Ge(e)&&Ze(e.length)&&!!M[ke(e)]};function Ye(e){return null!=(t=e)&&Ze(t.length)&&!Ve(t)?function(e,t){var n=Ue(e),r=!n&&Fe(e),i=!n&&!r&&He(e),o=!n&&!r&&!i&&qe(e),a=n||r||i||o,s=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],l=s.length;for(var c in e)!t&&!X.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||ze(c,l))||s.push(c);return s}(e):function(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||q))return ce(e);var t,n,r=[];for(var i in Object(e))X.call(e,i)&&"constructor"!=i&&r.push(i);return r}(e);var t}e.exports=function(e,t){return Ne(e,t)}},8979:(e,t,n)=>{var r="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",a="[object Function]",s="[object GeneratorFunction]",l=/^\[object .+?Constructor\]$/,c=/^(?:0|[1-9]\d*)$/,u="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,d="object"==typeof self&&self&&self.Object===Object&&self,h=u||d||Function("return this")();function f(e,t){return!(!e||!e.length)&&function(e,t,n){if(t!=t)return function(e,t,n,r){for(var i=e.length,o=-1;++o<i;)if(t(e[o],o,e))return o;return-1}(e,g);for(var r=-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}(e,t)>-1}function p(e,t){for(var n=-1,r=e?e.length:0,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function m(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function g(e){return e!=e}function v(e,t){return e.has(t)}function y(e,t){return function(n){return e(t(n))}}var b,w=Array.prototype,_=Function.prototype,E=Object.prototype,x=h["__core-js_shared__"],S=(b=/[^.]+$/.exec(x&&x.keys&&x.keys.IE_PROTO||""))?"Symbol(src)_1."+b:"",T=_.toString,O=E.hasOwnProperty,A=E.toString,C=RegExp("^"+T.call(O).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),k=h.Symbol,M=y(Object.getPrototypeOf,Object),N=E.propertyIsEnumerable,D=w.splice,R=k?k.isConcatSpreadable:void 0,L=Object.getOwnPropertySymbols,P=Math.max,I=Z(h,"Map"),$=Z(Object,"create");function z(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function B(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function j(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function F(e){var t=-1,n=e?e.length:0;for(this.__data__=new j;++t<n;)this.add(e[t])}function U(e,t){for(var n,r,i=e.length;i--;)if((n=e[i][0])===(r=t)||n!=n&&r!=r)return i;return-1}function H(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=q),i||(i=[]);++o<a;){var s=e[o];t>0&&n(s)?t>1?H(s,t-1,n,r,i):m(i,s):r||(i[i.length]=s)}return i}function V(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function Z(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){if(!te(e)||S&&S in e)return!1;var t=ee(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?C:l;return t.test(function(e){if(null!=e){try{return T.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(n)?n:void 0}z.prototype.clear=function(){this.__data__=$?$(null):{}},z.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},z.prototype.get=function(e){var t=this.__data__;if($){var n=t[e];return n===r?void 0:n}return O.call(t,e)?t[e]:void 0},z.prototype.has=function(e){var t=this.__data__;return $?void 0!==t[e]:O.call(t,e)},z.prototype.set=function(e,t){return this.__data__[e]=$&&void 0===t?r:t,this},B.prototype.clear=function(){this.__data__=[]},B.prototype.delete=function(e){var t=this.__data__,n=U(t,e);return!(n<0||(n==t.length-1?t.pop():D.call(t,n,1),0))},B.prototype.get=function(e){var t=this.__data__,n=U(t,e);return n<0?void 0:t[n][1]},B.prototype.has=function(e){return U(this.__data__,e)>-1},B.prototype.set=function(e,t){var n=this.__data__,r=U(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},j.prototype.clear=function(){this.__data__={hash:new z,map:new(I||B),string:new z}},j.prototype.delete=function(e){return V(this,e).delete(e)},j.prototype.get=function(e){return V(this,e).get(e)},j.prototype.has=function(e){return V(this,e).has(e)},j.prototype.set=function(e,t){return V(this,e).set(e,t),this},F.prototype.add=F.prototype.push=function(e){return this.__data__.set(e,r),this},F.prototype.has=function(e){return this.__data__.has(e)};var W=L?y(L,Object):se,G=L?function(e){for(var t=[];e;)m(t,W(e)),e=M(e);return t}:se;function q(e){return Q(e)||X(e)||!!(R&&e&&e[R])}function Y(e,t){return!!(t=null==t?i:t)&&("number"==typeof e||c.test(e))&&e>-1&&e%1==0&&e<t}function K(e){if("string"==typeof e||function(e){return"symbol"==typeof e||ne(e)&&"[object Symbol]"==A.call(e)}(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function X(e){return function(e){return ne(e)&&J(e)}(e)&&O.call(e,"callee")&&(!N.call(e,"callee")||A.call(e)==o)}var Q=Array.isArray;function J(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}(e.length)&&!ee(e)}function ee(e){var t=te(e)?A.call(e):"";return t==a||t==s}function te(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function ne(e){return!!e&&"object"==typeof e}function re(e){return J(e)?function(e,t){var n=Q(e)||X(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],r=n.length,i=!!r;for(var o in e)!t&&!O.call(e,o)||i&&("length"==o||Y(o,r))||n.push(o);return n}(e,!0):function(e){if(!te(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t,n,r=(n=(t=e)&&t.constructor,t===("function"==typeof n&&n.prototype||E)),i=[];for(var o in e)("constructor"!=o||!r&&O.call(e,o))&&i.push(o);return i}(e)}var ie,oe,ae=(ie=function(e,t){return null==e?{}:(t=p(H(t,1),K),function(e,t){return function(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var a=t[r],s=e[a];n(0,a)&&(o[a]=s)}return o}(e=Object(e),t,(function(t,n){return n in e}))}(e,function(e,t,n,r){var i=-1,o=f,a=!0,s=e.length,l=[],c=t.length;if(!s)return l;t.length>=200&&(o=v,a=!1,t=new F(t));e:for(;++i<s;){var u=e[i],d=u;if(u=0!==u?u:0,a&&d==d){for(var h=c;h--;)if(t[h]===d)continue e;l.push(u)}else o(t,d,r)||l.push(u)}return l}(function(e){return function(e,t,n){var r=t(e);return Q(e)?r:m(r,n(e))}(e,re,G)}(e),t)))},oe=P(void 0===oe?ie.length-1:oe,0),function(){for(var e=arguments,t=-1,n=P(e.length-oe,0),r=Array(n);++t<n;)r[t]=e[oe+t];t=-1;for(var i=Array(oe+1);++t<oe;)i[t]=e[t];return i[oe]=r,function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(ie,this,i)});function se(){return[]}e.exports=ae},8262:(e,t,n)=>{"use strict";var r=n(3586);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},3980:(e,t,n)=>{e.exports=n(8262)()},3586:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},2967:(e,t,n)=>{"use strict";var r=n(7900),i=n(4616);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=new Set,s={};function l(e,t){c(e,t),c(e+"Capture",t)}function c(e,t){for(s[e]=t,e=0;e<t.length;e++)a.add(t[e])}var u=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),d=Object.prototype.hasOwnProperty,h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,f={},p={};function m(e,t,n,r,i,o,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var g={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){g[e]=new m(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];g[t]=new m(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){g[e]=new m(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){g[e]=new m(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){g[e]=new m(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){g[e]=new m(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){g[e]=new m(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){g[e]=new m(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){g[e]=new m(e,5,!1,e.toLowerCase(),null,!1,!1)}));var v=/[\-:]([a-z])/g;function y(e){return e[1].toUpperCase()}function b(e,t,n,r){var i=g.hasOwnProperty(t)?g[t]:null;(null!==i?0!==i.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!d.call(p,e)||!d.call(f,e)&&(h.test(e)?p[e]=!0:(f[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(v,y);g[t]=new m(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(v,y);g[t]=new m(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(v,y);g[t]=new m(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){g[e]=new m(e,1,!1,e.toLowerCase(),null,!1,!1)})),g.xlinkHref=new m("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){g[e]=new m(e,1,!1,e.toLowerCase(),null,!0,!0)}));var w=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,_=Symbol.for("react.element"),E=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),O=Symbol.for("react.provider"),A=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),k=Symbol.for("react.suspense"),M=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),D=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var R=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var L=Symbol.iterator;function P(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=L&&e[L]||e["@@iterator"])?e:null}var I,$=Object.assign;function z(e){if(void 0===I)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);I=t&&t[1]||""}return"\n"+I+e}var B=!1;function j(e,t){if(!e||B)return"";B=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var i=t.stack.split("\n"),o=r.stack.split("\n"),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(1!==a||1!==s)do{if(a--,0>--s||i[a]!==o[s]){var l="\n"+i[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=a&&0<=s);break}}}finally{B=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?z(e):""}function F(e){switch(e.tag){case 5:return z(e.type);case 16:return z("Lazy");case 13:return z("Suspense");case 19:return z("SuspenseList");case 0:case 2:case 15:return j(e.type,!1);case 11:return j(e.type.render,!1);case 1:return j(e.type,!0);default:return""}}function U(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case x:return"Fragment";case E:return"Portal";case T:return"Profiler";case S:return"StrictMode";case k:return"Suspense";case M:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case A:return(e.displayName||"Context")+".Consumer";case O:return(e._context.displayName||"Context")+".Provider";case C:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case N:return null!==(t=e.displayName||null)?t:U(e.type)||"Memo";case D:t=e._payload,e=e._init;try{return U(e(t))}catch(e){}}return null}function H(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return U(t);case 8:return t===S?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function V(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function Z(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function W(e){e._valueTracker||(e._valueTracker=function(e){var t=Z(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function G(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Z(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function q(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Y(e,t){var n=t.checked;return $({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function K(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=V(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function X(e,t){null!=(t=t.checked)&&b(e,"checked",t,!1)}function Q(e,t){X(e,t);var n=V(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,n):t.hasOwnProperty("defaultValue")&&ee(e,t.type,V(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function J(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ee(e,t,n){"number"===t&&q(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var te=Array.isArray;function ne(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+V(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function re(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(o(91));return $({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ie(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(o(92));if(te(n)){if(1<n.length)throw Error(o(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:V(n)}}function oe(e,t){var n=V(t.value),r=V(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ae(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function se(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function le(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?se(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ce,ue,de=(ue=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ce=ce||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ce.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ue(e,t)}))}:ue);function he(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var fe={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},pe=["Webkit","ms","Moz","O"];function me(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||fe.hasOwnProperty(e)&&fe[e]?(""+t).trim():t+"px"}function ge(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=me(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(fe).forEach((function(e){pe.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),fe[t]=fe[e]}))}));var ve=$({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ye(e,t){if(t){if(ve[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(o(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(o(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(o(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(o(62))}}function be(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var we=null;function _e(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Ee=null,xe=null,Se=null;function Te(e){if(e=bi(e)){if("function"!=typeof Ee)throw Error(o(280));var t=e.stateNode;t&&(t=_i(t),Ee(e.stateNode,e.type,t))}}function Oe(e){xe?Se?Se.push(e):Se=[e]:xe=e}function Ae(){if(xe){var e=xe,t=Se;if(Se=xe=null,Te(e),t)for(e=0;e<t.length;e++)Te(t[e])}}function Ce(e,t){return e(t)}function ke(){}var Me=!1;function Ne(e,t,n){if(Me)return e(t,n);Me=!0;try{return Ce(e,t,n)}finally{Me=!1,(null!==xe||null!==Se)&&(ke(),Ae())}}function De(e,t){var n=e.stateNode;if(null===n)return null;var r=_i(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(o(231,t,typeof n));return n}var Re=!1;if(u)try{var Le={};Object.defineProperty(Le,"passive",{get:function(){Re=!0}}),window.addEventListener("test",Le,Le),window.removeEventListener("test",Le,Le)}catch(ue){Re=!1}function Pe(e,t,n,r,i,o,a,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(e){this.onError(e)}}var Ie=!1,$e=null,ze=!1,Be=null,je={onError:function(e){Ie=!0,$e=e}};function Fe(e,t,n,r,i,o,a,s,l){Ie=!1,$e=null,Pe.apply(je,arguments)}function Ue(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function He(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null}function Ve(e){if(Ue(e)!==e)throw Error(o(188))}function Ze(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=Ue(e)))throw Error(o(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var a=i.alternate;if(null===a){if(null!==(r=i.return)){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return Ve(i),e;if(a===r)return Ve(i),t;a=a.sibling}throw Error(o(188))}if(n.return!==r.return)n=i,r=a;else{for(var s=!1,l=i.child;l;){if(l===n){s=!0,n=i,r=a;break}if(l===r){s=!0,r=i,n=a;break}l=l.sibling}if(!s){for(l=a.child;l;){if(l===n){s=!0,n=a,r=i;break}if(l===r){s=!0,r=a,n=i;break}l=l.sibling}if(!s)throw Error(o(189))}}if(n.alternate!==r)throw Error(o(190))}if(3!==n.tag)throw Error(o(188));return n.stateNode.current===n?e:t}(e))?We(e):null}function We(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=We(e);if(null!==t)return t;e=e.sibling}return null}var Ge=i.unstable_scheduleCallback,qe=i.unstable_cancelCallback,Ye=i.unstable_shouldYield,Ke=i.unstable_requestPaint,Xe=i.unstable_now,Qe=i.unstable_getCurrentPriorityLevel,Je=i.unstable_ImmediatePriority,et=i.unstable_UserBlockingPriority,tt=i.unstable_NormalPriority,nt=i.unstable_LowPriority,rt=i.unstable_IdlePriority,it=null,ot=null,at=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(st(e)/lt|0)|0},st=Math.log,lt=Math.LN2,ct=64,ut=4194304;function dt(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ht(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=268435455&n;if(0!==a){var s=a&~i;0!==s?r=dt(s):0!=(o&=a)&&(r=dt(o))}else 0!=(a=n&~i)?r=dt(a):0!==o&&(r=dt(o));if(0===r)return 0;if(0!==t&&t!==r&&0==(t&i)&&((i=r&-r)>=(o=t&-t)||16===i&&0!=(4194240&o)))return t;if(0!=(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-at(t)),r|=e[n],t&=~i;return r}function ft(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function pt(e){return 0!=(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function mt(){var e=ct;return 0==(4194240&(ct<<=1))&&(ct=64),e}function gt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function vt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-at(t)]=n}function yt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-at(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var bt=0;function wt(e){return 1<(e&=-e)?4<e?0!=(268435455&e)?16:536870912:4:1}var _t,Et,xt,St,Tt,Ot=!1,At=[],Ct=null,kt=null,Mt=null,Nt=new Map,Dt=new Map,Rt=[],Lt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Pt(e,t){switch(e){case"focusin":case"focusout":Ct=null;break;case"dragenter":case"dragleave":kt=null;break;case"mouseover":case"mouseout":Mt=null;break;case"pointerover":case"pointerout":Nt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Dt.delete(t.pointerId)}}function It(e,t,n,r,i,o){return null===e||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},null!==t&&null!==(t=bi(t))&&Et(t),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function $t(e){var t=yi(e.target);if(null!==t){var n=Ue(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=He(n)))return e.blockedOn=t,void Tt(e.priority,(function(){xt(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function zt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Yt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=bi(n))&&Et(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);we=r,n.target.dispatchEvent(r),we=null,t.shift()}return!0}function Bt(e,t,n){zt(e)&&n.delete(t)}function jt(){Ot=!1,null!==Ct&&zt(Ct)&&(Ct=null),null!==kt&&zt(kt)&&(kt=null),null!==Mt&&zt(Mt)&&(Mt=null),Nt.forEach(Bt),Dt.forEach(Bt)}function Ft(e,t){e.blockedOn===t&&(e.blockedOn=null,Ot||(Ot=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,jt)))}function Ut(e){function t(t){return Ft(t,e)}if(0<At.length){Ft(At[0],e);for(var n=1;n<At.length;n++){var r=At[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Ct&&Ft(Ct,e),null!==kt&&Ft(kt,e),null!==Mt&&Ft(Mt,e),Nt.forEach(t),Dt.forEach(t),n=0;n<Rt.length;n++)(r=Rt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Rt.length&&null===(n=Rt[0]).blockedOn;)$t(n),null===n.blockedOn&&Rt.shift()}var Ht=w.ReactCurrentBatchConfig,Vt=!0;function Zt(e,t,n,r){var i=bt,o=Ht.transition;Ht.transition=null;try{bt=1,Gt(e,t,n,r)}finally{bt=i,Ht.transition=o}}function Wt(e,t,n,r){var i=bt,o=Ht.transition;Ht.transition=null;try{bt=4,Gt(e,t,n,r)}finally{bt=i,Ht.transition=o}}function Gt(e,t,n,r){if(Vt){var i=Yt(e,t,n,r);if(null===i)Vr(e,t,r,qt,n),Pt(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return Ct=It(Ct,e,t,n,r,i),!0;case"dragenter":return kt=It(kt,e,t,n,r,i),!0;case"mouseover":return Mt=It(Mt,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return Nt.set(o,It(Nt.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,Dt.set(o,It(Dt.get(o)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(Pt(e,r),4&t&&-1<Lt.indexOf(e)){for(;null!==i;){var o=bi(i);if(null!==o&&_t(o),null===(o=Yt(e,t,n,r))&&Vr(e,t,r,qt,n),o===i)break;i=o}null!==i&&r.stopPropagation()}else Vr(e,t,r,null,n)}}var qt=null;function Yt(e,t,n,r){if(qt=null,null!==(e=yi(e=_e(r))))if(null===(t=Ue(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=He(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return qt=e,null}function Kt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Qe()){case Je:return 1;case et:return 4;case tt:case nt:return 16;case rt:return 536870912;default:return 16}default:return 16}}var Xt=null,Qt=null,Jt=null;function en(){if(Jt)return Jt;var e,t,n=Qt,r=n.length,i="value"in Xt?Xt.value:Xt.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===i[o-t];t++);return Jt=i.slice(e,1<t?1-t:void 0)}function tn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function nn(){return!0}function rn(){return!1}function on(e){function t(t,n,r,i,o){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(i):i[a]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?nn:rn,this.isPropagationStopped=rn,this}return $(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=nn)},persist:function(){},isPersistent:nn}),t}var an,sn,ln,cn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},un=on(cn),dn=$({},cn,{view:0,detail:0}),hn=on(dn),fn=$({},dn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Tn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ln&&(ln&&"mousemove"===e.type?(an=e.screenX-ln.screenX,sn=e.screenY-ln.screenY):sn=an=0,ln=e),an)},movementY:function(e){return"movementY"in e?e.movementY:sn}}),pn=on(fn),mn=on($({},fn,{dataTransfer:0})),gn=on($({},dn,{relatedTarget:0})),vn=on($({},cn,{animationName:0,elapsedTime:0,pseudoElement:0})),yn=$({},cn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),bn=on(yn),wn=on($({},cn,{data:0})),_n={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},En={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},xn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Sn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=xn[e])&&!!t[e]}function Tn(){return Sn}var On=$({},dn,{key:function(e){if(e.key){var t=_n[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=tn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?En[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Tn,charCode:function(e){return"keypress"===e.type?tn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?tn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),An=on(On),Cn=on($({},fn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),kn=on($({},dn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Tn})),Mn=on($({},cn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Nn=$({},fn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Dn=on(Nn),Rn=[9,13,27,32],Ln=u&&"CompositionEvent"in window,Pn=null;u&&"documentMode"in document&&(Pn=document.documentMode);var In=u&&"TextEvent"in window&&!Pn,$n=u&&(!Ln||Pn&&8<Pn&&11>=Pn),zn=String.fromCharCode(32),Bn=!1;function jn(e,t){switch(e){case"keyup":return-1!==Rn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Fn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Un=!1,Hn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Vn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Hn[e.type]:"textarea"===t}function Zn(e,t,n,r){Oe(r),0<(t=Wr(t,"onChange")).length&&(n=new un("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Wn=null,Gn=null;function qn(e){zr(e,0)}function Yn(e){if(G(wi(e)))return e}function Kn(e,t){if("change"===e)return t}var Xn=!1;if(u){var Qn;if(u){var Jn="oninput"in document;if(!Jn){var er=document.createElement("div");er.setAttribute("oninput","return;"),Jn="function"==typeof er.oninput}Qn=Jn}else Qn=!1;Xn=Qn&&(!document.documentMode||9<document.documentMode)}function tr(){Wn&&(Wn.detachEvent("onpropertychange",nr),Gn=Wn=null)}function nr(e){if("value"===e.propertyName&&Yn(Gn)){var t=[];Zn(t,Gn,e,_e(e)),Ne(qn,t)}}function rr(e,t,n){"focusin"===e?(tr(),Gn=n,(Wn=t).attachEvent("onpropertychange",nr)):"focusout"===e&&tr()}function ir(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Yn(Gn)}function or(e,t){if("click"===e)return Yn(t)}function ar(e,t){if("input"===e||"change"===e)return Yn(t)}var sr="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function lr(e,t){if(sr(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!d.call(t,i)||!sr(e[i],t[i]))return!1}return!0}function cr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ur(e,t){var n,r=cr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=cr(r)}}function dr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?dr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function hr(){for(var e=window,t=q();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=q((e=t.contentWindow).document)}return t}function fr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function pr(e){var t=hr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&dr(n.ownerDocument.documentElement,n)){if(null!==r&&fr(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=void 0===r.end?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=ur(n,o);var a=ur(n,r);i&&a&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var mr=u&&"documentMode"in document&&11>=document.documentMode,gr=null,vr=null,yr=null,br=!1;function wr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;br||null==gr||gr!==q(r)||(r="selectionStart"in(r=gr)&&fr(r)?{start:r.selectionStart,end:r.selectionEnd}:{anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},yr&&lr(yr,r)||(yr=r,0<(r=Wr(vr,"onSelect")).length&&(t=new un("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=gr)))}function _r(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Er={animationend:_r("Animation","AnimationEnd"),animationiteration:_r("Animation","AnimationIteration"),animationstart:_r("Animation","AnimationStart"),transitionend:_r("Transition","TransitionEnd")},xr={},Sr={};function Tr(e){if(xr[e])return xr[e];if(!Er[e])return e;var t,n=Er[e];for(t in n)if(n.hasOwnProperty(t)&&t in Sr)return xr[e]=n[t];return e}u&&(Sr=document.createElement("div").style,"AnimationEvent"in window||(delete Er.animationend.animation,delete Er.animationiteration.animation,delete Er.animationstart.animation),"TransitionEvent"in window||delete Er.transitionend.transition);var Or=Tr("animationend"),Ar=Tr("animationiteration"),Cr=Tr("animationstart"),kr=Tr("transitionend"),Mr=new Map,Nr="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Dr(e,t){Mr.set(e,t),l(t,[e])}for(var Rr=0;Rr<Nr.length;Rr++){var Lr=Nr[Rr];Dr(Lr.toLowerCase(),"on"+(Lr[0].toUpperCase()+Lr.slice(1)))}Dr(Or,"onAnimationEnd"),Dr(Ar,"onAnimationIteration"),Dr(Cr,"onAnimationStart"),Dr("dblclick","onDoubleClick"),Dr("focusin","onFocus"),Dr("focusout","onBlur"),Dr(kr,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Pr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Ir=new Set("cancel close invalid load scroll toggle".split(" ").concat(Pr));function $r(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,a,s,l,c){if(Fe.apply(this,arguments),Ie){if(!Ie)throw Error(o(198));var u=$e;Ie=!1,$e=null,ze||(ze=!0,Be=u)}}(r,t,void 0,e),e.currentTarget=null}function zr(e,t){t=0!=(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==o&&i.isPropagationStopped())break e;$r(i,s,c),o=l}else for(a=0;a<r.length;a++){if(l=(s=r[a]).instance,c=s.currentTarget,s=s.listener,l!==o&&i.isPropagationStopped())break e;$r(i,s,c),o=l}}}if(ze)throw e=Be,ze=!1,Be=null,e}function Br(e,t){var n=t[mi];void 0===n&&(n=t[mi]=new Set);var r=e+"__bubble";n.has(r)||(Hr(t,e,2,!1),n.add(r))}function jr(e,t,n){var r=0;t&&(r|=4),Hr(n,e,r,t)}var Fr="_reactListening"+Math.random().toString(36).slice(2);function Ur(e){if(!e[Fr]){e[Fr]=!0,a.forEach((function(t){"selectionchange"!==t&&(Ir.has(t)||jr(t,!1,e),jr(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Fr]||(t[Fr]=!0,jr("selectionchange",!1,t))}}function Hr(e,t,n,r){switch(Kt(t)){case 1:var i=Zt;break;case 4:i=Wt;break;default:i=Gt}n=i.bind(null,t,n,e),i=void 0,!Re||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Vr(e,t,n,r,i){var o=r;if(0==(1&t)&&0==(2&t)&&null!==r)e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===i||8===s.nodeType&&s.parentNode===i)break;if(4===a)for(a=r.return;null!==a;){var l=a.tag;if((3===l||4===l)&&((l=a.stateNode.containerInfo)===i||8===l.nodeType&&l.parentNode===i))return;a=a.return}for(;null!==s;){if(null===(a=yi(s)))return;if(5===(l=a.tag)||6===l){r=o=a;continue e}s=s.parentNode}}r=r.return}Ne((function(){var r=o,i=_e(n),a=[];e:{var s=Mr.get(e);if(void 0!==s){var l=un,c=e;switch(e){case"keypress":if(0===tn(n))break e;case"keydown":case"keyup":l=An;break;case"focusin":c="focus",l=gn;break;case"focusout":c="blur",l=gn;break;case"beforeblur":case"afterblur":l=gn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=pn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=mn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=kn;break;case Or:case Ar:case Cr:l=vn;break;case kr:l=Mn;break;case"scroll":l=hn;break;case"wheel":l=Dn;break;case"copy":case"cut":case"paste":l=bn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=Cn}var u=0!=(4&t),d=!u&&"scroll"===e,h=u?null!==s?s+"Capture":null:s;u=[];for(var f,p=r;null!==p;){var m=(f=p).stateNode;if(5===f.tag&&null!==m&&(f=m,null!==h&&null!=(m=De(p,h))&&u.push(Zr(p,m,f))),d)break;p=p.return}0<u.length&&(s=new l(s,c,null,n,i),a.push({event:s,listeners:u}))}}if(0==(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===we||!(c=n.relatedTarget||n.fromElement)||!yi(c)&&!c[pi])&&(l||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(c=(c=n.relatedTarget||n.toElement)?yi(c):null)&&(c!==(d=Ue(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(l=null,c=r),l!==c)){if(u=pn,m="onMouseLeave",h="onMouseEnter",p="mouse","pointerout"!==e&&"pointerover"!==e||(u=Cn,m="onPointerLeave",h="onPointerEnter",p="pointer"),d=null==l?s:wi(l),f=null==c?s:wi(c),(s=new u(m,p+"leave",l,n,i)).target=d,s.relatedTarget=f,m=null,yi(i)===r&&((u=new u(h,p+"enter",c,n,i)).target=f,u.relatedTarget=d,m=u),d=m,l&&c)e:{for(h=c,p=0,f=u=l;f;f=Gr(f))p++;for(f=0,m=h;m;m=Gr(m))f++;for(;0<p-f;)u=Gr(u),p--;for(;0<f-p;)h=Gr(h),f--;for(;p--;){if(u===h||null!==h&&u===h.alternate)break e;u=Gr(u),h=Gr(h)}u=null}else u=null;null!==l&&qr(a,s,l,u,!1),null!==c&&null!==d&&qr(a,d,c,u,!0)}if("select"===(l=(s=r?wi(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var g=Kn;else if(Vn(s))if(Xn)g=ar;else{g=ir;var v=rr}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(g=or);switch(g&&(g=g(e,r))?Zn(a,g,n,i):(v&&v(e,s,r),"focusout"===e&&(v=s._wrapperState)&&v.controlled&&"number"===s.type&&ee(s,"number",s.value)),v=r?wi(r):window,e){case"focusin":(Vn(v)||"true"===v.contentEditable)&&(gr=v,vr=r,yr=null);break;case"focusout":yr=vr=gr=null;break;case"mousedown":br=!0;break;case"contextmenu":case"mouseup":case"dragend":br=!1,wr(a,n,i);break;case"selectionchange":if(mr)break;case"keydown":case"keyup":wr(a,n,i)}var y;if(Ln)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Un?jn(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&($n&&"ko"!==n.locale&&(Un||"onCompositionStart"!==b?"onCompositionEnd"===b&&Un&&(y=en()):(Qt="value"in(Xt=i)?Xt.value:Xt.textContent,Un=!0)),0<(v=Wr(r,b)).length&&(b=new wn(b,e,null,n,i),a.push({event:b,listeners:v}),(y||null!==(y=Fn(n)))&&(b.data=y))),(y=In?function(e,t){switch(e){case"compositionend":return Fn(t);case"keypress":return 32!==t.which?null:(Bn=!0,zn);case"textInput":return(e=t.data)===zn&&Bn?null:e;default:return null}}(e,n):function(e,t){if(Un)return"compositionend"===e||!Ln&&jn(e,t)?(e=en(),Jt=Qt=Xt=null,Un=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return $n&&"ko"!==t.locale?null:t.data}}(e,n))&&0<(r=Wr(r,"onBeforeInput")).length&&(i=new wn("onBeforeInput","beforeinput",null,n,i),a.push({event:i,listeners:r}),i.data=y)}zr(a,t)}))}function Zr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Wr(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,o=i.stateNode;5===i.tag&&null!==o&&(i=o,null!=(o=De(e,n))&&r.unshift(Zr(e,o,i)),null!=(o=De(e,t))&&r.push(Zr(e,o,i))),e=e.return}return r}function Gr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function qr(e,t,n,r,i){for(var o=t._reactName,a=[];null!==n&&n!==r;){var s=n,l=s.alternate,c=s.stateNode;if(null!==l&&l===r)break;5===s.tag&&null!==c&&(s=c,i?null!=(l=De(n,o))&&a.unshift(Zr(n,l,s)):i||null!=(l=De(n,o))&&a.push(Zr(n,l,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var Yr=/\r\n?/g,Kr=/\u0000|\uFFFD/g;function Xr(e){return("string"==typeof e?e:""+e).replace(Yr,"\n").replace(Kr,"")}function Qr(e,t,n){if(t=Xr(t),Xr(e)!==t&&n)throw Error(o(425))}function Jr(){}var ei=null,ti=null;function ni(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ri="function"==typeof setTimeout?setTimeout:void 0,ii="function"==typeof clearTimeout?clearTimeout:void 0,oi="function"==typeof Promise?Promise:void 0,ai="function"==typeof queueMicrotask?queueMicrotask:void 0!==oi?function(e){return oi.resolve(null).then(e).catch(si)}:ri;function si(e){setTimeout((function(){throw e}))}function li(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&8===i.nodeType)if("/$"===(n=i.data)){if(0===r)return e.removeChild(i),void Ut(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);Ut(t)}function ci(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function ui(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var di=Math.random().toString(36).slice(2),hi="__reactFiber$"+di,fi="__reactProps$"+di,pi="__reactContainer$"+di,mi="__reactEvents$"+di,gi="__reactListeners$"+di,vi="__reactHandles$"+di;function yi(e){var t=e[hi];if(t)return t;for(var n=e.parentNode;n;){if(t=n[pi]||n[hi]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=ui(e);null!==e;){if(n=e[hi])return n;e=ui(e)}return t}n=(e=n).parentNode}return null}function bi(e){return!(e=e[hi]||e[pi])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function wi(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(o(33))}function _i(e){return e[fi]||null}var Ei=[],xi=-1;function Si(e){return{current:e}}function Ti(e){0>xi||(e.current=Ei[xi],Ei[xi]=null,xi--)}function Oi(e,t){xi++,Ei[xi]=e.current,e.current=t}var Ai={},Ci=Si(Ai),ki=Si(!1),Mi=Ai;function Ni(e,t){var n=e.type.contextTypes;if(!n)return Ai;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Di(e){return null!=e.childContextTypes}function Ri(){Ti(ki),Ti(Ci)}function Li(e,t,n){if(Ci.current!==Ai)throw Error(o(168));Oi(Ci,t),Oi(ki,n)}function Pi(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in t))throw Error(o(108,H(e)||"Unknown",i));return $({},n,r)}function Ii(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ai,Mi=Ci.current,Oi(Ci,e),Oi(ki,ki.current),!0}function $i(e,t,n){var r=e.stateNode;if(!r)throw Error(o(169));n?(e=Pi(e,t,Mi),r.__reactInternalMemoizedMergedChildContext=e,Ti(ki),Ti(Ci),Oi(Ci,e)):Ti(ki),Oi(ki,n)}var zi=null,Bi=!1,ji=!1;function Fi(e){null===zi?zi=[e]:zi.push(e)}function Ui(){if(!ji&&null!==zi){ji=!0;var e=0,t=bt;try{var n=zi;for(bt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}zi=null,Bi=!1}catch(t){throw null!==zi&&(zi=zi.slice(e+1)),Ge(Je,Ui),t}finally{bt=t,ji=!1}}return null}var Hi=[],Vi=0,Zi=null,Wi=0,Gi=[],qi=0,Yi=null,Ki=1,Xi="";function Qi(e,t){Hi[Vi++]=Wi,Hi[Vi++]=Zi,Zi=e,Wi=t}function Ji(e,t,n){Gi[qi++]=Ki,Gi[qi++]=Xi,Gi[qi++]=Yi,Yi=e;var r=Ki;e=Xi;var i=32-at(r)-1;r&=~(1<<i),n+=1;var o=32-at(t)+i;if(30<o){var a=i-i%5;o=(r&(1<<a)-1).toString(32),r>>=a,i-=a,Ki=1<<32-at(t)+i|n<<i|r,Xi=o+e}else Ki=1<<o|n<<i|r,Xi=e}function eo(e){null!==e.return&&(Qi(e,1),Ji(e,1,0))}function to(e){for(;e===Zi;)Zi=Hi[--Vi],Hi[Vi]=null,Wi=Hi[--Vi],Hi[Vi]=null;for(;e===Yi;)Yi=Gi[--qi],Gi[qi]=null,Xi=Gi[--qi],Gi[qi]=null,Ki=Gi[--qi],Gi[qi]=null}var no=null,ro=null,io=!1,oo=null;function ao(e,t){var n=Nc(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function so(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,no=e,ro=ci(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,no=e,ro=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Yi?{id:Ki,overflow:Xi}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Nc(18,null,null,0)).stateNode=t,n.return=e,e.child=n,no=e,ro=null,!0);default:return!1}}function lo(e){return 0!=(1&e.mode)&&0==(128&e.flags)}function co(e){if(io){var t=ro;if(t){var n=t;if(!so(e,t)){if(lo(e))throw Error(o(418));t=ci(n.nextSibling);var r=no;t&&so(e,t)?ao(r,n):(e.flags=-4097&e.flags|2,io=!1,no=e)}}else{if(lo(e))throw Error(o(418));e.flags=-4097&e.flags|2,io=!1,no=e}}}function uo(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;no=e}function ho(e){if(e!==no)return!1;if(!io)return uo(e),io=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!ni(e.type,e.memoizedProps)),t&&(t=ro)){if(lo(e))throw fo(),Error(o(418));for(;t;)ao(e,t),t=ci(t.nextSibling)}if(uo(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(o(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){ro=ci(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}ro=null}}else ro=no?ci(e.stateNode.nextSibling):null;return!0}function fo(){for(var e=ro;e;)e=ci(e.nextSibling)}function po(){ro=no=null,io=!1}function mo(e){null===oo?oo=[e]:oo.push(e)}var go=w.ReactCurrentBatchConfig;function vo(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(o(309));var r=n.stateNode}if(!r)throw Error(o(147,e));var i=r,a=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===a?t.ref:(t=function(e){var t=i.refs;null===e?delete t[a]:t[a]=e},t._stringRef=a,t)}if("string"!=typeof e)throw Error(o(284));if(!n._owner)throw Error(o(290,e))}return e}function yo(e,t){throw e=Object.prototype.toString.call(t),Error(o(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function bo(e){return(0,e._init)(e._payload)}function wo(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=Rc(e,t)).index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function s(t){return e&&null===t.alternate&&(t.flags|=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=$c(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function c(e,t,n,r){var o=n.type;return o===x?d(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===o||"object"==typeof o&&null!==o&&o.$$typeof===D&&bo(o)===t.type)?((r=i(t,n.props)).ref=vo(e,t,n),r.return=e,r):((r=Lc(n.type,n.key,n.props,null,e.mode,r)).ref=vo(e,t,n),r.return=e,r)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=zc(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function d(e,t,n,r,o){return null===t||7!==t.tag?((t=Pc(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function h(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=$c(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case _:return(n=Lc(t.type,t.key,t.props,null,e.mode,n)).ref=vo(e,null,t),n.return=e,n;case E:return(t=zc(t,e.mode,n)).return=e,t;case D:return h(e,(0,t._init)(t._payload),n)}if(te(t)||P(t))return(t=Pc(t,e.mode,n,null)).return=e,t;yo(e,t)}return null}function f(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==i?null:l(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case _:return n.key===i?c(e,t,n,r):null;case E:return n.key===i?u(e,t,n,r):null;case D:return f(e,t,(i=n._init)(n._payload),r)}if(te(n)||P(n))return null!==i?null:d(e,t,n,r,null);yo(e,n)}return null}function p(e,t,n,r,i){if("string"==typeof r&&""!==r||"number"==typeof r)return l(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case _:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i);case E:return u(t,e=e.get(null===r.key?n:r.key)||null,r,i);case D:return p(e,t,n,(0,r._init)(r._payload),i)}if(te(r)||P(r))return d(t,e=e.get(n)||null,r,i,null);yo(t,r)}return null}function m(i,o,s,l){for(var c=null,u=null,d=o,m=o=0,g=null;null!==d&&m<s.length;m++){d.index>m?(g=d,d=null):g=d.sibling;var v=f(i,d,s[m],l);if(null===v){null===d&&(d=g);break}e&&d&&null===v.alternate&&t(i,d),o=a(v,o,m),null===u?c=v:u.sibling=v,u=v,d=g}if(m===s.length)return n(i,d),io&&Qi(i,m),c;if(null===d){for(;m<s.length;m++)null!==(d=h(i,s[m],l))&&(o=a(d,o,m),null===u?c=d:u.sibling=d,u=d);return io&&Qi(i,m),c}for(d=r(i,d);m<s.length;m++)null!==(g=p(d,i,m,s[m],l))&&(e&&null!==g.alternate&&d.delete(null===g.key?m:g.key),o=a(g,o,m),null===u?c=g:u.sibling=g,u=g);return e&&d.forEach((function(e){return t(i,e)})),io&&Qi(i,m),c}function g(i,s,l,c){var u=P(l);if("function"!=typeof u)throw Error(o(150));if(null==(l=u.call(l)))throw Error(o(151));for(var d=u=null,m=s,g=s=0,v=null,y=l.next();null!==m&&!y.done;g++,y=l.next()){m.index>g?(v=m,m=null):v=m.sibling;var b=f(i,m,y.value,c);if(null===b){null===m&&(m=v);break}e&&m&&null===b.alternate&&t(i,m),s=a(b,s,g),null===d?u=b:d.sibling=b,d=b,m=v}if(y.done)return n(i,m),io&&Qi(i,g),u;if(null===m){for(;!y.done;g++,y=l.next())null!==(y=h(i,y.value,c))&&(s=a(y,s,g),null===d?u=y:d.sibling=y,d=y);return io&&Qi(i,g),u}for(m=r(i,m);!y.done;g++,y=l.next())null!==(y=p(m,i,g,y.value,c))&&(e&&null!==y.alternate&&m.delete(null===y.key?g:y.key),s=a(y,s,g),null===d?u=y:d.sibling=y,d=y);return e&&m.forEach((function(e){return t(i,e)})),io&&Qi(i,g),u}return function e(r,o,a,l){if("object"==typeof a&&null!==a&&a.type===x&&null===a.key&&(a=a.props.children),"object"==typeof a&&null!==a){switch(a.$$typeof){case _:e:{for(var c=a.key,u=o;null!==u;){if(u.key===c){if((c=a.type)===x){if(7===u.tag){n(r,u.sibling),(o=i(u,a.props.children)).return=r,r=o;break e}}else if(u.elementType===c||"object"==typeof c&&null!==c&&c.$$typeof===D&&bo(c)===u.type){n(r,u.sibling),(o=i(u,a.props)).ref=vo(r,u,a),o.return=r,r=o;break e}n(r,u);break}t(r,u),u=u.sibling}a.type===x?((o=Pc(a.props.children,r.mode,l,a.key)).return=r,r=o):((l=Lc(a.type,a.key,a.props,null,r.mode,l)).ref=vo(r,o,a),l.return=r,r=l)}return s(r);case E:e:{for(u=a.key;null!==o;){if(o.key===u){if(4===o.tag&&o.stateNode.containerInfo===a.containerInfo&&o.stateNode.implementation===a.implementation){n(r,o.sibling),(o=i(o,a.children||[])).return=r,r=o;break e}n(r,o);break}t(r,o),o=o.sibling}(o=zc(a,r.mode,l)).return=r,r=o}return s(r);case D:return e(r,o,(u=a._init)(a._payload),l)}if(te(a))return m(r,o,a,l);if(P(a))return g(r,o,a,l);yo(r,a)}return"string"==typeof a&&""!==a||"number"==typeof a?(a=""+a,null!==o&&6===o.tag?(n(r,o.sibling),(o=i(o,a)).return=r,r=o):(n(r,o),(o=$c(a,r.mode,l)).return=r,r=o),s(r)):n(r,o)}}var _o=wo(!0),Eo=wo(!1),xo=Si(null),So=null,To=null,Oo=null;function Ao(){Oo=To=So=null}function Co(e){var t=xo.current;Ti(xo),e._currentValue=t}function ko(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Mo(e,t){So=e,Oo=To=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&t)&&(bs=!0),e.firstContext=null)}function No(e){var t=e._currentValue;if(Oo!==e)if(e={context:e,memoizedValue:t,next:null},null===To){if(null===So)throw Error(o(308));To=e,So.dependencies={lanes:0,firstContext:e}}else To=To.next=e;return t}var Do=null;function Ro(e){null===Do?Do=[e]:Do.push(e)}function Lo(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,Ro(t)):(n.next=i.next,i.next=n),t.interleaved=n,Po(e,r)}function Po(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Io=!1;function $o(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function zo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Bo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function jo(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!=(2&Cl)){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Po(e,n)}return null===(i=r.interleaved)?(t.next=t,Ro(r)):(t.next=i.next,i.next=t),r.interleaved=t,Po(e,n)}function Fo(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!=(4194240&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,yt(e,n)}}function Uo(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?i=o=a:o=o.next=a,n=n.next}while(null!==n);null===o?i=o=t:o=o.next=t}else i=o=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ho(e,t,n,r){var i=e.updateQueue;Io=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(null!==s){i.shared.pending=null;var l=s,c=l.next;l.next=null,null===a?o=c:a.next=c,a=l;var u=e.alternate;null!==u&&(s=(u=u.updateQueue).lastBaseUpdate)!==a&&(null===s?u.firstBaseUpdate=c:s.next=c,u.lastBaseUpdate=l)}if(null!==o){var d=i.baseState;for(a=0,u=c=l=null,s=o;;){var h=s.lane,f=s.eventTime;if((r&h)===h){null!==u&&(u=u.next={eventTime:f,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var p=e,m=s;switch(h=t,f=n,m.tag){case 1:if("function"==typeof(p=m.payload)){d=p.call(f,d,h);break e}d=p;break e;case 3:p.flags=-65537&p.flags|128;case 0:if(null==(h="function"==typeof(p=m.payload)?p.call(f,d,h):p))break e;d=$({},d,h);break e;case 2:Io=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(h=i.effects)?i.effects=[s]:h.push(s))}else f={eventTime:f,lane:h,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===u?(c=u=f,l=d):u=u.next=f,a|=h;if(null===(s=s.next)){if(null===(s=i.shared.pending))break;s=(h=s).next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}if(null===u&&(l=d),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,null!==(t=i.shared.interleaved)){i=t;do{a|=i.lane,i=i.next}while(i!==t)}else null===o&&(i.shared.lanes=0);Il|=a,e.lanes=a,e.memoizedState=d}}function Vo(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!=typeof i)throw Error(o(191,i));i.call(r)}}}var Zo={},Wo=Si(Zo),Go=Si(Zo),qo=Si(Zo);function Yo(e){if(e===Zo)throw Error(o(174));return e}function Ko(e,t){switch(Oi(qo,t),Oi(Go,e),Oi(Wo,Zo),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:le(null,"");break;default:t=le(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Ti(Wo),Oi(Wo,t)}function Xo(){Ti(Wo),Ti(Go),Ti(qo)}function Qo(e){Yo(qo.current);var t=Yo(Wo.current),n=le(t,e.type);t!==n&&(Oi(Go,e),Oi(Wo,n))}function Jo(e){Go.current===e&&(Ti(Wo),Ti(Go))}var ea=Si(0);function ta(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var na=[];function ra(){for(var e=0;e<na.length;e++)na[e]._workInProgressVersionPrimary=null;na.length=0}var ia=w.ReactCurrentDispatcher,oa=w.ReactCurrentBatchConfig,aa=0,sa=null,la=null,ca=null,ua=!1,da=!1,ha=0,fa=0;function pa(){throw Error(o(321))}function ma(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!sr(e[n],t[n]))return!1;return!0}function ga(e,t,n,r,i,a){if(aa=a,sa=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ia.current=null===e||null===e.memoizedState?Ja:es,e=n(r,i),da){a=0;do{if(da=!1,ha=0,25<=a)throw Error(o(301));a+=1,ca=la=null,t.updateQueue=null,ia.current=ts,e=n(r,i)}while(da)}if(ia.current=Qa,t=null!==la&&null!==la.next,aa=0,ca=la=sa=null,ua=!1,t)throw Error(o(300));return e}function va(){var e=0!==ha;return ha=0,e}function ya(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ca?sa.memoizedState=ca=e:ca=ca.next=e,ca}function ba(){if(null===la){var e=sa.alternate;e=null!==e?e.memoizedState:null}else e=la.next;var t=null===ca?sa.memoizedState:ca.next;if(null!==t)ca=t,la=e;else{if(null===e)throw Error(o(310));e={memoizedState:(la=e).memoizedState,baseState:la.baseState,baseQueue:la.baseQueue,queue:la.queue,next:null},null===ca?sa.memoizedState=ca=e:ca=ca.next=e}return ca}function wa(e,t){return"function"==typeof t?t(e):t}function _a(e){var t=ba(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=la,i=r.baseQueue,a=n.pending;if(null!==a){if(null!==i){var s=i.next;i.next=a.next,a.next=s}r.baseQueue=i=a,n.pending=null}if(null!==i){a=i.next,r=r.baseState;var l=s=null,c=null,u=a;do{var d=u.lane;if((aa&d)===d)null!==c&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var h={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};null===c?(l=c=h,s=r):c=c.next=h,sa.lanes|=d,Il|=d}u=u.next}while(null!==u&&u!==a);null===c?s=r:c.next=l,sr(r,t.memoizedState)||(bs=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=c,n.lastRenderedState=r}if(null!==(e=n.interleaved)){i=e;do{a=i.lane,sa.lanes|=a,Il|=a,i=i.next}while(i!==e)}else null===i&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Ea(e){var t=ba(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,a=t.memoizedState;if(null!==i){n.pending=null;var s=i=i.next;do{a=e(a,s.action),s=s.next}while(s!==i);sr(a,t.memoizedState)||(bs=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function xa(){}function Sa(e,t){var n=sa,r=ba(),i=t(),a=!sr(r.memoizedState,i);if(a&&(r.memoizedState=i,bs=!0),r=r.queue,Ia(Aa.bind(null,n,r,e),[e]),r.getSnapshot!==t||a||null!==ca&&1&ca.memoizedState.tag){if(n.flags|=2048,Na(9,Oa.bind(null,n,r,i,t),void 0,null),null===kl)throw Error(o(349));0!=(30&aa)||Ta(n,t,i)}return i}function Ta(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=sa.updateQueue)?(t={lastEffect:null,stores:null},sa.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Oa(e,t,n,r){t.value=n,t.getSnapshot=r,Ca(t)&&ka(e)}function Aa(e,t,n){return n((function(){Ca(t)&&ka(e)}))}function Ca(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!sr(e,n)}catch(e){return!0}}function ka(e){var t=Po(e,1);null!==t&&nc(t,e,1,-1)}function Ma(e){var t=ya();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:wa,lastRenderedState:e},t.queue=e,e=e.dispatch=qa.bind(null,sa,e),[t.memoizedState,e]}function Na(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=sa.updateQueue)?(t={lastEffect:null,stores:null},sa.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Da(){return ba().memoizedState}function Ra(e,t,n,r){var i=ya();sa.flags|=e,i.memoizedState=Na(1|t,n,void 0,void 0===r?null:r)}function La(e,t,n,r){var i=ba();r=void 0===r?null:r;var o=void 0;if(null!==la){var a=la.memoizedState;if(o=a.destroy,null!==r&&ma(r,a.deps))return void(i.memoizedState=Na(t,n,o,r))}sa.flags|=e,i.memoizedState=Na(1|t,n,o,r)}function Pa(e,t){return Ra(8390656,8,e,t)}function Ia(e,t){return La(2048,8,e,t)}function $a(e,t){return La(4,2,e,t)}function za(e,t){return La(4,4,e,t)}function Ba(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function ja(e,t,n){return n=null!=n?n.concat([e]):null,La(4,4,Ba.bind(null,t,e),n)}function Fa(){}function Ua(e,t){var n=ba();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ma(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ha(e,t){var n=ba();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ma(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Va(e,t,n){return 0==(21&aa)?(e.baseState&&(e.baseState=!1,bs=!0),e.memoizedState=n):(sr(n,t)||(n=mt(),sa.lanes|=n,Il|=n,e.baseState=!0),t)}function Za(e,t){var n=bt;bt=0!==n&&4>n?n:4,e(!0);var r=oa.transition;oa.transition={};try{e(!1),t()}finally{bt=n,oa.transition=r}}function Wa(){return ba().memoizedState}function Ga(e,t,n){var r=tc(e);n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ya(e)?Ka(t,n):null!==(n=Lo(e,t,n,r))&&(nc(n,e,r,ec()),Xa(n,t,r))}function qa(e,t,n){var r=tc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ya(e))Ka(t,i);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,sr(s,a)){var l=t.interleaved;return null===l?(i.next=i,Ro(t)):(i.next=l.next,l.next=i),void(t.interleaved=i)}}catch(e){}null!==(n=Lo(e,t,i,r))&&(nc(n,e,r,i=ec()),Xa(n,t,r))}}function Ya(e){var t=e.alternate;return e===sa||null!==t&&t===sa}function Ka(e,t){da=ua=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Xa(e,t,n){if(0!=(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,yt(e,n)}}var Qa={readContext:No,useCallback:pa,useContext:pa,useEffect:pa,useImperativeHandle:pa,useInsertionEffect:pa,useLayoutEffect:pa,useMemo:pa,useReducer:pa,useRef:pa,useState:pa,useDebugValue:pa,useDeferredValue:pa,useTransition:pa,useMutableSource:pa,useSyncExternalStore:pa,useId:pa,unstable_isNewReconciler:!1},Ja={readContext:No,useCallback:function(e,t){return ya().memoizedState=[e,void 0===t?null:t],e},useContext:No,useEffect:Pa,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Ra(4194308,4,Ba.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ra(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ra(4,2,e,t)},useMemo:function(e,t){var n=ya();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ya();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Ga.bind(null,sa,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},ya().memoizedState=e},useState:Ma,useDebugValue:Fa,useDeferredValue:function(e){return ya().memoizedState=e},useTransition:function(){var e=Ma(!1),t=e[0];return e=Za.bind(null,e[1]),ya().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=sa,i=ya();if(io){if(void 0===n)throw Error(o(407));n=n()}else{if(n=t(),null===kl)throw Error(o(349));0!=(30&aa)||Ta(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,Pa(Aa.bind(null,r,a,e),[e]),r.flags|=2048,Na(9,Oa.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=ya(),t=kl.identifierPrefix;if(io){var n=Xi;t=":"+t+"R"+(n=(Ki&~(1<<32-at(Ki)-1)).toString(32)+n),0<(n=ha++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=fa++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},es={readContext:No,useCallback:Ua,useContext:No,useEffect:Ia,useImperativeHandle:ja,useInsertionEffect:$a,useLayoutEffect:za,useMemo:Ha,useReducer:_a,useRef:Da,useState:function(){return _a(wa)},useDebugValue:Fa,useDeferredValue:function(e){return Va(ba(),la.memoizedState,e)},useTransition:function(){return[_a(wa)[0],ba().memoizedState]},useMutableSource:xa,useSyncExternalStore:Sa,useId:Wa,unstable_isNewReconciler:!1},ts={readContext:No,useCallback:Ua,useContext:No,useEffect:Ia,useImperativeHandle:ja,useInsertionEffect:$a,useLayoutEffect:za,useMemo:Ha,useReducer:Ea,useRef:Da,useState:function(){return Ea(wa)},useDebugValue:Fa,useDeferredValue:function(e){var t=ba();return null===la?t.memoizedState=e:Va(t,la.memoizedState,e)},useTransition:function(){return[Ea(wa)[0],ba().memoizedState]},useMutableSource:xa,useSyncExternalStore:Sa,useId:Wa,unstable_isNewReconciler:!1};function ns(e,t){if(e&&e.defaultProps){for(var n in t=$({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function rs(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:$({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var is={isMounted:function(e){return!!(e=e._reactInternals)&&Ue(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ec(),i=tc(e),o=Bo(r,i);o.payload=t,null!=n&&(o.callback=n),null!==(t=jo(e,o,i))&&(nc(t,e,i,r),Fo(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ec(),i=tc(e),o=Bo(r,i);o.tag=1,o.payload=t,null!=n&&(o.callback=n),null!==(t=jo(e,o,i))&&(nc(t,e,i,r),Fo(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ec(),r=tc(e),i=Bo(n,r);i.tag=2,null!=t&&(i.callback=t),null!==(t=jo(e,i,r))&&(nc(t,e,r,n),Fo(t,e,r))}};function os(e,t,n,r,i,o,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!(t.prototype&&t.prototype.isPureReactComponent&&lr(n,r)&&lr(i,o))}function as(e,t,n){var r=!1,i=Ai,o=t.contextType;return"object"==typeof o&&null!==o?o=No(o):(i=Di(t)?Mi:Ci.current,o=(r=null!=(r=t.contextTypes))?Ni(e,i):Ai),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=is,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function ss(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&is.enqueueReplaceState(t,t.state,null)}function ls(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},$o(e);var o=t.contextType;"object"==typeof o&&null!==o?i.context=No(o):(o=Di(t)?Mi:Ci.current,i.context=Ni(e,o)),i.state=e.memoizedState,"function"==typeof(o=t.getDerivedStateFromProps)&&(rs(e,t,o,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&is.enqueueReplaceState(i,i.state,null),Ho(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.flags|=4194308)}function cs(e,t){try{var n="",r=t;do{n+=F(r),r=r.return}while(r);var i=n}catch(e){i="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:i,digest:null}}function us(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function ds(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}var hs="function"==typeof WeakMap?WeakMap:Map;function fs(e,t,n){(n=Bo(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Vl||(Vl=!0,Zl=r),ds(0,t)},n}function ps(e,t,n){(n=Bo(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){ds(0,t)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){ds(0,t),"function"!=typeof r&&(null===Wl?Wl=new Set([this]):Wl.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function ms(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new hs;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Tc.bind(null,e,t,n),t.then(e,e))}function gs(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function vs(e,t,n,r,i){return 0==(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Bo(-1,1)).tag=2,jo(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var ys=w.ReactCurrentOwner,bs=!1;function ws(e,t,n,r){t.child=null===e?Eo(t,null,n,r):_o(t,e.child,n,r)}function _s(e,t,n,r,i){n=n.render;var o=t.ref;return Mo(t,i),r=ga(e,t,n,r,o,i),n=va(),null===e||bs?(io&&n&&eo(t),t.flags|=1,ws(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Vs(e,t,i))}function Es(e,t,n,r,i){if(null===e){var o=n.type;return"function"!=typeof o||Dc(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Lc(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,xs(e,t,o,r,i))}if(o=e.child,0==(e.lanes&i)){var a=o.memoizedProps;if((n=null!==(n=n.compare)?n:lr)(a,r)&&e.ref===t.ref)return Vs(e,t,i)}return t.flags|=1,(e=Rc(o,r)).ref=t.ref,e.return=t,t.child=e}function xs(e,t,n,r,i){if(null!==e){var o=e.memoizedProps;if(lr(o,r)&&e.ref===t.ref){if(bs=!1,t.pendingProps=r=o,0==(e.lanes&i))return t.lanes=e.lanes,Vs(e,t,i);0!=(131072&e.flags)&&(bs=!0)}}return Os(e,t,n,r,i)}function Ss(e,t,n){var r=t.pendingProps,i=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0==(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Oi(Rl,Dl),Dl|=n;else{if(0==(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Oi(Rl,Dl),Dl|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==o?o.baseLanes:n,Oi(Rl,Dl),Dl|=r}else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,Oi(Rl,Dl),Dl|=r;return ws(e,t,i,n),t.child}function Ts(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Os(e,t,n,r,i){var o=Di(n)?Mi:Ci.current;return o=Ni(t,o),Mo(t,i),n=ga(e,t,n,r,o,i),r=va(),null===e||bs?(io&&r&&eo(t),t.flags|=1,ws(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Vs(e,t,i))}function As(e,t,n,r,i){if(Di(n)){var o=!0;Ii(t)}else o=!1;if(Mo(t,i),null===t.stateNode)Hs(e,t),as(t,n,r),ls(t,n,r,i),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,c=n.contextType;c="object"==typeof c&&null!==c?No(c):Ni(t,c=Di(n)?Mi:Ci.current);var u=n.getDerivedStateFromProps,d="function"==typeof u||"function"==typeof a.getSnapshotBeforeUpdate;d||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||l!==c)&&ss(t,a,r,c),Io=!1;var h=t.memoizedState;a.state=h,Ho(t,r,a,i),l=t.memoizedState,s!==r||h!==l||ki.current||Io?("function"==typeof u&&(rs(t,n,u,r),l=t.memoizedState),(s=Io||os(t,n,s,r,h,l,c))?(d||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.flags|=4194308)):("function"==typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=c,r=s):("function"==typeof a.componentDidMount&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,zo(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:ns(t.type,s),a.props=c,d=t.pendingProps,h=a.context,l="object"==typeof(l=n.contextType)&&null!==l?No(l):Ni(t,l=Di(n)?Mi:Ci.current);var f=n.getDerivedStateFromProps;(u="function"==typeof f||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==d||h!==l)&&ss(t,a,r,l),Io=!1,h=t.memoizedState,a.state=h,Ho(t,r,a,i);var p=t.memoizedState;s!==d||h!==p||ki.current||Io?("function"==typeof f&&(rs(t,n,f,r),p=t.memoizedState),(c=Io||os(t,n,c,r,h,p,l)||!1)?(u||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,p,l),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,p,l)),"function"==typeof a.componentDidUpdate&&(t.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=l,r=c):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Cs(e,t,n,r,o,i)}function Cs(e,t,n,r,i,o){Ts(e,t);var a=0!=(128&t.flags);if(!r&&!a)return i&&$i(t,n,!1),Vs(e,t,o);r=t.stateNode,ys.current=t;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=_o(t,e.child,null,o),t.child=_o(t,null,s,o)):ws(e,t,s,o),t.memoizedState=r.state,i&&$i(t,n,!0),t.child}function ks(e){var t=e.stateNode;t.pendingContext?Li(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Li(0,t.context,!1),Ko(e,t.containerInfo)}function Ms(e,t,n,r,i){return po(),mo(i),t.flags|=256,ws(e,t,n,r),t.child}var Ns,Ds,Rs,Ls,Ps={dehydrated:null,treeContext:null,retryLane:0};function Is(e){return{baseLanes:e,cachePool:null,transitions:null}}function $s(e,t,n){var r,i=t.pendingProps,a=ea.current,s=!1,l=0!=(128&t.flags);if((r=l)||(r=(null===e||null!==e.memoizedState)&&0!=(2&a)),r?(s=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(a|=1),Oi(ea,1&a),null===e)return co(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0==(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(l=i.children,e=i.fallback,s?(i=t.mode,s=t.child,l={mode:"hidden",children:l},0==(1&i)&&null!==s?(s.childLanes=0,s.pendingProps=l):s=Ic(l,i,0,null),e=Pc(e,i,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Is(n),t.memoizedState=Ps,e):zs(t,l));if(null!==(a=e.memoizedState)&&null!==(r=a.dehydrated))return function(e,t,n,r,i,a,s){if(n)return 256&t.flags?(t.flags&=-257,Bs(e,t,s,r=us(Error(o(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(a=r.fallback,i=t.mode,r=Ic({mode:"visible",children:r.children},i,0,null),(a=Pc(a,i,s,null)).flags|=2,r.return=t,a.return=t,r.sibling=a,t.child=r,0!=(1&t.mode)&&_o(t,e.child,null,s),t.child.memoizedState=Is(s),t.memoizedState=Ps,a);if(0==(1&t.mode))return Bs(e,t,s,null);if("$!"===i.data){if(r=i.nextSibling&&i.nextSibling.dataset)var l=r.dgst;return r=l,Bs(e,t,s,r=us(a=Error(o(419)),r,void 0))}if(l=0!=(s&e.childLanes),bs||l){if(null!==(r=kl)){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}0!==(i=0!=(i&(r.suspendedLanes|s))?0:i)&&i!==a.retryLane&&(a.retryLane=i,Po(e,i),nc(r,e,i,-1))}return mc(),Bs(e,t,s,r=us(Error(o(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=Ac.bind(null,e),i._reactRetry=t,null):(e=a.treeContext,ro=ci(i.nextSibling),no=t,io=!0,oo=null,null!==e&&(Gi[qi++]=Ki,Gi[qi++]=Xi,Gi[qi++]=Yi,Ki=e.id,Xi=e.overflow,Yi=t),(t=zs(t,r.children)).flags|=4096,t)}(e,t,l,i,r,a,n);if(s){s=i.fallback,l=t.mode,r=(a=e.child).sibling;var c={mode:"hidden",children:i.children};return 0==(1&l)&&t.child!==a?((i=t.child).childLanes=0,i.pendingProps=c,t.deletions=null):(i=Rc(a,c)).subtreeFlags=14680064&a.subtreeFlags,null!==r?s=Rc(r,s):(s=Pc(s,l,n,null)).flags|=2,s.return=t,i.return=t,i.sibling=s,t.child=i,i=s,s=t.child,l=null===(l=e.child.memoizedState)?Is(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},s.memoizedState=l,s.childLanes=e.childLanes&~n,t.memoizedState=Ps,i}return e=(s=e.child).sibling,i=Rc(s,{mode:"visible",children:i.children}),0==(1&t.mode)&&(i.lanes=n),i.return=t,i.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=i,t.memoizedState=null,i}function zs(e,t){return(t=Ic({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Bs(e,t,n,r){return null!==r&&mo(r),_o(t,e.child,null,n),(e=zs(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function js(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),ko(e.return,t,n)}function Fs(e,t,n,r,i){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function Us(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(ws(e,t,r.children,n),0!=(2&(r=ea.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!=(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&js(e,n,t);else if(19===e.tag)js(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Oi(ea,r),0==(1&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===ta(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Fs(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===ta(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Fs(t,!0,n,null,o);break;case"together":Fs(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Hs(e,t){0==(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Vs(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Il|=t.lanes,0==(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(o(153));if(null!==t.child){for(n=Rc(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Rc(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Zs(e,t){if(!io)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ws(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Gs(e,t,n){var r=t.pendingProps;switch(to(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ws(t),null;case 1:case 17:return Di(t.type)&&Ri(),Ws(t),null;case 3:return r=t.stateNode,Xo(),Ti(ki),Ti(Ci),ra(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(ho(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0==(256&t.flags)||(t.flags|=1024,null!==oo&&(ac(oo),oo=null))),Ds(e,t),Ws(t),null;case 5:Jo(t);var i=Yo(qo.current);if(n=t.type,null!==e&&null!=t.stateNode)Rs(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(o(166));return Ws(t),null}if(e=Yo(Wo.current),ho(t)){r=t.stateNode,n=t.type;var a=t.memoizedProps;switch(r[hi]=t,r[fi]=a,e=0!=(1&t.mode),n){case"dialog":Br("cancel",r),Br("close",r);break;case"iframe":case"object":case"embed":Br("load",r);break;case"video":case"audio":for(i=0;i<Pr.length;i++)Br(Pr[i],r);break;case"source":Br("error",r);break;case"img":case"image":case"link":Br("error",r),Br("load",r);break;case"details":Br("toggle",r);break;case"input":K(r,a),Br("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},Br("invalid",r);break;case"textarea":ie(r,a),Br("invalid",r)}for(var l in ye(n,a),i=null,a)if(a.hasOwnProperty(l)){var c=a[l];"children"===l?"string"==typeof c?r.textContent!==c&&(!0!==a.suppressHydrationWarning&&Qr(r.textContent,c,e),i=["children",c]):"number"==typeof c&&r.textContent!==""+c&&(!0!==a.suppressHydrationWarning&&Qr(r.textContent,c,e),i=["children",""+c]):s.hasOwnProperty(l)&&null!=c&&"onScroll"===l&&Br("scroll",r)}switch(n){case"input":W(r),J(r,a,!0);break;case"textarea":W(r),ae(r);break;case"select":case"option":break;default:"function"==typeof a.onClick&&(r.onclick=Jr)}r=i,t.updateQueue=r,null!==r&&(t.flags|=4)}else{l=9===i.nodeType?i:i.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=se(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),"select"===n&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[hi]=t,e[fi]=r,Ns(e,t,!1,!1),t.stateNode=e;e:{switch(l=be(n,r),n){case"dialog":Br("cancel",e),Br("close",e),i=r;break;case"iframe":case"object":case"embed":Br("load",e),i=r;break;case"video":case"audio":for(i=0;i<Pr.length;i++)Br(Pr[i],e);i=r;break;case"source":Br("error",e),i=r;break;case"img":case"image":case"link":Br("error",e),Br("load",e),i=r;break;case"details":Br("toggle",e),i=r;break;case"input":K(e,r),i=Y(e,r),Br("invalid",e);break;case"option":default:i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=$({},r,{value:void 0}),Br("invalid",e);break;case"textarea":ie(e,r),i=re(e,r),Br("invalid",e)}for(a in ye(n,i),c=i)if(c.hasOwnProperty(a)){var u=c[a];"style"===a?ge(e,u):"dangerouslySetInnerHTML"===a?null!=(u=u?u.__html:void 0)&&de(e,u):"children"===a?"string"==typeof u?("textarea"!==n||""!==u)&&he(e,u):"number"==typeof u&&he(e,""+u):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(s.hasOwnProperty(a)?null!=u&&"onScroll"===a&&Br("scroll",e):null!=u&&b(e,a,u,l))}switch(n){case"input":W(e),J(e,r,!1);break;case"textarea":W(e),ae(e);break;case"option":null!=r.value&&e.setAttribute("value",""+V(r.value));break;case"select":e.multiple=!!r.multiple,null!=(a=r.value)?ne(e,!!r.multiple,a,!1):null!=r.defaultValue&&ne(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof i.onClick&&(e.onclick=Jr)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Ws(t),null;case 6:if(e&&null!=t.stateNode)Ls(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(o(166));if(n=Yo(qo.current),Yo(Wo.current),ho(t)){if(r=t.stateNode,n=t.memoizedProps,r[hi]=t,(a=r.nodeValue!==n)&&null!==(e=no))switch(e.tag){case 3:Qr(r.nodeValue,n,0!=(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Qr(r.nodeValue,n,0!=(1&e.mode))}a&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[hi]=t,t.stateNode=r}return Ws(t),null;case 13:if(Ti(ea),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(io&&null!==ro&&0!=(1&t.mode)&&0==(128&t.flags))fo(),po(),t.flags|=98560,a=!1;else if(a=ho(t),null!==r&&null!==r.dehydrated){if(null===e){if(!a)throw Error(o(318));if(!(a=null!==(a=t.memoizedState)?a.dehydrated:null))throw Error(o(317));a[hi]=t}else po(),0==(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Ws(t),a=!1}else null!==oo&&(ac(oo),oo=null),a=!0;if(!a)return 65536&t.flags?t:null}return 0!=(128&t.flags)?(t.lanes=n,t):((r=null!==r)!=(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,0!=(1&t.mode)&&(null===e||0!=(1&ea.current)?0===Ll&&(Ll=3):mc())),null!==t.updateQueue&&(t.flags|=4),Ws(t),null);case 4:return Xo(),Ds(e,t),null===e&&Ur(t.stateNode.containerInfo),Ws(t),null;case 10:return Co(t.type._context),Ws(t),null;case 19:if(Ti(ea),null===(a=t.memoizedState))return Ws(t),null;if(r=0!=(128&t.flags),null===(l=a.rendering))if(r)Zs(a,!1);else{if(0!==Ll||null!==e&&0!=(128&e.flags))for(e=t.child;null!==e;){if(null!==(l=ta(e))){for(t.flags|=128,Zs(a,!1),null!==(r=l.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(a=n).flags&=14680066,null===(l=a.alternate)?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=l.childLanes,a.lanes=l.lanes,a.child=l.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=l.memoizedProps,a.memoizedState=l.memoizedState,a.updateQueue=l.updateQueue,a.type=l.type,e=l.dependencies,a.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Oi(ea,1&ea.current|2),t.child}e=e.sibling}null!==a.tail&&Xe()>Ul&&(t.flags|=128,r=!0,Zs(a,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=ta(l))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Zs(a,!0),null===a.tail&&"hidden"===a.tailMode&&!l.alternate&&!io)return Ws(t),null}else 2*Xe()-a.renderingStartTime>Ul&&1073741824!==n&&(t.flags|=128,r=!0,Zs(a,!1),t.lanes=4194304);a.isBackwards?(l.sibling=t.child,t.child=l):(null!==(n=a.last)?n.sibling=l:t.child=l,a.last=l)}return null!==a.tail?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Xe(),t.sibling=null,n=ea.current,Oi(ea,r?1&n|2:1&n),t):(Ws(t),null);case 22:case 23:return dc(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!=(1&t.mode)?0!=(1073741824&Dl)&&(Ws(t),6&t.subtreeFlags&&(t.flags|=8192)):Ws(t),null;case 24:case 25:return null}throw Error(o(156,t.tag))}function qs(e,t){switch(to(t),t.tag){case 1:return Di(t.type)&&Ri(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Xo(),Ti(ki),Ti(Ci),ra(),0!=(65536&(e=t.flags))&&0==(128&e)?(t.flags=-65537&e|128,t):null;case 5:return Jo(t),null;case 13:if(Ti(ea),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(o(340));po()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Ti(ea),null;case 4:return Xo(),null;case 10:return Co(t.type._context),null;case 22:case 23:return dc(),null;default:return null}}Ns=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ds=function(){},Rs=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Yo(Wo.current);var o,a=null;switch(n){case"input":i=Y(e,i),r=Y(e,r),a=[];break;case"select":i=$({},i,{value:void 0}),r=$({},r,{value:void 0}),a=[];break;case"textarea":i=re(e,i),r=re(e,r),a=[];break;default:"function"!=typeof i.onClick&&"function"==typeof r.onClick&&(e.onclick=Jr)}for(u in ye(n,r),n=null,i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&null!=i[u])if("style"===u){var l=i[u];for(o in l)l.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else"dangerouslySetInnerHTML"!==u&&"children"!==u&&"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(s.hasOwnProperty(u)?a||(a=[]):(a=a||[]).push(u,null));for(u in r){var c=r[u];if(l=null!=i?i[u]:void 0,r.hasOwnProperty(u)&&c!==l&&(null!=c||null!=l))if("style"===u)if(l){for(o in l)!l.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in c)c.hasOwnProperty(o)&&l[o]!==c[o]&&(n||(n={}),n[o]=c[o])}else n||(a||(a=[]),a.push(u,n)),n=c;else"dangerouslySetInnerHTML"===u?(c=c?c.__html:void 0,l=l?l.__html:void 0,null!=c&&l!==c&&(a=a||[]).push(u,c)):"children"===u?"string"!=typeof c&&"number"!=typeof c||(a=a||[]).push(u,""+c):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&(s.hasOwnProperty(u)?(null!=c&&"onScroll"===u&&Br("scroll",e),a||l===c||(a=[])):(a=a||[]).push(u,c))}n&&(a=a||[]).push("style",n);var u=a;(t.updateQueue=u)&&(t.flags|=4)}},Ls=function(e,t,n,r){n!==r&&(t.flags|=4)};var Ys=!1,Ks=!1,Xs="function"==typeof WeakSet?WeakSet:Set,Qs=null;function Js(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){Sc(e,t,n)}else n.current=null}function el(e,t,n){try{n()}catch(n){Sc(e,t,n)}}var tl=!1;function nl(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,void 0!==o&&el(t,n,o)}i=i.next}while(i!==r)}}function rl(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function il(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function ol(e){var t=e.alternate;null!==t&&(e.alternate=null,ol(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&null!==(t=e.stateNode)&&(delete t[hi],delete t[fi],delete t[mi],delete t[gi],delete t[vi]),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function al(e){return 5===e.tag||3===e.tag||4===e.tag}function sl(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||al(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function ll(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Jr));else if(4!==r&&null!==(e=e.child))for(ll(e,t,n),e=e.sibling;null!==e;)ll(e,t,n),e=e.sibling}function cl(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(cl(e,t,n),e=e.sibling;null!==e;)cl(e,t,n),e=e.sibling}var ul=null,dl=!1;function hl(e,t,n){for(n=n.child;null!==n;)fl(e,t,n),n=n.sibling}function fl(e,t,n){if(ot&&"function"==typeof ot.onCommitFiberUnmount)try{ot.onCommitFiberUnmount(it,n)}catch(e){}switch(n.tag){case 5:Ks||Js(n,t);case 6:var r=ul,i=dl;ul=null,hl(e,t,n),dl=i,null!==(ul=r)&&(dl?(e=ul,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):ul.removeChild(n.stateNode));break;case 18:null!==ul&&(dl?(e=ul,n=n.stateNode,8===e.nodeType?li(e.parentNode,n):1===e.nodeType&&li(e,n),Ut(e)):li(ul,n.stateNode));break;case 4:r=ul,i=dl,ul=n.stateNode.containerInfo,dl=!0,hl(e,t,n),ul=r,dl=i;break;case 0:case 11:case 14:case 15:if(!Ks&&null!==(r=n.updateQueue)&&null!==(r=r.lastEffect)){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,void 0!==a&&(0!=(2&o)||0!=(4&o))&&el(n,t,a),i=i.next}while(i!==r)}hl(e,t,n);break;case 1:if(!Ks&&(Js(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){Sc(n,t,e)}hl(e,t,n);break;case 21:hl(e,t,n);break;case 22:1&n.mode?(Ks=(r=Ks)||null!==n.memoizedState,hl(e,t,n),Ks=r):hl(e,t,n);break;default:hl(e,t,n)}}function pl(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Xs),t.forEach((function(t){var r=Cc.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function ml(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r];try{var a=e,s=t,l=s;e:for(;null!==l;){switch(l.tag){case 5:ul=l.stateNode,dl=!1;break e;case 3:case 4:ul=l.stateNode.containerInfo,dl=!0;break e}l=l.return}if(null===ul)throw Error(o(160));fl(a,s,i),ul=null,dl=!1;var c=i.alternate;null!==c&&(c.return=null),i.return=null}catch(e){Sc(i,t,e)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)gl(t,e),t=t.sibling}function gl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ml(t,e),vl(e),4&r){try{nl(3,e,e.return),rl(3,e)}catch(t){Sc(e,e.return,t)}try{nl(5,e,e.return)}catch(t){Sc(e,e.return,t)}}break;case 1:ml(t,e),vl(e),512&r&&null!==n&&Js(n,n.return);break;case 5:if(ml(t,e),vl(e),512&r&&null!==n&&Js(n,n.return),32&e.flags){var i=e.stateNode;try{he(i,"")}catch(t){Sc(e,e.return,t)}}if(4&r&&null!=(i=e.stateNode)){var a=e.memoizedProps,s=null!==n?n.memoizedProps:a,l=e.type,c=e.updateQueue;if(e.updateQueue=null,null!==c)try{"input"===l&&"radio"===a.type&&null!=a.name&&X(i,a),be(l,s);var u=be(l,a);for(s=0;s<c.length;s+=2){var d=c[s],h=c[s+1];"style"===d?ge(i,h):"dangerouslySetInnerHTML"===d?de(i,h):"children"===d?he(i,h):b(i,d,h,u)}switch(l){case"input":Q(i,a);break;case"textarea":oe(i,a);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!a.multiple;var p=a.value;null!=p?ne(i,!!a.multiple,p,!1):f!==!!a.multiple&&(null!=a.defaultValue?ne(i,!!a.multiple,a.defaultValue,!0):ne(i,!!a.multiple,a.multiple?[]:"",!1))}i[fi]=a}catch(t){Sc(e,e.return,t)}}break;case 6:if(ml(t,e),vl(e),4&r){if(null===e.stateNode)throw Error(o(162));i=e.stateNode,a=e.memoizedProps;try{i.nodeValue=a}catch(t){Sc(e,e.return,t)}}break;case 3:if(ml(t,e),vl(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Ut(t.containerInfo)}catch(t){Sc(e,e.return,t)}break;case 4:default:ml(t,e),vl(e);break;case 13:ml(t,e),vl(e),8192&(i=e.child).flags&&(a=null!==i.memoizedState,i.stateNode.isHidden=a,!a||null!==i.alternate&&null!==i.alternate.memoizedState||(Fl=Xe())),4&r&&pl(e);break;case 22:if(d=null!==n&&null!==n.memoizedState,1&e.mode?(Ks=(u=Ks)||d,ml(t,e),Ks=u):ml(t,e),vl(e),8192&r){if(u=null!==e.memoizedState,(e.stateNode.isHidden=u)&&!d&&0!=(1&e.mode))for(Qs=e,d=e.child;null!==d;){for(h=Qs=d;null!==Qs;){switch(p=(f=Qs).child,f.tag){case 0:case 11:case 14:case 15:nl(4,f,f.return);break;case 1:Js(f,f.return);var m=f.stateNode;if("function"==typeof m.componentWillUnmount){r=f,n=f.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(e){Sc(r,n,e)}}break;case 5:Js(f,f.return);break;case 22:if(null!==f.memoizedState){_l(h);continue}}null!==p?(p.return=f,Qs=p):_l(h)}d=d.sibling}e:for(d=null,h=e;;){if(5===h.tag){if(null===d){d=h;try{i=h.stateNode,u?"function"==typeof(a=i.style).setProperty?a.setProperty("display","none","important"):a.display="none":(l=h.stateNode,s=null!=(c=h.memoizedProps.style)&&c.hasOwnProperty("display")?c.display:null,l.style.display=me("display",s))}catch(t){Sc(e,e.return,t)}}}else if(6===h.tag){if(null===d)try{h.stateNode.nodeValue=u?"":h.memoizedProps}catch(t){Sc(e,e.return,t)}}else if((22!==h.tag&&23!==h.tag||null===h.memoizedState||h===e)&&null!==h.child){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;null===h.sibling;){if(null===h.return||h.return===e)break e;d===h&&(d=null),h=h.return}d===h&&(d=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:ml(t,e),vl(e),4&r&&pl(e);case 21:}}function vl(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(al(n)){var r=n;break e}n=n.return}throw Error(o(160))}switch(r.tag){case 5:var i=r.stateNode;32&r.flags&&(he(i,""),r.flags&=-33),cl(e,sl(e),i);break;case 3:case 4:var a=r.stateNode.containerInfo;ll(e,sl(e),a);break;default:throw Error(o(161))}}catch(t){Sc(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function yl(e,t,n){Qs=e,bl(e,t,n)}function bl(e,t,n){for(var r=0!=(1&e.mode);null!==Qs;){var i=Qs,o=i.child;if(22===i.tag&&r){var a=null!==i.memoizedState||Ys;if(!a){var s=i.alternate,l=null!==s&&null!==s.memoizedState||Ks;s=Ys;var c=Ks;if(Ys=a,(Ks=l)&&!c)for(Qs=i;null!==Qs;)l=(a=Qs).child,22===a.tag&&null!==a.memoizedState?El(i):null!==l?(l.return=a,Qs=l):El(i);for(;null!==o;)Qs=o,bl(o,t,n),o=o.sibling;Qs=i,Ys=s,Ks=c}wl(e)}else 0!=(8772&i.subtreeFlags)&&null!==o?(o.return=i,Qs=o):wl(e)}}function wl(e){for(;null!==Qs;){var t=Qs;if(0!=(8772&t.flags)){var n=t.alternate;try{if(0!=(8772&t.flags))switch(t.tag){case 0:case 11:case 15:Ks||rl(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!Ks)if(null===n)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:ns(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;null!==a&&Vo(t,a,r);break;case 3:var s=t.updateQueue;if(null!==s){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Vo(t,s,n)}break;case 5:var l=t.stateNode;if(null===n&&4&t.flags){n=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var u=t.alternate;if(null!==u){var d=u.memoizedState;if(null!==d){var h=d.dehydrated;null!==h&&Ut(h)}}}break;default:throw Error(o(163))}Ks||512&t.flags&&il(t)}catch(e){Sc(t,t.return,e)}}if(t===e){Qs=null;break}if(null!==(n=t.sibling)){n.return=t.return,Qs=n;break}Qs=t.return}}function _l(e){for(;null!==Qs;){var t=Qs;if(t===e){Qs=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Qs=n;break}Qs=t.return}}function El(e){for(;null!==Qs;){var t=Qs;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{rl(4,t)}catch(e){Sc(t,n,e)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(e){Sc(t,i,e)}}var o=t.return;try{il(t)}catch(e){Sc(t,o,e)}break;case 5:var a=t.return;try{il(t)}catch(e){Sc(t,a,e)}}}catch(e){Sc(t,t.return,e)}if(t===e){Qs=null;break}var s=t.sibling;if(null!==s){s.return=t.return,Qs=s;break}Qs=t.return}}var xl,Sl=Math.ceil,Tl=w.ReactCurrentDispatcher,Ol=w.ReactCurrentOwner,Al=w.ReactCurrentBatchConfig,Cl=0,kl=null,Ml=null,Nl=0,Dl=0,Rl=Si(0),Ll=0,Pl=null,Il=0,$l=0,zl=0,Bl=null,jl=null,Fl=0,Ul=1/0,Hl=null,Vl=!1,Zl=null,Wl=null,Gl=!1,ql=null,Yl=0,Kl=0,Xl=null,Ql=-1,Jl=0;function ec(){return 0!=(6&Cl)?Xe():-1!==Ql?Ql:Ql=Xe()}function tc(e){return 0==(1&e.mode)?1:0!=(2&Cl)&&0!==Nl?Nl&-Nl:null!==go.transition?(0===Jl&&(Jl=mt()),Jl):0!==(e=bt)?e:e=void 0===(e=window.event)?16:Kt(e.type)}function nc(e,t,n,r){if(50<Kl)throw Kl=0,Xl=null,Error(o(185));vt(e,n,r),0!=(2&Cl)&&e===kl||(e===kl&&(0==(2&Cl)&&($l|=n),4===Ll&&sc(e,Nl)),rc(e,r),1===n&&0===Cl&&0==(1&t.mode)&&(Ul=Xe()+500,Bi&&Ui()))}function rc(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var a=31-at(o),s=1<<a,l=i[a];-1===l?0!=(s&n)&&0==(s&r)||(i[a]=ft(s,t)):l<=t&&(e.expiredLanes|=s),o&=~s}}(e,t);var r=ht(e,e===kl?Nl:0);if(0===r)null!==n&&qe(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&qe(n),1===t)0===e.tag?function(e){Bi=!0,Fi(e)}(lc.bind(null,e)):Fi(lc.bind(null,e)),ai((function(){0==(6&Cl)&&Ui()})),n=null;else{switch(wt(r)){case 1:n=Je;break;case 4:n=et;break;case 16:default:n=tt;break;case 536870912:n=rt}n=kc(n,ic.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function ic(e,t){if(Ql=-1,Jl=0,0!=(6&Cl))throw Error(o(327));var n=e.callbackNode;if(Ec()&&e.callbackNode!==n)return null;var r=ht(e,e===kl?Nl:0);if(0===r)return null;if(0!=(30&r)||0!=(r&e.expiredLanes)||t)t=gc(e,r);else{t=r;var i=Cl;Cl|=2;var a=pc();for(kl===e&&Nl===t||(Hl=null,Ul=Xe()+500,hc(e,t));;)try{yc();break}catch(t){fc(e,t)}Ao(),Tl.current=a,Cl=i,null!==Ml?t=0:(kl=null,Nl=0,t=Ll)}if(0!==t){if(2===t&&0!==(i=pt(e))&&(r=i,t=oc(e,i)),1===t)throw n=Pl,hc(e,0),sc(e,r),rc(e,Xe()),n;if(6===t)sc(e,r);else{if(i=e.current.alternate,0==(30&r)&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!sr(o(),i))return!1}catch(e){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(i)&&(2===(t=gc(e,r))&&0!==(a=pt(e))&&(r=a,t=oc(e,a)),1===t))throw n=Pl,hc(e,0),sc(e,r),rc(e,Xe()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(o(345));case 2:case 5:_c(e,jl,Hl);break;case 3:if(sc(e,r),(130023424&r)===r&&10<(t=Fl+500-Xe())){if(0!==ht(e,0))break;if(((i=e.suspendedLanes)&r)!==r){ec(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=ri(_c.bind(null,e,jl,Hl),t);break}_c(e,jl,Hl);break;case 4:if(sc(e,r),(4194240&r)===r)break;for(t=e.eventTimes,i=-1;0<r;){var s=31-at(r);a=1<<s,(s=t[s])>i&&(i=s),r&=~a}if(r=i,10<(r=(120>(r=Xe()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Sl(r/1960))-r)){e.timeoutHandle=ri(_c.bind(null,e,jl,Hl),r);break}_c(e,jl,Hl);break;default:throw Error(o(329))}}}return rc(e,Xe()),e.callbackNode===n?ic.bind(null,e):null}function oc(e,t){var n=Bl;return e.current.memoizedState.isDehydrated&&(hc(e,t).flags|=256),2!==(e=gc(e,t))&&(t=jl,jl=n,null!==t&&ac(t)),e}function ac(e){null===jl?jl=e:jl.push.apply(jl,e)}function sc(e,t){for(t&=~zl,t&=~$l,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-at(t),r=1<<n;e[n]=-1,t&=~r}}function lc(e){if(0!=(6&Cl))throw Error(o(327));Ec();var t=ht(e,0);if(0==(1&t))return rc(e,Xe()),null;var n=gc(e,t);if(0!==e.tag&&2===n){var r=pt(e);0!==r&&(t=r,n=oc(e,r))}if(1===n)throw n=Pl,hc(e,0),sc(e,t),rc(e,Xe()),n;if(6===n)throw Error(o(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,_c(e,jl,Hl),rc(e,Xe()),null}function cc(e,t){var n=Cl;Cl|=1;try{return e(t)}finally{0===(Cl=n)&&(Ul=Xe()+500,Bi&&Ui())}}function uc(e){null!==ql&&0===ql.tag&&0==(6&Cl)&&Ec();var t=Cl;Cl|=1;var n=Al.transition,r=bt;try{if(Al.transition=null,bt=1,e)return e()}finally{bt=r,Al.transition=n,0==(6&(Cl=t))&&Ui()}}function dc(){Dl=Rl.current,Ti(Rl)}function hc(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,ii(n)),null!==Ml)for(n=Ml.return;null!==n;){var r=n;switch(to(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&Ri();break;case 3:Xo(),Ti(ki),Ti(Ci),ra();break;case 5:Jo(r);break;case 4:Xo();break;case 13:case 19:Ti(ea);break;case 10:Co(r.type._context);break;case 22:case 23:dc()}n=n.return}if(kl=e,Ml=e=Rc(e.current,null),Nl=Dl=t,Ll=0,Pl=null,zl=$l=Il=0,jl=Bl=null,null!==Do){for(t=0;t<Do.length;t++)if(null!==(r=(n=Do[t]).interleaved)){n.interleaved=null;var i=r.next,o=n.pending;if(null!==o){var a=o.next;o.next=i,r.next=a}n.pending=r}Do=null}return e}function fc(e,t){for(;;){var n=Ml;try{if(Ao(),ia.current=Qa,ua){for(var r=sa.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}ua=!1}if(aa=0,ca=la=sa=null,da=!1,ha=0,Ol.current=null,null===n||null===n.return){Ll=1,Pl=t,Ml=null;break}e:{var a=e,s=n.return,l=n,c=t;if(t=Nl,l.flags|=32768,null!==c&&"object"==typeof c&&"function"==typeof c.then){var u=c,d=l,h=d.tag;if(0==(1&d.mode)&&(0===h||11===h||15===h)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var p=gs(s);if(null!==p){p.flags&=-257,vs(p,s,l,0,t),1&p.mode&&ms(a,u,t),c=u;var m=(t=p).updateQueue;if(null===m){var g=new Set;g.add(c),t.updateQueue=g}else m.add(c);break e}if(0==(1&t)){ms(a,u,t),mc();break e}c=Error(o(426))}else if(io&&1&l.mode){var v=gs(s);if(null!==v){0==(65536&v.flags)&&(v.flags|=256),vs(v,s,l,0,t),mo(cs(c,l));break e}}a=c=cs(c,l),4!==Ll&&(Ll=2),null===Bl?Bl=[a]:Bl.push(a),a=s;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t,Uo(a,fs(0,c,t));break e;case 1:l=c;var y=a.type,b=a.stateNode;if(0==(128&a.flags)&&("function"==typeof y.getDerivedStateFromError||null!==b&&"function"==typeof b.componentDidCatch&&(null===Wl||!Wl.has(b)))){a.flags|=65536,t&=-t,a.lanes|=t,Uo(a,ps(a,l,t));break e}}a=a.return}while(null!==a)}wc(n)}catch(e){t=e,Ml===n&&null!==n&&(Ml=n=n.return);continue}break}}function pc(){var e=Tl.current;return Tl.current=Qa,null===e?Qa:e}function mc(){0!==Ll&&3!==Ll&&2!==Ll||(Ll=4),null===kl||0==(268435455&Il)&&0==(268435455&$l)||sc(kl,Nl)}function gc(e,t){var n=Cl;Cl|=2;var r=pc();for(kl===e&&Nl===t||(Hl=null,hc(e,t));;)try{vc();break}catch(t){fc(e,t)}if(Ao(),Cl=n,Tl.current=r,null!==Ml)throw Error(o(261));return kl=null,Nl=0,Ll}function vc(){for(;null!==Ml;)bc(Ml)}function yc(){for(;null!==Ml&&!Ye();)bc(Ml)}function bc(e){var t=xl(e.alternate,e,Dl);e.memoizedProps=e.pendingProps,null===t?wc(e):Ml=t,Ol.current=null}function wc(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(32768&t.flags)){if(null!==(n=Gs(n,t,Dl)))return void(Ml=n)}else{if(null!==(n=qs(n,t)))return n.flags&=32767,void(Ml=n);if(null===e)return Ll=6,void(Ml=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(Ml=t);Ml=t=e}while(null!==t);0===Ll&&(Ll=5)}function _c(e,t,n){var r=bt,i=Al.transition;try{Al.transition=null,bt=1,function(e,t,n,r){do{Ec()}while(null!==ql);if(0!=(6&Cl))throw Error(o(327));n=e.finishedWork;var i=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(o(177));e.callbackNode=null,e.callbackPriority=0;var a=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-at(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}(e,a),e===kl&&(Ml=kl=null,Nl=0),0==(2064&n.subtreeFlags)&&0==(2064&n.flags)||Gl||(Gl=!0,kc(tt,(function(){return Ec(),null}))),a=0!=(15990&n.flags),0!=(15990&n.subtreeFlags)||a){a=Al.transition,Al.transition=null;var s=bt;bt=1;var l=Cl;Cl|=4,Ol.current=null,function(e,t){if(ei=Vt,fr(e=hr())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch(e){n=null;break e}var s=0,l=-1,c=-1,u=0,d=0,h=e,f=null;t:for(;;){for(var p;h!==n||0!==i&&3!==h.nodeType||(l=s+i),h!==a||0!==r&&3!==h.nodeType||(c=s+r),3===h.nodeType&&(s+=h.nodeValue.length),null!==(p=h.firstChild);)f=h,h=p;for(;;){if(h===e)break t;if(f===n&&++u===i&&(l=s),f===a&&++d===r&&(c=s),null!==(p=h.nextSibling))break;f=(h=f).parentNode}h=p}n=-1===l||-1===c?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(ti={focusedElem:e,selectionRange:n},Vt=!1,Qs=t;null!==Qs;)if(e=(t=Qs).child,0!=(1028&t.subtreeFlags)&&null!==e)e.return=t,Qs=e;else for(;null!==Qs;){t=Qs;try{var m=t.alternate;if(0!=(1024&t.flags))switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==m){var g=m.memoizedProps,v=m.memoizedState,y=t.stateNode,b=y.getSnapshotBeforeUpdate(t.elementType===t.type?g:ns(t.type,g),v);y.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var w=t.stateNode.containerInfo;1===w.nodeType?w.textContent="":9===w.nodeType&&w.documentElement&&w.removeChild(w.documentElement);break;default:throw Error(o(163))}}catch(e){Sc(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,Qs=e;break}Qs=t.return}m=tl,tl=!1}(e,n),gl(n,e),pr(ti),Vt=!!ei,ti=ei=null,e.current=n,yl(n,e,i),Ke(),Cl=l,bt=s,Al.transition=a}else e.current=n;if(Gl&&(Gl=!1,ql=e,Yl=i),0===(a=e.pendingLanes)&&(Wl=null),function(e){if(ot&&"function"==typeof ot.onCommitFiberRoot)try{ot.onCommitFiberRoot(it,e,void 0,128==(128&e.current.flags))}catch(e){}}(n.stateNode),rc(e,Xe()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)r((i=t[n]).value,{componentStack:i.stack,digest:i.digest});if(Vl)throw Vl=!1,e=Zl,Zl=null,e;0!=(1&Yl)&&0!==e.tag&&Ec(),0!=(1&(a=e.pendingLanes))?e===Xl?Kl++:(Kl=0,Xl=e):Kl=0,Ui()}(e,t,n,r)}finally{Al.transition=i,bt=r}return null}function Ec(){if(null!==ql){var e=wt(Yl),t=Al.transition,n=bt;try{if(Al.transition=null,bt=16>e?16:e,null===ql)var r=!1;else{if(e=ql,ql=null,Yl=0,0!=(6&Cl))throw Error(o(331));var i=Cl;for(Cl|=4,Qs=e.current;null!==Qs;){var a=Qs,s=a.child;if(0!=(16&Qs.flags)){var l=a.deletions;if(null!==l){for(var c=0;c<l.length;c++){var u=l[c];for(Qs=u;null!==Qs;){var d=Qs;switch(d.tag){case 0:case 11:case 15:nl(8,d,a)}var h=d.child;if(null!==h)h.return=d,Qs=h;else for(;null!==Qs;){var f=(d=Qs).sibling,p=d.return;if(ol(d),d===u){Qs=null;break}if(null!==f){f.return=p,Qs=f;break}Qs=p}}}var m=a.alternate;if(null!==m){var g=m.child;if(null!==g){m.child=null;do{var v=g.sibling;g.sibling=null,g=v}while(null!==g)}}Qs=a}}if(0!=(2064&a.subtreeFlags)&&null!==s)s.return=a,Qs=s;else e:for(;null!==Qs;){if(0!=(2048&(a=Qs).flags))switch(a.tag){case 0:case 11:case 15:nl(9,a,a.return)}var y=a.sibling;if(null!==y){y.return=a.return,Qs=y;break e}Qs=a.return}}var b=e.current;for(Qs=b;null!==Qs;){var w=(s=Qs).child;if(0!=(2064&s.subtreeFlags)&&null!==w)w.return=s,Qs=w;else e:for(s=b;null!==Qs;){if(0!=(2048&(l=Qs).flags))try{switch(l.tag){case 0:case 11:case 15:rl(9,l)}}catch(e){Sc(l,l.return,e)}if(l===s){Qs=null;break e}var _=l.sibling;if(null!==_){_.return=l.return,Qs=_;break e}Qs=l.return}}if(Cl=i,Ui(),ot&&"function"==typeof ot.onPostCommitFiberRoot)try{ot.onPostCommitFiberRoot(it,e)}catch(e){}r=!0}return r}finally{bt=n,Al.transition=t}}return!1}function xc(e,t,n){e=jo(e,t=fs(0,t=cs(n,t),1),1),t=ec(),null!==e&&(vt(e,1,t),rc(e,t))}function Sc(e,t,n){if(3===e.tag)xc(e,e,n);else for(;null!==t;){if(3===t.tag){xc(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Wl||!Wl.has(r))){t=jo(t,e=ps(t,e=cs(n,e),1),1),e=ec(),null!==t&&(vt(t,1,e),rc(t,e));break}}t=t.return}}function Tc(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=ec(),e.pingedLanes|=e.suspendedLanes&n,kl===e&&(Nl&n)===n&&(4===Ll||3===Ll&&(130023424&Nl)===Nl&&500>Xe()-Fl?hc(e,0):zl|=n),rc(e,t)}function Oc(e,t){0===t&&(0==(1&e.mode)?t=1:(t=ut,0==(130023424&(ut<<=1))&&(ut=4194304)));var n=ec();null!==(e=Po(e,t))&&(vt(e,t,n),rc(e,n))}function Ac(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Oc(e,n)}function Cc(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(o(314))}null!==r&&r.delete(t),Oc(e,n)}function kc(e,t){return Ge(e,t)}function Mc(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Nc(e,t,n,r){return new Mc(e,t,n,r)}function Dc(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Rc(e,t){var n=e.alternate;return null===n?((n=Nc(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Lc(e,t,n,r,i,a){var s=2;if(r=e,"function"==typeof e)Dc(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case x:return Pc(n.children,i,a,t);case S:s=8,i|=8;break;case T:return(e=Nc(12,n,t,2|i)).elementType=T,e.lanes=a,e;case k:return(e=Nc(13,n,t,i)).elementType=k,e.lanes=a,e;case M:return(e=Nc(19,n,t,i)).elementType=M,e.lanes=a,e;case R:return Ic(n,i,a,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case O:s=10;break e;case A:s=9;break e;case C:s=11;break e;case N:s=14;break e;case D:s=16,r=null;break e}throw Error(o(130,null==e?e:typeof e,""))}return(t=Nc(s,n,t,i)).elementType=e,t.type=r,t.lanes=a,t}function Pc(e,t,n,r){return(e=Nc(7,e,r,t)).lanes=n,e}function Ic(e,t,n,r){return(e=Nc(22,e,r,t)).elementType=R,e.lanes=n,e.stateNode={isHidden:!1},e}function $c(e,t,n){return(e=Nc(6,e,null,t)).lanes=n,e}function zc(e,t,n){return(t=Nc(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Bc(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=gt(0),this.expirationTimes=gt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function jc(e,t,n,r,i,o,a,s,l){return e=new Bc(e,t,n,s,l),1===t?(t=1,!0===o&&(t|=8)):t=0,o=Nc(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},$o(o),e}function Fc(e){if(!e)return Ai;e:{if(Ue(e=e._reactInternals)!==e||1!==e.tag)throw Error(o(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Di(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(o(171))}if(1===e.tag){var n=e.type;if(Di(n))return Pi(e,n,t)}return t}function Uc(e,t,n,r,i,o,a,s,l){return(e=jc(n,r,!0,e,0,o,0,s,l)).context=Fc(null),n=e.current,(o=Bo(r=ec(),i=tc(n))).callback=null!=t?t:null,jo(n,o,i),e.current.lanes=i,vt(e,i,r),rc(e,r),e}function Hc(e,t,n,r){var i=t.current,o=ec(),a=tc(i);return n=Fc(n),null===t.context?t.context=n:t.pendingContext=n,(t=Bo(o,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=jo(i,t,a))&&(nc(e,i,a,o),Fo(e,i,a)),a}function Vc(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Zc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Wc(e,t){Zc(e,t),(e=e.alternate)&&Zc(e,t)}xl=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||ki.current)bs=!0;else{if(0==(e.lanes&n)&&0==(128&t.flags))return bs=!1,function(e,t,n){switch(t.tag){case 3:ks(t),po();break;case 5:Qo(t);break;case 1:Di(t.type)&&Ii(t);break;case 4:Ko(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Oi(xo,r._currentValue),r._currentValue=i;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Oi(ea,1&ea.current),t.flags|=128,null):0!=(n&t.child.childLanes)?$s(e,t,n):(Oi(ea,1&ea.current),null!==(e=Vs(e,t,n))?e.sibling:null);Oi(ea,1&ea.current);break;case 19:if(r=0!=(n&t.childLanes),0!=(128&e.flags)){if(r)return Us(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),Oi(ea,ea.current),r)break;return null;case 22:case 23:return t.lanes=0,Ss(e,t,n)}return Vs(e,t,n)}(e,t,n);bs=0!=(131072&e.flags)}else bs=!1,io&&0!=(1048576&t.flags)&&Ji(t,Wi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Hs(e,t),e=t.pendingProps;var i=Ni(t,Ci.current);Mo(t,n),i=ga(null,t,r,e,i,n);var a=va();return t.flags|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Di(r)?(a=!0,Ii(t)):a=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,$o(t),i.updater=is,t.stateNode=i,i._reactInternals=t,ls(t,r,e,n),t=Cs(null,t,r,!0,a,n)):(t.tag=0,io&&a&&eo(t),ws(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Hs(e,t),e=t.pendingProps,r=(i=r._init)(r._payload),t.type=r,i=t.tag=function(e){if("function"==typeof e)return Dc(e)?1:0;if(null!=e){if((e=e.$$typeof)===C)return 11;if(e===N)return 14}return 2}(r),e=ns(r,e),i){case 0:t=Os(null,t,r,e,n);break e;case 1:t=As(null,t,r,e,n);break e;case 11:t=_s(null,t,r,e,n);break e;case 14:t=Es(null,t,r,ns(r.type,e),n);break e}throw Error(o(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,Os(e,t,r,i=t.elementType===r?i:ns(r,i),n);case 1:return r=t.type,i=t.pendingProps,As(e,t,r,i=t.elementType===r?i:ns(r,i),n);case 3:e:{if(ks(t),null===e)throw Error(o(387));r=t.pendingProps,i=(a=t.memoizedState).element,zo(e,t),Ho(t,r,null,n);var s=t.memoizedState;if(r=s.element,a.isDehydrated){if(a={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=a,t.memoizedState=a,256&t.flags){t=Ms(e,t,r,n,i=cs(Error(o(423)),t));break e}if(r!==i){t=Ms(e,t,r,n,i=cs(Error(o(424)),t));break e}for(ro=ci(t.stateNode.containerInfo.firstChild),no=t,io=!0,oo=null,n=Eo(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(po(),r===i){t=Vs(e,t,n);break e}ws(e,t,r,n)}t=t.child}return t;case 5:return Qo(t),null===e&&co(t),r=t.type,i=t.pendingProps,a=null!==e?e.memoizedProps:null,s=i.children,ni(r,i)?s=null:null!==a&&ni(r,a)&&(t.flags|=32),Ts(e,t),ws(e,t,s,n),t.child;case 6:return null===e&&co(t),null;case 13:return $s(e,t,n);case 4:return Ko(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=_o(t,null,r,n):ws(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,_s(e,t,r,i=t.elementType===r?i:ns(r,i),n);case 7:return ws(e,t,t.pendingProps,n),t.child;case 8:case 12:return ws(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,a=t.memoizedProps,s=i.value,Oi(xo,r._currentValue),r._currentValue=s,null!==a)if(sr(a.value,s)){if(a.children===i.children&&!ki.current){t=Vs(e,t,n);break e}}else for(null!==(a=t.child)&&(a.return=t);null!==a;){var l=a.dependencies;if(null!==l){s=a.child;for(var c=l.firstContext;null!==c;){if(c.context===r){if(1===a.tag){(c=Bo(-1,n&-n)).tag=2;var u=a.updateQueue;if(null!==u){var d=(u=u.shared).pending;null===d?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}a.lanes|=n,null!==(c=a.alternate)&&(c.lanes|=n),ko(a.return,n,t),l.lanes|=n;break}c=c.next}}else if(10===a.tag)s=a.type===t.type?null:a.child;else if(18===a.tag){if(null===(s=a.return))throw Error(o(341));s.lanes|=n,null!==(l=s.alternate)&&(l.lanes|=n),ko(s,n,t),s=a.sibling}else s=a.child;if(null!==s)s.return=a;else for(s=a;null!==s;){if(s===t){s=null;break}if(null!==(a=s.sibling)){a.return=s.return,s=a;break}s=s.return}a=s}ws(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Mo(t,n),r=r(i=No(i)),t.flags|=1,ws(e,t,r,n),t.child;case 14:return i=ns(r=t.type,t.pendingProps),Es(e,t,r,i=ns(r.type,i),n);case 15:return xs(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ns(r,i),Hs(e,t),t.tag=1,Di(r)?(e=!0,Ii(t)):e=!1,Mo(t,n),as(t,r,i),ls(t,r,i,n),Cs(null,t,r,!0,e,n);case 19:return Us(e,t,n);case 22:return Ss(e,t,n)}throw Error(o(156,t.tag))};var Gc="function"==typeof reportError?reportError:function(e){console.error(e)};function qc(e){this._internalRoot=e}function Yc(e){this._internalRoot=e}function Kc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Xc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Qc(){}function Jc(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o;if("function"==typeof i){var s=i;i=function(){var e=Vc(a);s.call(e)}}Hc(t,a,e,i)}else a=function(e,t,n,r,i){if(i){if("function"==typeof r){var o=r;r=function(){var e=Vc(a);o.call(e)}}var a=Uc(t,r,e,0,null,!1,0,"",Qc);return e._reactRootContainer=a,e[pi]=a.current,Ur(8===e.nodeType?e.parentNode:e),uc(),a}for(;i=e.lastChild;)e.removeChild(i);if("function"==typeof r){var s=r;r=function(){var e=Vc(l);s.call(e)}}var l=jc(e,0,!1,null,0,!1,0,"",Qc);return e._reactRootContainer=l,e[pi]=l.current,Ur(8===e.nodeType?e.parentNode:e),uc((function(){Hc(t,l,n,r)})),l}(n,t,e,i,r);return Vc(a)}Yc.prototype.render=qc.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(o(409));Hc(e,t,null,null)},Yc.prototype.unmount=qc.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;uc((function(){Hc(null,e,null,null)})),t[pi]=null}},Yc.prototype.unstable_scheduleHydration=function(e){if(e){var t=St();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Rt.length&&0!==t&&t<Rt[n].priority;n++);Rt.splice(n,0,e),0===n&&$t(e)}},_t=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=dt(t.pendingLanes);0!==n&&(yt(t,1|n),rc(t,Xe()),0==(6&Cl)&&(Ul=Xe()+500,Ui()))}break;case 13:uc((function(){var t=Po(e,1);if(null!==t){var n=ec();nc(t,e,1,n)}})),Wc(e,1)}},Et=function(e){if(13===e.tag){var t=Po(e,134217728);null!==t&&nc(t,e,134217728,ec()),Wc(e,134217728)}},xt=function(e){if(13===e.tag){var t=tc(e),n=Po(e,t);null!==n&&nc(n,e,t,ec()),Wc(e,t)}},St=function(){return bt},Tt=function(e,t){var n=bt;try{return bt=e,t()}finally{bt=n}},Ee=function(e,t,n){switch(t){case"input":if(Q(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=_i(r);if(!i)throw Error(o(90));G(r),Q(r,i)}}}break;case"textarea":oe(e,n);break;case"select":null!=(t=n.value)&&ne(e,!!n.multiple,t,!1)}},Ce=cc,ke=uc;var eu={usingClientEntryPoint:!1,Events:[bi,wi,_i,Oe,Ae,cc]},tu={findFiberByHostInstance:yi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},nu={bundleType:tu.bundleType,version:tu.version,rendererPackageName:tu.rendererPackageName,rendererConfig:tu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:w.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Ze(e))?null:e.stateNode},findFiberByHostInstance:tu.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var ru=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ru.isDisabled&&ru.supportsFiber)try{it=ru.inject(nu),ot=ru}catch(ue){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=eu,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Kc(t))throw Error(o(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:E,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.createRoot=function(e,t){if(!Kc(e))throw Error(o(299));var n=!1,r="",i=Gc;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(i=t.onRecoverableError)),t=jc(e,1,!1,null,0,n,0,r,i),e[pi]=t.current,Ur(8===e.nodeType?e.parentNode:e),new qc(t)},t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(o(188));throw e=Object.keys(e).join(","),Error(o(268,e))}return null===(e=Ze(t))?null:e.stateNode},t.flushSync=function(e){return uc(e)},t.hydrate=function(e,t,n){if(!Xc(t))throw Error(o(200));return Jc(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!Kc(e))throw Error(o(405));var r=null!=n&&n.hydratedSources||null,i=!1,a="",s=Gc;if(null!=n&&(!0===n.unstable_strictMode&&(i=!0),void 0!==n.identifierPrefix&&(a=n.identifierPrefix),void 0!==n.onRecoverableError&&(s=n.onRecoverableError)),t=Uc(t,null,e,1,null!=n?n:null,i,0,a,s),e[pi]=t.current,Ur(e),r)for(e=0;e<r.length;e++)i=(i=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Yc(t)},t.render=function(e,t,n){if(!Xc(t))throw Error(o(200));return Jc(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Xc(e))throw Error(o(40));return!!e._reactRootContainer&&(uc((function(){Jc(null,null,e,!1,(function(){e._reactRootContainer=null,e[pi]=null}))})),!0)},t.unstable_batchedUpdates=cc,t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Xc(n))throw Error(o(200));if(null==e||void 0===e._reactInternals)throw Error(o(38));return Jc(e,t,n,!1,r)},t.version="18.3.1-next-f1338f8080-20240426"},8316:(e,t,n)=>{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(2967)},6866:(e,t)=>{"use strict";var n=Symbol.for("react.element");Symbol.for("react.portal"),Symbol.for("react.fragment"),Symbol.for("react.strict_mode"),Symbol.for("react.profiler"),Symbol.for("react.provider"),Symbol.for("react.context"),Symbol.for("react.server_context"),Symbol.for("react.forward_ref"),Symbol.for("react.suspense"),Symbol.for("react.suspense_list"),Symbol.for("react.memo"),Symbol.for("react.lazy"),Symbol.for("react.offscreen");Symbol.for("react.module.reference"),t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}},8570:(e,t,n)=>{"use strict";e.exports=n(6866)},6475:(e,t)=>{"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,i=e[r];if(!(0<o(i,t)))break e;e[r]=t,e[n]=i,n=r}}function r(e){return 0===e.length?null:e[0]}function i(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length,a=i>>>1;r<a;){var s=2*(r+1)-1,l=e[s],c=s+1,u=e[c];if(0>o(l,n))c<i&&0>o(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[s]=n,r=s);else{if(!(c<i&&0>o(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function o(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var c=[],u=[],d=1,h=null,f=3,p=!1,m=!1,g=!1,v="function"==typeof setTimeout?setTimeout:null,y="function"==typeof clearTimeout?clearTimeout:null,b="undefined"!=typeof setImmediate?setImmediate:null;function w(e){for(var t=r(u);null!==t;){if(null===t.callback)i(u);else{if(!(t.startTime<=e))break;i(u),t.sortIndex=t.expirationTime,n(c,t)}t=r(u)}}function _(e){if(g=!1,w(e),!m)if(null!==r(c))m=!0,R(E);else{var t=r(u);null!==t&&L(_,t.startTime-e)}}function E(e,n){m=!1,g&&(g=!1,y(O),O=-1),p=!0;var o=f;try{for(w(n),h=r(c);null!==h&&(!(h.expirationTime>n)||e&&!k());){var a=h.callback;if("function"==typeof a){h.callback=null,f=h.priorityLevel;var s=a(h.expirationTime<=n);n=t.unstable_now(),"function"==typeof s?h.callback=s:h===r(c)&&i(c),w(n)}else i(c);h=r(c)}if(null!==h)var l=!0;else{var d=r(u);null!==d&&L(_,d.startTime-n),l=!1}return l}finally{h=null,f=o,p=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var x,S=!1,T=null,O=-1,A=5,C=-1;function k(){return!(t.unstable_now()-C<A)}function M(){if(null!==T){var e=t.unstable_now();C=e;var n=!0;try{n=T(!0,e)}finally{n?x():(S=!1,T=null)}}else S=!1}if("function"==typeof b)x=function(){b(M)};else if("undefined"!=typeof MessageChannel){var N=new MessageChannel,D=N.port2;N.port1.onmessage=M,x=function(){D.postMessage(null)}}else x=function(){v(M,0)};function R(e){T=e,S||(S=!0,x())}function L(e,n){O=v((function(){e(t.unstable_now())}),n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){m||p||(m=!0,R(E))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return f},t.unstable_getFirstCallbackNode=function(){return r(c)},t.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},t.unstable_scheduleCallback=function(e,i,o){var a=t.unstable_now();switch(o="object"==typeof o&&null!==o&&"number"==typeof(o=o.delay)&&0<o?a+o:a,e){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return e={id:d++,callback:i,priorityLevel:e,startTime:o,expirationTime:s=o+s,sortIndex:-1},o>a?(e.sortIndex=o,n(u,e),null===r(c)&&e===r(u)&&(g?(y(O),O=-1):g=!0,L(_,o-a))):(e.sortIndex=s,n(c,e),m||p||(m=!0,R(E))),e},t.unstable_shouldYield=k,t.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}},4616:(e,t,n)=>{"use strict";e.exports=n(6475)},7210:(e,t,n)=>{"use strict";var r=n(2870),i=(r.Type.String,r.Type.String,r.Type.Boolean,r.Type.String,r.Type.Array,r.Type.ConceptUuid,r.Type.String,r.Type.String,r.Type.Number,r.validators.inRange(0,10),r.Type.Number,r.Type.Boolean,r.Type.Array,r.Type.String,r.Type.String,r.Type.Boolean,n(7900)),o=n.n(i),a=n(4924),s=n(526),l=n(5508),c=n(2074),u=n(884),d=n(3255);function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e){var t,n,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=(0,r.useConfig)(),a=o.encounterTypes,s=o.data,l=a.length?"&encounter.type=".concat(a.toString()):"",c="".concat(r.fhirBaseUrl,"/Observation?subject:Patient=").concat(e,"&code=").concat(s.map((function(e){return e.concept})).join(","),"&_summary=data&_sort=-date&_count=").concat(100).concat(l);i&&(c+="&_include=Observation:encounter");var u,f=(0,d.ZP)(c,r.openmrsFetch),p=f.data,m=f.error,g=f.isLoading,v=f.isValidating,y=i?null==(u=null==p||null===(t=p.data)||void 0===t?void 0:t.entry)?void 0:u.filter((function(e){var t;return"Encounter"===(null==e||null===(t=e.resource)||void 0===t?void 0:t.resourceType)})).map((function(e){var t,n,r,i;return{reference:"Encounter/".concat(e.resource.id),display:(null===(i=e.resource.type)||void 0===i||null===(r=i[0])||void 0===r||null===(n=r.coding)||void 0===n||null===(t=n[0])||void 0===t?void 0:t.display)||"--"}})):[],b=function(e,t){var n;return(null==e||null===(n=e.filter((function(e){var t;return"Observation"===(null==e||null===(t=e.resource)||void 0===t?void 0:t.resourceType)})))||void 0===n?void 0:n.map((function(e){var n,r,i,o,a=e.resource,s=(i=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){h(e,t,n[t])}))}return e}({},a),o=null!=(o={conceptUuid:null===(n=a.code.coding.find((function(e){return 36===e.code.length})))||void 0===n?void 0:n.code})?o:{},Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(o)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(o)).forEach((function(e){Object.defineProperty(i,e,Object.getOwnPropertyDescriptor(o,e))})),i);return a.hasOwnProperty("valueDateTime")&&(s.dataType="DateTime"),e.resource.hasOwnProperty("valueString")&&(s.dataType="Text"),e.resource.hasOwnProperty("valueQuantity")&&(s.dataType="Number"),e.resource.hasOwnProperty("valueCodeableConcept")&&(s.dataType="Coded"),s.encounter.name=null===(r=t.find((function(e){return e.reference===a.encounter.reference})))||void 0===r?void 0:r.display,s})))||[]}(null==p||null===(n=p.data)||void 0===n?void 0:n.entry,y);return{data:b,error:m,isLoading:g,isValidating:v}}var p=n(2524),m=n.n(p),g=n(5771),v=n(321),y=n.n(v),b=n(1195),w=n.n(b),_=n(3275),E=n.n(_),x=n(7162),S=n.n(x),T=n(2094),O=n.n(T),A=n(757),C=n.n(A),k=n(4512),M={};M.styleTagTransform=C(),M.setAttributes=S(),M.insert=E().bind(null,"head"),M.domAPI=w(),M.insertStyleElement=O(),y()(k.Z,M);const N=k.Z&&k.Z.locals?k.Z.locals:void 0;function D(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var R;!function(e){e.TIME="time",e.LINEAR="linear",e.LOG="log",e.LABELS="labels",e.LABELS_RATIO="labels-ratio"}(R||(R={}));const L=function(e){var t,n,l,c,u=e.patientUuid,d=(0,a.useTranslation)().t,h=(0,r.useConfig)(),p=f(u).data,v=(l=o().useState({label:null===(t=h.data[0])||void 0===t?void 0:t.label,uuid:null===(n=h.data[0])||void 0===n?void 0:n.concept}),c=2,function(e){if(Array.isArray(e))return e}(l)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(l,c)||function(e,t){if(e){if("string"==typeof e)return D(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?D(e,t):void 0}}(l,c)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),y=v[0],b=v[1],w=(0,i.useMemo)((function(){var e=p.filter((function(e){return e.conceptUuid===y.uuid&&"Number"===e.dataType})).map((function(e){return{group:y.label,key:(0,r.formatDate)(new Date(e.effectiveDateTime),{year:!0,time:!1}),value:e.valueQuantity.value}}));return h.graphOldestFirst&&e.reverse(),e}),[p,h.graphOldestFirst,y.uuid,y.label]),_=Object.fromEntries(h.data.map((function(e){return[e.label,e.color]}))),E={axes:{bottom:{title:"Date",mapsTo:"key",scaleType:"labels"},left:{mapsTo:"value",title:y.label,scaleType:"linear",includeZero:!1}},legend:{enabled:!1},color:{scale:_},height:"400px"};return o().createElement(o().Fragment,null,o().createElement("div",{className:N.graphContainer},o().createElement("div",{className:N.conceptPickerTabs},o().createElement("label",{className:N.conceptLabel,htmlFor:"concept-tab-group"},d("displaying","Displaying")),o().createElement(s.mQc,{id:"concept-tab-group",className:N.verticalTabs,type:"default"},o().createElement(s.tdY,{className:N.tablist,"aria-label":"Obs tabs"},h.data.map((function(e,t){var n,r,i,a=e.concept,l=e.label,c=m()(N.tab,N.bodyLong01,(n={},r=N.selectedTab,i=y.label===l,r in n?Object.defineProperty(n,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[r]=i,n));return o().createElement(s.OK9,{key:a,className:c,onClick:function(){return b({label:l,uuid:a})}},l)}))))),o().createElement("div",{className:N.lineChartContainer},o().createElement(g.wW,{data:w.flat(),options:E}))),h.interpretationSlot?o().createElement("div",null,o().createElement(r.ExtensionSlot,{name:h.interpretationSlot,style:{gridTemplateColumns:"1fr"}})):null)};var P=n(5136),I={};I.styleTagTransform=C(),I.setAttributes=S(),I.insert=E().bind(null,"head"),I.domAPI=w(),I.insertStyleElement=O(),y()(P.Z,I);const $=P.Z&&P.Z.locals?P.Z.locals:void 0;function z(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function B(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function j(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){B(e,t,n[t])}))}return e}function F(e){return function(e){if(Array.isArray(e))return z(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return z(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?z(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const U=function(e){var t=e.patientUuid,n=(0,a.useTranslation)().t,i=(0,r.useConfig)(),l=f(t,i.showEncounterType),c=l.data,d=(l.error,l.isLoading,l.isValidating,F(new Set(c.map((function(e){return e.issued})))).sort().map((function(e){return c.filter((function(t){return t.issued===e}))}))),h=[{key:"date",header:n("dateAndTime","Date and time"),isSortable:!0}].concat(F(i.data.map((function(e){return{key:e.concept,header:e.label}}))));i.showEncounterType&&h.splice(1,0,{key:"encounter",header:n("encounterType","Encounter type"),isSortable:!0});var p=o().useMemo((function(){return null==d?void 0:d.map((function(e,t){var n={id:"".concat(t),date:(0,r.formatDatetime)(new Date(e[0].effectiveDateTime),{mode:"wide"}),encounter:e[0].encounter.name},o=!0,a=!1,s=void 0;try{for(var l,c=function(){var e=l.value;switch(e.dataType){case"Text":n[e.conceptUuid]=e.valueString;break;case"Number":var t,o,a,s,c,u=null===(t=i.data.find((function(t){return t.concept===e.conceptUuid})))||void 0===t?void 0:t.decimalPlaces;(null===(o=e.valueQuantity)||void 0===o?void 0:o.value)%1!=0?n[e.conceptUuid]=u>0?null===(a=e.valueQuantity)||void 0===a?void 0:a.value.toFixed(u):null===(s=e.valueQuantity)||void 0===s?void 0:s.value.toFixed(2):n[e.conceptUuid]=null===(c=e.valueQuantity)||void 0===c?void 0:c.value;break;case"Coded":var d,h;n[e.conceptUuid]=null===(h=e.valueCodeableConcept)||void 0===h||null===(d=h.coding[0])||void 0===d?void 0:d.display;break;case"DateTime":"dateTime"===(null==i?void 0:i.dateFormat)?n[e.conceptUuid]=(0,r.formatDatetime)(new Date(e.valueDateTime),{mode:"standard"}):"time"===(null==i?void 0:i.dateFormat)?n[e.conceptUuid]=(0,r.formatTime)(new Date(e.valueDateTime)):"date"===(null==i?void 0:i.dateFormat)?n[e.conceptUuid]=(0,r.formatDate)(new Date(e.valueDateTime),{mode:"standard"}):n[e.conceptUuid]=(0,r.formatDatetime)(new Date(e.valueDateTime),{mode:"standard"})}},u=e[Symbol.iterator]();!(o=(l=u.next()).done);o=!0)c()}catch(e){a=!0,s=e}finally{try{o||null==u.return||u.return()}finally{if(a)throw s}}return n}))}),[i,d]),m=(0,r.usePagination)(p,i.table.pageSize),g=m.results,v=m.goTo,y=m.currentPage;return o().createElement("div",null,o().createElement(s.wQF,{rows:g,headers:h,isSortable:!0,size:"sm",useZebraStyles:!0},(function(e){var t,n,r=e.rows,i=e.headers,a=e.getHeaderProps,l=e.getTableProps;return o().createElement(s.xJi,null,o().createElement(s.iA_,(t=j({},l()),n=null!=(n={className:$.customRow})?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})),t),o().createElement(s.ssF,null,o().createElement(s.SCH,null,i.map((function(e){var t,n;return o().createElement(s.xDH,j({className:$.tableHeader},a({header:e,isSortable:e.isSortable})),null!==(n=null===(t=e.header)||void 0===t?void 0:t.content)&&void 0!==n?n:e.header)})))),o().createElement(s.RMI,null,r.map((function(e){return o().createElement(s.SCH,{key:e.id},e.cells.map((function(e){var t,n,r;return o().createElement(s.pj1,{key:e.id},null!==(r=null!==(n=null===(t=e.value)||void 0===t?void 0:t.content)&&void 0!==n?n:e.value)&&void 0!==r?r:"--")})))})))))})),o().createElement(u.PatientChartPagination,{pageNumber:y,totalItems:p.length,currentItems:g.length,pageSize:i.table.pageSize,onPageNumberChange:function(e){var t=e.page;return v(t)}}))};var H=n(1897),V={};V.styleTagTransform=C(),V.setAttributes=S(),V.insert=E().bind(null,"head"),V.domAPI=w(),V.insertStyleElement=O(),y()(H.Z,V);const Z=H.Z&&H.Z.locals?H.Z.locals:void 0;function W(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function G(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function q(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){G(e,t,n[t])}))}return e}n(3979);var Y={featureName:"Generic widgets",moduleName:"@openmrs/esm-generic-patient-widgets-app"};(0,r.getSyncLifecycle)((function(e){var t,n,i=e.patientUuid,d=(0,a.useTranslation)().t,h=(0,r.useConfig)(),p=(t=o().useState(h.showGraphByDefault),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(t,n)||function(e,t){if(e){if("string"==typeof e)return W(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?W(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),m=p[0],g=p[1],v=f(i),y=v.data,b=v.error,w=v.isLoading,_=v.isValidating,E=y.find((function(e){return"Number"===e.dataType}));return o().createElement(o().Fragment,null,w?o().createElement(s.gqd,{role:"progressbar"}):b?o().createElement(u.ErrorState,{error:b,headerTitle:h.title}):(null==y?void 0:y.length)?o().createElement("div",{className:Z.widgetContainer},o().createElement(u.CardHeader,{title:h.title},o().createElement("div",{className:Z.backgroundDataFetchingIndicator},o().createElement("span",null,_?o().createElement(s.lSo,null):null)),E?o().createElement("div",{className:Z.headerActionItems},o().createElement("div",{className:Z.toggleButtons},o().createElement(s.zxk,{className:Z.toggle,size:"md",kind:m?"ghost":"tertiary",hasIconOnly:!0,renderIcon:function(e){return o().createElement(l.iA,q({size:16},e))},iconDescription:d("tableView","Table View"),onClick:function(){return g(!1)}}),o().createElement(s.zxk,{className:Z.toggle,size:"md",kind:m?"tertiary":"ghost",hasIconOnly:!0,renderIcon:function(e){return o().createElement(c.eA,q({size:16},e))},iconDescription:d("chartView","Chart View"),onClick:function(){return g(!0)}}))):null),m&&E?o().createElement(L,{patientUuid:i}):o().createElement(U,{patientUuid:i})):o().createElement(u.EmptyState,{displayText:h.resultsName,headerTitle:h.title}))}),Y)},452:(e,t,n)=>{"use strict";var r=n(7900),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=r.useState,a=r.useEffect,s=r.useLayoutEffect,l=r.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=o({inst:{value:n,getSnapshot:t}}),i=r[0].inst,u=r[1];return s((function(){i.value=n,i.getSnapshot=t,c(i)&&u({inst:i})}),[e,n,t]),a((function(){return c(i)&&u({inst:i}),e((function(){c(i)&&u({inst:i})}))}),[e]),l(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:u},3100:(e,t,n)=>{"use strict";e.exports=n(452)},3883:function(e,t,n){"use strict";e.exports="object"==typeof self&&self.self===self&&self||"object"==typeof n.g&&n.g.global===n.g&&n.g||this},3979:(e,t,n)=>{var r={"./am.json":[8788,788],"./ar.json":[4460,460],"./en.json":[3574,574],"./es.json":[8319,319],"./fr.json":[2757,757],"./he.json":[5833,833],"./km.json":[7807,807],"./zh.json":[8271,271],"./zh_CN.json":[1644,644]};function i(e){if(!n.o(r,e))return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=r[e],i=t[0];return n.e(t[1]).then((()=>n(i)))}i.keys=()=>Object.keys(r),i.id=3979,e.exports=i},2524:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=a(e,o(n)))}return e}function o(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return i.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)r.call(e,n)&&e[n]&&(t=a(t,n));return t}function a(e,t){return t?e?e+" "+t:e+t:e}e.exports?(i.default=i,e.exports=i):void 0===(n=function(){return i}.apply(t,[]))||(e.exports=n)}()},5771:(e,t,n)=>{"use strict";n.d(t,{wW:()=>M_});var r=n(7900),i=Object.defineProperty,o=(e,t,n)=>(((e,t,n)=>{t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n),a=(e=>(e.RENDER_FINISHED="render-finished",e.RESIZE="chart-resize",e.MOUSEOVER="chart-mouseover",e.MOUSEOUT="chart-mouseout",e))(a||{}),s=(e=>(e.SHOW="show-modal",e.HIDE="hide-modal",e))(s||{}),l=(e=>(e.UPDATE="model-update",e))(l||{}),c=(e=>(e.SHOW_OVERFLOW_MENU="show-toolbar-overflow-menu",e.HIDE_OVERFLOW_MENU="hide-toolbar-overflow-menu",e.BUTTON_CLICK="toolbar-button-click",e))(c||{}),u=(e=>(e.UPDATE="zoom-bar-update",e.SELECTION_START="zoom-bar-selection-start",e.SELECTION_IN_PROGRESS="zoom-bar-selection-in-progress",e.SELECTION_END="zoom-bar-selection-end",e))(u||{}),d=(e=>(e.CHANGE="zoom-domain-change",e))(d||{}),h=(e=>(e.CANVAS_ZOOM_IN="canvas-zoom-in",e.CANVAS_ZOOM_OUT="canvas-zoom-out",e))(h||{}),f=(e=>(e.LABEL_MOUSEOVER="axis-label-mouseover",e.LABEL_MOUSEMOVE="axis-label-mousemove",e.LABEL_CLICK="axis-label-click",e.LABEL_MOUSEOUT="axis-label-mouseout",e.LABEL_FOCUS="axis-label-focus",e.LABEL_BLUR="axis-label-blur",e.RENDER_COMPLETE="axis-render-complete",e))(f||{}),p=(e=>(e.POINT_MOUSEOVER="scatter-mouseover",e.POINT_MOUSEMOVE="scatter-mousemove",e.POINT_CLICK="scatter-click",e.POINT_MOUSEOUT="scatter-mouseout",e))(p||{}),m=(e=>(e.WORD_MOUSEOVER="wordcloud-word-mouseover",e.WORD_MOUSEMOVE="wordcloud-word-mousemove",e.WORD_CLICK="wordcloud-word-click",e.WORD_MOUSEOUT="wordcloud-word-mouseout",e))(m||{}),g=(e=>(e.SLICE_MOUSEOVER="pie-slice-mouseover",e.SLICE_MOUSEMOVE="pie-slice-mousemove",e.SLICE_CLICK="pie-slice-click",e.SLICE_MOUSEOUT="pie-slice-mouseout",e))(g||{}),v=(e=>(e.ARC_MOUSEOVER="gauge-arc-mouseover",e.ARC_MOUSEMOVE="gauge-arc-mousemove",e.ARC_CLICK="gauge-arc-click",e.ARC_MOUSEOUT="gauge-arc-mouseout",e))(v||{}),y=(e=>(e.BAR_MOUSEOVER="bar-mouseover",e.BAR_MOUSEMOVE="bar-mousemove",e.BAR_CLICK="bar-click",e.BAR_MOUSEOUT="bar-mouseout",e))(y||{}),b=(e=>(e.BOX_MOUSEOVER="box-mouseover",e.BOX_MOUSEMOVE="box-mousemove",e.BOX_CLICK="box-click",e.BOX_MOUSEOUT="box-mouseout",e.OUTLIER_MOUSEOVER="outlier-mouseover",e.OUTLIER_MOUSEMOVE="outlier-mousemove",e.OUTLIER_CLICK="outlier-click",e.OUTLIER_MOUSEOUT="outlier-mouseout",e))(b||{}),w=(e=>(e.SCATTER_MOUSEOVER="scatter-mouseover",e.SCATTER_MOUSEMOVE="scatter-mousemove",e.SCATTER_CLICK="scatter-click",e.SCATTER_MOUSEOUT="scatter-mouseout",e))(w||{}),_=(e=>(e.POINT_MOUSEOVER="scatter-mouseover",e.POINT_MOUSEMOVE="scatter-mousemove",e.POINT_CLICK="scatter-click",e.POINT_MOUSEOUT="scatter-mouseout",e))(_||{}),E=(e=>(e.X_AXIS_MOUSEOVER="radar-x-axis-mouseover",e.X_AXIS_MOUSEMOVE="radar-x-axis-mousemove",e.X_AXIS_CLICK="radar-x-axis-click",e.X_AXIS_MOUSEOUT="radar-x-axis-mouseout",e))(E||{}),x=(e=>(e.NODE_MOUSEOVER="tree-node-mouseover",e.NODE_CLICK="tree-node-click",e.NODE_MOUSEOUT="tree-node-mouseout",e))(x||{}),S=(e=>(e.LEAF_MOUSEOVER="leaf-mouseover",e.LEAF_MOUSEMOVE="leaf-mousemove",e.LEAF_CLICK="leaf-click",e.LEAF_MOUSEOUT="leaf-mouseout",e))(S||{}),T=(e=>(e.SHOW="show-tooltip",e.MOVE="move-tooltip",e.HIDE="hide-tooltip",e))(T||{}),O=(e=>(e.SHOW="show-threshold",e.HIDE="hide-threshold",e))(O||{}),A=(e=>(e.ITEM_HOVER="legend-item-onhover",e.ITEM_CLICK="legend-item-onclick",e.ITEM_MOUSEOUT="legend-item-onmouseout",e.ITEMS_UPDATE="legend-items-update",e))(A||{}),C=(e=>(e.CIRCLE_MOUSEOVER="circle-leaf-mouseover",e.CIRCLE_CLICK="circle-leaf-click",e.CIRCLE_MOUSEOUT="circle-leaf-mouseout",e.CIRCLE_MOUSEMOVE="circle-leaf-mousemove",e))(C||{}),k=(e=>(e.NODE_MOUSEOVER="alluvial-node-mouseover",e.NODE_CLICK="alluvial-node-click",e.NODE_MOUSEOUT="alluvial-node-mouseout",e.NODE_MOUSEMOVE="alluvial-node-mousemove",e.LINE_MOUSEOVER="alluvial-line-mouseover",e.LINE_CLICK="alluvial-line-click",e.LINE_MOUSEOUT="alluvial-line-mouseout",e.LINE_MOUSEMOVE="alluvial-line-mousemove",e))(k||{}),M=(e=>(e.METER_MOUSEOVER="meter-mouseover",e.METER_CLICK="meter-click",e.METER_MOUSEOUT="meter-mouseout",e.METER_MOUSEMOVE="meter-mousemove",e))(M||{}),N=(e=>(e.HEATMAP_MOUSEOVER="heatmap-mouseover",e.HEATMAP_CLICK="heatmap-click",e.HEATMAP_MOUSEOUT="heatmap-mouseout",e.HEATMAP_MOUSEMOVE="hetmap-mousemove",e))(N||{}),D=(e=>(e.CHOROPLETH_MOUSEOVER="choropleth-mouseover",e.CHOROPLETH_CLICK="choropleth-click",e.CHOROPLETH_MOUSEOUT="choropleth-mouseout",e.CHOROPLETH_MOUSEMOVE="choropleth-mousemove",e))(D||{});const R=Object.freeze(Object.defineProperty({__proto__:null,Alluvial:k,Area:p,Axis:f,Bar:y,Boxplot:b,CanvasZoom:h,Chart:a,Choropleth:D,CirclePack:C,Gauge:v,Heatmap:N,Legend:A,Line:_,Meter:M,Modal:s,Model:l,Pie:g,Radar:E,Scatter:w,Threshold:O,Toolbar:c,Tooltip:T,Tree:x,Treemap:S,WordCloud:m,ZoomBar:u,ZoomDomain:d},Symbol.toStringTag,{value:"Module"}));var L=(e=>(e.HTML="html",e.SVG="svg",e))(L||{}),P=(e=>(e.WHITE="white",e.G100="g100",e.G90="g90",e.G10="g10",e))(P||{}),I=(e=>(e.BACKGROUND="background",e.FILL="fill",e.STROKE="stroke",e.TOOLTIP="tooltip",e))(I||{}),$=(e=>(e.LEFT="left",e.RIGHT="right",e.TOP="top",e.BOTTOM="bottom",e))($||{}),z=(e=>(e.GRAPH_VIEW="graph_view",e.SLIDER_VIEW="slider_view",e))(z||{}),B=(e=>(e.END_LINE="end_line",e.MID_LINE="mid_line",e.FRONT_LINE="front_line",e.NONE="none",e))(B||{}),j=(e=>(e.VERTICAL="vertical",e.HORIZONTAL="horizontal",e))(j||{}),F=(e=>(e.TIME="time",e.LINEAR="linear",e.LOG="log",e.LABELS="labels",e.LABELS_RATIO="labels-ratio",e))(F||{}),U=(e=>(e.RIGHT="right",e.LEFT="left",e.TOP="top",e.BOTTOM="bottom",e))(U||{}),H=(e=>(e.LEFT="left",e.CENTER="center",e.RIGHT="right",e))(H||{}),V=(e=>(e.HORIZONTAL="horizontal",e.VERTICAL="vertical",e))(V||{}),Z=(e=>(e.TREE="tree",e.DENDROGRAM="dendrogram",e))(Z||{}),W=(e=>(e.ROW="row",e.COLUMN="column",e.ROW_REVERSE="row-reverse",e.COLUMN_REVERSE="column-reverse",e))(W||{}),G=(e=>(e.FIXED="fixed",e.PREFERRED="preferred",e.STRETCH="stretch",e))(G||{}),q=(e=>(e.CENTER="center",e))(q||{}),Y=(e=>(e.GRID="grid",e.VERT_OR_HORIZ="vertOrHoriz",e.PIE="pie",e.DONUT="donut",e))(Y||{}),K=(e=>(e.SEMI="semi",e.FULL="full",e))(K||{}),X=(e=>(e.ALWAYS="always",e.AUTO="auto",e.NEVER="never",e))(X||{}),Q=(e=>(e.SCATTER="scatter",e.LINE="line",e.SIMPLE_BAR="simple-bar",e.STACKED_BAR="stacked-bar",e.GROUPED_BAR="grouped-bar",e.AREA="area",e.STACKED_AREA="stacked-area",e))(Q||{}),J=(e=>(e.EXPORT_CSV="Export as CSV",e.EXPORT_PNG="Export as PNG",e.EXPORT_JPG="Export as JPG",e.ZOOM_IN="Zoom in",e.ZOOM_OUT="Zoom out",e.RESET_ZOOM="Reset zoom",e.MAKE_FULLSCREEN="Make fullscreen",e.SHOW_AS_DATATABLE="Show as data-table",e.CUSTOM="Custom",e))(J||{}),ee=(e=>(e.LEFT="left",e.RIGHT="right",e))(ee||{}),te=(e=>(e.CHECKBOX="checkbox",e.RADIUS="radius",e.AREA="area",e.SIZE="size",e.LINE="line",e.QUARTILE="quartile",e.ZOOM="zoom",e))(te||{}),ne=(e=>(e.ON="on",e.AUTO="auto",e.OFF="off",e))(ne||{}),re=(e=>(e.DEFAULT="default",e.HOVERABLE="hoverable",e))(re||{}),ie=(e=>(e.geoEqualEarth="geoEqualEarth",e.geoAlbers="geoAlbers",e.geoConicEqualArea="geoConicEqualArea",e.geoConicEquidistant="geoConicEquidistant",e.geoEquirectangular="geoEquirectangular",e.geoMercator="geoMercator",e.geoNaturalEarth1="geoNaturalEarth1",e))(ie||{});function oe(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ae(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function se(e){let t,n,r;function i(e,r,i=0,o=e.length){if(i<o){if(0!==t(r,r))return o;do{const t=i+o>>>1;n(e[t],r)<0?i=t+1:o=t}while(i<o)}return i}return 2!==e.length?(t=oe,n=(t,n)=>oe(e(t),n),r=(t,n)=>e(t)-n):(t=e===oe||e===ae?e:le,n=e,r=e),{left:i,center:function(e,t,n=0,o=e.length){const a=i(e,t,n,o-1);return a>n&&r(e[a-1],t)>-r(e[a],t)?a-1:a},right:function(e,r,i=0,o=e.length){if(i<o){if(0!==t(r,r))return o;do{const t=i+o>>>1;n(e[t],r)<=0?i=t+1:o=t}while(i<o)}return i}}}function le(){return 0}const ce=se(oe).right;se((function(e){return null===e?NaN:+e})).center;const ue=ce;function de(e,t){let n,r;if(void 0===t)for(const t of e)null!=t&&(void 0===n?t>=t&&(n=r=t):(n>t&&(n=t),r<t&&(r=t)));else{let i=-1;for(let o of e)null!=(o=t(o,++i,e))&&(void 0===n?o>=o&&(n=r=o):(n>o&&(n=o),r<o&&(r=o)))}return[n,r]}class he{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){const t=this._partials;let n=0;for(let r=0;r<this._n&&r<32;r++){const i=t[r],o=e+i,a=Math.abs(e)<Math.abs(i)?e-(o-i):i-(o-e);a&&(t[n++]=a),e=o}return t[n]=e,this._n=n+1,this}valueOf(){const e=this._partials;let t,n,r,i=this._n,o=0;if(i>0){for(o=e[--i];i>0&&(t=o,n=e[--i],o=t+n,r=n-(o-t),!r););i>0&&(r<0&&e[i-1]<0||r>0&&e[i-1]>0)&&(n=2*r,t=o+n,n==t-o&&(o=t))}return o}}class fe extends Map{constructor(e,t=me){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[t,n]of e)this.set(t,n)}get(e){return super.get(pe(this,e))}has(e){return super.has(pe(this,e))}set(e,t){return super.set(function({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}(this,e),t)}delete(e){return super.delete(function({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}(this,e))}}function pe({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function me(e){return null!==e&&"object"==typeof e?e.valueOf():e}function ge(e){return e}var ve=Array.prototype.slice;function ye(e){return()=>e}const be=Math.sqrt(50),we=Math.sqrt(10),_e=Math.sqrt(2);function Ee(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=be?10:o>=we?5:o>=_e?2:1;let s,l,c;return i<0?(c=Math.pow(10,-i)/a,s=Math.round(e*c),l=Math.round(t*c),s/c<e&&++s,l/c>t&&--l,c=-c):(c=Math.pow(10,i)*a,s=Math.round(e/c),l=Math.round(t/c),s*c<e&&++s,l*c>t&&--l),l<s&&.5<=n&&n<2?Ee(e,t,2*n):[s,l,c]}function xe(e,t,n){if(!((n=+n)>0))return[];if((e=+e)==(t=+t))return[e];const r=t<e,[i,o,a]=r?Ee(t,e,n):Ee(e,t,n);if(!(o>=i))return[];const s=o-i+1,l=new Array(s);if(r)if(a<0)for(let e=0;e<s;++e)l[e]=(o-e)/-a;else for(let e=0;e<s;++e)l[e]=(o-e)*a;else if(a<0)for(let e=0;e<s;++e)l[e]=(i+e)/-a;else for(let e=0;e<s;++e)l[e]=(i+e)*a;return l}function Se(e,t,n){return Ee(e=+e,t=+t,n=+n)[2]}function Te(e,t,n){n=+n;const r=(t=+t)<(e=+e),i=r?Se(t,e,n):Se(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function Oe(e){return Math.max(1,Math.ceil(Math.log(function(e,t){let n=0;for(let t of e)null!=t&&(t=+t)>=t&&++n;return n}(e))/Math.LN2)+1)}function Ae(e,t){let n;if(void 0===t)for(const t of e)null!=t&&(n<t||void 0===n&&t>=t)&&(n=t);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n<i||void 0===n&&i>=i)&&(n=i)}return n}function Ce(e){return e}var ke=1,Me=2,Ne=3,De=4,Re=1e-6;function Le(e){return"translate("+e+",0)"}function Pe(e){return"translate(0,"+e+")"}function Ie(e){return t=>+e(t)}function $e(e,t){return t=Math.max(0,e.bandwidth()-2*t)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function ze(){return!this.__axis}function Be(e,t){var n=[],r=null,i=null,o=6,a=6,s=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,c=e===ke||e===De?-1:1,u=e===De||e===Me?"x":"y",d=e===ke||e===Ne?Le:Pe;function h(h){var f=r??(t.ticks?t.ticks.apply(t,n):t.domain()),p=i??(t.tickFormat?t.tickFormat.apply(t,n):Ce),m=Math.max(o,0)+s,g=t.range(),v=+g[0]+l,y=+g[g.length-1]+l,b=(t.bandwidth?$e:Ie)(t.copy(),l),w=h.selection?h.selection():h,_=w.selectAll(".domain").data([null]),E=w.selectAll(".tick").data(f,t).order(),x=E.exit(),S=E.enter().append("g").attr("class","tick"),T=E.select("line"),O=E.select("text");_=_.merge(_.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),E=E.merge(S),T=T.merge(S.append("line").attr("stroke","currentColor").attr(u+"2",c*o)),O=O.merge(S.append("text").attr("fill","currentColor").attr(u,c*m).attr("dy",e===ke?"0em":e===Ne?"0.71em":"0.32em")),h!==w&&(_=_.transition(h),E=E.transition(h),T=T.transition(h),O=O.transition(h),x=x.transition(h).attr("opacity",Re).attr("transform",(function(e){return isFinite(e=b(e))?d(e+l):this.getAttribute("transform")})),S.attr("opacity",Re).attr("transform",(function(e){var t=this.parentNode.__axis;return d((t&&isFinite(t=t(e))?t:b(e))+l)}))),x.remove(),_.attr("d",e===De||e===Me?a?"M"+c*a+","+v+"H"+l+"V"+y+"H"+c*a:"M"+l+","+v+"V"+y:a?"M"+v+","+c*a+"V"+l+"H"+y+"V"+c*a:"M"+v+","+l+"H"+y),E.attr("opacity",1).attr("transform",(function(e){return d(b(e)+l)})),T.attr(u+"2",c*o),O.attr(u,c*m).text(p),w.filter(ze).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===Me?"start":e===De?"end":"middle"),w.each((function(){this.__axis=b}))}return h.scale=function(e){return arguments.length?(t=e,h):t},h.ticks=function(){return n=Array.from(arguments),h},h.tickArguments=function(e){return arguments.length?(n=null==e?[]:Array.from(e),h):n.slice()},h.tickValues=function(e){return arguments.length?(r=null==e?null:Array.from(e),h):r&&r.slice()},h.tickFormat=function(e){return arguments.length?(i=e,h):i},h.tickSize=function(e){return arguments.length?(o=a=+e,h):o},h.tickSizeInner=function(e){return arguments.length?(o=+e,h):o},h.tickSizeOuter=function(e){return arguments.length?(a=+e,h):a},h.tickPadding=function(e){return arguments.length?(s=+e,h):s},h.offset=function(e){return arguments.length?(l=+e,h):l},h}function je(e){return Be(ke,e)}function Fe(e){return Be(Me,e)}function Ue(e){return Be(Ne,e)}function He(e){return Be(De,e)}var Ve={value:()=>{}};function Ze(){for(var e,t=0,n=arguments.length,r={};t<n;++t){if(!(e=arguments[t]+"")||e in r||/[\s.]/.test(e))throw new Error("illegal type: "+e);r[e]=[]}return new We(r)}function We(e){this._=e}function Ge(e,t){for(var n,r=0,i=e.length;r<i;++r)if((n=e[r]).name===t)return n.value}function qe(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=Ve,e=e.slice(0,r).concat(e.slice(r+1));break}return null!=n&&e.push({name:t,value:n}),e}We.prototype=Ze.prototype={constructor:We,on:function(e,t){var n,r=this._,i=function(e,t){return e.trim().split(/^|\s+/).map((function(e){var n="",r=e.indexOf(".");if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:n}}))}(e+"",r),o=-1,a=i.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++o<a;)if(n=(e=i[o]).type)r[n]=qe(r[n],e.name,t);else if(null==t)for(n in r)r[n]=qe(r[n],e.name,null);return this}for(;++o<a;)if((n=(e=i[o]).type)&&(n=Ge(r[n],e.name)))return n},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new We(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=0,n=(r=this._[e]).length;o<n;++o)r[o].value.apply(t,i)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,o=r.length;i<o;++i)r[i].value.apply(t,n)}};var Ye="http://www.w3.org/1999/xhtml";const Ke={svg:"http://www.w3.org/2000/svg",xhtml:Ye,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Xe(e){var t=e+="",n=t.indexOf(":");return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),Ke.hasOwnProperty(t)?{space:Ke[t],local:e}:e}function Qe(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Ye&&t.documentElement.namespaceURI===Ye?t.createElement(e):t.createElementNS(n,e)}}function Je(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function et(e){var t=Xe(e);return(t.local?Je:Qe)(t)}function tt(){}function nt(e){return null==e?tt:function(){return this.querySelector(e)}}function rt(){return[]}function it(e){return null==e?rt:function(){return this.querySelectorAll(e)}}function ot(e){return function(){return this.matches(e)}}function at(e){return function(t){return t.matches(e)}}var st=Array.prototype.find;function lt(){return this.firstElementChild}var ct=Array.prototype.filter;function ut(){return Array.from(this.children)}function dt(e){return new Array(e.length)}function ht(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}function ft(e,t,n,r,i,o){for(var a,s=0,l=t.length,c=o.length;s<c;++s)(a=t[s])?(a.__data__=o[s],r[s]=a):n[s]=new ht(e,o[s]);for(;s<l;++s)(a=t[s])&&(i[s]=a)}function pt(e,t,n,r,i,o,a){var s,l,c,u=new Map,d=t.length,h=o.length,f=new Array(d);for(s=0;s<d;++s)(l=t[s])&&(f[s]=c=a.call(l,l.__data__,s,t)+"",u.has(c)?i[s]=l:u.set(c,l));for(s=0;s<h;++s)c=a.call(e,o[s],s,o)+"",(l=u.get(c))?(r[s]=l,l.__data__=o[s],u.delete(c)):n[s]=new ht(e,o[s]);for(s=0;s<d;++s)(l=t[s])&&u.get(f[s])===l&&(i[s]=l)}function mt(e){return e.__data__}function gt(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function vt(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function yt(e){return function(){this.removeAttribute(e)}}function bt(e){return function(){this.removeAttributeNS(e.space,e.local)}}function wt(e,t){return function(){this.setAttribute(e,t)}}function _t(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Et(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function xt(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function St(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Tt(e){return function(){this.style.removeProperty(e)}}function Ot(e,t,n){return function(){this.style.setProperty(e,t,n)}}function At(e,t,n){return function(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Ct(e,t){return e.style.getPropertyValue(t)||St(e).getComputedStyle(e,null).getPropertyValue(t)}function kt(e){return function(){delete this[e]}}function Mt(e,t){return function(){this[e]=t}}function Nt(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}function Dt(e){return e.trim().split(/^|\s+/)}function Rt(e){return e.classList||new Lt(e)}function Lt(e){this._node=e,this._names=Dt(e.getAttribute("class")||"")}function Pt(e,t){for(var n=Rt(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function It(e,t){for(var n=Rt(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function $t(e){return function(){Pt(this,e)}}function zt(e){return function(){It(this,e)}}function Bt(e,t){return function(){(t.apply(this,arguments)?Pt:It)(this,e)}}function jt(){this.textContent=""}function Ft(e){return function(){this.textContent=e}}function Ut(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Ht(){this.innerHTML=""}function Vt(e){return function(){this.innerHTML=e}}function Zt(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Wt(){this.nextSibling&&this.parentNode.appendChild(this)}function Gt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function qt(){return null}function Yt(){var e=this.parentNode;e&&e.removeChild(this)}function Kt(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Xt(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Qt(e){return function(){var t=this.__on;if(t){for(var n,r=0,i=-1,o=t.length;r<o;++r)n=t[r],e.type&&n.type!==e.type||n.name!==e.name?t[++i]=n:this.removeEventListener(n.type,n.listener,n.options);++i?t.length=i:delete this.__on}}}function Jt(e,t,n){return function(){var r,i=this.__on,o=function(e){return function(t){e.call(this,t,this.__data__)}}(t);if(i)for(var a=0,s=i.length;a<s;++a)if((r=i[a]).type===e.type&&r.name===e.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=o,r.options=n),void(r.value=t);this.addEventListener(e.type,o,n),r={type:e.type,name:e.name,value:t,listener:o,options:n},i?i.push(r):this.__on=[r]}}function en(e,t,n){var r=St(e),i=r.CustomEvent;"function"==typeof i?i=new i(t,n):(i=r.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function tn(e,t){return function(){return en(this,e,t)}}function nn(e,t){return function(){return en(this,e,t.apply(this,arguments))}}ht.prototype={constructor:ht,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}},Lt.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};var rn=[null];function on(e,t){this._groups=e,this._parents=t}function an(){return new on([[document.documentElement]],rn)}function sn(e){return"string"==typeof e?new on([[document.querySelector(e)]],[document.documentElement]):new on([[e]],rn)}function ln(e,t){if(e=function(e){let t;for(;t=e.sourceEvent;)e=t;return e}(e),void 0===t&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}on.prototype=an.prototype={constructor:on,select:function(e){"function"!=typeof e&&(e=nt(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o,a,s=t[i],l=s.length,c=r[i]=new Array(l),u=0;u<l;++u)(o=s[u])&&(a=e.call(o,o.__data__,u,s))&&("__data__"in o&&(a.__data__=o.__data__),c[u]=a);return new on(r,this._parents)},selectAll:function(e){e="function"==typeof e?function(e){return function(){return function(e){return null==e?[]:Array.isArray(e)?e:Array.from(e)}(e.apply(this,arguments))}}(e):it(e);for(var t=this._groups,n=t.length,r=[],i=[],o=0;o<n;++o)for(var a,s=t[o],l=s.length,c=0;c<l;++c)(a=s[c])&&(r.push(e.call(a,a.__data__,c,s)),i.push(a));return new on(r,i)},selectChild:function(e){return this.select(null==e?lt:function(e){return function(){return st.call(this.children,e)}}("function"==typeof e?e:at(e)))},selectChildren:function(e){return this.selectAll(null==e?ut:function(e){return function(){return ct.call(this.children,e)}}("function"==typeof e?e:at(e)))},filter:function(e){"function"!=typeof e&&(e=ot(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o,a=t[i],s=a.length,l=r[i]=[],c=0;c<s;++c)(o=a[c])&&e.call(o,o.__data__,c,a)&&l.push(o);return new on(r,this._parents)},data:function(e,t){if(!arguments.length)return Array.from(this,mt);var n=t?pt:ft,r=this._parents,i=this._groups;"function"!=typeof e&&(e=function(e){return function(){return e}}(e));for(var o=i.length,a=new Array(o),s=new Array(o),l=new Array(o),c=0;c<o;++c){var u=r[c],d=i[c],h=d.length,f=gt(e.call(u,u&&u.__data__,c,r)),p=f.length,m=s[c]=new Array(p),g=a[c]=new Array(p);n(u,d,m,g,l[c]=new Array(h),f,t);for(var v,y,b=0,w=0;b<p;++b)if(v=m[b]){for(b>=w&&(w=b+1);!(y=g[w])&&++w<p;);v._next=y||null}}return(a=new on(a,r))._enter=s,a._exit=l,a},enter:function(){return new on(this._enter||this._groups.map(dt),this._parents)},exit:function(){return new on(this._exit||this._groups.map(dt),this._parents)},join:function(e,t,n){var r=this.enter(),i=this,o=this.exit();return"function"==typeof e?(r=e(r))&&(r=r.selection()):r=r.append(e+""),null!=t&&(i=t(i))&&(i=i.selection()),null==n?o.remove():n(o),r&&i?r.merge(i).order():i},merge:function(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),l=0;l<a;++l)for(var c,u=n[l],d=r[l],h=u.length,f=s[l]=new Array(h),p=0;p<h;++p)(c=u[p]||d[p])&&(f[p]=c);for(;l<i;++l)s[l]=n[l];return new on(s,this._parents)},selection:function(){return this},order:function(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r,i=e[t],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=vt);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a,s=n[o],l=s.length,c=i[o]=new Array(l),u=0;u<l;++u)(a=s[u])&&(c[u]=a);c.sort(t)}return new on(i,this._parents).order()},call:function(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null},size:function(){let e=0;for(const t of this)++e;return e},empty:function(){return!this.node()},each:function(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i,o=t[n],a=0,s=o.length;a<s;++a)(i=o[a])&&e.call(i,i.__data__,a,o);return this},attr:function(e,t){var n=Xe(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==t?n.local?bt:yt:"function"==typeof t?n.local?xt:Et:n.local?_t:wt)(n,t))},style:function(e,t,n){return arguments.length>1?this.each((null==t?Tt:"function"==typeof t?At:Ot)(e,t,n??"")):Ct(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?kt:"function"==typeof t?Nt:Mt)(e,t)):this.node()[e]},classed:function(e,t){var n=Dt(e+"");if(arguments.length<2){for(var r=Rt(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof t?Bt:t?$t:zt)(n,t))},text:function(e){return arguments.length?this.each(null==e?jt:("function"==typeof e?Ut:Ft)(e)):this.node().textContent},html:function(e){return arguments.length?this.each(null==e?Ht:("function"==typeof e?Zt:Vt)(e)):this.node().innerHTML},raise:function(){return this.each(Wt)},lower:function(){return this.each(Gt)},append:function(e){var t="function"==typeof e?e:et(e);return this.select((function(){return this.appendChild(t.apply(this,arguments))}))},insert:function(e,t){var n="function"==typeof e?e:et(e),r=null==t?qt:"function"==typeof t?t:nt(t);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(Yt)},clone:function(e){return this.select(e?Xt:Kt)},datum:function(e){return arguments.length?this.property("__data__",e):this.node().__data__},on:function(e,t,n){var r,i,o=function(e){return e.trim().split(/^|\s+/).map((function(e){var t="",n=e.indexOf(".");return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}}))}(e+""),a=o.length;if(!(arguments.length<2)){for(s=t?Jt:Qt,r=0;r<a;++r)this.each(s(o[r],t,n));return this}var s=this.node().__on;if(s)for(var l,c=0,u=s.length;c<u;++c)for(r=0,l=s[c];r<a;++r)if((i=o[r]).type===l.type&&i.name===l.name)return l.value},dispatch:function(e,t){return this.each(("function"==typeof t?nn:tn)(e,t))},[Symbol.iterator]:function*(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r,i=e[t],o=0,a=i.length;o<a;++o)(r=i[o])&&(yield r)}};const cn={capture:!0,passive:!1};function un(e){e.preventDefault(),e.stopImmediatePropagation()}function dn(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function hn(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function fn(){}var pn=.7,mn=1/pn,gn="\\s*([+-]?\\d+)\\s*",vn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",yn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",bn=/^#([0-9a-f]{3,8})$/,wn=new RegExp(`^rgb\\(${gn},${gn},${gn}\\)$`),_n=new RegExp(`^rgb\\(${yn},${yn},${yn}\\)$`),En=new RegExp(`^rgba\\(${gn},${gn},${gn},${vn}\\)$`),xn=new RegExp(`^rgba\\(${yn},${yn},${yn},${vn}\\)$`),Sn=new RegExp(`^hsl\\(${vn},${yn},${yn}\\)$`),Tn=new RegExp(`^hsla\\(${vn},${yn},${yn},${vn}\\)$`),On={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 An(){return this.rgb().formatHex()}function Cn(){return this.rgb().formatRgb()}function kn(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=bn.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Mn(t):3===n?new Rn(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Nn(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Nn(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=wn.exec(e))?new Rn(t[1],t[2],t[3],1):(t=_n.exec(e))?new Rn(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=En.exec(e))?Nn(t[1],t[2],t[3],t[4]):(t=xn.exec(e))?Nn(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Sn.exec(e))?Bn(t[1],t[2]/100,t[3]/100,1):(t=Tn.exec(e))?Bn(t[1],t[2]/100,t[3]/100,t[4]):On.hasOwnProperty(e)?Mn(On[e]):"transparent"===e?new Rn(NaN,NaN,NaN,0):null}function Mn(e){return new Rn(e>>16&255,e>>8&255,255&e,1)}function Nn(e,t,n,r){return r<=0&&(e=t=n=NaN),new Rn(e,t,n,r)}function Dn(e,t,n,r){return 1===arguments.length?function(e){return e instanceof fn||(e=kn(e)),e?new Rn((e=e.rgb()).r,e.g,e.b,e.opacity):new Rn}(e):new Rn(e,t,n,r??1)}function Rn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Ln(){return`#${zn(this.r)}${zn(this.g)}${zn(this.b)}`}function Pn(){const e=In(this.opacity);return`${1===e?"rgb(":"rgba("}${$n(this.r)}, ${$n(this.g)}, ${$n(this.b)}${1===e?")":`, ${e})`}`}function In(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function $n(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function zn(e){return((e=$n(e))<16?"0":"")+e.toString(16)}function Bn(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Fn(e,t,n,r)}function jn(e){if(e instanceof Fn)return new Fn(e.h,e.s,e.l,e.opacity);if(e instanceof fn||(e=kn(e)),!e)return new Fn;if(e instanceof Fn)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new Fn(a,s,l,e.opacity)}function Fn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Un(e){return(e=(e||0)%360)<0?e+360:e}function Hn(e){return Math.max(0,Math.min(1,e||0))}function Vn(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}dn(fn,kn,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:An,formatHex:An,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return jn(this).formatHsl()},formatRgb:Cn,toString:Cn}),dn(Rn,Dn,hn(fn,{brighter(e){return e=null==e?mn:Math.pow(mn,e),new Rn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?pn:Math.pow(pn,e),new Rn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Rn($n(this.r),$n(this.g),$n(this.b),In(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:Ln,formatHex:Ln,formatHex8:function(){return`#${zn(this.r)}${zn(this.g)}${zn(this.b)}${zn(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Pn,toString:Pn})),dn(Fn,(function(e,t,n,r){return 1===arguments.length?jn(e):new Fn(e,t,n,r??1)}),hn(fn,{brighter(e){return e=null==e?mn:Math.pow(mn,e),new Fn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?pn:Math.pow(pn,e),new Fn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Rn(Vn(e>=240?e-240:e+120,i,r),Vn(e,i,r),Vn(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Fn(Un(this.h),Hn(this.s),Hn(this.l),In(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 e=In(this.opacity);return`${1===e?"hsl(":"hsla("}${Un(this.h)}, ${100*Hn(this.s)}%, ${100*Hn(this.l)}%${1===e?")":`, ${e})`}`}}));const Zn=e=>()=>e;function Wn(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):Zn(isNaN(e)?t:e)}const Gn=function e(t){var n=function(e){return 1==(e=+e)?Wn:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):Zn(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=Dn(e)).r,(t=Dn(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=Wn(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function qn(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,i=t.slice();return function(o){for(n=0;n<r;++n)i[n]=e[n]*(1-o)+t[n]*o;return i}}function Yn(e,t){var n,r=t?t.length:0,i=e?Math.min(r,e.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=nr(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<i;++n)a[n]=o[n](e);return a}}function Kn(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Xn(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Qn(e,t){var n,r={},i={};for(n in(null===e||"object"!=typeof e)&&(e={}),(null===t||"object"!=typeof t)&&(t={}),t)n in e?r[n]=nr(e[n],t[n]):i[n]=t[n];return function(e){for(n in r)i[n]=r[n](e);return i}}var Jn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,er=new RegExp(Jn.source,"g");function tr(e,t){var n,r,i,o=Jn.lastIndex=er.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=Jn.exec(e))&&(r=er.exec(t));)(i=r.index)>o&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:Xn(n,r)})),o=er.lastIndex;return o<t.length&&(i=t.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}function nr(e,t){var n,r=typeof t;return null==t||"boolean"===r?Zn(t):("number"===r?Xn:"string"===r?(n=kn(t))?(t=n,Gn):tr:t instanceof kn?Gn:t instanceof Date?Kn:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?qn:Array.isArray(t)?Yn:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?Qn:Xn)(e,t)}function rr(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var ir,or=180/Math.PI,ar={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function sr(e,t,n,r,i,o){var a,s,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,l/=s),e*r<t*n&&(e=-e,t=-t,l=-l,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*or,skewX:Math.atan(l)*or,scaleX:a,scaleY:s}}function lr(e,t,n,r){function i(e){return e.length?e.pop()+" ":""}return function(o,a){var s=[],l=[];return o=e(o),a=e(a),function(e,r,i,o,a,s){if(e!==i||r!==o){var l=a.push("translate(",null,t,null,n);s.push({i:l-4,x:Xn(e,i)},{i:l-2,x:Xn(r,o)})}else(i||o)&&a.push("translate("+i+t+o+n)}(o.translateX,o.translateY,a.translateX,a.translateY,s,l),function(e,t,n,o){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),o.push({i:n.push(i(n)+"rotate(",null,r)-2,x:Xn(e,t)})):t&&n.push(i(n)+"rotate("+t+r)}(o.rotate,a.rotate,s,l),function(e,t,n,o){e!==t?o.push({i:n.push(i(n)+"skewX(",null,r)-2,x:Xn(e,t)}):t&&n.push(i(n)+"skewX("+t+r)}(o.skewX,a.skewX,s,l),function(e,t,n,r,o,a){if(e!==n||t!==r){var s=o.push(i(o)+"scale(",null,",",null,")");a.push({i:s-4,x:Xn(e,n)},{i:s-2,x:Xn(t,r)})}else(1!==n||1!==r)&&o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,s,l),o=a=null,function(e){for(var t,n=-1,r=l.length;++n<r;)s[(t=l[n]).i]=t.x(e);return s.join("")}}}var cr,ur,dr=lr((function(e){const t=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?ar:sr(t.a,t.b,t.c,t.d,t.e,t.f)}),"px, ","px)","deg)"),hr=lr((function(e){return null!=e&&(ir||(ir=document.createElementNS("http://www.w3.org/2000/svg","g")),ir.setAttribute("transform",e),e=ir.transform.baseVal.consolidate())?sr((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):ar}),", ",")",")"),fr=0,pr=0,mr=0,gr=1e3,vr=0,yr=0,br=0,wr="object"==typeof performance&&performance.now?performance:Date,_r="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Er(){return yr||(_r(xr),yr=wr.now()+br)}function xr(){yr=0}function Sr(){this._call=this._time=this._next=null}function Tr(e,t,n){var r=new Sr;return r.restart(e,t,n),r}function Or(){yr=(vr=wr.now())+br,fr=pr=0;try{!function(){Er(),++fr;for(var e,t=cr;t;)(e=yr-t._time)>=0&&t._call.call(void 0,e),t=t._next;--fr}()}finally{fr=0,function(){for(var e,t,n=cr,r=1/0;n;)n._call?(r>n._time&&(r=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:cr=t);ur=e,Cr(r)}(),yr=0}}function Ar(){var e=wr.now(),t=e-vr;t>gr&&(br-=t,vr=e)}function Cr(e){fr||(pr&&(pr=clearTimeout(pr)),e-yr>24?(e<1/0&&(pr=setTimeout(Or,e-wr.now()-br)),mr&&(mr=clearInterval(mr))):(mr||(vr=wr.now(),mr=setInterval(Ar,gr)),fr=1,_r(Or)))}function kr(e,t,n){var r=new Sr;return t=null==t?0:+t,r.restart((n=>{r.stop(),e(n+t)}),t,n),r}Sr.prototype=Tr.prototype={constructor:Sr,restart:function(e,t,n){if("function"!=typeof e)throw new TypeError("callback is not a function");n=(null==n?Er():+n)+(null==t?0:+t),!this._next&&ur!==this&&(ur?ur._next=this:cr=this,ur=this),this._call=e,this._time=n,Cr()},stop:function(){this._call&&(this._call=null,this._time=1/0,Cr())}};var Mr=Ze("start","end","cancel","interrupt"),Nr=[],Dr=0,Rr=2,Lr=3,Pr=5,Ir=6;function $r(e,t,n,r,i,o){var a=e.__transition;if(a){if(n in a)return}else e.__transition={};!function(e,t,n){var r,i=e.__transition;function o(l){var c,u,d,h;if(1!==n.state)return s();for(c in i)if((h=i[c]).name===n.name){if(h.state===Lr)return kr(o);4===h.state?(h.state=Ir,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete i[c]):+c<t&&(h.state=Ir,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete i[c])}if(kr((function(){n.state===Lr&&(n.state=4,n.timer.restart(a,n.delay,n.time),a(l))})),n.state=Rr,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Rr){for(n.state=Lr,r=new Array(d=n.tween.length),c=0,u=-1;c<d;++c)(h=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(r[++u]=h);r.length=u+1}}function a(t){for(var i=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(s),n.state=Pr,1),o=-1,a=r.length;++o<a;)r[o].call(e,i);n.state===Pr&&(n.on.call("end",e,e.__data__,n.index,n.group),s())}function s(){for(var r in n.state=Ir,n.timer.stop(),delete i[t],i)return;delete e.__transition}i[t]=n,n.timer=Tr((function(e){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=e&&o(e-n.delay)}),0,n.time)}(e,n,{name:t,index:r,group:i,on:Mr,tween:Nr,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Dr})}function zr(e,t){var n=jr(e,t);if(n.state>Dr)throw new Error("too late; already scheduled");return n}function Br(e,t){var n=jr(e,t);if(n.state>Lr)throw new Error("too late; already running");return n}function jr(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function Fr(e,t){var n,r,i,o=e.__transition,a=!0;if(o){for(i in t=null==t?null:t+"",o)(n=o[i]).name===t?(r=n.state>Rr&&n.state<Pr,n.state=Ir,n.timer.stop(),n.on.call(r?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete o[i]):a=!1;a&&delete e.__transition}}function Ur(e,t){var n,r;return function(){var i=Br(this,e),o=i.tween;if(o!==n)for(var a=0,s=(r=n=o).length;a<s;++a)if(r[a].name===t){(r=r.slice()).splice(a,1);break}i.tween=r}}function Hr(e,t,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var o=Br(this,e),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:t,value:n},l=0,c=i.length;l<c;++l)if(i[l].name===t){i[l]=s;break}l===c&&i.push(s)}o.tween=i}}function Vr(e,t,n){var r=e._id;return e.each((function(){var e=Br(this,r);(e.value||(e.value={}))[t]=n.apply(this,arguments)})),function(e){return jr(e,r).value[t]}}function Zr(e,t){var n;return("number"==typeof t?Xn:t instanceof kn?Gn:(n=kn(t))?(t=n,Gn):tr)(e,t)}function Wr(e){return function(){this.removeAttribute(e)}}function Gr(e){return function(){this.removeAttributeNS(e.space,e.local)}}function qr(e,t,n){var r,i,o=n+"";return function(){var a=this.getAttribute(e);return a===o?null:a===r?i:i=t(r=a,n)}}function Yr(e,t,n){var r,i,o=n+"";return function(){var a=this.getAttributeNS(e.space,e.local);return a===o?null:a===r?i:i=t(r=a,n)}}function Kr(e,t,n){var r,i,o;return function(){var a,s,l=n(this);return null==l?void this.removeAttribute(e):(a=this.getAttribute(e))===(s=l+"")?null:a===r&&s===i?o:(i=s,o=t(r=a,l))}}function Xr(e,t,n){var r,i,o;return function(){var a,s,l=n(this);return null==l?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local))===(s=l+"")?null:a===r&&s===i?o:(i=s,o=t(r=a,l))}}function Qr(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&function(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}(e,i)),n}return i._value=t,i}function Jr(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&function(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}(e,i)),n}return i._value=t,i}function ei(e,t){return function(){zr(this,e).delay=+t.apply(this,arguments)}}function ti(e,t){return t=+t,function(){zr(this,e).delay=t}}function ni(e,t){return function(){Br(this,e).duration=+t.apply(this,arguments)}}function ri(e,t){return t=+t,function(){Br(this,e).duration=t}}var ii=an.prototype.constructor;function oi(e){return function(){this.style.removeProperty(e)}}var ai=0;function si(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function li(){return++ai}var ci=an.prototype;si.prototype={constructor:si,select:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=nt(e));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s,l,c=r[a],u=c.length,d=o[a]=new Array(u),h=0;h<u;++h)(s=c[h])&&(l=e.call(s,s.__data__,h,c))&&("__data__"in s&&(l.__data__=s.__data__),d[h]=l,$r(d[h],t,n,h,d,jr(s,n)));return new si(o,this._parents,t,n)},selectAll:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=it(e));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var l,c=r[s],u=c.length,d=0;d<u;++d)if(l=c[d]){for(var h,f=e.call(l,l.__data__,d,c),p=jr(l,n),m=0,g=f.length;m<g;++m)(h=f[m])&&$r(h,t,n,m,f,p);o.push(f),a.push(l)}return new si(o,a,t,n)},selectChild:ci.selectChild,selectChildren:ci.selectChildren,filter:function(e){"function"!=typeof e&&(e=ot(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o,a=t[i],s=a.length,l=r[i]=[],c=0;c<s;++c)(o=a[c])&&e.call(o,o.__data__,c,a)&&l.push(o);return new si(r,this._parents,this._name,this._id)},merge:function(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var l,c=t[s],u=n[s],d=c.length,h=a[s]=new Array(d),f=0;f<d;++f)(l=c[f]||u[f])&&(h[f]=l);for(;s<r;++s)a[s]=t[s];return new si(a,this._parents,this._name,this._id)},selection:function(){return new ii(this._groups,this._parents)},transition:function(){for(var e=this._name,t=this._id,n=li(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],l=s.length,c=0;c<l;++c)if(a=s[c]){var u=jr(a,t);$r(a,e,n,c,s,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new si(r,this._parents,e,n)},call:ci.call,nodes:ci.nodes,node:ci.node,size:ci.size,empty:ci.empty,each:ci.each,on:function(e,t){var n=this._id;return arguments.length<2?jr(this.node(),n).on.on(e):this.each(function(e,t,n){var r,i,o=function(e){return(e+"").trim().split(/^|\s+/).every((function(e){var t=e.indexOf(".");return t>=0&&(e=e.slice(0,t)),!e||"start"===e}))}(t)?zr:Br;return function(){var a=o(this,e),s=a.on;s!==r&&(i=(r=s).copy()).on(t,n),a.on=i}}(n,e,t))},attr:function(e,t){var n=Xe(e),r="transform"===n?hr:Zr;return this.attrTween(e,"function"==typeof t?(n.local?Xr:Kr)(n,r,Vr(this,"attr."+e,t)):null==t?(n.local?Gr:Wr)(n):(n.local?Yr:qr)(n,r,t))},attrTween:function(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;var r=Xe(e);return this.tween(n,(r.local?Qr:Jr)(r,t))},style:function(e,t,n){var r="transform"==(e+="")?dr:Zr;return null==t?this.styleTween(e,function(e,t){var n,r,i;return function(){var o=Ct(this,e),a=(this.style.removeProperty(e),Ct(this,e));return o===a?null:o===n&&a===r?i:i=t(n=o,r=a)}}(e,r)).on("end.style."+e,oi(e)):"function"==typeof t?this.styleTween(e,function(e,t,n){var r,i,o;return function(){var a=Ct(this,e),s=n(this),l=s+"";return null==s&&(this.style.removeProperty(e),l=s=Ct(this,e)),a===l?null:a===r&&l===i?o:(i=l,o=t(r=a,s))}}(e,r,Vr(this,"style."+e,t))).each(function(e,t){var n,r,i,o,a="style."+t,s="end."+a;return function(){var l=Br(this,e),c=l.on,u=null==l.value[a]?o||(o=oi(t)):void 0;(c!==n||i!==u)&&(r=(n=c).copy()).on(s,i=u),l.on=r}}(this._id,e)):this.styleTween(e,function(e,t,n){var r,i,o=n+"";return function(){var a=Ct(this,e);return a===o?null:a===r?i:i=t(r=a,n)}}(e,r,t),n).on("end.style."+e,null)},styleTween:function(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==t)return this.tween(r,null);if("function"!=typeof t)throw new Error;return this.tween(r,function(e,t,n){var r,i;function o(){var o=t.apply(this,arguments);return o!==i&&(r=(i=o)&&function(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}(e,o,n)),r}return o._value=t,o}(e,t,n??""))},text:function(e){return this.tween("text","function"==typeof e?function(e){return function(){var t=e(this);this.textContent=t??""}}(Vr(this,"text",e)):function(e){return function(){this.textContent=e}}(null==e?"":e+""))},textTween:function(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(null==e)return this.tween(t,null);if("function"!=typeof e)throw new Error;return this.tween(t,function(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&function(e){return function(t){this.textContent=e.call(this,t)}}(r)),t}return r._value=e,r}(e))},remove:function(){return this.on("end.remove",(e=this._id,function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}));var e},tween:function(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r,i=jr(this.node(),n).tween,o=0,a=i.length;o<a;++o)if((r=i[o]).name===e)return r.value;return null}return this.each((null==t?Ur:Hr)(n,e,t))},delay:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?ei:ti)(t,e)):jr(this.node(),t).delay},duration:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?ni:ri)(t,e)):jr(this.node(),t).duration},ease:function(e){var t=this._id;return arguments.length?this.each(function(e,t){if("function"!=typeof t)throw new Error;return function(){Br(this,e).ease=t}}(t,e)):jr(this.node(),t).ease},easeVarying:function(e){if("function"!=typeof e)throw new Error;return this.each(function(e,t){return function(){var n=t.apply(this,arguments);if("function"!=typeof n)throw new Error;Br(this,e).ease=n}}(this._id,e))},end:function(){var e,t,n=this,r=n._id,i=n.size();return new Promise((function(o,a){var s={value:a},l={value:function(){0==--i&&o()}};n.each((function(){var n=Br(this,r),i=n.on;i!==e&&((t=(e=i).copy())._.cancel.push(s),t._.interrupt.push(s),t._.end.push(l)),n.on=t})),0===i&&o()}))},[Symbol.iterator]:ci[Symbol.iterator]};const ui=e=>+e;function di(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var hi={time:null,delay:0,duration:250,ease:di};function fi(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}an.prototype.interrupt=function(e){return this.each((function(){Fr(this,e)}))},an.prototype.transition=function(e){var t,n;e instanceof si?(t=e._id,e=e._name):(t=li(),(n=hi).time=Er(),e=null==e?null:e+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],l=s.length,c=0;c<l;++c)(a=s[c])&&$r(a,e,t,c,s,n||fi(a,t));return new si(r,this._parents,e,t)};const pi=e=>()=>e;function mi(e,{sourceEvent:t,target:n,selection:r,mode:i,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},selection:{value:r,enumerable:!0,configurable:!0},mode:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function gi(e){e.preventDefault(),e.stopImmediatePropagation()}var vi={name:"drag"},yi={name:"space"},bi={name:"handle"},wi={name:"center"};const{abs:_i,max:Ei,min:xi}=Math;function Si(e){return[+e[0],+e[1]]}function Ti(e){return[Si(e[0]),Si(e[1])]}var Oi={name:"x",handles:["w","e"].map(Ri),input:function(e,t){return null==e?null:[[+e[0],t[0][1]],[+e[1],t[1][1]]]},output:function(e){return e&&[e[0][0],e[1][0]]}},Ai={name:"y",handles:["n","s"].map(Ri),input:function(e,t){return null==e?null:[[t[0][0],+e[0]],[t[1][0],+e[1]]]},output:function(e){return e&&[e[0][1],e[1][1]]}},Ci={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"},ki={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},Mi={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},Ni={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},Di={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Ri(e){return{type:e}}function Li(e){return!e.ctrlKey&&!e.button}function Pi(){var e=this.ownerSVGElement||this;return e.hasAttribute("viewBox")?[[(e=e.viewBox.baseVal).x,e.y],[e.x+e.width,e.y+e.height]]:[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]}function Ii(){return navigator.maxTouchPoints||"ontouchstart"in this}function $i(e){for(;!e.__brush;)if(!(e=e.parentNode))return;return e.__brush}function zi(){return function(e){var t,n=Pi,r=Li,i=Ii,o=!0,a=Ze("start","brush","end"),s=6;function l(t){var n=t.property("__brush",m).selectAll(".overlay").data([Ri("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Ci.overlay).merge(n).each((function(){var e=$i(this).extent;sn(this).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(".selection").data([Ri("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Ci.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=t.selectAll(".handle").data(e.handles,(function(e){return e.type}));r.exit().remove(),r.enter().append("rect").attr("class",(function(e){return"handle handle--"+e.type})).attr("cursor",(function(e){return Ci[e.type]})),t.each(c).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",h).filter(i).on("touchstart.brush",h).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 e=sn(this),t=$i(this).selection;t?(e.selectAll(".selection").style("display",null).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(".handle").style("display",null).attr("x",(function(e){return"e"===e.type[e.type.length-1]?t[1][0]-s/2:t[0][0]-s/2})).attr("y",(function(e){return"s"===e.type[0]?t[1][1]-s/2:t[0][1]-s/2})).attr("width",(function(e){return"n"===e.type||"s"===e.type?t[1][0]-t[0][0]+s:s})).attr("height",(function(e){return"e"===e.type||"w"===e.type?t[1][1]-t[0][1]+s:s}))):e.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function u(e,t,n){var r=e.__brush.emitter;return!r||n&&r.clean?new d(e,t,n):r}function d(e,t,n){this.that=e,this.args=t,this.state=e.__brush,this.active=0,this.clean=n}function h(n){if((!t||n.touches)&&r.apply(this,arguments)){var i,a,s,l,d,h,f,p,m,g,v,y=this,b=n.target.__data__.type,w="selection"===(o&&n.metaKey?b="overlay":b)?vi:o&&n.altKey?wi:bi,_=e===Ai?null:Ni[b],E=e===Oi?null:Di[b],x=$i(y),S=x.extent,T=x.selection,O=S[0][0],A=S[0][1],C=S[1][0],k=S[1][1],M=0,N=0,D=_&&E&&o&&n.shiftKey,R=Array.from(n.touches||[n],(e=>{const t=e.identifier;return(e=ln(e,y)).point0=e.slice(),e.identifier=t,e}));Fr(y);var L=u(y,arguments,!0).beforestart();if("overlay"===b){T&&(m=!0);const t=[R[0],R[1]||R[0]];x.selection=T=[[i=e===Ai?O:xi(t[0][0],t[1][0]),s=e===Oi?A:xi(t[0][1],t[1][1])],[d=e===Ai?C:Ei(t[0][0],t[1][0]),f=e===Oi?k:Ei(t[0][1],t[1][1])]],R.length>1&&B(n)}else i=T[0][0],s=T[0][1],d=T[1][0],f=T[1][1];a=i,l=s,h=d,p=f;var P=sn(y).attr("pointer-events","none"),I=P.selectAll(".overlay").attr("cursor",Ci[b]);if(n.touches)L.moved=z,L.ended=j;else{var $=sn(n.view).on("mousemove.brush",z,!0).on("mouseup.brush",j,!0);o&&$.on("keydown.brush",(function(e){switch(e.keyCode){case 16:D=_&&E;break;case 18:w===bi&&(_&&(d=h-M*_,i=a+M*_),E&&(f=p-N*E,s=l+N*E),w=wi,B(e));break;case 32:(w===bi||w===wi)&&(_<0?d=h-M:_>0&&(i=a-M),E<0?f=p-N:E>0&&(s=l-N),w=yi,I.attr("cursor",Ci.selection),B(e));break;default:return}gi(e)}),!0).on("keyup.brush",(function(e){switch(e.keyCode){case 16:D&&(g=v=D=!1,B(e));break;case 18:w===wi&&(_<0?d=h:_>0&&(i=a),E<0?f=p:E>0&&(s=l),w=bi,B(e));break;case 32:w===yi&&(e.altKey?(_&&(d=h-M*_,i=a+M*_),E&&(f=p-N*E,s=l+N*E),w=wi):(_<0?d=h:_>0&&(i=a),E<0?f=p:E>0&&(s=l),w=bi),I.attr("cursor",Ci[b]),B(e));break;default:return}gi(e)}),!0),function(e){var t=e.document.documentElement,n=sn(e).on("dragstart.drag",un,cn);"onselectstart"in t?n.on("selectstart.drag",un,cn):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}(n.view)}c.call(y),L.start(n,w.name)}function z(e){for(const t of e.changedTouches||[e])for(const e of R)e.identifier===t.identifier&&(e.cur=ln(t,y));if(D&&!g&&!v&&1===R.length){const e=R[0];_i(e.cur[0]-e[0])>_i(e.cur[1]-e[1])?v=!0:g=!0}for(const e of R)e.cur&&(e[0]=e.cur[0],e[1]=e.cur[1]);m=!0,gi(e),B(e)}function B(e){const t=R[0],n=t.point0;var r;switch(M=t[0]-n[0],N=t[1]-n[1],w){case yi:case vi:_&&(M=Ei(O-i,xi(C-d,M)),a=i+M,h=d+M),E&&(N=Ei(A-s,xi(k-f,N)),l=s+N,p=f+N);break;case bi:R[1]?(_&&(a=Ei(O,xi(C,R[0][0])),h=Ei(O,xi(C,R[1][0])),_=1),E&&(l=Ei(A,xi(k,R[0][1])),p=Ei(A,xi(k,R[1][1])),E=1)):(_<0?(M=Ei(O-i,xi(C-i,M)),a=i+M,h=d):_>0&&(M=Ei(O-d,xi(C-d,M)),a=i,h=d+M),E<0?(N=Ei(A-s,xi(k-s,N)),l=s+N,p=f):E>0&&(N=Ei(A-f,xi(k-f,N)),l=s,p=f+N));break;case wi:_&&(a=Ei(O,xi(C,i-M*_)),h=Ei(O,xi(C,d+M*_))),E&&(l=Ei(A,xi(k,s-N*E)),p=Ei(A,xi(k,f+N*E)))}h<a&&(_*=-1,r=i,i=d,d=r,r=a,a=h,h=r,b in ki&&I.attr("cursor",Ci[b=ki[b]])),p<l&&(E*=-1,r=s,s=f,f=r,r=l,l=p,p=r,b in Mi&&I.attr("cursor",Ci[b=Mi[b]])),x.selection&&(T=x.selection),g&&(a=T[0][0],h=T[1][0]),v&&(l=T[0][1],p=T[1][1]),(T[0][0]!==a||T[0][1]!==l||T[1][0]!==h||T[1][1]!==p)&&(x.selection=[[a,l],[h,p]],c.call(y),L.brush(e,w.name))}function j(e){if(function(e){e.stopImmediatePropagation()}(e),e.touches){if(e.touches.length)return;t&&clearTimeout(t),t=setTimeout((function(){t=null}),500)}else(function(e,t){var n=e.document.documentElement,r=sn(e).on("dragstart.drag",null);t&&(r.on("click.drag",un,cn),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)})(e.view,m),$.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);P.attr("pointer-events","all"),I.attr("cursor",Ci.overlay),x.selection&&(T=x.selection),function(e){return e[0][0]===e[1][0]||e[0][1]===e[1][1]}(T)&&(x.selection=null,c.call(y)),L.end(e,w.name)}}function f(e){u(this,arguments).moved(e)}function p(e){u(this,arguments).ended(e)}function m(){var t=this.__brush||{selection:null};return t.extent=Ti(n.apply(this,arguments)),t.dim=e,t}return l.move=function(t,n,r){t.tween?t.on("start.brush",(function(e){u(this,arguments).beforestart().start(e)})).on("interrupt.brush end.brush",(function(e){u(this,arguments).end(e)})).tween("brush",(function(){var t=this,r=t.__brush,i=u(t,arguments),o=r.selection,a=e.input("function"==typeof n?n.apply(this,arguments):n,r.extent),s=nr(o,a);function l(e){r.selection=1===e&&null===a?null:s(e),c.call(t),i.brush()}return null!==o&&null!==a?l:l(1)})):t.each((function(){var t=this,i=arguments,o=t.__brush,a=e.input("function"==typeof n?n.apply(t,i):n,o.extent),s=u(t,i).beforestart();Fr(t),o.selection=null===a?null:a,c.call(t),s.start(r).brush(r).end(r)}))},l.clear=function(e,t){l.move(e,null,t)},d.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(e,t){return this.starting?(this.starting=!1,this.emit("start",e,t)):this.emit("brush",e),this},brush:function(e,t){return this.emit("brush",e,t),this},end:function(e,t){return 0==--this.active&&(delete this.state.emitter,this.emit("end",e,t)),this},emit:function(t,n,r){var i=sn(this.that).datum();a.call(t,this.that,new mi(t,{sourceEvent:n,target:l,selection:e.output(this.state.selection),mode:r,dispatch:a}),i)}},l.extent=function(e){return arguments.length?(n="function"==typeof e?e:pi(Ti(e)),l):n},l.filter=function(e){return arguments.length?(r="function"==typeof e?e:pi(!!e),l):r},l.touchable=function(e){return arguments.length?(i="function"==typeof e?e:pi(!!e),l):i},l.handleSize=function(e){return arguments.length?(s=+e,l):s},l.keyModifiers=function(e){return arguments.length?(o=!!e,l):o},l.on=function(){var e=a.on.apply(a,arguments);return e===a?l:e},l}(Oi)}const Bi=Math.PI,ji=2*Bi,Fi=1e-6,Ui=ji-Fi;function Hi(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}let Vi=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?Hi:function(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Hi;const n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,o){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+o}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,(i=+i)<0)throw new Error(`negative radius: ${i}`);let o=this._x1,a=this._y1,s=n-e,l=r-t,c=o-e,u=a-t,d=c*c+u*u;if(null===this._x1)this._append`M${this._x1=e},${this._y1=t}`;else if(d>Fi)if(Math.abs(u*s-l*c)>Fi&&i){let h=n-o,f=r-a,p=s*s+l*l,m=h*h+f*f,g=Math.sqrt(p),v=Math.sqrt(d),y=i*Math.tan((Bi-Math.acos((p+d-m)/(2*g*v)))/2),b=y/v,w=y/g;Math.abs(b-1)>Fi&&this._append`L${e+b*c},${t+b*u}`,this._append`A${i},${i},0,0,${+(u*h>c*f)},${this._x1=e+w*s},${this._y1=t+w*l}`}else this._append`L${this._x1=e},${this._y1=t}`}arc(e,t,n,r,i,o){if(e=+e,t=+t,o=!!o,(n=+n)<0)throw new Error(`negative radius: ${n}`);let a=n*Math.cos(r),s=n*Math.sin(r),l=e+a,c=t+s,u=1^o,d=o?r-i:i-r;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>Fi||Math.abs(this._y1-c)>Fi)&&this._append`L${l},${c}`,n&&(d<0&&(d=d%ji+ji),d>Ui?this._append`A${n},${n},0,1,${u},${e-a},${t-s}A${n},${n},0,1,${u},${this._x1=l},${this._y1=c}`:d>Fi&&this._append`A${n},${n},0,${+(d>=Bi)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};function Zi(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Wi(e){return(e=Zi(Math.abs(e)))?e[1]:NaN}Vi.prototype;var Gi,qi=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Yi(e){if(!(t=qi.exec(e)))throw new Error("invalid format: "+e);var t;return new Ki({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function Ki(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function Xi(e,t){var n=Zi(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}Yi.prototype=Ki.prototype,Ki.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 Qi={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Xi(100*e,t),r:Xi,s:function(e,t){var n=Zi(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(Gi=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Zi(e,Math.max(0,t+o-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Ji(e){return e}var eo,to,no,ro=Array.prototype.map,io=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];eo=function(e){var t=void 0===e.grouping||void 0===e.thousands?Ji:function(e,t){return function(n,r){for(var i=n.length,o=[],a=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(n.substring(i-=s,i+s)),!((l+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}(ro.call(e.grouping,Number),e.thousands+""),n=void 0===e.currency?"":e.currency[0]+"",r=void 0===e.currency?"":e.currency[1]+"",i=void 0===e.decimal?".":e.decimal+"",o=void 0===e.numerals?Ji:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(ro.call(e.numerals,String)),a=void 0===e.percent?"%":e.percent+"",s=void 0===e.minus?"−":e.minus+"",l=void 0===e.nan?"NaN":e.nan+"";function c(e){var c=(e=Yi(e)).fill,u=e.align,d=e.sign,h=e.symbol,f=e.zero,p=e.width,m=e.comma,g=e.precision,v=e.trim,y=e.type;"n"===y?(m=!0,y="g"):Qi[y]||(void 0===g&&(g=12),v=!0,y="g"),(f||"0"===c&&"="===u)&&(f=!0,c="0",u="=");var b="$"===h?n:"#"===h&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",w="$"===h?r:/[%p]/.test(y)?a:"",_=Qi[y],E=/[defgprs%]/.test(y);function x(e){var n,r,a,h=b,x=w;if("c"===y)x=_(e)+x,e="";else{var S=(e=+e)<0||1/e<0;if(e=isNaN(e)?l:_(Math.abs(e),g),v&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r<n;++r)switch(e[r]){case".":i=t=r;break;case"0":0===i&&(i=r),t=r;break;default:if(!+e[r])break e;i>0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),S&&0==+e&&"+"!==d&&(S=!1),h=(S?"("===d?d:s:"-"===d||"("===d?"":d)+h,x=("s"===y?io[8+Gi/3]:"")+x+(S&&"("===d?")":""),E)for(n=-1,r=e.length;++n<r;)if(48>(a=e.charCodeAt(n))||a>57){x=(46===a?i+e.slice(n+1):e.slice(n))+x,e=e.slice(0,n);break}}m&&!f&&(e=t(e,1/0));var T=h.length+e.length+x.length,O=T<p?new Array(p-T+1).join(c):"";switch(m&&f&&(e=t(O+e,O.length?p-x.length:1/0),O=""),u){case"<":e=h+e+x+O;break;case"=":e=h+O+e+x;break;case"^":e=O.slice(0,T=O.length>>1)+h+e+x+O.slice(T);break;default:e=O+h+e+x}return o(e)}return g=void 0===g?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),x.toString=function(){return e+""},x}return{format:c,formatPrefix:function(e,t){var n=c(((e=Yi(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(Wi(t)/3))),i=Math.pow(10,-r),o=io[8+r/3];return function(e){return n(i*e)+o}}}}({thousands:",",grouping:[3],currency:["$",""]}),to=eo.format,no=eo.formatPrefix;var oo=1e-6,ao=Math.PI,so=ao/2,lo=2*ao,co=ao/180,uo=Math.abs,ho=Math.atan,fo=(Math.atan2,Math.cos),po=(Math.exp,Math.log,Math.sin),mo=(Math.sign,Math.sqrt);Math.tan;function go(e,t){return uo(e)>ao&&(e-=Math.round(e/lo)*lo),[e,t]}function vo(){}function yo(e,t){return[e,t]}go.invert=go,new he,new he,new he,vo.prototype={constructor:vo,point:function(e,t){this.stream.point(e,t)},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()}},fo(30*co),yo.invert=yo;mo(3);function bo(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function wo(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=Eo)):void 0===t&&(t=_o);for(var n,r,i,o,a,s=new To(e),l=[s];n=l.pop();)if((i=t(n.data))&&(a=(i=Array.from(i)).length))for(n.children=i,o=a-1;o>=0;--o)l.push(r=i[o]=new To(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(So)}function _o(e){return e.children}function Eo(e){return Array.isArray(e)?e[1]:null}function xo(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function So(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function To(e){this.data=e,this.depth=this.height=0,this.parent=null}function Oo(e,t,n,r,i){for(var o,a=e.children,s=-1,l=a.length,c=e.value&&(r-t)/e.value;++s<l;)(o=a[s]).y0=n,o.y1=i,o.x0=t,o.x1=t+=o.value*c}function Ao(e,t,n,r,i){for(var o,a=e.children,s=-1,l=a.length,c=e.value&&(i-n)/e.value;++s<l;)(o=a[s]).x0=t,o.x1=r,o.y0=n,o.y1=n+=o.value*c}function Co(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}To.prototype=wo.prototype={constructor:To,count:function(){return this.eachAfter(bo)},each:function(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,i,o=this,a=[o],s=[],l=-1;o=a.pop();)if(s.push(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r]);for(;o=s.pop();)e.call(t,o,++l,this);return this},eachBefore:function(e,t){for(var n,r,i=this,o=[i],a=-1;i=o.pop();)if(e.call(t,i,++a,this),n=i.children)for(r=n.length-1;r>=0;--r)o.push(n[r]);return this},find:function(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(n){n!==e&&t.push({source:n.parent,target:n})})),t},copy:function(){return wo(this).eachBefore(xo)},[Symbol.iterator]:function*(){var e,t,n,r,i=this,o=[i];do{for(e=o.reverse(),o=[];i=e.pop();)if(yield i,t=i.children)for(n=0,r=t.length;n<r;++n)o.push(t[n])}while(o.length)}},Object.create(To.prototype),function e(t){function n(e,n,r,i,o){!function(e,t,n,r,i,o){for(var a,s,l,c,u,d,h,f,p,m,g,v=[],y=t.children,b=0,w=0,_=y.length,E=t.value;b<_;){l=i-n,c=o-r;do{u=y[w++].value}while(!u&&w<_);for(d=h=u,g=u*u*(m=Math.max(c/l,l/c)/(E*e)),p=Math.max(h/g,g/d);w<_;++w){if(u+=s=y[w].value,s<d&&(d=s),s>h&&(h=s),g=u*u*m,(f=Math.max(h/g,g/d))>p){u-=s;break}p=f}v.push(a={value:u,dice:l<c,children:y.slice(b,w)}),a.dice?Oo(a,n,r,i,E?r+=c*u/E:o):Ao(a,n,r,E?n+=l*u/E:i,o),E-=u,b=w}}(t,e,n,r,i,o)}return n.ratio=function(t){return e((t=+t)>1?t:1)},n}((1+Math.sqrt(5))/2);const ko=Symbol("implicit");function Mo(){var e=new fe,t=[],n=[],r=ko;function i(i){let o=e.get(i);if(void 0===o){if(r!==ko)return r;e.set(i,o=t.push(i)-1)}return n[o%n.length]}return i.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new fe;for(const r of n)e.has(r)||e.set(r,t.push(r)-1);return i},i.range=function(e){return arguments.length?(n=Array.from(e),i):n.slice()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return Mo(t,n).unknown(r)},Co.apply(i,arguments),i}function No(){var e,t,n=Mo().unknown(void 0),r=n.domain,i=n.range,o=0,a=1,s=!1,l=0,c=0,u=.5;function d(){var n=r().length,d=a<o,h=d?a:o,f=d?o:a;e=(f-h)/Math.max(1,n-l+2*c),s&&(e=Math.floor(e)),h+=(f-h-e*(n-l))*u,t=e*(1-l),s&&(h=Math.round(h),t=Math.round(t));var p=function(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((t-e)/n)),o=new Array(i);++r<i;)o[r]=e+r*n;return o}(n).map((function(t){return h+e*t}));return i(d?p.reverse():p)}return delete n.unknown,n.domain=function(e){return arguments.length?(r(e),d()):r()},n.range=function(e){return arguments.length?([o,a]=e,o=+o,a=+a,d()):[o,a]},n.rangeRound=function(e){return[o,a]=e,o=+o,a=+a,s=!0,d()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(s=!!e,d()):s},n.padding=function(e){return arguments.length?(l=Math.min(1,c=+e),d()):l},n.paddingInner=function(e){return arguments.length?(l=Math.min(1,e),d()):l},n.paddingOuter=function(e){return arguments.length?(c=+e,d()):c},n.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),d()):u},n.copy=function(){return No(r(),[o,a]).round(s).paddingInner(l).paddingOuter(c).align(u)},Co.apply(d(),arguments)}function Do(e){return+e}var Ro=[0,1];function Lo(e){return e}function Po(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function Io(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=Po(i,r),o=n(a,o)):(r=Po(r,i),o=n(o,a)),function(e){return o(r(e))}}function $o(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=Po(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(t){var n=ue(e,t,1,r)-1;return o[n](i[n](t))}}function zo(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Bo(){var e,t,n,r,i,o,a=Ro,s=Ro,l=nr,c=Lo;function u(){var e=Math.min(a.length,s.length);return c!==Lo&&(c=function(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}(a[0],a[e-1])),r=e>2?$o:Io,i=o=null,d}function d(t){return null==t||isNaN(t=+t)?n:(i||(i=r(a.map(e),s,l)))(e(c(t)))}return d.invert=function(n){return c(t((o||(o=r(s,a.map(e),Xn)))(n)))},d.domain=function(e){return arguments.length?(a=Array.from(e,Do),u()):a.slice()},d.range=function(e){return arguments.length?(s=Array.from(e),u()):s.slice()},d.rangeRound=function(e){return s=Array.from(e),l=rr,u()},d.clamp=function(e){return arguments.length?(c=!!e||Lo,u()):c!==Lo},d.interpolate=function(e){return arguments.length?(l=e,u()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,u()}}function jo(){return Bo()(Lo,Lo)}function Fo(e){var t=e.domain;return e.ticks=function(e){var n=t();return xe(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var r=t();return function(e,t,n,r){var i,o=Te(e,t,n);switch((r=Yi(r??",f")).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null==r.precision&&!isNaN(i=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Wi(t)/3)))-Wi(Math.abs(e)))}(o,a))&&(r.precision=i),no(r,a);case"":case"e":case"g":case"p":case"r":null==r.precision&&!isNaN(i=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Wi(t)-Wi(e))+1}(o,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=i-("e"===r.type));break;case"f":case"%":null==r.precision&&!isNaN(i=function(e){return Math.max(0,-Wi(Math.abs(e)))}(o))&&(r.precision=i-2*("%"===r.type))}return to(r)}(r[0],r[r.length-1],e??10,n)},e.nice=function(n){null==n&&(n=10);var r,i,o=t(),a=0,s=o.length-1,l=o[a],c=o[s],u=10;for(c<l&&(i=l,l=c,c=i,i=a,a=s,s=i);u-- >0;){if((i=Se(l,c,n))===r)return o[a]=l,o[s]=c,t(o);if(i>0)l=Math.floor(l/i)*i,c=Math.ceil(c/i)*i;else{if(!(i<0))break;l=Math.ceil(l*i)/i,c=Math.floor(c*i)/i}r=i}return e},e}function Uo(){var e=jo();return e.copy=function(){return zo(e,Uo())},Co.apply(e,arguments),Fo(e)}function Ho(e,t){var n,r=0,i=(e=e.slice()).length-1,o=e[r],a=e[i];return a<o&&(n=r,r=i,i=n,n=o,o=a,a=n),e[r]=t.floor(o),e[i]=t.ceil(a),e}function Vo(e){return Math.log(e)}function Zo(e){return Math.exp(e)}function Wo(e){return-Math.log(-e)}function Go(e){return-Math.exp(-e)}function qo(e){return isFinite(e)?+("1e"+e):e<0?0:e}function Yo(e){return(t,n)=>-e(-t,n)}function Ko(){const e=function(e){const t=e(Vo,Zo),n=t.domain;let r,i,o=10;function a(){return r=function(e){return e===Math.E?Math.log:10===e&&Math.log10||2===e&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}(o),i=function(e){return 10===e?qo:e===Math.E?Math.exp:t=>Math.pow(e,t)}(o),n()[0]<0?(r=Yo(r),i=Yo(i),e(Wo,Go)):e(Vo,Zo),t}return t.base=function(e){return arguments.length?(o=+e,a()):o},t.domain=function(e){return arguments.length?(n(e),a()):n()},t.ticks=e=>{const t=n();let a=t[0],s=t[t.length-1];const l=s<a;l&&([a,s]=[s,a]);let c,u,d=r(a),h=r(s);const f=null==e?10:+e;let p=[];if(!(o%1)&&h-d<f){if(d=Math.floor(d),h=Math.ceil(h),a>0){for(;d<=h;++d)for(c=1;c<o;++c)if(u=d<0?c/i(-d):c*i(d),!(u<a)){if(u>s)break;p.push(u)}}else for(;d<=h;++d)for(c=o-1;c>=1;--c)if(u=d>0?c/i(-d):c*i(d),!(u<a)){if(u>s)break;p.push(u)}2*p.length<f&&(p=xe(a,s,f))}else p=xe(d,h,Math.min(h-d,f)).map(i);return l?p.reverse():p},t.tickFormat=(e,n)=>{if(null==e&&(e=10),null==n&&(n=10===o?"s":","),"function"!=typeof n&&(!(o%1)&&null==(n=Yi(n)).precision&&(n.trim=!0),n=to(n)),e===1/0)return n;const a=Math.max(1,o*e/t.ticks().length);return e=>{let t=e/i(Math.round(r(e)));return t*o<o-.5&&(t*=o),t<=a?n(e):""}},t.nice=()=>n(Ho(n(),{floor:e=>i(Math.floor(r(e))),ceil:e=>i(Math.ceil(r(e)))})),t}(Bo()).domain([1,10]);return e.copy=()=>zo(e,Ko()).base(e.base()),Co.apply(e,arguments),e}const Xo=new Date,Qo=new Date;function Jo(e,t,n,r){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{const t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),null==n?1:Math.floor(n)),e),i.range=(n,r,o)=>{const a=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return a;let s;do{a.push(s=new Date(+n)),t(n,o),e(n)}while(s<n&&n<r);return a},i.filter=n=>Jo((t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),((e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););})),n&&(i.count=(t,r)=>(Xo.setTime(+t),Qo.setTime(+r),e(Xo),e(Qo),Math.floor(n(Xo,Qo))),i.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?t=>r(t)%e==0:t=>i.count(0,t)%e==0):i:null)),i}const ea=Jo((()=>{}),((e,t)=>{e.setTime(+e+t)}),((e,t)=>t-e));ea.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?Jo((t=>{t.setTime(Math.floor(t/e)*e)}),((t,n)=>{t.setTime(+t+n*e)}),((t,n)=>(n-t)/e)):ea:null),ea.range;const ta=1e3,na=6e4,ra=60*na,ia=24*ra,oa=7*ia,aa=30*ia,sa=365*ia,la=Jo((e=>{e.setTime(e-e.getMilliseconds())}),((e,t)=>{e.setTime(+e+t*ta)}),((e,t)=>(t-e)/ta),(e=>e.getUTCSeconds()));la.range;const ca=Jo((e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ta)}),((e,t)=>{e.setTime(+e+t*na)}),((e,t)=>(t-e)/na),(e=>e.getMinutes()));ca.range;const ua=Jo((e=>{e.setUTCSeconds(0,0)}),((e,t)=>{e.setTime(+e+t*na)}),((e,t)=>(t-e)/na),(e=>e.getUTCMinutes()));ua.range;const da=Jo((e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ta-e.getMinutes()*na)}),((e,t)=>{e.setTime(+e+t*ra)}),((e,t)=>(t-e)/ra),(e=>e.getHours()));da.range;const ha=Jo((e=>{e.setUTCMinutes(0,0,0)}),((e,t)=>{e.setTime(+e+t*ra)}),((e,t)=>(t-e)/ra),(e=>e.getUTCHours()));ha.range;const fa=Jo((e=>e.setHours(0,0,0,0)),((e,t)=>e.setDate(e.getDate()+t)),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*na)/ia),(e=>e.getDate()-1));fa.range;const pa=Jo((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/ia),(e=>e.getUTCDate()-1));pa.range;const ma=Jo((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/ia),(e=>Math.floor(e/ia)));function ga(e){return Jo((t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),((e,t)=>{e.setDate(e.getDate()+7*t)}),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*na)/oa))}ma.range;const va=ga(0),ya=ga(1),ba=ga(2),wa=ga(3),_a=ga(4),Ea=ga(5),xa=ga(6);function Sa(e){return Jo((t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)}),((e,t)=>(t-e)/oa))}va.range,ya.range,ba.range,wa.range,_a.range,Ea.range,xa.range;const Ta=Sa(0),Oa=Sa(1),Aa=Sa(2),Ca=Sa(3),ka=Sa(4),Ma=Sa(5),Na=Sa(6);Ta.range,Oa.range,Aa.range,Ca.range,ka.range,Ma.range,Na.range;const Da=Jo((e=>{e.setDate(1),e.setHours(0,0,0,0)}),((e,t)=>{e.setMonth(e.getMonth()+t)}),((e,t)=>t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())),(e=>e.getMonth()));Da.range;const Ra=Jo((e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)}),((e,t)=>t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())),(e=>e.getUTCMonth()));Ra.range;const La=Jo((e=>{e.setMonth(0,1),e.setHours(0,0,0,0)}),((e,t)=>{e.setFullYear(e.getFullYear()+t)}),((e,t)=>t.getFullYear()-e.getFullYear()),(e=>e.getFullYear()));La.every=e=>isFinite(e=Math.floor(e))&&e>0?Jo((t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,n)=>{t.setFullYear(t.getFullYear()+n*e)})):null,La.range;const Pa=Jo((e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)}),((e,t)=>t.getUTCFullYear()-e.getUTCFullYear()),(e=>e.getUTCFullYear()));Pa.every=e=>isFinite(e=Math.floor(e))&&e>0?Jo((t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null,Pa.range;const[Ia,$a]=function(e,t,n,r,i,o){const a=[[la,1,ta],[la,5,5e3],[la,15,15e3],[la,30,3e4],[o,1,na],[o,5,5*na],[o,15,15*na],[o,30,30*na],[i,1,ra],[i,3,3*ra],[i,6,6*ra],[i,12,12*ra],[r,1,ia],[r,2,2*ia],[n,1,oa],[t,1,aa],[t,3,3*aa],[e,1,sa]];function s(t,n,r){const i=Math.abs(n-t)/r,o=se((([,,e])=>e)).right(a,i);if(o===a.length)return e.every(Te(t/sa,n/sa,r));if(0===o)return ea.every(Math.max(Te(t,n,r),1));const[s,l]=a[i/a[o-1][2]<a[o][2]/i?o-1:o];return s.every(l)}return[function(e,t,n){const r=t<e;r&&([e,t]=[t,e]);const i=n&&"function"==typeof n.range?n:s(e,t,n),o=i?i.range(e,+t+1):[];return r?o.reverse():o},s]}(La,Da,va,fa,da,ca);function za(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Ba(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function ja(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}var Fa,Ua,Ha={"-":"",_:" ",0:"0"},Va=/^\s*\d+/,Za=/^%/,Wa=/[\\^$*+?|[\]().{}]/g;function Ga(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function qa(e){return e.replace(Wa,"\\$&")}function Ya(e){return new RegExp("^(?:"+e.map(qa).join("|")+")","i")}function Ka(e){return new Map(e.map(((e,t)=>[e.toLowerCase(),t])))}function Xa(e,t,n){var r=Va.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Qa(e,t,n){var r=Va.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Ja(e,t,n){var r=Va.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function es(e,t,n){var r=Va.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function ts(e,t,n){var r=Va.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function ns(e,t,n){var r=Va.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function rs(e,t,n){var r=Va.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function is(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function os(e,t,n){var r=Va.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function as(e,t,n){var r=Va.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function ss(e,t,n){var r=Va.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function ls(e,t,n){var r=Va.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function cs(e,t,n){var r=Va.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function us(e,t,n){var r=Va.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function ds(e,t,n){var r=Va.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function hs(e,t,n){var r=Va.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function fs(e,t,n){var r=Va.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function ps(e,t,n){var r=Za.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function ms(e,t,n){var r=Va.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function gs(e,t,n){var r=Va.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function vs(e,t){return Ga(e.getDate(),t,2)}function ys(e,t){return Ga(e.getHours(),t,2)}function bs(e,t){return Ga(e.getHours()%12||12,t,2)}function ws(e,t){return Ga(1+fa.count(La(e),e),t,3)}function _s(e,t){return Ga(e.getMilliseconds(),t,3)}function Es(e,t){return _s(e,t)+"000"}function xs(e,t){return Ga(e.getMonth()+1,t,2)}function Ss(e,t){return Ga(e.getMinutes(),t,2)}function Ts(e,t){return Ga(e.getSeconds(),t,2)}function Os(e){var t=e.getDay();return 0===t?7:t}function As(e,t){return Ga(va.count(La(e)-1,e),t,2)}function Cs(e){var t=e.getDay();return t>=4||0===t?_a(e):_a.ceil(e)}function ks(e,t){return e=Cs(e),Ga(_a.count(La(e),e)+(4===La(e).getDay()),t,2)}function Ms(e){return e.getDay()}function Ns(e,t){return Ga(ya.count(La(e)-1,e),t,2)}function Ds(e,t){return Ga(e.getFullYear()%100,t,2)}function Rs(e,t){return Ga((e=Cs(e)).getFullYear()%100,t,2)}function Ls(e,t){return Ga(e.getFullYear()%1e4,t,4)}function Ps(e,t){var n=e.getDay();return Ga((e=n>=4||0===n?_a(e):_a.ceil(e)).getFullYear()%1e4,t,4)}function Is(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ga(t/60|0,"0",2)+Ga(t%60,"0",2)}function $s(e,t){return Ga(e.getUTCDate(),t,2)}function zs(e,t){return Ga(e.getUTCHours(),t,2)}function Bs(e,t){return Ga(e.getUTCHours()%12||12,t,2)}function js(e,t){return Ga(1+pa.count(Pa(e),e),t,3)}function Fs(e,t){return Ga(e.getUTCMilliseconds(),t,3)}function Us(e,t){return Fs(e,t)+"000"}function Hs(e,t){return Ga(e.getUTCMonth()+1,t,2)}function Vs(e,t){return Ga(e.getUTCMinutes(),t,2)}function Zs(e,t){return Ga(e.getUTCSeconds(),t,2)}function Ws(e){var t=e.getUTCDay();return 0===t?7:t}function Gs(e,t){return Ga(Ta.count(Pa(e)-1,e),t,2)}function qs(e){var t=e.getUTCDay();return t>=4||0===t?ka(e):ka.ceil(e)}function Ys(e,t){return e=qs(e),Ga(ka.count(Pa(e),e)+(4===Pa(e).getUTCDay()),t,2)}function Ks(e){return e.getUTCDay()}function Xs(e,t){return Ga(Oa.count(Pa(e)-1,e),t,2)}function Qs(e,t){return Ga(e.getUTCFullYear()%100,t,2)}function Js(e,t){return Ga((e=qs(e)).getUTCFullYear()%100,t,2)}function el(e,t){return Ga(e.getUTCFullYear()%1e4,t,4)}function tl(e,t){var n=e.getUTCDay();return Ga((e=n>=4||0===n?ka(e):ka.ceil(e)).getUTCFullYear()%1e4,t,4)}function nl(){return"+0000"}function rl(){return"%"}function il(e){return+e}function ol(e){return Math.floor(+e/1e3)}function al(e){return new Date(e)}function sl(e){return e instanceof Date?+e:+new Date(+e)}function ll(e,t,n,r,i,o,a,s,l,c){var u=jo(),d=u.invert,h=u.domain,f=c(".%L"),p=c(":%S"),m=c("%I:%M"),g=c("%I %p"),v=c("%a %d"),y=c("%b %d"),b=c("%B"),w=c("%Y");function _(e){return(l(e)<e?f:s(e)<e?p:a(e)<e?m:o(e)<e?g:r(e)<e?i(e)<e?v:y:n(e)<e?b:w)(e)}return u.invert=function(e){return new Date(d(e))},u.domain=function(e){return arguments.length?h(Array.from(e,sl)):h().map(al)},u.ticks=function(t){var n=h();return e(n[0],n[n.length-1],t??10)},u.tickFormat=function(e,t){return null==t?_:c(t)},u.nice=function(e){var n=h();return(!e||"function"!=typeof e.range)&&(e=t(n[0],n[n.length-1],e??10)),e?h(Ho(n,e)):u},u.copy=function(){return zo(u,ll(e,t,n,r,i,o,a,s,l,c))},u}function cl(){return Co.apply(ll(Ia,$a,La,Da,va,fa,da,ca,la,Ua).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function ul(e){return function(){return e}}Fa=function(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=Ya(i),u=Ka(i),d=Ya(o),h=Ka(o),f=Ya(a),p=Ka(a),m=Ya(s),g=Ka(s),v=Ya(l),y=Ka(l),b={a:function(e){return a[e.getDay()]},A:function(e){return o[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:vs,e:vs,f:Es,g:Rs,G:Ps,H:ys,I:bs,j:ws,L:_s,m:xs,M:Ss,p:function(e){return i[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:il,s:ol,S:Ts,u:Os,U:As,V:ks,w:Ms,W:Ns,x:null,X:null,y:Ds,Y:Ls,Z:Is,"%":rl},w={a:function(e){return a[e.getUTCDay()]},A:function(e){return o[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:$s,e:$s,f:Us,g:Js,G:tl,H:zs,I:Bs,j:js,L:Fs,m:Hs,M:Vs,p:function(e){return i[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:il,s:ol,S:Zs,u:Ws,U:Gs,V:Ys,w:Ks,W:Xs,x:null,X:null,y:Qs,Y:el,Z:nl,"%":rl},_={a:function(e,t,n){var r=f.exec(t.slice(n));return r?(e.w=p.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=h.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){var r=v.exec(t.slice(n));return r?(e.m=y.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){var r=m.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,n,r){return S(e,t,n,r)},d:ss,e:ss,f:fs,g:rs,G:ns,H:cs,I:cs,j:ls,L:hs,m:as,M:us,p:function(e,t,n){var r=c.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1},q:os,Q:ms,s:gs,S:ds,u:Qa,U:Ja,V:es,w:Xa,W:ts,x:function(e,t,r){return S(e,n,t,r)},X:function(e,t,n){return S(e,r,t,n)},y:rs,Y:ns,Z:is,"%":ps};function E(e,t){return function(n){var r,i,o,a=[],s=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(i=Ha[r=e.charAt(++s)])?r=e.charAt(++s):i="e"===r?" ":"0",(o=t[r])&&(r=o(n,i)),a.push(r),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function x(e,t){return function(n){var r,i,o=ja(1900,void 0,1);if(S(o,e,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(t&&!("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?(i=(r=Ba(ja(o.y,0,1))).getUTCDay(),r=i>4||0===i?Oa.ceil(r):Oa(r),r=pa.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=za(ja(o.y,0,1))).getDay(),r=i>4||0===i?ya.ceil(r):ya(r),r=fa.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.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),i="Z"in o?Ba(ja(o.y,0,1)).getUTCDay():za(ja(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,Ba(o)):za(o)}}function S(e,t,n,r){for(var i,o,a=0,s=t.length,l=n.length;a<s;){if(r>=l)return-1;if(37===(i=t.charCodeAt(a++))){if(i=t.charAt(a++),!(o=_[i in Ha?t.charAt(a++):i])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return b.x=E(n,b),b.X=E(r,b),b.c=E(t,b),w.x=E(n,w),w.X=E(r,w),w.c=E(t,w),{format:function(e){var t=E(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=x(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=E(e+="",w);return t.toString=function(){return e},t},utcParse:function(e){var t=x(e+="",!0);return t.toString=function(){return e},t}}}({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"]}),Ua=Fa.format,Fa.parse,Fa.utcFormat,Fa.utcParse;const dl=Math.abs,hl=Math.atan2,fl=Math.cos,pl=Math.max,ml=Math.min,gl=Math.sin,vl=Math.sqrt,yl=1e-12,bl=Math.PI,wl=bl/2,_l=2*bl;function El(e){return e>=1?wl:e<=-1?-wl:Math.asin(e)}function xl(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(null==n)t=null;else{const e=Math.floor(n);if(!(e>=0))throw new RangeError(`invalid digits: ${n}`);t=e}return e},()=>new Vi(t)}function Sl(e){return e.innerRadius}function Tl(e){return e.outerRadius}function Ol(e){return e.startAngle}function Al(e){return e.endAngle}function Cl(e){return e&&e.padAngle}function kl(e,t,n,r,i,o,a){var s=e-n,l=t-r,c=(a?o:-o)/vl(s*s+l*l),u=c*l,d=-c*s,h=e+u,f=t+d,p=n+u,m=r+d,g=(h+p)/2,v=(f+m)/2,y=p-h,b=m-f,w=y*y+b*b,_=i-o,E=h*m-p*f,x=(b<0?-1:1)*vl(pl(0,_*_*w-E*E)),S=(E*b-y*x)/w,T=(-E*y-b*x)/w,O=(E*b+y*x)/w,A=(-E*y+b*x)/w,C=S-g,k=T-v,M=O-g,N=A-v;return C*C+k*k>M*M+N*N&&(S=O,T=A),{cx:S,cy:T,x01:-u,y01:-d,x11:S*(i/_-1),y11:T*(i/_-1)}}function Ml(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function Nl(e){this._context=e}function Dl(e){return new Nl(e)}function Rl(e){return e[0]}function Ll(e){return e[1]}function Pl(e,t){var n=ul(!0),r=null,i=Dl,o=null,a=xl(s);function s(s){var l,c,u,d=(s=Ml(s)).length,h=!1;for(null==r&&(o=i(u=a())),l=0;l<=d;++l)!(l<d&&n(c=s[l],l,s))===h&&((h=!h)?o.lineStart():o.lineEnd()),h&&o.point(+e(c,l,s),+t(c,l,s));if(u)return o=null,u+""||null}return e="function"==typeof e?e:void 0===e?Rl:ul(e),t="function"==typeof t?t:void 0===t?Ll:ul(t),s.x=function(t){return arguments.length?(e="function"==typeof t?t:ul(+t),s):e},s.y=function(e){return arguments.length?(t="function"==typeof e?e:ul(+e),s):t},s.defined=function(e){return arguments.length?(n="function"==typeof e?e:ul(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,null!=r&&(o=i(r)),s):i},s.context=function(e){return arguments.length?(null==e?r=o=null:o=i(r=e),s):r},s}function Il(e,t,n){var r=null,i=ul(!0),o=null,a=Dl,s=null,l=xl(c);function c(c){var u,d,h,f,p,m=(c=Ml(c)).length,g=!1,v=new Array(m),y=new Array(m);for(null==o&&(s=a(p=l())),u=0;u<=m;++u){if(!(u<m&&i(f=c[u],u,c))===g)if(g=!g)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),h=u-1;h>=d;--h)s.point(v[h],y[h]);s.lineEnd(),s.areaEnd()}g&&(v[u]=+e(f,u,c),y[u]=+t(f,u,c),s.point(r?+r(f,u,c):v[u],n?+n(f,u,c):y[u]))}if(p)return s=null,p+""||null}function u(){return Pl().defined(i).curve(a).context(o)}return e="function"==typeof e?e:void 0===e?Rl:ul(+e),t="function"==typeof t?t:ul(void 0===t?0:+t),n="function"==typeof n?n:void 0===n?Ll:ul(+n),c.x=function(t){return arguments.length?(e="function"==typeof t?t:ul(+t),r=null,c):e},c.x0=function(t){return arguments.length?(e="function"==typeof t?t:ul(+t),c):e},c.x1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:ul(+e),c):r},c.y=function(e){return arguments.length?(t="function"==typeof e?e:ul(+e),n=null,c):t},c.y0=function(e){return arguments.length?(t="function"==typeof e?e:ul(+e),c):t},c.y1=function(e){return arguments.length?(n=null==e?null:"function"==typeof e?e:ul(+e),c):n},c.lineX0=c.lineY0=function(){return u().x(e).y(t)},c.lineY1=function(){return u().x(e).y(n)},c.lineX1=function(){return u().x(r).y(t)},c.defined=function(e){return arguments.length?(i="function"==typeof e?e:ul(!!e),c):i},c.curve=function(e){return arguments.length?(a=e,null!=o&&(s=a(o)),c):a},c.context=function(e){return arguments.length?(null==e?o=s=null:s=a(o=e),c):o},c}function $l(e){this._curve=e}function zl(){}function Bl(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function jl(e){this._context=e}function Fl(e){return new jl(e)}function Ul(e){this._context=e}function Hl(e){return new Ul(e)}function Vl(e){this._context=e}function Zl(e){return new Vl(e)}function Wl(e,t){this._basis=new jl(e),this._beta=t}Array.prototype.slice,Nl.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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}},function(e){function t(t){return new $l(e(t))}t._curve=e}(Dl),$l.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}},jl.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:Bl(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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);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:Bl(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},Ul.prototype={areaStart:zl,areaEnd:zl,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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Bl(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},Vl.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(e,t){switch(e=+e,t=+t,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+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Bl(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},Wl.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r,i=e[0],o=t[0],a=e[n]-i,s=t[n]-o,l=-1;++l<=n;)r=l/n,this._basis.point(this._beta*e[l]+(1-this._beta)*(i+r*a),this._beta*t[l]+(1-this._beta)*(o+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const Gl=function e(t){function n(e){return 1===t?new jl(e):new Wl(e,t)}return n.beta=function(t){return e(+t)},n}(.85);function ql(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function Yl(e,t){this._context=e,this._k=(1-t)/6}Yl.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:ql(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:ql(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Kl=function e(t){function n(e){return new Yl(e,t)}return n.tension=function(t){return e(+t)},n}(0);function Xl(e,t){this._context=e,this._k=(1-t)/6}Xl.prototype={areaStart:zl,areaEnd:zl,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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:ql(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Ql=function e(t){function n(e){return new Xl(e,t)}return n.tension=function(t){return e(+t)},n}(0);function Jl(e,t){this._context=e,this._k=(1-t)/6}Jl.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(e,t){switch(e=+e,t=+t,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:ql(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const ec=function e(t){function n(e){return new Jl(e,t)}return n.tension=function(t){return e(+t)},n}(0);function tc(e,t,n){var r=e._x1,i=e._y1,o=e._x2,a=e._y2;if(e._l01_a>yl){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>yl){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*c+e._x1*e._l23_2a-t*e._l12_2a)/u,a=(a*c+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,o,a,e._x2,e._y2)}function nc(e,t){this._context=e,this._alpha=t}nc.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(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:tc(this,e,t)}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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const rc=function e(t){function n(e){return t?new nc(e,t):new Yl(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function ic(e,t){this._context=e,this._alpha=t}ic.prototype={areaStart:zl,areaEnd:zl,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(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:tc(this,e,t)}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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const oc=function e(t){function n(e){return t?new ic(e,t):new Xl(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function ac(e,t){this._context=e,this._alpha=t}ac.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(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,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:tc(this,e,t)}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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const sc=function e(t){function n(e){return t?new ac(e,t):new Jl(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function lc(e){this._context=e}function cc(e){return new lc(e)}function uc(e){return e<0?-1:1}function dc(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(uc(o)+uc(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function hc(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function fc(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-r)/3;e._context.bezierCurveTo(r+s,i+s*t,o-s,a-s*n,o,a)}function pc(e){this._context=e}function mc(e){this._context=new gc(e)}function gc(e){this._context=e}function vc(e){return new pc(e)}function yc(e){return new mc(e)}function bc(e){this._context=e}function wc(e){var t,n,r=e.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,o[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/o[t-1],o[t]-=n,a[t]-=n*a[t-1];for(i[r-1]=a[r-1]/o[r-1],t=r-2;t>=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function _c(e){return new bc(e)}function Ec(e,t){this._context=e,this._t=t}function xc(e){return new Ec(e,.5)}function Sc(e){return new Ec(e,0)}function Tc(e){return new Ec(e,1)}function Oc(e,t){if((i=e.length)>1)for(var n,r,i,o=1,a=e[t[0]],s=a.length;o<i;++o)for(r=a,a=e[t[o]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function Ac(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function Cc(e,t){return e[t]}function kc(e){const t=[];return t.key=e,t}function Mc(){var e=ul([]),t=Ac,n=Oc,r=Cc;function i(i){var o,a,s=Array.from(e.apply(this,arguments),kc),l=s.length,c=-1;for(const e of i)for(o=0,++c;o<l;++o)(s[o][c]=[0,+r(e,s[o].key,c,i)]).data=e;for(o=0,a=Ml(t(s));o<l;++o)s[a[o]].index=o;return n(s,a),s}return i.keys=function(t){return arguments.length?(e="function"==typeof t?t:ul(Array.from(t)),i):e},i.value=function(e){return arguments.length?(r="function"==typeof e?e:ul(+e),i):r},i.order=function(e){return arguments.length?(t=null==e?Ac:"function"==typeof e?e:ul(Array.from(e)),i):t},i.offset=function(e){return arguments.length?(n=e??Oc,i):n},i}function Nc(e,t){if((s=e.length)>0)for(var n,r,i,o,a,s,l=0,c=e[t[0]].length;l<c;++l)for(o=a=0,n=0;n<s;++n)(i=(r=e[t[n]][l])[1]-r[0])>0?(r[0]=o,r[1]=o+=i):i<0?(r[1]=a,r[0]=a+=i):(r[0]=0,r[1]=i)}function Dc(e,t,n){this.k=e,this.x=t,this.y=n}function Rc(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}function Lc(e){return(t,n)=>{let r;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,i=null!=n&&n.width?String(n.width):t;r=e.formattingValues[i]||e.formattingValues[t]}else{const t=e.defaultWidth,i=null!=n&&n.width?String(n.width):e.defaultWidth;r=e.values[i]||e.values[t]}return r[e.argumentCallback?e.argumentCallback(t):t]}}function Pc(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;const a=o[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?function(e,t){for(let t=0;t<e.length;t++)if(e[t].test(a))return t}(s):function(e,t){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&e[t].test(a))return t}(s);let c;return c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c,{value:c,rest:t.slice(a.length)}}}function Ic(e){const t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):"number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?new Date(e):new Date(NaN)}lc.prototype={areaStart:zl,areaEnd:zl,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}},pc.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:fc(this,this._t0,hc(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(t=+t,(e=+e)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,fc(this,hc(this,n=dc(this,e,t)),n);break;default:fc(this,this._t0,n=dc(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(mc.prototype=Object.create(pc.prototype)).point=function(e,t){pc.prototype.point.call(this,t,e)},gc.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}},bc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===n)this._context.lineTo(e[1],t[1]);else for(var r=wc(e),i=wc(t),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],e[a],t[a]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}},Ec.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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}},Dc.prototype={constructor:Dc,scale:function(e){return 1===e?this:new Dc(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new Dc(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},Dc.prototype;let $c={};function zc(){return $c}function Bc(e,t){var n,r,i,o;const a=zc(),s=(null==t?void 0:t.weekStartsOn)??(null==(r=null==(n=null==t?void 0:t.locale)?void 0:n.options)?void 0:r.weekStartsOn)??a.weekStartsOn??(null==(o=null==(i=a.locale)?void 0:i.options)?void 0:o.weekStartsOn)??0,l=Ic(e),c=l.getDay(),u=(c<s?7:0)+c-s;return l.setDate(l.getDate()-u),l.setHours(0,0,0,0),l}const jc={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"}},Fc={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Uc={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Lc({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Lc({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Lc({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:Lc({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:Lc({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"})},Hc={ordinalNumber:function(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],o=t.match(e.parsePattern);if(!o)return null;let a=e.valueCallback?e.valueCallback(o[0]):o[0];return a=n.valueCallback?n.valueCallback(a):a,{value:a,rest:t.slice(i.length)}}}({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:Pc({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:Pc({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:e=>e+1}),month:Pc({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:Pc({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:Pc({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"})},Vc={code:"en-US",formatDistance:(e,t,n)=>{let r;const i=jc[e];return r="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",t.toString()),null!=n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:{date:Rc({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Rc({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:Rc({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},formatRelative:(e,t,n,r)=>Fc[e],localize:Uc,match:Hc,options:{weekStartsOn:0,firstWeekContainsDate:1}},Zc="object"==typeof global&&global&&global.Object===Object&&global;var Wc="object"==typeof self&&self&&self.Object===Object&&self;const Gc=Zc||Wc||Function("return this")(),qc=Gc.Symbol;var Yc=Object.prototype,Kc=Yc.hasOwnProperty,Xc=Yc.toString,Qc=qc?qc.toStringTag:void 0,Jc=Object.prototype.toString,eu="[object Null]",tu="[object Undefined]",nu=qc?qc.toStringTag:void 0;function ru(e){return null==e?void 0===e?tu:eu:nu&&nu in Object(e)?function(e){var t=Kc.call(e,Qc),n=e[Qc];try{e[Qc]=void 0;var r=!0}catch{}var i=Xc.call(e);return r&&(t?e[Qc]=n:delete e[Qc]),i}(e):function(e){return Jc.call(e)}(e)}function iu(e){return null!=e&&"object"==typeof e}var ou="[object Symbol]";function au(e){return"symbol"==typeof e||iu(e)&&ru(e)==ou}const su=Array.isArray;var lu=1/0,cu=qc?qc.prototype:void 0,uu=cu?cu.toString:void 0;function du(e){if("string"==typeof e)return e;if(su(e))return function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}(e,du)+"";if(au(e))return uu?uu.call(e):"";var t=e+"";return"0"==t&&1/e==-lu?"-0":t}function hu(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function fu(e){return e}var pu="[object AsyncFunction]",mu="[object Function]",gu="[object GeneratorFunction]",vu="[object Proxy]";function yu(e){if(!hu(e))return!1;var t=ru(e);return t==mu||t==gu||t==pu||t==vu}const bu=Gc["__core-js_shared__"];var wu=function(){var e=/[^.]+$/.exec(bu&&bu.keys&&bu.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),_u=Function.prototype.toString;function Eu(e){if(null!=e){try{return _u.call(e)}catch{}try{return e+""}catch{}}return""}var xu=/^\[object .+?Constructor\]$/,Su=Function.prototype,Tu=Object.prototype,Ou=Su.toString,Au=Tu.hasOwnProperty,Cu=RegExp("^"+Ou.call(Au).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ku(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!hu(e)||function(e){return!!wu&&wu in e}(e))&&(yu(e)?Cu:xu).test(Eu(e))}(n)?n:void 0}const Mu=ku(Gc,"WeakMap");var Nu=Object.create,Du=function(){function e(){}return function(t){if(!hu(t))return{};if(Nu)return Nu(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const Ru=Du;function Lu(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var Pu=Date.now;function Iu(e){return function(){return e}}var $u=function(){try{var e=ku(Object,"defineProperty");return e({},"",{}),e}catch{}}();const zu=$u;var Bu=zu?function(e,t){return zu(e,"toString",{configurable:!0,enumerable:!1,value:Iu(t),writable:!0})}:fu,ju=function(e){var t=0,n=0;return function(){var r=Pu(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(Bu);const Fu=ju;function Uu(e){return e!=e}function Hu(e,t){return!(null==e||!e.length)&&function(e,t,n){return t==t?function(e,t,n){for(var r=-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}(e,t):function(e,t,n,r){for(var i=e.length,o=-1;++o<i;)if(t(e[o],o,e))return o;return-1}(e,Uu)}(e,t)>-1}var Vu=9007199254740991,Zu=/^(?:0|[1-9]\d*)$/;function Wu(e,t){var n=typeof e;return!!(t=t??Vu)&&("number"==n||"symbol"!=n&&Zu.test(e))&&e>-1&&e%1==0&&e<t}function Gu(e,t,n){"__proto__"==t&&zu?zu(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function qu(e,t){return e===t||e!=e&&t!=t}var Yu=Object.prototype.hasOwnProperty;function Ku(e,t,n){var r=e[t];(!Yu.call(e,t)||!qu(r,n)||void 0===n&&!(t in e))&&Gu(e,t,n)}function Xu(e,t,n,r){var i=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var s=t[o],l=r?r(n[s],e[s],s,n,e):void 0;void 0===l&&(l=e[s]),i?Gu(n,s,l):Ku(n,s,l)}return n}var Qu=Math.max;function Ju(e,t){return Fu(function(e,t,n){return t=Qu(void 0===t?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=Qu(r.length-t,0),a=Array(o);++i<o;)a[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(a),function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(e,this,s)}}(e,t,fu),e+"")}var ed=9007199254740991;function td(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=ed}function nd(e){return null!=e&&td(e.length)&&!yu(e)}function rd(e,t,n){if(!hu(n))return!1;var r=typeof t;return!!("number"==r?nd(n)&&Wu(t,n.length):"string"==r&&t in n)&&qu(n[t],e)}var id=Object.prototype;function od(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||id)}function ad(e){return iu(e)&&"[object Arguments]"==ru(e)}var sd=Object.prototype,ld=sd.hasOwnProperty,cd=sd.propertyIsEnumerable,ud=ad(function(){return arguments}())?ad:function(e){return iu(e)&&ld.call(e,"callee")&&!cd.call(e,"callee")};const dd=ud;var hd="object"==typeof exports&&exports&&!exports.nodeType&&exports,fd=hd&&"object"==typeof module&&module&&!module.nodeType&&module,pd=fd&&fd.exports===hd?Gc.Buffer:void 0;const md=(pd?pd.isBuffer:void 0)||function(){return!1};var gd={};function vd(e){return function(t){return e(t)}}gd["[object Float32Array]"]=gd["[object Float64Array]"]=gd["[object Int8Array]"]=gd["[object Int16Array]"]=gd["[object Int32Array]"]=gd["[object Uint8Array]"]=gd["[object Uint8ClampedArray]"]=gd["[object Uint16Array]"]=gd["[object Uint32Array]"]=!0,gd["[object Arguments]"]=gd["[object Array]"]=gd["[object ArrayBuffer]"]=gd["[object Boolean]"]=gd["[object DataView]"]=gd["[object Date]"]=gd["[object Error]"]=gd["[object Function]"]=gd["[object Map]"]=gd["[object Number]"]=gd["[object Object]"]=gd["[object RegExp]"]=gd["[object Set]"]=gd["[object String]"]=gd["[object WeakMap]"]=!1;var yd="object"==typeof exports&&exports&&!exports.nodeType&&exports,bd=yd&&"object"==typeof module&&module&&!module.nodeType&&module,wd=bd&&bd.exports===yd&&Zc.process;const _d=function(){try{return bd&&bd.require&&bd.require("util").types||wd&&wd.binding&&wd.binding("util")}catch{}}();var Ed=_d&&_d.isTypedArray,xd=Ed?vd(Ed):function(e){return iu(e)&&td(e.length)&&!!gd[ru(e)]};const Sd=xd;var Td=Object.prototype.hasOwnProperty;function Od(e,t){var n=su(e),r=!n&&dd(e),i=!n&&!r&&md(e),o=!n&&!r&&!i&&Sd(e),a=n||r||i||o,s=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],l=s.length;for(var c in e)(t||Td.call(e,c))&&(!a||!("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Wu(c,l)))&&s.push(c);return s}function Ad(e,t){return function(n){return e(t(n))}}const Cd=Ad(Object.keys,Object);var kd=Object.prototype.hasOwnProperty;function Md(e){if(!od(e))return Cd(e);var t=[];for(var n in Object(e))kd.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Nd(e){return nd(e)?Od(e):Md(e)}var Dd=Object.prototype.hasOwnProperty;function Rd(e){return nd(e)?Od(e,!0):function(e){if(!hu(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=od(e),n=[];for(var r in e)"constructor"==r&&(t||!Dd.call(e,r))||n.push(r);return n}(e)}var Ld=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Pd=/^\w*$/;function Id(e,t){if(su(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!au(e))||Pd.test(e)||!Ld.test(e)||null!=t&&e in Object(t)}const $d=ku(Object,"create");var zd=Object.prototype.hasOwnProperty,Bd=Object.prototype.hasOwnProperty;function jd(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Fd(e,t){for(var n=e.length;n--;)if(qu(e[n][0],t))return n;return-1}jd.prototype.clear=function(){this.__data__=$d?$d(null):{},this.size=0},jd.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},jd.prototype.get=function(e){var t=this.__data__;if($d){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return zd.call(t,e)?t[e]:void 0},jd.prototype.has=function(e){var t=this.__data__;return $d?void 0!==t[e]:Bd.call(t,e)},jd.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=$d&&void 0===t?"__lodash_hash_undefined__":t,this};var Ud=Array.prototype.splice;function Hd(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Hd.prototype.clear=function(){this.__data__=[],this.size=0},Hd.prototype.delete=function(e){var t=this.__data__,n=Fd(t,e);return!(n<0||(n==t.length-1?t.pop():Ud.call(t,n,1),--this.size,0))},Hd.prototype.get=function(e){var t=this.__data__,n=Fd(t,e);return n<0?void 0:t[n][1]},Hd.prototype.has=function(e){return Fd(this.__data__,e)>-1},Hd.prototype.set=function(e,t){var n=this.__data__,r=Fd(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};const Vd=ku(Gc,"Map");function Zd(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function Wd(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Wd.prototype.clear=function(){this.size=0,this.__data__={hash:new jd,map:new(Vd||Hd),string:new jd}},Wd.prototype.delete=function(e){var t=Zd(this,e).delete(e);return this.size-=t?1:0,t},Wd.prototype.get=function(e){return Zd(this,e).get(e)},Wd.prototype.has=function(e){return Zd(this,e).has(e)},Wd.prototype.set=function(e,t){var n=Zd(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function Gd(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Gd.Cache||Wd),n}Gd.Cache=Wd;var qd=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yd=/\\(\\)?/g,Kd=function(e){var t=Gd((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(qd,(function(e,n,r,i){t.push(r?i.replace(Yd,"$1"):n||e)})),t}),(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}();const Xd=Kd;function Qd(e){return null==e?"":du(e)}function Jd(e,t){return su(e)?e:Id(e,t)?[e]:Xd(Qd(e))}var eh=1/0;function th(e){if("string"==typeof e||au(e))return e;var t=e+"";return"0"==t&&1/e==-eh?"-0":t}function nh(e,t){for(var n=0,r=(t=Jd(t,e)).length;null!=e&&n<r;)e=e[th(t[n++])];return n&&n==r?e:void 0}function rh(e,t,n){var r=null==e?void 0:nh(e,t);return void 0===r?n:r}function ih(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var oh=qc?qc.isConcatSpreadable:void 0;function ah(e){return su(e)||dd(e)||!!(oh&&e&&e[oh])}function sh(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=ah),i||(i=[]);++o<a;){var s=e[o];t>0&&n(s)?t>1?sh(s,t-1,n,r,i):ih(i,s):r||(i[i.length]=s)}return i}const lh=Ad(Object.getPrototypeOf,Object);var ch="[object Object]",uh=Function.prototype,dh=Object.prototype,hh=uh.toString,fh=dh.hasOwnProperty,ph=hh.call(Object);function mh(e){var t=this.__data__=new Hd(e);this.size=t.size}mh.prototype.clear=function(){this.__data__=new Hd,this.size=0},mh.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},mh.prototype.get=function(e){return this.__data__.get(e)},mh.prototype.has=function(e){return this.__data__.has(e)},mh.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Hd){var r=n.__data__;if(!Vd||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Wd(r)}return n.set(e,t),this.size=n.size,this};var gh="object"==typeof exports&&exports&&!exports.nodeType&&exports,vh=gh&&"object"==typeof module&&module&&!module.nodeType&&module,yh=vh&&vh.exports===gh?Gc.Buffer:void 0,bh=yh?yh.allocUnsafe:void 0;function wh(e,t){if(t)return e.slice();var n=e.length,r=bh?bh(n):new e.constructor(n);return e.copy(r),r}function _h(){return[]}var Eh=Object.prototype.propertyIsEnumerable,xh=Object.getOwnPropertySymbols,Sh=xh?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a)&&(o[i++]=a)}return o}(xh(e),(function(t){return Eh.call(e,t)})))}:_h;const Th=Sh;var Oh=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)ih(t,Th(e)),e=lh(e);return t}:_h;const Ah=Oh;function Ch(e,t,n){var r=t(e);return su(e)?r:ih(r,n(e))}function kh(e){return Ch(e,Nd,Th)}function Mh(e){return Ch(e,Rd,Ah)}const Nh=ku(Gc,"DataView"),Dh=ku(Gc,"Promise"),Rh=ku(Gc,"Set");var Lh="[object Map]",Ph="[object Promise]",Ih="[object Set]",$h="[object WeakMap]",zh="[object DataView]",Bh=Eu(Nh),jh=Eu(Vd),Fh=Eu(Dh),Uh=Eu(Rh),Hh=Eu(Mu),Vh=ru;(Nh&&Vh(new Nh(new ArrayBuffer(1)))!=zh||Vd&&Vh(new Vd)!=Lh||Dh&&Vh(Dh.resolve())!=Ph||Rh&&Vh(new Rh)!=Ih||Mu&&Vh(new Mu)!=$h)&&(Vh=function(e){var t=ru(e),n="[object Object]"==t?e.constructor:void 0,r=n?Eu(n):"";if(r)switch(r){case Bh:return zh;case jh:return Lh;case Fh:return Ph;case Uh:return Ih;case Hh:return $h}return t});const Zh=Vh;var Wh=Object.prototype.hasOwnProperty;const Gh=Gc.Uint8Array;function qh(e){var t=new e.constructor(e.byteLength);return new Gh(t).set(new Gh(e)),t}var Yh=/\w*$/,Kh=qc?qc.prototype:void 0,Xh=Kh?Kh.valueOf:void 0;function Qh(e,t){var n=t?qh(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var Jh="[object Boolean]",ef="[object Date]",tf="[object Map]",nf="[object Number]",rf="[object RegExp]",of="[object Set]",af="[object String]",sf="[object Symbol]",lf="[object ArrayBuffer]",cf="[object DataView]",uf="[object Float32Array]",df="[object Float64Array]",hf="[object Int8Array]",ff="[object Int16Array]",pf="[object Int32Array]",mf="[object Uint8Array]",gf="[object Uint8ClampedArray]",vf="[object Uint16Array]",yf="[object Uint32Array]";function bf(e){return"function"!=typeof e.constructor||od(e)?{}:Ru(lh(e))}var wf=_d&&_d.isMap,_f=wf?vd(wf):function(e){return iu(e)&&"[object Map]"==Zh(e)};const Ef=_f;var xf=_d&&_d.isSet,Sf=xf?vd(xf):function(e){return iu(e)&&"[object Set]"==Zh(e)};const Tf=Sf;var Of=1,Af=2,Cf=4,kf="[object Arguments]",Mf="[object Function]",Nf="[object GeneratorFunction]",Df="[object Object]",Rf={};function Lf(e,t,n,r,i,o){var a,s=t&Of,l=t&Af,c=t&Cf;if(n&&(a=i?n(e,r,i,o):n(e)),void 0!==a)return a;if(!hu(e))return e;var u=su(e);if(u){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Wh.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!s)return Lu(e,a)}else{var d=Zh(e),h=d==Mf||d==Nf;if(md(e))return wh(e,s);if(d==Df||d==kf||h&&!i){if(a=l||h?{}:bf(e),!s)return l?function(e,t){return Xu(e,Ah(e),t)}(e,function(e,t){return e&&Xu(t,Rd(t),e)}(a,e)):function(e,t){return Xu(e,Th(e),t)}(e,function(e,t){return e&&Xu(t,Nd(t),e)}(a,e))}else{if(!Rf[d])return i?e:{};a=function(e,t,n){var r=e.constructor;switch(t){case lf:return qh(e);case Jh:case ef:return new r(+e);case cf:return function(e,t){var n=t?qh(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case uf:case df:case hf:case ff:case pf:case mf:case gf:case vf:case yf:return Qh(e,n);case tf:return new r;case nf:case af:return new r(e);case rf:return function(e){var t=new e.constructor(e.source,Yh.exec(e));return t.lastIndex=e.lastIndex,t}(e);case of:return new r;case sf:return function(e){return Xh?Object(Xh.call(e)):{}}(e)}}(e,d,s)}}o||(o=new mh);var f=o.get(e);if(f)return f;o.set(e,a),Tf(e)?e.forEach((function(r){a.add(Lf(r,t,n,r,e,o))})):Ef(e)&&e.forEach((function(r,i){a.set(i,Lf(r,t,n,i,e,o))}));var p=u?void 0:(c?l?Mh:kh:l?Rd:Nd)(e);return function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n););}(p||e,(function(r,i){p&&(r=e[i=r]),Ku(a,i,Lf(r,t,n,i,e,o))})),a}Rf[kf]=Rf["[object Array]"]=Rf["[object ArrayBuffer]"]=Rf["[object DataView]"]=Rf["[object Boolean]"]=Rf["[object Date]"]=Rf["[object Float32Array]"]=Rf["[object Float64Array]"]=Rf["[object Int8Array]"]=Rf["[object Int16Array]"]=Rf["[object Int32Array]"]=Rf["[object Map]"]=Rf["[object Number]"]=Rf[Df]=Rf["[object RegExp]"]=Rf["[object Set]"]=Rf["[object String]"]=Rf["[object Symbol]"]=Rf["[object Uint8Array]"]=Rf["[object Uint8ClampedArray]"]=Rf["[object Uint16Array]"]=Rf["[object Uint32Array]"]=!0,Rf["[object Error]"]=Rf[Mf]=Rf["[object WeakMap]"]=!1;var Pf=1,If=4;function $f(e){return Lf(e,Pf|If)}function zf(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Wd;++t<n;)this.add(e[t])}function Bf(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function jf(e,t){return e.has(t)}zf.prototype.add=zf.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},zf.prototype.has=function(e){return this.__data__.has(e)};var Ff=1,Uf=2;function Hf(e,t,n,r,i,o){var a=n&Ff,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var c=o.get(e),u=o.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,f=n&Uf?new zf:void 0;for(o.set(e,t),o.set(t,e);++d<s;){var p=e[d],m=t[d];if(r)var g=a?r(m,p,d,t,e,o):r(p,m,d,e,t,o);if(void 0!==g){if(g)continue;h=!1;break}if(f){if(!Bf(t,(function(e,t){if(!jf(f,t)&&(p===e||i(p,e,n,r,o)))return f.push(t)}))){h=!1;break}}else if(p!==m&&!i(p,m,n,r,o)){h=!1;break}}return o.delete(e),o.delete(t),h}function Vf(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function Zf(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var Wf=1,Gf=2,qf="[object Boolean]",Yf="[object Date]",Kf="[object Error]",Xf="[object Map]",Qf="[object Number]",Jf="[object RegExp]",ep="[object Set]",tp="[object String]",np="[object Symbol]",rp="[object ArrayBuffer]",ip="[object DataView]",op=qc?qc.prototype:void 0,ap=op?op.valueOf:void 0,sp=1,lp=Object.prototype.hasOwnProperty,cp=1,up="[object Arguments]",dp="[object Array]",hp="[object Object]",fp=Object.prototype.hasOwnProperty;function pp(e,t,n,r,i){return e===t||(null==e||null==t||!iu(e)&&!iu(t)?e!=e&&t!=t:function(e,t,n,r,i,o){var a=su(e),s=su(t),l=a?dp:Zh(e),c=s?dp:Zh(t),u=(l=l==up?hp:l)==hp,d=(c=c==up?hp:c)==hp,h=l==c;if(h&&md(e)){if(!md(t))return!1;a=!0,u=!1}if(h&&!u)return o||(o=new mh),a||Sd(e)?Hf(e,t,n,r,i,o):function(e,t,n,r,i,o,a){switch(n){case ip:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case rp:return!(e.byteLength!=t.byteLength||!o(new Gh(e),new Gh(t)));case qf:case Yf:case Qf:return qu(+e,+t);case Kf:return e.name==t.name&&e.message==t.message;case Jf:case tp:return e==t+"";case Xf:var s=Vf;case ep:var l=r&Wf;if(s||(s=Zf),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;r|=Gf,a.set(e,t);var u=Hf(s(e),s(t),r,i,o,a);return a.delete(e),u;case np:if(ap)return ap.call(e)==ap.call(t)}return!1}(e,t,l,n,r,i,o);if(!(n&cp)){var f=u&&fp.call(e,"__wrapped__"),p=d&&fp.call(t,"__wrapped__");if(f||p){var m=f?e.value():e,g=p?t.value():t;return o||(o=new mh),i(m,g,n,r,o)}}return!!h&&(o||(o=new mh),function(e,t,n,r,i,o){var a=n&sp,s=kh(e),l=s.length;if(l!=kh(t).length&&!a)return!1;for(var c=l;c--;){var u=s[c];if(!(a?u in t:lp.call(t,u)))return!1}var d=o.get(e),h=o.get(t);if(d&&h)return d==t&&h==e;var f=!0;o.set(e,t),o.set(t,e);for(var p=a;++c<l;){var m=e[u=s[c]],g=t[u];if(r)var v=a?r(g,m,u,t,e,o):r(m,g,u,e,t,o);if(!(void 0===v?m===g||i(m,g,n,r,o):v)){f=!1;break}p||(p="constructor"==u)}if(f&&!p){var y=e.constructor,b=t.constructor;y!=b&&"constructor"in e&&"constructor"in t&&!("function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b)&&(f=!1)}return o.delete(e),o.delete(t),f}(e,t,n,r,i,o))}(e,t,n,r,pp,i))}var mp=1,gp=2;function vp(e){return e==e&&!hu(e)}function yp(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}function bp(e,t){return null!=e&&t in Object(e)}var wp=1,_p=2;function Ep(e){return"function"==typeof e?e:null==e?fu:"object"==typeof e?su(e)?function(e,t){return Id(e)&&vp(t)?yp(th(e),t):function(n){var r=rh(n,e);return void 0===r&&r===t?function(e,t){return null!=e&&function(e,t,n){for(var r=-1,i=(t=Jd(t,e)).length,o=!1;++r<i;){var a=th(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&td(i)&&Wu(a,i)&&(su(e)||dd(e))}(e,t,bp)}(n,e):pp(t,r,wp|_p)}}(e[0],e[1]):function(e){var t=function(e){for(var t=Nd(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,vp(i)]}return t}(e);return 1==t.length&&t[0][2]?yp(t[0][0],t[0][1]):function(n){return n===e||function(e,t,n,r){var i=n.length,o=i;if(null==e)return!o;for(e=Object(e);i--;){var a=n[i];if(a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++i<o;){var s=(a=n[i])[0],l=e[s],c=a[1];if(a[2]){if(void 0===l&&!(s in e))return!1}else{var u,d=new mh;if(!(void 0===u?pp(c,l,mp|gp,r,d):u))return!1}}return!0}(n,0,t)}}(e):function(e){return Id(e)?function(e){return function(t){return null==t?void 0:t[e]}}(th(e)):function(e){return function(t){return nh(t,e)}}(e)}(e)}var xp=function(e,t,n){for(var r=-1,i=Object(e),o=n(e),a=o.length;a--;){var s=o[++r];if(!1===t(i[s],s,i))break}return e};const Sp=xp;function Tp(e,t,n){(void 0!==n&&!qu(e[t],n)||void 0===n&&!(t in e))&&Gu(e,t,n)}function Op(e){return iu(e)&&nd(e)}function Ap(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}function Cp(e,t,n,r,i){e!==t&&Sp(t,(function(o,a){if(i||(i=new mh),hu(o))!function(e,t,n,r,i,o,a){var s=Ap(e,n),l=Ap(t,n),c=a.get(l);if(c)Tp(e,n,c);else{var u=o?o(s,l,n+"",e,t,a):void 0,d=void 0===u;if(d){var h=su(l),f=!h&&md(l),p=!h&&!f&&Sd(l);u=l,h||f||p?su(s)?u=s:Op(s)?u=Lu(s):f?(d=!1,u=wh(l,!0)):p?(d=!1,u=Qh(l,!0)):u=[]:function(e){if(!iu(e)||ru(e)!=ch)return!1;var t=lh(e);if(null===t)return!0;var n=fh.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&hh.call(n)==ph}(l)||dd(l)?(u=s,dd(s)?u=function(e){return Xu(e,Rd(e))}(s):(!hu(s)||yu(s))&&(u=bf(l))):d=!1}d&&(a.set(l,u),i(u,l,r,o,a),a.delete(l)),Tp(e,n,u)}}(e,t,a,n,Cp,r,i);else{var s=r?r(Ap(e,a),o,a+"",e,t,i):void 0;void 0===s&&(s=o),Tp(e,a,s)}}),Rd)}function kp(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}var Mp=Object.prototype.hasOwnProperty;var Np=function(e){return Ju((function(t,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o=e.length>3&&"function"==typeof o?(i--,o):void 0,a&&rd(n[0],n[1],a)&&(o=i<3?void 0:o,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r)}return t}))}((function(e,t,n){Cp(e,t,n)}));const Dp=Np;var Rp=Rh&&1/Zf(new Rh([,-0]))[1]==1/0?function(e){return new Rh(e)}:function(){};const Lp=Rp;var Pp=200;function Ip(e,t,n){var r=-1,i=Hu,o=e.length,a=!0,s=[],l=s;if(n)a=!1,i=kp;else if(o>=Pp){var c=t?null:Lp(e);if(c)return Zf(c);a=!1,i=jf,l=new zf}else l=t?[]:s;e:for(;++r<o;){var u=e[r],d=t?t(u):u;if(u=n||0!==u?u:0,a&&d==d){for(var h=l.length;h--;)if(l[h]===d)continue e;t&&l.push(d),s.push(u)}else i(l,d,n)||(l!==s&&l.push(d),s.push(u))}return s}var $p=Ju((function(e){var t=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}(e);return Op(t)&&(t=void 0),Ip(sh(e,1,Op,!0),Ep(t))}));const zp=$p;function Bp(e){return e&&e.length?Ip(e):[]}const jp="cds",Fp=7,Up=2.5,Hp=3.5,Vp={reference:"value",compareTo:"marker"},Zp=4,Wp={duration:1e3,ease:di,zoomLevel:3},Gp={"1-color":4,"2-color":5,"3-color":5,"4-color":3,"5-color":2,"14-color":1},qp={defaultBins:10},Yp={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}},Kp=.3,Xp=1,Qp=24,Jp={horizontalOffset:10},em={default:{duration:300},pie_slice_mouseover:{duration:100},pie_chart_titles:{duration:375},graph_element_mouseover_fill_update:{duration:100},graph_element_mouseout_fill_update:{duration:100}},tm={height:{[z.GRAPH_VIEW]:32,[z.SLIDER_VIEW]:10},spacerHeight:8,handleWidth:5,handleBarWidth:1,handleBarHeight:12},nm=[{type:te.RADIUS,name:"Radius"},{type:te.AREA,name:"Poor area"},{type:te.AREA,name:"Satisfactory area"},{type:te.AREA,name:"Great area"},{type:te.QUARTILE,name:"Quartiles"}],rm={type:B.END_LINE,threshold:16,numCharacter:14},im={enabled:!0,position:U.BOTTOM,clickable:!0,truncation:rm,alignment:H.LEFT,order:null,additionalItems:[]},om={enabled:!0,showTotal:!0,truncation:rm,groupLabel:"Group"},am={top:{visible:!0,includeZero:!0,truncation:rm},bottom:{visible:!0,includeZero:!0,truncation:rm},left:{visible:!0,includeZero:!0,truncation:rm},right:{visible:!0,includeZero:!0,truncation:rm}},sm={addSpaceOnEdges:1,showDayName:!1,localeObject:Vc,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"}}},lm=typeof document<"u"&&(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled),cm={width:null,height:null,resizable:!0,theme:P.WHITE,tooltip:om,legend:im,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},...lm?[{type:J.MAKE_FULLSCREEN}]:[],{type:J.EXPORT_CSV},{type:J.EXPORT_PNG},{type:J.EXPORT_JPG}]}},um=Dp({},cm,{thematic:{projection:ie.geoNaturalEarth1}}),dm=Dp({},cm,{axes:am,timeScale:sm,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:z.GRAPH_VIEW}}}),hm=Dp({},dm,{bars:{maxWidth:16,spacingFactor:.25},timeScale:Dp(sm,{addSpaceOnEdges:1})}),fm=Dp({},hm,{}),pm=Dp({},hm,{}),mm=Dp({},hm,{bars:Dp({},hm.bars,{dividerSize:1.5})}),gm=Dp({},hm,{}),vm=Dp({},dm,{points:{radius:4,fillOpacity:.3,filled:!0,enabled:!0}}),ym=vm,bm=Dp({},vm,{points:{radius:3,filled:!1,enabled:!0}}),wm=Dp({},bm,{timeScale:Dp(sm,{addSpaceOnEdges:0})}),_m=wm,Em=Dp({},dm,{bubble:{radiusMapsTo:"radius",radiusLabel:"Radius",radiusRange:e=>{const t=Math.min(e.width,e.height);return[3*t/400,25*t/400]},fillOpacity:.2,enabled:!0},points:{filled:!0},legend:{additionalItems:[{type:te.RADIUS,name:"Radius"}]}}),xm=Dp({},dm,{bullet:{performanceAreaTitles:["Poor","Satisfactory","Great"]},grid:{x:{enabled:!1},y:{enabled:!1}},legend:{additionalItems:[{type:te.AREA,name:"Poor area"},{type:te.AREA,name:"Satisfactory area"},{type:te.AREA,name:"Great area"},{type:te.QUARTILE,name:"Quartiles"}]}}),Sm=Dp({},hm,{bars:{dividerSize:1.5},timeScale:Dp(sm,{addSpaceOnEdges:0})}),Tm=Dp({},cm,{tooltip:Dp({},om,{wordLabel:"Word",valueLabel:"Value"}),wordCloud:{fontSizeMapsTo:"value",fontSizeRange:e=>{const t=Math.min(e.width,e.height);return[20*t/400,75*t/400]},wordMapsTo:"word"}}),Om=Dp({},cm,{pie:{labels:{formatter:null,enabled:!0},alignment:H.LEFT,sortFunction:null,valueMapsTo:"value"}}),Am=Dp({},cm,{legend:{enabled:!1},gauge:{type:K.SEMI,arcWidth:16,deltaArrow:{size:e=>e/8,enabled:!0},showPercentageSymbol:!0,status:null,numberSpacing:10,deltaFontSize:e=>e/8,valueFontSize:e=>e/2.5,numberFormatter:e=>Number(e.toFixed(2))%1!=0?e.toFixed(2).toLocaleString():e.toFixed().toLocaleString(),alignment:H.LEFT}}),Cm=Dp({},Om,{donut:{center:{numberFontSize:e=>`${Math.min(e/100*24,24)}px`,titleFontSize:e=>`${Math.min(e/100*15,15)}px`,titleYPosition:e=>Math.min(e/80*20,20),numberFormatter:e=>Math.floor(e).toLocaleString()},alignment:H.LEFT}}),km=Dp({},cm,{legend:{enabled:!1,clickable:!1},meter:{showLabels:!0,proportional:null,statusBar:{percentageIndicator:{enabled:!0}}}}),Mm=Dp({},km,{legend:{enabled:!0}}),Nm=Dp({},cm,{radar:{axes:{angle:"key",value:"value"},alignment:H.LEFT},tooltip:{gridline:{enabled:!0},valueFormatter:e=>e??"N/A"}}),Dm=Dp({},hm,{comboChartTypes:[]}),Rm=Dp({tree:{type:Z.TREE}},cm,{}),Lm=Dp({},cm,{data:Dp(cm.data,{groupMapsTo:"name"})}),Pm=Dp({},cm,{circles:{fillOpacity:.3,hover:{stroke:"#FFF"}},padding:{mainGroup:4,children:2},hierarchyLevel:2},{data:Dp(cm.data,{groupMapsTo:"name"})}),Im=Dp({},cm,{alluvial:{data:Dp(cm.data,{groupMapsTo:"source"}),nodeAlignment:H.CENTER,nodePadding:24,monochrome:!1,nodes:[]}}),$m=Dp({},cm,{axes:am,heatmap:{divider:{state:ne.AUTO},colorLegend:{type:"linear"}}}),zm={alluvialChart:Im,areaChart:wm,axisChart:dm,boxplotChart:gm,bubbleChart:Em,bulletChart:xm,chart:cm,circlePackChart:Pm,choroplethChart:Dp({},um,{choropleth:{colorLegend:{type:"linear"}}}),comboChart:Dm,donutChart:Cm,gaugeChart:Am,groupedBarChart:pm,heatmapChart:$m,histogramChart:Sm,lineChart:bm,lollipopChart:ym,meterChart:km,pieChart:Om,proportionalMeterChart:Mm,radarChart:Nm,scatterChart:vm,simpleBarChart:fm,stackedAreaChart:_m,stackedBarChart:mm,thematicChart:um,treeChart:Rm,treemapChart:Lm,wordCloudChart:Tm};function Bm(e){if(!e)return;const t=e.getAttribute("transform").match(/translate\([0-9]+\.?[0-9]*,[0-9]+\.?[0-9]*\)/);if(!t)return null;if(t[0]){const e=t[0].replace(/translate\(/,"").replace(/\)/,"").split(",");return{tx:e[0],ty:e[1]}}return null}function jm(e,t,n){return n>e.length?e:t===B.MID_LINE?e.substr(0,n/2)+"..."+e.substr(-n/2):t===B.FRONT_LINE?"..."+e.substr(-n):t===B.END_LINE?e.substr(0,n)+"...":void 0}function Fm(e,t){const n=Um(e,"legend","additionalItems"),r=Um(t,"legend","additionalItems");if(n&&r){const i=r.map((e=>e.type)),o=n.map((e=>e.type)),a=nm.filter((e=>o.includes(e.type)&&!i.includes(e.type)));e.legend.additionalItems=a,t.legend.additionalItems=zp(a,r,"name")}}const Um=(e,...t)=>{let n=e;if(n){for(const e of t){if(null===n[e]||void 0===n[e])return null;n=n[e]}return n}return null},Hm=(e,t)=>t===j.HORIZONTAL?{y0:e.x0,y1:e.x1,x0:e.y0,x1:e.y1}:e;function Vm(e,t,n){return n===j.VERTICAL?[e,t]:[t,e]}const Zm=6048e5,Wm=864e5,Gm=6e4,qm=36e5;function Ym(e){const t=Ic(e);return t.setHours(0,0,0,0),t}function Km(e){const t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function Xm(e,t){const n=Ym(e),r=Ym(t),i=n.getTime()-Km(n),o=r.getTime()-Km(r);return Math.round((i-o)/Wm)}function Qm(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function Jm(e){return Bc(e,{weekStartsOn:1})}function eg(e){const t=Ic(e),n=t.getFullYear(),r=Qm(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const i=Jm(r),o=Qm(e,0);o.setFullYear(n,0,4),o.setHours(0,0,0,0);const a=Jm(o);return t.getTime()>=i.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function tg(e,t){var n,r,i,o;const a=Ic(e),s=a.getFullYear(),l=zc(),c=(null==t?void 0:t.firstWeekContainsDate)??(null==(r=null==(n=null==t?void 0:t.locale)?void 0:n.options)?void 0:r.firstWeekContainsDate)??l.firstWeekContainsDate??(null==(o=null==(i=l.locale)?void 0:i.options)?void 0:o.firstWeekContainsDate)??1,u=Qm(e,0);u.setFullYear(s+1,0,c),u.setHours(0,0,0,0);const d=Bc(u,t),h=Qm(e,0);h.setFullYear(s,0,c),h.setHours(0,0,0,0);const f=Bc(h,t);return a.getTime()>=d.getTime()?s+1:a.getTime()>=f.getTime()?s:s-1}function ng(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const rg={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return ng("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):ng(n+1,2)},d:(e,t)=>ng(e.getDate(),t.length),a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){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:(e,t)=>ng(e.getHours()%12||12,t.length),H:(e,t)=>ng(e.getHours(),t.length),m:(e,t)=>ng(e.getMinutes(),t.length),s:(e,t)=>ng(e.getSeconds(),t.length),S(e,t){const n=t.length,r=e.getMilliseconds();return ng(Math.floor(r*Math.pow(10,n-3)),t.length)}},ig={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){const t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:"year"})}return rg.y(e,t)},Y:function(e,t,n,r){const i=tg(e,r),o=i>0?i:1-i;return"YY"===t?ng(o%100,2):"Yo"===t?n.ordinalNumber(o,{unit:"year"}):ng(o,t.length)},R:function(e,t){return ng(eg(e),t.length)},u:function(e,t){return ng(e.getFullYear(),t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return ng(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return ng(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return rg.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return ng(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=function(e,t){const n=Ic(e),r=Bc(n,t).getTime()-function(e,t){var n,r,i,o;const a=zc(),s=(null==t?void 0:t.firstWeekContainsDate)??(null==(r=null==(n=null==t?void 0:t.locale)?void 0:n.options)?void 0:r.firstWeekContainsDate)??a.firstWeekContainsDate??(null==(o=null==(i=a.locale)?void 0:i.options)?void 0:o.firstWeekContainsDate)??1,l=tg(e,t),c=Qm(e,0);return c.setFullYear(l,0,s),c.setHours(0,0,0,0),Bc(c,t)}(n,t).getTime();return Math.round(r/Zm)+1}(e,r);return"wo"===t?n.ordinalNumber(i,{unit:"week"}):ng(i,t.length)},I:function(e,t,n){const r=function(e){const t=Ic(e),n=Jm(t).getTime()-function(e){const t=eg(e),n=Qm(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Jm(n)}(t).getTime();return Math.round(n/Zm)+1}(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):ng(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):rg.d(e,t)},D:function(e,t,n){const r=function(e){const t=Ic(e);return Xm(t,function(e){const t=Ic(e),n=Qm(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}(t))+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):ng(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":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"})}},e:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return ng(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});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"})}},c:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return ng(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=0===r?7:r;switch(t){case"i":return String(i);case"ii":return ng(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(i=12===r?"noon":0===r?"midnight":r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(i=r>=17?"evening":r>=12?"afternoon":r>=4?"morning":"night",t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return rg.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):rg.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):ng(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):ng(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):rg.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):rg.s(e,t)},S:function(e,t){return rg.S(e,t)},X:function(e,t,n,r){const i=(r._originalDate||e).getTimezoneOffset();if(0===i)return"Z";switch(t){case"X":return ag(i);case"XXXX":case"XX":return sg(i);default:return sg(i,":")}},x:function(e,t,n,r){const i=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return ag(i);case"xxxx":case"xx":return sg(i);default:return sg(i,":")}},O:function(e,t,n,r){const i=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+og(i,":");default:return"GMT"+sg(i,":")}},z:function(e,t,n,r){const i=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+og(i,":");default:return"GMT"+sg(i,":")}},t:function(e,t,n,r){const i=r._originalDate||e;return ng(Math.floor(i.getTime()/1e3),t.length)},T:function(e,t,n,r){return ng((r._originalDate||e).getTime(),t.length)}};function og(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),o=r%60;return 0===o?n+String(i):n+String(i)+t+ng(o,2)}function ag(e,t){return e%60==0?(e>0?"-":"+")+ng(Math.abs(e)/60,2):sg(e,t)}function sg(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+ng(Math.floor(r/60),2)+t+ng(r%60,2)}const lg=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},cg=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},ug={p:cg,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return lg(e,t);let o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;default:o=t.dateTime({width:"full"})}return o.replace("{{date}}",lg(r,t)).replace("{{time}}",cg(i,t))}},dg=["D","DD"],hg=["YY","YYYY"];function fg(e,t,n){if("YYYY"===e)throw new RangeError(`Use \`yyyy\` instead of \`YYYY\` (in \`${t}\`) for formatting years to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`);if("YY"===e)throw new RangeError(`Use \`yy\` instead of \`YY\` (in \`${t}\`) for formatting years to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`);if("D"===e)throw new RangeError(`Use \`d\` instead of \`D\` (in \`${t}\`) for formatting days of the month to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`);if("DD"===e)throw new RangeError(`Use \`dd\` instead of \`DD\` (in \`${t}\`) for formatting days of the month to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`)}const pg=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,mg=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,gg=/^'([^]*?)'?$/,vg=/''/g,yg=/[a-zA-Z]/;function bg(e,t,n){var r,i,o,a,s,l,c,u;const d=zc(),h=(null==n?void 0:n.locale)??d.locale??Vc,f=(null==n?void 0:n.firstWeekContainsDate)??(null==(i=null==(r=null==n?void 0:n.locale)?void 0:r.options)?void 0:i.firstWeekContainsDate)??d.firstWeekContainsDate??(null==(a=null==(o=d.locale)?void 0:o.options)?void 0:a.firstWeekContainsDate)??1,p=(null==n?void 0:n.weekStartsOn)??(null==(l=null==(s=null==n?void 0:n.locale)?void 0:s.options)?void 0:l.weekStartsOn)??d.weekStartsOn??(null==(u=null==(c=d.locale)?void 0:c.options)?void 0:u.weekStartsOn)??0,m=Ic(e);if(!function(e){if(!function(e){return e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}(e)&&"number"!=typeof e)return!1;const t=Ic(e);return!isNaN(Number(t))}(m))throw new RangeError("Invalid time value");const g={firstWeekContainsDate:f,weekStartsOn:p,locale:h,_originalDate:m};return t.match(mg).map((function(e){const t=e[0];return"p"===t||"P"===t?(0,ug[t])(e,h.formatLong):e})).join("").match(pg).map((function(r){if("''"===r)return"'";const i=r[0];if("'"===i)return function(e){const t=e.match(gg);return t?t[1].replace(vg,"'"):e}(r);const o=ig[i];if(o)return!(null!=n&&n.useAdditionalWeekYearTokens)&&function(e){return-1!==hg.indexOf(e)}(r)&&fg(r,t,String(e)),!(null!=n&&n.useAdditionalDayOfYearTokens)&&function(e){return-1!==dg.indexOf(e)}(r)&&fg(r,t,String(e)),o(m,r,h.localize,g);if(i.match(yg))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");return r})).join("")}var wg=(e=>(e["15seconds"]="15seconds",e.minute="minute",e["30minutes"]="30minutes",e.hourly="hourly",e.daily="daily",e.weekly="weekly",e.monthly="monthly",e.quarterly="quarterly",e.yearly="yearly",e))(wg||{});const _g=[["15seconds",15e3],["minute",6e4],["30minutes",18e5],["hourly",36e5],["daily",864e5],["monthly",2592e6],["quarterly",7776e6],["yearly",31104e6]];function Eg(e,t,n,r,i){const o=0===t,a=2===Number(bg(new Date(e),"c")),s=1===Number(bg(new Date(e),"q")),l=0!==t?n[t-1]:null;switch(r){case"15seconds":case"minute":case"30minutes":case"hourly":return o||function(e){const{s:t,m:n,H:r}=Sg(e);return 0===r&&0===n&&0===t}(e)||Og(e,l)||Ag(e);case"daily":return i?o||a||Ag(e):o||Og(e,l)||Ag(e);case"weekly":return o||a||Ag(e);case"monthly":return o||Ag(e);case"quarterly":return o||s;case"yearly":return!1;default:throw new Error(`${r} is not a valid time interval.`)}}function xg(e,t,n,r,i){const o=i.showDayName,a="daily"===r&&o?"weekly":r,s=new Date(e),l=Um(i,"timeIntervalFormats")[a],c=Um(l,"primary"),u=Um(l,"secondary");let d=Eg(e,t,n,r,o)?c:u;return"15seconds"===r&&0!==s.getMilliseconds()&&(d=d.replace("pp","h:mm:ss.SSS a")),bg(s,d,{locale:i.localeObject})}function Sg(e){const t=new Date(e);return{M:t.getMonth()+1,d:t.getDate(),H:t.getHours(),m:t.getMinutes(),s:t.getSeconds()}}function Tg(e,t){if(wg[t])return t;if(1===e.length)return"15seconds";const n=function(e){if(e)return e.slice(1).map(((t,n)=>t-e[n]))}(e);return function(e){const t=_g.reduce(((t,[,n],r)=>{const i=_g[t][1];return Math.abs(i-e)<Math.abs(n-e)?t:r}),0);return _g[t][0]}(function(e,t){let n;if(void 0===t)for(const t of e)null!=t&&(n>t||void 0===n&&t>=t)&&(n=t);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}(n))}function Og(e,t){return Sg(e).M!==Sg(t).M}function Ag(e){const{M:t,d:n,s:r,m:i,H:o}=Sg(e);return 1===t&&1===n&&0===o&&0===i&&0===r}function Cg(e){return void 0===e?"":e.toISOString()}var kg=(e=>(e.GRAPHICS_DOCUMENT="graphics-document",e.GRAPHICS_OBJECT="graphics-object",e.GRAPHICS_SYMBOL="graphics-symbol",e.GROUP="group",e.DOCUMENT="document",e.CHECKBOX="checkbox",e.BUTTON="button",e.MENU="menu",e.MENU_ITEM="menuitem",e.IMG="img",e))(kg||{}),Mg=function(e,t){if(null==e)return e;if(!nd(e))return function(e,t){return e&&Sp(e,t,Nd)}(e,t);for(var n=e.length,r=-1,i=Object(e);++r<n&&!1!==t(i[r],r,i););return e};const Ng=Mg;function Dg(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(r,a,n(a),e)}return r}function Rg(e,t,n,r){return Ng(e,(function(e,i,o){t(r,e,n(e),o)})),r}var Lg=Object.prototype.hasOwnProperty,Pg=function(e,t){return function(t,n){var r={};return(su(t)?Dg:Rg)(t,e,Ep(n),r)}}((function(e,t,n){Lg.call(e,n)?e[n].push(t):Gu(e,n,[t])}));const Ig=Pg;class $g{constructor(e){this.state={options:{}},this.colorScale={},this.colorClassNames={},this.services=e}getAllDataFromDomain(e){if(!this.getData())return null;const t=this.getOptions();let n=this.getData();const r=this.getDataGroups(),{groupMapsTo:i}=Um(t,"data"),o=Um(t,"axes");return e&&(n=n.filter((t=>e.includes(t[i])))),o&&Object.keys(o).forEach((e=>{const t=o[e].mapsTo,r=o[e].scaleType;if((r===F.LINEAR||r===F.LOG)&&(n=n.map((e=>({...e,[t]:null===e[t]?e[t]:Number(e[t])})))),t&&o[e].domain)if(r===F.LABELS)n=n.filter((n=>o[e].domain.includes(n[t])));else{const[r,i]=o[e].domain;n=n.filter((e=>!(t in e)||e[t]>=r&&e[t]<=i))}})),n.filter((e=>r.find((t=>t.name===e[i]))))}getDisplayData(e){if(!this.get("data"))return null;const{ACTIVE:t}=Yp.items.status,n=this.getDataGroups(e),{groupMapsTo:r}=this.getOptions().data;return this.getAllDataFromDomain(e).filter((e=>n.find((n=>n.name===e[r]&&n.status===t))))}getData(){return this.get("data")}isDataEmpty(){return!this.getData().length}setData(e){const t=this.sanitize($f(e)),n=this.generateDataGroups(t);return this.set({data:t,dataGroups:n}),t}getDataGroups(e){return Um(this.getOptions(),"data","loading")?[]:e?this.get("dataGroups").filter((t=>e.includes(t.name))):this.get("dataGroups")}getActiveDataGroups(e){const{ACTIVE:t}=Yp.items.status;return this.getDataGroups(e).filter((e=>e.status===t))}getDataGroupNames(e){return this.getDataGroups(e).map((e=>e.name))}getActiveDataGroupNames(e){return this.getActiveDataGroups(e).map((e=>e.name))}aggregateBinDataByGroup(e){return Ig(e,"group")}getBinConfigurations(){const e=this.getDisplayData(),t=this.getOptions(),n=this.services.cartesianScales.getMainXAxisPosition(),r=this.services.cartesianScales.getDomainIdentifier(),i=t.axes[n],{groupMapsTo:o}=t.data,{bins:a=qp.defaultBins}=i,s=Array.isArray(a),l=function(){var e=ge,t=de,n=Oe;function r(r){Array.isArray(r)||(r=Array.from(r));var i,o,a,s=r.length,l=new Array(s);for(i=0;i<s;++i)l[i]=e(r[i],i,r);var c=t(l),u=c[0],d=c[1],h=n(l,u,d);if(!Array.isArray(h)){const e=d,n=+h;if(t===de&&([u,d]=function(e,t,n){let r;for(;;){const i=Se(e,t,n);if(i===r||0===i||!isFinite(i))return[e,t];i>0?(e=Math.floor(e/i)*i,t=Math.ceil(t/i)*i):i<0&&(e=Math.ceil(e*i)/i,t=Math.floor(t*i)/i),r=i}}(u,d,n)),(h=xe(u,d,n))[0]<=u&&(a=Se(u,d,n)),h[h.length-1]>=d)if(e>=d&&t===de){const e=Se(u,d,n);isFinite(e)&&(e>0?d=(Math.floor(d/e)+1)*e:e<0&&(d=(Math.ceil(d*-e)+1)/-e))}else h.pop()}for(var f=h.length,p=0,m=f;h[p]<=u;)++p;for(;h[m-1]>d;)--m;(p||m<f)&&(h=h.slice(p,m),f=m-p);var g,v=new Array(f+1);for(i=0;i<=f;++i)(g=v[i]=[]).x0=i>0?h[i-1]:u,g.x1=i<f?h[i]:d;if(isFinite(a)){if(a>0)for(i=0;i<s;++i)null!=(o=l[i])&&u<=o&&o<=d&&v[Math.min(f,Math.floor((o-u)/a))].push(r[i]);else if(a<0)for(i=0;i<s;++i)if(null!=(o=l[i])&&u<=o&&o<=d){const e=Math.floor((u-o)*a);v[Math.min(f,e+(h[e]<=o))].push(r[i])}}else for(i=0;i<s;++i)null!=(o=l[i])&&u<=o&&o<=d&&v[ue(h,o,0,f)].push(r[i]);return v}return r.value=function(t){return arguments.length?(e="function"==typeof t?t:ye(t),r):e},r.domain=function(e){return arguments.length?(t="function"==typeof e?e:ye([e[0],e[1]]),r):t},r.thresholds=function(e){return arguments.length?(n="function"==typeof e?e:ye(Array.isArray(e)?ve.call(e):e),r):n},r}().value((e=>e[r])).thresholds(a)(e);if(s)l[l.length-1].x1=a[a.length-1];else{const e=l[0].x1-l[0].x0;l[l.length-1].x1=+l[l.length-1].x0+e}const c=s?[a[0],a[a.length-1]]:[l[0].x0,l[l.length-1].x1],u=Array.from(new Set(e.map((e=>e[o])))),d=[];return l.forEach((e=>{const t=`${e.x0}-${e.x1}`,n=this.aggregateBinDataByGroup(e);u.forEach((r=>{d.push({group:r,key:t,value:n[r]||0,bin:e.x0})}))})),{bins:l,binsDomain:c}}getBinnedStackedData(){const e=this.getOptions(),{groupMapsTo:t}=e.data,n=this.getActiveDataGroupNames(),{bins:r}=this.getBinConfigurations(),i=this.getDataValuesGroupedByKeys({bins:r});return Mc().keys(n)(i).map(((e,r)=>Object.keys(e).filter((e=>!isNaN(e))).map((i=>{const o=e[i];return o[t]=n[r],o}))))}getGroupedData(e){const t=this.getDisplayData(e),n={},{groupMapsTo:r}=this.getOptions().data;return t.map((e=>{const t=e[r];null!==n[t]&&void 0!==n[t]?n[t].push(e):n[t]=[e]})),Object.keys(n).map((e=>({name:e,data:n[e]})))}getStackKeys({bins:e=null,groups:t=null}={bins:null,groups:null}){const n=this.getOptions(),r=this.getDisplayData(t);let i;i=e?e.map((e=>`${e.x0}:${e.x1}`)):Bp(r.map((e=>{const t=this.services.cartesianScales.getDomainIdentifier(e);return e[t]instanceof Date?Cg(e[t]):e[t]&&"function"==typeof e[t].toString?e[t].toString():e[t]})));const o=this.services.cartesianScales.domainAxisPosition,a=n.axes[o].scaleType;return a===F.TIME?i.sort(((e,t)=>new Date(e)-new Date(t))):(a===F.LOG||a===F.LINEAR)&&i.sort(((e,t)=>e-t)),i}getDataValuesGroupedByKeys({bins:e=null,groups:t=null}){const n=this.getOptions(),{groupMapsTo:r}=n.data,i=this.getDisplayData(t),o=this.getDataGroupNames(),a=this.getStackKeys({bins:e,groups:t});return e?a.map((t=>{const[n,i]=t.split(":"),a={x0:n,x1:i},s=e.find((e=>e.x0.toString()===n.toString()));return o.forEach((e=>{a[e]=s.filter((t=>t[r]===e)).length})),a})):a.map((e=>{const t={sharedStackKey:e};return o.forEach((n=>{const o=i.find((t=>{const i=this.services.cartesianScales.getDomainIdentifier(t);return t[r]===n&&Object.prototype.hasOwnProperty.call(t,i)&&(t[i]instanceof Date?Cg(t[i])===e:t[i].toString()===e)})),a=this.services.cartesianScales.getRangeIdentifier(t);t[n]=o?o[a]:null})),t}))}getStackedData({percentage:e=!1,groups:t=null,divergent:n=!1}){const r=this.getOptions(),{groupMapsTo:i}=r.data,o=this.getActiveDataGroupNames(t),a=this.getDataValuesGroupedByKeys({groups:t});if(e){const e=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r}(a.map((e=>[e.sharedStackKey,0])));a.forEach((t=>{o.forEach((n=>{e[t.sharedStackKey]+=t[n]}))})),a.forEach((t=>{o.forEach((n=>{const r=e[t.sharedStackKey];e[t.sharedStackKey]?t[n]=t[n]/r*100:t[n]=0}))}))}return(n?Mc().offset(Nc):Mc()).keys(o)(a).map(((e,t)=>Object.keys(e).filter((e=>!isNaN(e))).map((n=>{const r=e[n];return r[i]=o[t],r}))))}getOptions(){return this.state.options}set(e,t){this.state=Object.assign({},this.state,e);const n=Object.assign({skipUpdate:!1,animate:!0},t);n.skipUpdate||this.update(n.animate)}get(e){return e?this.state[e]:this.state}setOptions(e){const t=this.getOptions();Fm(t,e),this.set({options:Dp(t,e)})}update(e=!0){this.getDisplayData()&&(this.updateAllDataGroups(),this.setCustomColorScale(),this.setColorClassNames(),this.services.events.dispatchEvent(R.Model.UPDATE,{animate:e}))}toggleDataLabel(e){const{ACTIVE:t,DISABLED:n}=Yp.items.status,r=this.getDataGroups(),i=r.some((e=>e.status===n)),o=r.filter((e=>e.status===t));if(i)if(1===o.length&&o[0].name===e)r.forEach(((e,n)=>{r[n].status=t}));else{const i=r.findIndex((t=>t.name===e));r[i].status=r[i].status===n?t:n}else r.forEach(((i,o)=>{r[o].status=i.name===e?t:n}));const a=r.filter((e=>e.status===t)),s=this.getOptions();r.some((e=>e.status===n))?s.data.selectedGroups=a.map((e=>e.name)):s.data.selectedGroups=[],this.services.events.dispatchEvent(R.Legend.ITEMS_UPDATE,{dataGroups:r}),this.set({dataGroups:r})}getIsFilled(e,t,n,r){const i=this.getOptions();return i.getIsFilled?i.getIsFilled(e,t,n,r):r}getFillColor(e,t,n){const r=this.getOptions(),i=Um(this.colorScale,e);return r.getFillColor?r.getFillColor(e,t,n,i):i}getStrokeColor(e,t,n){const r=this.getOptions(),i=Um(this.colorScale,e);return r.getStrokeColor?r.getStrokeColor(e,t,n,i):i}isUserProvidedColorScaleValid(){const e=Um(this.getOptions(),"color","scale"),t=this.getDataGroups();return null!=e&&0!=Object.keys(e).length&&t.some((t=>Object.keys(e).includes(t.name)))}getColorClassName(e){const t=this.colorClassNames(e.dataGroupName);let n=e.originalClassName;return e.classNameTypes.forEach((r=>n=e.originalClassName?`${n} ${r}-${t}`:`${r}-${t}`)),n||""}getStatus(){return null}getAllDataGroupsNames(){return this.allDataGroups}transformToTabularData(e){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/?path=/story/docs-tutorials--tabular-data-format");const t=[],{datasets:n,labels:r}=e;return n.forEach((e=>{e.data.forEach(((n,i)=>{let o;const a=Um(e,"label");if(null===a){o=Um(r,i)||"Ungrouped"}else o=a;const s={group:o,key:r[i]};isNaN(n)?(s.value=n.value,s.date=n.date):s.value=n,t.push(s)}))})),t}getTabularDataArray(){return[]}exportToCSV(){const e=this.getTabularDataArray().map((e=>e.map((e=>`"${("&ndash;"===e?"–":e).split(/[,;'"`]/).map((e=>function(e){const t=e.trim();return["=","+","-","@","\t","\r"].includes(t.charAt(0))?` ${t}`:/[,\"\n]/.test(t)?`"${t}"`:t}(e))).join("")}"`)))).map((e=>e.join(","))).join("\n"),t=this.getOptions();let n="myChart";const r=Um(t,"fileDownload","fileName");"function"==typeof r?n=r("csv"):"string"==typeof r&&(n=r),this.services.files.downloadCSV(e,`${n}.csv`)}getTabularData(e){return Array.isArray(e)?e:this.transformToTabularData(e)}sanitize(e){return this.getTabularData(e)}updateAllDataGroups(){this.allDataGroups?this.getDataGroupNames().forEach((e=>{-1===this.allDataGroups.indexOf(e)&&this.allDataGroups.push(e)})):this.allDataGroups=this.getDataGroupNames()}generateDataGroups(e){const{groupMapsTo:t}=this.getOptions().data,{ACTIVE:n,DISABLED:r}=Yp.items.status,i=this.getOptions(),o=Bp(e.map((e=>e[t])));i.data.selectedGroups.length&&(i.data.selectedGroups.every((e=>o.includes(e)))||(i.data.selectedGroups=[]));const a=e=>!i.data.selectedGroups.length||i.data.selectedGroups.includes(e)?n:r;return o.map((e=>({name:e,status:a(e)})))}setCustomColorScale(){if(!this.isUserProvidedColorScaleValid())return;const e=this.getOptions(),t=Um(e,"color","scale");Object.keys(t).forEach((e=>{this.allDataGroups.includes(e)||console.warn(`"${e}" does not exist in data groups.`)})),this.allDataGroups.filter((e=>t[e])).forEach((e=>this.colorScale[e]=t[e]))}setColorClassNames(){const e=Um(this.getOptions(),"color","pairing");let t=Um(e,"numberOfVariants");(!t||t<this.allDataGroups.length)&&(t=this.allDataGroups.length);let n=Um(e,"option");const r=t>5?14:t;n=n<=Gp[`${r}-color`]?n:1;const i=this.allDataGroups.map(((e,t)=>`${r}-${n}-${t%14+1}`));this.colorClassNames=Mo().range(i).domain(this.allDataGroups)}}let zg=class extends $g{constructor(e){super(e),this.axisFlavor=re.DEFAULT}assignRangeAndDomains(){const{cartesianScales:e}=this.services,t=this.getOptions(),n=e.isDualAxes(),r={primaryDomain:e.domainAxisPosition,primaryRange:e.rangeAxisPosition,secondaryDomain:null,secondaryRange:null};return n&&(r.secondaryDomain=e.secondaryDomainAxisPosition,r.secondaryRange=e.secondaryRangeAxisPosition),Object.keys(r).forEach((n=>{const i=r[n];e.scales[i]?r[n]={position:i,label:e.getScaleLabel(i),identifier:Um(t,"axes",i,"mapsTo")}:r[n]=null})),r}getTabularDataArray(){const e=this.getDisplayData(),t=this.getOptions(),{groupMapsTo:n}=t.data,{cartesianScales:r}=this.services,{primaryDomain:i,primaryRange:o,secondaryDomain:a,secondaryRange:s}=this.assignRangeAndDomains();let l;return r.getDomainAxisScaleType()===F.TIME&&(l=e=>bg(e,"MMM d, yyyy")),[["Group",i.label,o.label,...a?[a.label]:[],...s?[s.label]:[]],...e.map((e=>[e[n],null===e[i.identifier]?"&ndash;":l?l(e[i.identifier]):e[i.identifier],null===e[o.identifier]||isNaN(e[o.identifier])?"&ndash;":e[o.identifier].toLocaleString(),...a?[null===e[a.identifier]?"&ndash;":e[a.identifier]]:[],...s?[null===e[s.identifier]||isNaN(e[s.identifier])?"&ndash;":e[s.identifier]]:[]]))]}setData(e){let t;if(e&&(t=super.setData(e),Um(this.getOptions(),"zoomBar",$.TOP,"enabled"))){const e=Um(this.getOptions(),"zoomBar",$.TOP,"data");this.setZoomBarData(e)}return t}setZoomBarData(e){const t=e?this.sanitize($f(e)):this.getDisplayData();let n=t;const{cartesianScales:r}=this.services;if(t&&r.domainAxisPosition&&r.rangeAxisPosition){const e=r.getDomainIdentifier(),i=r.getRangeIdentifier();let o=t.map((t=>t[e].getTime()));o=Bp(o).sort(),n=o.map((n=>{let r=0;const o={};return t.forEach((t=>{t[e].getTime()===n&&(r+=t[i])})),o[e]=new Date(n),o[i]=r,o}))}this.set({zoomBarData:n})}getZoomBarData(){return this.get("zoomBarData")}sanitizeDateValues(e){const t=this.getOptions();if(!t.axes)return e;const n=[];return Object.keys($).forEach((e=>{const r=$[e],i=t.axes[r];if(i&&i.scaleType===F.TIME){const e=i.mapsTo;(null!==e||void 0!==e)&&n.push(e)}})),n.length>0&&e.forEach((e=>{n.forEach((t=>{null===Um(e,t,"getTime")&&(e[t]=new Date(e[t]))}))})),e}sanitize(e){return e=super.sanitize(e),this.sanitizeDateValues(e)}};var Bg=/\s/,jg=/^\s+/;var Fg=NaN,Ug=/^[-+]0x[0-9a-f]+$/i,Hg=/^0b[01]+$/i,Vg=/^0o[0-7]+$/i,Zg=parseInt;function Wg(e){if("number"==typeof e)return e;if(au(e))return Fg;if(hu(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=hu(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=function(e){return e&&e.slice(0,function(e){for(var t=e.length;t--&&Bg.test(e.charAt(t)););return t}(e)+1).replace(jg,"")}(e);var n=Hg.test(e);return n||Vg.test(e)?Zg(e.slice(2),n?2:8):Ug.test(e)?Fg:+e}const Gg=function(){return Gc.Date.now()};var qg=Math.max,Yg=Math.min;const Kg=(()=>{let e=0;return()=>(e+=1,`u${`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4)}${e}`)})();function Xg(e){const t=[];for(let n=0,r=e.length;n<r;n++)t.push(e[n]);return t}function Qg(e,t){const n=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return n?parseFloat(n.replace("px","")):0}function Jg(e,t={}){const n=t.width||function(e){const t=Qg(e,"border-left-width"),n=Qg(e,"border-right-width");return e.clientWidth+t+n}(e),r=t.height||function(e){const t=Qg(e,"border-top-width"),n=Qg(e,"border-bottom-width");return e.clientHeight+t+n}(e);return{width:n,height:r}}const ev=16384;function tv(e){return new Promise(((t,n)=>{const r=new Image;r.decode=()=>t(r),r.onload=()=>t(r),r.onerror=n,r.crossOrigin="anonymous",r.decoding="async",r.src=e}))}const nv=(e,t)=>{if(e instanceof t)return!0;const n=Object.getPrototypeOf(e);return null!==n&&(n.constructor.name===t.name||nv(n,t))};function rv(e,t,n){const r=window.getComputedStyle(e,n),i=r.getPropertyValue("content");if(""===i||"none"===i)return;const o=Kg();try{t.className=`${t.className} ${o}`}catch{return}const a=document.createElement("style");a.appendChild(function(e,t,n){const r=`.${e}:${t}`,i=n.cssText?function(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}(n):function(e){return Xg(e).map((t=>`${t}: ${e.getPropertyValue(t)}${e.getPropertyPriority(t)?" !important":""};`)).join(" ")}(n);return document.createTextNode(`${r}{${i}}`)}(o,n,r)),t.appendChild(a)}const iv="application/font-woff",ov="image/jpeg",av={woff:iv,woff2:iv,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:ov,jpeg:ov,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function sv(e){const t=function(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}(e).toLowerCase();return av[t]||""}function lv(e){return-1!==e.search(/^(data:)/)}function cv(e,t){return`data:${t};base64,${e}`}async function uv(e,t,n){const r=await fetch(e,t);if(404===r.status)throw new Error(`Resource "${r.url}" not found`);const i=await r.blob();return new Promise(((e,t)=>{const o=new FileReader;o.onerror=t,o.onloadend=()=>{try{e(n({res:r,result:o.result}))}catch(e){t(e)}},o.readAsDataURL(i)}))}const dv={};async function hv(e,t,n){const r=function(e,t,n){let r=e.replace(/\?.*/,"");return n&&(r=e),/ttf|otf|eot|woff2?/i.test(r)&&(r=r.replace(/.*\//,"")),t?`[${t}]${r}`:r}(e,t,n.includeQueryParams);if(null!=dv[r])return dv[r];let i;n.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+(new Date).getTime());try{const r=await uv(e,n.fetchRequestInit,(({res:e,result:n})=>(t||(t=e.headers.get("Content-Type")||""),function(e){return e.split(/,/)[1]}(n))));i=cv(r,t)}catch(t){i=n.imagePlaceholder||"";let r=`Failed to fetch resource: ${e}`;t&&(r="string"==typeof t?t:t.message),r&&console.warn(r)}return dv[r]=i,i}const fv=e=>null!=e.tagName&&"SLOT"===e.tagName.toUpperCase();async function pv(e,t,n){return n||!t.filter||t.filter(e)?Promise.resolve(e).then((e=>async function(e,t){return nv(e,HTMLCanvasElement)?async function(e){const t=e.toDataURL();return"data:,"===t?e.cloneNode(!1):tv(t)}(e):nv(e,HTMLVideoElement)?async function(e,t){if(e.currentSrc){const t=document.createElement("canvas"),n=t.getContext("2d");return t.width=e.clientWidth,t.height=e.clientHeight,null==n||n.drawImage(e,0,0,t.width,t.height),tv(t.toDataURL())}const n=e.poster,r=sv(n);return tv(await hv(n,r,t))}(e,t):nv(e,HTMLIFrameElement)?async function(e){var t;try{if(null!==(t=null==e?void 0:e.contentDocument)&&void 0!==t&&t.body)return await pv(e.contentDocument.body,{},!0)}catch{}return e.cloneNode(!1)}(e):e.cloneNode(!1)}(e,t))).then((n=>async function(e,t,n){var r,i;let o=[];return o=fv(e)&&e.assignedNodes?Xg(e.assignedNodes()):nv(e,HTMLIFrameElement)&&null!==(r=e.contentDocument)&&void 0!==r&&r.body?Xg(e.contentDocument.body.childNodes):Xg((null!==(i=e.shadowRoot)&&void 0!==i?i:e).childNodes),0===o.length||nv(e,HTMLVideoElement)||await o.reduce(((e,r)=>e.then((()=>pv(r,n))).then((e=>{e&&t.appendChild(e)}))),Promise.resolve()),t}(e,n,t))).then((t=>function(e,t){return nv(t,Element)&&(function(e,t){const n=t.style;if(!n)return;const r=window.getComputedStyle(e);r.cssText?(n.cssText=r.cssText,n.transformOrigin=r.transformOrigin):Xg(r).forEach((i=>{let o=r.getPropertyValue(i);"font-size"===i&&o.endsWith("px")&&(o=Math.floor(parseFloat(o.substring(0,o.length-2)))-.1+"px"),nv(e,HTMLIFrameElement)&&"display"===i&&"inline"===o&&(o="block"),"d"===i&&t.getAttribute("d")&&(o=`path(${t.getAttribute("d")})`),n.setProperty(i,o,r.getPropertyPriority(i))}))}(e,t),function(e,t){rv(e,t,":before"),rv(e,t,":after")}(e,t),function(e,t){nv(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),nv(e,HTMLInputElement)&&t.setAttribute("value",e.value)}(e,t),function(e,t){if(nv(e,HTMLSelectElement)){const n=t,r=Array.from(n.children).find((t=>e.value===t.getAttribute("value")));r&&r.setAttribute("selected","")}}(e,t)),t}(e,t))).then((e=>async function(e,t){const n=e.querySelectorAll?e.querySelectorAll("use"):[];if(0===n.length)return e;const r={};for(let i=0;i<n.length;i++){const o=n[i].getAttribute("xlink:href");if(o){const n=e.querySelector(o),i=document.querySelector(o);!n&&i&&!r[o]&&(r[o]=await pv(i,t,!0))}}const i=Object.values(r);if(i.length){const t="http://www.w3.org/1999/xhtml",n=document.createElementNS(t,"svg");n.setAttribute("xmlns",t),n.style.position="absolute",n.style.width="0",n.style.height="0",n.style.overflow="hidden",n.style.display="none";const r=document.createElementNS(t,"defs");n.appendChild(r);for(let e=0;e<i.length;e++)r.appendChild(i[e]);e.appendChild(n)}return e}(e,t))):null}const mv=/url\((['"]?)([^'"]+?)\1\)/g,gv=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,vv=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function yv(e){return-1!==e.search(mv)}async function bv(e,t,n){if(!yv(e))return e;const r=function(e,{preferredFontFormat:t}){return t?e.replace(vv,(e=>{for(;;){const[n,,r]=gv.exec(e)||[];if(!r)return"";if(r===t)return`src: ${n};`}})):e}(e,n);return function(e){const t=[];return e.replace(mv,((e,n,r)=>(t.push(r),e))),t.filter((e=>!lv(e)))}(r).reduce(((e,r)=>e.then((e=>async function(e,t,n,r,i){try{const o=n?function(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;const n=document.implementation.createHTMLDocument(),r=n.createElement("base"),i=n.createElement("a");return n.head.appendChild(r),n.body.appendChild(i),t&&(r.href=t),i.href=e,i.href}(t,n):t,a=sv(t);let s;return s=i?cv(await i(o),a):await hv(o,a,r),e.replace(function(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}(t),`$1${s}$3`)}catch{}return e}(e,r,t,n)))),Promise.resolve(r))}async function wv(e,t,n){var r;const i=null===(r=t.style)||void 0===r?void 0:r.getPropertyValue(e);if(i){const r=await bv(i,null,n);return t.style.setProperty(e,r,t.style.getPropertyPriority(e)),!0}return!1}async function _v(e,t){nv(e,Element)&&(await async function(e,t){await wv("background",e,t)||await wv("background-image",e,t),await wv("mask",e,t)||await wv("mask-image",e,t)}(e,t),await async function(e,t){const n=nv(e,HTMLImageElement);if((!n||lv(e.src))&&(!nv(e,SVGImageElement)||lv(e.href.baseVal)))return;const r=n?e.src:e.href.baseVal,i=await hv(r,sv(r),t);await new Promise(((t,r)=>{e.onload=t,e.onerror=r;const o=e;o.decode&&(o.decode=t),"lazy"===o.loading&&(o.loading="eager"),n?(e.srcset="",e.src=i):e.href.baseVal=i}))}(e,t),await async function(e,t){const n=Xg(e.childNodes).map((e=>_v(e,t)));await Promise.all(n).then((()=>e))}(e,t))}const Ev={};async function xv(e){let t=Ev[e];return null!=t||(t={url:e,cssText:await(await fetch(e)).text()},Ev[e]=t),t}async function Sv(e,t){let n=e.cssText;const r=/url\(["']?([^"')]+)["']?\)/g,i=(n.match(/url\([^)]+\)/g)||[]).map((async i=>{let o=i.replace(r,"$1");return o.startsWith("https://")||(o=new URL(o,e.url).href),uv(o,t.fetchRequestInit,(({result:e})=>(n=n.replace(i,`url(${e})`),[i,e])))}));return Promise.all(i).then((()=>n))}function Tv(e){if(null==e)return[];const t=[];let n=e.replace(/(\/\*[\s\S]*?\*\/)/gi,"");const r=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const e=r.exec(n);if(null===e)break;t.push(e[0])}n=n.replace(r,"");const i=/@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 e=i.exec(n);if(null===e){if(e=o.exec(n),null===e)break;i.lastIndex=o.lastIndex}else o.lastIndex=i.lastIndex;t.push(e[0])}return t}async function Ov(e,t){const n=null!=t.fontEmbedCSS?t.fontEmbedCSS:t.skipFonts?null:await async function(e,t){const n=await async function(e,t){if(null==e.ownerDocument)throw new Error("Provided element is not within a Document");const n=Xg(e.ownerDocument.styleSheets),r=await async function(e,t){const n=[],r=[];return e.forEach((n=>{if("cssRules"in n)try{Xg(n.cssRules||[]).forEach(((e,i)=>{if(e.type===CSSRule.IMPORT_RULE){let o=i+1;const a=xv(e.href).then((e=>Sv(e,t))).then((e=>Tv(e).forEach((e=>{try{n.insertRule(e,e.startsWith("@import")?o+=1:n.cssRules.length)}catch(t){console.error("Error inserting rule from remote css",{rule:e,error:t})}})))).catch((e=>{console.error("Error loading remote css",e.toString())}));r.push(a)}}))}catch(i){const o=e.find((e=>null==e.href))||document.styleSheets[0];null!=n.href&&r.push(xv(n.href).then((e=>Sv(e,t))).then((e=>Tv(e).forEach((e=>{o.insertRule(e,n.cssRules.length)})))).catch((e=>{console.error("Error loading remote stylesheet",e)}))),console.error("Error inlining remote css file",i)}})),Promise.all(r).then((()=>(e.forEach((e=>{if("cssRules"in e)try{Xg(e.cssRules||[]).forEach((e=>{n.push(e)}))}catch(t){console.error(`Error while reading CSS rules from ${e.href}`,t)}})),n)))}(n,t);return function(e){return e.filter((e=>e.type===CSSRule.FONT_FACE_RULE)).filter((e=>yv(e.style.getPropertyValue("src"))))}(r)}(e,t);return(await Promise.all(n.map((e=>{const n=e.parentStyleSheet?e.parentStyleSheet.href:null;return bv(e.cssText,n,t)})))).join("\n")}(e,t);if(n){const t=document.createElement("style"),r=document.createTextNode(n);t.appendChild(r),e.firstChild?e.insertBefore(t,e.firstChild):e.appendChild(t)}}async function Av(e,t={}){const{width:n,height:r}=Jg(e,t),i=await pv(e,t,!0);return await Ov(i,t),await _v(i,t),function(e,t){const{style:n}=e;t.backgroundColor&&(n.backgroundColor=t.backgroundColor),t.width&&(n.width=`${t.width}px`),t.height&&(n.height=`${t.height}px`);const r=t.style;null!=r&&Object.keys(r).forEach((e=>{n[e]=r[e]}))}(i,t),await async function(e,t,n){const r="http://www.w3.org/2000/svg",i=document.createElementNS(r,"svg"),o=document.createElementNS(r,"foreignObject");return i.setAttribute("width",`${t}`),i.setAttribute("height",`${n}`),i.setAttribute("viewBox",`0 0 ${t} ${n}`),o.setAttribute("width","100%"),o.setAttribute("height","100%"),o.setAttribute("x","0"),o.setAttribute("y","0"),o.setAttribute("externalResourcesRequired","true"),i.appendChild(o),o.appendChild(e),async function(e){return Promise.resolve().then((()=>(new XMLSerializer).serializeToString(e))).then(encodeURIComponent).then((e=>`data:image/svg+xml;charset=utf-8,${e}`))}(i)}(i,n,r)}async function Cv(e,t={}){const{width:n,height:r}=Jg(e,t),i=await Av(e,t),o=await tv(i),a=document.createElement("canvas"),s=a.getContext("2d"),l=t.pixelRatio||function(){let e,t;try{t=process}catch{}const n=t&&t.env?t.env.devicePixelRatio:null;return n&&(e=parseInt(n,10),Number.isNaN(e)&&(e=1)),e||window.devicePixelRatio||1}(),c=t.canvasWidth||n,u=t.canvasHeight||r;return a.width=c*l,a.height=u*l,t.skipAutoScale||function(e){(e.width>ev||e.height>ev)&&(e.width>ev&&e.height>ev?e.width>e.height?(e.height*=ev/e.width,e.width=ev):(e.width*=ev/e.height,e.height=ev):e.width>ev?(e.height*=ev/e.width,e.width=ev):(e.width*=ev/e.height,e.height=ev))}(a),a.style.width=`${c}`,a.style.height=`${u}`,t.backgroundColor&&(s.fillStyle=t.backgroundColor,s.fillRect(0,0,a.width,a.height)),s.drawImage(o,0,0,a.width,a.height),a}class kv{constructor(e,t){this.model=e,this.services=t,this.init()}init(){}update(){}setModel(e){this.model=e}setServices(e){this.services=e}}let Mv=class e extends kv{constructor(e,t){super(e,t),this.chartID=""}static getHTMLElementSize(e){return{width:e.clientWidth,height:e.clientHeight}}static getSVGElementSize(e,t={useAttrs:!1,useClientDimensions:!1,useBBox:!1,useBoundingRect:!1}){e.attr||(e=sn(e));const n={width:0,height:0},r=e=>{e&&Object.keys(n).forEach((t=>{if(e[t]){const r=e[t],i=parseFloat(r);r&&i>n[t]&&-1===(""+r).indexOf("%")&&(n[t]=i)}}))},i={width:e.attr("width"),height:e.attr("height")},o=e.node();let a,s,l,c,u;try{"function"==typeof o.getBBox&&(a=o.getBBox(),s={width:a.width,height:a.height})}catch(e){console.error(e)}try{"function"==typeof(null==o?void 0:o.getBoundingClientRect)&&(l=o.getBoundingClientRect(),c={width:l.width,height:l.height})}catch(e){console.error(e)}if(o instanceof SVGSVGElement&&(u={width:o.clientWidth,height:o.clientHeight}),t){if(t.useAttrs&&(r(i),n.width>0&&n.height>0))return n;if(t.useClientDimensions&&(r(u),n.width>0&&n.height>0))return u;if(t.useBBox&&(r(s),n.width>0&&n.height>0))return s;if(t.useBoundingRect&&(r(c),n.width>0&&n.height>0))return c}try{r({width:Um(e.node(),"width","baseVal","value"),height:Um(e.node(),"height","baseVal","value")})}catch{r(u),r(s),r(i)}return n}static appendOrSelect(e,t){const n=e.select(`${t}`);if(n.empty()){let n,r,i=t.split("#");return 2===i.length?(n=i[0],i=i[1].split("."),r=i[0]):(i=t.split("."),n=i[0]),e.append(n).attr("id",r).attr("class",i.slice(1).join(" "))}return n}init(){this.styleHolderElement(),this.initializeID(),this.addMainContainer(),this.model.getOptions().resizable&&this.addResizeListener(),this.addHolderListeners(),this.handleFullscreenChange()}getChartID(){return this.chartID}generateElementIDString(e){return`chart-${this.chartID}-${e}`}initializeID(){this.chartID=Math.floor(281474976710656*(1+Math.random())).toString(16)}addMainContainer(){const e=this.model.getOptions(),t=Um(e,"style","prefix"),n=sn(this.getHolder()).append("div").classed(`${jp}--${t}--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 e=this.getHolder(),{width:t,height:n,theme:r}=this.model.getOptions();t!==this.width&&(e.style.width=t,this.width=t),n!==this.height&&(e.style.height=n,this.height=n),sn(this.getHolder()).classed(`${jp}--chart-holder`,!0).attr("data-carbon-theme",r)}getHolder(){return this.model.get("holder")}exportToJPG(){const e=this,t=this.model.getOptions(),n=sn(this.getHolder());n.classed("filled",!0),async function(e,t={}){return(await Cv(e,t)).toDataURL("image/jpeg",t.quality||1)}(this.getMainContainer(),{quality:1,filter:e=>!(e.classList&&e.classList.contains("cds--cc--toolbar"))}).then((function(r){var i;let o="myChart";const a=Um(t,"fileDownload","fileName");"function"==typeof a?o=a("jpg"):"string"==typeof a&&(o=a),null==(i=e.services.files)||i.downloadImage(r,`${o}.jpg`),n.classed("filled",!1)}))}exportToPNG(){const e=this,t=this.model.getOptions(),n=sn(this.getHolder());n.classed("filled",!0),async function(e,t={}){return(await Cv(e,t)).toDataURL()}(this.getMainContainer(),{quality:1,filter:e=>!(e.classList&&e.classList.contains("cds--cc--toolbar"))}).then((function(r){var i;let o="myChart";const a=Um(t,"fileDownload","fileName");"function"==typeof a?o=a("png"):"string"==typeof a&&(o=a),null==(i=e.services.files)||i.downloadImage(r,`${o}.png`),n.classed("filled",!1)})).catch((function(e){console.error("oops, something went wrong!",e)}))}toggleFullscreen(){const e=this.getHolder();sn(e).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():e.requestFullscreen?e.requestFullscreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.msRequestFullscreen&&e.msRequestFullscreen()}handleFullscreenChange(){document.addEventListener("fullscreenchange",(()=>{const e=sn(this.getHolder()),t=e.classed("fullscreen");e.classed("fullscreen",!t)}))}setSVGMaxHeight(){if(!this.model.getOptions().height){const{height:t}=e.getSVGElementSize(sn(this.mainContainer),{useBBox:!0}),n=sn(this.mainContainer).attr("class"),r=sn(this.mainContainer).selectAll(`.${n} > svg`);let i=0;r.nodes().forEach((function(t){i+=Number(e.getSVGElementSize(sn(t),{useBBox:!0}).height)})),i<=t?sn(this.mainContainer).attr("height",i):sn(this.mainContainer).attr("height","100%")}}getMainContainer(){return this.mainContainer}addHolderListeners(){const e=this.getHolder();e&&sn(e).on("mouseover",(()=>{var e;null==(e=this.services.events)||e.dispatchEvent(R.Chart.MOUSEOVER)})).on("mouseout",(()=>{var e;null==(e=this.services.events)||e.dispatchEvent(R.Chart.MOUSEOUT)}))}addResizeListener(){const e=this.getHolder();if(!e)return;let t=e.clientWidth,n=e.clientHeight;const r=function(e,t,n){var r,i,o,a,s,l,c=0,u=!1,d=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function f(t){var n=r,o=i;return r=i=void 0,c=t,a=e.apply(o,n)}function p(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-c>=o}function m(){var e=Gg();if(p(e))return g(e);s=setTimeout(m,function(e){var n=t-(e-l);return d?Yg(n,o-(e-c)):n}(e))}function g(e){return s=void 0,h&&r?f(e):(r=i=void 0,a)}function v(){var e=Gg(),n=p(e);if(r=arguments,i=this,l=e,n){if(void 0===s)return function(e){return c=e,s=setTimeout(m,t),u?f(e):a}(l);if(d)return clearTimeout(s),s=setTimeout(m,t),f(l)}return void 0===s&&(s=setTimeout(m,t)),a}return t=Wg(t)||0,hu(n)&&(u=!!n.leading,o=(d="maxWait"in n)?qg(Wg(n.maxWait)||0,t):o,h="trailing"in n?!!n.trailing:h),v.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=l=i=s=void 0},v.flush=function(){return void 0===s?a:g(Gg())},v}((()=>{var r;e&&(Math.abs(t-e.clientWidth)>1||Math.abs(n-e.clientHeight)>1)&&(t=e.clientWidth,n=e.clientHeight,null==(r=this.services.events)||r.dispatchEvent(R.Chart.RESIZE))}),12.5);new ResizeObserver(r).observe(e)}},Nv=class e extends kv{static appendOrUpdateLinearGradient(e){let t=e.svg.select(`defs linearGradient#${e.id}`);t.empty()&&(t=e.svg.append("defs").append("linearGradient").attr("id",e.id).attr("x1",e.x1).attr("x2",e.x2).attr("y1",e.y1).attr("y2",e.y2)),t.selectAll("stop").remove(),t.selectAll("stop").data(e.stops).enter().append("stop").attr("offset",(e=>e.offset)).style("stop-color",(e=>e.color)).style("stop-opacity",(e=>e.opacity))}static getOffsetRatio(e){return(100*Math.abs(e[1])/Math.abs(e[0]-e[1])).toFixed(2)+"%"}static getStops(t,n){let r=[{offset:"0%",color:n,opacity:"0.6"},{offset:"80%",color:n,opacity:"0"}];return t[0]<0&&t[1]>0&&(r=[{offset:"0%",color:n,opacity:"0.6"},{offset:e.getOffsetRatio(t),color:n,opacity:"0"},{offset:"100%",color:n,opacity:"0.6"}]),r}};var Dv=Math.PI,Rv=2*Dv,Lv=1e-6,Pv=Rv-Lv;function Iv(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function $v(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),n}Iv.prototype=function(){return new Iv}.prototype={constructor:Iv,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,i,o){this._+="C"+ +e+","+ +t+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(e,t,n,r,i){e=+e,t=+t,n=+n,r=+r,i=+i;var o=this._x1,a=this._y1,s=n-e,l=r-t,c=o-e,u=a-t,d=c*c+u*u;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(d>Lv)if(Math.abs(u*s-l*c)>Lv&&i){var h=n-o,f=r-a,p=s*s+l*l,m=h*h+f*f,g=Math.sqrt(p),v=Math.sqrt(d),y=i*Math.tan((Dv-Math.acos((p+d-m)/(2*g*v)))/2),b=y/v,w=y/g;Math.abs(b-1)>Lv&&(this._+="L"+(e+b*c)+","+(t+b*u)),this._+="A"+i+","+i+",0,0,"+ +(u*h>c*f)+","+(this._x1=e+w*s)+","+(this._y1=t+w*l)}else this._+="L"+(this._x1=e)+","+(this._y1=t)},arc:function(e,t,n,r,i,o){e=+e,t=+t,o=!!o;var a=(n=+n)*Math.cos(r),s=n*Math.sin(r),l=e+a,c=t+s,u=1^o,d=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>Lv||Math.abs(this._y1-c)>Lv)&&(this._+="L"+l+","+c),n&&(d<0&&(d=d%Rv+Rv),d>Pv?this._+="A"+n+","+n+",0,1,"+u+","+(e-a)+","+(t-s)+"A"+n+","+n+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):d>Lv&&(this._+="A"+n+","+n+",0,"+ +(d>=Dv)+","+u+","+(this._x1=e+n*Math.cos(i))+","+(this._y1=t+n*Math.sin(i))))},rect:function(e,t,n,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}},Array.prototype.slice;var zv={value:function(){}};function Bv(){for(var e,t=0,n=arguments.length,r={};t<n;++t){if(!(e=arguments[t]+"")||e in r||/[\s.]/.test(e))throw new Error("illegal type: "+e);r[e]=[]}return new jv(r)}function jv(e){this._=e}function Fv(e,t){for(var n,r=0,i=e.length;r<i;++r)if((n=e[r]).name===t)return n.value}function Uv(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=zv,e=e.slice(0,r).concat(e.slice(r+1));break}return null!=n&&e.push({name:t,value:n}),e}jv.prototype=Bv.prototype={constructor:jv,on:function(e,t){var n,r=this._,i=function(e,t){return e.trim().split(/^|\s+/).map((function(e){var n="",r=e.indexOf(".");if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:n}}))}(e+"",r),o=-1,a=i.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++o<a;)if(n=(e=i[o]).type)r[n]=Uv(r[n],e.name,t);else if(null==t)for(n in r)r[n]=Uv(r[n],e.name,null);return this}for(;++o<a;)if((n=(e=i[o]).type)&&(n=Fv(r[n],e.name)))return n},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new jv(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=0,n=(r=this._[e]).length;o<n;++o)r[o].value.apply(t,i)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,o=r.length;i<o;++i)r[i].value.apply(t,n)}},$v(Object.freeze(Object.defineProperty({__proto__:null,dispatch:Bv},Symbol.toStringTag,{value:"Module"}))).dispatch,Math.PI;var Hv=function(e){return function(t){return null==e?void 0:e[t]}}({À:"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"});const Vv=Hv;var Zv=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Wv=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g"),Gv=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,qv=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Yv="\\ud800-\\udfff",Kv="\\u2700-\\u27bf",Xv="a-z\\xdf-\\xf6\\xf8-\\xff",Qv="A-Z\\xc0-\\xd6\\xd8-\\xde",Jv="\\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",ey="["+Jv+"]",ty="\\d+",ny="["+Kv+"]",ry="["+Xv+"]",iy="[^"+Yv+Jv+ty+Kv+Xv+Qv+"]",oy="(?:\\ud83c[\\udde6-\\uddff]){2}",ay="[\\ud800-\\udbff][\\udc00-\\udfff]",sy="["+Qv+"]",ly="(?:"+ry+"|"+iy+")",cy="(?:"+sy+"|"+iy+")",uy="(?:['’](?:d|ll|m|re|s|t|ve))?",dy="(?:['’](?:D|LL|M|RE|S|T|VE))?",hy="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",fy="[\\ufe0e\\ufe0f]?",py=fy+hy+"(?:\\u200d(?:"+["[^"+Yv+"]",oy,ay].join("|")+")"+fy+hy+")*",my="(?:"+[ny,oy,ay].join("|")+")"+py,gy=RegExp([sy+"?"+ry+"+"+uy+"(?="+[ey,sy,"$"].join("|")+")",cy+"+"+dy+"(?="+[ey,sy+ly,"$"].join("|")+")",sy+"?"+ly+"+"+uy,sy+"+"+dy,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ty,my].join("|"),"g");var vy=RegExp("['’]","g");function yy(e){return function(t){return function(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;)n=t(n,e[i],i,e);return n}(function(e,t,n){return e=Qd(e),void 0===(t=n?void 0:t)?function(e){return qv.test(e)}(e)?function(e){return e.match(gy)||[]}(e):function(e){return e.match(Gv)||[]}(e):e.match(t)||[]}(function(e){return(e=Qd(e))&&e.replace(Zv,Vv).replace(Wv,"")}(t).replace(vy,"")),e,"")}}function by(e,t){var n;return Ng(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function wy(e,t,n){var r=su(e)?Bf:by;return n&&rd(e,t,n)&&(t=void 0),r(e,Ep(t))}yy((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}));let _y=class{constructor(e,t,n){if(this.type="",this.renderType=L.HTML,this.id="",this.parent=void 0,this.configs={},this.model=e,this.services=t,n&&(this.configs=n,this.configs.id)){const e=Um(this.model.getOptions(),"style","prefix");this.id=`${e}--${this.configs.id}`}this.parent||this.setParent(sn(this.services.domUtils.getMainContainer()))}init(){}render(e=!0){console.error("Error: Component did not provide the required render function.")}destroy(){}setModel(e){this.model=e}setServices(e){this.services=e}setParent(e){var t;const n=this.parent;if(this.parent=e,(!n||n.node()!==e.node())&&this.type){const e=Um(this.model.getOptions(),"style","prefix");null==(t=this.parent)||t.classed(`${jp}--${e}--${this.type}`,!0),n&&n.classed(`${jp}--${e}--${this.type}`,!1)}}getParent(){return this.parent}getComponentContainer(e={withinChartClip:!1}){if(this.type){const t=Um(this.model.getOptions(),"style","prefix"),n=this.id?`#${this.id}`:"",r=Mv.appendOrSelect(this.parent,`${this.renderType===L.SVG?"svg":"div"}${n}.${jp}--${t}--${this.type}`);if(e.withinChartClip){const e=this.model.get("chartClipId");if(e){const t=sn(`#${e}`).select("rect");0!==t.size()&&parseFloat(t.attr("height"))>0&&r.attr("clip-path",`url(#${e})`)}}return r.attr("width","100%").attr("height","100%")}return this.parent}getOptions(){return this.configs.options?Dp({},this.model.getOptions(),this.configs.options):this.model.getOptions()}};const{entries:Ey,setPrototypeOf:xy,isFrozen:Sy,getPrototypeOf:Ty,getOwnPropertyDescriptor:Oy}=Object;let{freeze:Ay,seal:Cy,create:ky}=Object,{apply:My,construct:Ny}=typeof Reflect<"u"&&Reflect;Ay||(Ay=function(e){return e}),Cy||(Cy=function(e){return e}),My||(My=function(e,t,n){return e.apply(t,n)}),Ny||(Ny=function(e,t){return new e(...t)});const Dy=Hy(Array.prototype.forEach),Ry=Hy(Array.prototype.pop),Ly=Hy(Array.prototype.push),Py=Hy(String.prototype.toLowerCase),Iy=Hy(String.prototype.toString),$y=Hy(String.prototype.match),zy=Hy(String.prototype.replace),By=Hy(String.prototype.indexOf),jy=Hy(String.prototype.trim),Fy=Hy(RegExp.prototype.test),Uy=function(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Ny(e,n)}}(TypeError);function Hy(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return My(e,t,r)}}function Vy(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Py;xy&&xy(e,null);let r=t.length;for(;r--;){let i=t[r];if("string"==typeof i){const e=n(i);e!==i&&(Sy(t)||(t[r]=e),i=e)}e[i]=!0}return e}function Zy(e){const t=ky(null);for(const[n,r]of Ey(e))void 0!==Oy(e,n)&&(t[n]=r);return t}function Wy(e,t){for(;null!==e;){const n=Oy(e,t);if(n){if(n.get)return Hy(n.get);if("function"==typeof n.value)return Hy(n.value)}e=Ty(e)}return function(e){return console.warn("fallback value for",e),null}}const Gy=Ay(["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"]),qy=Ay(["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"]),Yy=Ay(["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"]),Ky=Ay(["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"]),Xy=Ay(["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"]),Qy=Ay(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Jy=Ay(["#text"]),eb=Ay(["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","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","xmlns","slot"]),tb=Ay(["accent-height","accumulate","additive","alignment-baseline","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","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","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","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","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"]),nb=Ay(["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"]),rb=Ay(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),ib=Cy(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ob=Cy(/<%[\w\W]*|[\w\W]*%>/gm),ab=Cy(/\${[\w\W]*}/gm),sb=Cy(/^data-[\-\w.\u00B7-\uFFFF]/),lb=Cy(/^aria-[\-\w]+$/),cb=Cy(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ub=Cy(/^(?:\w+script|data):/i),db=Cy(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),hb=Cy(/^html$/i);var fb=Object.freeze({__proto__:null,MUSTACHE_EXPR:ib,ERB_EXPR:ob,TMPLIT_EXPR:ab,DATA_ATTR:sb,ARIA_ATTR:lb,IS_ALLOWED_URI:cb,IS_SCRIPT_OR_DATA:ub,ATTR_WHITESPACE:db,DOCTYPE_NAME:hb}),pb=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:typeof window>"u"?null:window;const n=t=>e(t);if(n.version="3.0.6",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;let{document:r}=t;const i=r,o=i.currentScript,{DocumentFragment:a,HTMLTemplateElement:s,Node:l,Element:c,NodeFilter:u,NamedNodeMap:d=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:h,DOMParser:f,trustedTypes:p}=t,m=c.prototype,g=Wy(m,"cloneNode"),v=Wy(m,"nextSibling"),y=Wy(m,"childNodes"),b=Wy(m,"parentNode");if("function"==typeof s){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let w,_="";const{implementation:E,createNodeIterator:x,createDocumentFragment:S,getElementsByTagName:T}=r,{importNode:O}=i;let A={};n.isSupported="function"==typeof Ey&&"function"==typeof b&&E&&void 0!==E.createHTMLDocument;const{MUSTACHE_EXPR:C,ERB_EXPR:k,TMPLIT_EXPR:M,DATA_ATTR:N,ARIA_ATTR:D,IS_SCRIPT_OR_DATA:R,ATTR_WHITESPACE:L}=fb;let{IS_ALLOWED_URI:P}=fb,I=null;const $=Vy({},[...Gy,...qy,...Yy,...Xy,...Jy]);let z=null;const B=Vy({},[...eb,...tb,...nb,...rb]);let j=Object.seal(ky(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}})),F=null,U=null,H=!0,V=!0,Z=!1,W=!0,G=!1,q=!1,Y=!1,K=!1,X=!1,Q=!1,J=!1,ee=!0,te=!1,ne=!0,re=!1,ie={},oe=null;const ae=Vy({},["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 se=null;const le=Vy({},["audio","video","img","source","image","track"]);let ce=null;const ue=Vy({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),de="http://www.w3.org/1998/Math/MathML",he="http://www.w3.org/2000/svg",fe="http://www.w3.org/1999/xhtml";let pe=fe,me=!1,ge=null;const ve=Vy({},[de,he,fe],Iy);let ye=null;const be=["application/xhtml+xml","text/html"];let we=null,_e=null;const Ee=r.createElement("form"),xe=function(e){return e instanceof RegExp||e instanceof Function},Se=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!_e||_e!==e){if((!e||"object"!=typeof e)&&(e={}),e=Zy(e),ye=ye=-1===be.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,we="application/xhtml+xml"===ye?Iy:Py,I="ALLOWED_TAGS"in e?Vy({},e.ALLOWED_TAGS,we):$,z="ALLOWED_ATTR"in e?Vy({},e.ALLOWED_ATTR,we):B,ge="ALLOWED_NAMESPACES"in e?Vy({},e.ALLOWED_NAMESPACES,Iy):ve,ce="ADD_URI_SAFE_ATTR"in e?Vy(Zy(ue),e.ADD_URI_SAFE_ATTR,we):ue,se="ADD_DATA_URI_TAGS"in e?Vy(Zy(le),e.ADD_DATA_URI_TAGS,we):le,oe="FORBID_CONTENTS"in e?Vy({},e.FORBID_CONTENTS,we):ae,F="FORBID_TAGS"in e?Vy({},e.FORBID_TAGS,we):{},U="FORBID_ATTR"in e?Vy({},e.FORBID_ATTR,we):{},ie="USE_PROFILES"in e&&e.USE_PROFILES,H=!1!==e.ALLOW_ARIA_ATTR,V=!1!==e.ALLOW_DATA_ATTR,Z=e.ALLOW_UNKNOWN_PROTOCOLS||!1,W=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,G=e.SAFE_FOR_TEMPLATES||!1,q=e.WHOLE_DOCUMENT||!1,X=e.RETURN_DOM||!1,Q=e.RETURN_DOM_FRAGMENT||!1,J=e.RETURN_TRUSTED_TYPE||!1,K=e.FORCE_BODY||!1,ee=!1!==e.SANITIZE_DOM,te=e.SANITIZE_NAMED_PROPS||!1,ne=!1!==e.KEEP_CONTENT,re=e.IN_PLACE||!1,P=e.ALLOWED_URI_REGEXP||cb,pe=e.NAMESPACE||fe,j=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&xe(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(j.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&xe(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(j.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(j.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),G&&(V=!1),Q&&(X=!0),ie&&(I=Vy({},[...Jy]),z=[],!0===ie.html&&(Vy(I,Gy),Vy(z,eb)),!0===ie.svg&&(Vy(I,qy),Vy(z,tb),Vy(z,rb)),!0===ie.svgFilters&&(Vy(I,Yy),Vy(z,tb),Vy(z,rb)),!0===ie.mathMl&&(Vy(I,Xy),Vy(z,nb),Vy(z,rb))),e.ADD_TAGS&&(I===$&&(I=Zy(I)),Vy(I,e.ADD_TAGS,we)),e.ADD_ATTR&&(z===B&&(z=Zy(z)),Vy(z,e.ADD_ATTR,we)),e.ADD_URI_SAFE_ATTR&&Vy(ce,e.ADD_URI_SAFE_ATTR,we),e.FORBID_CONTENTS&&(oe===ae&&(oe=Zy(oe)),Vy(oe,e.FORBID_CONTENTS,we)),ne&&(I["#text"]=!0),q&&Vy(I,["html","head","body"]),I.table&&(Vy(I,["tbody"]),delete F.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw Uy('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw Uy('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=e.TRUSTED_TYPES_POLICY,_=w.createHTML("")}else void 0===w&&(w=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const i="dompurify"+(n?"#"+n:"");try{return e.createPolicy(i,{createHTML:e=>e,createScriptURL:e=>e})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}}(p,o)),null!==w&&"string"==typeof _&&(_=w.createHTML(""));Ay&&Ay(e),_e=e}},Te=Vy({},["mi","mo","mn","ms","mtext"]),Oe=Vy({},["foreignobject","desc","title","annotation-xml"]),Ae=Vy({},["title","style","font","a","script"]),Ce=Vy({},qy);Vy(Ce,Yy),Vy(Ce,Ky);const ke=Vy({},Xy);Vy(ke,Qy);const Me=function(e){Ly(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch{e.remove()}},Ne=function(e,t){try{Ly(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch{Ly(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!z[e])if(X||Q)try{Me(t)}catch{}else try{t.setAttribute(e,"")}catch{}},De=function(e){let t=null,n=null;if(K)e="<remove></remove>"+e;else{const t=$y(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===ye&&pe===fe&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const i=w?w.createHTML(e):e;if(pe===fe)try{t=(new f).parseFromString(i,ye)}catch{}if(!t||!t.documentElement){t=E.createDocument(pe,"template",null);try{t.documentElement.innerHTML=me?_:i}catch{}}const o=t.body||t.documentElement;return e&&n&&o.insertBefore(r.createTextNode(n),o.childNodes[0]||null),pe===fe?T.call(t,q?"html":"body")[0]:q?t.documentElement:o},Re=function(e){return x.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,null)},Le=function(e){return"function"==typeof l&&e instanceof l},Pe=function(e,t,r){A[e]&&Dy(A[e],(e=>{e.call(n,t,r,_e)}))},Ie=function(e){let t=null;if(Pe("beforeSanitizeElements",e,null),function(e){return e instanceof h&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof d)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)}(e))return Me(e),!0;const r=we(e.nodeName);if(Pe("uponSanitizeElement",e,{tagName:r,allowedTags:I}),e.hasChildNodes()&&!Le(e.firstElementChild)&&Fy(/<[/\w]/g,e.innerHTML)&&Fy(/<[/\w]/g,e.textContent))return Me(e),!0;if(!I[r]||F[r]){if(!F[r]&&ze(r)&&(j.tagNameCheck instanceof RegExp&&Fy(j.tagNameCheck,r)||j.tagNameCheck instanceof Function&&j.tagNameCheck(r)))return!1;if(ne&&!oe[r]){const t=b(e)||e.parentNode,n=y(e)||e.childNodes;if(n&&t)for(let r=n.length-1;r>=0;--r)t.insertBefore(g(n[r],!0),v(e))}return Me(e),!0}return e instanceof c&&!function(e){let t=b(e);(!t||!t.tagName)&&(t={namespaceURI:pe,tagName:"template"});const n=Py(e.tagName),r=Py(t.tagName);return!!ge[e.namespaceURI]&&(e.namespaceURI===he?t.namespaceURI===fe?"svg"===n:t.namespaceURI===de?"svg"===n&&("annotation-xml"===r||Te[r]):!!Ce[n]:e.namespaceURI===de?t.namespaceURI===fe?"math"===n:t.namespaceURI===he?"math"===n&&Oe[r]:!!ke[n]:e.namespaceURI===fe?!(t.namespaceURI===he&&!Oe[r]||t.namespaceURI===de&&!Te[r])&&!ke[n]&&(Ae[n]||!Ce[n]):!("application/xhtml+xml"!==ye||!ge[e.namespaceURI]))}(e)||("noscript"===r||"noembed"===r||"noframes"===r)&&Fy(/<\/no(script|embed|frames)/i,e.innerHTML)?(Me(e),!0):(G&&3===e.nodeType&&(t=e.textContent,Dy([C,k,M],(e=>{t=zy(t,e," ")})),e.textContent!==t&&(Ly(n.removed,{element:e.cloneNode()}),e.textContent=t)),Pe("afterSanitizeElements",e,null),!1)},$e=function(e,t,n){if(ee&&("id"===t||"name"===t)&&(n in r||n in Ee))return!1;if((!V||U[t]||!Fy(N,t))&&(!H||!Fy(D,t)))if(!z[t]||U[t]){if(!(ze(e)&&(j.tagNameCheck instanceof RegExp&&Fy(j.tagNameCheck,e)||j.tagNameCheck instanceof Function&&j.tagNameCheck(e))&&(j.attributeNameCheck instanceof RegExp&&Fy(j.attributeNameCheck,t)||j.attributeNameCheck instanceof Function&&j.attributeNameCheck(t))||"is"===t&&j.allowCustomizedBuiltInElements&&(j.tagNameCheck instanceof RegExp&&Fy(j.tagNameCheck,n)||j.tagNameCheck instanceof Function&&j.tagNameCheck(n))))return!1}else if(!ce[t]&&!Fy(P,zy(n,L,""))&&("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==By(n,"data:")||!se[e])&&(!Z||Fy(R,zy(n,L,"")))&&n)return!1;return!0},ze=function(e){return e.indexOf("-")>0},Be=function(e){Pe("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:z};let i=t.length;for(;i--;){const o=t[i],{name:a,namespaceURI:s,value:l}=o,c=we(a);let u="value"===a?l:jy(l);if(r.attrName=c,r.attrValue=u,r.keepAttr=!0,r.forceKeepAttr=void 0,Pe("uponSanitizeAttribute",e,r),u=r.attrValue,r.forceKeepAttr||(Ne(a,e),!r.keepAttr))continue;if(!W&&Fy(/\/>/i,u)){Ne(a,e);continue}G&&Dy([C,k,M],(e=>{u=zy(u,e," ")}));const d=we(e.nodeName);if($e(d,c,u)){if(te&&("id"===c||"name"===c)&&(Ne(a,e),u="user-content-"+u),w&&"object"==typeof p&&"function"==typeof p.getAttributeType&&!s)switch(p.getAttributeType(d,c)){case"TrustedHTML":u=w.createHTML(u);break;case"TrustedScriptURL":u=w.createScriptURL(u)}try{s?e.setAttributeNS(s,a,u):e.setAttribute(a,u),Ry(n.removed)}catch{}}}Pe("afterSanitizeAttributes",e,null)},je=function e(t){let n=null;const r=Re(t);for(Pe("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)Pe("uponSanitizeShadowNode",n,null),!Ie(n)&&(n.content instanceof a&&e(n.content),Be(n));Pe("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,o=null,s=null,c=null;if(me=!e,me&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Le(e)){if("function"!=typeof e.toString)throw Uy("toString is not a function");if("string"!=typeof(e=e.toString()))throw Uy("dirty is not a string, aborting")}if(!n.isSupported)return e;if(Y||Se(t),n.removed=[],"string"==typeof e&&(re=!1),re){if(e.nodeName){const t=we(e.nodeName);if(!I[t]||F[t])throw Uy("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof l)r=De("\x3c!----\x3e"),o=r.ownerDocument.importNode(e,!0),1===o.nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?r=o:r.appendChild(o);else{if(!X&&!G&&!q&&-1===e.indexOf("<"))return w&&J?w.createHTML(e):e;if(r=De(e),!r)return X?null:J?_:""}r&&K&&Me(r.firstChild);const u=Re(re?e:r);for(;s=u.nextNode();)Ie(s)||(s.content instanceof a&&je(s.content),Be(s));if(re)return e;if(X){if(Q)for(c=S.call(r.ownerDocument);r.firstChild;)c.appendChild(r.firstChild);else c=r;return(z.shadowroot||z.shadowrootmode)&&(c=O.call(i,c,!0)),c}let d=q?r.outerHTML:r.innerHTML;return q&&I["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&Fy(hb,r.ownerDocument.doctype.name)&&(d="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+d),G&&Dy([C,k,M],(e=>{d=zy(d,e," ")})),w&&J?w.createHTML(d):d},n.setConfig=function(){Se(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Y=!0},n.clearConfig=function(){_e=null,Y=!1},n.isValidAttribute=function(e,t,n){_e||Se({});const r=we(e),i=we(t);return $e(r,i,n)},n.addHook=function(e,t){"function"==typeof t&&(A[e]=A[e]||[],Ly(A[e],t))},n.removeHook=function(e){if(A[e])return Ry(A[e])},n.removeHooks=function(e){A[e]&&(A[e]=[])},n.removeAllHooks=function(){A={}},n}();const mb=e=>pb.sanitize(e,{USE_PROFILES:{html:!0,svg:!0,svgFilters:!0}}),gb=e=>pb.sanitize(e,{ALLOWED_TAGS:[]}),vb=class e extends _y{constructor(){super(...arguments),this.type="toolbar",this.renderType=L.HTML}init(){const e=()=>this.updateOverflowMenu(!1);this.services.events.addEventListener(R.Toolbar.SHOW_OVERFLOW_MENU,(()=>{this.renderOverflowMenu(),document.body.addEventListener("click",e)})),this.services.events.addEventListener(R.Toolbar.HIDE_OVERFLOW_MENU,(()=>{document.body.removeEventListener("click",e)}))}render(e=!0){const t=this.getComponentContainer().attr("role","toolbar").attr("aria-label",`chart-${this.services.domUtils.getChartID()} toolbar`);if(Um(this.getOptions(),"data","loading"))t.html(""),this.overflowMenu=null;else{this.overflowMenu||(this.overflowMenu=t.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:e,overflowMenuItemList:n}=this.getControlConfigs();n&&e.push(this.getOverflowButtonConfig());const r=t.selectAll("div.toolbar-control").data(e,(e=>e.id));r.exit().remove();const i=r.enter().append("div").attr("class","toolbar-control cds--overflow-menu cds--overflow-menu"),o=this;i.merge(r).classed("disabled",(e=>e.shouldBeDisabled())).attr("aria-disabled",(e=>e.shouldBeDisabled())).attr("aria-label",(e=>e.title)).html((e=>`\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-${gb(e.id)}`)}" aria-label="${gb(e.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${(e=>pb.sanitize(e,{NAMESPACE:"http://www.w3.org/2000/svg",USE_PROFILES:{html:!0,svg:!0,svgFilters:!0}}))(e.iconSVG.content)}\n\t\t\t\t</svg>\n\t\t\t</button>`)).each((function(e,t){sn(this).select("svg").style("will-change","transform").style("width",void 0!==e.iconSVG.width?e.iconSVG.width:"20px").style("height",void 0!==e.iconSVG.height?e.iconSVG.height:"20px"),sn(this).select("button").on("click",(t=>{e.shouldBeDisabled()||o.triggerFunctionAndEvent(e,t,this)})).on("keydown",(n=>{n.key&&"Enter"===n.key||" "===n.key?(n.preventDefault(),o.triggerFunctionAndEvent(e,n,this)):n.key&&"ArrowLeft"===n.key?o.focusOnPreviousEnabledToolbarItem(t):n.key&&"ArrowRight"===n.key&&o.focusOnNextEnabledToolbarItem(t)}))})),this.overflowButton=this.getComponentContainer().select(`button.cds--overflow-menu__trigger#${this.services.domUtils.generateElementIDString("control-toolbar-overflow-menu")}`)}}renderOverflowMenu(){const{overflowMenuItemList:e}=this.getControlConfigs(),t=this.overflowMenu.select("ul").selectAll("li.cds--overflow-menu-options__option").data(e,(e=>Um(e,"id")));t.exit().remove();const n=t.enter().append("li").attr("id",(e=>this.services.domUtils.generateElementIDString(`control-${e.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(t).classed("cds--overflow-menu-options__option--disabled",(e=>e.shouldBeDisabled())).classed("cds--overflow-menu-options__option--disabled",(e=>e.shouldBeDisabled())).attr("aria-disabled",(e=>e.shouldBeDisabled())).selectAll("button").text((e=>e.text))}isOverflowMenuOpen(){return this.overflowMenu.classed("is-open")}updateOverflowMenu(e){this.overflowMenu&&(this.overflowMenu.classed("is-open",e),this.overflowButton&&(this.overflowButton.attr("aria-expanded",e),sn(this.overflowButton.node().parentNode).classed("cds--overflow-menu--open",e).classed("cds--overflow-menu--open",e)),e?this.services.events.dispatchEvent(R.Toolbar.SHOW_OVERFLOW_MENU):this.services.events.dispatchEvent(R.Toolbar.HIDE_OVERFLOW_MENU))}focusOnPreviousEnabledToolbarItem(e){const t=this.getToolbarButtonItems();let n=t.length;for(let r=e-1;r>=0;r--)if(!t[r].shouldBeDisabled()){n=r;break}if(n<t.length){const e=sn(`button#${this.services.domUtils.generateElementIDString(`control-${t[n].id}`)}`).node();"focus"in e&&e.focus()}}focusOnNextEnabledToolbarItem(e){const t=this.getToolbarButtonItems();let n=-1;for(let r=e+1;r<t.length;r++)if(!t[r].shouldBeDisabled()){n=r;break}if(n>-1){const e=sn(`button#${this.services.domUtils.generateElementIDString(`control-${t[n].id}`)}`).node();"focus"in e&&e.focus()}}focusOnPreviousEnabledMenuItem(e){const t=this.getOverflowMenuItems();let n=t.length;for(let r=e-1;r>=0;r--)if(!t[r].shouldBeDisabled()){n=r;break}if(n<t.length){const e=sn(`#${this.services.domUtils.generateElementIDString(`control-${t[n].id}`)} button`).node();"focus"in e&&e.focus()}}focusOnNextEnabledMenuItem(e){const t=this.getOverflowMenuItems();let n=-1;for(let r=e+1;r<t.length;r++)if(!t[r].shouldBeDisabled()){n=r;break}if(n>-1){const e=sn(`#${this.services.domUtils.generateElementIDString(`control-${t[n].id}`)} button`).node();"focus"in e&&e.focus()}}toggleOverflowMenu(e){if(this.isOverflowMenuOpen())this.updateOverflowMenu(!1);else{this.updateOverflowMenu(!0);const t=this;this.getOverflowMenuItems().forEach(((n,r)=>{const i=sn(`#${this.services.domUtils.generateElementIDString(`control-${n.id}`)}`);null!==i&&(i.on("click",(()=>{t.triggerFunctionAndEvent(n,e,i.node()),t.updateOverflowMenu(!1)})),i.on("keydown",(o=>{o&&"Enter"===o.key?t.triggerFunctionAndEvent(n,e,i.node()):o&&"ArrowUp"===o.key?t.focusOnPreviousEnabledMenuItem(r):o&&"ArrowDown"===o.key?t.focusOnNextEnabledMenuItem(r):o&&"Escape"===o.key&&t.updateOverflowMenu(!1),o.preventDefault()})))})),t.focusOnNextEnabledMenuItem(-1)}e&&e.stopImmediatePropagation()}triggerFunctionAndEvent(e,t,n){"function"==typeof e.shouldBeDisabled&&e.shouldBeDisabled()||("function"==typeof e.clickFunction&&e.clickFunction(t),this.services.events.dispatchEvent(R.Toolbar.BUTTON_CLICK,{control:e,event:t,element:n}))}getControlConfigs(){const t=Um(this.getOptions(),"toolbar","numberOfIcons")-1,n=Um(this.getOptions(),"toolbar","controls"),r=[],i=[],o=[];return n.forEach((n=>{let a=null;n.type===J.CUSTOM?(null===Um(n,"id")&&(n.id="toolbar-button-"+e.buttonID++),null===Um(n,"shouldBeDisabled")&&(n.shouldBeDisabled=()=>!1),a=n):a=this.getControlConfigByType(n.type),a&&(a.text=n.text?n.text:n.type,-1!==a.id.indexOf("toolbar-export")?r.push(a):i.length<t?null===Um(a,"iconSVG","content")?o.push(a):i.push(a):o.push(a))})),o.push(...r),o.length?{buttonList:i,overflowMenuItemList:o}:{buttonList:i}}getToolbarButtonItems(){const{buttonList:e,overflowMenuItemList:t}=this.getControlConfigs();return t&&e.push(this.getOverflowButtonConfig()),e||[]}getOverflowMenuItems(){const{overflowMenuItemList:e}=this.getControlConfigs();return e||[]}getOverflowButtonConfig(){return{id:"toolbar-overflow-menu",title:"More options",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:e=>this.toggleOverflowMenu(e)}}getControlConfigByType(e){const t=this.services.zoom&&this.services.zoom.isZoomBarEnabled()&&!this.services.zoom.isEmptyState(),n=this.model.getDisplayData();let r;switch(e){case J.ZOOM_IN:t&&(r={id:"toolbar-zoomIn",title:"Zoom in",shouldBeDisabled:()=>this.services.zoom.isMinZoomDomain(),iconSVG:{content:this.getControlIconByType(e)},clickFunction:()=>this.services.zoom.zoomIn()});break;case J.ZOOM_OUT:t&&(r={id:"toolbar-zoomOut",title:"Zoom out",shouldBeDisabled:()=>this.services.zoom.isMaxZoomDomain(),iconSVG:{content:this.getControlIconByType(e)},clickFunction:()=>this.services.zoom.zoomOut()});break;case J.RESET_ZOOM:t&&(r={id:"toolbar-resetZoom",title:"Reset zoom",shouldBeDisabled:()=>this.services.zoom.isMaxZoomDomain(),iconSVG:{content:this.getControlIconByType(e)},clickFunction:()=>this.services.zoom.resetZoomDomain()});break;case J.MAKE_FULLSCREEN:r={id:"toolbar-makefullscreen",iconSVG:{content:this.getControlIconByType(e),width:"15px",height:"15px"},title:"Make fullscreen",shouldBeDisabled:()=>!1,clickFunction:()=>{this.services.domUtils.toggleFullscreen()}};break;case J.SHOW_AS_DATATABLE:r={id:"toolbar-showasdatatable",iconSVG:{content:this.getControlIconByType(e)},title:"Show as table",shouldBeDisabled:()=>0===n.length,clickFunction:()=>this.services.events.dispatchEvent(R.Modal.SHOW)};break;case J.EXPORT_CSV:r={id:"toolbar-export-CSV",title:"Export as CSV",shouldBeDisabled:()=>!1,iconSVG:{content:this.getControlIconByType(e)},clickFunction:()=>this.model.exportToCSV()};break;case J.EXPORT_PNG:r={id:"toolbar-export-PNG",title:"Export as PNG",shouldBeDisabled:()=>!1,iconSVG:{content:this.getControlIconByType(e)},clickFunction:()=>this.services.domUtils.exportToPNG()};break;case J.EXPORT_JPG:r={id:"toolbar-export-JPG",title:"Export as JPG",shouldBeDisabled:()=>!1,iconSVG:{content:this.getControlIconByType(e)},clickFunction:()=>this.services.domUtils.exportToJPG()};break;default:throw Error("Not supported toolbar control type: "+e)}return r}getControlIconByType(e){switch(e){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.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: "+e)}}};vb.buttonID=0;let yb=vb;const bb=class e extends _y{constructor(t,n,r,i){super(t,n,i),this.type="layout",this.configs=i,this.children=r,this._instanceID=e.instanceID++,this.init()}init(){this.children.forEach((e=>{e.components.forEach((e=>{e.init()}))}))}getPreferedAndFixedSizeSum(){const e=this.parent;let t=0;return e.selectAll(`div.layout-child-${this._instanceID}`).filter((e=>{const t=Um(e,"growth");return t===G.PREFERRED||t===G.FIXED})).each((function(e){t+=e.size})),t}getNumOfStretchChildren(){return this.parent.selectAll(`div.layout-child-${this._instanceID}`).filter((e=>Um(e,"growth")===G.STRETCH)).size()}render(e=!0){const t=this.parent,{width:n,height:r}=Mv.getHTMLElementSize(t.node()),i=this.configs.direction===W.ROW||this.configs.direction===W.ROW_REVERSE,o=Um(this.model.getOptions(),"style","prefix"),a=t.classed(`${jp}--${o}--layout-row`,this.configs.direction===W.ROW).classed(`${jp}--${o}--layout-row-reverse`,this.configs.direction===W.ROW_REVERSE).classed(`${jp}--${o}--layout-column`,this.configs.direction===W.COLUMN).classed(`${jp}--${o}--layout-column-reverse`,this.configs.direction===W.COLUMN_REVERSE).classed(`${jp}--${o}--layout-alignitems-center`,this.configs.alignItems===q.CENTER).selectAll(`div.layout-child-${this._instanceID}`).data(this.children,(e=>e.id));a.enter().append("div").merge(t.selectAll(`div.layout-child-${this._instanceID}`)).attr("class",(e=>`layout-child layout-child-${this._instanceID} ${e.id}`)).each((function(t){t.components.forEach((n=>{const r=sn(this),i=Um(t,"renderType")===L.SVG;n.setParent(i?Mv.appendOrSelect(r,"svg.layout-svg-wrapper").attr("width","100%").attr("height","100%"):r);const o=Um(t,"growth");(o===G.PREFERRED||o===G.FIXED)&&n.render(e)}))})),t.selectAll(`div.layout-child-${this._instanceID}`).style("height",null).style("width",null).each((function(e){const t=Um(e,"growth"),o=Um(e,"renderType")===L.SVG?Mv.getSVGElementSize(sn(this).select("svg.layout-svg-wrapper"),{useBBox:!0}):Mv.getHTMLElementSize(this);if(t===G.PREFERRED){const t=i?o.width:o.height,a=i?n:r;e.size=t/a*100}})),a.exit().remove(),this.children.filter((e=>Um(e,"growth")===G.STRETCH)).forEach((e=>{e.size=(100-+this.getPreferedAndFixedSizeSum())/+this.getNumOfStretchChildren()}));const s=t.selectAll(`div.layout-child-${this._instanceID}`).data(this.children,(e=>e.id));i?s.style("width",(e=>e.size/100*n+"px")).style("height","100%"):s.style("height",(e=>e.size/100*r+"px")).style("width","100%"),s.each((function(t){t.components.forEach((n=>{Um(t,"growth")===G.STRETCH&&n.render(e)}))}))}setModel(e){super.setModel(e),this.children.forEach((t=>{t.components.forEach((t=>t.setModel(e)))}))}setServices(e){super.setServices(e),this.children.forEach((t=>{t.components.forEach((t=>t.setServices(e)))}))}destroy(){this.children.forEach((e=>{e.components.forEach((e=>e.destroy()))}))}};bb.instanceID=Math.floor(99999999999*Math.random());let wb=bb;class _b extends _y{constructor(){super(...arguments),this.type="spacer"}render(e=!1){this.getComponentContainer().style("width",`${this.configs.size||Qp}px`).style("height",`${this.configs.size||Qp}px`).attr("opacity",0)}}var Eb="bx",xb="\n a[href], area[href], input:not([disabled]):not([tabindex='-1']),\n button:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']),\n textarea:not([disabled]):not([tabindex='-1']),\n iframe, object, embed, *[tabindex]:not([tabindex='-1']), *[contenteditable=true]\n ";function Sb(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Tb(e){return e.reduce((function(e,t){return Array.isArray(t)?e.push.apply(e,function(e){return function(e){if(Array.isArray(e))return Sb(e)}(e)||function(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Sb(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Sb(e,t)}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(Tb(t))):e.push(t),e}),[])}function Ob(e){return(Ob="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ab(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Cb(e,t){return(Cb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function kb(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Mb(e){return(Mb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Nb(e){return(Nb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Db(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Rb(){return Rb=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Pb(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Rb.apply(this,arguments)}function Lb(e,t){return(Lb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Pb(e){return(Pb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ib(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.addEventListener.apply(e,n),{release:function(){return e.removeEventListener.apply(e,n),null}}}function $b(e){return($b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function zb(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Bb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function jb(e,t){return(jb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Fb(e){return(Fb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ub(e,t){var n=e.target,r=e.currentTarget;if("function"==typeof n.matches){if(n.matches(t))return n;if(n.matches("".concat(t," *"))){var i=n.closest(t);if((r.nodeType===Node.DOCUMENT_NODE?r.documentElement:r).contains(i))return i}}}function Hb(e){if(!e||"function"==typeof e)return{launchingElement:null,launchingEvent:null};var t=e.delegateTarget||e.currentTarget||e,n=e.currentTarget&&e;if(t&&!t.nodeType)throw new TypeError("DOM Node should be given for launching element.");if(n&&!n.type)throw new TypeError("DOM event should be given for launching event.");return{launchingElement:t,launchingEvent:n}}function Vb(e){return(Vb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Zb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Wb(e,t){return(Wb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Gb(e){return(Gb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var qb=[function(e){var t=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&jb(e,t)}(n,e);var t=function(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=Fb(e);if(t){var i=Fb(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===$b(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}(n);function n(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),t.apply(this,arguments)}return function(e,t,n){t&&Bb(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1})}(n,[{key:"_changeState",value:function(){throw new Error("_changeState() should be overridden to perform actual change in state.")}},{key:"changeState",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i="string"==typeof n[0]?n.shift():void 0,o=Object(n[0])===n[0]&&"function"!=typeof n[0]?n.shift():void 0,a="function"==typeof n[0]?n.shift():void 0;if("function"!=typeof this.shouldStateBeChanged||this.shouldStateBeChanged(i,o)){var s={group:o&&o.group,state:i},l=[s.group,i].filter(Boolean).join("-").split("-").map((function(e){return e[0].toUpperCase()+e.substr(1)})).join(""),c=new CustomEvent(this.options["eventBefore".concat(l)],{bubbles:!0,cancelable:!0,detail:o}),u=o&&o.delegatorNode||this.element;if(u.dispatchEvent(c)){var d=[i,o].filter(Boolean);this._changeState.apply(this,function(e){return function(e){if(Array.isArray(e))return zb(e)}(e)||function(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return zb(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return zb(e,t)}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(d).concat([function(){u.dispatchEvent(new CustomEvent(e.options["eventAfter".concat(l)],{bubbles:!0,cancelable:!0,detail:o})),a&&a()}]))}else if(a){var h=new Error("Changing state (".concat(JSON.stringify(s),") has been canceled."));h.canceled=!0,a(h)}}else a&&a(null,!0)}}]),n}(e);return t},function(e){var t=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Wb(e,t)}(n,e);var t=function(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=Gb(e);if(t){var i=Gb(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Vb(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}(n);function n(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),t.apply(this,arguments)}return function(e,t,n){t&&Zb(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1})}(n,[{key:"show",value:function(e,t){(!e||"function"==typeof e)&&(t=e),this.changeState("shown",Hb(e),t)}},{key:"hide",value:function(e,t){(!e||"function"==typeof e)&&(t=e),this.changeState("hidden",Hb(e),t)}}]),n}(e);return t}];function Yb(e){return(Yb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Kb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Xb(e,t){return(Xb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Qb(e){return(Qb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Jb(e){return(Jb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ew(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function tw(e,t){return(tw=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function nw(e){return(nw=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var rw=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&tw(e,t)}(n,e);var t=function(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=nw(e);if(t){var i=nw(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Jb(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}(n);function n(e,r){var i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(i=t.call(this,e,r))._handleFocusinListener=void 0,i._handleKeydownListener=void 0,i._handleFocusin=function(e){var t=i.element.querySelector(i.options.selectorModalContainer)||i.element;i.element.classList.contains(i.options.classVisible)&&!t.contains(e.target)&&i.options.selectorsFloatingMenus.every((function(t){return!Ub(e,t)}))&&i.element.querySelector(xb).focus()},i._hookCloseActions(),i}return function(e,t,n){t&&ew(e.prototype,t),n&&ew(e,n),Object.defineProperty(e,"prototype",{writable:!1})}(n,[{key:"createdByLauncher",value:function(e){this.show(e)}},{key:"shouldStateBeChanged",value:function(e){return"shown"===e?!this.element.classList.contains(this.options.classVisible):this.element.classList.contains(this.options.classVisible)}},{key:"_changeState",value:function(e,t,n){var r,i=this;if(this._handleFocusinListener&&(this._handleFocusinListener=this.unmanage(this._handleFocusinListener).release()),"shown"===e){var o="onfocusin"in this.element.ownerDocument.defaultView,a=o?"focusin":"focus";this._handleFocusinListener=this.manage(Ib(this.element.ownerDocument,a,this._handleFocusin,!o))}"hidden"===e?(this.element.classList.toggle(this.options.classVisible,!1),this.element.ownerDocument.body.classList.toggle(this.options.classBody,!1),(this.options.selectorFocusOnClose||this.previouslyFocusedNode)&&(this.element.ownerDocument.querySelector(this.options.selectorFocusOnClose)||this.previouslyFocusedNode).focus()):"shown"===e&&(this.element.classList.toggle(this.options.classVisible,!0),this.element.ownerDocument.body.classList.toggle(this.options.classBody,!0)),r=this.manage(Ib(this.element,"transitionend",(function(){r&&(r=i.unmanage(r).release()),"shown"===e&&i.element.offsetWidth>0&&i.element.offsetHeight>0&&(i.previouslyFocusedNode=i.element.ownerDocument.activeElement,(i.element.querySelector(i.options.selectorPrimaryFocus)||i.element.querySelector(xb)).focus()),n()})))}},{key:"_hookCloseActions",value:function(){var e=this;this.manage(Ib(this.element,"click",(function(t){var n=Ub(t,e.options.selectorModalClose);n&&(t.delegateTarget=n),(n||t.target===e.element)&&e.hide(t)}))),this._handleKeydownListener&&(this._handleKeydownListener=this.unmanage(this._handleKeydownListener).release()),this._handleKeydownListener=this.manage(Ib(this.element.ownerDocument.body,"keydown",(function(t){27===t.which&&e.shouldStateBeChanged("hidden")&&(t.stopPropagation(),e.hide(t))})))}}],[{key:"options",get:function(){var e=Eb;return{selectorInit:"[data-modal]",selectorModalClose:"[data-modal-close]",selectorPrimaryFocus:"[data-modal-primary-focus]",selectorsFloatingMenus:[".".concat(e,"--overflow-menu-options"),".".concat(e,"--tooltip"),".flatpickr-calendar"],selectorModalContainer:".".concat(e,"--modal-container"),classVisible:"is-visible",classBody:"".concat(e,"--body--with-modal-open"),attribInitTarget:"data-modal-target",initEventNames:["click"],eventBeforeShown:"modal-beingshown",eventAfterShown:"modal-shown",eventBeforeHidden:"modal-beinghidden",eventAfterHidden:"modal-hidden"}}}]),n.components=new WeakMap,n}(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Tb(t).reduce((function(e,t){return t(e)}),function(){return function(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}))}())}((function(e){var t=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Cb(e,t)}(n,e);var t=function(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=Mb(e);if(t){var i=Mb(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Ob(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return kb(e)}(this,n)}}(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(r=t.call(this,e,i)).children=[],!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");return r.element=e,r.options=Object.assign(Object.create(r.constructor.options),i),r.constructor.components.set(r.element,kb(r)),r}return function(e,t,n){t&&Ab(e.prototype,t),n&&Ab(e,n),Object.defineProperty(e,"prototype",{writable:!1})}(n,[{key:"release",value:function(){for(var e=this.children.pop();e;e=this.children.pop())e.release();return this.constructor.components.delete(this.element),null}}],[{key:"create",value:function(e,t){return this.components.get(e)||new this(e,t)}}]),n}(e);return t}),(function(e){var t=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xb(e,t)}(n,e);var t=function(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=Qb(e);if(t){var i=Qb(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Yb(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}(n);function n(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),t.apply(this,arguments)}return function(e,t,n){n&&Kb(e,n),Object.defineProperty(e,"prototype",{writable:!1})}(n,0,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Object.assign(Object.create(this.options),n);if(!t||t.nodeType!==Node.ELEMENT_NODE&&t.nodeType!==Node.DOCUMENT_NODE)throw new TypeError("DOM document or DOM element should be given to search for and initialize this widget.");if(t.nodeType!==Node.ELEMENT_NODE||!t.matches(r.selectorInit)){var i=r.initEventNames.map((function(i){return Ib(t,i,(function(t){var i=Ub(t,"[".concat(r.attribInitTarget,"]"));if(i){t.delegateTarget=i;var o=i.ownerDocument.querySelectorAll(i.getAttribute(r.attribInitTarget));if(o.length>1)throw new Error("Target widget must be unique.");if(1===o.length){"A"===i.tagName&&t.preventDefault();var a=e.create(o[0],n);"function"==typeof a.createdByLauncher&&a.createdByLauncher(t)}}}))}));return{release:function(){for(var e=i.pop();e;e=i.pop())e.release()}}}return this.create(t,n),""}}]),n.forLazyInit=!0,n}(e);return t}),qb,(function(e){var t=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Lb(e,t)}(n,e);var t=function(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=Pb(e);if(t){var i=Pb(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Nb(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}(n);function n(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return(e=t.call.apply(t,[this].concat(i))).handles=new Set,e}return function(e,t,n){t&&Db(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1})}(n,[{key:"manage",value:function(e){return this.handles.add(e),e}},{key:"unmanage",value:function(e){return this.handles.delete(e),e}},{key:"release",value:function(){var e=this;return this.handles.forEach((function(t){t.release(),e.handles.delete(t)})),Rb(Pb(n.prototype),"release",this).call(this)}}]),n}(e);return t})));const iw=rw;class ow extends _y{constructor(e,t,n){super(e,t,n),this.type="modal",this.isEventListenerAdded=!1,this.handleShowModal=()=>{this.modal.attr("data-modal",!0).attr("class","cds--modal").attr("role","dialog").attr("aria-modal",!0).attr("aria-labelledby","modal-title").attr("aria-describedby","modal-description").attr("tabindex",-1),this.modal.html(this.getModalHTML()),this.modal.select("div.cds--modal-footer button.cds--btn").on("click",(()=>this.model.exportToCSV())),iw.create(this.modal.node()).show(),document.addEventListener("modal-hidden",this.handleHideModal)},this.handleHideModal=()=>{this.modal.attr("role",null).attr("aria-modal",null).attr("aria-labelledby",null).attr("aria-describedby",null).attr("tabindex",null),document.removeEventListener("modal-hidden",this.handleHideModal)},this.init()}addEventListeners(){this.services.events.addEventListener(R.Modal.SHOW,this.handleShowModal)}removeEventListeners(){this.services.events.removeEventListener(R.Modal.SHOW,this.handleShowModal)}getModalHTML(){const e=this.model.getOptions(),t=Um(e,"style","prefix"),n=this.model.getTabularDataArray();return`\n\t\t<div class="cds--modal-container cds--modal-container">\n\t\t\t<div class="cds--modal-header cds--modal-header">\n\t\t\t\t<p class="cds--modal-header__label cds--type-delta cds--modal-header__label cds--type-delta" id="modal-title">Tabular representation</p>\n\n\t\t\t\t<p class="cds--modal-header__heading cds--type-beta cds--modal-header__heading cds--type-beta" id="modal-description">${gb(e.title)}</p>\n\n\t\t\t\t<button class="cds--modal-close 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 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 cds--modal-content">\n\t\t\t\t<table class="cds--data-table cds--data-table--no-border 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${rh(n,0).map((e=>`<th scope="col">\n\t\t\t\t\t\t\t\t<div class="cds--table-header-label cds--table-header-label">${gb(e)}</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>${n.slice(1).map((e=>`\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t${e.map((e=>`<td>${gb(e)}</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 cds--modal-footer">\n\t\t\t <div class="${jp}--${t}-modal-footer-spacer"></div>\n\t\t\t <button class="cds--btn cds--btn--primary cds--btn cds--btn--primary" type="button" data-modal-primary-focus>Download as CSV</button>\n\t\t\t</div>\n\t\t</div>`}render(e=!1){const t=this.model.getOptions();if(!this.isEventListenerAdded){const e=sn(this.services.domUtils.getHolder()),n=Um(t,"style","prefix");this.modal=Mv.appendOrSelect(e,`div.${jp}--${n}--modal`),this.addEventListeners(),this.isEventListenerAdded=!0}}destroy(){this.removeEventListeners(),this.isEventListenerAdded=!1}}class aw extends _y{constructor(){super(...arguments),this.type="title",this.renderType=L.HTML}render(e=!1){const t=this.getComponentContainer(),n=Um(this.getOptions(),"title"),r=t.selectAll("p.title").data([n]);if(r.enter().append("p").classed("title",!0).attr("role","heading").attr("aria-level",2).merge(r).html((e=>gb(e))),r.node()&&r.node().offsetWidth<r.node().scrollWidth){const e=this;r.on("mouseover",(function(t){e.services.events.dispatchEvent(R.Tooltip.SHOW,{event:t,hoveredElement:r,content:r.text()})})).on("mousemove",(function(t){e.services.events.dispatchEvent(R.Tooltip.MOVE,{event:t})})).on("mouseout",(function(){e.services.events.dispatchEvent(R.Tooltip.HIDE)}))}r.exit().remove()}truncateTitle(e,t){if(t<=0)return;const n=e.text();if(e.node().getComputedTextLength()>t){e.append("tspan").text("...");const r=Mv.appendOrSelect(e,"tspan").node().getComputedTextLength(),i=e.text(),o=this.getSubstringIndex(e.node(),0,i.length-1,t-r);e.html(i.substring(0,o-1)).append("tspan").text("...");const a=this;e.on("mouseover",(function(t){a.services.events.dispatchEvent(R.Tooltip.SHOW,{event:t,hoveredElement:e,content:n})})).on("mousemove",(function(e){a.services.events.dispatchEvent(R.Tooltip.MOVE,{event:e})})).on("mouseout",(function(){a.services.events.dispatchEvent(R.Tooltip.HIDE)}))}}getMaxTitleWidth(){return Mv.getSVGElementSize(this.parent.node(),{useAttrs:!0}).width}getSubstringIndex(e,t,n,r){const i=Math.floor((n+t)/2);return e.getSubStringLength(0,i)>r?this.getSubstringIndex(e,t,i,r):e.getSubStringLength(0,i)<r?e.getSubStringLength(0,i+1)>r?i:this.getSubstringIndex(e,i,n,r):i}}class sw extends _y{constructor(){super(...arguments),this.type="legend",this.renderType=L.HTML}render(e=!1){const t=this.getOptions(),n=Um(t,"legend"),r=Um(n,"alignment"),i=Um(t,"legend","orientation");let o=this.model.getDataGroups();const{DISABLED:a}=Yp.items.status,s=o.some((e=>e.status===a)),l=Um(n,"order"),c=this.getComponentContainer().classed("center-aligned",r===H.CENTER).classed("right-aligned",r===H.RIGHT).classed(i,!0).classed("has-deactivated-items",s).attr("role",kg.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,(e=>e.name)),d=u.enter().append("div").attr("class","legend-item");d.merge(c.selectAll("div.legend-item")).classed("active",(function(e){return e.status===Yp.items.status.ACTIVE}));const h=Um(this.getOptions(),"legend","clickable");c.classed("clickable",h&&o.length>1);const f=Yp.checkbox.radius,p=d.append("div").classed("checkbox",!0),m=p.merge(u.select("div.checkbox")).attr("role",kg.CHECKBOX).attr("tabindex",h?0:-1).attr("aria-labelledby",((e,t)=>this.services.domUtils.generateElementIDString(`legend-datagroup-${t}-title`))).attr("aria-checked",(({status:e})=>e===Yp.items.status.ACTIVE)).attr("width",2*f).attr("height",2*f).attr("class",(e=>this.model.getColorClassName({classNameTypes:[I.BACKGROUND],dataGroupName:e.name,originalClassName:"checkbox"}))).style("background",(e=>e.status===Yp.items.status.ACTIVE?this.model.getFillColor(e.name)||this.model.getStrokeColor(e.name):null)).classed("active",(function(e){return e.status===Yp.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"),d.append("p").merge(u.select("p"));const g=Um(t,"legend","additionalItems");if(g&&o.length){const e=this,t=c.selectAll("div.additional-item").data(g);t.exit().remove();const n=t.enter().append("div").merge(t).classed("legend-item",!0).classed("additional",!0).attr("aria-labelledby",((e,t)=>this.services.domUtils.generateElementIDString(`legend-datagroup-${m.size()+t}-title`)));n.selectAll("*").remove();let r,i=1;n.append("svg").classed("icon",!0).each((function(t){const n=sn(this);r&&r==t.type?i++:(r=t.type,i=1),e.addAdditionalItem(n,t,i)})),n.append("p").merge(n.select("p")),this.truncateLegendText()}u.exit().on("mouseover",null).on("click",null).on("mouseout",null).remove(),h&&d.size()>1&&this.addEventListeners()}sortDataGroups(e,t){if(e.sort(((e,n)=>t.indexOf(e.name)-t.indexOf(n.name))),t.length<e.length){const n=e.length-t.length;return e.slice(n).concat(e.slice(0,n))}return e}addAdditionalItem(e,t,n){const{width:r,height:i}=Yp.area;if(t.type===te.RADIUS?e.style("width",`${i}px`).style("height",`${i}px`):e.style("width",`${r}px`).style("height",`${i}px`),t.type===te.RADIUS){const{iconData:n,fill:r,stroke:i}=Yp.radius;e.attr("fill","none").selectAll("circle").data(n).enter().append("circle").classed("radius",!0).attr("role",kg.IMG).attr("aria-label","radius").attr("cx",(e=>e.cx)).attr("cy",(e=>e.cy)).attr("r",(e=>e.r)).style("fill",t.fill?t.fill:r).style("stroke",t.stroke?t.stroke:i)}else if(t.type===te.LINE){const i=Yp.line;e.select("line.line").empty()&&e.append("line").classed(`line-${n}`,!0).attr("role",kg.IMG).attr("aria-label","line").attr("x1",0).attr("y1",i.yPosition).attr("x2",r).attr("y2",i.yPosition).style("stroke",t.stroke?t.stroke:i.stroke).style("stroke-width",i.strokeWidth)}else if(t.type===te.AREA)e.select("rect.area").empty()&&e.append("rect").classed(`area-${n}`,!0).attr("role",kg.IMG).attr("aria-label","area").attr("width",r).attr("height",i).style("fill",n>3&&!t.fill?Yp.area.fill:t.fill).style("stroke",t.stroke);else if(t.type===te.SIZE){const{iconData:n,fill:r,stroke:i}=Yp.size;e.attr("fill","none").attr("role",kg.IMG).attr("aria-label","size").selectAll("rect").data(n).enter().append("rect").classed("size",!0).attr("width",(e=>e.width)).attr("height",(e=>e.height)).attr("y",(()=>0)).style("fill",t.fill?t.fill:r).style("stroke",t.stroke?t.stroke:i).style("stroke-width",1)}else if(t.type===te.QUARTILE){const{iconData:t}=Yp.quartile;e.selectAll("rect").attr("role",kg.IMG).attr("aria-label","quartile").data(t).enter().append("rect").attr("class",((e,t)=>"quartile-"+(0===t?"wrapper":"line"))).attr("x",(e=>e.x)).attr("y",(e=>e.y)).attr("width",(e=>e.width)).attr("height",(e=>e.height))}else if(t.type===te.ZOOM){const{iconData:n,color:r}=Um(Yp,"zoom"),i=e.attr("role",kg.IMG).attr("aria-label","zoom").selectAll("g.icon").data(n).enter();i.append("g").attr("x",(e=>e.x)).attr("y",(e=>e.y)).attr("width",(e=>e.width)).attr("height",(e=>e.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",(()=>t.color?t.color:r)),i.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",(()=>t.color?t.color:r))}}truncateLegendText(){const e=this.getComponentContainer(),t=Um(this.getOptions(),"legend","truncation"),n=Um(t,"type"),r=Um(t,"threshold"),i=Um(t,"numCharacter"),o=e.selectAll("div.legend-item p");o.attr("id",(function(){return(this.parentNode.querySelector("div.checkbox")||this.parentNode).getAttribute("aria-labelledby")})),n!==B.NONE?o.html((function(e){const t=gb(e.name);return t.length>r&&t.length!==i?jm(t,n,i):t})):o.html((e=>gb(e.name)))}addEventListeners(){const e=this,t=this.getComponentContainer(),n=this.getOptions(),r=Um(n,"legend"),i=Um(r,"truncation");t.selectAll("div.legend-item").on("mouseover",(function(t){e.services.events.dispatchEvent(R.Legend.ITEM_HOVER,{hoveredElement:sn(this)});const n=sn(this);n.select("div.checkbox").classed("hovered",!0);const r=n.datum();r.name.length>i.threshold&&i.numCharacter<r.name.length&&i.type!==B.NONE&&e.services.events.dispatchEvent(R.Tooltip.SHOW,{event:t,hoveredElement:n,content:r.name})})).on("mousemove",(function(t){sn(this).datum().name.length>i.threshold&&i.type!==B.NONE&&e.services.events.dispatchEvent(R.Tooltip.MOVE,{event:t})})).on("click",(function(){e.services.events.dispatchEvent(R.Legend.ITEM_CLICK,{clickedElement:sn(this)});const t=sn(this).datum();e.model.toggleDataLabel(t.name)})).on("mouseout",(function(){const t=sn(this);t.select("div.checkbox").classed("hovered",!1),t.datum().name.length>i.threshold&&i.type!==B.NONE&&e.services.events.dispatchEvent(R.Tooltip.HIDE),e.services.events.dispatchEvent(R.Legend.ITEM_MOUSEOUT,{hoveredElement:t})})),t.selectAll("div.legend-item div.checkbox").on("keyup",(function(t){t.key&&"Tab"===t.key&&e.services.events.dispatchEvent(R.Legend.ITEM_HOVER,{hoveredElement:sn(this)})})),t.selectAll("div.legend-item div.checkbox").on("keydown",(function(t,n){t.key&&" "===t.key?(t.preventDefault(),e.model.toggleDataLabel(n.name)):t.key&&"Tab"===t.key&&e.services.events.dispatchEvent(R.Legend.ITEM_MOUSEOUT,{hoveredElement:sn(this)})})),t.selectAll("g.additional-item").on("mouseover",(function(t){const n=sn(this),r=n.datum();r.name.length>i.threshold&&e.services.events.dispatchEvent(R.Tooltip.SHOW,{event:t,hoveredElement:n,content:r.name})}))}}class lw extends _y{constructor(e,t,n){super(e,t,n),this.type="chart-clip",this.renderType=L.SVG,this.chartClipId="chart-clip-id-"+Math.floor(99999999999*Math.random()),this.init()}init(){this.model.set({chartClipId:this.chartClipId},{skipUpdate:!0})}render(e=!0){this.createClipPath()}createClipPath(){const e=this.parent,{cartesianScales:t}=this.services;if(!t)throw new Error("Service cartesianScales was undefined");const n=t.getMainXScale(),r=t.getMainYScale(),[i,o]=n.range(),[a,s]=r.range();if(!e)throw new Error("svg is undefined");this.chartClipPath=Mv.appendOrSelect(e,`clipPath.${this.type}`).attr("id",this.chartClipId);const l=Mv.appendOrSelect(this.chartClipPath,`rect.${this.type}`);o-i>0&&l.attr("x",i).attr("y",s).attr("width",o-i).attr("height",a-s),this.chartClipPath.merge(l).lower()}}class cw extends lw{constructor(){super(...arguments),this.type="canvas-chart-clip",this.chartClipId="canvas-chart-clip-id-"+Math.floor(99999999999*Math.random())}createClipPath(){const e=this.parent,{width:t,height:n}=Mv.getSVGElementSize(this.parent,{useAttrs:!0});this.chartClipPath=Mv.appendOrSelect(e,`clipPath.${this.type}`).attr("id",this.chartClipId);const r=Mv.appendOrSelect(this.chartClipPath,`rect.${this.type}`);r.attr("x",0).attr("y",0).attr("width",t).attr("height",n),this.chartClipPath.merge(r).lower()}}var uw,dw;!function(e){e.LEFT="left",e.RIGHT="right",e.TOP="top",e.BOTTOM="bottom"}(dw||(dw={}));var hw=((uw={})[dw.LEFT]=function(e,t,n){return{top:e.top-Math.round(t.offsetHeight/2)+Math.round(n.height/2),left:Math.round(e.left-t.offsetWidth)}},uw[dw.RIGHT]=function(e,t,n){return{top:e.top-Math.round(t.offsetHeight/2)+Math.round(n.height/2),left:Math.round(e.left+n.width)}},uw[dw.TOP]=function(e,t,n){return{top:Math.round(e.top-t.offsetHeight),left:e.left-Math.round(t.offsetWidth/2)+Math.round(n.width/2)}},uw[dw.BOTTOM]=function(e,t,n){return{top:Math.round(e.top+n.height),left:e.left-Math.round(t.offsetWidth/2)+Math.round(n.width/2)}},uw),fw=typeof window<"u"?window:{innerHeight:0,scrollY:0,innerWidth:0,scrollX:0},pw=function(){function e(e){void 0===e&&(e={}),this.positions=hw,this.positions=Object.assign({},hw,e)}return e.prototype.getRelativeOffset=function(e){for(var t={left:e.offsetLeft,top:e.offsetTop};e.offsetParent&&"static"===getComputedStyle(e.offsetParent).position;)t.left+=e.offsetLeft,t.top+=e.offsetTop,e=e.offsetParent;return t},e.prototype.getAbsoluteOffset=function(e){for(var t=e,n={top:0,left:0};t.offsetParent;){var r=getComputedStyle(t.offsetParent);"static"===r.position&&r.marginLeft&&r.marginTop&&(parseInt(r.marginTop,10)&&(n.top+=parseInt(r.marginTop,10)),parseInt(r.marginLeft,10)&&(n.left+=parseInt(r.marginLeft,10))),t=t.offsetParent}var i=e.getBoundingClientRect(),o=document.body.getBoundingClientRect();return{top:i.top-o.top+n.top,left:i.left-o.left+n.left}},e.prototype.findRelative=function(e,t,n){var r=this.getRelativeOffset(e),i=e.getBoundingClientRect();return this.calculatePosition(r,i,t,n)},e.prototype.findAbsolute=function(e,t,n){var r=this.getAbsoluteOffset(e),i=e.getBoundingClientRect();return this.calculatePosition(r,i,t,n)},e.prototype.findPosition=function(e,t,n,r){void 0===r&&(r=this.getAbsoluteOffset.bind(this));var i=r(e),o=e.getBoundingClientRect();return this.calculatePosition(i,o,t,n)},e.prototype.findPositionAt=function(e,t,n){return this.calculatePosition(e,{top:0,left:0,height:0,width:0},t,n)},e.prototype.getPlacementBox=function(e,t){var n=e.offsetHeight+t.top,r=e.offsetWidth+t.left;return{top:t.top,bottom:n,left:t.left,right:r}},e.prototype.addOffset=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=0),Object.assign({},e,{top:e.top+t,left:e.left+n})},e.prototype.setElement=function(e,t){e.style.top=t.top+"px",e.style.left=t.left+"px"},e.prototype.findBestPlacement=function(e,t,n,r,i){var o=this;void 0===r&&(r=this.defaultContainerFunction.bind(this)),void 0===i&&(i=this.findPosition.bind(this));var a=n.map((function(n){var a=i(e,t,n),s=o.getPlacementBox(t,a),l=0,c=0,u=r();s.top<u.top?l=u.top-s.top:s.bottom>u.height&&(l=s.bottom-u.height),s.left<u.left?c=u.left-s.left:s.right>u.width&&(c=s.right-u.width),l&&!c?c=1:c&&!l&&(l=1);var d=t.offsetHeight*t.offsetWidth;return{placement:n,weight:(d-l*c)/d}}));return a.sort((function(e,t){return t.weight-e.weight})),a[0].placement},e.prototype.findBestPlacementAt=function(e,t,n,r){var i=this;return void 0===r&&(r=this.defaultContainerFunction.bind(this)),this.findBestPlacement(null,t,n,r,(function(t,n,r){return i.findPositionAt(e,n,r)}))},e.prototype.defaultContainerFunction=function(){return{top:0,left:0,height:fw.innerHeight,width:fw.innerWidth}},e.prototype.calculatePosition=function(e,t,n,r){return this.positions[r]?this.positions[r](e,n,t):(console.error("No function found for placement, defaulting to 0,0"),{left:0,top:0})},e}();new pw;class mw extends _y{constructor(e,t,n){super(e,t,n),this.type="tooltip",this.renderType=L.HTML,this.isEventListenerAdded=!1,this.positionService=new pw,this.handleShowTooltip=e=>{const t=e.detail.data||e.detail.items;let n;const r=this.formatItems(this.getItems(e));n=e.detail.content?`<div class="title-tooltip"><p>${mb(e.detail.content)}</p></div>`:mb(this.getTooltipHTML(r));const i=Mv.appendOrSelect(this.tooltip,"div.content-box");if(Um(this.getOptions(),"tooltip","customHTML"))if(e.detail.content){const t=`<div class="title-tooltip"><p>${mb(e.detail.content)}</p></div>`;i.html(t)}else i.html(`<div class="title-tooltip"><p>${mb(this.model.getOptions().tooltip.customHTML(t,n))}</p></div>`);else i.html(n);i.selectAll(".datapoint-tooltip").each((function(e,t){const n=r[t];r[t]&&r[t].color&&sn(this).select(".tooltip-color").attr("class","tooltip-color").style("background-color",n.color)})),this.positionTooltip(e),this.tooltip.classed("hidden",!1).attr("aria-hidden",!1)},this.handleHideTooltip=()=>{this.tooltip.classed("hidden",!0).attr("aria-hidden",!0)},this.init()}addTooltipEventListener(){this.services.events.addEventListener(R.Tooltip.MOVE,(e=>{!1===this.tooltip.classed("hidden")&&this.positionTooltip(e)})),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)}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)}getItems(e){return e.detail.items?e.detail.items:[]}formatItems(e){const t=this.getOptions(),n=Um(t,"tooltip","truncation","type"),r=Um(t,"tooltip","truncation","threshold"),i=Um(t,"tooltip","truncation","numCharacter");return n!==B.NONE?e.map((e=>{const t=e.labelIcon?12:0;return e.value=e.value?this.valueFormatter(e.value,e.label):e.value,e.label&&e.label.length+t>r&&(e.label=jm(e.label,n,i)),e.value&&e.value.length>r&&(e.value=jm(e.value,n,i)),e})):e.map((e=>(e.value=e.value?this.valueFormatter(e.value,e.label):e.value,e)))}getTooltipHTML(e){return'<ul class="multi-tooltip">'+e.map((e=>`<li>\n\t\t\t\t\t<div class="datapoint-tooltip${e.bold?" bold":""}">\n\t\t\t\t\t\t${e.class||e.color?`<div class="tooltip-color ${e.class}"></div>`:""}\n\t\t\t\t\t\t<div class="label">\n\t\t\t\t\t\t<p>${e.label||""}</p>\n\t\t\t\t\t\t${e.labelIcon?`<span class="label-icon"/>${e.labelIcon}</span>`:""}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t${void 0===e.value||null===e.value?"":`<p class="value"/>${e.value}</p>`}\n\t\t\t\t\t</div>\n\t\t\t\t</li>`)).join("")+"</ul>"}valueFormatter(e,t){const n=this.getOptions(),r=Um(n,"tooltip","valueFormatter");if(r)return r(e,t);if("function"==typeof e.getTime)return bg(e,"MMM d, yyyy");try{if("string"==typeof e&&/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/.test(e))return bg(Date.parse(e),"MMM d, yyyy")}catch{}return e.toLocaleString()}render(e=!1){const t=this.getOptions(),n=Um(t,"tooltip","enabled");if(n){const e=sn(this.services.domUtils.getHolder()),n=Um(t,"style","prefix");this.tooltip=Mv.appendOrSelect(e,`div.${jp}--${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)}positionTooltip(e){const t=this.services.domUtils.getHolder(),n=this.tooltip.node(),r=this.getOptions(),i=Um(r,"zoomBar","top","enabled");let o=Um(e,"detail","mousePosition");if(o){const e=Um(r,"zoomBar","top","type"),t=tm.height[e];i&&(o[1]+=t+tm.spacerHeight)}else o=ln(Um(e,"detail","event"),t);const a=t.offsetWidth,s=t.offsetHeight;let l;l=o[0]/a>.9?dw.LEFT:o[0]/a<.1?dw.RIGHT:this.positionService.findBestPlacementAt({left:o[0],top:o[1]},n,[dw.RIGHT,dw.LEFT,dw.TOP,dw.BOTTOM],(()=>({top:void 0,left:void 0,width:a,height:s})));let{horizontalOffset:c}=Jp;l===dw.LEFT&&(c*=-1);const u=this.positionService.findPositionAt({left:o[0]+c,top:o[1]},n,l);this.positionService.setElement(n,u)}}const gw=class e extends _y{constructor(){super(...arguments),this.type="grid-brush",this.renderType=L.SVG,this.selectionSelector="rect.selection",this.frontSelectionSelector="rect.frontSelection"}render(t=!0){const n=this.parent,r=this.getComponentContainer();if(!n)throw new Error("SVG was not defined");const i=Mv.appendOrSelect(n,"svg.chart-grid-backdrop"),o=Mv.appendOrSelect(i,`g.${this.type}`),a=Mv.appendOrSelect(o,this.selectionSelector),{width:s,height:l}=Mv.getSVGElementSize(i,{useAttrs:!0}),{cartesianScales:c}=this.services,u=c.getMainXScaleType(),d=c.getMainXScale(),[h]=d.range();r.attr("transform",`translate(${h},0)`);const f=Mv.appendOrSelect(r,this.frontSelectionSelector);if(d&&u===F.TIME){let t=this.model.get("zoomDomain");void 0===t&&(t=this.services.zoom.getDefaultZoomBarDomain(),t&&this.model.set({zoomDomain:t},{animate:!1}));const n=t=>{const n=t[1]-t[0];let r="0,"+n.toString();const i=Math.floor(l/e.DASH_LENGTH),o=i*e.DASH_LENGTH;for(let t=0;t<i;t++)r+=","+e.DASH_LENGTH;r+=","+(l-o),i%2==1&&(r+=",0"),r+=","+n.toString(),r+=","+l.toString(),f.attr("stroke-dasharray",r)},r=e=>{const t=e.selection;null===t||t[0]===t[1]||(f.attr("x",parseFloat(a.attr("x"))+parseFloat(i.attr("x"))).attr("y",a.attr("y")).attr("width",a.attr("width")).attr("height",a.attr("height")).style("cursor","pointer").style("display",null),n(t))},c=(e,n)=>{const r=cl().range([0,s]).domain(t);let i=[r.invert(e),r.invert(n)];i[0].valueOf()===i[1].valueOf()&&(i=this.services.zoom.getDefaultZoomBarDomain()),(t[0].valueOf()!==i[0].valueOf()||t[1].valueOf()!==i[1].valueOf())&&this.services.zoom.handleDomainChange(i)};let u;const d=e=>{const t=e.selection;null!==t&&(c(t[0],t[1]),o.call(u.move,null),f.style("display","none"))};0!=l&&0!=s&&(u=zi().extent([[0,0],[s-1,l]]).on("start brush end",r).on("end.brushed",d),o.call(u));const h=this.services.zoom.getZoomRatio();i.on("click",(function(e){if(e.shiftKey){const e=this.services.domUtils.getHolder(),t=ln(o.node(),e)[0];let n=t-s*h/2;n<0&&(n=0);let r=t+s*h/2;r>s&&(r=s),c(n,r)}}))}}};gw.DASH_LENGTH=4;let vw=gw;class yw extends _y{constructor(){super(...arguments),this.type="zoom-bar",this.renderType=L.SVG,this.MIN_SELECTION_DIFF=9e-10,this.brushSelector="g.zoom-bar-brush",this.clipId="zoomBarClip-"+Math.floor(99999999999*Math.random()),this.brush=zi(),this.highlightStrokeWidth=1}init(){this.services.events.addEventListener(R.ZoomBar.UPDATE,this.render.bind(this));const e=Um(this.getOptions(),"zoomBar",$.TOP,"data");this.model.setZoomBarData(e)}render(e=!0){const t=this.getComponentContainer(),n=this.services.zoom.isZoomBarLoading($.TOP),r=this.services.zoom.isZoomBarLocked($.TOP),i=Um(this.getOptions(),"zoomBar",$.TOP,"type"),o=Um(this.getOptions(),"axes",$.BOTTOM,"highlights"),a=tm.height[i],{width:s}=Mv.getSVGElementSize(this.parent,{useAttrs:!0});if(0===s)return;let l=0;const c=this.model.get("axesMargins");c&&c.left&&(l=c.left);const u=Mv.appendOrSelect(t,"svg.zoom-container").attr("width","100%").attr("height",a).attr("opacity",1);if(Mv.appendOrSelect(t,"rect.zoom-spacer").attr("x",0).attr("y",a).attr("width","100%").attr("height",tm.spacerHeight).attr("opacity",1).attr("fill","none"),i===z.GRAPH_VIEW?Mv.appendOrSelect(u,"rect.zoom-bg").attr("x",l).attr("y",0).attr("width",s-l).attr("height","100%").classed("zoom-bg-skeleton",n).style("stroke",n?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null):i===z.SLIDER_VIEW&&Mv.appendOrSelect(u,"rect.zoom-slider-bg").attr("x",l).attr("y",a/2-1).attr("width",s-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,s);const{cartesianScales:d}=this.services,h=d.getMainXScale(),f=d.getMainYScale(),p=d.getMainXScaleType();if(h&&p===F.TIME){let e=this.services.zoom.getZoomBarData();if(function(e){if(null==e)return!0;if(nd(e)&&(su(e)||"string"==typeof e||"function"==typeof e.splice||md(e)||Sd(e)||dd(e)))return!e.length;var t=Zh(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(od(e))return!Md(e).length;for(var n in e)if(Mp.call(e,n))return!1;return!0}(e)||1===e.length)return;this.xScale=h.copy(),this.yScale=f.copy();const n=this.services.zoom.getDefaultZoomBarDomain(e);e=this.compensateDataForDefaultDomain(e,n);const c=this.model.get("initialZoomDomain"),d=Um(this.getOptions(),"zoomBar",$.TOP,"initialZoomDomain");d&&d[0]&&d[1]&&(d[0]=new Date(d[0]),d[1]=new Date(d[1])),!d||c&&c[0].valueOf()===d[0].valueOf()&&c[1].valueOf()===d[1].valueOf()?null===d&&null!==c&&this.model.set({initialZoomDomain:null,zoomDomain:Dp([],n)},{skipUpdate:!0}):this.model.set({initialZoomDomain:Dp([],d),zoomDomain:d?Dp([],d):n},{skipUpdate:!0}),this.xScale.range([l,s]).domain(n),this.maxSelectionRange=this.xScale.range(),this.yScale.range([0,a-6]).domain(de(e,(e=>e.value)));const p=this.model.get("zoomDomain");if(i===z.GRAPH_VIEW&&(this.renderZoomBarArea(u,"path.zoom-graph-area-unselected",e,null),this.updateClipPath(t,this.clipId,0,0,0,0),this.renderZoomBarArea(u,"path.zoom-graph-area",e,this.clipId),this.renderZoomBarBaseline(u,l,s),o)){const e=o.highlightStartMapsTo,t=o.highlightEndMapsTo,n=o.color,r=o.labelMapsTo;o.data.forEach(((i,o)=>{Mv.appendOrSelect(u,`rect.highlight-${o}`).attr("height",a-2*this.highlightStrokeWidth).attr("y",this.highlightStrokeWidth).attr("x",this.xScale(i[e])).attr("width",this.xScale(i[t])-this.xScale(i[e])).style("fill",n&&n.scale[i[r]]?n.scale[i[r]]:null).style("fill-opacity",.1).style("stroke",n&&n.scale[i[r]]?n.scale[i[r]]:null).style("stroke-dasharray","2, 2").attr("stroke-width","1px")}))}this.addBrushEventListener(p,l,s);const m=Mv.appendOrSelect(t,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 e=p.map((e=>this.xScale(e)));e[1]-e[0]<this.MIN_SELECTION_DIFF||(m.call(this.brush.move,e),this.updateBrushHandle(this.getComponentContainer(),e))}r&&(this.brush.filter((()=>!1)),m.selectAll("rect").attr("cursor","auto"))}}addBrushEventListener(e,t,n){const r=Um(this.getOptions(),"zoomBar",$.TOP,"type"),i=tm.height[r];this.brush.extent([[t,0],[n,i]]).on("start brush end",null).on("start brush end",(t=>{const n=t.selection;null===n?this.handleBrushedEvent(t,e,this.xScale,this.xScale.range()):n[0]===n[1]||this.handleBrushedEvent(t,e,this.xScale,n)}))}handleBrushedEvent(e,t,n,r){const i=[n.invert(r[0]),n.invert(r[1])];if(this.updateBrushHandle(this.getComponentContainer(),r),null!=e.sourceEvent&&("mousemove"===e.sourceEvent.type||"mouseup"===e.sourceEvent.type||"mousedown"===e.sourceEvent.type||"touchstart"===e.sourceEvent.type||"touchmove"===e.sourceEvent.type||"touchend"===e.sourceEvent.type)){let n;(void 0===t||t[0]!==i[0]||t[1]!==i[1])&&this.services.zoom.handleDomainChange(i,{dispatchEvent:!1}),"start"===e.type?n=R.ZoomBar.SELECTION_START:"brush"===e.type?n=R.ZoomBar.SELECTION_IN_PROGRESS:"end"===e.type&&(n=R.ZoomBar.SELECTION_END,this.services.events.dispatchEvent(R.ZoomDomain.CHANGE,{newDomain:i})),this.services.events.dispatchEvent(n,{selection:r,newDomain:i})}}updateBrushHandle(e,t){const n=this,r=tm.handleWidth,i=Um(this.getOptions(),"zoomBar",$.TOP,"type"),o=tm.height[i],a=-r/2,s=tm.handleBarWidth,l=i===z.GRAPH_VIEW?tm.handleBarHeight:6,c=-s/2,u=(o-l)/2;e.select(this.brushSelector).selectAll("rect.handle").data([{type:"w"},{type:"e"}]).attr("x",(function(e){return"w"===e.type?Math.max(t[0]+a,n.maxSelectionRange[0]):"e"===e.type?Math.min(t[1]+a,n.maxSelectionRange[1]-r):void 0})).attr("y",0).attr("width",r).attr("height",o).attr("cursor","ew-resize").style("display",null);const d=e.select(this.brushSelector).selectAll("rect.handle-bar").data([{type:"w"},{type:"e"}]);d.enter().append("rect").attr("class",(function(e){return"handle-bar handle-bar--"+e.type})),d.attr("x",(function(e){return"w"===e.type?Math.max(t[0]+c,n.maxSelectionRange[0]-a+c):"e"===e.type?Math.min(t[1]+c,n.maxSelectionRange[1]+a+c):void 0})).attr("y",u).attr("width",s).attr("height",l).attr("cursor","ew-resize"),i===z.SLIDER_VIEW&&this.updateSliderSelectedArea(t),this.updateClipPath(e,this.clipId,t[0],0,t[1]-t[0],o)}updateSliderSelectedArea(e){const t=Um(this.getOptions(),"zoomBar",$.TOP,"type"),n=tm.height[t],r=this.getComponentContainer().select("svg.zoom-container");Mv.appendOrSelect(r,"rect.zoom-slider-selected-area").attr("x",e[0]).attr("y",n/2-1).attr("width",e[1]-e[0]).attr("height",2)}renderZoomBarArea(e,t,n,r){const{cartesianScales:i}=this.services,o=i.getMainXAxisPosition(),a=i.getMainYAxisPosition(),s=i.getMainXScaleType(),l=i.getMainYScaleType(),c=(e,t,n)=>r=>i.getValueFromScale(e,t,n,r),u=c(this.xScale,s,o),d=c(this.yScale,l,a),h=Um(this.getOptions(),"zoomBar",$.TOP,"type"),f=tm.height[h],p=Il().x((e=>u(e))).y0(f).y1((e=>f-d(e))),m=Mv.appendOrSelect(e,t).datum(n).attr("d",p);r&&m.attr("clip-path",`url(#${r})`)}updateClipPath(e,t,n,r,i,o){const a=Mv.appendOrSelect(e,"clipPath").attr("id",t);Mv.appendOrSelect(a,"rect").attr("x",n).attr("y",r).attr("width",i).attr("height",o)}compensateDataForDefaultDomain(e,t){if(!e||e.length<2)return;const n=$f(e),r=this.services.cartesianScales.getDomainIdentifier(),i=this.services.cartesianScales.getRangeIdentifier();if(Number(t[0])<Number(n[0][r])){const e={};e[r]=t[0],e[i]=0,n.unshift(e)}if(Number(t[1])>Number(n[n.length-1][r])){const e={};e[r]=t[1],e[i]=0,n.push(e)}return n}renderZoomBarBaseline(e,t,n,r=!1){const i=Um(this.model.getOptions(),"zoomBar",$.TOP,"type"),o=tm.height[i],a=Pl()([[t,o],[n,o]]);Mv.appendOrSelect(e,"path.zoom-bg-baseline").attr("d",a).classed("zoom-bg-baseline-skeleton",r).style("stroke",r?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}renderSkeleton(e,t,n){this.renderZoomBarArea(e,"path.zoom-graph-area-unselected",[],null),this.renderZoomBarArea(e,"path.zoom-graph-area",[],this.clipId),this.brush.on("start brush end",null),Mv.appendOrSelect(this.getComponentContainer(),this.brushSelector).html(null),Um(this.getOptions(),"zoomBar",$.TOP,"type")===z.GRAPH_VIEW&&this.renderZoomBarBaseline(e,t,n,!0)}destroy(){this.brush.on("start brush end",null),this.services.events.removeEventListener(R.ZoomBar.UPDATE,this.render.bind(this))}}class bw extends _y{constructor(e,t){super(e,t),this.type="threshold",this.renderType=L.SVG,this.positionService=new pw}render(e=!1){const t=Um(this.getOptions(),"axes"),n=[];Object.keys(t).forEach((e=>{if(Object.values($).includes(e)){const r=t[e];r.thresholds&&r.thresholds.length>0&&n.push({axisPosition:e,thresholds:r.thresholds,correspondingDatasets:null==r?void 0:r.correspondingDatasets,mapsTo:null==r?void 0:r.mapsTo})}}));const r=this.getComponentContainer({withinChartClip:!0}).selectAll("g.axis-thresholds").data(n,(e=>e.axisPosition));r.exit().attr("opacity",0).remove();const i=r.enter().append("g").merge(r);i.attr("class",(e=>`axis-thresholds ${e.axisPosition}`));const o=i.selectAll("g.threshold-group").data((e=>e.thresholds.map((t=>(t.axisPosition=e.axisPosition,t.datum=this.constructDatumObj(e,t),t)))));o.exit().attr("opacity",0).remove();const a=o.enter().append("g");a.append("line").attr("class","threshold-line"),a.append("rect").attr("class","threshold-hoverable-area"),a.merge(o).attr("class","threshold-group");const s=this;i.each((function({axisPosition:t}){const n=s.services.cartesianScales.getScaleByPosition(t),r=s.services.cartesianScales.getScaleTypeByPosition(t);let i=null,o=null;t===$.LEFT||t===$.RIGHT?(o=n,i=s.services.cartesianScales.getMainXScale()):(i=n,o=s.services.cartesianScales.getMainYScale());const a=r===F.LABELS,[l,c]=i.range(),[u,d]=o.range(),{cartesianScales:h}=s.services,f=h.getOrientation(),[p,m]=Vm((e=>h.getDomainValue(e)),(e=>h.getRangeValue(e)),f),g=sn(this);t===$.TOP||t===$.BOTTOM?(g.selectAll("line.threshold-line").transition().call((t=>s.services.transitions.setupTransition({transition:t,name:"threshold-line-update",animate:e}))).attr("y1",d).attr("y2",u).attr("x1",(({datum:e})=>p(e)+(a?n.step()/2:0))).attr("x2",(({datum:e})=>p(e)+(a?n.step()/2:0))).style("stroke",(({fillColor:e})=>e)),g.selectAll("rect.threshold-hoverable-area").attr("x",0).attr("y",(({datum:e})=>-p(e))).attr("width",Math.abs(u-d)).classed("rotate",!0)):(g.selectAll("line.threshold-line").transition().call((t=>s.services.transitions.setupTransition({transition:t,name:"threshold-line-update",animate:e}))).attr("x1",l).attr("x2",c).attr("y1",(({datum:e})=>m(e)+(a?n.step()/2:0))).attr("y2",(({datum:e})=>m(e)+(a?n.step()/2:0))).style("stroke",(({fillColor:e})=>e)),g.selectAll("rect.threshold-hoverable-area").attr("x",l).attr("y",(({datum:e})=>m(e))).attr("width",Math.abs(c-l)).classed("rotate",!1))})),this.services.events.addEventListener(R.Threshold.SHOW,(e=>{this.setThresholdLabelPosition(e.detail),this.label.classed("hidden",!1)})),this.services.events.addEventListener(R.Threshold.HIDE,(()=>{this.label.classed("hidden",!0)})),this.appendThresholdLabel(),this.addEventListeners()}getFormattedValue(e){const{value:t,axisPosition:n}=e,r=this.getOptions();if(this.services.cartesianScales.getScaleTypeByPosition(n)===F.TIME){const e=[$.LEFT,$.RIGHT].includes(n),i=this.services.cartesianScales.getMainXScale(),o=this.services.cartesianScales.getMainYScale(),a=e?o:i,s=Um(r,"timeScale"),l=Tg(a.ticks(),Um(s,"timeInterval"));return xg(t,0,a.ticks(),l,s)}return t.toLocaleString("en")}appendThresholdLabel(){const e=sn(this.services.domUtils.getHolder()),t=Um(this.getOptions(),"style","prefix");this.label=Mv.appendOrSelect(e,`div.${jp}--${t}--threshold--label`).classed("hidden",!0)}setThresholdLabelPosition({event:e,datum:t}){const n=this.services.domUtils.getHolder(),r=ln(e,n),i=t.valueFormatter?t.valueFormatter(t.value):this.getFormattedValue(t);this.label.html(gb(`${t.label||"Threshold"}: ${i}`)).style("background-color",t.fillColor);const o=this.label.node(),a=this.positionService.findBestPlacementAt({left:r[0],top:r[1]},o,[dw.RIGHT,dw.LEFT,dw.TOP,dw.BOTTOM],(()=>({top:void 0,left:void 0,width:n.offsetWidth,height:n.offsetHeight}))),s=this.positionService.findPositionAt({left:r[0],top:r[1]},o,a);this.positionService.setElement(o,s)}constructDatumObj(e,t){const n={};return e.correspondingDatasets&&(n.group=Um(e,"correspondingDatasets",0)),n[e.mapsTo]=t.value,n}addEventListeners(){const e=this;this.getComponentContainer({withinChartClip:!0}).selectAll("rect.threshold-hoverable-area").on("mouseover mousemove",(function(t){sn(this.parentNode).select("line.threshold-line").classed("active",!0),e.services.events.dispatchEvent(R.Threshold.SHOW,{event:t,hoveredElement:sn(this),datum:sn(this).datum()})})).on("mouseout",(function(t){sn(this.parentNode).select("line.threshold-line").classed("active",!1),e.services.events.dispatchEvent(R.Threshold.HIDE,{event:t,hoveredElement:sn(this),datum:sn(this).datum()})}))}}class ww extends _y{constructor(e,t){super(e,t),this.type="highlight",this.renderType=L.SVG,this.positionService=new pw,this.highlightStrokeWidth=1}render(e=!1){const t=Um(this.getOptions(),"axes"),n=[];Object.keys(t).forEach((e=>{if(Object.values($).includes(e)){const r=t[e];r.highlights&&r.highlights.data.length>0&&n.push({axisPosition:e,highlightStartMapsTo:r.highlights.highlightStartMapsTo,highlightEndMapsTo:r.highlights.highlightEndMapsTo,labelMapsTo:r.highlights.labelMapsTo,highlight:r.highlights.data,color:r.highlights.color})}}));const r=this.getComponentContainer({withinChartClip:!0}).selectAll("g.axis-highlight").data(n,(e=>e.axisPosition));r.exit().attr("opacity",0).remove();const i=r.enter().append("g").merge(r);i.attr("class",(e=>`axis-highlight ${e.axisPosition}`));const o=i.selectAll("g.highlight-group").data((e=>e.highlight.map((t=>(t.axisPosition=e.axisPosition,t.highlightStartMapsTo=e.highlightStartMapsTo,t.labelMapsTo=e.labelMapsTo,t.color=e.color,t.highlightEndMapsTo=e.highlightEndMapsTo,t)))));o.exit().attr("opacity",0).remove();const a=o.enter().append("g");a.append("rect").attr("class","highlight-bar"),a.append("line").attr("class","highlight-line"),a.merge(o).attr("class","highlight-group");const s=this;i.each((function({axisPosition:t}){const n=s.services.cartesianScales.getMainXScale(),r=s.services.cartesianScales.getMainYScale(),[i,o]=n.range(),[a,l]=r.range(),{cartesianScales:c}=s.services,u=c.getOrientation(),[d,h]=Vm((e=>c.getDomainValue(e)),(e=>c.getRangeValue(e)),u),f=sn(this);t===$.TOP||t===$.BOTTOM?f.selectAll("rect.highlight-bar").transition().call((t=>s.services.transitions.setupTransition({transition:t,name:"highlight-bar-update",animate:e}))).attr("y",Math.max(l+s.highlightStrokeWidth,0)).attr("height",Math.max(a-2*s.highlightStrokeWidth,0)).attr("x",(({highlightStartMapsTo:e,...t})=>d(t[e]))).attr("width",(({highlightStartMapsTo:e,highlightEndMapsTo:t,...n})=>Math.max(d(n[t])-d(n[e]),0))).style("stroke",(({color:e,labelMapsTo:t,...n})=>e&&e.scale[n[t]]?e.scale[n[t]]:null)).style("stroke-dasharray","2, 2").attr("stroke-width",s.highlightStrokeWidth+"px").style("fill-opacity",.1).style("fill",(({color:e,labelMapsTo:t,...n})=>e&&e.scale[n[t]]?e.scale[n[t]]:null)):f.selectAll("rect.highlight-bar").transition().call((t=>s.services.transitions.setupTransition({transition:t,name:"highlight-bar-update",animate:e}))).attr("x",i).attr("width",Math.max(o-i,0)).attr("y",(({highlightEndMapsTo:e,...t})=>h(t[e]))).attr("height",(({highlightStartMapsTo:e,highlightEndMapsTo:t,...n})=>Math.max(h(n[e])-h(n[t]),0))).style("stroke",(({color:e,labelMapsTo:t,...n})=>e&&e.scale[n[t]]?e.scale[n[t]]:null)).style("stroke-dasharray","2, 2").attr("stroke-width",s.highlightStrokeWidth+"px").style("fill-opacity",.1).style("fill",(({color:e,labelMapsTo:t,...n})=>e&&e.scale[n[t]]?e.scale[n[t]]:null))}))}}class _w extends mw{getItems(e){if(e.detail.items)return e.detail.items;const{data:t}=e.detail;if(!t||!t.length||!t[0])return[];const n=this.getOptions(),{cartesianScales:r}=this.services,i=r.getDomainIdentifier(),o=r.isDualAxes(),{groupMapsTo:a}=n.data,s=r.getDomainLabel();let l=r.getRangeLabel();const c=t[0][i];let u;if(1===t.length){const i=t[0],d=r.getRangeIdentifier(i);if(o){const e=r.getRangeAxisPosition({datum:i,groups:[i[a]]});l=r.getScaleLabel(e)}const h=i[d];u=[{label:s,value:c},...Array.isArray(h)&&2===h.length?[{label:"Start",value:h[0]},{label:"End",value:h[1]}]:[{label:l,value:i[d]}]],e.detail.additionalItems&&e.detail.additionalItems.forEach((e=>u.push({label:e.label,value:e.value}))),u.push({label:n.tooltip.groupLabel,value:i[a],color:this.model.getFillColor(i[a]),class:this.model.getColorClassName({classNameTypes:[I.TOOLTIP],dataGroupName:i[a]})})}else if(t.length>1&&(u=[{label:s,value:c}],u=u.concat(t.map((e=>{const t=e[r.getRangeIdentifier(e)];return{label:e[a],value:Array.isArray(t)&&2===t.length?`${t[0]} - ${t[1]}`:t,color:this.model.getFillColor(e[a]),class:this.model.getColorClassName({classNameTypes:[I.TOOLTIP],dataGroupName:e[a]})}})).sort(((e,t)=>t.value-e.value))),!o&&!0===Um(n,"tooltip","showTotal"))){const e=r.getRangeIdentifier();u.push({label:rh(n,"tooltip.totalLabel")||"Total",value:t.reduce(((t,n)=>t+n[e]),0),bold:!0})}return u}}class Ew extends _y{constructor(){super(...arguments),this.type="grid",this.renderType=L.SVG}render(e=!0){const t=Um(this.getOptions(),"grid","x","enabled"),n=Um(this.getOptions(),"grid","y","enabled");this.drawBackdrop(t,n),(t||n)&&(t&&(Mv.appendOrSelect(this.backdrop,"g.x.grid"),this.drawXGrid(e)),n&&(Mv.appendOrSelect(this.backdrop,"g.y.grid"),this.drawYGrid(e)))}drawXGrid(e){const t=this.parent,n=this.backdrop.attr("height"),r=Ue(this.services.cartesianScales.getMainXScale()).tickSizeInner(-n).tickSizeOuter(0);if(Um(this.getOptions(),"grid","x","alignWithAxisTicks")){const e=this.services.cartesianScales.getDomainAxisPosition(),t=Um(this.getOptions(),"axes",e,"ticks","values");t&&r.tickValues(t)}else{const e=Um(this.getOptions(),"grid","x","numberOfTicks");r.ticks(e)}const i=t.select(".x.grid").attr("transform",`translate(${-this.backdrop.attr("x")}, ${n})`);e?i.transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"grid-update",animate:e}))).call(r):i.call(r),this.cleanGrid(i)}drawYGrid(e){const t=this.parent,n=this.backdrop.attr("width"),r=He(this.services.cartesianScales.getMainYScale()).tickSizeInner(-n).tickSizeOuter(0);if(Um(this.getOptions(),"grid","y","alignWithAxisTicks")){const e=this.services.cartesianScales.getRangeAxisPosition(),t=Um(this.getOptions(),"axes",e,"ticks","values");t&&r.tickValues(t)}else{const e=Um(this.getOptions(),"grid","y","numberOfTicks");r.ticks(e)}const i=t.select(".y.grid").attr("transform",`translate(0, ${-this.backdrop.attr("y")})`);e?i.transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"grid-update",animate:e}))).call(r):i.call(r),this.cleanGrid(i)}getGridlineThreshold(e){const t=this.parent,n=t.selectAll(".x.grid .tick").nodes().sort(((e,t)=>Number(Bm(e).tx)-Number(Bm(t).tx)));let r=-1;if(!n.length)return;n.forEach((t=>{e[0]>=+Bm(t).tx&&r++}));const i=r+1<n.length?r+1:n.length,o=n[r],a=n[i];let s;if(o)if(a)s=+Bm(a).tx-+Bm(o).tx;else{const e=t.select("rect.chart-grid-backdrop").node();s=Mv.getSVGElementSize(e).width-+Bm(o).tx}else s=+Bm(a).tx;const{threshold:l}=this.getOptions().tooltip.gridline;return s*l}getActiveGridline(e){const t=Um(this.getOptions,"tooltip","gridline","threshold")||this.getGridlineThreshold(e);return this.parent.selectAll(".x.grid .tick").filter((function(){const n=Bm(this),r=Number(n.tx)-t,i=Number(n.tx)+t;return r<=e[0]&&e[0]<=i}))}drawBackdrop(e,t){const n=this.parent,r=this.services.cartesianScales.getMainXScale(),i=this.services.cartesianScales.getMainYScale(),[o,a]=r.range(),[s,l]=i.range();this.backdrop=Mv.appendOrSelect(n,"svg.chart-grid-backdrop");const c=Mv.appendOrSelect(this.backdrop,e||t?"rect.chart-grid-backdrop.stroked":"rect.chart-grid-backdrop");this.backdrop.merge(c).attr("x",o).attr("y",l).attr("width",Math.abs(a-o)).attr("height",Math.abs(s-l)).lower(),c.attr("width","100%").attr("height","100%")}cleanGrid(e){e.selectAll("text").remove(),e.select(".domain").remove()}}class xw extends _y{constructor(){super(...arguments),this.type="line",this.renderType=L.SVG,this.handleLegendOnHover=e=>{const{hoveredElement:t}=e.detail;this.parent.selectAll("path.line").transition("legend-hover-line").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-hover-line"}))).attr("opacity",(e=>e.name!==t.datum().name?Kp:Xp))},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.line").transition("legend-mouseout-line").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-mouseout-line"}))).attr("opacity",Xp)}}init(){const{events:e}=this.services;e.addEventListener(R.Legend.ITEM_HOVER,this.handleLegendOnHover),e.addEventListener(R.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(e=!0){const t=this.getComponentContainer({withinChartClip:!0}),{cartesianScales:n,curves:r}=this.services,[i,o]=Vm((e=>n.getDomainValue(e)),(e=>n.getRangeValue(e)),n.getOrientation()),a=this.getOptions(),s=Pl().x(i).y(o).curve(r.getD3Curve()).defined((e=>null!=e[n.getRangeIdentifier(e)]));let l=[];if(this.configs.stacked){const e=Object.keys(a.axes).some((e=>a.axes[e].percentage)),{groupMapsTo:t}=a.data;l=this.model.getStackedData({groups:this.configs.groups,percentage:e}).map((e=>{const n=this.services.cartesianScales.getDomainIdentifier(e),r=this.services.cartesianScales.getRangeIdentifier(e);return{name:Um(e,0,t),data:e.map((e=>({[n]:e.data.sharedStackKey,[t]:e[t],[r]:e[1]}))),hidden:!wy(e,(e=>e[0]!==e[1]))}}))}else l=this.model.getGroupedData(this.configs.groups);const c=t.selectAll("path.line").data(l,(e=>e.name));c.exit().attr("opacity",0).remove(),c.enter().append("path").classed("line",!0).attr("opacity",0).merge(c).data(l,(e=>e.name)).attr("class",(e=>this.model.getColorClassName({classNameTypes:[I.STROKE],dataGroupName:e.name,originalClassName:"line"}))).style("stroke",(e=>this.model.getStrokeColor(e.name))).attr("role",kg.GRAPHICS_SYMBOL).attr("aria-roledescription","line").attr("aria-label",(e=>{const{data:t}=e;return t.map((e=>e[this.services.cartesianScales.getRangeIdentifier(e)])).join(",")})).transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"line-update-enter",animate:e}))).attr("opacity",(e=>e.hidden?0:1)).attr("d",(e=>{const{data:t}=e;return s(t)}))}destroy(){const e=this.services.events;e.removeEventListener(R.Legend.ITEM_HOVER,this.handleLegendOnHover),e.removeEventListener(R.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}}class Sw extends _y{constructor(){super(...arguments),this.type="ruler",this.renderType=L.SVG,this.isXGridEnabled=Um(this.getOptions(),"grid","x","enabled"),this.isYGridEnabled=Um(this.getOptions(),"grid","y","enabled"),this.isEventListenerAdded=!1}render(e=!1){const t=Um(this.getOptions(),"ruler","enabled");this.drawBackdrop(),t&&!this.isEventListenerAdded?this.addBackdropEventListeners():!t&&this.isEventListenerAdded&&this.removeBackdropEventListeners()}removeBackdropEventListeners(){this.isEventListenerAdded=!1,this.backdrop.on("mousemove mouseover mouseout",null)}formatTooltipData(e){return e}showRuler(e,[t,n]){const r=this.parent,i=this.services.cartesianScales.getOrientation(),o=this.model.getDisplayData(),a=this.services.cartesianScales.getRangeScale(),[s,l]=a.range(),c=i===j.HORIZONTAL?n:t,u=Mv.appendOrSelect(r,"g.ruler").attr("aria-label","ruler"),d=Mv.appendOrSelect(u,"line.ruler-line"),h=r.selectAll("[role=graphics-symbol]"),f=o.map((e=>({domainValue:this.services.cartesianScales.getDomainValue(e),originalData:e}))).filter((e=>function(e,t){return e>t-5&&e<t+5}(e.domainValue,c)));if(this.pointsWithinLine&&f.length===this.pointsWithinLine.length&&f.map((e=>e.domainValue)).join()===this.pointsWithinLine.map((e=>e.domainValue)).join())return this.pointsWithinLine=f,this.services.events.dispatchEvent(R.Tooltip.MOVE,{mousePosition:[t,n]});this.pointsWithinLine=f;const p=this.pointsWithinLine.reduce(((e,t)=>{if(0===e.length)return e.push(t),e;const n=e[0].domainValue,r=Math.abs(c-t.domainValue),i=Math.abs(c-n);return r>i||(r<i?e=[t]:e.push(t)),e}),[]);if(p.length>0){const e=p.map((e=>e.originalData)).filter((e=>null!=e[this.services.cartesianScales.getRangeIdentifier(e)])),r=p.map((e=>e.domainValue)),o=h.filter((e=>{const t=this.services.cartesianScales.getDomainValue(e);return r.includes(t)}));this.elementsToHighlight&&this.elementsToHighlight.size()>0&&!function(e,t){return pp(e,t)}(this.elementsToHighlight,o)&&this.hideRuler(),o.dispatch("mouseover"),this.elementsToHighlight=o,this.services.events.dispatchEvent(R.Tooltip.SHOW,{mousePosition:[t,n],hoveredElement:d,data:this.formatTooltipData(e)}),u.attr("opacity",1);const a=p[0];"horizontal"===i?d.attr("x1",l).attr("x2",s).attr("y1",a.domainValue).attr("y2",a.domainValue):d.attr("y1",l).attr("y2",s).attr("x1",a.domainValue).attr("x2",a.domainValue)}else this.hideRuler()}hideRuler(){const e=this.parent,t=Mv.appendOrSelect(e,"g.ruler");e.selectAll("[role=graphics-symbol]").dispatch("mouseout"),this.services.events.dispatchEvent(R.Tooltip.HIDE),t.attr("opacity",0)}addBackdropEventListeners(){this.isEventListenerAdded=!0;const e=this,t=this.services.domUtils.getHolder(),n=this.model.getDisplayData();let r=function(t){const n=ln(t,e.parent.node());e.showRuler(t,n)};n.length>100&&(r=function(e,t,n){let r=null;return function(...i){const o=this;o.mousePosition=ln(i[0],n),clearTimeout(r),r=setTimeout((function(){e.apply(o,i)}),t)}}((function(t){const{mousePosition:n}=this;e.showRuler(t,n)}),n.length%50*12.5,t)),this.backdrop.on("mousemove mouseover",r).on("mouseout",this.hideRuler.bind(this))}drawBackdrop(){const e=this.parent;this.backdrop=Mv.appendOrSelect(e,"svg.chart-grid-backdrop")}}class Tw extends _y{constructor(){super(...arguments),this.type="scatter",this.renderType=L.SVG,this.handleChartHolderOnHover=()=>{if(!this.parent)throw new Error("Parent not defined");this.parent.selectAll("circle.dot").transition("chart-holder-hover-scatter").call((e=>{var t;return null==(t=this.services.transitions)?void 0:t.setupTransition({transition:e,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((e=>{var t;return null==(t=this.services.transitions)?void 0:t.setupTransition({transition:e,name:"chart-holder-mouseout-scatter"})})).attr("opacity",0)},this.handleLegendOnHover=e=>{const{hoveredElement:t}=e.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((e=>{var t;return null==(t=this.services.transitions)?void 0:t.setupTransition({transition:e,name:"legend-hover-scatter"})})).attr("opacity",(e=>e[n]!==t.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((e=>{var t;return null==(t=this.services.transitions)?void 0:t.setupTransition({transition:e,name:"legend-mouseout-scatter"})})).attr("opacity",1)}}init(){const{events:e}=this.services;if(!e)throw new Error("Services events are undefined.");e.addEventListener(R.Legend.ITEM_HOVER,this.handleLegendOnHover),e.addEventListener(R.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut);const{fadeInOnChartHolderMouseover:t}=this.configs;t&&(e.addEventListener(R.Chart.MOUSEOVER,this.handleChartHolderOnHover),e.addEventListener(R.Chart.MOUSEOUT,this.handleChartHolderOnMouseOut))}filterBasedOnZoomDomain(e){const{cartesianScales:t}=this.services;if(!t)throw new Error("Services cartesianScales are undefined.");const n=t.getDomainIdentifier(e),r=this.model.get("zoomDomain");return void 0!==r?e.filter((e=>e[n].getTime()>=r[0].getTime()&&e[n].getTime()<=r[1].getTime())):e}getScatterData(){const e=this.getOptions(),{stacked:t}=this.configs;let n;if(t){const t=Object.keys(e.axes).some((t=>e.axes[t].percentage));n=this.model.getStackedData({groups:this.configs.groups,percentage:t})}else{const{cartesianScales:e}=this.services;if(!e)throw new Error("Services cartesianScales are undefined.");n=this.model.getDisplayData(this.configs.groups).filter((t=>{const n=e.getRangeIdentifier(t);return void 0!==t[n]&&null!==t[n]}))}return this.filterBasedOnZoomDomain(n)}render(e){if(!Um(this.getOptions(),"points","enabled")&&!Um(this.getOptions(),"bubble","enabled"))return;const t=this.getComponentContainer({withinChartClip:!0}),n=this.getOptions(),{groupMapsTo:r}=n.data,{cartesianScales:i}=this.services;if(!i)throw new Error("Services cartesianScales are undefined.");const o=i.getDomainIdentifier(),a=t.selectAll("circle.dot").data(this.getScatterData(),(e=>`${e[r]}-${e[o]}`));a.exit().attr("opacity",0).remove();const s=a.enter().append("circle").classed("dot",!0).attr("opacity",0).merge(a);this.styleCircles(s,e),this.addEventListeners()}isDatapointThresholdAnomaly(e){const{handleThresholds:t}=this.configs;if(!t)return!1;const{cartesianScales:n}=this.services;if(!n)throw new Error("Cartesian scales service is undefined");const r=n.getOrientation(),[i,o]=Vm(n.getHighestDomainThreshold(),n.getHighestRangeThreshold(),r),[a,s]=Vm((e=>n.getDomainValue(e)),(e=>n.getRangeValue(e)),r),l=a(e),c=s(e);return o&&i?c<=o.scaleValue&&l>=i.scaleValue:o?c<=o.scaleValue:!!i&&l>=i.scaleValue}styleCircles(e,t){const n=this.getOptions(),{filled:r,fillOpacity:i}=n.points,{cartesianScales:o}=this.services;if(!o)throw new Error("Cartesian scales service is undefined");const{groupMapsTo:a}=n.data,[s,l]=Vm((e=>o.getDomainValue(e)),(e=>o.getRangeValue(e)),o.getOrientation()),{fadeInOnChartHolderMouseover:c}=this.configs;e.raise().classed("dot",!0).attr("class",(e=>{const t=o.getDomainIdentifier(e),n=this.model.getIsFilled(e[a],e[t],e,r)?[I.FILL,I.STROKE]:[I.STROKE];return this.model.getColorClassName({classNameTypes:n,dataGroupName:e[a],originalClassName:"dot"})||""})).classed("threshold-anomaly",(e=>this.isDatapointThresholdAnomaly(e))).classed("filled",(e=>{const t=o.getDomainIdentifier(e);return this.model.getIsFilled(e[a],e[t],e,r)})).classed("unfilled",(e=>{const t=o.getDomainIdentifier(e);return!this.model.getIsFilled(e[a],e[t],e,r)})).transition().call((e=>{var n;return null==(n=this.services.transitions)?void 0:n.setupTransition({transition:e,name:"scatter-update-enter",animate:t})})).attr("cx",s).attr("cy",l).attr("r",n.points.radius).style("fill",(e=>{const t=o.getDomainIdentifier(e);if(this.model.getIsFilled(e[a],e[t],e,r))return this.model.getFillColor(e[a],e[t],e)})).style("stroke",(e=>{const t=o.getDomainIdentifier(e);return this.model.getStrokeColor(e[a],e[t],e)})).attr("fill-opacity",r?i:1).attr("opacity",c?0:1).attr("role",kg.GRAPHICS_SYMBOL).attr("aria-roledescription","point").attr("aria-label",(e=>e[o.getRangeIdentifier(e)])),this.addEventListeners()}getTooltipAdditionalItems(e){return null}addEventListeners(){const e=this,{groupMapsTo:t}=e.getOptions().data;if(!this.parent)throw new Error("Parent not defined");this.parent.selectAll("circle").on("mouseover",(function(n,r){var i,o;const a=sn(this);a.classed("hovered",!0).attr("class",(n=>e.model.getColorClassName({classNameTypes:[I.FILL],dataGroupName:n[t],originalClassName:a.attr("class")}))).style("fill",(n=>{var r;const i=null==(r=e.services.cartesianScales)?void 0:r.getDomainIdentifier(n);return e.model.getFillColor(n[t],n[i],n)})).classed("unfilled",!1),null==(i=e.services.events)||i.dispatchEvent(R.Tooltip.SHOW,{event:n,hoveredElement:a,data:[r],additionalItems:e.getTooltipAdditionalItems(r)}),null==(o=e.services.events)||o.dispatchEvent(R.Scatter.SCATTER_MOUSEOVER,{event:n,element:a,datum:r})})).on("mousemove",(function(t,n){var r,i;const o=sn(this);null==(r=e.services.events)||r.dispatchEvent(R.Scatter.SCATTER_MOUSEMOVE,{event:t,element:o,datum:n}),null==(i=e.services.events)||i.dispatchEvent(R.Tooltip.MOVE,{event:t})})).on("click",(function(t,n){var r;null==(r=e.services.events)||r.dispatchEvent(R.Scatter.SCATTER_CLICK,{event:t,element:sn(this),datum:n})})).on("mouseout",(function(n,r){var i,o,a;const s=sn(this);if(s.classed("hovered",!1),!e.configs.filled){const{filled:n}=e.getOptions().points,o=null==(i=e.services.cartesianScales)?void 0:i.getDomainIdentifier(r),a=e.model.getIsFilled(r[t],r[o],r,n);s.classed("unfilled",!a).style("fill",(r=>a||n?e.model.getFillColor(r[t],r[o],r):null))}null==(o=e.services.events)||o.dispatchEvent(R.Scatter.SCATTER_MOUSEOUT,{event:n,element:s,datum:r}),null==(a=e.services.events)||a.dispatchEvent(R.Tooltip.HIDE,{hoveredElement:s})}))}destroy(){var e;null==(e=this.parent)||e.selectAll("circle").on("mousemove",null).on("mouseout",null);const{events:t}=this.services;if(!t)throw new Error("Services events undefined");t.removeEventListener(R.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(R.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),t.removeEventListener(R.Chart.MOUSEOVER,this.handleChartHolderOnHover),t.removeEventListener(R.Chart.MOUSEOUT,this.handleChartHolderOnMouseOut)}}class Ow extends _y{constructor(e,t,n){super(e,t,n),this.type="axes",this.renderType=L.SVG,this.truncation={[$.LEFT]:!1,[$.RIGHT]:!1,[$.TOP]:!1,[$.BOTTOM]:!1},n&&(this.configs=n),this.margins=this.configs.margins}render(e=!0){const{position:t}=this.configs,n=this.getOptions(),r=Um(n,"axes",t,"visible"),i=this.getComponentContainer(),{width:o,height:a}=Mv.getSVGElementSize(i,{useAttrs:!0}),s=Mv.appendOrSelect(i,`g.axis.${t}`);let l,c;if(t===$.BOTTOM||t===$.TOP?(l=this.configs.axes[$.LEFT]?this.margins.left:0,c=this.configs.axes[$.RIGHT]?o-this.margins.right:o):(l=a-this.margins.bottom,c=this.margins.top),!this.services.cartesianScales)throw new Error("Services cartesianScales undefined");const u=this.services.cartesianScales.getScaleByPosition(t);let d;switch(this.scaleType===F.LABELS||this.scaleType===F.LABELS_RATIO?u.rangeRound([l,c]):u.range([l,c]),t){case $.LEFT:d=He;break;case $.BOTTOM:d=Ue;break;case $.RIGHT:d=Fe;break;case $.TOP:d=je}s.attr("aria-label",`${t} axis`);const h=!s.select("g.ticks").empty();let f=Mv.appendOrSelect(s,"g.ticks");h||(f.attr("role",`${kg.GRAPHICS_OBJECT} ${kg.GROUP}`),f.attr("aria-label",`${t} ticks`));const p=Mv.appendOrSelect(s,"g.ticks.invisible").style("opacity","0").style("pointer-events","none").attr("aria-hidden",!0).attr("aria-label",`invisible ${t} ticks`),m=Um(n,"axes",t),g=this.scaleType===F.TIME||m.scaleType===F.TIME,v=t===$.LEFT||t===$.RIGHT,y=this.model.get("zoomDomain");if(y&&g&&!v&&u.domain(y),!r)return void f.attr("aria-hidden",!0);const b=Um(m,"scaleType"),w=Um(n,"data","loading"),_=Um(m,"ticks","number"),E=Um(m,"ticks","values"),x=Um(m,"truncation","type"),S=Um(m,"truncation","threshold"),T=Um(m,"truncation","numCharacter"),O=null!==_,A=Um(n,"timeScale"),C=Mv.appendOrSelect(p,"g.tick"),k=Mv.appendOrSelect(C,"text").text("0"),M=Mv.getSVGElementSize(k.node(),{useBBox:!0}).height;C.remove();const N=this.scaleType||m.scaleType||F.LINEAR,D=d(u).tickSizeOuter(0);if(u.ticks){let e;if(O?e=_:(e=Fp,v&&(e=this.getNumberOfFittingTicks(a,M,Up))),1===u.ticks().length&&0===u.ticks()[0]&&(e=0),D.ticks(e),g)if(u.ticks(e).length){const r=Um(n,"timeScale","addSpaceOnEdges"),i=Um(n,"axes",t,"domain"),o=u.copy();r&&!i&&o.nice(e);const a=o.ticks(e);r&&a.length>2&&!i&&(a.splice(a.length-1,1),a.splice(0,1)),D.tickValues(a)}else D.tickValues([])}let R;const L=Um(m,"ticks","formatter");if(g){const e=Tg(D.tickValues(),Um(n,"timeScale","timeInterval"));R=null===L?(t,n)=>xg(t,n,D.tickValues(),e,A):(t,n)=>{const r=xg(t,n,D.tickValues(),e,A);return L(t,n,r)}}else null===L?N===F.LINEAR&&(R=e=>e.toLocaleString()):R=L;D.tickFormat(R);const[P,I]=this.services.cartesianScales.getScaleByPosition(t).domain();let z;if(E){if(g)E.forEach(((e,t)=>{void 0===e.getTime&&(E[t]=new Date(e))})),z=E.filter((e=>{const t=e.getTime();return t>=new Date(P).getTime()&&t<=new Date(I).getTime()}));else if(b===F.LABELS){const e=this.services.cartesianScales.getScaleByPosition(t).domain();z=E.filter((t=>e.includes(t)))}else z=E.filter((e=>e>=P&&e<=I));D.tickValues(z)}switch(t){case $.LEFT:f.attr("transform",`translate(${this.margins.left}, 0)`);break;case $.BOTTOM:f.attr("transform",`translate(0, ${a-this.margins.bottom})`);break;case $.RIGHT:f.attr("transform",`translate(${o-this.margins.right}, 0)`);break;case $.TOP:f.attr("transform",`translate(0, ${this.margins.top})`)}const j=this.model.isDataEmpty();if(m.title){const e=Mv.appendOrSelect(s,"text.axis-title").html(j||w?"":gb(m.title)),n=Um(m,"titleOrientation");let r;switch(t){case $.LEFT:n===ee.RIGHT?e.attr("transform","rotate(90)").attr("y",0).attr("x",u.range()[0]/2).attr("dy","-0.5em").style("text-anchor","middle"):e.attr("transform","rotate(-90)").attr("y",0).attr("x",-u.range()[0]/2).attr("dy","0.75em").style("text-anchor","middle");break;case $.BOTTOM:e.attr("transform",`translate(${this.margins.left/2+u.range()[1]/2}, ${a+4})`).style("text-anchor","middle");break;case $.RIGHT:n===ee.LEFT?e.attr("transform","rotate(-90)").attr("y",o).attr("x",-u.range()[0]/2).style("text-anchor","middle"):e.attr("transform","rotate(90)").attr("y",-o).attr("x",u.range()[0]/2).attr("dy","0.75em").style("text-anchor","middle");break;case $.TOP:r=Mv.getSVGElementSize(e,{useBBox:!0}).height,e.attr("transform",`translate(${this.margins.left/2+u.range()[1]/2}, ${r/2})`).style("text-anchor","middle")}}if(g){const t=Tg(D.tickValues(),Um(n,"timeScale","timeInterval")),r=A.showDayName,i=f;e&&(f=f.transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"axis-update",animate:e})))),f=f.call(D),i.selectAll(".tick").data(D.tickValues(),u).order().select("text").style("font-weight",((e,n)=>Eg(e,n,D.tickValues(),t,r)?"bold":"normal"))}else f=e&&h?f.transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"axis-update",animate:e}))).call(D):f.call(D);if(p.call(D),t===$.BOTTOM||t===$.TOP){let e=!1;const n=Um(m,"ticks","rotation");if(n===X.ALWAYS)e=!0;else if(n===X.NEVER)e=!1;else if(!n||n===X.AUTO)if(u.step)e=p.selectAll("g.tick text").nodes().some((e=>Mv.getSVGElementSize(e,{useBBox:!0}).width>=u.step()));else{e=!1;const t=p.append("text").text("A"),n=Mv.getSVGElementSize(t.node(),{useBBox:!0}).width;let r;p.selectAll("g.tick").each((function(){const t=sn(this),i=parseFloat(Um(Bm(this),"tx"));null!==i&&r+t.text().length*n*.8>=i&&(e=!0),r=i})),t.remove()}e?(O||(D.ticks(this.getNumberOfFittingTicks(o,M,Hp)),p.call(D),f.call(D)),s.selectAll("g.ticks g.tick text").attr("transform","rotate(-45)").attr("text-anchor",t===$.TOP?"start":"end")):s.selectAll("g.ticks g.tick text").attr("transform",null).attr("text-anchor",null)}if(w?s.attr("opacity",0):s.attr("opacity",1),f.selectAll("g.tick").attr("aria-label",(e=>e)),p.selectAll("g.tick").attr("aria-label",(e=>e)),x!==B.NONE&&b===F.LABELS&&!E){const e=this.services.cartesianScales.getScaleDomain(t);if(e.length>0){const n=i.select(`g.axis.${t} g.ticks g.tick`).html();s.selectAll("g.ticks g.tick").html(n);const r=this;s.selectAll("g.tick text").data(e).text((function(e){return e.length>S?(r.truncation[t]=!0,jm(e,x,T)):e})),this.getInvisibleAxisRef().selectAll("g.tick text").data(e).text((function(e){return e.length>S?jm(e,x,T):e})),s.selectAll("g.ticks").html(this.getInvisibleAxisRef().html()),s.selectAll("g.tick text").data(e)}}this.addEventListeners()}addEventListeners(){const e=this.getComponentContainer(),{position:t}=this.configs,n=Mv.appendOrSelect(e,`g.axis.${t}`),r=this.getOptions(),i=Um(r,"axes",t),o=Um(i,"scaleType"),a=Um(i,"truncation","threshold"),s=this;n.selectAll("g.tick text").on("mouseover",(function(e,t){s.services.events.dispatchEvent(R.Axis.LABEL_MOUSEOVER,{event:e,element:sn(this),datum:t}),o===F.LABELS&&t.length>a&&s.services.events.dispatchEvent(R.Tooltip.SHOW,{event:e,hoveredElement:sn(this),content:t})})).on("mousemove",(function(e,t){s.services.events.dispatchEvent(R.Axis.LABEL_MOUSEMOVE,{event:e,element:sn(this),datum:t}),o===F.LABELS&&t.length>a&&s.services.events.dispatchEvent(R.Tooltip.MOVE,{event:e})})).on("click",(function(e,t){s.services.events.dispatchEvent(R.Axis.LABEL_CLICK,{event:e,element:sn(this),datum:t})})).on("mouseout",(function(e,t){s.services.events.dispatchEvent(R.Axis.LABEL_MOUSEOUT,{event:e,element:sn(this),datum:t}),o===F.LABELS&&s.services.events.dispatchEvent(R.Tooltip.HIDE)}))}getInvisibleAxisRef(){const{position:e}=this.configs;return this.getComponentContainer().select(`g.axis.${e} g.ticks.invisible`)}getTitleRef(){const{position:e}=this.configs;return this.getComponentContainer().select(`g.axis.${e} text.axis-title`)}getNumberOfFittingTicks(e,t,n){return function(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=Wg(n))==n?n:0),void 0!==t&&(t=(t=Wg(t))==t?t:0),function(e,t,n){return e==e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e}(Wg(e),t,n)}(Math.floor(e/(t*n)),2,Fp)}destroy(){const e=this.getComponentContainer(),{position:t}=this.configs;Mv.appendOrSelect(e,`g.axis.${t}`).selectAll("g.tick text").on("mouseover",null).on("mousemove",null).on("mouseout",null)}}class Aw extends Ow{constructor(e,t,n){super(e,t,n)}render(e=!0){super.render(e),super.destroy();const t=this.configs.position,n=this.getComponentContainer(),r=Mv.appendOrSelect(n,`g.axis.${t}`),i=this;r.selectAll("g.tick").each((function(e,n){const r=sn(this);r.classed("tick-hover",!0).attr("tabindex",0===n?0:-1);const o=r.select("text"),{width:a,height:s}=Mv.getSVGElementSize(o,{useBBox:!0}),l=Mv.appendOrSelect(r,"rect.axis-holder");let c=0,u=0;switch(t){case $.LEFT:c=-a+Number(o.attr("x")),u=-s/2;break;case $.RIGHT:c=Math.abs(Number(o.attr("x"))),u=-s/2;break;case $.TOP:c=-a/2,u=-s+Number(o.attr("y"))/2,i.truncation[t]&&(c=0,l.attr("transform","rotate(-45)"));break;case $.BOTTOM:c=-a/2,u=s/2-2,i.truncation[t]&&(c=-a,l.attr("transform","rotate(-45)"))}l.attr("x",c-Zp).attr("y",u).attr("width",a+2*Zp).attr("height",s).lower()})),this.addEventListeners()}addEventListeners(){const e=this.getComponentContainer(),{position:t}=this.configs,n=Mv.appendOrSelect(e,`g.axis.${t}`),r=this.getOptions(),i=Um(r,"axes",t),o=Um(i,"scaleType"),a=Um(i,"truncation","threshold"),s=this;n.selectAll("g.tick.tick-hover").on("mouseover",(function(e){const t=sn(this).select("text"),n=t.datum();s.services.events.dispatchEvent(R.Axis.LABEL_MOUSEOVER,{event:e,element:t,datum:n}),o===F.LABELS&&n.length>a&&s.services.events.dispatchEvent(R.Tooltip.SHOW,{event:e,element:t,datum:n})})).on("mousemove",(function(e){const t=sn(this).select("text"),n=t.datum();s.services.events.dispatchEvent(R.Axis.LABEL_MOUSEMOVE,{event:e,element:t,datum:n}),s.services.events.dispatchEvent(R.Tooltip.MOVE,{event:e})})).on("click",(function(e){s.services.events.dispatchEvent(R.Axis.LABEL_CLICK,{event:e,element:sn(this).select("text"),datum:sn(this).select("text").datum()})})).on("mouseout",(function(e){s.services.events.dispatchEvent(R.Axis.LABEL_MOUSEOUT,{event:e,element:sn(this).select("text"),datum:sn(this).select("text").datum()}),o===F.LABELS&&s.services.events.dispatchEvent(R.Tooltip.HIDE)})).on("focus",(function(e){const t={clientX:0,clientY:0};if(e.target){e.target.focus();const n=e.target.getBoundingClientRect();t.clientX=n.x,t.clientY=n.y}s.services.events.dispatchEvent(R.Axis.LABEL_FOCUS,{event:{...e,...t},element:sn(this),datum:sn(this).select("text").datum()})})).on("blur",(function(e){s.services.events.dispatchEvent(R.Axis.LABEL_BLUR,{event:e,element:sn(this),datum:sn(this).select("text").datum()})})).on("keydown",(function(e){e.key&&"Escape"===e.key&&(s.services.events.dispatchEvent(R.Tooltip.HIDE),s.services.events.dispatchEvent(R.Axis.LABEL_BLUR,{event:e,element:sn(this),datum:sn(this).select("text").datum()})),t===$.LEFT||t===$.RIGHT?e.key&&"ArrowUp"===e.key?s.goNext(this,e):e.key&&"ArrowDown"===e.key&&s.goPrevious(this,e):e.key&&"ArrowLeft"===e.key?s.goPrevious(this,e):e.key&&"ArrowRight"===e.key&&s.goNext(this,e)}))}goNext(e,t){e.nextElementSibling&&"path"!==e.nextElementSibling.tagName&&e.nextElementSibling.dispatchEvent(new Event("focus")),t.preventDefault()}goPrevious(e,t){e.previousElementSibling&&"path"!==e.previousElementSibling.tagName&&e.previousElementSibling.dispatchEvent(new Event("focus")),t.preventDefault()}destroy(){const e=this.getComponentContainer(),{position:t}=this.configs;Mv.appendOrSelect(e,`g.axis.${t}`).selectAll("g.tick.tick-hover").on("mouseover",null).on("mousemove",null).on("mouseout",null).on("focus",null).on("blur",null)}}class Cw extends _y{constructor(){super(...arguments),this.type="2D-axes",this.renderType=L.SVG,this.children={},this.thresholds=[],this.margins={top:0,right:0,bottom:0,left:0}}render(e=!1){const t={},n=Object.keys($),r=Um(this.getOptions(),"axes");n.forEach((e=>{r[$[e]]&&(t[$[e]]=!0)})),this.configs.axes=t,n.forEach((e=>{const t=$[e];if(this.configs.axes[t]&&!this.children[t]){const e={position:t,axes:this.configs.axes,margins:this.margins},n=this.model.axisFlavor===re.DEFAULT?new Ow(this.model,this.services,e):new Aw(this.model,this.services,e);n.setModel(this.model),n.setServices(this.services),n.setParent(this.parent),this.children[t]=n}})),Object.keys(this.children).forEach((t=>{this.children[t].render(e)}));const i={};Object.keys(this.children).forEach((e=>{const t=this.children[e],n=t.configs.position,r=t.getInvisibleAxisRef(),{width:o,height:a}=Mv.getSVGElementSize(r,{useBBox:!0});let s;switch(t.getTitleRef().empty()?s=0:(s=Mv.getSVGElementSize(t.getTitleRef(),{useBBox:!0}).height,(n===$.LEFT||n===$.RIGHT)&&(s+=5)),n){case $.TOP:i.top=a+s;break;case $.BOTTOM:i.bottom=a+s;break;case $.LEFT:i.left=o+s;break;case $.RIGHT:i.right=o+s}})),this.services.events.dispatchEvent(R.Axis.RENDER_COMPLETE),Object.keys(i).some((e=>this.margins[e]!==i[e]))&&(this.margins=Object.assign(this.margins,i),this.model.set({axesMargins:this.margins},{skipUpdate:!0}),this.services.events.dispatchEvent(R.ZoomBar.UPDATE),Object.keys(this.children).forEach((e=>{this.children[e].margins=this.margins})),this.render(!0))}}class kw extends _y{constructor(){super(...arguments),this.type="skeleton"}render(e=!0){const t=Um(this.getOptions(),"data","loading");t?this.renderSkeleton(t):this.removeSkeleton()}renderSkeleton(e){if(this.configs.skeleton===Y.GRID)this.renderGridSkeleton(e);else if(this.configs.skeleton===Y.VERT_OR_HORIZ)this.renderVertOrHorizSkeleton(e);else if(this.configs.skeleton===Y.PIE)this.renderPieSkeleton(e);else{if(this.configs.skeleton!==Y.DONUT)throw new Error(`"${this.configs.skeleton}" is not a valid Skeleton type.`);this.renderDonutSkeleton(e)}}renderGridSkeleton(e){this.setScales(),this.drawBackdrop(e),this.drawXGrid(e),this.drawYGrid(e),e&&this.setShimmerEffect("shimmer-lines")}renderVertOrHorizSkeleton(e){const t=this.services.cartesianScales.getOrientation();this.setScales(),this.drawBackdrop(e),t===j.VERTICAL&&this.drawYGrid(e),t===j.HORIZONTAL&&this.drawXGrid(e),this.setShimmerEffect("shimmer-lines")}renderPieSkeleton(e){const t=this.computeOuterRadius();this.drawRing(t,0,e),e&&this.setShimmerEffect("shimmer-areas")}renderDonutSkeleton(e){const t=this.computeOuterRadius(),n=this.computeInnerRadius();this.drawRing(t,n,e),e&&this.setShimmerEffect("shimmer-areas")}setScales(){const e=this.services.cartesianScales.getMainXScale().range(),t=this.services.cartesianScales.getMainYScale().range();this.xScale=Uo().domain([0,1]).range(e),this.yScale=Uo().domain([0,1]).range(t)}drawBackdrop(e){const t=this.parent,{width:n,height:r}=Mv.getSVGElementSize(t,{useAttrs:!0});this.backdrop=Mv.appendOrSelect(t,"svg.chart-skeleton.DAII").attr("width",n).attr("height",r);const i=Mv.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop");i.attr("width","100%").attr("height","100%");const[o]=this.xScale.range(),[,a]=this.yScale.range();this.backdrop.merge(i).attr("x",o).attr("y",a),i.classed("shimmer-effect-lines",e).classed("empty-state-lines",!e).style("stroke",e?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}drawXGrid(e){const t=+this.backdrop.attr("width"),n=Um(this.getOptions(),"grid","x","numberOfTicks"),r=this.xScale.ticks(n).map((e=>e*t)),i=Mv.appendOrSelect(this.backdrop,"g.x.skeleton"),o=i.selectAll("line").data(r);o.enter().append("line").merge(o).attr("x1",(e=>e)).attr("x2",(e=>e)).attr("y1",0).attr("y2","100%"),i.selectAll("line").classed("shimmer-effect-lines",e).classed("empty-state-lines",!e).style("stroke",e?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}drawYGrid(e){const t=+this.backdrop.attr("height"),n=this.backdrop.attr("width"),r=Um(this.getOptions(),"grid","y","numberOfTicks"),i=this.xScale.ticks(r).map((e=>e*t)),o=Mv.appendOrSelect(this.backdrop,"g.y.skeleton"),a=o.selectAll("line").data(i);a.enter().append("line").merge(a).attr("x1",0).attr("x2",n).attr("y1",(e=>e)).attr("y2",(e=>e)),o.selectAll("line").classed("shimmer-effect-lines",e).classed("empty-state-lines",!e).style("stroke",e?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}drawRing(e,t,n=!0){const r=this.parent,{width:i,height:o}=Mv.getSVGElementSize(r,{useAttrs:!0}),a=Mv.appendOrSelect(r,"svg.chart-skeleton").attr("width",i).attr("height",o),s=0===t?"pie":"donut",l=Um(this.getOptions(),s,"alignment");Mv.appendOrSelect(a,"rect.chart-skeleton-area-container").attr("width",i).attr("height",o).attr("fill","none");const c=function(){var e=Sl,t=Tl,n=ul(0),r=null,i=Ol,o=Al,a=Cl,s=null,l=xl(c);function c(){var c,u,d=+e.apply(this,arguments),h=+t.apply(this,arguments),f=i.apply(this,arguments)-wl,p=o.apply(this,arguments)-wl,m=dl(p-f),g=p>f;if(s||(s=c=l()),h<d&&(u=h,h=d,d=u),h>yl)if(m>_l-yl)s.moveTo(h*fl(f),h*gl(f)),s.arc(0,0,h,f,p,!g),d>yl&&(s.moveTo(d*fl(p),d*gl(p)),s.arc(0,0,d,p,f,g));else{var v,y,b=f,w=p,_=f,E=p,x=m,S=m,T=a.apply(this,arguments)/2,O=T>yl&&(r?+r.apply(this,arguments):vl(d*d+h*h)),A=ml(dl(h-d)/2,+n.apply(this,arguments)),C=A,k=A;if(O>yl){var M=El(O/d*gl(T)),N=El(O/h*gl(T));(x-=2*M)>yl?(_+=M*=g?1:-1,E-=M):(x=0,_=E=(f+p)/2),(S-=2*N)>yl?(b+=N*=g?1:-1,w-=N):(S=0,b=w=(f+p)/2)}var D=h*fl(b),R=h*gl(b),L=d*fl(E),P=d*gl(E);if(A>yl){var I,$=h*fl(w),z=h*gl(w),B=d*fl(_),j=d*gl(_);if(m<bl)if(I=function(e,t,n,r,i,o,a,s){var l=n-e,c=r-t,u=a-i,d=s-o,h=d*l-u*c;if(!(h*h<yl))return[e+(h=(u*(t-o)-d*(e-i))/h)*l,t+h*c]}(D,R,B,j,$,z,L,P)){var F=D-I[0],U=R-I[1],H=$-I[0],V=z-I[1],Z=1/gl(function(e){return e>1?0:e<-1?bl:Math.acos(e)}((F*H+U*V)/(vl(F*F+U*U)*vl(H*H+V*V)))/2),W=vl(I[0]*I[0]+I[1]*I[1]);C=ml(A,(d-W)/(Z-1)),k=ml(A,(h-W)/(Z+1))}else C=k=0}S>yl?k>yl?(v=kl(B,j,D,R,h,k,g),y=kl($,z,L,P,h,k,g),s.moveTo(v.cx+v.x01,v.cy+v.y01),k<A?s.arc(v.cx,v.cy,k,hl(v.y01,v.x01),hl(y.y01,y.x01),!g):(s.arc(v.cx,v.cy,k,hl(v.y01,v.x01),hl(v.y11,v.x11),!g),s.arc(0,0,h,hl(v.cy+v.y11,v.cx+v.x11),hl(y.cy+y.y11,y.cx+y.x11),!g),s.arc(y.cx,y.cy,k,hl(y.y11,y.x11),hl(y.y01,y.x01),!g))):(s.moveTo(D,R),s.arc(0,0,h,b,w,!g)):s.moveTo(D,R),d>yl&&x>yl?C>yl?(v=kl(L,P,$,z,d,-C,g),y=kl(D,R,B,j,d,-C,g),s.lineTo(v.cx+v.x01,v.cy+v.y01),C<A?s.arc(v.cx,v.cy,C,hl(v.y01,v.x01),hl(y.y01,y.x01),!g):(s.arc(v.cx,v.cy,C,hl(v.y01,v.x01),hl(v.y11,v.x11),!g),s.arc(0,0,d,hl(v.cy+v.y11,v.cx+v.x11),hl(y.cy+y.y11,y.cx+y.x11),g),s.arc(y.cx,y.cy,C,hl(y.y11,y.x11),hl(y.y01,y.x01),!g))):s.arc(0,0,d,E,_,g):s.lineTo(L,P)}else s.moveTo(0,0);if(s.closePath(),c)return s=null,c+""||null}return c.centroid=function(){var n=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-bl/2;return[fl(r)*n,gl(r)*n]},c.innerRadius=function(t){return arguments.length?(e="function"==typeof t?t:ul(+t),c):e},c.outerRadius=function(e){return arguments.length?(t="function"==typeof e?e:ul(+e),c):t},c.cornerRadius=function(e){return arguments.length?(n="function"==typeof e?e:ul(+e),c):n},c.padRadius=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:ul(+e),c):r},c.startAngle=function(e){return arguments.length?(i="function"==typeof e?e:ul(+e),c):i},c.endAngle=function(e){return arguments.length?(o="function"==typeof e?e:ul(+e),c):o},c.padAngle=function(e){return arguments.length?(a="function"==typeof e?e:ul(+e),c):a},c.context=function(e){return arguments.length?(s=e??null,c):s},c}().innerRadius(t).outerRadius(e).startAngle(0).endAngle(2*Math.PI),u=e+Math.abs(-15),d=e+(Math.min(i,o)-2*e)/2,h=Mv.appendOrSelect(a,"path").attr("class","skeleton-area-shape").attr("transform",`translate(${u}, ${d})`).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=e+30;l===H.CENTER?f=i/2:l===H.RIGHT&&(f=i-e-30);const p=e+20;h.attr("transform",`translate(${f}, ${p})`)}computeOuterRadius(){const{width:e,height:t}=Mv.getSVGElementSize(this.parent,{useAttrs:!0});return Math.min(e,t)/2-15}computeInnerRadius(){return this.computeOuterRadius()*(3/4)}setShimmerEffect(e){const t="stop-bg-shimmer",n=this.parent.select(".chart-skeleton"),{width:r}=Mv.getSVGElementSize(this.parent,{useAttrs:!0}),i=r,o=Mv.appendOrSelect(n,"defs").lower(),a=Mv.appendOrSelect(o,"linearGradient").attr("id",this.services.domUtils.generateElementIDString(e)).attr("class",e).attr("x1",0-3*.2*r).attr("x2",i).attr("y1",0).attr("y2",0).attr("gradientUnits","userSpaceOnUse").attr("gradientTransform","translate(0, 0)"),s=`\n\t\t\t<stop class="${t}" offset="0"></stop>\n\t\t\t<stop class="stop-shimmer" offset="0.2"></stop>\n\t\t\t<stop class="${t}" offset="0.4"></stop>\n\t\t`;a.html(s),function e(){a.attr("gradientTransform",`translate(${0-3*.2*r}, 0)`).transition().duration(2e3).delay(1e3).ease(ui).attr("gradientTransform",`translate(${i+3*.2*r}, 0)`).on("end",e)}()}removeSkeleton(){this.parent.select(".chart-skeleton").remove()}}class Mw extends _y{constructor(){super(...arguments),this.type="zero-line",this.renderType=L.SVG}render(e){const t=this.services.cartesianScales.getRangeAxisPosition({groups:this.configs.groups}),n=this.services.cartesianScales.getScaleByPosition(t),[r,i]=n.domain(),o=r>0&&i<0||r<0&&i>0,a=this.getComponentContainer();if(!o)return void a.selectAll("line.domain").remove();const[s,l]=this.services.cartesianScales.getDomainScale().range();let c=+n(0)+.5;c||(c=n.range()[0]);const u=Hm({x0:s,x1:l,y0:c,y1:c},this.services.cartesianScales.getOrientation());Mv.appendOrSelect(a,"line.domain").transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"zero-line-update",animate:e}))).attr("y1",u.y0).attr("y2",u.y1).attr("x1",u.x0).attr("x2",u.x1)}}class Nw extends kw{constructor(){super(...arguments),this.type="skeleton-lines"}render(e=!0){const t=Um(this.getOptions(),"data","loading"),n=!(Um(this.getOptions(),"grid","x","enabled")||Um(this.getOptions(),"grid","y","enabled")||Um(this.getOptions(),"axes","bottom","visible")||Um(this.getOptions(),"axes","left","visible"));t&&!n?super.renderGridSkeleton(t):t&&n?this.renderSparklineSkeleton(t):this.removeSkeleton()}renderSparklineSkeleton(e){this.setScales(),this.drawBackdrop(e),this.drawSparkline(e),this.updateBackdropStyle(),e&&this.setShimmerEffect("shimmer-lines")}drawSparkline(e){const t=this.backdrop.attr("width"),n=Mv.appendOrSelect(this.backdrop,"g.y.skeleton"),r=n.selectAll("line").data([100]);r.enter().append("line").merge(r).attr("x1",0).attr("x2",t).attr("y1",(e=>e)).attr("y2",(e=>e)),n.selectAll("line").classed("shimmer-effect-lines",e).classed("empty-state-lines",!e).style("stroke",e?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}updateBackdropStyle(){const e=this.parent;this.backdrop=Mv.appendOrSelect(e,"svg.chart-skeleton.DAII"),Mv.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop").classed("shimmer-effect-lines",!1).classed("shimmer-effect-sparkline",!0).style("stroke",null)}}function Dw(e){return null!=e&&e.length?sh(e,1):[]}class Rw extends kv{zoomIn(e,t,n){let r,i,o;const a=n||Wp;e&&(r=e.x,i=e.y,o=2);const{width:s,height:l}=Mv.getSVGElementSize(this.services.domUtils.getHolder(),{useClientDimensions:!0});t.transition().duration(a.duration).ease(a.ease).attr("transform",`translate(${s/2}, ${l/2}) scale(${o}) translate(${-r},${-i})`),this.services.events.dispatchEvent(R.CanvasZoom.CANVAS_ZOOM_IN,{element:sn(e)})}zoomOut(e,t){const n=t||Wp;e.transition().duration(n.duration).ease(n.ease).attr("transform",""),this.services.events.dispatchEvent(R.CanvasZoom.CANVAS_ZOOM_OUT)}}class Lw extends kv{init(){this.documentFragment=document.createDocumentFragment()}addEventListener(e,t){this.documentFragment.addEventListener(e,t)}removeEventListener(e,t){this.documentFragment.removeEventListener(e,t)}dispatchEvent(e,t){let n;t?n=new CustomEvent(e,{detail:t}):(n=document.createEvent("Event"),n.initEvent(e,!1,!0)),this.documentFragment.dispatchEvent(n)}}class Pw extends kv{constructor(e,t){super(e,t)}downloadCSV(e,t){const n=document.createElement("a"),r="text/csv;encoding:utf-8";if(navigator.msSaveBlob)navigator.msSaveBlob(new Blob([e],{type:r}),t);else if(URL&&"download"in n){const i=URL.createObjectURL(new Blob([e],{type:r}));n.href=i,n.setAttribute("download",t),document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(i)}else location.href=`data:application/octet-stream,${encodeURIComponent(e)}`}downloadImage(e,t){const n=document.createElement("a");n.download=t,n.href=e,document.body.appendChild(n),n.click(),document.body.removeChild(n)}}class Iw extends kv{constructor(){super(...arguments),this.pendingTransitions={}}init(){var e;null==(e=this.services.events)||e.addEventListener(R.Model.UPDATE,(()=>{this.pendingTransitions={}}))}setupTransition({transition:e,name:t,animate:n}){return this.pendingTransitions[e._id]=e,e.on("end interrupt cancel",(()=>{delete this.pendingTransitions[e._id]})),!1===this.model.getOptions().animations||!1===n?e.duration(0):e.duration(Um(em,t,"duration")||em.default.duration)}getPendingTransitions(){return this.pendingTransitions}}function $w(e,t){const n=Ic(e),r=Ic(t),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}function zw(e,t){const n=Ic(e);if(isNaN(t))return Qm(e,NaN);if(!t)return n;const r=n.getDate(),i=Qm(e,n.getTime());return i.setMonth(n.getMonth()+t+1,0),r>=i.getDate()?i:(n.setFullYear(i.getFullYear(),i.getMonth(),r),n)}function Bw(e,t){return zw(e,12*t)}function jw(e,t){return Bw(e,-t)}function Fw(e,t){const n=Ic(e),r=Ic(t),i=$w(n,r),o=Math.abs(function(e,t){const n=Ic(e),r=Ic(t);return 12*(n.getFullYear()-r.getFullYear())+(n.getMonth()-r.getMonth())}(n,r));let a;if(o<1)a=0;else{1===n.getMonth()&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-i*o);let t=$w(n,r)===-i;(function(e){const t=Ic(e);return+function(e){const t=Ic(e);return t.setHours(23,59,59,999),t}(t)==+function(e){const t=Ic(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}(t)})(Ic(e))&&1===o&&1===$w(e,r)&&(t=!1),a=i*(o-Number(t))}return 0===a?0:a}function Uw(e,t){return zw(e,-t)}function Hw(e,t){const n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function Vw(e,t){const n=Ic(e);return isNaN(t)?Qm(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function Zw(e,t){return Vw(e,-t)}function Ww(e,t){return Ic(e).getTime()-Ic(t).getTime()}function Gw(e){return e?Math[e]:Math.trunc}function qw(e,t){return Qm(e,+Ic(e)+t)}function Yw(e,t){return qw(e,t*qm)}function Kw(e,t){return Yw(e,-t)}function Xw(e,t,n){const r=Ww(e,t)/Gm;return Gw(null==n?void 0:n.roundingMethod)(r)}function Qw(e,t){return qw(e,t*Gm)}function Jw(e,t){return Qw(e,-t)}function e_(e,t,n){const r=Ww(e,t)/1e3;return Gw(null==n?void 0:n.roundingMethod)(r)}function t_(e,t){return qw(e,1e3*t)}function n_(e,t){return t_(e,-t)}class r_ extends kv{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:e=null}={}){if(this.dualAxes&&e){const t=this.model.getOptions(),{groupMapsTo:n}=t.data,r=Um(t,"axes",this.secondaryDomainAxisPosition),i=e[n];if(null!=r&&r.correspondingDatasets&&r.correspondingDatasets.includes(i))return this.secondaryDomainAxisPosition}return this.domainAxisPosition}getRangeAxisPosition({datum:e=null,groups:t=null}={}){if(this.dualAxes){const n=this.model.getOptions(),{groupMapsTo:r}=n.data,i=Um(n,"axes",this.secondaryRangeAxisPosition);let o;if(null!==e?o=e[r]:t&&t.length>0&&(o=t[0]),null!=i&&i.correspondingDatasets&&i.correspondingDatasets.includes(o))return this.secondaryRangeAxisPosition}return this.rangeAxisPosition}getAxisOptions(e){return Um(this.model.getOptions(),"axes",e)}getDomainAxisOptions(){const e=this.getDomainAxisPosition();return this.getAxisOptions(e)}getRangeAxisOptions(){const e=this.getRangeAxisPosition();return this.getAxisOptions(e)}getScaleLabel(e){return this.getAxisOptions(e).title||(e===$.BOTTOM||e===$.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($).map((e=>$[e])).forEach((e=>{this.scales[e]=this.createScale(e)}))}findDomainAndRangeAxes(){const e=this.findVerticalAxesPositions(),t=this.findHorizontalAxesPositions(),n=this.findDomainAndRangeAxesPositions(e,t);this.domainAxisPosition=n.primaryDomainAxisPosition,this.rangeAxisPosition=n.primaryRangeAxisPosition,this.isDualAxes()&&(this.secondaryDomainAxisPosition=n.secondaryDomainAxisPosition,this.secondaryRangeAxisPosition=n.secondaryRangeAxisPosition)}determineOrientation(){this.rangeAxisPosition!==$.LEFT&&this.rangeAxisPosition!==$.RIGHT||this.domainAxisPosition!==$.BOTTOM&&this.domainAxisPosition!==$.TOP?this.orientation=j.HORIZONTAL:this.orientation=j.VERTICAL}isDualAxes(){return this.dualAxes}determineAxisDuality(){var e,t,n,r;const i=this.model.getOptions(),o=Um(i,"axes");(null!=(e=o[$.LEFT])&&e.correspondingDatasets&&o[$.RIGHT]||null!=(t=o[$.RIGHT])&&t.correspondingDatasets&&o[$.LEFT]||null!=(n=o[$.TOP])&&n.correspondingDatasets&&o[$.BOTTOM]||null!=(r=o[$.BOTTOM])&&r.correspondingDatasets&&o[$.TOP])&&(this.dualAxes=!0)}getCustomDomainValuesByposition(e){const t=Um(this.model.getOptions(),"axes",e,"domain");if(t&&!Array.isArray(t))throw new Error(`Domain in ${e} axis is not a valid array`);if(Array.isArray(t)&&(this.scaleTypes[e]===F.LINEAR||this.scaleTypes[e]===F.TIME)&&2!==t.length)throw new Error(`There can only be 2 elements in domain for scale type: ${this.scaleTypes[e]}`);return t}getOrientation(){return this.orientation}getScaleByPosition(e){return this.scales[e]}getScaleTypeByPosition(e){return this.scaleTypes[e]}getDomainAxisScaleType(){const e=this.getDomainAxisPosition();return this.getScaleTypeByPosition(e)}getRangeAxisScaleType(){const e=this.getRangeAxisPosition();return this.getScaleTypeByPosition(e)}getDomainScale(){return this.scales[this.domainAxisPosition]}getRangeScale(){return this.scales[this.rangeAxisPosition]}getMainXAxisPosition(){const e=[$.BOTTOM,$.TOP];return[this.domainAxisPosition,this.rangeAxisPosition].find((t=>e.indexOf(t)>-1))}getMainYAxisPosition(){const e=[$.LEFT,$.RIGHT];return[this.domainAxisPosition,this.rangeAxisPosition].find((t=>e.indexOf(t)>-1))}getMainXScale(){return this.scales[this.getMainXAxisPosition()]}getMainYScale(){return this.scales[this.getMainYAxisPosition()]}getValueFromScale(e,t,n,r){const i=this.model.getOptions(),o=Um(i,"axes")[n],{mapsTo:a}=o,s=null!==Um(r,a)?r[a]:r;let l;switch(t){case F.LABELS:l=e(s)+e.step()/2;break;case F.TIME:l=e(new Date(s));break;default:l=e(s)}return l}getBoundedScaledValues(e){const{bounds:t}=this.model.getOptions(),n=this.getRangeAxisPosition({datum:e}),r=this.scales[n],i=this.model.getOptions(),o=Um(i,"axes")[n],{mapsTo:a}=o,s=void 0!==e[a]?e[a]:e;return[r(null!==Um(e,t.upperBoundMapsTo)?e[t.upperBoundMapsTo]:s),r(null!==Um(e,t.lowerBoundMapsTo)?e[t.lowerBoundMapsTo]:s)]}getValueThroughAxisPosition(e,t){const n=this.scaleTypes[e],r=this.scales[e];return this.getValueFromScale(r,n,e,t)}getDomainValue(e){const t=this.getDomainAxisPosition({datum:e});return this.getValueThroughAxisPosition(t,e)}getRangeValue(e){const t=this.getRangeAxisPosition({datum:e});return this.getValueThroughAxisPosition(t,e)}getMainXScaleType(){return this.getScaleTypeByPosition(this.getMainXAxisPosition())}getMainYScaleType(){return this.getScaleTypeByPosition(this.getMainYAxisPosition())}getDomainIdentifier(e){const t=this.model.getOptions();return Um(t,"axes",this.getDomainAxisPosition({datum:e}),"mapsTo")}getRangeIdentifier(e){const t=this.model.getOptions();return Um(t,"axes",this.getRangeAxisPosition({datum:e}),"mapsTo")}extendsDomain(e,t){const n=this.model.getOptions(),r=Um(n,"axes",e);return r.scaleType===F.TIME?function(e,t){const n=new Date(e[0]),r=new Date(e[1]);return function(e,t){const n=Ic(e),r=Ic(t),i=$w(n,r),o=Math.abs(function(e,t){const n=Ic(e),r=Ic(t);return n.getFullYear()-r.getFullYear()}(n,r));n.setFullYear(1584),r.setFullYear(1584);const a=i*(o-+($w(n,r)===-i));return 0===a?0:a}(r,n)>1?[jw(n,t),Bw(r,t)]:Fw(r,n)>1?[Uw(n,t),zw(r,t)]:function(e,t){const n=Ic(e),r=Ic(t),i=Hw(n,r),o=Math.abs(Xm(n,r));n.setDate(n.getDate()-i*o);const a=i*(o-+(Hw(n,r)===-i));return 0===a?0:a}(r,n)>1?[Zw(n,t),Vw(r,t)]:function(e,t,n){const r=Ww(e,t)/qm;return Gw(void 0)(r)}(r,n)>1?[Kw(n,t),Yw(r,t)]:Xw(r,n)>30?[Jw(n,30*t),Qw(r,30*t)]:Xw(r,n)>1?[Jw(n,t),Qw(r,t)]:e_(r,n)>15?[n_(n,15*t),t_(r,15*t)]:e_(r,n)>1?[n_(n,t),t_(r,t)]:[n,r]}(t,Um(n,"timeScale","addSpaceOnEdges")):function([e,t],n,r){const i=(t-e)*n,o=t<=0&&t+i>0?0:t+i;let a=e>=0&&e-i<0?0:e-i;if(r===F.LOG&&a<=0){if(e<=0)throw Error("Data must have values greater than 0 if log scale type is used.");a=e}return[a,o]}(t,.1,r.scaleType)}findVerticalAxesPositions(){const e=this.model.getOptions(),t=Um(e,"axes"),n=this.isDualAxes();return null===Um(t,$.LEFT)&&null!==Um(t,$.RIGHT)||!0===Um(t,$.RIGHT,"main")||n&&Um(t,$.LEFT,"correspondingDatasets")?{primary:$.RIGHT,secondary:$.LEFT}:{primary:$.LEFT,secondary:$.RIGHT}}findHorizontalAxesPositions(){const e=this.model.getOptions(),t=Um(e,"axes"),n=this.isDualAxes();return null===Um(t,$.BOTTOM)&&null!==Um(t,$.TOP)||!0===Um(t,$.TOP,"main")||n&&Um(t,$.BOTTOM,"correspondingDatasets")?{primary:$.TOP,secondary:$.BOTTOM}:{primary:$.BOTTOM,secondary:$.TOP}}findDomainAndRangeAxesPositions(e,t){const n=this.model.getOptions(),r=Um(n,"axes",e.primary),i=Um(n,"axes",t.primary),o=r.scaleType||F.LINEAR,a=i.scaleType||F.LINEAR,s={primaryDomainAxisPosition:null,secondaryDomainAxisPosition:null,primaryRangeAxisPosition:null,secondaryRangeAxisPosition:null};return s.primaryDomainAxisPosition=t.primary,s.primaryRangeAxisPosition=e.primary,s.secondaryDomainAxisPosition=t.secondary,s.secondaryRangeAxisPosition=e.secondary,(!(a===F.LABELS||a===F.TIME)&&o===F.LABELS||o===F.TIME)&&(s.primaryDomainAxisPosition=e.primary,s.primaryRangeAxisPosition=t.primary,s.secondaryDomainAxisPosition=e.secondary,s.secondaryRangeAxisPosition=t.secondary),s}getScaleDomain(e){const t=this.model.getOptions(),n=Um(t,"axes",e),r=Um(t,"bounds"),{includeZero:i}=n,o=Um(n,"scaleType")||F.LINEAR;if(this.model.isDataEmpty())return[];if(n.binned){const{bins:e}=this.model.getBinConfigurations();return[0,Ae(e,(e=>e.length))]}if(n.limitDomainToBins){const{bins:e}=this.model.getBinConfigurations(),t=this.model.getStackKeys({bins:e});return[t[0].split(":")[0],t[t.length-1].split(":")[1]]}const a=this.model.getDisplayData(),{extendLinearDomainBy:s,mapsTo:l,percentage:c,thresholds:u}=n,{reference:d,compareTo:h}=Vp;if(n.domain)return o===F.LABELS?n.domain:(o===F.TIME&&(n.domain=n.domain.map((e=>void 0===e.getTime?new Date(e):e))),this.extendsDomain(e,n.domain));if(c)return[0,100];if(n&&o===F.LABELS)return Bp(a.map((e=>e[l])));let f,p;const m=this.model.getDataGroupNames();if(o===F.LABELS_RATIO)return a.map((e=>`${e[d]}/${e[h]}`));if(o===F.TIME)p=a.map((e=>+new Date(e[l])));else if(r&&t.axes)p=[],a.forEach((e=>{p.push(e[l]),e[r.upperBoundMapsTo]&&p.push(e[r.upperBoundMapsTo]),e[r.lowerBoundMapsTo]&&p.push(e[r.lowerBoundMapsTo])}));else if(!0===n.stacked&&m&&e===this.getRangeAxisPosition()){const{groupMapsTo:e}=t.data,n=this.model.getDataValuesGroupedByKeys({groups:m}),r=a.filter((t=>!m.includes(t[e]))),i=[];n.forEach((e=>{const{...t}=e;let n=0,r=0;Object.values(t).forEach((e=>{isNaN(e)||(e<0?r+=e:n+=e)})),i.push([r,n])})),p=[...Dw(i),...r.map((e=>e[l]))]}else p=[],a.forEach((e=>{const t=e[l];Array.isArray(t)&&2===t.length?(p.push(t[0]),p.push(t[1])):(s&&p.push(Math.max(e[l],e[s])),p.push(t))}));return o!==F.TIME&&o!==F.LOG&&i&&p.push(0),u&&u.length>0&&u.forEach((e=>{const t=Um(e,"value");null!==t&&p.push(t)})),f=de(p),f=this.extendsDomain(e,f),f}createScale(e){const t=this.model.getOptions(),n=Um(t,"axes",e);if(!n)return null;const r=Um(n,"scaleType")||F.LINEAR;let i;return this.scaleTypes[e]=r,i=r===F.TIME?cl():r===F.LOG?Ko().base(n.base||10):r===F.LABELS||r===F.LABELS_RATIO?No():Uo(),i.domain(this.getScaleDomain(e)),i}getHighestDomainThreshold(){const e=Um(this.model.getOptions(),"axes"),t=this.getDomainAxisPosition(),{thresholds:n}=e[t];if(!Array.isArray(n)||Array.isArray(n)&&!n.length)return null;const r=this.getDomainScale(),i=n.sort(((e,t)=>t.value-e.value))[0];return this.getScaleTypeByPosition(t)===F.TIME&&("string"==typeof i.value||void 0===i.value.getTime)&&(i.value=new Date(i.value)),{threshold:i,scaleValue:r(i.value)}}getHighestRangeThreshold(){const e=Um(this.model.getOptions(),"axes"),t=this.getRangeAxisPosition(),{thresholds:n}=e[t];if(!Array.isArray(n)||Array.isArray(n)&&!n.length)return null;const r=this.getRangeScale(),i=n.sort(((e,t)=>t.value-e.value))[0];return{threshold:i,scaleValue:r(i.value)}}}class i_ extends kv{constructor(){super(...arguments),this.curveTypes={curveLinear:Dl,curveLinearClosed:cc,curveBasis:Fl,curveBasisClosed:Hl,curveBasisOpen:Zl,curveBundle:Gl,curveCardinal:Kl,curveCardinalClosed:Ql,curveCardinalOpen:ec,curveCatmullRom:rc,curveCatmullRomClosed:oc,curveCatmullRomOpen:sc,curveMonotoneX:vc,curveMonotoneY:yc,curveNatural:_c,curveStep:xc,curveStepAfter:Tc,curveStepBefore:Sc}}getD3Curve(){let e="curveLinear";const t=this.model.getOptions().curve;if(t&&(e="string"==typeof t?t:t.name),this.curveTypes[e]){let n=this.curveTypes[e];return t&&Object.keys(t).forEach((e=>{n[e]&&(n=n[e](t[e]))})),n}return console.warn(`The curve type '${e}' is invalid, using 'curveLinear' instead`),this.curveTypes.curveLinear}}class o_ extends kv{isZoomBarEnabled(){if(!this.services.cartesianScales||!Um(this.model.getOptions(),"zoomBar","top","enabled"))return!1;this.services.cartesianScales.findDomainAndRangeAxes();const e=this.services.cartesianScales.getMainXAxisPosition(),t=Um(this.model.getOptions(),"axes",e,"scaleType");return e===$.BOTTOM&&t===F.TIME}getZoomBarData(){const e=this.model.getZoomBarData();return e&&e.length>1?e:this.model.getDisplayData()}getDefaultZoomBarDomain(e){if(!this.services.zoom)throw new Error("Services zoom not defined");const t=e||this.services.zoom.getZoomBarData(),{cartesianScales:n}=this.services;if(!n)throw new Error("Services cartesianScales undefined");const r=n.getMainXAxisPosition(),i=n.getDomainIdentifier(),o=Um(this.model.getOptions(),"axes",r,"domain");if(Array.isArray(o)&&2===o.length)return o;if(!r)throw new Error("Not defined: mainXAxisPosition");return n.extendsDomain(r,de(t,(e=>e[i])))}handleDomainChange(e,t={dispatchEvent:!0}){var n;this.model.set({zoomDomain:e},{animate:!1}),t.dispatchEvent&&(null==(n=this.services.events)||n.dispatchEvent(R.ZoomDomain.CHANGE,{newDomain:e}))}getZoomRatio(){return Um(this.model.getOptions(),"zoomBar","zoomRatio")}filterDataForRangeAxis(e,t){var n;const r=this.model.get("zoomDomain"),i=Object.assign({stacked:!1},t),o=Um(this.model.getOptions(),"zoomBar","updateRangeAxis");if(this.isZoomBarEnabled()&&o&&r){const t=i.stacked?"sharedStackKey":null==(n=this.services.cartesianScales)?void 0:n.getDomainIdentifier(),o=e.filter((e=>new Date(e[t])>=r[0]&&new Date(e[t])<=r[1]));if(o.length>0)return o}return e}zoomIn(e=this.getZoomRatio()){var t;const n=this.model.get("zoomDomain"),r=tm.handleWidth,i=null==(t=this.services.cartesianScales)?void 0:t.getMainXScale().copy();i.domain(this.getDefaultZoomBarDomain());const o=i(n[0]),a=i(n[1]);if(a-o<r+1)return;const s=i.range(),l=a-o,c=Math.min((s[1]-s[0])/2*(e/2),l/2);let u=o+c,d=a-c;u>=d&&(u=o+l/2-r/2,d=a-l/2+r/2);const h=[i.invert(u),i.invert(d)];(n[0].valueOf()!==h[0].valueOf()||n[1].valueOf()!==h[1].valueOf())&&this.handleDomainChange(h)}zoomOut(e=this.getZoomRatio()){const t=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 r=n(t[0]),i=n(t[1]),o=n.range(),a=(o[1]-o[0])/2*(e/2),s=Math.max(r-a,o[0]),l=Math.min(i+a,o[1]),c=[n.invert(s),n.invert(l)];(t[0].valueOf()!==c[0].valueOf()||t[1].valueOf()!==c[1].valueOf())&&this.handleDomainChange(c)}resetZoomDomain(){const e=this.model.get("zoomDomain"),t=this.getDefaultZoomBarDomain();(e[0].valueOf()!==t[0].valueOf()||e[1].valueOf()!==t[1].valueOf())&&this.handleDomainChange(t)}isMinZoomDomain(){const e=this.model.get("zoomDomain"),t=this.getDefaultZoomBarDomain();return!(!e||!t)&&(e[1].valueOf()-e[0].valueOf())/(t[1].valueOf()-t[0].valueOf())<Um(this.model.getOptions(),"zoomBar","minZoomRatio")}isMaxZoomDomain(){const e=this.model.get("zoomDomain"),t=this.getDefaultZoomBarDomain();return!(!e||!t||e[0].valueOf()!==t[0].valueOf()||e[1].valueOf()!==t[1].valueOf())}isEmptyState(){return 0===this.getZoomBarData().length}isZoomBarLoading(e){return Um(this.model.getOptions(),"zoomBar",e,"loading")}isZoomBarLocked(e){return Um(this.model.getOptions(),"zoomBar",e,"locked")}}var a_=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function s_(e){return a_.test(e)}var l_="\\ud800-\\udfff",c_="["+l_+"]",u_="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",d_="\\ud83c[\\udffb-\\udfff]",h_="[^"+l_+"]",f_="(?:\\ud83c[\\udde6-\\uddff]){2}",p_="[\\ud800-\\udbff][\\udc00-\\udfff]",m_="(?:"+u_+"|"+d_+")?",g_="[\\ufe0e\\ufe0f]?",v_=g_+m_+"(?:\\u200d(?:"+[h_,f_,p_].join("|")+")"+g_+m_+")*",y_="(?:"+[h_+u_+"?",u_,f_,p_,c_].join("|")+")",b_=RegExp(d_+"(?="+d_+")|"+y_+v_,"g");var w_=function(e){var t=s_(e=Qd(e))?function(e){return s_(e)?function(e){return e.match(b_)||[]}(e):function(e){return e.split("")}(e)}(e):void 0,n=t?t[0]:e.charAt(0),r=t?function(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:function(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r<i;)o[r]=e[r+t];return o}(e,t,n)}(t,1).join(""):e.slice(1);return n.toUpperCase()+r};const __=w_;yy((function(e,t,n){return t=t.toLowerCase(),e+(n?function(e){return __(Qd(e).toLowerCase())}(t):t)}));class E_{constructor(e,t){this.components=[],this.services={canvasZoom:Rw,domUtils:Mv,events:Lw,files:Pw,gradientUtils:Nv,transitions:Iw},this.model=new $g(this.services)}init(e,t){this.model.set({holder:e},{skipUpdate:!0}),Object.keys(this.services).forEach((e=>{const t=this.services[e];this.services[e]=new t(this.model,this.services)})),this.services.events.addEventListener(R.Model.UPDATE,(e=>{const t=!!Um(e,"detail","animate");this.update(t)})),this.model.setData(t.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(e=!0){if(!this.components)return;Object.keys(this.services).forEach((e=>{this.services[e].update()})),this.components.forEach((t=>t.render(e)));const t=this.services.transitions.getPendingTransitions(),n=Object.keys(t).map((e=>t[e].end().catch((e=>e))));Promise.all(n).then((()=>this.services.events.dispatchEvent(R.Chart.RENDER_FINISHED)))}destroy(){this.components.forEach((e=>e.destroy())),this.services.domUtils.getHolder().remove(),this.model.set({destroyed:!0},{skipUpdate:!0})}getChartComponents(e,t){const n=this.model.getOptions(),r=Um(n,"toolbar","enabled"),i={id:"legend",components:[new sw(this.model,this.services)],growth:G.PREFERRED},o=Um(n,"canvasZoom","enabled");o&&!0===o&&e.push(new cw(this.model,this.services));const a=!!this.model.getOptions().title,s={id:"title",components:[new aw(this.model,this.services)],growth:G.STRETCH},l={id:"toolbar",components:[new yb(this.model,this.services)],growth:G.PREFERRED},c={id:"header",components:[new wb(this.model,this.services,[s,...r?[l]:[]],{direction:W.ROW,alignItems:q.CENTER})],growth:G.PREFERRED},u={id:"graph-frame",components:e,growth:G.STRETCH,renderType:Um(t,"graphFrameRenderType")||L.SVG},d=!0!==Um(t,"excludeLegend")&&!1!==n.legend.enabled;let h=W.COLUMN;if(d){const e=Um(n,"legend","position");"left"===e?(h=W.ROW,n.legend.orientation||(n.legend.orientation=V.VERTICAL)):"right"===e?(h=W.ROW_REVERSE,n.legend.orientation||(n.legend.orientation=V.VERTICAL)):"bottom"===e&&(h=W.COLUMN_REVERSE)}const f={id:"spacer",components:[new _b(this.model,this.services)],growth:G.PREFERRED},p={id:"full-frame",components:[new wb(this.model,this.services,[...d?[i]:[],...d?[f]:[],u],{direction:h})],growth:G.STRETCH},m=[];if(a||r){m.push(c);const e={id:"spacer",components:[new _b(this.model,this.services,r?{size:15}:void 0)],growth:G.PREFERRED};m.push(e)}return m.push(p),[new mw(this.model,this.services),new ow(this.model,this.services),new wb(this.model,this.services,m,{direction:W.COLUMN})]}}class x_ extends E_{constructor(e,t){super(e,t),this.services=Object.assign(this.services,{cartesianScales:r_,curves:i_,zoom:o_}),this.model=new zg(this.services)}getAxisChartComponents(e,t){const n=this.model.getOptions(),r=Um(n,"zoomBar",$.TOP,"enabled"),i=Um(n,"toolbar","enabled");this.services.cartesianScales.determineAxisDuality(),this.services.cartesianScales.findDomainAndRangeAxes(),this.services.cartesianScales.determineOrientation();const o=this.services.cartesianScales.getMainXAxisPosition(),a=Um(n,"axes",o,"scaleType"),s=r&&o===$.BOTTOM&&a===F.TIME,l=this.services.zoom.isZoomBarLocked($.TOP),c=!!this.model.getOptions().title,u={id:"title",components:[new aw(this.model,this.services)],growth:G.STRETCH},d={id:"toolbar",components:[new yb(this.model,this.services)],growth:G.PREFERRED},h={id:"header",components:[new wb(this.model,this.services,[u,...i?[d]:[]],{direction:W.ROW,alignItems:q.CENTER})],growth:G.PREFERRED},f={id:"legend",components:[new sw(this.model,this.services)],growth:G.PREFERRED};s&&!l&&e.push(new lw(this.model,this.services),new vw(this.model,this.services)),e.push(new bw(this.model,this.services)),e.push(new ww(this.model,this.services));const p={id:"graph-frame",components:e,growth:G.STRETCH,renderType:L.SVG},m=!1!==Um(t,"legend","enabled")&&!1!==this.model.getOptions().legend.enabled;let g=W.COLUMN;if(m){const e=Um(this.model.getOptions(),"legend","position");e===U.LEFT?(g=W.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=V.VERTICAL)):e===U.RIGHT?(g=W.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=V.VERTICAL)):e===U.BOTTOM&&(g=W.COLUMN_REVERSE)}const v={id:"spacer",components:[new _b(this.model,this.services)],growth:G.PREFERRED},y={id:"full-frame",components:[new wb(this.model,this.services,[...m?[f]:[],...m?[v]:[],p],{direction:g})],growth:G.STRETCH},b={id:"zoom-bar",components:[new yw(this.model,this.services)],growth:G.PREFERRED,renderType:L.SVG},w=[];if(c||i){w.push(h);const e={id:"spacer",components:[new _b(this.model,this.services,i?{size:15}:void 0)],growth:G.PREFERRED};w.push(e)}return s&&w.push(b),w.push(y),[new _w(this.model,this.services),new ow(this.model,this.services),new wb(this.model,this.services,w,{direction:W.COLUMN})]}}Q.LINE,Q.SCATTER,Q.AREA,Q.STACKED_AREA,Q.SIMPLE_BAR,Q.GROUPED_BAR,Q.STACKED_BAR;class S_ extends x_{constructor(e,t){super(e,t),this.model.setOptions(function(e,t){var n;const r=$f(e),i=Object.keys(t.axes||{});null!=(n=null==t?void 0:t.toolbar)&&n.controls&&delete r.toolbar.controls,0===i.length&&delete r.axes;for(const e in r.axes)if(i.includes(e)){const n=t.axes[e];if((n.primary||n.secondary)&&console.warn("`primary` & `secondary` are no longer needed for axis configurations. Read more here https://charts.carbondesignsystem.com/?path=/story/docs-tutorials--tabular-data-format"),null==n.mapsTo){const e=n.scaleType;null==e?n.mapsTo="value":e===F.TIME?n.mapsTo="date":e===F.LABELS&&(n.mapsTo="key")}}else delete r.axes[e];return Fm(r,t),Dp(r,t)}(zm.lineChart,t.options)),this.init(e,t)}getComponents(){const e=[new Cw(this.model,this.services),new Ew(this.model,this.services),new Sw(this.model,this.services),new xw(this.model,this.services),new Tw(this.model,this.services,{handleThresholds:!0}),new Nw(this.model,this.services),new Mw(this.model,this.services)];return this.getAxisChartComponents(e)}}var T_,O_={exports:{}},A_={};O_.exports=function(){if(T_)return A_;T_=1;var e=r,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function s(e,n,r){var s,l={},c=null,u=null;for(s in void 0!==r&&(c=""+r),void 0!==n.key&&(c=""+n.key),void 0!==n.ref&&(u=n.ref),n)i.call(n,s)&&!a.hasOwnProperty(s)&&(l[s]=n[s]);if(e&&e.defaultProps)for(s in n=e.defaultProps)void 0===l[s]&&(l[s]=n[s]);return{$$typeof:t,type:e,key:c,ref:u,props:l,_owner:o.current}}return A_.Fragment=n,A_.jsx=s,A_.jsxs=s,A_}();var C_=O_.exports;class k_ extends r.PureComponent{constructor(){super(...arguments),o(this,"chart"),o(this,"chartRef",r.createRef())}createChart(e,t,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(e){var t,n;this.props.data!==e.data&&(null==(t=this.chart)||t.model.setData(this.props.data)),this.props.options!==e.options&&(null==(n=this.chart)||n.model.setOptions(this.props.options))}render(){return C_.jsx("div",{ref:this.chartRef,className:"chart-holder"})}}class M_ extends k_{createChart(e,t,n){return new S_(e,{data:t,options:n})}}!function(e){!function(){var t={}.hasOwnProperty;function n(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=i(e,r(n)))}return e}function r(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return n.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var r="";for(var o in e)t.call(e,o)&&e[o]&&(r=i(r,o));return r}function i(e,t){return t?e?e+" "+t:e+t:e}e.exports?(n.default=n,e.exports=n):window.classNames=n}()}({exports:{}})},6300:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(8804);const i=function(e,t){for(var n=e.length;n--;)if((0,r.Z)(e[n][0],t))return n;return-1};var o=Array.prototype.splice;function a(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}a.prototype.clear=function(){this.__data__=[],this.size=0},a.prototype.delete=function(e){var t=this.__data__,n=i(t,e);return!(n<0||(n==t.length-1?t.pop():o.call(t,n,1),--this.size,0))},a.prototype.get=function(e){var t=this.__data__,n=i(t,e);return n<0?void 0:t[n][1]},a.prototype.has=function(e){return i(this.__data__,e)>-1},a.prototype.set=function(e,t){var n=this.__data__,r=i(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};const s=a},8896:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(2411),i=n(3221);const o=(0,r.Z)(i.Z,"Map")},3549:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});const r=(0,n(2411).Z)(Object,"create");var i=Object.prototype.hasOwnProperty;var o=Object.prototype.hasOwnProperty;function a(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}a.prototype.clear=function(){this.__data__=r?r(null):{},this.size=0},a.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},a.prototype.get=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(t,e)?t[e]:void 0},a.prototype.has=function(e){var t=this.__data__;return r?void 0!==t[e]:o.call(t,e)},a.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this};const s=a;var l=n(6300),c=n(8896);const u=function(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map};function d(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}d.prototype.clear=function(){this.size=0,this.__data__={hash:new s,map:new(c.Z||l.Z),string:new s}},d.prototype.delete=function(e){var t=u(this,e).delete(e);return this.size-=t?1:0,t},d.prototype.get=function(e){return u(this,e).get(e)},d.prototype.has=function(e){return u(this,e).has(e)},d.prototype.set=function(e,t){var n=u(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};const h=d},7459:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(2411),i=n(3221);const o=(0,r.Z)(i.Z,"Set")},463:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(3549);function i(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r.Z;++t<n;)this.add(e[t])}i.prototype.add=i.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},i.prototype.has=function(e){return this.__data__.has(e)};const o=i},187:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=n(3221).Z.Symbol},1960:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}},8147:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(187),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=r.Z?r.Z.toStringTag:void 0;var l=Object.prototype.toString;var c=r.Z?r.Z.toStringTag:void 0;const u=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":c&&c in Object(e)?function(e){var t=o.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var i=a.call(e);return r&&(t?e[s]=n:delete e[s]),i}(e):function(e){return l.call(e)}(e)}},8233:(e,t,n)=>{"use strict";n.d(t,{Z:()=>ue});var r=n(6300);var i=n(8896),o=n(3549);function a(e){var t=this.__data__=new r.Z(e);this.size=t.size}a.prototype.clear=function(){this.__data__=new r.Z,this.size=0},a.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},a.prototype.get=function(e){return this.__data__.get(e)},a.prototype.has=function(e){return this.__data__.has(e)},a.prototype.set=function(e,t){var n=this.__data__;if(n instanceof r.Z){var a=n.__data__;if(!i.Z||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new o.Z(a)}return n.set(e,t),this.size=n.size,this};const s=a;var l=n(463);const c=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1};var u=n(1749);const d=function(e,t,n,r,i,o){var a=1&n,s=e.length,d=t.length;if(s!=d&&!(a&&d>s))return!1;var h=o.get(e),f=o.get(t);if(h&&f)return h==t&&f==e;var p=-1,m=!0,g=2&n?new l.Z:void 0;for(o.set(e,t),o.set(t,e);++p<s;){var v=e[p],y=t[p];if(r)var b=a?r(y,v,p,t,e,o):r(v,y,p,e,t,o);if(void 0!==b){if(b)continue;m=!1;break}if(g){if(!c(t,(function(e,t){if(!(0,u.Z)(g,t)&&(v===e||i(v,e,n,r,o)))return g.push(t)}))){m=!1;break}}else if(v!==y&&!i(v,y,n,r,o)){m=!1;break}}return o.delete(e),o.delete(t),m};var h=n(187);const f=n(3221).Z.Uint8Array;var p=n(8804);const m=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n};var g=n(3249),v=h.Z?h.Z.prototype:void 0,y=v?v.valueOf:void 0;var b=n(7885);var w=Object.prototype.propertyIsEnumerable,_=Object.getOwnPropertySymbols;const E=_?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}(_(e),(function(t){return w.call(e,t)})))}:function(){return[]};var x=n(2198);const S=function(e){return function(e,t,n){var r=t(e);return(0,b.Z)(e)?r:function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}(r,n(e))}(e,x.Z,E)};var T=Object.prototype.hasOwnProperty;var O=n(2263),A=n(2143),C=n(2663),k="[object Arguments]",M="[object Array]",N="[object Object]",D=Object.prototype.hasOwnProperty;const R=function(e,t,n,r,i,o){var a=(0,b.Z)(e),l=(0,b.Z)(t),c=a?M:(0,O.Z)(e),u=l?M:(0,O.Z)(t),h=(c=c==k?N:c)==N,v=(u=u==k?N:u)==N,w=c==u;if(w&&(0,A.Z)(e)){if(!(0,A.Z)(t))return!1;a=!0,h=!1}if(w&&!h)return o||(o=new s),a||(0,C.Z)(e)?d(e,t,n,r,i,o):function(e,t,n,r,i,o,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!o(new f(e),new f(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return(0,p.Z)(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=m;case"[object Set]":var l=1&r;if(s||(s=g.Z),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var u=d(s(e),s(t),r,i,o,a);return a.delete(e),u;case"[object Symbol]":if(y)return y.call(e)==y.call(t)}return!1}(e,t,c,n,r,i,o);if(!(1&n)){var _=h&&D.call(e,"__wrapped__"),E=v&&D.call(t,"__wrapped__");if(_||E){var x=_?e.value():e,R=E?t.value():t;return o||(o=new s),i(x,R,n,r,o)}}return!!w&&(o||(o=new s),function(e,t,n,r,i,o){var a=1&n,s=S(e),l=s.length;if(l!=S(t).length&&!a)return!1;for(var c=l;c--;){var u=s[c];if(!(a?u in t:T.call(t,u)))return!1}var d=o.get(e),h=o.get(t);if(d&&h)return d==t&&h==e;var f=!0;o.set(e,t),o.set(t,e);for(var p=a;++c<l;){var m=e[u=s[c]],g=t[u];if(r)var v=a?r(g,m,u,t,e,o):r(m,g,u,e,t,o);if(!(void 0===v?m===g||i(m,g,n,r,o):v)){f=!1;break}p||(p="constructor"==u)}if(f&&!p){var y=e.constructor,b=t.constructor;y==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b||(f=!1)}return o.delete(e),o.delete(t),f}(e,t,n,r,i,o))};var L=n(3391);const P=function e(t,n,r,i,o){return t===n||(null==t||null==n||!(0,L.Z)(t)&&!(0,L.Z)(n)?t!=t&&n!=n:R(t,n,r,i,e,o))};var I=n(3122);const $=function(e){return e==e&&!(0,I.Z)(e)},z=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}},B=function(e){var t=function(e){for(var t=(0,x.Z)(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,$(i)]}return t}(e);return 1==t.length&&t[0][2]?z(t[0][0],t[0][1]):function(n){return n===e||function(e,t,n,r){var i=n.length,o=i,a=!r;if(null==e)return!o;for(e=Object(e);i--;){var l=n[i];if(a&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i<o;){var c=(l=n[i])[0],u=e[c],d=l[1];if(a&&l[2]){if(void 0===u&&!(c in e))return!1}else{var h=new s;if(r)var f=r(u,d,c,e,t,h);if(!(void 0===f?P(d,u,3,r,h):f))return!1}}return!0}(n,e,t)}};var j=n(2758),F=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,U=/^\w*$/;const H=function(e,t){if((0,b.Z)(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!(0,j.Z)(e))||U.test(e)||!F.test(e)||null!=t&&e in Object(t)};function V(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(V.Cache||o.Z),n}V.Cache=o.Z;var Z=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,W=/\\(\\)?/g;const G=(q=V((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Z,(function(e,n,r,i){t.push(r?i.replace(W,"$1"):n||e)})),t}),(function(e){return 500===Y.size&&Y.clear(),e})),Y=q.cache,q);var q,Y;var K=h.Z?h.Z.prototype:void 0,X=K?K.toString:void 0;const Q=function e(t){if("string"==typeof t)return t;if((0,b.Z)(t))return function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}(t,e)+"";if((0,j.Z)(t))return X?X.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n},J=function(e,t){return(0,b.Z)(e)?e:H(e,t)?[e]:G(function(e){return null==e?"":Q(e)}(e))},ee=function(e){if("string"==typeof e||(0,j.Z)(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t},te=function(e,t){for(var n=0,r=(t=J(t,e)).length;null!=e&&n<r;)e=e[ee(t[n++])];return n&&n==r?e:void 0},ne=function(e,t){return null!=e&&t in Object(e)};var re=n(4405),ie=n(6401),oe=n(1164);const ae=function(e,t){return null!=e&&function(e,t,n){for(var r=-1,i=(t=J(t,e)).length,o=!1;++r<i;){var a=ee(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&(0,oe.Z)(i)&&(0,ie.Z)(a,i)&&((0,b.Z)(e)||(0,re.Z)(e))}(e,t,ne)},se=function(e,t){return H(e)&&$(t)?z(ee(e),t):function(n){var r=function(e,t,n){var r=null==e?void 0:te(e,t);return void 0===r?n:r}(n,e);return void 0===r&&r===t?ae(n,e):P(t,r,3)}},le=function(e){return e},ce=function(e){return H(e)?(t=ee(e),function(e){return null==e?void 0:e[t]}):function(e){return function(t){return te(t,e)}}(e);var t},ue=function(e){return"function"==typeof e?e:null==e?le:"object"==typeof e?(0,b.Z)(e)?se(e[0],e[1]):B(e):ce(e)}},5986:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(5441);const i=(o=Object.keys,a=Object,function(e){return o(a(e))});var o,a,s=Object.prototype.hasOwnProperty;const l=function(e){if(!(0,r.Z)(e))return i(e);var t=[];for(var n in Object(e))s.call(e,n)&&"constructor"!=n&&t.push(n);return t}},1749:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e,t){return e.has(t)}},2168:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r="object"==typeof global&&global&&global.Object===Object&&global},2411:(e,t,n)=>{"use strict";n.d(t,{Z:()=>g});var r=n(8936);const i=n(3221).Z["__core-js_shared__"];var o,a=(o=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+o:"";var s=n(3122),l=n(6682),c=/^\[object .+?Constructor\]$/,u=Function.prototype,d=Object.prototype,h=u.toString,f=d.hasOwnProperty,p=RegExp("^"+h.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const m=function(e){return!(!(0,s.Z)(e)||(t=e,a&&a in t))&&((0,r.Z)(e)?p:c).test((0,l.Z)(e));var t},g=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return m(n)?n:void 0}},2263:(e,t,n)=>{"use strict";n.d(t,{Z:()=>x});var r=n(2411),i=n(3221);const o=(0,r.Z)(i.Z,"DataView");var a=n(8896);const s=(0,r.Z)(i.Z,"Promise");var l=n(7459);const c=(0,r.Z)(i.Z,"WeakMap");var u=n(8147),d=n(6682),h="[object Map]",f="[object Promise]",p="[object Set]",m="[object WeakMap]",g="[object DataView]",v=(0,d.Z)(o),y=(0,d.Z)(a.Z),b=(0,d.Z)(s),w=(0,d.Z)(l.Z),_=(0,d.Z)(c),E=u.Z;(o&&E(new o(new ArrayBuffer(1)))!=g||a.Z&&E(new a.Z)!=h||s&&E(s.resolve())!=f||l.Z&&E(new l.Z)!=p||c&&E(new c)!=m)&&(E=function(e){var t=(0,u.Z)(e),n="[object Object]"==t?e.constructor:void 0,r=n?(0,d.Z)(n):"";if(r)switch(r){case v:return g;case y:return h;case b:return f;case w:return p;case _:return m}return t});const x=E},6401:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=/^(?:0|[1-9]\d*)$/;const i=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&r.test(e))&&e>-1&&e%1==0&&e<t}},5441:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=Object.prototype;const i=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||r)}},3221:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(2168),i="object"==typeof self&&self&&self.Object===Object&&self;const o=r.Z||i||Function("return this")()},3249:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},6682:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=Function.prototype.toString;const i=function(e){if(null!=e){try{return r.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},8804:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e,t){return e===t||e!=e&&t!=t}},4405:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(8147),i=n(3391);const o=function(e){return(0,i.Z)(e)&&"[object Arguments]"==(0,r.Z)(e)};var a=Object.prototype,s=a.hasOwnProperty,l=a.propertyIsEnumerable;const c=o(function(){return arguments}())?o:function(e){return(0,i.Z)(e)&&s.call(e,"callee")&&!l.call(e,"callee")}},7885:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=Array.isArray},3282:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(8936),i=n(1164);const o=function(e){return null!=e&&(0,i.Z)(e.length)&&!(0,r.Z)(e)}},2143:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(3221);var i="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=i&&"object"==typeof module&&module&&!module.nodeType&&module,a=o&&o.exports===i?r.Z.Buffer:void 0;const s=(a?a.isBuffer:void 0)||function(){return!1}},8936:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(8147),i=n(3122);const o=function(e){if(!(0,i.Z)(e))return!1;var t=(0,r.Z)(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1164:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},3122:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},3391:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e){return null!=e&&"object"==typeof e}},2758:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(8147),i=n(3391);const o=function(e){return"symbol"==typeof e||(0,i.Z)(e)&&"[object Symbol]"==(0,r.Z)(e)}},2663:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});var r=n(8147),i=n(1164),o=n(3391),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1;var s=n(2168),l="object"==typeof exports&&exports&&!exports.nodeType&&exports,c=l&&"object"==typeof module&&module&&!module.nodeType&&module,u=c&&c.exports===l&&s.Z.process,d=function(){try{return c&&c.require&&c.require("util").types||u&&u.binding&&u.binding("util")}catch(e){}}(),h=d&&d.isTypedArray;const f=h?(p=h,function(e){return p(e)}):function(e){return(0,o.Z)(e)&&(0,i.Z)(e.length)&&!!a[(0,r.Z)(e)]};var p},2198:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var r=n(4405),i=n(7885),o=n(2143),a=n(6401),s=n(2663),l=Object.prototype.hasOwnProperty;const c=function(e,t){var n=(0,i.Z)(e),c=!n&&(0,r.Z)(e),u=!n&&!c&&(0,o.Z)(e),d=!n&&!c&&!u&&(0,s.Z)(e),h=n||c||u||d,f=h?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],p=f.length;for(var m in e)!t&&!l.call(e,m)||h&&("length"==m||u&&("offset"==m||"parent"==m)||d&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||(0,a.Z)(m,p))||f.push(m);return f};var u=n(5986),d=n(3282);const h=function(e){return(0,d.Z)(e)?c(e):(0,u.Z)(e)}},3255:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>l,kY:()=>o.useSWRConfig});var r=n(7900),i=n(3100),o=n(3325);const a=r.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;throw"rejected"===e.status?e.reason:(e.status="pending",e.then((t=>{e.status="fulfilled",e.value=t}),(t=>{e.status="rejected",e.reason=t})),e)}),s={dedupe:!0},l=(o.OBJECT.defineProperty(o.SWRConfig,"defaultValue",{value:o.defaultConfig}),(0,o.withArgs)(((e,t,n)=>{const{cache:l,compare:c,suspense:u,fallbackData:d,revalidateOnMount:h,revalidateIfStale:f,refreshInterval:p,refreshWhenHidden:m,refreshWhenOffline:g,keepPreviousData:v}=n,[y,b,w,_]=o.SWRGlobalState.get(l),[E,x]=(0,o.serialize)(e),S=(0,r.useRef)(!1),T=(0,r.useRef)(!1),O=(0,r.useRef)(E),A=(0,r.useRef)(t),C=(0,r.useRef)(n),k=()=>C.current,M=()=>k().isVisible()&&k().isOnline(),[N,D,R,L]=(0,o.createCacheHelper)(l,E),P=(0,r.useRef)({}).current,I=(0,o.isUndefined)(d)?n.fallback[E]:d,$=(e,t)=>{for(const n in P){const r=n;if("data"===r){if(!c(e[r],t[r])){if(!(0,o.isUndefined)(e[r]))return!1;if(!c(W,t[r]))return!1}}else if(t[r]!==e[r])return!1}return!0},z=(0,r.useMemo)((()=>{const e=!!E&&!!t&&((0,o.isUndefined)(h)?!k().isPaused()&&!u&&(!!(0,o.isUndefined)(f)||f):h),n=t=>{const n=(0,o.mergeObjects)(t);return delete n._k,e?{isValidating:!0,isLoading:!0,...n}:n},r=N(),i=L(),a=n(r),s=r===i?a:n(i);let l=a;return[()=>{const e=n(N());return $(e,l)?(l.data=e.data,l.isLoading=e.isLoading,l.isValidating=e.isValidating,l.error=e.error,l):(l=e,e)},()=>s]}),[l,E]),B=(0,i.useSyncExternalStore)((0,r.useCallback)((e=>R(E,((t,n)=>{$(n,t)||e()}))),[l,E]),z[0],z[1]),j=!S.current,F=y[E]&&y[E].length>0,U=B.data,H=(0,o.isUndefined)(U)?I:U,V=B.error,Z=(0,r.useRef)(H),W=v?(0,o.isUndefined)(U)?Z.current:U:H,G=!(F&&!(0,o.isUndefined)(V))&&(j&&!(0,o.isUndefined)(h)?h:!k().isPaused()&&(u?!(0,o.isUndefined)(H)&&f:(0,o.isUndefined)(H)||f)),q=!!(E&&t&&j&&G),Y=(0,o.isUndefined)(B.isValidating)?q:B.isValidating,K=(0,o.isUndefined)(B.isLoading)?q:B.isLoading,X=(0,r.useCallback)((async e=>{const t=A.current;if(!E||!t||T.current||k().isPaused())return!1;let r,i,a=!0;const s=e||{},l=!w[E]||!s.dedupe,u=()=>o.IS_REACT_LEGACY?!T.current&&E===O.current&&S.current:E===O.current,d={isValidating:!1,isLoading:!1},h=()=>{D(d)},f=()=>{const e=w[E];e&&e[1]===i&&delete w[E]},p={isValidating:!0};(0,o.isUndefined)(N().data)&&(p.isLoading=!0);try{if(l&&(D(p),n.loadingTimeout&&(0,o.isUndefined)(N().data)&&setTimeout((()=>{a&&u()&&k().onLoadingSlow(E,n)}),n.loadingTimeout),w[E]=[t(x),(0,o.getTimestamp)()]),[r,i]=w[E],r=await r,l&&setTimeout(f,n.dedupingInterval),!w[E]||w[E][1]!==i)return l&&u()&&k().onDiscarded(E),!1;d.error=o.UNDEFINED;const e=b[E];if(!(0,o.isUndefined)(e)&&(i<=e[0]||i<=e[1]||0===e[1]))return h(),l&&u()&&k().onDiscarded(E),!1;const s=N().data;d.data=c(s,r)?s:r,l&&u()&&k().onSuccess(r,E,n)}catch(e){f();const t=k(),{shouldRetryOnError:n}=t;t.isPaused()||(d.error=e,l&&u()&&(t.onError(e,E,t),(!0===n||(0,o.isFunction)(n)&&n(e))&&M()&&t.onErrorRetry(e,E,t,(e=>{const t=y[E];t&&t[0]&&t[0](o.revalidateEvents.ERROR_REVALIDATE_EVENT,e)}),{retryCount:(s.retryCount||0)+1,dedupe:!0})))}return a=!1,h(),!0}),[E,l]),Q=(0,r.useCallback)(((...e)=>(0,o.internalMutate)(l,O.current,...e)),[]);if((0,o.useIsomorphicLayoutEffect)((()=>{A.current=t,C.current=n,(0,o.isUndefined)(U)||(Z.current=U)})),(0,o.useIsomorphicLayoutEffect)((()=>{if(!E)return;const e=X.bind(o.UNDEFINED,s);let t=0;const n=(0,o.subscribeCallback)(E,y,((n,r={})=>{if(n==o.revalidateEvents.FOCUS_EVENT){const n=Date.now();k().revalidateOnFocus&&n>t&&M()&&(t=n+k().focusThrottleInterval,e())}else if(n==o.revalidateEvents.RECONNECT_EVENT)k().revalidateOnReconnect&&M()&&e();else{if(n==o.revalidateEvents.MUTATE_EVENT)return X();if(n==o.revalidateEvents.ERROR_REVALIDATE_EVENT)return X(r)}}));return T.current=!1,O.current=E,S.current=!0,D({_k:x}),G&&((0,o.isUndefined)(H)||o.IS_SERVER?e():(0,o.rAF)(e)),()=>{T.current=!0,n()}}),[E]),(0,o.useIsomorphicLayoutEffect)((()=>{let e;function t(){const t=(0,o.isFunction)(p)?p(N().data):p;t&&-1!==e&&(e=setTimeout(n,t))}function n(){N().error||!m&&!k().isVisible()||!g&&!k().isOnline()?t():X(s).then(t)}return t(),()=>{e&&(clearTimeout(e),e=-1)}}),[p,m,g,E]),(0,r.useDebugValue)(W),u&&(0,o.isUndefined)(H)&&E){if(!o.IS_REACT_LEGACY&&o.IS_SERVER)throw new Error("Fallback data is required when using suspense in SSR.");A.current=t,C.current=n,T.current=!1;const e=_[E];if(!(0,o.isUndefined)(e)){const t=Q(e);a(t)}if(!(0,o.isUndefined)(V))throw V;{const e=X(s);(0,o.isUndefined)(W)||(e.status="fulfilled",e.value=!0),a(e)}}return{mutate:Q,get data(){return P.data=!0,W},get error(){return P.error=!0,V},get isValidating(){return P.isValidating=!0,Y},get isLoading(){return P.isLoading=!0,K}}})))}},r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var o=r[e]={id:e,loaded:!1,exports:{}};return n[e].call(o.exports,o,o.exports,i),o.loaded=!0,o.exports}i.m=n,i.c=r,i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((t,n)=>(i.f[n](e,t),t)),[])),i.u=e=>e+".js",i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="@openmrs/esm-generic-patient-widgets-app:",i.l=(n,r,o,a)=>{if(e[n])e[n].push(r);else{var s,l;if(void 0!==o)for(var c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var d=c[u];if(d.getAttribute("src")==n||d.getAttribute("data-webpack")==t+o){s=d;break}}s||(l=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,i.nc&&s.setAttribute("nonce",i.nc),s.setAttribute("data-webpack",t+o),s.src=n),e[n]=[r];var h=(t,r)=>{s.onerror=s.onload=null,clearTimeout(f);var i=e[n];if(delete e[n],s.parentNode&&s.parentNode.removeChild(s),i&&i.forEach((e=>e(r))),t)return t(r)},f=setTimeout(h.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=h.bind(null,s.onerror),s.onload=h.bind(null,s.onload),l&&document.head.appendChild(s)}},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{i.S={};var e={},t={};i.I=(n,r)=>{r||(r=[]);var o=t[n];if(o||(o=t[n]={}),!(r.indexOf(o)>=0)){if(r.push(o),e[n])return e[n];i.o(i.S,n)||(i.S[n]={});var a=i.S[n],s="@openmrs/esm-generic-patient-widgets-app",l=(e,t,n,r)=>{var i=a[e]=a[e]||{},o=i[t];(!o||!o.loaded&&(!r!=!o.eager?r:s>o.from))&&(i[t]={get:n,from:s,eager:!!r})},c=[];return"default"===n&&(l("@openmrs/esm-framework","5.6.1-pre.1955",(()=>Promise.all([i.e(130),i.e(900)]).then((()=>()=>i(130))))),l("@openmrs/esm-patient-common-lib","8.0.2-pre.4821",(()=>Promise.all([i.e(255),i.e(663),i.e(900),i.e(325),i.e(878),i.e(868)]).then((()=>()=>i(9878))))),l("react-i18next","11.18.6",(()=>Promise.all([i.e(443),i.e(900)]).then((()=>()=>i(443))))),l("react-router-dom","6.16.0",(()=>Promise.all([i.e(591),i.e(900)]).then((()=>()=>i(6591))))),l("react","18.3.1",(()=>i.e(784).then((()=>()=>i(2784))))),l("swr/_internal","2.2.4",(()=>Promise.all([i.e(729),i.e(900)]).then((()=>()=>i(4729))))),l("swr/immutable","2.2.4",(()=>Promise.all([i.e(255),i.e(900),i.e(325),i.e(303)]).then((()=>()=>i(2303)))))),e[n]=c.length?Promise.all(c).then((()=>e[n]=1)):1}}})(),(()=>{var e;i.g.importScripts&&(e=i.g.location+"");var t=i.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&!e;)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e})(),(()=>{var e=e=>{var t=e=>e.split(".").map((e=>+e==e?+e:e)),n=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(e),r=n[1]?t(n[1]):[];return n[2]&&(r.length++,r.push.apply(r,t(n[2]))),n[3]&&(r.push([]),r.push.apply(r,t(n[3]))),r},t=e=>{var n=e[0],r="";if(1===e.length)return"*";if(n+.5){r+=0==n?">=":-1==n?"<":1==n?"^":2==n?"~":n>0?"=":"!=";for(var i=1,o=1;o<e.length;o++)i--,r+="u"==(typeof(s=e[o]))[0]?"-":(i>0?".":"")+(i=2,s);return r}var a=[];for(o=1;o<e.length;o++){var s=e[o];a.push(0===s?"not("+l()+")":1===s?"("+l()+" || "+l()+")":2===s?a.pop()+" "+a.pop():t(s))}return l();function l(){return a.pop().replace(/^\((.+)\)$/,"$1")}},n=(t,r)=>{if(0 in t){r=e(r);var i=t[0],o=i<0;o&&(i=-i-1);for(var a=0,s=1,l=!0;;s++,a++){var c,u,d=s<t.length?(typeof t[s])[0]:"";if(a>=r.length||"o"==(u=(typeof(c=r[a]))[0]))return!l||("u"==d?s>i&&!o:""==d!=o);if("u"==u){if(!l||"u"!=d)return!1}else if(l)if(d==u)if(s<=i){if(c!=t[s])return!1}else{if(o?c>t[s]:c<t[s])return!1;c!=t[s]&&(l=!1)}else if("s"!=d&&"n"!=d){if(o||s<=i)return!1;l=!1,s--}else{if(s<=i||u<d!=o)return!1;l=!1}else"s"!=d&&"n"!=d&&(l=!1,s--)}}var h=[],f=h.pop.bind(h);for(a=1;a<t.length;a++){var p=t[a];h.push(1==p?f()|f():2==p?f()&f():p?n(p,r):!f())}return!!f()},r=(t,n)=>{var r=t[n];return Object.keys(r).reduce(((t,n)=>!t||!r[t].loaded&&((t,n)=>{t=e(t),n=e(n);for(var r=0;;){if(r>=t.length)return r<n.length&&"u"!=(typeof n[r])[0];var i=t[r],o=(typeof i)[0];if(r>=n.length)return"u"==o;var a=n[r],s=(typeof a)[0];if(o!=s)return"o"==o&&"n"==s||"s"==s||"u"==o;if("o"!=o&&"u"!=o&&i!=a)return i<a;r++}})(t,n)?n:t),0)},o=(e,i,o,l)=>{var c=r(e,o);return n(l,c)||a(((e,n,r,i)=>"Unsatisfied version "+r+" from "+(r&&e[n][r].from)+" of shared singleton module "+n+" (required "+t(i)+")")(e,o,c,l)),s(e[o][c])},a=e=>{"undefined"!=typeof console&&console.warn&&console.warn(e)},s=e=>(e.loaded=1,e.get()),l=(e=>function(t,n,r,o){var a=i.I(t);return a&&a.then?a.then(e.bind(e,t,i.S[t],n,r,o)):e(t,i.S[t],n,r,o)})(((e,t,n,r,a)=>t&&i.o(t,n)?o(t,0,n,r):a())),c={},u={8744:()=>l("default","react-router-dom",[1,6],(()=>i.e(591).then((()=>()=>i(6591))))),9198:()=>l("default","swr/immutable",[1,2],(()=>i.e(152).then((()=>()=>i(2303))))),7900:()=>l("default","react",[1,18,2,0],(()=>i.e(784).then((()=>()=>i(2784))))),3325:()=>l("default","swr/_internal",[1,2],(()=>i.e(729).then((()=>()=>i(4729))))),884:()=>l("default","@openmrs/esm-patient-common-lib",[1,8],(()=>i.e(878).then((()=>()=>i(9878))))),2870:()=>l("default","@openmrs/esm-framework",[1,5],(()=>i.e(130).then((()=>()=>i(130))))),4924:()=>l("default","react-i18next",[1,11],(()=>i.e(443).then((()=>()=>i(443)))))};[2870,7900,4924,884,3325].forEach((e=>{i.m[e]=t=>{c[e]=0,delete i.c[e];var n=u[e]();if("function"!=typeof n)throw new Error("Shared module is not available for eager consumption: "+e);t.exports=n()}}));var d={325:[3325],868:[884,2870,4924],878:[8744,9198],900:[7900]};i.f.consumes=(e,t)=>{i.o(d,e)&&d[e].forEach((e=>{if(i.o(c,e))return t.push(c[e]);var n=t=>{c[e]=0,i.m[e]=n=>{delete i.c[e],n.exports=t()}},r=t=>{delete c[e],i.m[e]=n=>{throw delete i.c[e],t}};try{var o=u[e]();o.then?t.push(c[e]=o.then(n).catch(r)):n(o)}catch(e){r(e)}}))}})(),(()=>{var e={179:0,868:0,900:0,210:0,255:0,663:0,962:0,325:0};i.f.j=(t,n)=>{var r=i.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else if(/^(325|868|900)$/.test(t))e[t]=0;else{var o=new Promise(((n,i)=>r=e[t]=[n,i]));n.push(r[2]=o);var a=i.p+i.u(t),s=new Error;i.l(a,(n=>{if(i.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),a=n&&n.target&&n.target.src;s.message="Loading chunk "+t+" failed.\n("+o+": "+a+")",s.name="ChunkLoadError",s.type=o,s.request=a,r[1](s)}}),"chunk-"+t,t)}};var t=(t,n)=>{var r,o,[a,s,l]=n,c=0;if(a.some((t=>0!==e[t]))){for(r in s)i.o(s,r)&&(i.m[r]=s[r]);l&&l(i)}for(t&&t(n);c<a.length;c++)o=a[c],i.o(e,o)&&e[o]&&e[o][0](),e[o]=0},n=globalThis.webpackChunk_openmrs_esm_generic_patient_widgets_app=globalThis.webpackChunk_openmrs_esm_generic_patient_widgets_app||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),i.nc=void 0,i(7210)})();
2
+ (()=>{var e,t,n={7604:(e,t,n)=>{"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}n.d(t,{Z:()=>p});var s=["width","height","viewBox"],l=["tabindex"],c={focusable:"false",preserveAspectRatio:"xMidYMid meet"};var u=n(3980),d=n.n(u),h=n(7900),f=n.n(h);const p=f().forwardRef((function(e,t){let{className:n,children:r,tabIndex:o,xmlns:u="http://www.w3.org/2000/svg",preserveAspectRatio:d="xMidYMid meet",...h}=e;const{tabindex:p,...m}=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.width,n=e.height,r=e.viewBox,o=void 0===r?"0 0 ".concat(t," ").concat(n):r,u=a(e,s),d=u.tabindex,h=a(u,l),f=i(i(i({},c),h),{},{width:t,height:n,viewBox:o});return f["aria-label"]||f["aria-labelledby"]||f.title?(f.role="img",null!=d&&(f.focusable="true",f.tabindex=d)):f["aria-hidden"]=!0,f}({...h,tabindex:o}),g=m;return n&&(g.className=n),null!=p&&(g.tabIndex="number"==typeof p?p:Number(o)),t&&(g.ref=t),u&&(g.xmlns=u),d&&(g.preserveAspectRatio=d),f().createElement("svg",g,r)}));p.displayName="Icon",p.propTypes={"aria-hidden":d().oneOfType([d().bool,d().oneOf(["true","false"])]),"aria-label":d().string,"aria-labelledby":d().string,children:d().node,className:d().string,height:d().oneOfType([d().number,d().string]),preserveAspectRatio:d().string,tabIndex:d().oneOfType([d().number,d().string]),viewBox:d().string,width:d().oneOfType([d().number,d().string]),xmlns:d().string}},5508:(e,t,n)=>{"use strict";n.d(t,{iA:()=>s});var r,i=n(7900),o=n.n(i),a=n(7604);const s=o().forwardRef((function(e,t){let{children:n,size:i=16,...s}=e;return o().createElement(a.Z,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...s},r||(r=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"})),n)}))},2074:(e,t,n)=>{"use strict";n.d(t,{BV:()=>k,XZ:()=>C,_M:()=>N,_Q:()=>R,eA:()=>A,kF:()=>M,s$:()=>D});var r,i,o,a,s,l,c,u,d,h,f,p,m,g,v,y,b,w,_,E,x,S=n(7900),T=n.n(S),O=n(7604);const A=T().forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return T().createElement(O.Z,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},r||(r=T().createElement("path",{d:"M13,15c1.4854,0,2.5544,1.4966,3.6863,3.0811C17.9983,19.918,19.4854,22,22,22c5.6709,0,7.78-10.79,8-12l-1.9678-.3584C27.55,12.2827,25.3938,20,22,20c-1.4854,0-2.5544-1.4966-3.6863-3.0811C17.0017,15.082,15.5146,13,13,13c-4.186,0-7.4448,7.4043-9,11.7617V2H2V28a2.0025,2.0025,0,0,0,2,2H30V28H5.0439C6.5544,22.8574,9.9634,15,13,15Z"})),n)})),C=T().forwardRef((function(e,t){let{children:n,size:r=16,...o}=e;return T().createElement(O.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},i||(i=T().createElement("path",{d:"M26,4H6A2,2,0,0,0,4,6V26a2,2,0,0,0,2,2H26a2,2,0,0,0,2-2V6A2,2,0,0,0,26,4ZM6,26V6H26V26Z"})),n)})),k=T().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return T().createElement(O.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},o||(o=T().createElement("path",{d:"M26,4H6A2,2,0,0,0,4,6V26a2,2,0,0,0,2,2H26a2,2,0,0,0,2-2V6A2,2,0,0,0,26,4ZM14,21.5,9,16.5427,10.5908,15,14,18.3456,21.4087,11l1.5918,1.5772Z"})),a||(a=T().createElement("path",{fill:"none",d:"M14,21.5,9,16.5427,10.5908,15,14,18.3456,21.4087,11l1.5918,1.5772Z","data-icon-path":"inner-path"})),n)})),M=T().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return 16===r||"16"===r||"16px"===r?T().createElement(O.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},s||(s=T().createElement("path",{d:"M8,1C4.1,1,1,4.1,1,8c0,3.9,3.1,7,7,7s7-3.1,7-7C15,4.1,11.9,1,8,1z M7,11L4.3,8.3l0.9-0.8L7,9.3l4-3.9l0.9,0.8L7,11z"})),l||(l=T().createElement("path",{d:"M7,11L4.3,8.3l0.9-0.8L7,9.3l4-3.9l0.9,0.8L7,11z","data-icon-path":"inner-path",opacity:"0"})),n):20===r||"20"===r||"20px"===r?T().createElement(O.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...i},c||(c=T().createElement("path",{d:"M10,1c-4.9,0-9,4.1-9,9s4.1,9,9,9s9-4,9-9S15,1,10,1z M8.7,13.5l-3.2-3.2l1-1l2.2,2.2l4.8-4.8l1,1L8.7,13.5z"})),u||(u=T().createElement("path",{fill:"none",d:"M8.7,13.5l-3.2-3.2l1-1l2.2,2.2l4.8-4.8l1,1L8.7,13.5z","data-icon-path":"inner-path",opacity:"0"})),n):24===r||"24"===r||"24px"===r?T().createElement(O.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...i},d||(d=T().createElement("path",{d:"M12,1C6,1,1,6,1,12s5,11,11,11s11-4.9,11-11S18.1,1,12,1z M10.4,16.3l-3.9-3.9l1.3-1.2l2.7,2.7l5.8-5.8l1.3,1.3L10.4,16.3z"})),h||(h=T().createElement("path",{fill:"none",d:"M10.4,16.3l-3.9-3.9l1.3-1.2l2.7,2.7l5.8-5.8l1.3,1.3L10.4,16.3z","data-icon-path":"inner-path",opacity:"0"})),n):T().createElement(O.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},f||(f=T().createElement("path",{d:"M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2ZM14,21.5908l-5-5L10.5906,15,14,18.4092,21.41,11l1.5957,1.5859Z"})),p||(p=T().createElement("path",{fill:"none",d:"M14 21.591L9 16.591 10.591 15 14 18.409 21.41 11 23.005 12.585 14 21.591z","data-icon-path":"inner-path"})),n)})),N=T().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return"glyph"===r||"glyph"===r||"glyphpx"===r?T().createElement(O.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 6",fill:"currentColor",...i},m||(m=T().createElement("path",{d:"M5 6L0 1 0.7 0.3 5 4.6 9.3 0.3 10 1z"})),n):16===r||"16"===r||"16px"===r?T().createElement(O.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},g||(g=T().createElement("path",{d:"M8 11L3 6 3.7 5.3 8 9.6 12.3 5.3 13 6z"})),n):T().createElement(O.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},v||(v=T().createElement("path",{d:"M16 22L6 12 7.4 10.6 16 19.2 24.6 10.6 26 12z"})),n)})),D=T().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return"glyph"===r||"glyph"===r||"glyphpx"===r?T().createElement(O.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6 10",fill:"currentColor",...i},y||(y=T().createElement("path",{d:"M0 5L5 0 5.7 0.7 1.4 5 5.7 9.3 5 10z"})),n):16===r||"16"===r||"16px"===r?T().createElement(O.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},b||(b=T().createElement("path",{d:"M5 8L10 3 10.7 3.7 6.4 8 10.7 12.3 10 13z"})),n):T().createElement(O.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},w||(w=T().createElement("path",{d:"M10 16L20 6 21.4 7.4 12.8 16 21.4 24.6 20 26z"})),n)})),R=T().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return"glyph"===r||"glyph"===r||"glyphpx"===r?T().createElement(O.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6 10",fill:"currentColor",...i},_||(_=T().createElement("path",{d:"M6 5L1 10 0.3 9.3 4.6 5 0.3 0.7 1 0z"})),n):16===r||"16"===r||"16px"===r?T().createElement(O.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},E||(E=T().createElement("path",{d:"M11 8L6 13 5.3 12.3 9.6 8 5.3 3.7 6 3z"})),n):T().createElement(O.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},x||(x=T().createElement("path",{d:"M22 16L12 26 10.6 24.6 19.2 16 10.6 7.4 12 6z"})),n)}))},526:(e,t,n)=>{"use strict";n.d(t,{UQy:()=>T,Qdk:()=>X,zxk:()=>de,wQF:()=>zr,gqd:()=>pe,lSo:()=>Tt,mh4:()=>xt,tlE:()=>hi,OK9:()=>Ie,tdY:()=>Le,iA_:()=>jt,RMI:()=>qt,pj1:()=>Yt,xJi:()=>Kt,ssF:()=>tn,xDH:()=>an,SCH:()=>cn,mQc:()=>Re,n9L:()=>pt});var r={};try{process.env.CARBON_ENABLE_CSS_CUSTOM_PROPERTIES&&"true"===process.env.CARBON_ENABLE_CSS_CUSTOM_PROPERTIES?r.enableCssCustomProperties=!0:r.enableCssCustomProperties=!1,process.env.CARBON_ENABLE_USE_CONTROLLED_STATE_WITH_VALUE&&"true"===process.env.CARBON_ENABLE_USE_CONTROLLED_STATE_WITH_VALUE?r.enableUseControlledStateWithValue=!0:r.enableUseControlledStateWithValue=!1,process.env.CARBON_ENABLE_CSS_GRID&&"true"===process.env.CARBON_ENABLE_CSS_GRID?r.enableCssGrid=!0:r.enableCssGrid=!1,process.env.CARBON_ENABLE_V11_RELEASE?"true"===process.env.CARBON_ENABLE_V11_RELEASE?r.enableV11Release=!0:r.enableV11Release=!1:r.enableV11Release=!0,process.env.CARBON_ENABLE_EXPERIMENTAL_TILE_CONTRAST&&"true"===process.env.CARBON_ENABLE_EXPERIMENTAL_TILE_CONTRAST?r.enableExperimentalTileContrast=!0:r.enableExperimentalTileContrast=!1,process.env.CARBON_ENABLE_V12_TILE_DEFAULT_ICONS&&"true"===process.env.CARBON_ENABLE_V12_TILE_DEFAULT_ICONS?r.enableV12TileDefaultIcons=!0:r.enableV12TileDefaultIcons=!1,process.env.CARBON_ENABLE_V12_OVERFLOWMENU&&"true"===process.env.CARBON_ENABLE_V12_OVERFLOWMENU?r.enableV12Overflowmenu=!0:r.enableV12Overflowmenu=!1}catch(e){r.enableCssCustomProperties=!1,r.enableUseControlledStateWithValue=!1,r.enableCssGrid=!1,r.enableV11Release=!0,r.enableExperimentalTileContrast=!1,r.enableV12TileDefaultIcons=!1,r.enableV12Overflowmenu=!1}var i=[{name:"enable-css-custom-properties",description:"Describe what the flag does",enabled:r.enableCssCustomProperties},{name:"enable-use-controlled-state-with-value",description:"Enable components to be created in either a controlled or uncontrolled mode\n",enabled:r.enableUseControlledStateWithValue},{name:"enable-css-grid",description:"Enable CSS Grid Layout in the Grid and Column React components\n",enabled:r.enableCssGrid},{name:"enable-v11-release",description:"Enable the features and functionality for the v11 Release\n",enabled:r.enableV11Release},{name:"enable-experimental-tile-contrast",description:"Enable the experimental tile improved contrast styles\n",enabled:r.enableExperimentalTileContrast},{name:"enable-v12-tile-default-icons",description:"Enable rendering of default icons in the tile components\n",enabled:r.enableV12TileDefaultIcons},{name:"enable-v12-overflowmenu",description:"Enable the use of the v12 OverflowMenu leveraging the Menu subcomponents\n",enabled:r.enableV12Overflowmenu}];function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,"symbol"==typeof(i=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key))?i:String(i)),r)}var i}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||s(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}for(var c=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.flags=new Map,t&&Object.keys(t).forEach((function(e){n.flags.set(e,t[e])}))}var t,n;return t=e,n=[{key:"checkForFlag",value:function(e){if(!this.flags.has(e))throw new Error("Unable to find a feature flag with the name: `".concat(e,"`"))}},{key:"add",value:function(e,t){if(this.flags.has(e))throw new Error("The feature flag: ".concat(e," already exists"));this.flags.set(e,t)}},{key:"enable",value:function(e){this.checkForFlag(e),this.flags.set(e,!0)}},{key:"disable",value:function(e){this.checkForFlag(e),this.flags.set(e,!1)}},{key:"merge",value:function(e){var t=this;Object.keys(e).forEach((function(n){t.flags.set(n,e[n])}))}},{key:"mergeWithScope",value:function(e){var t,n=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=s(e))){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw o}}}}(e.flags);try{for(n.s();!(t=n.n()).done;){var r=a(t.value,2),i=r[0],o=r[1];this.flags.has(i)||this.flags.set(i,o)}}catch(e){n.e(e)}finally{n.f()}}},{key:"enabled",value:function(e){return this.checkForFlag(e),this.flags.get(e)}}],n&&o(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),u=new c(void 0),d=0;d<i.length;d++){var h=i[d];u.add(h.name,h.enabled)}function f(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p.apply(this,arguments)}!function(){u.merge.apply(u,arguments)}({"enable-css-custom-properties":!0,"enable-css-grid":!0,"enable-v11-release":!0,"enable-experimental-tile-contrast":!1});var m=n(2192),g=n.n(m),v=n(7900),y=n.n(v);const b=y().createContext("cds");function w(){return y().useContext(b)}var _=n(3980),E=n.n(_);const x=(0,v.createContext)({disabled:!1}),S=e=>{let{disabled:t,children:n}=e;return y().createElement(x.Provider,{value:{disabled:t}},n)};function T(e){let{align:t="end",children:n,className:r,disabled:i=!1,isFlush:o=!1,size:a,...s}=e;const l=w(),c=g()(`${l}--accordion`,r,{[`${l}--accordion--${t}`]:t,[`${l}--accordion--${a}`]:a,[`${l}--layout--size-${a}`]:a,[`${l}--accordion--flush`]:o&&"start"!==t});return y().createElement(S,{disabled:i},y().createElement("ul",p({className:c},s),n))}T.propTypes={align:E().oneOf(["start","end"]),children:E().node,className:E().string,disabled:E().bool,isFlush:E().bool,size:E().oneOf(["sm","md","lg"])};var O=n(2074);function A(){let e=0;return function(){return++e}}const C=!("undefined"==typeof window||!window.document||!window.document.createElement),k=y().createContext(null),M=A(),N=C?v.useLayoutEffect:v.useEffect;let D=!1;function R(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"id";const t=y().useContext(k),[n,r]=(0,v.useState)((()=>D?`${t?`${t}-`:""}${e}-${M()}`:null));if(N((()=>{null===n&&r(`${t?`${t}-`:""}${e}-${M()}`)}),[M]),(0,v.useEffect)((()=>{!1===D&&(D=!0)}),[]),"function"==typeof y().useId){const n=function(e,t){return`${e?`${e}-`:""}${t}-${y().useId()}`}(t,e);return n}return n}const L={};function P(e,t){return function(t,n,r){if(void 0!==t[n]){L[r]&&L[r][n]||(L[r]={...L[r],[n]:!0});for(var i=arguments.length,o=new Array(i>3?i-3:0),a=3;a<i;a++)o[a-3]=arguments[a];return e(t,n,r,...o)}}}const I=(0,v.createContext)(null);function $(e){let{as:t,children:n,dir:r,...i}=e;const o=(0,v.useContext)(I),a={},s=t??"span",l={...o};if(o){const{direction:e,getTextDirection:t}=o;if(t&&t.current){const r=function(e){if("string"==typeof e)return e;const t=y().Children.map(e,(e=>"string"==typeof e?e:null))?.filter((e=>null!==e));return 1===t?.length?t[0]:t}(n),i=t.current(r);e!==i?(a.dir=i,l.direction=i):"auto"===e&&(a.dir=i)}else e!==r?(a.dir=r,l.direction=r):"auto"===e&&(a.dir=r)}else a.dir=r,l.direction=r;return y().createElement(I.Provider,{value:l},y().createElement(s,p({},i,a),n))}function z(e,t){for(let n=0;n<t.length;n++)if(B(e,t[n]))return!0;return!1}function B(e){let{key:t,which:n,keyCode:r,code:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e?e===t:"number"==typeof e?e===n||e===r:e.key&&Array.isArray(t)?-1!==t.indexOf(e.key):e.key===t||e.which===n||e.keyCode===r||e.code===i}$.propTypes={as:E().oneOfType([E().func,E().string,E().elementType]),children:E().node.isRequired,dir:E().oneOf(["ltr","rtl","auto"])};const j={key:"Enter",which:13,keyCode:13,code:"Enter"},F={key:["Escape","Esc"],which:27,keyCode:27,code:"Esc"},U={key:" ",which:32,keyCode:32,code:"Space"},H={key:"End",which:35,keyCode:35,code:"Numpad1"},V={key:"Home",which:36,keyCode:36,code:"Numpad7"},Z={key:"ArrowLeft",which:37,keyCode:37,code:"ArrowLeft"},W={key:"ArrowUp",which:38,keyCode:38,code:"ArrowUp"},G={key:"ArrowRight",which:39,keyCode:39,code:"ArrowRight"},q={key:"ArrowDown",which:40,keyCode:40,code:"ArrowDown"},Y={key:"Delete",which:8,keyCode:8,code:"ArrowDecimal"},K=e=>y().createElement("button",p({type:"button"},e));function X(e){let{children:t,className:n="",open:r=!1,onHeadingClick:i,renderExpando:o=K,renderToggle:a,title:s="title",disabled:l,handleAnimationEnd:c,...u}=e;const[d,h]=(0,v.useState)(r),[f,m]=(0,v.useState)(r),[b,_]=(0,v.useState)(""),E=(0,v.useContext)(x),S="boolean"==typeof l?l:E.disabled,T=R("accordion-item"),A=w(),C=g()({[`${A}--accordion__item`]:!0,[`${A}--accordion__item--active`]:d,[`${A}--accordion__item--${b}`]:b,[`${A}--accordion__item--disabled`]:S,[n]:!!n}),k=a||o;return r!==f&&(_(d?"collapsing":"expanding"),h(r),m(r)),y().createElement("li",p({className:C},u,{onAnimationEnd:function(e){c&&c(e),_("")}}),y().createElement(k,{disabled:S,"aria-controls":T,"aria-expanded":d,className:`${A}--accordion__heading`,onClick:function(e){const t=!d;_(d?"collapsing":"expanding"),h(t),i&&i({isOpen:t,event:e})},onKeyDown:function(e){d&&B(e,F)&&h(!1)},type:"button"},y().createElement(O._Q,{className:`${A}--accordion__arrow`}),y().createElement($,{as:"div",className:`${A}--accordion__title`},s)),y().createElement("div",{id:T,className:`${A}--accordion__content`},t))}X.propTypes={children:E().node,className:E().string,disabled:E().bool,onClick:E().func,onHeadingClick:E().func,open:E().bool,renderExpando:P(E().func),renderToggle:E().func,title:E().node};var Q="undefined"!=typeof window?v.useLayoutEffect:v.useEffect;const J=e=>(0,v.useCallback)((t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}),e);function ee(e,t,n){const r=(0,v.useRef)(null);(0,v.useEffect)((()=>{r.current=n}),[n]),(0,v.useEffect)((()=>{const n=e=>{r.current&&r.current(e)},i="current"in e?e.current:e;return i?.addEventListener?.(t,n),()=>{i?.removeEventListener?.(t,n)}}),[e,t])}function te(e,t){const n=(0,v.useRef)(null);(0,v.useEffect)((()=>{n.current=t}),[t]),(0,v.useEffect)((()=>{function t(e){n.current&&n.current(e)}return window.addEventListener(e,t),()=>{window.removeEventListener(e,t)}}),[e])}const ne=y().createContext({floating:{current:null}}),re=y().forwardRef((function(e,t){let{isTabTip:n,align:r=(n?"bottom-left":"bottom"),as:i="span",autoAlign:o=!1,caret:a=!n,className:s,children:l,dropShadow:c=!0,highContrast:u=!1,onRequestClose:d,open:h,...f}=e;const m=w(),b=(0,v.useRef)(null),_=(0,v.useRef)(null);te("blur",(()=>{h&&d?.()})),te("click",(e=>{h&&!_?.current?.contains(e.target)&&d?.()}));const E=(0,v.useMemo)((()=>({floating:b})),[]);n&&(["bottom-left","bottom-right"].includes(r)||(r="bottom-left"));const x=J([t,_]),[S,T]=(0,v.useState)(!1),[O,A]=(0,v.useState)(r),C=g()({[`${m}--popover-container`]:!0,[`${m}--popover--caret`]:a,[`${m}--popover--drop-shadow`]:c,[`${m}--popover--high-contrast`]:u,[`${m}--popover--open`]:h,[`${m}--popover--${O}`]:S&&!n,[`${m}--popover--${r}`]:!S,[`${m}--popover--tab-tip`]:n},s);Q((()=>{if(!h)return;if(!o||n)return void T(!1);if(!b.current)return;if(!0===S)return;const e=b.current.getBoundingClientRect(),t=e.x<-16,i=e.y<-16,a=e.x+(e.width-16)>document.documentElement.clientWidth,s=e.y+(e.height-16)>document.documentElement.clientHeight;if(!(t||i||a||s))return void T(!1);const l=["top","top-left","right-bottom","right","right-top","bottom-left","bottom","bottom-right","left-top","left","left-bottom","top-right"],c=[r];let u=l[(l.indexOf(r)+1)%l.length];for(;u&&!c.includes(u);)c.push(u),u=l[(l.indexOf(u)+1)%l.length];function d(e){if(!_.current||!b.current)return!1;_.current.classList.add(`${m}--popover--${e}`);const t=b.current.getBoundingClientRect();return t.x<-16||t.y<-16||t.x+(t.width-16)>document.documentElement.clientWidth||t.y+(t.height-16)>document.documentElement.clientHeight?(_.current.classList.remove(`${m}--popover--${e}`),!1):(_.current.classList.remove(`${m}--popover--${e}`),!0)}let f=null;for(let e=0;e<c.length;e++){const t=c[e];if(d(t)){f=t;break}}f&&(T(!0),A(f))}),[S,r,o,m,h,n]);const k=y().Children.map(l,(e=>{const t=e;if("button"===t?.type){const{className:e}=t.props,n=g()(`${m}--popover--tab-tip__button`,e);return y().cloneElement(t,{className:n})}return t})),M=i;return y().createElement(ne.Provider,{value:E},y().createElement(M,p({},f,{className:C,ref:x}),n?k:l))}));function ie(e,t){let{className:n,children:r,...i}=e;const o=w(),{floating:a}=y().useContext(ne),s=J([a,t]);return y().createElement("span",p({},i,{className:`${o}--popover`}),y().createElement("span",{className:g()(`${o}--popover-content`,n),ref:s},r),y().createElement("span",{className:`${o}--popover-caret`}))}re.propTypes={align:E().oneOf(["top","top-left","top-right","bottom","bottom-left","bottom-right","left","left-bottom","left-top","right","right-bottom","right-top"]),as:E().oneOfType([E().string,E().elementType]),autoAlign:E().bool,caret:E().bool,children:E().node,className:E().string,dropShadow:E().bool,highContrast:E().bool,isTabTip:E().bool,onRequestClose:E().func,open:E().bool.isRequired};const oe=y().forwardRef(ie);function ae(e){if(!e||!e.childNodes)return null;if(function(e){if(e.tabIndex<0)return!1;if(e.disabled)return!1;switch(e.nodeName){case"A":return!!e.href&&"ignore"!==e.rel;case"INPUT":return"hidden"!==e.type;case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}}(e))return e;for(const t of e.childNodes){const e=ae(t);if(e)return e}return null}function se(e){if(!e||!e.childNodes)return null;if(e?.getAttribute?.("role")&&""!==e.getAttribute("role"))return e;for(const t of e.childNodes){const e=se(t);if(e)return e}return null}function le(e){let{align:t="top",className:n,children:r,label:i,description:o,enterDelayMs:a=100,leaveDelayMs:s=300,defaultOpen:l=!1,closeOnActivation:c=!1,...u}=e;const d=(0,v.useRef)(null),h=(0,v.useRef)(null),[f,m]=function(e){const[t,n]=(0,v.useState)(e),r=(0,v.useRef)(null),i=(0,v.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;window.clearTimeout(r.current??void 0),r.current=null,0!==t?r.current=window.setTimeout((()=>{n(e),r.current=null}),t):n(e)}),[]);return(0,v.useEffect)((()=>()=>{window.clearTimeout(r.current??void 0)}),[]),[t,i]}(l),b=R("tooltip"),_=w(),E=y().Children.only(r),x={onFocus:()=>m(!0),onBlur:()=>m(!1),onClick:()=>c&&m(!1),onMouseEnter:function(){m(!0,a)}};return i?x["aria-labelledby"]=b:x["aria-describedby"]=b,(0,v.useEffect)((()=>{null!==d&&d.current&&(ae(d.current)||m(!1))})),y().createElement(re,p({},u,{align:t,className:g()(`${_}--tooltip`,n),dropShadow:!1,highContrast:!0,onKeyDown:function(e){f&&B(e,F)&&(e.stopPropagation(),m(!1)),f&&c&&(B(e,j)||B(e,U))&&m(!1)},onMouseLeave:function(){m(!1,s)},open:f,ref:d}),y().createElement("div",{className:`${_}--tooltip-trigger__wrapper`},void 0!==E?y().cloneElement(E,{...x,...function(e){const t={};return["onFocus","onBlur","onClick","onMouseEnter"].forEach((n=>{t[n]=t=>{x[n](),e?.[n]&&e?.[n](t)}})),t}(E.props)}):null),y().createElement(oe,{"aria-hidden":f?"false":"true",className:`${_}--tooltip-content`,id:b,ref:h,role:"tooltip"},i||o))}oe.propTypes={children:E().node,className:E().string},le.propTypes={align:E().oneOf(["top","top-left","top-right","bottom","bottom-left","bottom-right","left","left-bottom","left-top","right","right-bottom","right-top"]),children:E().node,className:E().string,closeOnActivation:E().bool,defaultOpen:E().bool,description:E().node,enterDelayMs:E().number,label:E().node,leaveDelayMs:E().number};const ce=y().forwardRef((function(e,t){const{align:n,children:r,className:i,closeOnActivation:o=!0,defaultOpen:a=!1,disabled:s,enterDelayMs:l=100,kind:c,label:u,leaveDelayMs:d=100,wrapperClasses:h,size:f,isSelected:m,...v}=e,b=w(),_=g()(h,`${b}--icon-tooltip`,{[`${b}--icon-tooltip--disabled`]:s});return y().createElement(le,{align:n,closeOnActivation:o,className:_,defaultOpen:a,enterDelayMs:l,label:u,leaveDelayMs:d},y().createElement(de,p({},v,{disabled:s,kind:c,ref:t,size:f,className:g()(`${b}--btn--icon-only`,{[`${b}--btn--selected`]:m},i)}),r))}));ce.propTypes={align:E().oneOf(["top","top-left","top-right","bottom","bottom-left","bottom-right","left","right"]),children:E().node,className:E().string,closeOnActivation:E().bool,defaultOpen:E().bool,disabled:E().bool,enterDelayMs:E().number,isSelected:E().bool,kind:E().oneOf(["primary","secondary","ghost","tertiary"]),label:E().node.isRequired,leaveDelayMs:E().number,size:E().oneOf(["sm","md","lg"]),wrapperClasses:E().string};const ue=e=>function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];for(let n=0;n<e.length&&!t.defaultPrevented;n++){const i=e[n];"function"==typeof i&&i(t,...r)}},de=y().forwardRef((function(e,t){let{as:n,children:r,className:i,dangerDescription:o="danger",disabled:a=!1,hasIconOnly:s=!1,href:l,iconDescription:c,isExpressive:u=!1,isSelected:d,kind:h="primary",onBlur:f,onClick:m,onFocus:b,onMouseEnter:_,onMouseLeave:E,renderIcon:x,size:S,tabIndex:T,tooltipAlignment:O="center",tooltipPosition:A="top",type:C="button",...k}=e;const M=(0,v.useRef)(null),N=w(),D=e=>{e.target!==M.current||e.preventDefault()},L={tabIndex:T,className:g()(i,{[`${N}--btn`]:!0,[`${N}--btn--sm`]:"sm"===S&&!u,[`${N}--btn--md`]:"md"===S&&!u,[`${N}--btn--xl`]:"xl"===S,[`${N}--btn--2xl`]:"2xl"===S,[`${N}--layout--size-${S}`]:S,[`${N}--btn--${h}`]:h,[`${N}--btn--disabled`]:a,[`${N}--btn--expressive`]:u,[`${N}--btn--icon-only`]:s,[`${N}--btn--selected`]:s&&d&&"ghost"===h}),ref:t},P=x?y().createElement(x,{"aria-label":c,className:`${N}--btn__icon`,"aria-hidden":"true"}):null,I=x?y().createElement(x,null):null,$=["danger","danger--tertiary","danger--ghost"];let z="button";const B=R("danger-description"),{"aria-pressed":j}=k;let F={disabled:a,type:C,"aria-describedby":$.includes(h)?B:void 0,"aria-pressed":j??(s&&"ghost"===h?d:void 0)};const U={href:l};let H=null;if($.includes(h)&&(H=y().createElement("span",{id:B,className:`${N}--visually-hidden`},o)),n?(z=n,F={...F,...U}):l&&!a&&(z="a",F=U),s){let e;return"top"!==A&&"bottom"!==A||("center"===O&&(e=A),"end"===O&&(e=`${A}-right`),"start"===O&&(e=`${A}-left`)),"right"!==A&&"left"!==A||(e=A),y().createElement(ce,p({as:n,align:e,label:c,kind:h,size:S,onMouseEnter:_,onMouseLeave:E,onFocus:b,onBlur:f,onClick:ue([m,D])},k,L,F),I||r)}return y().createElement(z,{onMouseEnter:_,onMouseLeave:E,onFocus:b,onBlur:f,onClick:m,...k,...L,...F},H,r,P)}));var he,fe;de.displayName="Button",de.propTypes={as:E().oneOfType([E().func,E().string,E().elementType]),children:E().node,className:E().string,dangerDescription:E().string,disabled:E().bool,hasIconOnly:E().bool,href:E().string,iconDescription:e=>!e.renderIcon||e.children||e.iconDescription?null:new Error("renderIcon property specified without also providing an iconDescription property."),isExpressive:E().bool,isSelected:E().bool,kind:E().oneOf(["primary","secondary","danger","ghost","danger--primary","danger--ghost","danger--tertiary","tertiary"]),onBlur:E().func,onClick:E().func,onFocus:E().func,onMouseEnter:E().func,onMouseLeave:E().func,renderIcon:E().oneOfType([E().func,E().object]),role:E().string,size:E().oneOf(["sm","md","lg","xl","2xl"]),tabIndex:E().number,tooltipAlignment:E().oneOf(["start","center","end"]),tooltipPosition:E().oneOf(["top","right","bottom","left"]),type:E().oneOf(["button","reset","submit"])};const pe=e=>{let{headers:t,rowCount:n=5,columnCount:r=5,zebra:i=!1,compact:o=!1,className:a,showHeader:s=!0,showToolbar:l=!0,...c}=e;const u=w(),d=g()(a,{[`${u}--skeleton`]:!0,[`${u}--data-table`]:!0,[`${u}--data-table--zebra`]:i,[`${u}--data-table--compact`]:o}),h=n,f=Array(h),m=Array.from({length:r},((e,t)=>t));for(let e=0;e<h;e++)f[e]=y().createElement("tr",{key:e},m.map((e=>y().createElement("td",{key:e},he||(he=y().createElement("span",null))))));return y().createElement("div",{className:`${u}--skeleton ${u}--data-table-container`},s?y().createElement("div",{className:`${u}--data-table-header`},y().createElement("div",{className:`${u}--data-table-header__title`}),y().createElement("div",{className:`${u}--data-table-header__description`})):null,l?y().createElement("section",{"aria-label":"data table toolbar",className:`${u}--table-toolbar`},y().createElement("div",{className:`${u}--toolbar-content`},y().createElement("span",{className:`${u}--skeleton ${u}--btn ${u}--btn--sm`}))):null,y().createElement("table",p({className:d},c),y().createElement("thead",null,y().createElement("tr",null,m.map((e=>y().createElement("th",{key:e},t?y().createElement("div",{className:"bx--table-header-label"},t[e]?.header):fe||(fe=y().createElement("span",null))))))),y().createElement("tbody",null,f)))};pe.propTypes={className:E().string,columnCount:E().number,compact:E().bool,headers:E().arrayOf(E().shape({header:E().node.isRequired}).isRequired),rowCount:E().number,showHeader:E().bool,showToolbar:E().bool,zebra:E().bool};var me,ge=n(7604);const ve=y().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return y().createElement(ge.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},me||(me=y().createElement("path",{d:"M17.4141 16L24 9.4141 22.5859 8 16 14.5859 9.4143 8 8 9.4141 14.5859 16 8 22.5859 9.4143 24 16 17.4141 22.5859 24 24 22.5859 17.4141 16z"})),n)}));var ye=16;function be(e){return"".concat(e/ye,"rem")}be(320),be(672),be(16);var we={width:be(1056),columns:16,margin:be(16)};be(1312),be(16),be(1584),be(24);function _e(e){return be(8*e)}_e(.25),_e(.5),_e(1),_e(1.5),_e(2),_e(3),_e(4),_e(5),_e(6),_e(8),_e(10),_e(12),_e(20),_e(2),_e(3),_e(4),_e(6),_e(8),_e(12),_e(20),_e(3),_e(4),_e(5),_e(6),_e(8),be(24),be(32),be(40),be(48),be(64),be(80);var Ee,xe,Se=n(594),Te=n.n(Se),Oe=n(8570);function Ae(e){const t=(0,v.useRef)(e),n=(0,v.useRef)(!1);(0,v.useEffect)((()=>{t.current=e})),(0,v.useEffect)((()=>{!0!==n.current&&(n.current=!0,t.current())}),[])}function Ce(e){let{onPress:t,onPressIn:n,onPressOut:r,onLongPress:i,delayLongPressMs:o=500}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const a=(0,v.useRef)(t),s=(0,v.useRef)(n),l=(0,v.useRef)(r),c=(0,v.useRef)(i),[u,d]=(0,v.useState)(!1),[h,f]=(0,v.useState)(!1),p=(0,v.useRef)({longPress:!1});(0,v.useEffect)((()=>{a.current=t}),[t]),(0,v.useEffect)((()=>{s.current=n}),[n]),(0,v.useEffect)((()=>{l.current=r}),[r]),(0,v.useEffect)((()=>{c.current=i}),[i]),(0,v.useEffect)((()=>{const{current:t}=e;function n(e){d(!0),s.current?.(),e.preventDefault()}function r(){d(!1),f(!1),l.current?.(p.current)}function i(){d(!1),f(!1),l.current?.(),p.current.longPress=!1}function o(){d(!1),f(!1),l.current?.(),p.current.longPress=!1}function c(){f(!1),d(!1),a.current?.(p.current),p.current.longPress=!1}function u(e){e.preventDefault()}return t.addEventListener("pointerdown",n),t.addEventListener("pointerup",r),t.addEventListener("pointercancel",i),t.addEventListener("pointerleave",o),t.addEventListener("click",c),t.addEventListener("contextmenu",u),()=>{t.removeEventListener("pointerdown",n),t.removeEventListener("pointerup",r),t.removeEventListener("pointercancel",i),t.removeEventListener("pointerleave",o),t.removeEventListener("click",c),t.removeEventListener("contextmenu",u)}}),[e]),(0,v.useEffect)((()=>{if(u){const e=setTimeout((()=>{d(!1),f(!0)}),o);return()=>{clearTimeout(e)}}}),[u,o]),(0,v.useEffect)((()=>{if(h)return p.current.longPress=!0,c.current?.()}),[h])}const ke=y().createContext({baseId:"",activeIndex:0,defaultSelectedIndex:0,dismissable:!1,onTabCloseRequest(){},setActiveIndex(){},selectedIndex:0,setSelectedIndex(){}}),Me=y().createContext({index:0,hasSecondaryLabel:!1}),Ne=`(min-width: ${we.width})`,De=y().createContext(0);function Re(e){let{children:t,defaultSelectedIndex:n=0,onChange:r,selectedIndex:i,dismissable:o,onTabCloseRequest:a}=e;const s=R("ccs"),[l,c]=(0,v.useState)(n),[u,d]=function(e){let{defaultValue:t,name:n="custom",onChange:r,value:i}=e;const[o,a]=(0,v.useState)(i??t),s=(0,v.useRef)(null);function l(e){const t="function"==typeof e?e(o):e;!1===s.current&&a(t),r&&r(t)}return null===s.current&&(s.current=void 0!==i),(0,v.useEffect)((()=>{s.current,s.current}),[n,i]),!0===s.current?[i,l]:[o,l]}({value:i,defaultValue:n,onChange:e=>r?.({selectedIndex:e})}),h={baseId:s,activeIndex:l,defaultSelectedIndex:n,dismissable:o,onTabCloseRequest:a,setActiveIndex:c,selectedIndex:u,setSelectedIndex:d};return y().createElement(ke.Provider,{value:h},t)}function Le(e){let{activation:t="automatic","aria-label":n,children:r,className:i,contained:o=!1,fullWidth:a=!1,iconSize:s,leftOverflowButtonProps:l,light:c,rightOverflowButtonProps:u,scrollDebounceWait:d=200,scrollIntoView:h,...f}=e;const{activeIndex:m,selectedIndex:b,setSelectedIndex:_,setActiveIndex:E,dismissable:x}=y().useContext(ke),S=w(),T=(0,v.useRef)(null),A=(0,v.useRef)(null),k=(0,v.useRef)(null),[M,N]=(0,v.useState)(!1),[D,R]=(0,v.useState)(0);let L=!1;o&&(L=y().Children.toArray(r).some((e=>(0,Oe.isElement)(e)&&!!e.props.secondaryLabel)));const P=function(e){const[t,n]=(0,v.useState)((()=>!!C&&window.matchMedia(e).matches));return(0,v.useEffect)((()=>{function t(e){n(e.matches)}const r=window.matchMedia(e);return r.addEventListener?r.addEventListener("change",t):r.addListener(t),n(r.matches),()=>{r.addEventListener?r.removeEventListener("change",t):r.removeListener(t)}}),[e]),t}(Ne),I=a&&o&&P&&y().Children.toArray(r).length<9,$=g()(`${S}--tabs`,{[`${S}--tabs--contained`]:o,[`${S}--tabs--light`]:c,[`${S}--tabs__icon--default`]:"default"===s,[`${S}--tabs__icon--lg`]:"lg"===s,[`${S}--layout--size-lg`]:"lg"===s,[`${S}--tabs--tall`]:L,[`${S}--tabs--full-width`]:I},i),j=44,[F,U]=(0,v.useState)(!!T.current&&D+j+T.current.clientWidth<T.current.scrollWidth),W=!!T.current&&M&&D>0,q=g()(`${S}--tab--overflow-nav-button`,`${S}--tab--overflow-nav-button--previous`,{[`${S}--tab--overflow-nav-button--hidden`]:!W}),Y=g()(`${S}--tab--overflow-nav-button`,`${S}--tab--overflow-nav-button--next`,{[`${S}--tab--overflow-nav-button--hidden`]:!F}),K=(0,v.useRef)([]),X=(0,v.useCallback)((()=>Te()((e=>{R(e.target.scrollLeft)}),d)),[d]);return Ae((()=>{const e=K.current[b];h&&e&&e.scrollIntoView({block:"nearest",inline:"nearest"})})),(0,v.useEffect)((()=>{U(!!T.current&&D+j+T.current.clientWidth<T.current.scrollWidth),x&&T.current&&N(T.current.scrollWidth>T.current.clientWidth)}),[D,r,x]),Ae((()=>{if(K.current[b].disabled){const e=K.current.filter((e=>!e.disabled));if(e.length>0){const t=e[0];_(K.current.indexOf(t))}}})),Q((()=>{T.current&&N(T.current.scrollWidth>T.current.clientWidth);const e=Te()((function(){T.current&&N(T.current.scrollWidth>T.current.clientWidth)}),200);return window.addEventListener("resize",e),()=>{e.cancel(),window.removeEventListener("resize",e)}}),[]),Q((()=>{null!==D&&T.current&&(T.current.scrollLeft=D)}),[D]),Q((()=>{if(!M||!T.current)return;const e="manual"===t?K.current[m]:K.current[b];if(e){const{width:t}=e.getBoundingClientRect(),n=e.offsetLeft,r=e.offsetLeft+t,i=T.current.scrollLeft+j,o=T.current.scrollLeft+T.current.clientWidth-j;n<i&&R(n-j),r>o&&R(r+j-T.current.clientWidth)}}),[t,m,b,M,r]),Ce(A,{onPress(e){let{longPress:t}=e;!t&&T.current&&R(Math.max(D-T.current.scrollWidth/K.current.length*1.5,0))},onLongPress:()=>Pe(T,"backward",R)}),Ce(k,{onPress(e){let{longPress:t}=e;!t&&T.current&&R(Math.min(D+T.current.scrollWidth/K.current.length*1.5,T.current.scrollWidth-T.current.clientWidth))},onLongPress:()=>Pe(T,"forward",R)}),y().createElement("div",{className:$},y().createElement("button",p({"aria-hidden":"true",tabIndex:-1,"aria-label":"Scroll left",ref:A,className:q,type:"button"},l),Ee||(Ee=y().createElement(O.s$,null))),y().createElement("div",p({},f,{"aria-label":n,ref:T,role:"tablist",className:`${S}--tab--list`,onScroll:X,onKeyDown:function(e){if(z(e,[G,Z,V,H])){e.preventDefault();const n=K.current.filter((e=>!e.disabled)),r=n.indexOf(K.current["automatic"===t?b:m]),i=K.current.indexOf(n[function(e,t,n){switch(!0){case B(e,G):return(n+1)%t;case B(e,Z):return(t+n-1)%t;case B(e,V):return 0;case B(e,H):return t-1;default:return n}}(e,n.length,r)]);"automatic"===t?_(i):"manual"===t&&E(i),K.current[i]?.focus()}}}),y().Children.map(r,((e,t)=>(0,Oe.isElement)(e)?y().createElement(Me.Provider,{value:{index:t,hasSecondaryLabel:L,contained:o}},y().cloneElement(e,{ref:e=>{K.current[t]=e}})):null))),y().createElement("button",p({"aria-hidden":"true",tabIndex:-1,"aria-label":"Scroll right",ref:k,className:Y,type:"button"},u),xe||(xe=y().createElement(O._Q,null))))}function Pe(e,t,n){const r=e.current;if(!r)return()=>{};const i=r?.style["scroll-behavior"];r.style["scroll-behavior"]="auto";const o="forward"===t?5:-5;let a=null;return a=requestAnimationFrame((function e(){r&&(r.scrollLeft=r.scrollLeft+o,a=requestAnimationFrame(e))})),()=>{r.style["scroll-behavior"]=i,n(r.scrollLeft),a&&cancelAnimationFrame(a)}}Re.propTypes={children:E().node,defaultSelectedIndex:E().number,dismissable:E().bool,onChange:E().func,onTabCloseRequest:e=>{if(e.dismissable&&!e.onTabCloseRequest)return new Error("dismissable property specified without also providing an onTabCloseRequest property.")},selectedIndex:E().number},Le.propTypes={activation:E().oneOf(["automatic","manual"]),"aria-label":E().string.isRequired,children:E().node,className:E().string,contained:E().bool,fullWidth:E().bool,iconSize:E().oneOf(["default","lg"]),leftOverflowButtonProps:E().object,light:P(E().bool),rightOverflowButtonProps:E().object,scrollDebounceWait:E().number,scrollIntoView:E().bool};const Ie=(0,v.forwardRef)((function(e,t){let{as:n="button",children:r,className:i,disabled:o,onClick:a,onKeyDown:s,secondaryLabel:l,renderIcon:c,...u}=e;const d=w(),{selectedIndex:h,setSelectedIndex:f,baseId:m,dismissable:b,onTabCloseRequest:_}=y().useContext(ke),{index:E,hasSecondaryLabel:x,contained:S}=y().useContext(Me),T=(0,v.useRef)(null),O=(0,v.useRef)(null),A=J([t,O]),[C,k]=(0,v.useState)(!1),M=`${m}-tab-${E}`,N=`${m}-tabpanel-${E}`,D=g()(`${d}--tabs__nav-item`,`${d}--tabs__nav-link`,{[`${d}--tabs__nav-item--selected`]:h===E,[`${d}--tabs__nav-item--disabled`]:o,[`${d}--tabs__nav-item--hover-off`]:C},i),R=n;ee(T,"mouseover",(e=>{S&&O.current&&(e.stopPropagation(),k(!0),O.current.classList.add(`${d}--tabs__nav-item--hover-off`))})),ee(T,"mouseleave",(()=>{S&&O.current&&(O.current.classList.remove(`${d}--tabs__nav-item--hover-off`),k(!1))}));const L=e=>{e.stopPropagation(),_?.(E)},P=y().createElement("div",{tabIndex:-1,"aria-hidden":!0,className:g()(`${d}--tabs__nav-item--close-icon`,{[`${d}--visually-hidden`]:!b}),onClick:L,title:"Close tab",ref:T},y().createElement(ve,{"aria-hidden":b?"false":"true","aria-label":"Press delete to close tab"})),I=c??b;return y().createElement(R,p({},u,{"aria-controls":N,"aria-disabled":o,"aria-selected":h===E,ref:A,id:M,role:"tab",className:D,disabled:o,onClick:e=>{o||(f(E),a?.(e))},onKeyDown:e=>{b&&B(e,Y)&&L(e),s?.(e)},tabIndex:h===E?"0":"-1",type:"button"}),y().createElement("div",{className:`${d}--tabs__nav-item-label-wrapper`},b&&c&&y().createElement("div",{className:`${d}--tabs__nav-item--icon-left`},y().createElement(c,{size:16})),y().createElement("span",{className:`${d}--tabs__nav-item-label`,title:r},r),y().createElement("div",{className:g()(`${d}--tabs__nav-item--icon`,{[`${d}--visually-hidden`]:!I})},P,!b&&c&&y().createElement(c,{size:16}))),x&&y().createElement("div",{className:`${d}--tabs__nav-item-secondary-label`,title:l},l))}));var $e,ze,Be,je,Fe,Ue,He,Ve,Ze;Ie.propTypes={as:E().oneOfType([E().string,E().elementType]),children:E().node,className:E().string,disabled:E().bool,onClick:E().func,onKeyDown:E().func,renderButton:E().func,renderIcon:E().oneOfType([E().func,E().object]),secondaryLabel:E().string},y().forwardRef((function(e,t){let{children:n,className:r,defaultOpen:i=!1,enterDelayMs:o,leaveDelayMs:a,label:s,...l}=e;const c=w(),u=g()(`${c}--tabs__nav-item--icon-only`,r);return y().createElement(le,{align:"bottom",defaultOpen:i,className:`${c}--icon-tooltip`,enterDelayMs:o,label:s,leaveDelayMs:a},y().createElement(Ie,p({className:u,ref:t},l),n))})).propTypes={children:E().node,className:E().string,defaultOpen:E().bool,enterDelayMs:E().number,label:E().node.isRequired,leaveDelayMs:E().number},y().forwardRef((function(e,t){let{children:n,className:r,...i}=e;const o=w(),a=(0,v.useRef)(null),s=J([t,a]),[l,c]=(0,v.useState)(0),[u,d]=(0,v.useState)(!1),{selectedIndex:h,baseId:f}=y().useContext(ke),m=y().useContext(De),b=`${f}-tabpanel-${m}`,_=`${f}-tab-${m}`,E=g()(`${o}--tab-content`,r,{[`${o}--tab-content--interactive`]:u});return Ae((()=>{a.current&&ae(a.current)&&(d(!0),c(-1))})),(0,v.useEffect)((()=>{const e=a.current;if(!e)return;const t=new MutationObserver((function(){ae(e)?(d(!0),c(-1)):(d(!1),c(0))}));return t.observe(e,{childList:!0,subtree:!0}),()=>t.disconnect()}),[]),y().createElement("div",p({},i,{"aria-labelledby":_,id:b,className:E,ref:s,role:"tabpanel",tabIndex:l,hidden:h!==m}),n)})).propTypes={children:E().node,className:E().string},E().node;const We=y().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return y().createElement(ge.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},$e||($e=y().createElement("path",{d:"M16,2A14.1725,14.1725,0,0,0,2,16,14.1725,14.1725,0,0,0,16,30,14.1725,14.1725,0,0,0,30,16,14.1725,14.1725,0,0,0,16,2Zm8,15H17v7H15V17H8V15h7V8h2v7h7Z"})),ze||(ze=y().createElement("path",{fill:"none",d:"M24 17L17 17 17 24 15 24 15 17 8 17 8 15 15 15 15 8 17 8 17 15 24 15 24 17z","data-icon-path":"inner-path"})),n)})),Ge=y().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return 16===r||"16"===r||"16px"===r?y().createElement(ge.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},Be||(Be=y().createElement("path",{d:"M9.3 3.7L13.1 7.5 1 7.5 1 8.5 13.1 8.5 9.3 12.3 10 13 15 8 10 3z"})),n):20===r||"20"===r||"20px"===r?y().createElement(ge.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...i},je||(je=y().createElement("path",{d:"M11.8 2.8L10.8 3.8 16.2 9.3 1 9.3 1 10.7 16.2 10.7 10.8 16.2 11.8 17.2 19 10z"})),n):24===r||"24"===r||"24px"===r?y().createElement(ge.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...i},Fe||(Fe=y().createElement("path",{d:"M14 4L12.9 5.1 18.9 11.2 2 11.2 2 12.8 18.9 12.8 12.9 18.9 14 20 22 12z"})),n):y().createElement(ge.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},Ue||(Ue=y().createElement("path",{d:"M18 6L16.57 7.393 24.15 15 4 15 4 17 24.15 17 16.57 24.573 18 26 28 16 18 6z"})),n)})),qe=y().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return 16===r||"16"===r||"16px"===r?y().createElement(ge.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},He||(He=y().createElement("path",{d:"M3.7 6.7L7.5 2.9 7.5 15 8.5 15 8.5 2.9 12.3 6.7 13 6 8 1 3 6z"})),n):y().createElement(ge.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},Ve||(Ve=y().createElement("path",{d:"M16 4L6 14 7.41 15.41 15 7.83 15 28 17 28 17 7.83 24.59 15.41 26 14 16 4z"})),n)})),Ye=y().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return y().createElement(ge.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},Ze||(Ze=y().createElement("path",{d:"M27.6 20.6L24 24.2 24 4 22 4 22 24.2 18.4 20.6 17 22 23 28 29 22zM9 4L3 10 4.4 11.4 8 7.8 8 28 10 28 10 7.8 13.6 11.4 15 10z"})),n)}));var Ke,Xe,Qe,Je,et,tt,nt,rt,it;const ot=y().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return y().createElement(ge.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},Ke||(Ke=y().createElement("path",{d:"M2,16H2A14,14,0,1,0,16,2,14,14,0,0,0,2,16Zm23.15,7.75L8.25,6.85a12,12,0,0,1,16.9,16.9ZM8.24,25.16A12,12,0,0,1,6.84,8.27L23.73,25.16a12,12,0,0,1-15.49,0Z"})),n)})),at=y().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return 16===r||"16"===r||"16px"===r?y().createElement(ge.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},Xe||(Xe=y().createElement("path",{d:"M8,1C4.1,1,1,4.1,1,8s3.1,7,7,7s7-3.1,7-7S11.9,1,8,1z M10.7,11.5L4.5,5.3l0.8-0.8l6.2,6.2L10.7,11.5z"})),Qe||(Qe=y().createElement("path",{fill:"none",d:"M10.7,11.5L4.5,5.3l0.8-0.8l6.2,6.2L10.7,11.5z","data-icon-path":"inner-path",opacity:"0"})),n):20===r||"20"===r||"20px"===r?y().createElement(ge.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...i},Je||(Je=y().createElement("path",{d:"M10,1c-5,0-9,4-9,9s4,9,9,9s9-4,9-9S15,1,10,1z M13.5,14.5l-8-8l1-1l8,8L13.5,14.5z"})),et||(et=y().createElement("path",{d:"M13.5,14.5l-8-8l1-1l8,8L13.5,14.5z","data-icon-path":"inner-path",opacity:"0"})),n):24===r||"24"===r||"24px"===r?y().createElement(ge.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...i},tt||(tt=y().createElement("path",{d:"M12,1C5.9,1,1,5.9,1,12s4.9,11,11,11s11-4.9,11-11S18.1,1,12,1z M16.3,17.5L6.5,7.7l1.2-1.2l9.8,9.8L16.3,17.5z"})),nt||(nt=y().createElement("path",{fill:"none",d:"M16.3,17.5L6.5,7.7l1.2-1.2l9.8,9.8L16.3,17.5z","data-icon-path":"inner-path",opacity:"0"})),n):y().createElement(ge.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},rt||(rt=y().createElement("path",{fill:"none",d:"M14.9 7.2H17.1V24.799H14.9z","data-icon-path":"inner-path",transform:"rotate(-45 16 16)"})),it||(it=y().createElement("path",{d:"M16,2A13.914,13.914,0,0,0,2,16,13.914,13.914,0,0,0,16,30,13.914,13.914,0,0,0,30,16,13.914,13.914,0,0,0,16,2Zm5.4449,21L9,10.5557,10.5557,9,23,21.4448Z"})),n)})),st=y().forwardRef((function(e,t){let{children:n,className:r,href:i,disabled:o=!1,inline:a=!1,visited:s=!1,renderIcon:l,size:c,target:u,...d}=e;const h=w(),f={className:g()(`${h}--link`,r,{[`${h}--link--disabled`]:o,[`${h}--link--inline`]:a,[`${h}--link--visited`]:s,[`${h}--link--${c}`]:c}),rel:"_blank"===u?"noopener":void 0,target:u};return o?(f.role="link",f["aria-disabled"]=!0):f.href=i,y().createElement("a",p({ref:t},f,d),n,!a&&l&&y().createElement("div",{className:`${h}--link__icon`},y().createElement(l,null)))}));st.displayName="Link",st.propTypes={children:E().node,className:E().string,disabled:E().bool,href:E().string,inline:E().bool,renderIcon:E().oneOfType([E().func,E().object]),size:E().oneOf(["sm","md","lg"]),visited:E().bool};const lt=(0,v.createContext)(u);function ct(e){return(0,v.useContext)(lt).enabled(e)}var ut,dt,ht,ft;E().node,E().objectOf(E().bool);const pt=y().forwardRef((function(e,t){let{children:n,className:r,light:i=!1,...o}=e;const a=w(),s=g()(`${a}--tile`,i&&`${a}--tile--light`,r);return y().createElement("div",p({className:s,ref:t},o),n)}));pt.displayName="Tile",pt.propTypes={children:E().node,className:E().string,light:P(E().bool)};const mt=y().forwardRef((function(e,t){let{children:n,className:r,clicked:i=!1,disabled:o,href:a,light:s,onClick:l=(()=>{}),onKeyDown:c=(()=>{}),renderIcon:u,...d}=e;const h=w(),f=g()(`${h}--tile`,`${h}--tile--clickable`,i&&`${h}--tile--is-clicked`,s&&`${h}--tile--light`,r),[m,b]=(0,v.useState)(i),_=ct("enable-v12-tile-default-icons");_&&(u||(u=Ge),o&&(u=ot));const E=g()({[`${h}--tile--icon`]:!_||_&&!o,[`${h}--tile--disabled-icon`]:_&&o});return y().createElement(st,p({className:f,href:a,onClick:o?void 0:function(e){e?.persist?.(),b(!m),l(e)},onKeyDown:function(e){e?.persist?.(),z(e,[j,U])&&(e.preventDefault(),b(!m),c(e)),c(e)},ref:t,disabled:o},d),n,u&&y().createElement(u,{className:E,"aria-hidden":"true"}))}));mt.displayName="ClickableTile",mt.propTypes={children:E().node,className:E().string,clicked:E().bool,disabled:E().bool,href:E().string,light:P(E().bool),onClick:E().func,onKeyDown:E().func,rel:E().string,renderIcon:E().oneOfType([E().func,E().object])};const gt=y().forwardRef((function(e,t){let{children:n,className:r,disabled:i,id:o,light:a,onClick:s=(()=>{}),onChange:l=(()=>{}),onKeyDown:c=(()=>{}),selected:u=!1,tabIndex:d=0,title:h="title",...f}=e;const m=w(),b=s,_=c,[E,x]=(0,v.useState)(u),[S,T]=(0,v.useState)(u),A=g()(`${m}--tile`,`${m}--tile--selectable`,E&&`${m}--tile--is-selected`,a&&`${m}--tile--light`,i&&`${m}--tile--disabled`,r);return u!==S&&(x(u),T(u)),y().createElement("div",p({className:A,onClick:i?void 0:function(e){e.preventDefault(),e?.persist?.(),x(!E),b(e),l(e)},role:"checkbox","aria-checked":E,onKeyDown:i?void 0:function(e){e?.persist?.(),z(e,[j,U])&&(e.preventDefault(),x(!E),l(e)),_(e)},tabIndex:i?void 0:d,ref:t,id:o,onChange:i?void 0:function(e){x(e.target.checked),l(e)},title:h},f),y().createElement("span",{className:`${m}--tile__checkmark ${m}--tile__checkmark--persistent`},E?ut||(ut=y().createElement(O.BV,null)):dt||(dt=y().createElement(O.XZ,null))),y().createElement("label",{htmlFor:o,className:`${m}--tile-content`},n))}));gt.displayName="SelectableTile",gt.propTypes={children:E().node,className:E().string,disabled:E().bool,id:E().string,light:P(E().bool),name:E().string,onChange:E().func,onClick:E().func,onKeyDown:E().func,selected:E().bool,tabIndex:E().number,title:E().string,value:E().oneOfType([E().string,E().number]).isRequired};const vt=y().forwardRef((function(e,t){let{tabIndex:n=0,className:r,children:i,expanded:o=!1,tileMaxHeight:a=0,tilePadding:s=0,onClick:l,onKeyUp:c,tileCollapsedIconText:u="Interact to expand Tile",tileExpandedIconText:d="Interact to collapse Tile",tileCollapsedLabel:h,tileExpandedLabel:f,light:m,...b}=e;const[_,E]=(0,v.useState)(a),[x,S]=(0,v.useState)(s),[T,A]=(0,v.useState)(o),[C,k]=(0,v.useState)(a),[M,N]=(0,v.useState)(s),[D,L]=(0,v.useState)(o),[P,I]=(0,v.useState)(!0),$=(0,v.useRef)(null),B=(0,v.useRef)(null),F=(0,v.useRef)(null),H=(0,v.useRef)(null),V=J([t,H]),Z=w();function W(){D&&F.current&&E(F.current.getBoundingClientRect()?.height),$.current&&E($.current.getBoundingClientRect().height)}function G(e){e?.persist?.(),L(!D),W()}function q(e){e.target!==H.current&&z(e,[j,U])&&e.preventDefault()}o!==T&&(L(o),A(o),W()),a!==C&&(E(a),k(a)),s!==M&&(S(s),N(s));const Y=g()(`${Z}--tile`,`${Z}--tile--expandable`,{[`${Z}--tile--is-expanded`]:D,[`${Z}--tile--light`]:m},r),K=g()(`${Z}--tile`,`${Z}--tile--expandable`,`${Z}--tile--expandable--interactive`,D&&`${Z}--tile--is-expanded`,m&&`${Z}--tile--light`,r),X=g()(`${Z}--tile__chevron`,`${Z}--tile__chevron--interactive`),ee=y().Children.toArray(i);Q((()=>{if(!H.current||!$.current)return;const e=window.getComputedStyle(H.current,null),{current:t}=$,{height:n}=t.getBoundingClientRect(),r=parseInt(e.getPropertyValue("padding-top"),10),i=parseInt(e.getPropertyValue("padding-bottom"),10);E(n),S(r+i)}),[_]),Q((()=>{$.current&&B.current&&(ae(B.current)||se(B.current)||ae($.current)||se($.current)||I(!1))}),[]),Q((()=>{H.current&&(H.current.style.maxHeight=D?"":_+x+"px")}),[D,_,x]),(0,v.useEffect)((()=>{if(!$.current)return;const e=new ResizeObserver((e=>{const[t]=e;E(t.contentRect.height)}));return e.observe($.current),()=>e.disconnect()}),[]);const te=R("expandable-tile-interactive");return P?y().createElement("div",p({ref:V,className:K},b),y().createElement("div",{ref:F},y().createElement("div",{ref:$,className:`${Z}--tile-content`},ee[0]),y().createElement("button",{type:"button","aria-expanded":D,"aria-controls":te,onKeyUp:ue([c,q]),onClick:ue([l,G]),"aria-label":D?d:u,className:X},ht||(ht=y().createElement(O._M,null))),y().createElement("div",{ref:B,className:`${Z}--tile-content`,id:te},ee[1]))):y().createElement("button",p({type:"button",ref:V,className:Y,"aria-expanded":D,title:D?d:u},b,{onKeyUp:ue([c,q]),onClick:ue([l,G]),tabIndex:n}),y().createElement("div",{ref:F},y().createElement("div",{ref:$,className:`${Z}--tile-content`},ee[0]),y().createElement("div",{className:`${Z}--tile__chevron`},y().createElement("span",null,D?f:h),ft||(ft=y().createElement(O._M,null))),y().createElement("div",{ref:B,className:`${Z}--tile-content`},ee[1])))}));vt.propTypes={children:E().node,className:E().string,expanded:E().bool,id:E().string,light:P(E().bool),onClick:E().func,onKeyUp:E().func,tabIndex:E().number,tileCollapsedIconText:E().string,tileCollapsedLabel:E().string,tileExpandedIconText:E().string,tileExpandedLabel:E().string},vt.displayName="ExpandableTile";const yt=y().forwardRef((function(e,t){let{children:n}=e;const r=w();return y().createElement("span",{ref:t,className:`${r}--tile-content__above-the-fold`},n)}));yt.propTypes={children:E().node},yt.displayName="TileAboveTheFoldContent";const bt=y().forwardRef((function(e,t){let{children:n}=e;const r=w();return y().createElement("span",{ref:t,className:`${r}--tile-content__below-the-fold`},n)}));bt.propTypes={children:E().node},bt.displayName="TileBelowTheFoldContent";const wt=y().createContext(1),_t=["one","two","three"],Et=_t.length-1,xt=y().forwardRef((function(e,t){let{as:n="div",className:r,children:i,level:o,...a}=e;const s=y().useContext(wt),l=o??s,c=w(),u=g()(`${c}--layer-${_t[l]}`,r),d=Math.max(0,Math.min(l+1,Et));return y().createElement(wt.Provider,{value:d},y().createElement(n,p({ref:t},a,{className:u}),i))}));function St(e){let{active:t=!0,className:n,withOverlay:r=!0,small:i=!1,description:o="loading",...a}=e;const s=w(),l=g()(n,{[`${s}--loading`]:!0,[`${s}--loading--small`]:i,[`${s}--loading--stop`]:!t}),c=g()({[`${s}--loading-overlay`]:!0,[`${s}--loading-overlay--stop`]:!t}),u=y().createElement("div",p({},a,{"aria-atomic":"true","aria-live":t?"assertive":"off",className:l}),y().createElement("svg",{className:`${s}--loading__svg`,viewBox:"0 0 100 100"},y().createElement("title",null,o),i?y().createElement("circle",{className:`${s}--loading__background`,cx:"50%",cy:"50%",r:"44"}):null,y().createElement("circle",{className:`${s}--loading__stroke`,cx:"50%",cy:"50%",r:"44"})));return r?y().createElement("div",{className:c},u):u}function Tt(e){let{className:t,status:n="active",iconDescription:r,description:i,onSuccess:o,successDelay:a=1500,...s}=e;const l=w(),c=g()(`${l}--inline-loading`,t),u=y().createElement("div",{className:`${l}--inline-loading__text`},i),d=(()=>{let e=r||n;return"error"===n?y().createElement(at,{className:`${l}--inline-loading--error`},y().createElement("title",null,e)):"finished"===n?(setTimeout((()=>{o&&o()}),a),y().createElement(O.kF,{className:`${l}--inline-loading__checkmark-container`},y().createElement("title",null,e))):"inactive"===n||"active"===n?(r||(e="active"===n?"loading":"not loading"),y().createElement(St,{small:!0,description:e,withOverlay:!1,active:"active"===n})):void 0})(),h=d&&y().createElement("div",{className:`${l}--inline-loading__animation`},d);return y().createElement("div",p({className:c},s,{"aria-live":"assertive"}),h,i&&u)}xt.propTypes={as:E().oneOfType([E().func,E().string,E().elementType]),children:E().node,className:E().string,level:E().oneOf([0,1,2])},St.propTypes={active:E().bool,className:E().string,description:E().string,id:P(E().string),small:E().bool,withOverlay:E().bool},Tt.propTypes={className:E().string,description:E().node,iconDescription:E().string,onSuccess:E().func,status:E().oneOf(["inactive","active","finished","error"]),successDelay:E().number};var Ot=n(3958),At=n.n(Ot);const Ct={NONE:"NONE",DESC:"DESC",ASC:"ASC"},kt=(e,t)=>`${e}:${t}`,Mt=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en";return null===e&&(e=""),null===t&&(t=""),"number"==typeof e&&"number"==typeof t?e-t:"string"==typeof e&&"string"==typeof t?Nt(e,t,n):"object"==typeof e&&"object"==typeof t&&"string"==typeof e.props.children&&"string"==typeof t.props.children?Nt(e.props.children,t.props.children,n):Nt(""+e,""+t,n)},Nt=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en";return isNaN(e)||isNaN(parseFloat(e))||isNaN(t)||isNaN(parseFloat(t))?e.localeCompare(t,n):e.localeCompare(t,n,{numeric:!0})},Dt=Ct.NONE,Rt=(e,t,n)=>{let{key:r}=n;const{sortDirection:i,sortHeaderKey:o}=t,a=(s=i,r===o?"NONE"===s?Ct.ASC:"ASC"===s?Ct.DESC:Ct.NONE:Ct.ASC);var s;return Lt(e,t,r,a)},Lt=(e,t,n,r)=>{const{rowIds:i,cellsById:o,initialRowOrder:a}=t,{locale:s,sortRow:l}=e,c=r!==Ct.NONE?(e=>{let{rowIds:t,cellsById:n,sortDirection:r,key:i,locale:o,sortRow:a}=e;return t.slice().sort(((e,t)=>{const s=n[kt(e,i)],l=n[kt(t,i)];return a(s&&s.value,l&&l.value,{key:i,sortDirection:r,locale:o,sortStates:Ct,compare:Mt,rowIds:[e,t]})}))})({rowIds:i,cellsById:o,sortDirection:r,key:n,locale:s,sortRow:l}):a;return{sortHeaderKey:n,sortDirection:r,rowIds:c}};var Pt=(e,t)=>{const{rowIds:n,rowsById:r,cellsById:i}=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{rowsById:r}=n,i=new Array(e.length),o={},a={};return e.forEach(((e,n)=>{i[n]=e.id;const{id:s,isSelected:l=!1,isExpanded:c=!1,disabled:u=!1}=e;o[s]={id:s,isSelected:l,isExpanded:c,disabled:u,cells:new Array(t.length)},r&&void 0!==r[e.id]&&(o[e.id].isSelected=r[e.id].isSelected,o[e.id].isExpanded=r[e.id].isExpanded),t.forEach(((t,n)=>{let{key:r}=t;const i=kt(e.id,r);a[i]={id:i,value:e[r],isEditable:!1,isEditing:!1,isValid:!0,errors:null,info:{header:r}},o[e.id].cells[n]=i}))})),{rowIds:i,rowsById:o,cellsById:a}}(e.rows,e.headers,t),o={rowIds:n,rowsById:r,cellsById:i,sortDirection:t.sortDirection||Dt,sortHeaderKey:t.sortHeaderKey||null,initialRowOrder:n.slice(),filterInputValue:t.filterInputValue||null,shouldShowBatchActions:t.shouldShowBatchActions||!1};if(t.sortDirection&&t.sortHeaderKey){const{rowIds:n}=Lt(e,o,t.sortHeaderKey,t.sortDirection);o.rowIds=n}return o.isExpandedAll=o.rowIds.every((e=>!0===o.rowsById[e].isExpanded)),o},It=(e,t,n)=>e.map((e=>({...t[e],cells:t[e].cells.map((e=>n[e]))}))),$t=()=>{let e=0;return function(){return++e}};const zt=(0,v.createContext)({titleId:void 0,descriptionId:void 0}),Bt=(e,t)=>{if(e.children.length>0)return!1;const n=window.getComputedStyle(e);t.font=n.font?n.font:`${n.fontSize}" "${n.fontFamily}`;const r=t?.measureText(e.textContent??"");let i=r.width??0;const o=n.letterSpacing?.split("px");o&&o.length&&!isNaN(Number(o[0]))&&(i+=Number(o[0])*(e.textContent?.length??0));const a=n.paddingLeft?.split("px");a&&a.length&&!isNaN(Number(a[0]))&&(i+=Number(a[0]));const s=n.paddingLeft?.split("px");return s&&s.length&&!isNaN(Number(s[0]))&&(i+=Number(s[0])),i>e.getBoundingClientRect().width},jt=e=>{let{className:t,children:n,useZebraStyles:r,size:i="lg",isSortable:o=!1,useStaticWidth:a,stickyHeader:s,overflowMenuOnHover:l=!0,experimentalAutoAlign:c=!1,...u}=e;const{titleId:d,descriptionId:h}=(0,v.useContext)(zt),f=w(),[m,b]=(0,v.useState)(!1),_=(0,v.useRef)(null),E=g()(`${f}--data-table`,t,{[`${f}--data-table--${i}`]:i,[`${f}--data-table--sort`]:o,[`${f}--data-table--zebra`]:r,[`${f}--data-table--static`]:a,[`${f}--data-table--sticky-header`]:s,[`${f}--data-table--visible-overflow-menu`]:!l}),x=(0,v.useCallback)((function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]?_.current?.classList.add(`${f}--data-table--top-aligned-body`):_.current?.classList.remove(`${f}--data-table--top-aligned-body`)}),[f]),S=(0,v.useCallback)((function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]?_.current?.classList.add(`${f}--data-table--top-aligned-header`):_.current?.classList.remove(`${f}--data-table--top-aligned-header`)}),[f]),T=(0,v.useCallback)((()=>{if(c){const e=document.createElement("canvas").getContext("2d");if(_.current&&e){const t=Array.from(_.current.querySelectorAll("td")).some((t=>Bt(t,e))),n=Array.from(_.current.querySelectorAll("th")).some((t=>{const n=t.querySelector(`.${f}--table-header-label`);return n&&Bt(n,e)}));x(t),S(n)}}else x(!1),S(!1)}),[c,x,S,f]);te("resize",Te()(T,100));const O=(0,v.useCallback)((()=>{const e=_?.current?.parentNode,t=_?.current?.firstChild;b(t?.scrollWidth>e?.clientWidth)}),[]);te("resize",Te()(O,100)),(0,v.useLayoutEffect)((()=>{O()}),[O]),"undefined"!=typeof document&&document?.fonts?.status&&"loaded"!==document.fonts.status&&document.fonts.ready.then((()=>{T()})),(0,v.useLayoutEffect)((()=>{T()}),[T,i]);const A=y().createElement("div",{className:`${f}--data-table-content`,tabIndex:m?0:void 0},y().createElement("table",p({"aria-labelledby":d,"aria-describedby":h},u,{className:E,ref:_}),n));return s?y().createElement("section",{className:`${f}--data-table_inner-container`},A):A};jt.propTypes={children:E().node,className:E().string,experimentalAutoAlign:E().bool,isSortable:E().bool,overflowMenuOnHover:E().bool,size:E().oneOf(["xs","sm","md","lg","xl"]),stickyHeader:E().bool,useStaticWidth:E().bool,useZebraStyles:E().bool},jt.defaultProps={isSortable:!1,overflowMenuOnHover:!0};var Ft=e=>{let{name:t,className:n,type:r}=e;function i(e){let{className:t,...i}=e;const o=w(),a=g()("function"==typeof n?n(o):n,t);return y().createElement(r,{...i,className:a||void 0})}return i.displayName=t,i.propTypes={className:E().string},i},Ut=Ft({name:"TableActionList",type:"div",className:e=>`${e}--action-list`});const Ht=e=>y().createElement(de,e);Ht.propTypes={hasIconOnly:E().bool,iconDescription:e=>{if(e.renderIcon&&!e.children&&!e.iconDescription)return new Error("renderIcon property specified without also providing an iconDescription property.")},renderIcon:E().oneOfType([E().func,E().object])},Ht.defaultProps={renderIcon:We,iconDescription:"Add"};var Vt=Ht;const Zt={"carbon.table.batch.cancel":"Cancel","carbon.table.batch.items.selected":"items selected","carbon.table.batch.item.selected":"item selected","carbon.table.batch.selectAll":"Select all"},Wt=function(e){let{totalSelected:t,totalCount:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{totalSelected:0,totalCount:0};return"carbon.table.batch.cancel"===e?Zt[e]:"carbon.table.batch.selectAll"===e?`${Zt[e]} (${n})`:`${t} ${Zt[e]}`},Gt=e=>{let{className:t,children:n,shouldShowBatchActions:r,totalSelected:i,totalCount:o,onCancel:a,onSelectAll:s,translateWithId:l=Wt,...c}=e;const[u,d]=y().useState(!1),h=w(),f=g()({[`${h}--batch-actions`]:!0,[`${h}--batch-actions--active`]:r},t),m=g()(`${h}--batch-summary`,{[`${h}--batch-summary__scroll`]:u});return y().createElement("div",p({onScroll:()=>{d(!u)},"aria-hidden":!r,className:f},c),y().createElement("div",{className:m},y().createElement("p",{className:`${h}--batch-summary__para`},y().createElement($,{as:"span"},l(i>1||0===i?"carbon.table.batch.items.selected":"carbon.table.batch.item.selected",{totalSelected:i}))),s&&y().createElement(y().Fragment,null,y().createElement("span",{className:`${h}--batch-summary__divider`},"|"),y().createElement(de,{onClick:s,tabIndex:r?0:-1},l("carbon.table.batch.selectAll",{totalCount:o})))),y().createElement(Ut,null,n,y().createElement(de,{className:`${h}--batch-summary__cancel`,tabIndex:r?0:-1,onClick:a},l("carbon.table.batch.cancel"))))};Gt.translationKeys=["carbon.table.batch.cancel","carbon.table.batch.items.selected","carbon.table.batch.item.selected","carbon.table.batch.selectAll"],Gt.propTypes={children:E().node,className:E().string,onCancel:E().func.isRequired,onSelectAll:E().func,shouldShowBatchActions:E().bool,totalCount:E().number,totalSelected:E().number.isRequired,translateWithId:E().func},Gt.defaultProps={translateWithId:Wt};const qt=e=>{let{children:t,className:n,...r}=e;return y().createElement("tbody",p({className:n},r),t)};qt.propTypes={"aria-live":E().oneOf(["polite","assertive","off"]),children:E().node,className:E().string},qt.defaultProps={"aria-live":"polite"};const Yt=Ft({name:"TableCell",type:"td"}),Kt=e=>{let{className:t,children:n,title:r,description:i,stickyHeader:o,useStaticWidth:a,...s}=e;const l=R("tc"),c=`${l}-title`,u=`${l}-description`,d=w(),h=g()(t,`${d}--data-table-container`,{[`${d}--data-table--max-width`]:o,[`${d}--data-table-container--static`]:a}),f=(0,v.useMemo)((()=>({titleId:r?c:void 0,descriptionId:i?u:void 0})),[r,i,c,u]);return y().createElement(zt.Provider,{value:f},y().createElement("div",p({},s,{className:h}),r&&y().createElement("div",{className:`${d}--data-table-header`},y().createElement("h4",{className:`${d}--data-table-header__title`,id:c},r),y().createElement("p",{className:`${d}--data-table-header__description`,id:u},i)),n))};function Xt(e,t){return function(e,n,r){for(var i=arguments.length,o=new Array(i>3?i-3:0),a=3;a<i;a++)o[a-3]=arguments[a];return t(e,n,r,...o)}}Kt.propTypes={children:E().node,className:E().string,description:E().node,stickyHeader:E().bool,title:E().node,useStaticWidth:E().bool};const Qt=e=>{let{"aria-controls":t,"aria-label":n,ariaLabel:r,className:i,enableExpando:o,enableToggle:a,id:s="expand",isExpanded:l,onExpand:c,expandIconDescription:u,children:d,...h}=e;const f=w(),m=g()(`${f}--table-expand`,i),v=l?"collapsed":void 0;return y().createElement("th",p({scope:"col",className:m,"data-previous-value":v,id:s},h),o||a?y().createElement("button",{type:"button",className:`${f}--table-expand__button`,onClick:c,title:u,"aria-label":r||n,"aria-expanded":l,"aria-controls":t},y().createElement(O._Q,{className:`${f}--table-expand__svg`,"aria-label":u})):null,d)};Qt.propTypes={"aria-controls":E().string,"aria-label":E().string,ariaLabel:E().string,children:E().node,className:E().string,enableExpando:P(E().bool),enableToggle:E().bool,expandIconDescription:E().string,id:E().string,isExpanded:Xt(0,E().bool),onExpand:E().oneOfType([Xt(0,E().func),Xt(0,E().func)])};const Jt=e=>{let{"aria-controls":t,"aria-label":n,ariaLabel:r,className:i,children:o,isExpanded:a,onExpand:s,expandIconDescription:l,isSelected:c,expandHeader:u="expand",...d}=e;const h=w(),f=g()({[`${h}--parent-row`]:!0,[`${h}--expandable-row`]:a,[`${h}--data-table--selected`]:c},i),m=a?"collapsed":void 0;return y().createElement("tr",p({},d,{className:f,"data-parent-row":!0}),y().createElement(Yt,{className:`${h}--table-expand`,"data-previous-value":m,headers:u},y().createElement("button",{type:"button",className:`${h}--table-expand__button`,onClick:s,title:l,"aria-label":r||n,"aria-expanded":a,"aria-controls":t},y().createElement(O._Q,{className:`${h}--table-expand__svg`,"aria-label":l}))),o)};Jt.propTypes={"aria-controls":E().string,"aria-label":E().string,ariaLabel:E().string,children:E().node,className:E().string,expandHeader:E().string,expandIconDescription:E().string,isExpanded:E().bool.isRequired,isSelected:E().bool,onExpand:E().func.isRequired};const en=e=>{let{className:t,children:n,colSpan:r,...i}=e;const o=(0,v.useRef)(null),a=w(),s=g()(`${a}--expandable-row`,t),l=e=>{if(o&&o.current&&o.current.previousElementSibling){const t=o.current.previousElementSibling;"enter"===e?t.classList.add(`${a}--expandable-row--hover`):t.classList.remove(`${a}--expandable-row--hover`)}};return y().createElement("tr",p({ref:o,onMouseEnter:()=>l("enter"),onMouseLeave:()=>l("leave")},i,{className:s,"data-child-row":!0}),y().createElement(Yt,{colSpan:r},y().createElement("div",{className:`${a}--child-row-inner-container`},n)))};en.propTypes={children:E().node,className:E().string,colSpan:E().number.isRequired};const tn=Ft({name:"TableHead",type:"thead"}),nn="col",rn={buttonDescription:"carbon.table.header.icon.description"},on={[Ct.NONE]:"none",[Ct.ASC]:"ascending",[Ct.DESC]:"descending"},an=y().forwardRef((function(e,t){let{className:n,children:r,colSpan:i,isSortable:o,isSortHeader:a,onClick:s,scope:l=nn,sortDirection:c,translateWithId:u,id:d,...h}=e;const f=w(),m=R("table-sort");if(!o)return y().createElement("th",p({},h,{id:d,className:n,scope:l,colSpan:i,ref:t}),r?y().createElement("div",{className:`${f}--table-header-label`},r):null);const v=g()(n,{[`${f}--table-sort`]:!0,[`${f}--table-sort--active`]:a&&c!==Ct.NONE,[`${f}--table-sort--descending`]:a&&c===Ct.DESC}),b=a&&c?on[c]:"none",_=u&&u("carbon.table.header.icon.description",{header:r,sortDirection:c,isSortHeader:a,sortStates:Ct}),E=g()(n,`${f}--table-sort__header`);return y().createElement("th",{id:d,"aria-sort":b,className:E,colSpan:i,ref:t,scope:l},y().createElement("div",{className:`${f}--table-sort__description`,id:m},_),y().createElement("button",p({type:"button","aria-describedby":m,className:v,onClick:s},h),y().createElement("span",{className:`${f}--table-sort__flex`},y().createElement("div",{className:`${f}--table-header-label`},r),y().createElement(qe,{size:20,className:`${f}--table-sort__icon`}),y().createElement(Ye,{size:20,className:`${f}--table-sort__icon-unsorted`}))))}));an.propTypes={children:E().node,className:E().string,colSpan:E().number,id:E().string,isSortHeader:E().bool,isSortable:E().bool,onClick:E().func,scope:E().string.isRequired,sortDirection:E().oneOf(Object.values(Ct)),translateWithId:E().func},an.defaultProps={isSortable:!1,scope:nn,translateWithId:(e,t)=>t&&e===rn.buttonDescription?t.isSortHeader&&Ct?t.sortDirection===Ct.NONE?`Click to sort rows by ${t.header} header in ascending order`:t.sortDirection===Ct.ASC?`Click to sort rows by ${t.header} header in descending order`:`Click to unsort rows by ${t.header} header`:`Click to sort rows by ${t.header} header in ascending order`:""},an.translationKeys=Object.values(rn),an.displayName="TableHeader";var sn=n(8979),ln=n.n(sn);const cn=e=>{const t=w(),n=g()(e.className,{[`${t}--data-table--selected`]:e.isSelected}),r={...ln()(e,["ariaLabel","aria-label","aria-controls","onExpand","isExpanded","isSelected"]),className:n||void 0};return y().createElement("tr",r)};cn.propTypes={className:E().string,isSelected:E().bool};const un=y().forwardRef((function(e,t){const{"aria-label":n,ariaLabel:r,checked:i=!1,disabled:o,id:a,indeterminate:s,name:l,onChange:c=(()=>{}),onClick:u,onKeyDown:d,title:h}=e,f=w(),p=(0,v.useRef)(null),m=J([p,t]),g={checked:i,className:`${f}--checkbox`,disabled:o,id:a,name:l,onClick:u,onChange:e=>{c(e.target.checked,a,e)},onKeyDown:d,ref:m,type:"checkbox"};return s&&(g.checked=!1),(0,v.useEffect)((()=>{p?.current&&(p.current.indeterminate=s)}),[s]),y().createElement("div",{className:`${f}--checkbox--inline`},y().createElement("input",g),y().createElement("label",{htmlFor:a,className:`${f}--checkbox-label`,title:h,onClick:e=>{e.stopPropagation()}},y().createElement("span",{className:`${f}--visually-hidden`},r||n)))}));un.propTypes={"aria-label":E().string.isRequired,ariaLabel:P(E().string.isRequired),checked:E().bool,disabled:E().bool,id:E().string.isRequired,indeterminate:E().bool,name:E().string.isRequired,onChange:E().func,onClick:E().func,onKeyDown:E().func,title:E().string};var dn=un;const hn=e=>{let{ariaLabel:t,checked:n,id:r,indeterminate:i,name:o,onSelect:a,disabled:s,className:l}=e;const c=w();return y().createElement("th",{"aria-live":"off",scope:"col",className:g()(`${c}--table-column-checkbox`,l)},y().createElement(dn,{"aria-label":t,checked:n,id:r,indeterminate:i,name:o,onClick:a,disabled:s}))};hn.propTypes={ariaLabel:E().string.isRequired,checked:E().bool.isRequired,className:E().string,disabled:E().bool,id:E().string.isRequired,indeterminate:E().bool,name:E().string.isRequired,onSelect:E().func.isRequired},hn.defaultProps={ariaLabel:"Select all rows in the table"};var fn=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return e=>{t.forEach((t=>{"function"==typeof t?t(e):Object(t)===t&&(t.current=e)}))}};const pn=y().forwardRef(((e,t)=>{const{className:n,disabled:r,hideLabel:i,id:o,labelPosition:a="right",labelText:s="",name:l,onChange:c=(()=>{}),value:u="",...d}=e,h=w(),f=R("radio-button"),m=o||f,b=g()(`${h}--radio-button__label-text`,{[`${h}--visually-hidden`]:i}),_=g()(n,`${h}--radio-button-wrapper`,{[`${h}--radio-button-wrapper--label-${a}`]:"right"!==a}),E=(0,v.useRef)(null);return y().createElement("div",{className:_},y().createElement("input",p({},d,{type:"radio",className:`${h}--radio-button`,onChange:function(e){c(u,l,e)},id:m,ref:fn(E,t),disabled:r,value:u,name:l})),y().createElement("label",{htmlFor:m,className:`${h}--radio-button__label`},y().createElement("span",{className:`${h}--radio-button__appearance`}),s&&y().createElement($,{className:b},s)))}));pn.displayName="RadioButton",pn.propTypes={checked:E().bool,className:E().string,defaultChecked:E().bool,disabled:E().bool,hideLabel:E().bool,id:E().string,labelPosition:E().oneOf(["right","left"]),labelText:E().node.isRequired,name:E().string,onChange:E().func,onClick:E().func,value:E().oneOfType([E().string,E().number])};const mn=e=>{let{ariaLabel:t,checked:n,id:r,name:i,onSelect:o,onChange:a,disabled:s,radio:l,className:c}=e;const u=w(),d={id:r,name:i,onClick:o,onChange:a,checked:n,disabled:s},h=l?pn:dn,f=g()(`${u}--table-column-checkbox`,{...c&&{[c]:!0},[`${u}--table-column-radio`]:l});return y().createElement("td",{className:f,"aria-live":"off"},y().createElement(h,p({},d,l&&{labelText:t,hideLabel:!0},!l&&{"aria-label":t})))};mn.propTypes={ariaLabel:E().string.isRequired,checked:E().bool.isRequired,className:E().string,disabled:E().bool,id:E().string.isRequired,name:E().string.isRequired,onChange:E().func,onSelect:E().func.isRequired,radio:E().bool};const gn=(vn={"aria-label":E().string,"aria-labelledby":E().string},Object.keys(vn).reduce(((e,t)=>{return{...e,[t]:(n=vn[t],function(e,t,r){for(var i=arguments.length,o=new Array(i>3?i-3:0),a=3;a<i;a++)o[a-3]=arguments[a];return n(e,t,r,...o)})};var n}),{}));var vn;const yn=e=>{let{children:t,size:n,...r}=e;const i=w(),o=g()({[`${i}--table-toolbar`]:!0,[`${i}--table-toolbar--${n}`]:n});return y().createElement("section",p({},r,{className:o}),t)};yn.propTypes={...gn,children:E().node,size:E().oneOf(["sm","lg"])},yn.defaultProps={"aria-label":"data table toolbar"};const bn=y().forwardRef((function(e,t){let{className:n,closeMenu:r,disabled:i=!1,handleOverflowMenuItemFocus:o,hasDivider:a=!1,href:s,isDelete:l=!1,index:c,itemText:u="Provide itemText",onClick:d=(()=>{}),onKeyDown:h=(()=>{}),requireTitle:f,title:m,wrapperClassName:v,...b}=e;const _=w(),E=g()(`${_}--overflow-menu-options__btn`,n),x=g()(`${_}--overflow-menu-options__option`,{[`${_}--overflow-menu--divider`]:a,[`${_}--overflow-menu-options__option--danger`]:l,[`${_}--overflow-menu-options__option--disabled`]:i},v),S=s?"a":"button",T="string"!=typeof u?u:y().createElement("div",{className:`${_}--overflow-menu-options__option-content`},u);return y().createElement("li",{className:x,role:"none"},y().createElement(S,p({className:E,disabled:i,href:s,onClick:function(e){d(e),r&&r()},onKeyDown:e=>{!function(e){B(e,q)&&o?.({currentIndex:c,direction:1}),B(e,W)&&o?.({currentIndex:c,direction:-1})}(e),h(e)},role:"menuitem",ref:t,tabIndex:-1,title:f?m||u:void 0},b),T))}));bn.propTypes={className:E().string,closeMenu:E().func,disabled:E().bool,handleOverflowMenuItemFocus:E().func,hasDivider:E().bool,href:E().string,index:E().number,isDelete:E().bool,itemText:E().node.isRequired,onBlur:E().func,onClick:E().func,onFocus:E().func,onKeyDown:E().func,onKeyUp:E().func,onMouseDown:E().func,onMouseEnter:E().func,onMouseLeave:E().func,onMouseUp:E().func,requireTitle:E().bool,title:E().string,wrapperClassName:E().string};const wn=y().forwardRef(((e,t)=>{let{children:n,...r}=e;return y().createElement(bn,p({ref:t,itemText:n},r))}));wn.displayName="TableToolbarAction",wn.propTypes={children:E().node,className:E().string,onClick:E().func.isRequired};const _n=Ft({name:"TableToolbarContent",type:"div",className:e=>`${e}--toolbar-content`});var En,xn,Sn,Tn,On,An;const Cn=y().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return 16===r||"16"===r||"16px"===r?y().createElement(ge.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},En||(En=y().createElement("path",{d:"M15,14.3L10.7,10c1.9-2.3,1.6-5.8-0.7-7.7S4.2,0.7,2.3,3S0.7,8.8,3,10.7c2,1.7,5,1.7,7,0l4.3,4.3L15,14.3z M2,6.5 C2,4,4,2,6.5,2S11,4,11,6.5S9,11,6.5,11S2,9,2,6.5z"})),n):y().createElement(ge.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},xn||(xn=y().createElement("path",{d:"M29,27.5859l-7.5521-7.5521a11.0177,11.0177,0,1,0-1.4141,1.4141L27.5859,29ZM4,13a9,9,0,1,1,9,9A9.01,9.01,0,0,1,4,13Z"})),n)})),kn=y().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return 16===r||"16"===r||"16px"===r?y().createElement(ge.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},Sn||(Sn=y().createElement("path",{d:"M13.5,8.4c0-0.1,0-0.3,0-0.4c0-0.1,0-0.3,0-0.4l1-0.8c0.4-0.3,0.4-0.9,0.2-1.3l-1.2-2C13.3,3.2,13,3,12.6,3 c-0.1,0-0.2,0-0.3,0.1l-1.2,0.4c-0.2-0.1-0.4-0.3-0.7-0.4l-0.3-1.3C10.1,1.3,9.7,1,9.2,1H6.8c-0.5,0-0.9,0.3-1,0.8L5.6,3.1 C5.3,3.2,5.1,3.3,4.9,3.4L3.7,3C3.6,3,3.5,3,3.4,3C3,3,2.7,3.2,2.5,3.5l-1.2,2C1.1,5.9,1.2,6.4,1.6,6.8l0.9,0.9c0,0.1,0,0.3,0,0.4 c0,0.1,0,0.3,0,0.4L1.6,9.2c-0.4,0.3-0.5,0.9-0.2,1.3l1.2,2C2.7,12.8,3,13,3.4,13c0.1,0,0.2,0,0.3-0.1l1.2-0.4 c0.2,0.1,0.4,0.3,0.7,0.4l0.3,1.3c0.1,0.5,0.5,0.8,1,0.8h2.4c0.5,0,0.9-0.3,1-0.8l0.3-1.3c0.2-0.1,0.4-0.2,0.7-0.4l1.2,0.4 c0.1,0,0.2,0.1,0.3,0.1c0.4,0,0.7-0.2,0.9-0.5l1.1-2c0.2-0.4,0.2-0.9-0.2-1.3L13.5,8.4z M12.6,12l-1.7-0.6c-0.4,0.3-0.9,0.6-1.4,0.8 L9.2,14H6.8l-0.4-1.8c-0.5-0.2-0.9-0.5-1.4-0.8L3.4,12l-1.2-2l1.4-1.2c-0.1-0.5-0.1-1.1,0-1.6L2.2,6l1.2-2l1.7,0.6 C5.5,4.2,6,4,6.5,3.8L6.8,2h2.4l0.4,1.8c0.5,0.2,0.9,0.5,1.4,0.8L12.6,4l1.2,2l-1.4,1.2c0.1,0.5,0.1,1.1,0,1.6l1.4,1.2L12.6,12z"})),Tn||(Tn=y().createElement("path",{d:"M8,11c-1.7,0-3-1.3-3-3s1.3-3,3-3s3,1.3,3,3C11,9.6,9.7,11,8,11C8,11,8,11,8,11z M8,6C6.9,6,6,6.8,6,7.9C6,7.9,6,8,6,8 c0,1.1,0.8,2,1.9,2c0,0,0.1,0,0.1,0c1.1,0,2-0.8,2-1.9c0,0,0-0.1,0-0.1C10,6.9,9.2,6,8,6C8.1,6,8,6,8,6z"})),n):y().createElement(ge.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},On||(On=y().createElement("path",{d:"M27,16.76c0-.25,0-.5,0-.76s0-.51,0-.77l1.92-1.68A2,2,0,0,0,29.3,11L26.94,7a2,2,0,0,0-1.73-1,2,2,0,0,0-.64.1l-2.43.82a11.35,11.35,0,0,0-1.31-.75l-.51-2.52a2,2,0,0,0-2-1.61H13.64a2,2,0,0,0-2,1.61l-.51,2.52a11.48,11.48,0,0,0-1.32.75L7.43,6.06A2,2,0,0,0,6.79,6,2,2,0,0,0,5.06,7L2.7,11a2,2,0,0,0,.41,2.51L5,15.24c0,.25,0,.5,0,.76s0,.51,0,.77L3.11,18.45A2,2,0,0,0,2.7,21L5.06,25a2,2,0,0,0,1.73,1,2,2,0,0,0,.64-.1l2.43-.82a11.35,11.35,0,0,0,1.31.75l.51,2.52a2,2,0,0,0,2,1.61h4.72a2,2,0,0,0,2-1.61l.51-2.52a11.48,11.48,0,0,0,1.32-.75l2.42.82a2,2,0,0,0,.64.1,2,2,0,0,0,1.73-1L29.3,21a2,2,0,0,0-.41-2.51ZM25.21,24l-3.43-1.16a8.86,8.86,0,0,1-2.71,1.57L18.36,28H13.64l-.71-3.55a9.36,9.36,0,0,1-2.7-1.57L6.79,24,4.43,20l2.72-2.4a8.9,8.9,0,0,1,0-3.13L4.43,12,6.79,8l3.43,1.16a8.86,8.86,0,0,1,2.71-1.57L13.64,4h4.72l.71,3.55a9.36,9.36,0,0,1,2.7,1.57L25.21,8,27.57,12l-2.72,2.4a8.9,8.9,0,0,1,0,3.13L27.57,20Z"})),An||(An=y().createElement("path",{d:"M16,22a6,6,0,1,1,6-6A5.94,5.94,0,0,1,16,22Zm0-10a3.91,3.91,0,0,0-4,4,3.91,3.91,0,0,0,4,4,3.91,3.91,0,0,0,4-4A3.91,3.91,0,0,0,16,12Z"})),n)})),Mn=(0,v.createContext)({isFluid:!1});var Nn;const Dn=y().forwardRef((function(e,t){let{autoComplete:n="off",className:r,closeButtonLabelText:i="Clear search input",defaultValue:o,disabled:a,isExpanded:s=!0,id:l,labelText:c,light:u,onChange:d=(()=>{}),onClear:h=(()=>{}),onKeyDown:f,onExpand:m,placeholder:b="Search",renderIcon:_,role:E="searchbox",size:x="md",type:S="text",value:T,...O}=e;const A=!(!T&&!o),C=w(),{isFluid:k}=(0,v.useContext)(Mn),M=(0,v.useRef)(null),N=J([t,M]),D=(0,v.useRef)(null),L=R("search-input"),P=l||L,I=`${P}-search`,[$,z]=(0,v.useState)(A||!1),[H,V]=(0,v.useState)(T),Z=g()({[`${C}--search`]:!0,[`${C}--search--sm`]:"sm"===x,[`${C}--search--md`]:"md"===x,[`${C}--search--lg`]:"lg"===x,[`${C}--search--light`]:u,[`${C}--search--disabled`]:a,[`${C}--search--fluid`]:k},r),W=g()({[`${C}--search-close`]:!0,[`${C}--search-close--hidden`]:!$||!s});function G(){!T&&M.current&&(M.current.value="");const e=Object.assign({},M.current,{value:""});d({target:e,type:"change"}),h(),z(!1),function(e){const t=e.current||e;t&&t.focus&&document.activeElement!==t&&t.focus()}(M)}return T!==H&&(z(!!T),V(T)),y().createElement("div",{role:"search","aria-label":b,className:Z},y().createElement("div",{"aria-labelledby":m?P:void 0,role:m?"button":void 0,className:`${C}--search-magnifier`,onClick:m,onKeyDown:function(e){(B(e,j)||B(e,U))&&(e.stopPropagation(),m&&m(e))},tabIndex:m&&!s?0:-1,ref:D,"aria-expanded":!(!m||!s)||void 0,"aria-controls":m?P:void 0},y().createElement(Rn,{icon:_})),y().createElement("label",{id:I,htmlFor:P,className:`${C}--label`},c),y().createElement("input",p({autoComplete:n,className:`${C}--search-input`,defaultValue:o,disabled:a,role:E,ref:N,id:P,onChange:ue([d,function(e){z(""!==e.target.value)}]),onKeyDown:ue([f,function(e){B(e,F)&&(e.stopPropagation(),M.current?.value?G():m&&s&&D.current?.focus())}]),placeholder:b,type:S,value:T,tabIndex:m&&!s?-1:void 0},O)),y().createElement("button",{"aria-label":i,className:W,disabled:a,onClick:G,title:i,type:"button"},Nn||(Nn=y().createElement(ve,null))))}));function Rn(e){let{icon:t}=e;const n=w();return t?y().createElement(t,{className:`${n}--search-magnifier-icon`}):y().createElement(Cn,{className:`${n}--search-magnifier-icon`})}Dn.displayName="Search",Dn.propTypes={autoComplete:E().string,className:E().string,closeButtonLabelText:E().string,defaultValue:E().oneOfType([E().string,E().number]),disabled:E().bool,id:E().string,isExpanded:E().bool,labelText:E().node.isRequired,light:P(E().bool),onChange:E().func,onClear:E().func,onExpand:E().func,onKeyDown:E().func,placeholder:E().string,renderIcon:E().oneOfType([E().func,E().object]),role:E().string,size:E().oneOf(["sm","md","lg"]),type:E().string,value:E().oneOfType([E().string,E().number])},Rn.propTypes={icon:E().oneOfType([E().func,E().object])};const Ln=$t(),Pn={"carbon.table.toolbar.search.label":"Filter table","carbon.table.toolbar.search.placeholder":"Filter table"},In=e=>{let{className:t,searchContainerClass:n,onChange:r,onClear:i,translateWithId:o,placeholder:a,labelText:s,expanded:l,defaultExpanded:c,defaultValue:u,disabled:d,onExpand:h,persistent:f,id:m,onBlur:b,onFocus:_,size:E="lg",tabIndex:x,...S}=e;const{current:T}=(0,v.useRef)(void 0!==l),[O,A]=(0,v.useState)(c||u),C=T?l:O,[k,M]=(0,v.useState)(u||""),N=(0,v.useMemo)(Ln,[]),[D,R]=(0,v.useState)(null),L=w();(0,v.useEffect)((()=>{D&&(D.current?.querySelector?.("input")?.focus(),R(null))}),[D]),(0,v.useEffect)((()=>{u&&r?.("",u)}),[]);const P=g()(t,{[n]:n,[`${L}--toolbar-search-container-active`]:C,[`${L}--toolbar-search-container-disabled`]:d,[`${L}--toolbar-search-container-expandable`]:!f,[`${L}--toolbar-search-container-persistent`]:f}),I=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:!C;d||(T||f||A(t),h&&h(e,t))};return y().createElement(Dn,p({disabled:d,className:P,value:k,id:void 0!==m?m:N.toString(),labelText:s||o("carbon.table.toolbar.search.label"),placeholder:a||o("carbon.table.toolbar.search.placeholder"),onChange:e=>{M(e.target.value),r&&r(e)},onClear:i,onFocus:_?e=>_(e,I):e=>I(e,!0),onBlur:b?e=>b(e,I):e=>!k&&I(e,!1),size:E,tabIndex:x},S))};var $n,zn,Bn;In.propTypes={children:E().node,className:E().string,defaultExpanded:E().bool,defaultValue:E().string,disabled:E().bool,expanded:E().bool,id:E().string,labelText:E().string,onBlur:E().func,onChange:E().func,onClear:E().func,onExpand:E().func,onFocus:E().func,persistent:E().bool,placeholder:E().string,searchContainerClass:E().string,size:E().oneOf(["sm","md","lg"]),tabIndex:E().oneOfType([E().number,E().string]),translateWithId:E().func.isRequired},In.defaultProps={tabIndex:"0",translateWithId:e=>Pn[e],persistent:!1,onClear:()=>{}};const jn=y().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return y().createElement(ge.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},$n||($n=y().createElement("circle",{cx:"16",cy:"8",r:"2"})),zn||(zn=y().createElement("circle",{cx:"16",cy:"16",r:"2"})),Bn||(Bn=y().createElement("circle",{cx:"16",cy:"24",r:"2"})),n)}));var Fn=n(8316);function Un(e,t){switch(t.type){case"enableIcons":return{...e,hasIcons:!0};case"registerItem":return{...e,items:[...e.items,t.payload].filter((e=>null!==e.ref.current))}}}const Hn=y().createContext({state:{isRoot:!0,hasIcons:!1,size:null,items:[],requestCloseRoot:()=>{}},dispatch:()=>{}}),Vn=y().createContext({direction:"ltr"}),Zn=y().forwardRef((function(e,t){let{children:n,className:r,label:i,onClose:o,onOpen:a,open:s,size:l="sm",target:c=document.body,x:u=0,y:d=0,...h}=e;const f=w(),m=(0,v.useRef)(null),b=(0,v.useContext)(Hn),_=b.state.isRoot,E=_?l:b.state.size,[x,S]=(0,v.useReducer)(Un,{...b.state,isRoot:!1,size:l,requestCloseRoot:_?R:b.state.requestCloseRoot}),T=(0,v.useMemo)((()=>({state:x,dispatch:S})),[x,S]),O=(0,v.useRef)(),A=J([t,O]),[C,k]=(0,v.useState)([-1,-1]),M=T.state.items.filter((e=>!e.disabled&&e.ref.current)),{direction:N}=(0,v.useContext)(Vn);function D(){m.current&&m.current.focus()}function R(e){/^key/.test(e.type)?window.addEventListener("keyup",D,{once:!0}):"click"===e.type&&O.current?O.current.addEventListener("focusout",D,{once:!0}):D(),o&&o()}function L(e){const t=M.findIndex((e=>e.ref.current.contains(document.activeElement)));let n=t;-1===t?n=0:e&&(B(e,W)&&(n-=1),B(e,q)&&(n+=1)),n<0&&(n=M.length-1),n>=M.length&&(n=0),n!==t&&M[n].ref.current.focus()}function P(e,t){const{width:n,height:r}=O.current.getBoundingClientRect(),i=_?"vertical":"horizontal",o={x:{max:window.innerWidth,size:n,anchor:"horizontal"===i?e[1]:e[0],reversedAnchor:"horizontal"===i?e[0]:e[1],offset:0},y:{max:window.innerHeight,size:r,anchor:"horizontal"===i?e[0]:e[1],reversedAnchor:"horizontal"===i?e[1]:e[0],offset:_?0:4}},{max:a,size:s,anchor:l,reversedAnchor:c,offset:u}=o[t],d=[a-8-s-l>=0&&l-u,c-s>=0&&c-s+u,a-8-s].find((e=>!1!==e));return d>=8?d:8}(0,v.useEffect)((()=>{s&&M.length>0&&L()}),[s,M]),(0,v.useEffect)((()=>{s?function(){if(O.current){m.current=document.activeElement;const e=function(){if(O.current){const e={x:"object"==typeof u&&2===u.length?u:[u,u],y:"object"==typeof d&&2===d.length?d:[d,d]};return[P(e.x,"x"),P(e.y,"y")]}return[-1,-1]}();"rtl"!==document?.dir&&"rtl"!==N||h?.id?.includes("MenuButton")?(O.current.style.insetInlineStart=`${e[0]}px`,O.current.style.insetInlineEnd="initial"):(O.current.style.insetInlineStart="initial",O.current.style.insetInlineEnd=`${e[0]}px`),O.current.style.insetBlockStart=`${e[1]}px`,k(e),O.current.focus(),a&&a()}}():k(-1,-1)}),[s]);const I=g()(r,`${f}--menu`,`${f}--menu--${E}`,{[`${f}--menu--open`]:s,[`${f}--menu--shown`]:C[0]>=0&&C[1]>=0,[`${f}--menu--with-icons`]:T.state.hasIcons}),$=y().createElement(Hn.Provider,{value:T},y().createElement("ul",p({},h,{className:I,role:"menu",ref:A,"aria-label":i,tabIndex:-1,onKeyDown:function(e){e.stopPropagation(),(B(e,F)||!_&&B(e,Z))&&o?R(e):L(e)},onBlur:function(e){s&&o&&_&&!O.current.contains(e.relatedTarget)&&R(e)}}),n));return _?s&&(0,Fn.createPortal)($,c)||null:$}));Zn.propTypes={children:E().node,className:E().string,label:E().string,onClose:E().func,onOpen:E().func,open:E().bool,size:E().oneOf(["xs","sm","md","lg"]),target:E().object,x:E().oneOfType([E().number,E().arrayOf(E().number)]),y:E().oneOfType([E().number,E().arrayOf(E().number)])};const Wn="md",Gn=y().forwardRef((function(e,t){let{children:n,className:r,label:i="Options",renderIcon:o=jn,size:a=Wn,tooltipAlignment:s,...l}=e;const c=R("overflowmenu"),u=w(),d=(0,v.useRef)(null),{open:h,x:f,y:m,handleClick:b,handleMousedown:_,handleClose:E}=function(e){const[t,n]=(0,v.useState)(!1),[r,i]=(0,v.useState)([[-1,-1],[-1,-1]]);function o(){n(!1)}return{open:t,x:r[0],y:r[1],handleClick:function(){t?o():function(){const t=e?.current||e;if(t){const{left:e,top:n,right:r,bottom:o}=t.getBoundingClientRect();i([[e,r],[n,o]])}n(!0)}()},handleMousedown:function(e){e.preventDefault()},handleClose:o}}(d),x=g()(r,`${u}--overflow-menu__container`),S=g()(`${u}--overflow-menu`,{[`${u}--overflow-menu--open`]:h},a!==Wn&&`${u}--overflow-menu--${a}`);return y().createElement("div",p({},l,{className:x,"aria-owns":h?c:null,ref:t}),y().createElement(ce,{"aria-controls":h?c:null,"aria-haspopup":!0,"aria-expanded":h,className:S,onClick:b,onMouseDown:_,ref:d,label:i,align:s},y().createElement(o,{className:`${u}--overflow-menu__icon`})),y().createElement(Zn,{id:c,size:a,open:h,onClose:E,x:f,y:m,label:i},n))}));Gn.propTypes={children:E().node,className:E().string,label:E().string,renderIcon:E().oneOfType([E().func,E().object]),size:E().oneOf(["sm","md","lg"]),tooltipAlignment:E().oneOf(["top","top-left","top-right","bottom","bottom-left","bottom-right","left","right"])},n(7677);class qn extends y().Component{static getEventTarget(e){return e.composed&&"function"==typeof e.composedPath?e.composedPath()[0]:e.target}constructor(e){super(e),this.handleRef=this.handleRef.bind(this),this.handleDocumentClick=this.handleDocumentClick.bind(this)}componentDidMount(){document.addEventListener("click",this.handleDocumentClick)}componentWillUnmount(){document.removeEventListener("click",this.handleDocumentClick)}handleDocumentClick(e){this.element&&this.element.contains&&!this.element.contains(qn.getEventTarget(e))&&this.props.onClickOutside(e)}handleRef(e){const{children:t}=this.props;this.element=e,t.ref&&"function"==typeof t.ref&&t.ref(e)}render(){return y().cloneElement(this.props.children,{ref:this.handleRef})}}f(qn,"propTypes",{children:E().element.isRequired,onClickOutside:E().func.isRequired});var Yn=n(3883),Kn=n.n(Yn),Xn=function(){const e=[];let t=!1;function n(){e.forEach((e=>{e()})),t=!1}function r(){t||(t=!0,Kn().requestAnimationFrame(n))}return{add:t=>(e.length||Kn().addEventListener("resize",r),function(t){t&&e.indexOf(t)<0&&e.push(t)}(t),{release(){const n=e.indexOf(t);n>=0&&e.splice(n,1)}})}}();const Qn="undefined"!=typeof Node&&Node.DOCUMENT_POSITION_PRECEDING|Node.DOCUMENT_POSITION_CONTAINS,Jn="undefined"!=typeof Node&&Node.DOCUMENT_POSITION_FOLLOWING|Node.DOCUMENT_POSITION_CONTAINED_BY,er="\n a[href], area[href], input:not([disabled]):not([tabindex='-1']),\n button:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']),\n textarea:not([disabled]):not([tabindex='-1']),\n iframe, object, embed, *[tabindex]:not([tabindex='-1']):not([disabled]), *[contenteditable=true]\n";var tr=n(8233),nr=n(3282),rr=n(2198);var ir=n(1960),or=/\s/;var ar=/^\s+/;const sr=function(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&or.test(e.charAt(t)););return t}(e)+1).replace(ar,""):e};var lr=n(3122),cr=n(2758),ur=/^[-+]0x[0-9a-f]+$/i,dr=/^0b[01]+$/i,hr=/^0o[0-7]+$/i,fr=parseInt;const pr=function(e){return e?Infinity===(e=function(e){if("number"==typeof e)return e;if((0,cr.Z)(e))return NaN;if((0,lr.Z)(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=(0,lr.Z)(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=sr(e);var n=dr.test(e);return n||hr.test(e)?fr(e.slice(2),n?2:8):ur.test(e)?NaN:+e}(e))||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0};var mr=Math.max,gr=Math.min;const vr=(yr=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i,o,a=r-1;return void 0!==n&&(i=pr(n),o=i%1,a=i==i?o?i-o:i:0,a=n<0?mr(r+a,0):gr(a,r-1)),(0,ir.Z)(e,(0,tr.Z)(t,3),a,!0)},function(e,t,n){var r=Object(e);if(!(0,nr.Z)(e)){var i=(0,tr.Z)(t,3);e=(0,rr.Z)(e),t=function(e){return i(r[e],e,r)}}var o=yr(e,t,n);return o>-1?r[i?e[o]:o]:void 0});var yr;const br="left",wr="top",_r="right",Er="bottom",xr=e=>{let{menuSize:t,refPosition:n={},offset:r={},direction:i=Er,scrollX:o=0,scrollY:a=0,container:s}=e;const{left:l=0,top:c=0,right:u=0,bottom:d=0}=n,h="static"!==s.position?0:o,f="static"!==s.position?0:a,p="static"!==s.position?s.rect.top:0,m="static"!==s.position?s.rect.left:0,{width:g,height:v}=t,{top:y=0,left:b=0}=r,w=(l+u)/2,_=(c+d)/2;return{[br]:()=>({left:l-g+h-b-m,top:_-v/2+f+y-9-p}),[wr]:()=>({left:w-g/2+h+b-m,top:c-v+f-y-p}),[_r]:()=>({left:u+h+b-m,top:_-v/2+f+y+3-p}),[Er]:()=>({left:w-g/2+h+b-m,top:d+f+y-p})}[i]()};class Sr extends y().Component{constructor(){var e;super(...arguments),e=this,f(this,"_placeInProgress",!1),f(this,"state",{floatingPosition:void 0}),f(this,"_menuContainer",null),f(this,"_menuBody",null),f(this,"startSentinel",y().createRef()),f(this,"endSentinel",y().createRef()),f(this,"_updateMenuSize",(function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const r=e._menuBody;if(!r)return;const{menuOffset:i={},menuDirection:o}=t,{menuOffset:a={},menuDirection:s}=e.props;if(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return typeof e!=typeof t||(Object(t)===t&&"function"!=typeof t?e.top!==t.top||e.left!==t.left:e!==t)}(i,a)||o!==s||n){const{flipped:t,triggerRef:i,updateOrientation:o}=e.props,{current:l}=i,c=r.getBoundingClientRect(),u=l&&l.getBoundingClientRect(),d="function"!=typeof a?a:a(r,s,l,t);o&&o({menuSize:c,refPosition:u,direction:s,offset:d,scrollX:Kn().pageXOffset,scrollY:Kn().pageYOffset,container:{rect:e.props.target().getBoundingClientRect(),position:getComputedStyle(e.props.target()).position}}),(c.width>0&&c.height>0||!d)&&e.setState({floatingPosition:xr({menuSize:c,refPosition:u,direction:s,offset:d,scrollX:Kn().pageXOffset,scrollY:Kn().pageYOffset,container:{rect:e.props.target().getBoundingClientRect(),position:getComputedStyle(e.props.target()).position}})},(()=>{n||r.getBoundingClientRect()!==c&&e._updateMenuSize(e.props,!0)}))}})),f(this,"_focusMenuContent",(e=>{const t=e.querySelector(this.props.selectorPrimaryFocus||null),n=e.querySelector(er),r=e.querySelector("\n a[href], area[href], input:not([disabled]),\n button:not([disabled]),select:not([disabled]),\n textarea:not([disabled]),\n iframe, object, embed, *[tabindex]:not([disabled]), *[contenteditable=true]\n");(t||n||r||e).focus()})),f(this,"_menuRef",(e=>{const{menuRef:t}=this.props;this._placeInProgress=!!e,t&&t(this._menuBody=e),e&&this._updateMenuSize()})),f(this,"_getChildrenWithProps",(()=>{const{styles:e,children:t}=this.props,{floatingPosition:n}=this.state,r=n?{left:`${n.left}px`,top:`${n.top}px`,right:"auto"}:{visibility:"hidden",top:"0px"};return y().cloneElement(t,{ref:this._menuRef,style:{...e,...r,position:"absolute",opacity:1}})})),f(this,"handleBlur",(e=>{let{target:t,relatedTarget:n}=e;if(n&&t){const{current:e}=this.startSentinel,{current:r}=this.endSentinel;!function(e){let{bodyNode:t,startTrapNode:n,endTrapNode:r,currentActiveNode:i,oldActiveNode:o,selectorsFloatingMenus:a}=e;if(t&&i&&o&&!t.contains(i)&&!function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(e&&"function"==typeof e.closest)return[".cds--overflow-menu-options",".cds--tooltip",".flatpickr-calendar",...t].some((t=>e.closest(t)))}(i,a)){const e=o.compareDocumentPosition(i);if(i===n||e&Qn){const e=vr(t.querySelectorAll(er),(e=>Boolean(e.offsetParent)));e?e.focus():t!==o&&t.focus()}else if(i===r||e&Jn){const e=Array.prototype.find.call(t.querySelectorAll(er),(e=>Boolean(e.offsetParent)));e?e.focus():t!==o&&t.focus()}}}({bodyNode:this._menuBody,startSentinelNode:e,endSentinelNode:r,currentActiveNode:n,oldActiveNode:t})}}))}componentWillUnmount(){this.hResize.release()}componentDidMount(){this.hResize=Xn.add((()=>{this._updateMenuSize()}))}componentDidUpdate(e){this._updateMenuSize(e);const{onPlace:t}=this.props;this._placeInProgress&&this.state.floatingPosition&&(this._menuBody&&!this._menuBody.contains(document.activeElement)&&this._focusMenuContent(this._menuBody),"function"==typeof t&&(t(this._menuBody),this._placeInProgress=!1))}render(){const{context:e}=this;if("undefined"!=typeof document){const{focusTrap:t,target:n}=this.props;return Fn.createPortal(y().createElement("div",{onBlur:t?this.handleBlur:null},y().createElement("span",{ref:this.startSentinel,tabIndex:"0",role:"link",className:`${e}--visually-hidden`},"Focus sentinel"),this._getChildrenWithProps(),y().createElement("span",{ref:this.endSentinel,tabIndex:"0",role:"link",className:`${e}--visually-hidden`},"Focus sentinel")),n?n():document.body)}return null}}f(Sr,"contextType",b),f(Sr,"propTypes",{children:E().object,flipped:E().bool,focusTrap:E().bool,menuDirection:E().oneOf([br,wr,_r,Er]),menuOffset:E().oneOfType([E().shape({top:E().number,left:E().number}),E().func]),menuRef:E().func,onPlace:E().func,selectorPrimaryFocus:E().string,styles:E().object,target:E().func,triggerRef:E().oneOfType([E().func,E().shape({current:E().any})]),updateOrientation:E().func}),f(Sr,"defaultProps",{menuOffset:{},menuDirection:Er,updateOrientation:null});var Tr=Sr;const Or=A(),Ar={[wr]:"bottom",[Er]:"top"},Cr=(e,t,n,r)=>{const i=Ar[t],{offsetWidth:o,offsetHeight:a}=e;switch(i){case"top":case"bottom":return{left:(r?-1:1)*(o/2-(n?n.offsetWidth:0)/2),top:0};case"left":case"right":return{left:0,top:(r?-1:1)*(a/2-(n?n.offsetHeight:0)/2)}}};class kr extends v.Component{constructor(){super(...arguments),f(this,"state",{}),f(this,"instanceId",Or()),f(this,"_hFocusIn",null),f(this,"_hBlurTimeout",void 0),f(this,"_triggerRef",y().createRef()),f(this,"handleClick",(e=>{e.stopPropagation(),this._menuBody&&this._menuBody.contains(e.target)||(this.setState({open:!this.state.open}),this.props.onClick(e))})),f(this,"closeMenuAndFocus",(()=>{let e=this.state.open;this.closeMenu((()=>{e&&this.focusMenuEl()}))})),f(this,"handleKeyPress",(e=>{this.state.open&&z(e,[W,G,q,Z])&&e.preventDefault(),z(e,[F])&&(this.closeMenuAndFocus(),e.stopPropagation())})),f(this,"handleClickOutside",(e=>{!this.state.open||this._menuBody&&this._menuBody.contains(e.target)||this.closeMenu()})),f(this,"closeMenu",(e=>{this.setState({open:!1},(()=>{e&&e(),this.props.onClose()}))})),f(this,"focusMenuEl",(()=>{const{current:e}=this._triggerRef;e&&e.focus()})),f(this,"handleOverflowMenuItemFocus",(e=>{let{currentIndex:t,direction:n}=e;const r=y().Children.toArray(this.props.children).reduce(((e,t,n)=>(t.props.disabled||e.push(n),e)),[]),i=(()=>{const e=r.indexOf(t)+n;switch(e){case-1:return r.length-1;case r.length:return 0;default:return e}})(),o=this[`overflowMenuItem${r[i]}`];o?.focus()})),f(this,"_bindMenuBody",(e=>{e||(this._menuBody=e),!e&&this._hFocusIn&&(this._hFocusIn=this._hFocusIn.release())})),f(this,"_handlePlace",(e=>{if(e){this._menuBody=e;const t="onfocusin"in window,n=t?"focusin":"focus";this._hFocusIn=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.addEventListener(...n),{release:()=>(e.removeEventListener(...n),null)}}(e.ownerDocument,n,(t=>{const n=qn.getEventTarget(t),{current:r}=this._triggerRef;"function"==typeof n.matches&&(e.contains(n)||!r||n.matches(`.${this.context}--overflow-menu,.${this.context}--overflow-menu-options`)||this.closeMenuAndFocus())}),!t),this.props.onOpen()}})),f(this,"_getTarget",(()=>{const{current:e}=this._triggerRef;return e&&e.closest("[data-floating-menu-container]")||document.body}))}componentDidUpdate(e,t){const{onClose:n}=this.props;!this.state.open&&t.open&&n()}componentDidMount(){this._triggerRef.current&&this.setState({hasMountedTrigger:!0})}static getDerivedStateFromProps(e,t){let{open:n}=e;const{prevOpen:r}=t;return r===n?null:{open:n,prevOpen:n}}componentWillUnmount(){"number"==typeof this._hBlurTimeout&&(clearTimeout(this._hBlurTimeout),this._hBlurTimeout=void 0)}render(){const e=this.context,{id:t,"aria-label":n,ariaLabel:r,children:i,iconDescription:o,direction:a,flipped:s,focusTrap:l,menuOffset:c,menuOffsetFlip:u,iconClass:d,onClick:h,onOpen:f,selectorPrimaryFocus:m="[data-floating-menu-primary-focus]",renderIcon:v,innerRef:b,menuOptionsClass:w,light:_,size:E="md",...x}=this.props,{open:S}=this.state,T=g()(this.props.className,`${e}--overflow-menu`,{[`${e}--overflow-menu--open`]:S,[`${e}--overflow-menu--light`]:_,[`${e}--overflow-menu--${E}`]:E}),O=g()(w,`${e}--overflow-menu-options`,{[`${e}--overflow-menu--flip`]:this.props.flipped,[`${e}--overflow-menu-options--open`]:S,[`${e}--overflow-menu-options--light`]:_,[`${e}--overflow-menu-options--${E}`]:E}),A=g()(`${e}--overflow-menu__icon`,d),C=y().Children.toArray(i).map(((e,t)=>y().cloneElement(e,{closeMenu:e?.props?.closeMenu||this.closeMenuAndFocus,handleOverflowMenuItemFocus:this.handleOverflowMenuItemFocus,ref:e=>{this[`overflowMenuItem${t}`]=e},index:t}))),k=`overflow-menu-${this.instanceId}__menu-body`,M=y().createElement("ul",{className:O,tabIndex:"-1",role:"menu","aria-label":n||r,onKeyDown:this.handleKeyPress,id:k},C),N=y().createElement(Tr,{focusTrap:l,triggerRef:this._triggerRef,menuDirection:a,menuOffset:s?u:c,menuRef:this._bindMenuBody,flipped:this.props.flipped,target:this._getTarget,onPlace:this._handlePlace,selectorPrimaryFocus:this.props.selectorPrimaryFocus},y().cloneElement(M,{"data-floating-menu-direction":a})),D={className:A,"aria-label":o};return y().createElement(qn,{onClickOutside:this.handleClickOutside},y().createElement("span",{className:`${e}--overflow-menu__wrapper`,"aria-owns":S?k:null},y().createElement(ce,p({},x,{type:"button","aria-haspopup":!0,"aria-expanded":this.state.open,"aria-controls":S?k:null,className:T,onClick:this.handleClick,id:t,ref:fn(this._triggerRef,b),size:E,label:o}),y().createElement(v,D)),S&&this.state.hasMountedTrigger&&N))}}f(kr,"propTypes",{"aria-label":E().string,ariaLabel:P(E().string),children:E().node,className:E().string,direction:E().oneOf([wr,Er]),flipped:E().bool,focusTrap:E().bool,iconClass:E().string,iconDescription:E().string.isRequired,id:E().string,light:P(E().bool),menuOffset:E().oneOfType([E().shape({top:E().number,left:E().number}),E().func]),menuOffsetFlip:E().oneOfType([E().shape({top:E().number,left:E().number}),E().func]),menuOptionsClass:E().string,onClick:E().func,onClose:E().func,onFocus:E().func,onKeyDown:E().func,onOpen:E().func,open:E().bool,renderIcon:E().oneOfType([E().func,E().object]),selectorPrimaryFocus:E().string,size:E().oneOf(["sm","md","lg"])}),f(kr,"contextType",b),f(kr,"defaultProps",{"aria-label":null,iconDescription:"Options",open:!1,direction:Er,flipped:!1,focusTrap:!0,renderIcon:jn,onClick:()=>{},onKeyDown:()=>{},onClose:()=>{},onOpen:()=>{},menuOffset:Cr,menuOffsetFlip:Cr,selectorPrimaryFocus:"[data-overflow-menu-primary-focus]"});const Mr=function(e){function t(t){return y().createElement(e,t)}const n=e.displayName||e.name;return t.displayName=`ClassWrapper(${n})`,t}(kr);function Nr(e){return ct("enable-v12-overflowmenu")?y().createElement(Gn,e):y().createElement(Mr,e)}Nr.displayName="OverflowMenu";const Dr="Settings",Rr=e=>{let{className:t,renderIcon:n,iconDescription:r=Dr,children:i,...o}=e;const a=w(),s=g()(t,`${a}--toolbar-action ${a}--overflow-menu`);return y().createElement(Nr,p({"aria-label":r,renderIcon:n,className:s,title:r,iconDescription:r,flipped:!0},o),i)};Rr.defaultProps={renderIcon:kn,iconDescription:Dr},Rr.propTypes={children:E().node.isRequired,className:E().string,iconDescription:E().string.isRequired,renderIcon:E().oneOfType([E().func,E().object])};const Lr=$t(),Pr={expandRow:"carbon.table.row.expand",collapseRow:"carbon.table.row.collapse",expandAll:"carbon.table.all.expand",collapseAll:"carbon.table.all.collapse",selectAll:"carbon.table.all.select",unselectAll:"carbon.table.all.unselect",selectRow:"carbon.table.row.select",unselectRow:"carbon.table.row.unselect"},Ir={[Pr.expandAll]:"Expand all rows",[Pr.collapseAll]:"Collapse all rows",[Pr.expandRow]:"Expand current row",[Pr.collapseRow]:"Collapse current row",[Pr.selectAll]:"Select all rows",[Pr.unselectAll]:"Unselect all rows",[Pr.selectRow]:"Select row",[Pr.unselectRow]:"Unselect row"},$r={filterRows:e=>{let{rowIds:t,headers:n,cellsById:r,inputValue:i,getCellId:o}=e;return t.filter((e=>n.some((t=>{let{key:n}=t;const a=o(e,n);return"boolean"!=typeof r[a].value&&(""+r[a].value).toLowerCase().includes(i.toLowerCase())}))))},locale:"en",overflowMenuOnHover:!0,size:"lg",sortRow:(e,t,n)=>{let{sortDirection:r,sortStates:i,locale:o}=n;return r===i.ASC?Mt(e,t,o):Mt(t,e,o)},translateWithId:e=>Ir[e]};class zr extends y().Component{constructor(e){var t;super(e),t=this,f(this,"instanceId",void 0),f(this,"getHeaderProps",(e=>{let{header:t,onClick:n,isSortable:r=this.props.isSortable,...i}=e;const{sortDirection:o,sortHeaderKey:a}=this.state;return{...i,key:t.key,sortDirection:o,isSortable:r,isSortHeader:a===t.key,onClick:e=>{const r=Rt(this.props,this.state,{key:t.key});this.setState(r,(()=>{n&&this.handleOnHeaderClick(n,{sortHeaderKey:t.key,sortDirection:r.sortDirection})(e)}))}}})),f(this,"getExpandHeaderProps",(function(){let{onClick:e,onExpand:n,...r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{translateWithId:i}=t.props,{isExpandedAll:o,rowIds:a,rowsById:s}=t.state,l=o||a.every((e=>s[e].isExpanded)),c=l?Pr.collapseAll:Pr.expandAll;return{...r,ariaLabel:i(c),"aria-label":i(c),"aria-controls":a.map((e=>`expanded-row-${e}`)).join(" "),isExpanded:l,onExpand:ue([t.handleOnExpandAll,n,e&&t.handleOnExpandHeaderClick(e,{isExpanded:l})])}})),f(this,"handleOnHeaderClick",((e,t)=>n=>e(n,t))),f(this,"handleOnExpandHeaderClick",((e,t)=>n=>e(n,t))),f(this,"getRowProps",(e=>{let{row:t,onClick:n,...r}=e;const{translateWithId:i}=this.props,o=t.isExpanded?Pr.collapseRow:Pr.expandRow;return{...r,key:t.id,onExpand:ue([this.handleOnExpandRow(t.id),n]),isExpanded:t.isExpanded,ariaLabel:i(o),"aria-label":i(o),"aria-controls":`expanded-row-${t.id}`,isSelected:t.isSelected,disabled:t.disabled}})),f(this,"getExpandedRowProps",(e=>{let{row:t,...n}=e;return{...n,id:`expanded-row-${t.id}`}})),f(this,"getSelectionProps",(function(){let{onClick:e,row:n,...r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{translateWithId:i}=t.props;if(n){const o=n.isSelected?Pr.unselectRow:Pr.selectRow;return{...r,checked:n.isSelected,onSelect:ue([t.handleOnSelectRow(n.id),e]),id:`${t.getTablePrefix()}__select-row-${n.id}`,name:"select-row",ariaLabel:i(o),disabled:n.disabled,radio:t.props.radio||null}}const o=t.state.rowIds.length,a=t.getSelectedRows().length,s=o>0&&a===o,l=o>0&&a>0&&a!==o,c=s||l?Pr.unselectAll:Pr.selectAll;return{...r,ariaLabel:i(c),checked:s,id:`${t.getTablePrefix()}__select-all`,indeterminate:l,name:"select-all",onSelect:ue([t.handleSelectAll,e])}})),f(this,"getToolbarProps",(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{size:n}=t.props;return{...e,size:"xs"===n||"sm"===n?"sm":void 0}})),f(this,"getBatchActionProps",(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{shouldShowBatchActions:n}=t.state,r=t.getSelectedRows().length;return{onSelectAll:void 0,totalCount:t.state.rowIds.length||0,...e,shouldShowBatchActions:n&&r>0,totalSelected:r,onCancel:t.handleOnCancel}})),f(this,"getTableProps",(()=>{const{useZebraStyles:e,size:t,isSortable:n,useStaticWidth:r,stickyHeader:i,overflowMenuOnHover:o,experimentalAutoAlign:a}=this.props;return{useZebraStyles:e,size:t,isSortable:n,useStaticWidth:r,stickyHeader:i,overflowMenuOnHover:o,experimentalAutoAlign:a}})),f(this,"getTableContainerProps",(()=>{const{stickyHeader:e,useStaticWidth:t}=this.props;return{stickyHeader:e,useStaticWidth:t}})),f(this,"getSelectedRows",(()=>this.state.rowIds.filter((e=>{const t=this.state.rowsById[e];return t.isSelected&&!t.disabled})))),f(this,"getFilteredRowIds",(()=>{const e="string"==typeof this.state.filterInputValue?this.props.filterRows({rowIds:this.state.rowIds,headers:this.props.headers,cellsById:this.state.cellsById,inputValue:this.state.filterInputValue,getCellId:kt}):this.state.rowIds;return 0==e.length?[]:e})),f(this,"getTablePrefix",(()=>`data-table-${this.instanceId}`)),f(this,"setAllSelectedState",((e,t,n)=>{const{rowIds:r}=e,i=r.length!=n.length;return{rowsById:r.reduce(((r,o)=>{const a={...e.rowsById[o]};return a.disabled||i&&!n.includes(o)||(a.isSelected=t),r[o]=a,r}),{})}})),f(this,"handleOnCancel",(()=>{this.setState((e=>({shouldShowBatchActions:!1,...this.setAllSelectedState(e,!1,this.getFilteredRowIds())})))})),f(this,"handleSelectAll",(()=>{this.setState((e=>{const t=this.getFilteredRowIds(),{rowsById:n}=e,r=!(Object.values(n).filter((e=>e.isSelected&&!e.disabled)).length>0);return{shouldShowBatchActions:r,...this.setAllSelectedState(e,r,t)}}))})),f(this,"handleOnSelectRow",(e=>()=>{this.setState((t=>{const n=t.rowsById[e];if(this.props.radio)return{shouldShowBatchActions:!1,rowsById:{...Object.entries(t.rowsById).reduce(((e,t)=>{const[n,r]=t;return r.isSelected=!1,e[n]=r,e}),{}),[e]:{...n,isSelected:!n.isSelected}}};const r=t.rowIds.filter((e=>t.rowsById[e].isSelected)).length,i=n.isSelected?r-1:r+1;return{shouldShowBatchActions:!n.isSelected||i>0,rowsById:{...t.rowsById,[e]:{...n,isSelected:!n.isSelected}}}}))})),f(this,"handleOnExpandRow",(e=>()=>{this.setState((t=>{const n=t.rowsById[e],{isExpandedAll:r}=t;return{isExpandedAll:!n.isExpanded&&r,rowsById:{...t.rowsById,[e]:{...n,isExpanded:!n.isExpanded}}}}))})),f(this,"handleOnExpandAll",(()=>{this.setState((e=>{const{rowIds:t,isExpandedAll:n}=e;return{isExpandedAll:!n,rowsById:t.reduce(((t,r)=>({...t,[r]:{...e.rowsById[r],isExpanded:!n}})),{})}}))})),f(this,"handleSortBy",(e=>()=>{this.setState((t=>Rt(this.props,t,{key:e})))})),f(this,"handleOnInputValueChange",((e,t)=>{e.target&&this.setState({filterInputValue:e.target.value}),t&&this.setState({filterInputValue:t})})),this.state={...Pt(e,{}),isExpandedAll:!1},this.instanceId=Lr()}shouldComponentUpdate(e){if(this.props!==e){const t=e.rows.map((e=>e.id)),n=this.props.rows.map((e=>e.id));if(!At()(t,n))return this.setState((e=>Pt(this.props,e))),!1;const r=e.headers.map((e=>e.key)),i=this.props.headers.map((e=>e.key));if(!At()(r,i))return this.setState((e=>Pt(this.props,e))),!1;if(!At()(e.rows,this.props.rows))return this.setState((e=>Pt(this.props,e))),!1}return!0}render(){const{children:e,filterRows:t,headers:n,render:r}=this.props,{filterInputValue:i,rowIds:o,rowsById:a,cellsById:s}=this.state,l="string"==typeof i?t({rowIds:o,headers:n,cellsById:s,inputValue:i,getCellId:kt}):o,c={rows:It(l,a,s),headers:this.props.headers,selectedRows:It(this.getSelectedRows(),a,s),getHeaderProps:this.getHeaderProps,getExpandHeaderProps:this.getExpandHeaderProps,getRowProps:this.getRowProps,getExpandedRowProps:this.getExpandedRowProps,getSelectionProps:this.getSelectionProps,getToolbarProps:this.getToolbarProps,getBatchActionProps:this.getBatchActionProps,getTableProps:this.getTableProps,getTableContainerProps:this.getTableContainerProps,onInputChange:this.handleOnInputValueChange,sortBy:e=>this.handleSortBy(e)(),selectAll:this.handleSelectAll,selectRow:e=>this.handleOnSelectRow(e)(),expandRow:e=>this.handleOnExpandRow(e)(),expandAll:this.handleOnExpandAll,radio:this.props.radio};return void 0!==r?r(c):void 0!==e?e(c):null}}var Br,jr,Fr,Ur;f(zr,"defaultProps",$r),f(zr,"propTypes",{experimentalAutoAlign:E().bool,filterRows:E().func,headers:E().arrayOf(E().shape({key:E().string.isRequired,header:E().node.isRequired})).isRequired,isSortable:E().bool,locale:E().string,overflowMenuOnHover:E().bool,radio:E().bool,rows:E().arrayOf(E().shape({id:E().string.isRequired,disabled:E().bool,isSelected:E().bool,isExpanded:E().bool})).isRequired,size:E().oneOf(["xs","sm","md","lg","xl"]),sortRow:E().func,stickyHeader:E().bool,translateWithId:E().func,useStaticWidth:E().bool,useZebraStyles:E().bool}),f(zr,"translationKeys",Object.values(Pr)),f(zr,"Table",void 0),f(zr,"TableActionList",void 0),f(zr,"TableBatchAction",void 0),f(zr,"TableBatchActions",void 0),f(zr,"TableBody",void 0),f(zr,"TableCell",void 0),f(zr,"TableContainer",void 0),f(zr,"TableExpandHeader",void 0),f(zr,"TableExpandRow",void 0),f(zr,"TableExpandedRow",void 0),f(zr,"TableHead",void 0),f(zr,"TableHeader",void 0),f(zr,"TableRow",void 0),f(zr,"TableSelectAll",void 0),f(zr,"TableSelectRow",void 0),f(zr,"TableToolbar",void 0),f(zr,"TableToolbarAction",void 0),f(zr,"TableToolbarContent",void 0),f(zr,"TableToolbarSearch",void 0),f(zr,"TableToolbarMenu",void 0),zr.Table=jt,zr.TableActionList=Ut,zr.TableBatchAction=Vt,zr.TableBatchActions=Gt,zr.TableBody=qt,zr.TableCell=Yt,zr.TableContainer=Kt,zr.TableExpandHeader=Qt,zr.TableExpandRow=Jt,zr.TableExpandedRow=en,zr.TableHead=tn,zr.TableHeader=an,zr.TableRow=cn,zr.TableSelectAll=hn,zr.TableSelectRow=mn,zr.TableToolbar=yn,zr.TableToolbarAction=wn,zr.TableToolbarContent=_n,zr.TableToolbarSearch=In,zr.TableToolbarMenu=Rr;const Hr=y().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return"glyph"===r||"glyph"===r||"glyphpx"===r?y().createElement(ge.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 5 8",fill:"currentColor",...i},Br||(Br=y().createElement("path",{d:"M5 8L0 4 5 0z"})),n):y().createElement(ge.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},jr||(jr=y().createElement("path",{d:"M20 24L10 16 20 8z"})),n)})),Vr=y().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return"glyph"===r||"glyph"===r||"glyphpx"===r?y().createElement(ge.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 5 8",fill:"currentColor",...i},Fr||(Fr=y().createElement("path",{d:"M0 0L5 4 0 8z"})),n):y().createElement(ge.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},Ur||(Ur=y().createElement("path",{d:"M12 8L22 16 12 24z"})),n)}));var Zr,Wr,Gr,qr,Yr,Kr,Xr,Qr,Jr,ei,ti;const ni=y().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return y().createElement(ge.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},Zr||(Zr=y().createElement("path",{fill:"none",d:"M16,26a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,16,26Zm-1.125-5h2.25V12h-2.25Z","data-icon-path":"inner-path"})),Wr||(Wr=y().createElement("path",{d:"M16.002,6.1714h-.004L4.6487,27.9966,4.6506,28H27.3494l.0019-.0034ZM14.875,12h2.25v9h-2.25ZM16,26a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,16,26Z"})),Gr||(Gr=y().createElement("path",{d:"M29,30H3a1,1,0,0,1-.8872-1.4614l13-25a1,1,0,0,1,1.7744,0l13,25A1,1,0,0,1,29,30ZM4.6507,28H27.3493l.002-.0033L16.002,6.1714h-.004L4.6487,27.9967Z"})),n)})),ri=y().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return 16===r||"16"===r||"16px"===r?y().createElement(ge.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},qr||(qr=y().createElement("path",{d:"M8,1C4.2,1,1,4.2,1,8s3.2,7,7,7s7-3.1,7-7S11.9,1,8,1z M7.5,4h1v5h-1C7.5,9,7.5,4,7.5,4z M8,12.2 c-0.4,0-0.8-0.4-0.8-0.8s0.3-0.8,0.8-0.8c0.4,0,0.8,0.4,0.8,0.8S8.4,12.2,8,12.2z"})),Yr||(Yr=y().createElement("path",{d:"M7.5,4h1v5h-1C7.5,9,7.5,4,7.5,4z M8,12.2c-0.4,0-0.8-0.4-0.8-0.8s0.3-0.8,0.8-0.8 c0.4,0,0.8,0.4,0.8,0.8S8.4,12.2,8,12.2z","data-icon-path":"inner-path",opacity:"0"})),n):20===r||"20"===r||"20px"===r?y().createElement(ge.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...i},Kr||(Kr=y().createElement("path",{d:"M10,1c-5,0-9,4-9,9s4,9,9,9s9-4,9-9S15,1,10,1z M9.2,5h1.5v7H9.2V5z M10,16c-0.6,0-1-0.4-1-1s0.4-1,1-1 s1,0.4,1,1S10.6,16,10,16z"})),Xr||(Xr=y().createElement("path",{d:"M9.2,5h1.5v7H9.2V5z M10,16c-0.6,0-1-0.4-1-1s0.4-1,1-1s1,0.4,1,1S10.6,16,10,16z","data-icon-path":"inner-path",opacity:"0"})),n):24===r||"24"===r||"24px"===r?y().createElement(ge.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...i},Qr||(Qr=y().createElement("path",{d:"M12,1C5.9,1,1,5.9,1,12s4.9,11,11,11s11-4.9,11-11C23,5.9,18.1,1,12,1z M11.1,6h1.8v8h-1.8V6z M12,19.2 c-0.7,0-1.2-0.6-1.2-1.2s0.6-1.2,1.2-1.2s1.2,0.6,1.2,1.2S12.7,19.2,12,19.2z"})),Jr||(Jr=y().createElement("path",{fill:"none",d:"M13.2,18c0,0.7-0.6,1.2-1.2,1.2s-1.2-0.6-1.2-1.2s0.6-1.2,1.2-1.2S13.2,17.3,13.2,18z M12.9,6 h-1.8v8h1.8V6z","data-icon-path":"inner-path",opacity:"0"})),n):y().createElement(ge.Z,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},ei||(ei=y().createElement("path",{d:"M16,2C8.3,2,2,8.3,2,16s6.3,14,14,14s14-6.3,14-14C30,8.3,23.7,2,16,2z M14.9,8h2.2v11h-2.2V8z M16,25 c-0.8,0-1.5-0.7-1.5-1.5S15.2,22,16,22c0.8,0,1.5,0.7,1.5,1.5S16.8,25,16,25z"})),ti||(ti=y().createElement("path",{fill:"none",d:"M17.5,23.5c0,0.8-0.7,1.5-1.5,1.5c-0.8,0-1.5-0.7-1.5-1.5S15.2,22,16,22 C16.8,22,17.5,22.7,17.5,23.5z M17.1,8h-2.2v11h2.2V8z","data-icon-path":"inner-path",opacity:"0"})),n)})),ii=A(),oi=y().forwardRef((function(e,t){let{className:n,id:r,inline:i=!1,labelText:o,disabled:a=!1,children:s,noLabel:l=!1,hideLabel:c=!1,invalid:u=!1,invalidText:d,helperText:h,light:f=!1,readOnly:m,size:b,warn:_=!1,warnText:E,onChange:x,...S}=e;const T=w(),{isFluid:A}=(0,v.useContext)(Mn),[C,k]=(0,v.useState)(!1),[M,N]=(0,v.useState)(""),{current:D}=(0,v.useRef)(ii()),R=g()({[`${T}--select`]:!0,[`${T}--select--inline`]:i,[`${T}--select--light`]:f,[`${T}--select--invalid`]:u,[`${T}--select--disabled`]:a,[`${T}--select--readonly`]:m,[`${T}--select--warning`]:_,[`${T}--select--fluid--invalid`]:A&&u,[`${T}--select--fluid--focus`]:A&&C}),L=g()(`${T}--label`,{[`${T}--visually-hidden`]:c,[`${T}--label--disabled`]:a}),P=g()({[`${T}--select-input`]:!0,[`${T}--select-input--${b}`]:b}),I=`${r}-error-msg`,$=u?d:_?E:void 0,z=u||_?y().createElement("div",{className:`${T}--form-requirement`,id:I},$):null,B=g()(`${T}--form__helper-text`,{[`${T}--form__helper-text--disabled`]:a}),j=h?`select-helper-text-${D}`:void 0,F=h?y().createElement("div",{id:j,className:B},h):null,U={};u?U["aria-describedby"]=I:i||A||(U["aria-describedby"]=F?j:void 0);const H=e=>{k("focus"===e.type)},V={onMouseDown:e=>{m&&(e.preventDefault(),e.target.focus())},onKeyDown:e=>{m&&["ArrowDown","ArrowUp"," "].includes(e.key)&&e.preventDefault()}},Z=y().createElement(y().Fragment,null,y().createElement("select",p({},S,U,{id:r,className:P,disabled:a||void 0,"aria-invalid":u||void 0,"aria-readonly":m||void 0,title:M,onChange:ue([x,e=>{N(e?.target?.value)}])},V,{ref:t}),s),y().createElement(O._M,{className:`${T}--select__arrow`}),u&&y().createElement(ri,{className:`${T}--select__invalid-icon`}),!u&&_&&y().createElement(ni,{className:`${T}--select__invalid-icon ${T}--select__invalid-icon--warning`}));return y().createElement("div",{className:g()(`${T}--form-item`,n)},y().createElement("div",{className:R},!l&&y().createElement("label",{htmlFor:r,className:L},o),i&&y().createElement("div",{className:`${T}--select-input--inline__wrapper`},y().createElement("div",{className:`${T}--select-input__wrapper`,"data-invalid":u||null},Z),z),!i&&y().createElement("div",{className:`${T}--select-input__wrapper`,"data-invalid":u||null,onFocus:H,onBlur:H},Z,A&&y().createElement("hr",{className:`${T}--select__divider`}),A&&z?z:null),i||A||!z?F:z))}));oi.displayName="Select",oi.propTypes={children:E().node,className:E().string,defaultValue:E().any,disabled:E().bool,helperText:E().node,hideLabel:E().bool,id:E().string.isRequired,inline:E().bool,invalid:E().bool,invalidText:E().node,labelText:E().node,light:P(E().bool),noLabel:E().bool,onChange:E().func,readOnly:E().bool,size:E().oneOf(["sm","md","lg"]),warn:E().bool,warnText:E().node},oi.defaultProps={disabled:!1,labelText:"Select",inline:!1,invalid:!1,invalidText:"",helperText:""};const ai=e=>{let{className:t,value:n,disabled:r,hidden:i,text:o,...a}=e;const s=w(),l=g()({[`${s}--select-option`]:!0,...t&&{[t]:t}});return y().createElement("option",p({},a,{className:l,value:n,disabled:r,hidden:i}),o)};var si,li;function ci(e){return"object"==typeof e[0]&&null!==e[0]?e:e.map((e=>({text:e,value:e})))}function ui(e,t){return t&&e.find((e=>t===e.value))?t:e[0].value}ai.propTypes={className:E().string,disabled:E().bool,hidden:E().bool,text:E().string.isRequired,value:E().any.isRequired},ai.defaultProps={disabled:!1,hidden:!1,value:"",text:""};const di=y().forwardRef((function(e,t){let{backwardText:n="Previous page",className:r,disabled:i=!1,forwardText:o="Next page",id:a,isLastPage:s=!1,itemText:l=((e,t)=>`${e}–${t} items`),itemRangeText:c=((e,t,n)=>`${e}–${t} of ${n} items`),itemsPerPageText:u="Items per page:",onChange:d,pageNumberText:h="Page Number",pageRangeText:f=((e,t)=>`of ${t} ${1===t?"page":"pages"}`),page:m=1,pageInputDisabled:b,pageSize:_,pageSizeInputDisabled:E,pageSizes:x,pageText:S=((e,t)=>`page ${t?"":e}`),pagesUnknown:T=!1,size:O="md",totalItems:A,...C}=e;const k=w(),M=function(e){const t=R();return e??t}(a),N=(0,v.useRef)(null),D=(0,v.useRef)(null),[L,P]=(0,v.useState)((()=>ci(x))),[I,$]=(0,v.useState)(x),[z,B]=(0,v.useState)(m),[j,F]=(0,v.useState)(m),[U,H]=(0,v.useState)((()=>ui(L,_))),[V,Z]=(0,v.useState)(_),W=g()({[`${k}--pagination`]:!0,[`${k}--pagination--${O}`]:O,[r]:!!r}),G=Math.max(Math.ceil(A/U),1),q=i||1===z,Y=g()({[`${k}--pagination__button`]:!0,[`${k}--pagination__button--backward`]:!0,[`${k}--pagination__button--no-index`]:q}),K=i||z===G,X=g()({[`${k}--pagination__button`]:!0,[`${k}--pagination__button--forward`]:!0,[`${k}--pagination__button--no-index`]:K}),Q=function(e){let t=1,n=[];for(;t<=e;)n.push(y().createElement(ai,{key:t,value:t,text:String(t)})),t++;return n}(G);if(m!==j&&(B(m),F(m)),_!==V&&(H(ui(L,_)),Z(_)),!function(e,t){if(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length)return!1;if(e===t)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(x,I)){const e=ci(x),t=e.find((e=>e.value===U));t||B(1),P(e),$(x)}return y().createElement("div",p({className:W,ref:t},C),y().createElement("div",{className:`${k}--pagination__left`},y().createElement("label",{id:`${k}-pagination-select-${M}-count-label`,className:`${k}--pagination__text`,htmlFor:`${k}-pagination-select-${M}`},u),y().createElement(oi,{id:`${k}-pagination-select-${M}`,className:`${k}--select__item-count`,labelText:"",hideLabel:!0,noLabel:!0,inline:!0,onChange:function(e){const t={pageSize:Number(e.target.value),page:1};B(t.page),H(t.pageSize),d&&d(t)},disabled:E||i,value:U},L.map((e=>y().createElement(ai,{key:e.value,value:e.value,text:String(e.text)})))),y().createElement("span",{className:`${k}--pagination__text ${k}--pagination__items-count`},T?l(U*(z-1)+1,z*U):c(Math.min(U*(z-1)+1,A),Math.min(z*U,A),A))),y().createElement("div",{className:`${k}--pagination__right`},T?y().createElement("span",{className:`${k}--pagination__text ${k}--pagination__page-text`},T?S(z,T):f(z,G)):null,y().createElement(oi,{id:`${k}-pagination-select-${M}-right`,className:`${k}--select__page-number`,labelText:`Page number, of ${G} pages`,inline:!0,hideLabel:!0,onChange:function(e){const t=Number(e.target.value);t>0&&t<=Math.max(Math.ceil(A/U),1)&&(B(t),d&&d({page:t,pageSize:U}))},value:z,disabled:b||i},Q),T?null:y().createElement("span",{className:`${k}--pagination__text`},T?S(z,T):f(z,G)),y().createElement("div",{className:`${k}--pagination__control-buttons`},y().createElement(ce,{align:"top",disabled:q,kind:"ghost",className:Y,label:n,onClick:function(){const e=z-1;B(e),1===e&&D.current.focus(),d&&d({page:e,pageSize:U,forwardBtnRef:D})},ref:N},si||(si=y().createElement(Hr,null))),y().createElement(ce,{align:"top-right",disabled:K||s,kind:"ghost",className:X,label:o,onClick:function(){const e=z+1;B(e),e===G&&N.current.focus(),d&&d({page:e,pageSize:U,backBtnRef:N})},ref:D},li||(li=y().createElement(Vr,null))))))}));di.propTypes={backwardText:E().string,className:E().string,disabled:E().bool,forwardText:E().string,id:E().oneOfType([E().string,E().number]),isLastPage:E().bool,itemRangeText:E().func,itemText:E().func,itemsPerPageText:E().string,onChange:E().func,page:E().number,pageInputDisabled:E().bool,pageNumberText:E().string,pageRangeText:E().func,pageSize:E().number,pageSizeInputDisabled:E().bool,pageSizes:E().oneOfType([E().arrayOf(E().number),E().arrayOf(E().shape({text:E().text,value:E().number}))]).isRequired,pageText:E().func,pagesUnknown:E().bool,size:E().oneOf(["sm","md","lg"]),totalItems:E().number};var hi=di},2192:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var o=typeof n;if("string"===o||"number"===o)e.push(n);else if(Array.isArray(n)){if(n.length){var a=i.apply(null,n);a&&e.push(a)}}else if("object"===o){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){e.push(n.toString());continue}for(var s in n)r.call(n,s)&&n[s]&&e.push(s)}}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(n=function(){return i}.apply(t,[]))||(e.exports=n)}()},321:e=>{"use strict";var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var o={},a=[],s=0;s<e.length;s++){var l=e[s],c=r.base?l[0]+r.base:l[0],u=o[c]||0,d="".concat(c," ").concat(u);o[c]=u+1;var h=n(d),f={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==h)t[h].references++,t[h].updater(f);else{var p=i(f,r);r.byIndex=s,t.splice(s,0,{identifier:d,updater:p,references:1})}a.push(d)}return a}function i(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,i){var o=r(e=e||[],i=i||{});return function(e){e=e||[];for(var a=0;a<o.length;a++){var s=n(o[a]);t[s].references--}for(var l=r(e,i),c=0;c<o.length;c++){var u=n(o[c]);0===t[u].references&&(t[u].updater(),t.splice(u,1))}o=l}}},3275:e=>{"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},2094:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},7162:(e,t,n)=>{"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},1195:e=>{"use strict";e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var i=void 0!==n.layer;i&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,i&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var o=n.sourceMap;o&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},757:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},4512:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(272),i=n.n(r),o=n(2609),a=n.n(o)()(i());a.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79;--bottom-nav-height: 4rem;--workspace-header-height: 3rem;--tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));--desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height))}.-esm-generic-patient-widgets__obs-graph__label01___nqHbU,.-esm-generic-patient-widgets__obs-graph__conceptLabel___JcAin{font-size:var(--cds-label-01-font-size, 0.75rem);font-weight:var(--cds-label-01-font-weight, 400);line-height:var(--cds-label-01-line-height, 1.33333);letter-spacing:var(--cds-label-01-letter-spacing, 0.32px)}.-esm-generic-patient-widgets__obs-graph__bodyShort01___MXPMj{font-size:var(--cds-body-compact-01-font-size, 0.875rem);font-weight:var(--cds-body-compact-01-font-weight, 400);line-height:var(--cds-body-compact-01-line-height, 1.28572);letter-spacing:var(--cds-body-compact-01-letter-spacing, 0.16px)}.-esm-generic-patient-widgets__obs-graph__graphContainer___peSeT{display:flex;margin:0rem 1rem;flex-direction:row;justify-content:space-between}.-esm-generic-patient-widgets__obs-graph__conceptPickerTabs___Gk0Ph{flex-grow:1;margin:.5rem 0;padding-right:1rem}.-esm-generic-patient-widgets__obs-graph__lineChartContainer___DWcve{flex-grow:4;padding:0 1rem 3rem}.-esm-generic-patient-widgets__obs-graph__lineChartContainer___DWcve .cds--cc--layout-row{height:0}.-esm-generic-patient-widgets__obs-graph__lineChartContainer___DWcve .layout-child{margin-top:.5rem}.-esm-generic-patient-widgets__obs-graph__conceptLabel___JcAin{margin-bottom:1rem;display:inline-block}.-esm-generic-patient-widgets__obs-graph__verticalTabs___PGFpw{margin:1rem 0;scroll-behavior:smooth}.-esm-generic-patient-widgets__obs-graph__verticalTabs___PGFpw>ul{flex-direction:column !important}.-esm-generic-patient-widgets__obs-graph__verticalTabs___PGFpw .cds--tabs--scrollable .cds--tabs--scrollable__nav-item+.cds--tabs--scrollable__nav-item{margin-left:0rem}.-esm-generic-patient-widgets__obs-graph__verticalTabs___PGFpw .cds--tabs--scrollable .cds--tabs--scrollable__nav-link{border-bottom:0 !important;border-left:2px solid #c6c6c6}.-esm-generic-patient-widgets__obs-graph__tab___dw7mi{outline:0;outline-offset:0}.-esm-generic-patient-widgets__obs-graph__tab___dw7mi:active,.-esm-generic-patient-widgets__obs-graph__tab___dw7mi:focus{outline:2px solid var(--brand-03) !important}.-esm-generic-patient-widgets__obs-graph__tab___dw7mi[aria-selected=true]{border-left:3px solid var(--brand-03);border-bottom:none;font-weight:600;margin-left:0rem !important}.-esm-generic-patient-widgets__obs-graph__tab___dw7mi[aria-selected=false]{border-bottom:none;border-left:2px solid #e0e0e0;margin-left:0rem !important}.-esm-generic-patient-widgets__obs-graph__tablist___f25Mm .cds--tab--list{flex-direction:column;max-height:fit-content;overflow-x:visible}.-esm-generic-patient-widgets__obs-graph__tablist___f25Mm>button .cds--tabs .cds--tabs__nav-link{border-bottom:none}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/obs-graph/obs-graph.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss","webpack://./../../node_modules/@carbon/layout/scss/generated/_spacing.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CACA,yBAAA,CACA,+BAAA,CACA,oGAAA,CACA,2GAAA,CCvDF,yHC81BI,gDAAA,CAAA,gDAAA,CAAA,oDAAA,CAAA,yDAAA,CD11BJ,8DC01BI,wDAAA,CAAA,uDAAA,CAAA,2DAAA,CAAA,gEAAA,CDt1BJ,iEACE,YAAA,CACA,gBAAA,CACA,kBAAA,CACA,6BAAA,CAGF,oEACE,WAAA,CACA,cAAA,CACA,kBESW,CFNb,qEACE,WAAA,CACA,mBAAA,CAEA,0FACE,QAAA,CAGF,mFACE,gBEbS,CFiBb,+DAEE,kBETW,CFUX,oBAAA,CAGF,+DACE,aAAA,CACA,sBAAA,CAEA,kEACE,gCAAA,CAGF,wJACE,gBAAA,CAGF,uHACE,0BAAA,CACA,6BAAA,CAIJ,sDACE,SAAA,CACA,gBAAA,CAEA,yHACE,4CAAA,CAGF,0EACE,qCAAA,CACA,kBAAA,CACA,eAAA,CACA,2BAAA,CAGF,2EACE,kBAAA,CACA,6BAAA,CACA,2BAAA,CAKF,0EACE,qBAAA,CACA,sBAAA,CACA,kBAAA,CAGF,iGACE,kBAAA",sourceRoot:""}]),a.locals={label01:"-esm-generic-patient-widgets__obs-graph__label01___nqHbU",conceptLabel:"-esm-generic-patient-widgets__obs-graph__conceptLabel___JcAin",bodyShort01:"-esm-generic-patient-widgets__obs-graph__bodyShort01___MXPMj",graphContainer:"-esm-generic-patient-widgets__obs-graph__graphContainer___peSeT",conceptPickerTabs:"-esm-generic-patient-widgets__obs-graph__conceptPickerTabs___Gk0Ph",lineChartContainer:"-esm-generic-patient-widgets__obs-graph__lineChartContainer___DWcve",verticalTabs:"-esm-generic-patient-widgets__obs-graph__verticalTabs___PGFpw",tab:"-esm-generic-patient-widgets__obs-graph__tab___dw7mi",tablist:"-esm-generic-patient-widgets__obs-graph__tablist___f25Mm"};const s=a},1897:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(272),i=n.n(r),o=n(2609),a=n.n(o)()(i());a.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79;--bottom-nav-height: 4rem;--workspace-header-height: 3rem;--tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));--desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height))}.-esm-generic-patient-widgets__obs-switchable__widgetContainer___MDvE6{background-color:#fff;border:1px solid #e0e0e0}.-esm-generic-patient-widgets__obs-switchable__headerContainer___Nd3VW{display:flex;justify-content:space-between;align-items:center;padding:.75rem 0 .75rem 1rem}.-esm-generic-patient-widgets__obs-switchable__toggleButtons___ObgOI{width:fit-content;margin:0 .5rem}.-esm-generic-patient-widgets__obs-switchable__toggle___IoDvg{padding:.5rem;color:#0f62fe;min-height:0px}.-esm-generic-patient-widgets__obs-switchable__toggle___IoDvg.cds--btn--tertiary{border-color:#0f62fe}.-esm-generic-patient-widgets__obs-switchable__toggle___IoDvg.cds--tooltip__trigger:active:not([disabled]){border-color:#0f62fe}.-esm-generic-patient-widgets__obs-switchable__toggle___IoDvg.cds--btn--tertiary:active{border-color:#0f62fe;background-color:#edf5ff;color:#edf5ff}.-esm-generic-patient-widgets__obs-switchable__toggle___IoDvg.cds--btn--tertiary:focus{background-color:#0f62fe;color:#fff}.-esm-generic-patient-widgets__obs-switchable__toggle___IoDvg.cds--btn--tertiary:hover{color:#fff;background-color:#0f62fe}.-esm-generic-patient-widgets__obs-switchable__toggle___IoDvg.cds--btn--ghost{border-color:#a6c8ff}.-esm-generic-patient-widgets__obs-switchable__toggle___IoDvg.cds--btn--ghost:hover{color:#000;background-color:#f4f4f4}.-esm-generic-patient-widgets__obs-switchable__toggle___IoDvg:first-of-type{border-radius:.25rem 0 0 .25rem}.-esm-generic-patient-widgets__obs-switchable__toggle___IoDvg:first-of-type.cds--btn--ghost{border-right:0}.-esm-generic-patient-widgets__obs-switchable__toggle___IoDvg:last-of-type{border-radius:0 .25rem .25rem 0}.-esm-generic-patient-widgets__obs-switchable__toggle___IoDvg:last-of-type.cds--btn--ghost{border-left:0rem}.-esm-generic-patient-widgets__obs-switchable__widgetContainer___MDvE6{background-color:#fff;position:relative}.-esm-generic-patient-widgets__obs-switchable__headerActionItems___yfiRq{align-items:center;display:flex;flex:1 1 0%;justify-content:end}.-esm-generic-patient-widgets__obs-switchable__backgroundDataFetchingIndicator___V8vgZ{align-items:center;display:flex;flex:1 1 0%;justify-content:end}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/obs-switchable/obs-switchable.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CACA,yBAAA,CACA,+BAAA,CACA,oGAAA,CACA,2GAAA,CCxDF,uEACE,qBDGc,CCFd,wBAAA,CAGF,uEACE,YAAA,CACA,6BAAA,CACA,kBAAA,CACA,4BAAA,CAGF,qEACE,iBAAA,CACA,cAAA,CAGF,8DACE,aAAA,CACA,aDDe,CCEf,cAAA,CAEA,iFACE,oBDLa,CCQf,2GACE,oBDTa,CCYf,wFACE,oBDba,CCcb,wBAAA,CACA,aAAA,CAGF,uFACE,wBDnBa,CCoBb,UDlCY,CCqCd,uFACE,UDtCY,CCuCZ,wBDzBa,CC4Bf,8EACE,oBAAA,CAGF,oFACE,UAAA,CACA,wBDvDI,CC2DR,4EACE,+BAAA,CAEA,4FACE,cAAA,CAIJ,2EACE,+BAAA,CAEA,2FACE,gBAAA,CAIJ,uEACE,qBDrEc,CCsEd,iBAAA,CAGF,yEACE,kBAAA,CACA,YAAA,CACA,WAAA,CACA,mBAAA,CAGF,uFACE,kBAAA,CACA,YAAA,CACA,WAAA,CACA,mBAAA",sourceRoot:""}]),a.locals={widgetContainer:"-esm-generic-patient-widgets__obs-switchable__widgetContainer___MDvE6",headerContainer:"-esm-generic-patient-widgets__obs-switchable__headerContainer___Nd3VW",toggleButtons:"-esm-generic-patient-widgets__obs-switchable__toggleButtons___ObgOI",toggle:"-esm-generic-patient-widgets__obs-switchable__toggle___IoDvg",headerActionItems:"-esm-generic-patient-widgets__obs-switchable__headerActionItems___yfiRq",backgroundDataFetchingIndicator:"-esm-generic-patient-widgets__obs-switchable__backgroundDataFetchingIndicator___V8vgZ"};const s=a},5136:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(272),i=n.n(r),o=n(2609),a=n.n(o)()(i());a.push([e.id,".-esm-generic-patient-widgets__obs-table__customRow___Kp7z_ tbody{white-space:nowrap}.-esm-generic-patient-widgets__obs-table__tableHeader___i_IBK{width:max-content;max-width:300px}","",{version:3,sources:["webpack://./src/obs-table/obs-table.scss"],names:[],mappings:"AAAA,kEACE,kBAAA,CAGF,8DACE,iBAAA,CACA,eAAA",sourceRoot:""}]),a.locals={customRow:"-esm-generic-patient-widgets__obs-table__customRow___Kp7z_",tableHeader:"-esm-generic-patient-widgets__obs-table__tableHeader___i_IBK"};const s=a},2609:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,i,o){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(r)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(a[l]=!0)}for(var c=0;c<e.length;c++){var u=[].concat(e[c]);r&&a[u[0]]||(void 0!==o&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=o),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),i&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=i):u[4]="".concat(i)),t.push(u))}},t}},272:e=>{"use strict";e.exports=function(e){var t=e[1],n=e[3];if(!n)return t;if("function"==typeof btoa){var r=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),o="/*# ".concat(i," */");return[t].concat([o]).join("\n")}return[t].join("\n")}},7677:e=>{"use strict";e.exports=function(e,t,n,r,i,o,a,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,i,o,a,s],u=0;(l=new Error(t.replace(/%s/g,(function(){return c[u++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},594:(e,t,n)=>{var r=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt,l="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,c="object"==typeof self&&self&&self.Object===Object&&self,u=l||c||Function("return this")(),d=Object.prototype.toString,h=Math.max,f=Math.min,p=function(){return u.Date.now()};function m(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==d.call(e)}(e))return NaN;if(m(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=m(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var n=o.test(e);return n||a.test(e)?s(e.slice(2),n?2:8):i.test(e)?NaN:+e}e.exports=function(e,t,n){var r,i,o,a,s,l,c=0,u=!1,d=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=r,o=i;return r=i=void 0,c=t,a=e.apply(o,n)}function b(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-c>=o}function w(){var e=p();if(b(e))return _(e);s=setTimeout(w,function(e){var n=t-(e-l);return d?f(n,o-(e-c)):n}(e))}function _(e){return s=void 0,v&&r?y(e):(r=i=void 0,a)}function E(){var e=p(),n=b(e);if(r=arguments,i=this,l=e,n){if(void 0===s)return function(e){return c=e,s=setTimeout(w,t),u?y(e):a}(l);if(d)return s=setTimeout(w,t),y(l)}return void 0===s&&(s=setTimeout(w,t)),a}return t=g(t)||0,m(n)&&(u=!!n.leading,o=(d="maxWait"in n)?h(g(n.maxWait)||0,t):o,v="trailing"in n?!!n.trailing:v),E.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=l=i=s=void 0},E.flush=function(){return void 0===s?a:_(p())},E}},3958:(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",i=1,o=2,a=9007199254740991,s="[object Arguments]",l="[object Array]",c="[object AsyncFunction]",u="[object Boolean]",d="[object Date]",h="[object Error]",f="[object Function]",p="[object GeneratorFunction]",m="[object Map]",g="[object Number]",v="[object Null]",y="[object Object]",b="[object Promise]",w="[object Proxy]",_="[object RegExp]",E="[object Set]",x="[object String]",S="[object Undefined]",T="[object WeakMap]",O="[object ArrayBuffer]",A="[object DataView]",C=/^\[object .+?Constructor\]$/,k=/^(?:0|[1-9]\d*)$/,M={};M["[object Float32Array]"]=M["[object Float64Array]"]=M["[object Int8Array]"]=M["[object Int16Array]"]=M["[object Int32Array]"]=M["[object Uint8Array]"]=M["[object Uint8ClampedArray]"]=M["[object Uint16Array]"]=M["[object Uint32Array]"]=!0,M[s]=M[l]=M[O]=M[u]=M[A]=M[d]=M[h]=M[f]=M[m]=M[g]=M[y]=M[_]=M[E]=M[x]=M[T]=!1;var N="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,D="object"==typeof self&&self&&self.Object===Object&&self,R=N||D||Function("return this")(),L=t&&!t.nodeType&&t,P=L&&e&&!e.nodeType&&e,I=P&&P.exports===L,$=I&&N.process,z=function(){try{return $&&$.binding&&$.binding("util")}catch(e){}}(),B=z&&z.isTypedArray;function j(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function F(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function U(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var H,V,Z,W=Array.prototype,G=Function.prototype,q=Object.prototype,Y=R["__core-js_shared__"],K=G.toString,X=q.hasOwnProperty,Q=(H=/[^.]+$/.exec(Y&&Y.keys&&Y.keys.IE_PROTO||""))?"Symbol(src)_1."+H:"",J=q.toString,ee=RegExp("^"+K.call(X).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),te=I?R.Buffer:void 0,ne=R.Symbol,re=R.Uint8Array,ie=q.propertyIsEnumerable,oe=W.splice,ae=ne?ne.toStringTag:void 0,se=Object.getOwnPropertySymbols,le=te?te.isBuffer:void 0,ce=(V=Object.keys,Z=Object,function(e){return V(Z(e))}),ue=Pe(R,"DataView"),de=Pe(R,"Map"),he=Pe(R,"Promise"),fe=Pe(R,"Set"),pe=Pe(R,"WeakMap"),me=Pe(Object,"create"),ge=Be(ue),ve=Be(de),ye=Be(he),be=Be(fe),we=Be(pe),_e=ne?ne.prototype:void 0,Ee=_e?_e.valueOf:void 0;function xe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Se(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Te(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Oe(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Te;++t<n;)this.add(e[t])}function Ae(e){var t=this.__data__=new Se(e);this.size=t.size}function Ce(e,t){for(var n=e.length;n--;)if(je(e[n][0],t))return n;return-1}function ke(e){return null==e?void 0===e?S:v:ae&&ae in Object(e)?function(e){var t=X.call(e,ae),n=e[ae];try{e[ae]=void 0;var r=!0}catch(e){}var i=J.call(e);return r&&(t?e[ae]=n:delete e[ae]),i}(e):function(e){return J.call(e)}(e)}function Me(e){return Ge(e)&&ke(e)==s}function Ne(e,t,n,r,a){return e===t||(null==e||null==t||!Ge(e)&&!Ge(t)?e!=e&&t!=t:function(e,t,n,r,a,c){var f=Ue(e),p=Ue(t),v=f?l:$e(e),b=p?l:$e(t),w=(v=v==s?y:v)==y,S=(b=b==s?y:b)==y,T=v==b;if(T&&He(e)){if(!He(t))return!1;f=!0,w=!1}if(T&&!w)return c||(c=new Ae),f||qe(e)?De(e,t,n,r,a,c):function(e,t,n,r,a,s,l){switch(n){case A:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case O:return!(e.byteLength!=t.byteLength||!s(new re(e),new re(t)));case u:case d:case g:return je(+e,+t);case h:return e.name==t.name&&e.message==t.message;case _:case x:return e==t+"";case m:var c=F;case E:var f=r&i;if(c||(c=U),e.size!=t.size&&!f)return!1;var p=l.get(e);if(p)return p==t;r|=o,l.set(e,t);var v=De(c(e),c(t),r,a,s,l);return l.delete(e),v;case"[object Symbol]":if(Ee)return Ee.call(e)==Ee.call(t)}return!1}(e,t,v,n,r,a,c);if(!(n&i)){var C=w&&X.call(e,"__wrapped__"),k=S&&X.call(t,"__wrapped__");if(C||k){var M=C?e.value():e,N=k?t.value():t;return c||(c=new Ae),a(M,N,n,r,c)}}return!!T&&(c||(c=new Ae),function(e,t,n,r,o,a){var s=n&i,l=Re(e),c=l.length;if(c!=Re(t).length&&!s)return!1;for(var u=c;u--;){var d=l[u];if(!(s?d in t:X.call(t,d)))return!1}var h=a.get(e);if(h&&a.get(t))return h==t;var f=!0;a.set(e,t),a.set(t,e);for(var p=s;++u<c;){var m=e[d=l[u]],g=t[d];if(r)var v=s?r(g,m,d,t,e,a):r(m,g,d,e,t,a);if(!(void 0===v?m===g||o(m,g,n,r,a):v)){f=!1;break}p||(p="constructor"==d)}if(f&&!p){var y=e.constructor,b=t.constructor;y==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b||(f=!1)}return a.delete(e),a.delete(t),f}(e,t,n,r,a,c))}(e,t,n,r,Ne,a))}function De(e,t,n,r,a,s){var l=n&i,c=e.length,u=t.length;if(c!=u&&!(l&&u>c))return!1;var d=s.get(e);if(d&&s.get(t))return d==t;var h=-1,f=!0,p=n&o?new Oe:void 0;for(s.set(e,t),s.set(t,e);++h<c;){var m=e[h],g=t[h];if(r)var v=l?r(g,m,h,t,e,s):r(m,g,h,e,t,s);if(void 0!==v){if(v)continue;f=!1;break}if(p){if(!j(t,(function(e,t){if(i=t,!p.has(i)&&(m===e||a(m,e,n,r,s)))return p.push(t);var i}))){f=!1;break}}else if(m!==g&&!a(m,g,n,r,s)){f=!1;break}}return s.delete(e),s.delete(t),f}function Re(e){return function(e,t,n){var r=t(e);return Ue(e)?r:function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}(r,n(e))}(e,Ye,Ie)}function Le(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function Pe(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!We(e)||function(e){return!!Q&&Q in e}(e))&&(Ve(e)?ee:C).test(Be(e))}(n)?n:void 0}xe.prototype.clear=function(){this.__data__=me?me(null):{},this.size=0},xe.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},xe.prototype.get=function(e){var t=this.__data__;if(me){var n=t[e];return n===r?void 0:n}return X.call(t,e)?t[e]:void 0},xe.prototype.has=function(e){var t=this.__data__;return me?void 0!==t[e]:X.call(t,e)},xe.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=me&&void 0===t?r:t,this},Se.prototype.clear=function(){this.__data__=[],this.size=0},Se.prototype.delete=function(e){var t=this.__data__,n=Ce(t,e);return!(n<0||(n==t.length-1?t.pop():oe.call(t,n,1),--this.size,0))},Se.prototype.get=function(e){var t=this.__data__,n=Ce(t,e);return n<0?void 0:t[n][1]},Se.prototype.has=function(e){return Ce(this.__data__,e)>-1},Se.prototype.set=function(e,t){var n=this.__data__,r=Ce(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Te.prototype.clear=function(){this.size=0,this.__data__={hash:new xe,map:new(de||Se),string:new xe}},Te.prototype.delete=function(e){var t=Le(this,e).delete(e);return this.size-=t?1:0,t},Te.prototype.get=function(e){return Le(this,e).get(e)},Te.prototype.has=function(e){return Le(this,e).has(e)},Te.prototype.set=function(e,t){var n=Le(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Oe.prototype.add=Oe.prototype.push=function(e){return this.__data__.set(e,r),this},Oe.prototype.has=function(e){return this.__data__.has(e)},Ae.prototype.clear=function(){this.__data__=new Se,this.size=0},Ae.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Ae.prototype.get=function(e){return this.__data__.get(e)},Ae.prototype.has=function(e){return this.__data__.has(e)},Ae.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Se){var r=n.__data__;if(!de||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Te(r)}return n.set(e,t),this.size=n.size,this};var Ie=se?function(e){return null==e?[]:(e=Object(e),function(t,n){for(var r=-1,i=null==t?0:t.length,o=0,a=[];++r<i;){var s=t[r];l=s,ie.call(e,l)&&(a[o++]=s)}var l;return a}(se(e)))}:function(){return[]},$e=ke;function ze(e,t){return!!(t=null==t?a:t)&&("number"==typeof e||k.test(e))&&e>-1&&e%1==0&&e<t}function Be(e){if(null!=e){try{return K.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function je(e,t){return e===t||e!=e&&t!=t}(ue&&$e(new ue(new ArrayBuffer(1)))!=A||de&&$e(new de)!=m||he&&$e(he.resolve())!=b||fe&&$e(new fe)!=E||pe&&$e(new pe)!=T)&&($e=function(e){var t=ke(e),n=t==y?e.constructor:void 0,r=n?Be(n):"";if(r)switch(r){case ge:return A;case ve:return m;case ye:return b;case be:return E;case we:return T}return t});var Fe=Me(function(){return arguments}())?Me:function(e){return Ge(e)&&X.call(e,"callee")&&!ie.call(e,"callee")},Ue=Array.isArray,He=le||function(){return!1};function Ve(e){if(!We(e))return!1;var t=ke(e);return t==f||t==p||t==c||t==w}function Ze(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=a}function We(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ge(e){return null!=e&&"object"==typeof e}var qe=B?function(e){return function(t){return e(t)}}(B):function(e){return Ge(e)&&Ze(e.length)&&!!M[ke(e)]};function Ye(e){return null!=(t=e)&&Ze(t.length)&&!Ve(t)?function(e,t){var n=Ue(e),r=!n&&Fe(e),i=!n&&!r&&He(e),o=!n&&!r&&!i&&qe(e),a=n||r||i||o,s=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],l=s.length;for(var c in e)!t&&!X.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||ze(c,l))||s.push(c);return s}(e):function(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||q))return ce(e);var t,n,r=[];for(var i in Object(e))X.call(e,i)&&"constructor"!=i&&r.push(i);return r}(e);var t}e.exports=function(e,t){return Ne(e,t)}},8979:(e,t,n)=>{var r="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",a="[object Function]",s="[object GeneratorFunction]",l=/^\[object .+?Constructor\]$/,c=/^(?:0|[1-9]\d*)$/,u="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,d="object"==typeof self&&self&&self.Object===Object&&self,h=u||d||Function("return this")();function f(e,t){return!(!e||!e.length)&&function(e,t,n){if(t!=t)return function(e,t,n,r){for(var i=e.length,o=-1;++o<i;)if(t(e[o],o,e))return o;return-1}(e,g);for(var r=-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}(e,t)>-1}function p(e,t){for(var n=-1,r=e?e.length:0,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function m(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function g(e){return e!=e}function v(e,t){return e.has(t)}function y(e,t){return function(n){return e(t(n))}}var b,w=Array.prototype,_=Function.prototype,E=Object.prototype,x=h["__core-js_shared__"],S=(b=/[^.]+$/.exec(x&&x.keys&&x.keys.IE_PROTO||""))?"Symbol(src)_1."+b:"",T=_.toString,O=E.hasOwnProperty,A=E.toString,C=RegExp("^"+T.call(O).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),k=h.Symbol,M=y(Object.getPrototypeOf,Object),N=E.propertyIsEnumerable,D=w.splice,R=k?k.isConcatSpreadable:void 0,L=Object.getOwnPropertySymbols,P=Math.max,I=Z(h,"Map"),$=Z(Object,"create");function z(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function B(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function j(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function F(e){var t=-1,n=e?e.length:0;for(this.__data__=new j;++t<n;)this.add(e[t])}function U(e,t){for(var n,r,i=e.length;i--;)if((n=e[i][0])===(r=t)||n!=n&&r!=r)return i;return-1}function H(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=q),i||(i=[]);++o<a;){var s=e[o];t>0&&n(s)?t>1?H(s,t-1,n,r,i):m(i,s):r||(i[i.length]=s)}return i}function V(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function Z(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){if(!te(e)||S&&S in e)return!1;var t=ee(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?C:l;return t.test(function(e){if(null!=e){try{return T.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(n)?n:void 0}z.prototype.clear=function(){this.__data__=$?$(null):{}},z.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},z.prototype.get=function(e){var t=this.__data__;if($){var n=t[e];return n===r?void 0:n}return O.call(t,e)?t[e]:void 0},z.prototype.has=function(e){var t=this.__data__;return $?void 0!==t[e]:O.call(t,e)},z.prototype.set=function(e,t){return this.__data__[e]=$&&void 0===t?r:t,this},B.prototype.clear=function(){this.__data__=[]},B.prototype.delete=function(e){var t=this.__data__,n=U(t,e);return!(n<0||(n==t.length-1?t.pop():D.call(t,n,1),0))},B.prototype.get=function(e){var t=this.__data__,n=U(t,e);return n<0?void 0:t[n][1]},B.prototype.has=function(e){return U(this.__data__,e)>-1},B.prototype.set=function(e,t){var n=this.__data__,r=U(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},j.prototype.clear=function(){this.__data__={hash:new z,map:new(I||B),string:new z}},j.prototype.delete=function(e){return V(this,e).delete(e)},j.prototype.get=function(e){return V(this,e).get(e)},j.prototype.has=function(e){return V(this,e).has(e)},j.prototype.set=function(e,t){return V(this,e).set(e,t),this},F.prototype.add=F.prototype.push=function(e){return this.__data__.set(e,r),this},F.prototype.has=function(e){return this.__data__.has(e)};var W=L?y(L,Object):se,G=L?function(e){for(var t=[];e;)m(t,W(e)),e=M(e);return t}:se;function q(e){return Q(e)||X(e)||!!(R&&e&&e[R])}function Y(e,t){return!!(t=null==t?i:t)&&("number"==typeof e||c.test(e))&&e>-1&&e%1==0&&e<t}function K(e){if("string"==typeof e||function(e){return"symbol"==typeof e||ne(e)&&"[object Symbol]"==A.call(e)}(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function X(e){return function(e){return ne(e)&&J(e)}(e)&&O.call(e,"callee")&&(!N.call(e,"callee")||A.call(e)==o)}var Q=Array.isArray;function J(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}(e.length)&&!ee(e)}function ee(e){var t=te(e)?A.call(e):"";return t==a||t==s}function te(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function ne(e){return!!e&&"object"==typeof e}function re(e){return J(e)?function(e,t){var n=Q(e)||X(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],r=n.length,i=!!r;for(var o in e)!t&&!O.call(e,o)||i&&("length"==o||Y(o,r))||n.push(o);return n}(e,!0):function(e){if(!te(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t,n,r=(n=(t=e)&&t.constructor,t===("function"==typeof n&&n.prototype||E)),i=[];for(var o in e)("constructor"!=o||!r&&O.call(e,o))&&i.push(o);return i}(e)}var ie,oe,ae=(ie=function(e,t){return null==e?{}:(t=p(H(t,1),K),function(e,t){return function(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var a=t[r],s=e[a];n(0,a)&&(o[a]=s)}return o}(e=Object(e),t,(function(t,n){return n in e}))}(e,function(e,t,n,r){var i=-1,o=f,a=!0,s=e.length,l=[],c=t.length;if(!s)return l;t.length>=200&&(o=v,a=!1,t=new F(t));e:for(;++i<s;){var u=e[i],d=u;if(u=0!==u?u:0,a&&d==d){for(var h=c;h--;)if(t[h]===d)continue e;l.push(u)}else o(t,d,r)||l.push(u)}return l}(function(e){return function(e,t,n){var r=t(e);return Q(e)?r:m(r,n(e))}(e,re,G)}(e),t)))},oe=P(void 0===oe?ie.length-1:oe,0),function(){for(var e=arguments,t=-1,n=P(e.length-oe,0),r=Array(n);++t<n;)r[t]=e[oe+t];t=-1;for(var i=Array(oe+1);++t<oe;)i[t]=e[t];return i[oe]=r,function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(ie,this,i)});function se(){return[]}e.exports=ae},8262:(e,t,n)=>{"use strict";var r=n(3586);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},3980:(e,t,n)=>{e.exports=n(8262)()},3586:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},2967:(e,t,n)=>{"use strict";var r=n(7900),i=n(4616);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=new Set,s={};function l(e,t){c(e,t),c(e+"Capture",t)}function c(e,t){for(s[e]=t,e=0;e<t.length;e++)a.add(t[e])}var u=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),d=Object.prototype.hasOwnProperty,h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,f={},p={};function m(e,t,n,r,i,o,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var g={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){g[e]=new m(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];g[t]=new m(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){g[e]=new m(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){g[e]=new m(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){g[e]=new m(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){g[e]=new m(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){g[e]=new m(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){g[e]=new m(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){g[e]=new m(e,5,!1,e.toLowerCase(),null,!1,!1)}));var v=/[\-:]([a-z])/g;function y(e){return e[1].toUpperCase()}function b(e,t,n,r){var i=g.hasOwnProperty(t)?g[t]:null;(null!==i?0!==i.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!d.call(p,e)||!d.call(f,e)&&(h.test(e)?p[e]=!0:(f[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(v,y);g[t]=new m(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(v,y);g[t]=new m(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(v,y);g[t]=new m(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){g[e]=new m(e,1,!1,e.toLowerCase(),null,!1,!1)})),g.xlinkHref=new m("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){g[e]=new m(e,1,!1,e.toLowerCase(),null,!0,!0)}));var w=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,_=Symbol.for("react.element"),E=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),O=Symbol.for("react.provider"),A=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),k=Symbol.for("react.suspense"),M=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),D=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var R=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var L=Symbol.iterator;function P(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=L&&e[L]||e["@@iterator"])?e:null}var I,$=Object.assign;function z(e){if(void 0===I)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);I=t&&t[1]||""}return"\n"+I+e}var B=!1;function j(e,t){if(!e||B)return"";B=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var i=t.stack.split("\n"),o=r.stack.split("\n"),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(1!==a||1!==s)do{if(a--,0>--s||i[a]!==o[s]){var l="\n"+i[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=a&&0<=s);break}}}finally{B=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?z(e):""}function F(e){switch(e.tag){case 5:return z(e.type);case 16:return z("Lazy");case 13:return z("Suspense");case 19:return z("SuspenseList");case 0:case 2:case 15:return j(e.type,!1);case 11:return j(e.type.render,!1);case 1:return j(e.type,!0);default:return""}}function U(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case x:return"Fragment";case E:return"Portal";case T:return"Profiler";case S:return"StrictMode";case k:return"Suspense";case M:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case A:return(e.displayName||"Context")+".Consumer";case O:return(e._context.displayName||"Context")+".Provider";case C:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case N:return null!==(t=e.displayName||null)?t:U(e.type)||"Memo";case D:t=e._payload,e=e._init;try{return U(e(t))}catch(e){}}return null}function H(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return U(t);case 8:return t===S?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function V(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function Z(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function W(e){e._valueTracker||(e._valueTracker=function(e){var t=Z(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function G(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Z(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function q(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Y(e,t){var n=t.checked;return $({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function K(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=V(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function X(e,t){null!=(t=t.checked)&&b(e,"checked",t,!1)}function Q(e,t){X(e,t);var n=V(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,n):t.hasOwnProperty("defaultValue")&&ee(e,t.type,V(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function J(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ee(e,t,n){"number"===t&&q(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var te=Array.isArray;function ne(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+V(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function re(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(o(91));return $({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ie(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(o(92));if(te(n)){if(1<n.length)throw Error(o(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:V(n)}}function oe(e,t){var n=V(t.value),r=V(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ae(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function se(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function le(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?se(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ce,ue,de=(ue=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ce=ce||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ce.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ue(e,t)}))}:ue);function he(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var fe={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},pe=["Webkit","ms","Moz","O"];function me(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||fe.hasOwnProperty(e)&&fe[e]?(""+t).trim():t+"px"}function ge(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=me(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(fe).forEach((function(e){pe.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),fe[t]=fe[e]}))}));var ve=$({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ye(e,t){if(t){if(ve[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(o(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(o(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(o(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(o(62))}}function be(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var we=null;function _e(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Ee=null,xe=null,Se=null;function Te(e){if(e=bi(e)){if("function"!=typeof Ee)throw Error(o(280));var t=e.stateNode;t&&(t=_i(t),Ee(e.stateNode,e.type,t))}}function Oe(e){xe?Se?Se.push(e):Se=[e]:xe=e}function Ae(){if(xe){var e=xe,t=Se;if(Se=xe=null,Te(e),t)for(e=0;e<t.length;e++)Te(t[e])}}function Ce(e,t){return e(t)}function ke(){}var Me=!1;function Ne(e,t,n){if(Me)return e(t,n);Me=!0;try{return Ce(e,t,n)}finally{Me=!1,(null!==xe||null!==Se)&&(ke(),Ae())}}function De(e,t){var n=e.stateNode;if(null===n)return null;var r=_i(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(o(231,t,typeof n));return n}var Re=!1;if(u)try{var Le={};Object.defineProperty(Le,"passive",{get:function(){Re=!0}}),window.addEventListener("test",Le,Le),window.removeEventListener("test",Le,Le)}catch(ue){Re=!1}function Pe(e,t,n,r,i,o,a,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(e){this.onError(e)}}var Ie=!1,$e=null,ze=!1,Be=null,je={onError:function(e){Ie=!0,$e=e}};function Fe(e,t,n,r,i,o,a,s,l){Ie=!1,$e=null,Pe.apply(je,arguments)}function Ue(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function He(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null}function Ve(e){if(Ue(e)!==e)throw Error(o(188))}function Ze(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=Ue(e)))throw Error(o(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var a=i.alternate;if(null===a){if(null!==(r=i.return)){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return Ve(i),e;if(a===r)return Ve(i),t;a=a.sibling}throw Error(o(188))}if(n.return!==r.return)n=i,r=a;else{for(var s=!1,l=i.child;l;){if(l===n){s=!0,n=i,r=a;break}if(l===r){s=!0,r=i,n=a;break}l=l.sibling}if(!s){for(l=a.child;l;){if(l===n){s=!0,n=a,r=i;break}if(l===r){s=!0,r=a,n=i;break}l=l.sibling}if(!s)throw Error(o(189))}}if(n.alternate!==r)throw Error(o(190))}if(3!==n.tag)throw Error(o(188));return n.stateNode.current===n?e:t}(e))?We(e):null}function We(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=We(e);if(null!==t)return t;e=e.sibling}return null}var Ge=i.unstable_scheduleCallback,qe=i.unstable_cancelCallback,Ye=i.unstable_shouldYield,Ke=i.unstable_requestPaint,Xe=i.unstable_now,Qe=i.unstable_getCurrentPriorityLevel,Je=i.unstable_ImmediatePriority,et=i.unstable_UserBlockingPriority,tt=i.unstable_NormalPriority,nt=i.unstable_LowPriority,rt=i.unstable_IdlePriority,it=null,ot=null,at=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(st(e)/lt|0)|0},st=Math.log,lt=Math.LN2,ct=64,ut=4194304;function dt(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ht(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=268435455&n;if(0!==a){var s=a&~i;0!==s?r=dt(s):0!=(o&=a)&&(r=dt(o))}else 0!=(a=n&~i)?r=dt(a):0!==o&&(r=dt(o));if(0===r)return 0;if(0!==t&&t!==r&&0==(t&i)&&((i=r&-r)>=(o=t&-t)||16===i&&0!=(4194240&o)))return t;if(0!=(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-at(t)),r|=e[n],t&=~i;return r}function ft(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function pt(e){return 0!=(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function mt(){var e=ct;return 0==(4194240&(ct<<=1))&&(ct=64),e}function gt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function vt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-at(t)]=n}function yt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-at(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var bt=0;function wt(e){return 1<(e&=-e)?4<e?0!=(268435455&e)?16:536870912:4:1}var _t,Et,xt,St,Tt,Ot=!1,At=[],Ct=null,kt=null,Mt=null,Nt=new Map,Dt=new Map,Rt=[],Lt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Pt(e,t){switch(e){case"focusin":case"focusout":Ct=null;break;case"dragenter":case"dragleave":kt=null;break;case"mouseover":case"mouseout":Mt=null;break;case"pointerover":case"pointerout":Nt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Dt.delete(t.pointerId)}}function It(e,t,n,r,i,o){return null===e||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},null!==t&&null!==(t=bi(t))&&Et(t),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function $t(e){var t=yi(e.target);if(null!==t){var n=Ue(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=He(n)))return e.blockedOn=t,void Tt(e.priority,(function(){xt(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function zt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Yt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=bi(n))&&Et(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);we=r,n.target.dispatchEvent(r),we=null,t.shift()}return!0}function Bt(e,t,n){zt(e)&&n.delete(t)}function jt(){Ot=!1,null!==Ct&&zt(Ct)&&(Ct=null),null!==kt&&zt(kt)&&(kt=null),null!==Mt&&zt(Mt)&&(Mt=null),Nt.forEach(Bt),Dt.forEach(Bt)}function Ft(e,t){e.blockedOn===t&&(e.blockedOn=null,Ot||(Ot=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,jt)))}function Ut(e){function t(t){return Ft(t,e)}if(0<At.length){Ft(At[0],e);for(var n=1;n<At.length;n++){var r=At[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Ct&&Ft(Ct,e),null!==kt&&Ft(kt,e),null!==Mt&&Ft(Mt,e),Nt.forEach(t),Dt.forEach(t),n=0;n<Rt.length;n++)(r=Rt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Rt.length&&null===(n=Rt[0]).blockedOn;)$t(n),null===n.blockedOn&&Rt.shift()}var Ht=w.ReactCurrentBatchConfig,Vt=!0;function Zt(e,t,n,r){var i=bt,o=Ht.transition;Ht.transition=null;try{bt=1,Gt(e,t,n,r)}finally{bt=i,Ht.transition=o}}function Wt(e,t,n,r){var i=bt,o=Ht.transition;Ht.transition=null;try{bt=4,Gt(e,t,n,r)}finally{bt=i,Ht.transition=o}}function Gt(e,t,n,r){if(Vt){var i=Yt(e,t,n,r);if(null===i)Vr(e,t,r,qt,n),Pt(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return Ct=It(Ct,e,t,n,r,i),!0;case"dragenter":return kt=It(kt,e,t,n,r,i),!0;case"mouseover":return Mt=It(Mt,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return Nt.set(o,It(Nt.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,Dt.set(o,It(Dt.get(o)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(Pt(e,r),4&t&&-1<Lt.indexOf(e)){for(;null!==i;){var o=bi(i);if(null!==o&&_t(o),null===(o=Yt(e,t,n,r))&&Vr(e,t,r,qt,n),o===i)break;i=o}null!==i&&r.stopPropagation()}else Vr(e,t,r,null,n)}}var qt=null;function Yt(e,t,n,r){if(qt=null,null!==(e=yi(e=_e(r))))if(null===(t=Ue(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=He(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return qt=e,null}function Kt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Qe()){case Je:return 1;case et:return 4;case tt:case nt:return 16;case rt:return 536870912;default:return 16}default:return 16}}var Xt=null,Qt=null,Jt=null;function en(){if(Jt)return Jt;var e,t,n=Qt,r=n.length,i="value"in Xt?Xt.value:Xt.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===i[o-t];t++);return Jt=i.slice(e,1<t?1-t:void 0)}function tn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function nn(){return!0}function rn(){return!1}function on(e){function t(t,n,r,i,o){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(i):i[a]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?nn:rn,this.isPropagationStopped=rn,this}return $(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=nn)},persist:function(){},isPersistent:nn}),t}var an,sn,ln,cn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},un=on(cn),dn=$({},cn,{view:0,detail:0}),hn=on(dn),fn=$({},dn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Tn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ln&&(ln&&"mousemove"===e.type?(an=e.screenX-ln.screenX,sn=e.screenY-ln.screenY):sn=an=0,ln=e),an)},movementY:function(e){return"movementY"in e?e.movementY:sn}}),pn=on(fn),mn=on($({},fn,{dataTransfer:0})),gn=on($({},dn,{relatedTarget:0})),vn=on($({},cn,{animationName:0,elapsedTime:0,pseudoElement:0})),yn=$({},cn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),bn=on(yn),wn=on($({},cn,{data:0})),_n={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},En={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},xn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Sn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=xn[e])&&!!t[e]}function Tn(){return Sn}var On=$({},dn,{key:function(e){if(e.key){var t=_n[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=tn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?En[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Tn,charCode:function(e){return"keypress"===e.type?tn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?tn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),An=on(On),Cn=on($({},fn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),kn=on($({},dn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Tn})),Mn=on($({},cn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Nn=$({},fn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Dn=on(Nn),Rn=[9,13,27,32],Ln=u&&"CompositionEvent"in window,Pn=null;u&&"documentMode"in document&&(Pn=document.documentMode);var In=u&&"TextEvent"in window&&!Pn,$n=u&&(!Ln||Pn&&8<Pn&&11>=Pn),zn=String.fromCharCode(32),Bn=!1;function jn(e,t){switch(e){case"keyup":return-1!==Rn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Fn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Un=!1,Hn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Vn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Hn[e.type]:"textarea"===t}function Zn(e,t,n,r){Oe(r),0<(t=Wr(t,"onChange")).length&&(n=new un("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Wn=null,Gn=null;function qn(e){zr(e,0)}function Yn(e){if(G(wi(e)))return e}function Kn(e,t){if("change"===e)return t}var Xn=!1;if(u){var Qn;if(u){var Jn="oninput"in document;if(!Jn){var er=document.createElement("div");er.setAttribute("oninput","return;"),Jn="function"==typeof er.oninput}Qn=Jn}else Qn=!1;Xn=Qn&&(!document.documentMode||9<document.documentMode)}function tr(){Wn&&(Wn.detachEvent("onpropertychange",nr),Gn=Wn=null)}function nr(e){if("value"===e.propertyName&&Yn(Gn)){var t=[];Zn(t,Gn,e,_e(e)),Ne(qn,t)}}function rr(e,t,n){"focusin"===e?(tr(),Gn=n,(Wn=t).attachEvent("onpropertychange",nr)):"focusout"===e&&tr()}function ir(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Yn(Gn)}function or(e,t){if("click"===e)return Yn(t)}function ar(e,t){if("input"===e||"change"===e)return Yn(t)}var sr="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function lr(e,t){if(sr(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!d.call(t,i)||!sr(e[i],t[i]))return!1}return!0}function cr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ur(e,t){var n,r=cr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=cr(r)}}function dr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?dr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function hr(){for(var e=window,t=q();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=q((e=t.contentWindow).document)}return t}function fr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function pr(e){var t=hr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&dr(n.ownerDocument.documentElement,n)){if(null!==r&&fr(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=void 0===r.end?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=ur(n,o);var a=ur(n,r);i&&a&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var mr=u&&"documentMode"in document&&11>=document.documentMode,gr=null,vr=null,yr=null,br=!1;function wr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;br||null==gr||gr!==q(r)||(r="selectionStart"in(r=gr)&&fr(r)?{start:r.selectionStart,end:r.selectionEnd}:{anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},yr&&lr(yr,r)||(yr=r,0<(r=Wr(vr,"onSelect")).length&&(t=new un("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=gr)))}function _r(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Er={animationend:_r("Animation","AnimationEnd"),animationiteration:_r("Animation","AnimationIteration"),animationstart:_r("Animation","AnimationStart"),transitionend:_r("Transition","TransitionEnd")},xr={},Sr={};function Tr(e){if(xr[e])return xr[e];if(!Er[e])return e;var t,n=Er[e];for(t in n)if(n.hasOwnProperty(t)&&t in Sr)return xr[e]=n[t];return e}u&&(Sr=document.createElement("div").style,"AnimationEvent"in window||(delete Er.animationend.animation,delete Er.animationiteration.animation,delete Er.animationstart.animation),"TransitionEvent"in window||delete Er.transitionend.transition);var Or=Tr("animationend"),Ar=Tr("animationiteration"),Cr=Tr("animationstart"),kr=Tr("transitionend"),Mr=new Map,Nr="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Dr(e,t){Mr.set(e,t),l(t,[e])}for(var Rr=0;Rr<Nr.length;Rr++){var Lr=Nr[Rr];Dr(Lr.toLowerCase(),"on"+(Lr[0].toUpperCase()+Lr.slice(1)))}Dr(Or,"onAnimationEnd"),Dr(Ar,"onAnimationIteration"),Dr(Cr,"onAnimationStart"),Dr("dblclick","onDoubleClick"),Dr("focusin","onFocus"),Dr("focusout","onBlur"),Dr(kr,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Pr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Ir=new Set("cancel close invalid load scroll toggle".split(" ").concat(Pr));function $r(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,a,s,l,c){if(Fe.apply(this,arguments),Ie){if(!Ie)throw Error(o(198));var u=$e;Ie=!1,$e=null,ze||(ze=!0,Be=u)}}(r,t,void 0,e),e.currentTarget=null}function zr(e,t){t=0!=(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==o&&i.isPropagationStopped())break e;$r(i,s,c),o=l}else for(a=0;a<r.length;a++){if(l=(s=r[a]).instance,c=s.currentTarget,s=s.listener,l!==o&&i.isPropagationStopped())break e;$r(i,s,c),o=l}}}if(ze)throw e=Be,ze=!1,Be=null,e}function Br(e,t){var n=t[mi];void 0===n&&(n=t[mi]=new Set);var r=e+"__bubble";n.has(r)||(Hr(t,e,2,!1),n.add(r))}function jr(e,t,n){var r=0;t&&(r|=4),Hr(n,e,r,t)}var Fr="_reactListening"+Math.random().toString(36).slice(2);function Ur(e){if(!e[Fr]){e[Fr]=!0,a.forEach((function(t){"selectionchange"!==t&&(Ir.has(t)||jr(t,!1,e),jr(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Fr]||(t[Fr]=!0,jr("selectionchange",!1,t))}}function Hr(e,t,n,r){switch(Kt(t)){case 1:var i=Zt;break;case 4:i=Wt;break;default:i=Gt}n=i.bind(null,t,n,e),i=void 0,!Re||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Vr(e,t,n,r,i){var o=r;if(0==(1&t)&&0==(2&t)&&null!==r)e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===i||8===s.nodeType&&s.parentNode===i)break;if(4===a)for(a=r.return;null!==a;){var l=a.tag;if((3===l||4===l)&&((l=a.stateNode.containerInfo)===i||8===l.nodeType&&l.parentNode===i))return;a=a.return}for(;null!==s;){if(null===(a=yi(s)))return;if(5===(l=a.tag)||6===l){r=o=a;continue e}s=s.parentNode}}r=r.return}Ne((function(){var r=o,i=_e(n),a=[];e:{var s=Mr.get(e);if(void 0!==s){var l=un,c=e;switch(e){case"keypress":if(0===tn(n))break e;case"keydown":case"keyup":l=An;break;case"focusin":c="focus",l=gn;break;case"focusout":c="blur",l=gn;break;case"beforeblur":case"afterblur":l=gn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=pn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=mn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=kn;break;case Or:case Ar:case Cr:l=vn;break;case kr:l=Mn;break;case"scroll":l=hn;break;case"wheel":l=Dn;break;case"copy":case"cut":case"paste":l=bn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=Cn}var u=0!=(4&t),d=!u&&"scroll"===e,h=u?null!==s?s+"Capture":null:s;u=[];for(var f,p=r;null!==p;){var m=(f=p).stateNode;if(5===f.tag&&null!==m&&(f=m,null!==h&&null!=(m=De(p,h))&&u.push(Zr(p,m,f))),d)break;p=p.return}0<u.length&&(s=new l(s,c,null,n,i),a.push({event:s,listeners:u}))}}if(0==(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===we||!(c=n.relatedTarget||n.fromElement)||!yi(c)&&!c[pi])&&(l||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(c=(c=n.relatedTarget||n.toElement)?yi(c):null)&&(c!==(d=Ue(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(l=null,c=r),l!==c)){if(u=pn,m="onMouseLeave",h="onMouseEnter",p="mouse","pointerout"!==e&&"pointerover"!==e||(u=Cn,m="onPointerLeave",h="onPointerEnter",p="pointer"),d=null==l?s:wi(l),f=null==c?s:wi(c),(s=new u(m,p+"leave",l,n,i)).target=d,s.relatedTarget=f,m=null,yi(i)===r&&((u=new u(h,p+"enter",c,n,i)).target=f,u.relatedTarget=d,m=u),d=m,l&&c)e:{for(h=c,p=0,f=u=l;f;f=Gr(f))p++;for(f=0,m=h;m;m=Gr(m))f++;for(;0<p-f;)u=Gr(u),p--;for(;0<f-p;)h=Gr(h),f--;for(;p--;){if(u===h||null!==h&&u===h.alternate)break e;u=Gr(u),h=Gr(h)}u=null}else u=null;null!==l&&qr(a,s,l,u,!1),null!==c&&null!==d&&qr(a,d,c,u,!0)}if("select"===(l=(s=r?wi(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var g=Kn;else if(Vn(s))if(Xn)g=ar;else{g=ir;var v=rr}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(g=or);switch(g&&(g=g(e,r))?Zn(a,g,n,i):(v&&v(e,s,r),"focusout"===e&&(v=s._wrapperState)&&v.controlled&&"number"===s.type&&ee(s,"number",s.value)),v=r?wi(r):window,e){case"focusin":(Vn(v)||"true"===v.contentEditable)&&(gr=v,vr=r,yr=null);break;case"focusout":yr=vr=gr=null;break;case"mousedown":br=!0;break;case"contextmenu":case"mouseup":case"dragend":br=!1,wr(a,n,i);break;case"selectionchange":if(mr)break;case"keydown":case"keyup":wr(a,n,i)}var y;if(Ln)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Un?jn(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&($n&&"ko"!==n.locale&&(Un||"onCompositionStart"!==b?"onCompositionEnd"===b&&Un&&(y=en()):(Qt="value"in(Xt=i)?Xt.value:Xt.textContent,Un=!0)),0<(v=Wr(r,b)).length&&(b=new wn(b,e,null,n,i),a.push({event:b,listeners:v}),(y||null!==(y=Fn(n)))&&(b.data=y))),(y=In?function(e,t){switch(e){case"compositionend":return Fn(t);case"keypress":return 32!==t.which?null:(Bn=!0,zn);case"textInput":return(e=t.data)===zn&&Bn?null:e;default:return null}}(e,n):function(e,t){if(Un)return"compositionend"===e||!Ln&&jn(e,t)?(e=en(),Jt=Qt=Xt=null,Un=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return $n&&"ko"!==t.locale?null:t.data}}(e,n))&&0<(r=Wr(r,"onBeforeInput")).length&&(i=new wn("onBeforeInput","beforeinput",null,n,i),a.push({event:i,listeners:r}),i.data=y)}zr(a,t)}))}function Zr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Wr(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,o=i.stateNode;5===i.tag&&null!==o&&(i=o,null!=(o=De(e,n))&&r.unshift(Zr(e,o,i)),null!=(o=De(e,t))&&r.push(Zr(e,o,i))),e=e.return}return r}function Gr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function qr(e,t,n,r,i){for(var o=t._reactName,a=[];null!==n&&n!==r;){var s=n,l=s.alternate,c=s.stateNode;if(null!==l&&l===r)break;5===s.tag&&null!==c&&(s=c,i?null!=(l=De(n,o))&&a.unshift(Zr(n,l,s)):i||null!=(l=De(n,o))&&a.push(Zr(n,l,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var Yr=/\r\n?/g,Kr=/\u0000|\uFFFD/g;function Xr(e){return("string"==typeof e?e:""+e).replace(Yr,"\n").replace(Kr,"")}function Qr(e,t,n){if(t=Xr(t),Xr(e)!==t&&n)throw Error(o(425))}function Jr(){}var ei=null,ti=null;function ni(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ri="function"==typeof setTimeout?setTimeout:void 0,ii="function"==typeof clearTimeout?clearTimeout:void 0,oi="function"==typeof Promise?Promise:void 0,ai="function"==typeof queueMicrotask?queueMicrotask:void 0!==oi?function(e){return oi.resolve(null).then(e).catch(si)}:ri;function si(e){setTimeout((function(){throw e}))}function li(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&8===i.nodeType)if("/$"===(n=i.data)){if(0===r)return e.removeChild(i),void Ut(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);Ut(t)}function ci(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function ui(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var di=Math.random().toString(36).slice(2),hi="__reactFiber$"+di,fi="__reactProps$"+di,pi="__reactContainer$"+di,mi="__reactEvents$"+di,gi="__reactListeners$"+di,vi="__reactHandles$"+di;function yi(e){var t=e[hi];if(t)return t;for(var n=e.parentNode;n;){if(t=n[pi]||n[hi]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=ui(e);null!==e;){if(n=e[hi])return n;e=ui(e)}return t}n=(e=n).parentNode}return null}function bi(e){return!(e=e[hi]||e[pi])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function wi(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(o(33))}function _i(e){return e[fi]||null}var Ei=[],xi=-1;function Si(e){return{current:e}}function Ti(e){0>xi||(e.current=Ei[xi],Ei[xi]=null,xi--)}function Oi(e,t){xi++,Ei[xi]=e.current,e.current=t}var Ai={},Ci=Si(Ai),ki=Si(!1),Mi=Ai;function Ni(e,t){var n=e.type.contextTypes;if(!n)return Ai;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Di(e){return null!=e.childContextTypes}function Ri(){Ti(ki),Ti(Ci)}function Li(e,t,n){if(Ci.current!==Ai)throw Error(o(168));Oi(Ci,t),Oi(ki,n)}function Pi(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in t))throw Error(o(108,H(e)||"Unknown",i));return $({},n,r)}function Ii(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ai,Mi=Ci.current,Oi(Ci,e),Oi(ki,ki.current),!0}function $i(e,t,n){var r=e.stateNode;if(!r)throw Error(o(169));n?(e=Pi(e,t,Mi),r.__reactInternalMemoizedMergedChildContext=e,Ti(ki),Ti(Ci),Oi(Ci,e)):Ti(ki),Oi(ki,n)}var zi=null,Bi=!1,ji=!1;function Fi(e){null===zi?zi=[e]:zi.push(e)}function Ui(){if(!ji&&null!==zi){ji=!0;var e=0,t=bt;try{var n=zi;for(bt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}zi=null,Bi=!1}catch(t){throw null!==zi&&(zi=zi.slice(e+1)),Ge(Je,Ui),t}finally{bt=t,ji=!1}}return null}var Hi=[],Vi=0,Zi=null,Wi=0,Gi=[],qi=0,Yi=null,Ki=1,Xi="";function Qi(e,t){Hi[Vi++]=Wi,Hi[Vi++]=Zi,Zi=e,Wi=t}function Ji(e,t,n){Gi[qi++]=Ki,Gi[qi++]=Xi,Gi[qi++]=Yi,Yi=e;var r=Ki;e=Xi;var i=32-at(r)-1;r&=~(1<<i),n+=1;var o=32-at(t)+i;if(30<o){var a=i-i%5;o=(r&(1<<a)-1).toString(32),r>>=a,i-=a,Ki=1<<32-at(t)+i|n<<i|r,Xi=o+e}else Ki=1<<o|n<<i|r,Xi=e}function eo(e){null!==e.return&&(Qi(e,1),Ji(e,1,0))}function to(e){for(;e===Zi;)Zi=Hi[--Vi],Hi[Vi]=null,Wi=Hi[--Vi],Hi[Vi]=null;for(;e===Yi;)Yi=Gi[--qi],Gi[qi]=null,Xi=Gi[--qi],Gi[qi]=null,Ki=Gi[--qi],Gi[qi]=null}var no=null,ro=null,io=!1,oo=null;function ao(e,t){var n=Nc(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function so(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,no=e,ro=ci(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,no=e,ro=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Yi?{id:Ki,overflow:Xi}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Nc(18,null,null,0)).stateNode=t,n.return=e,e.child=n,no=e,ro=null,!0);default:return!1}}function lo(e){return 0!=(1&e.mode)&&0==(128&e.flags)}function co(e){if(io){var t=ro;if(t){var n=t;if(!so(e,t)){if(lo(e))throw Error(o(418));t=ci(n.nextSibling);var r=no;t&&so(e,t)?ao(r,n):(e.flags=-4097&e.flags|2,io=!1,no=e)}}else{if(lo(e))throw Error(o(418));e.flags=-4097&e.flags|2,io=!1,no=e}}}function uo(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;no=e}function ho(e){if(e!==no)return!1;if(!io)return uo(e),io=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!ni(e.type,e.memoizedProps)),t&&(t=ro)){if(lo(e))throw fo(),Error(o(418));for(;t;)ao(e,t),t=ci(t.nextSibling)}if(uo(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(o(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){ro=ci(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}ro=null}}else ro=no?ci(e.stateNode.nextSibling):null;return!0}function fo(){for(var e=ro;e;)e=ci(e.nextSibling)}function po(){ro=no=null,io=!1}function mo(e){null===oo?oo=[e]:oo.push(e)}var go=w.ReactCurrentBatchConfig;function vo(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(o(309));var r=n.stateNode}if(!r)throw Error(o(147,e));var i=r,a=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===a?t.ref:(t=function(e){var t=i.refs;null===e?delete t[a]:t[a]=e},t._stringRef=a,t)}if("string"!=typeof e)throw Error(o(284));if(!n._owner)throw Error(o(290,e))}return e}function yo(e,t){throw e=Object.prototype.toString.call(t),Error(o(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function bo(e){return(0,e._init)(e._payload)}function wo(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=Rc(e,t)).index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function s(t){return e&&null===t.alternate&&(t.flags|=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=$c(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function c(e,t,n,r){var o=n.type;return o===x?d(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===o||"object"==typeof o&&null!==o&&o.$$typeof===D&&bo(o)===t.type)?((r=i(t,n.props)).ref=vo(e,t,n),r.return=e,r):((r=Lc(n.type,n.key,n.props,null,e.mode,r)).ref=vo(e,t,n),r.return=e,r)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=zc(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function d(e,t,n,r,o){return null===t||7!==t.tag?((t=Pc(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function h(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=$c(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case _:return(n=Lc(t.type,t.key,t.props,null,e.mode,n)).ref=vo(e,null,t),n.return=e,n;case E:return(t=zc(t,e.mode,n)).return=e,t;case D:return h(e,(0,t._init)(t._payload),n)}if(te(t)||P(t))return(t=Pc(t,e.mode,n,null)).return=e,t;yo(e,t)}return null}function f(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==i?null:l(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case _:return n.key===i?c(e,t,n,r):null;case E:return n.key===i?u(e,t,n,r):null;case D:return f(e,t,(i=n._init)(n._payload),r)}if(te(n)||P(n))return null!==i?null:d(e,t,n,r,null);yo(e,n)}return null}function p(e,t,n,r,i){if("string"==typeof r&&""!==r||"number"==typeof r)return l(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case _:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i);case E:return u(t,e=e.get(null===r.key?n:r.key)||null,r,i);case D:return p(e,t,n,(0,r._init)(r._payload),i)}if(te(r)||P(r))return d(t,e=e.get(n)||null,r,i,null);yo(t,r)}return null}function m(i,o,s,l){for(var c=null,u=null,d=o,m=o=0,g=null;null!==d&&m<s.length;m++){d.index>m?(g=d,d=null):g=d.sibling;var v=f(i,d,s[m],l);if(null===v){null===d&&(d=g);break}e&&d&&null===v.alternate&&t(i,d),o=a(v,o,m),null===u?c=v:u.sibling=v,u=v,d=g}if(m===s.length)return n(i,d),io&&Qi(i,m),c;if(null===d){for(;m<s.length;m++)null!==(d=h(i,s[m],l))&&(o=a(d,o,m),null===u?c=d:u.sibling=d,u=d);return io&&Qi(i,m),c}for(d=r(i,d);m<s.length;m++)null!==(g=p(d,i,m,s[m],l))&&(e&&null!==g.alternate&&d.delete(null===g.key?m:g.key),o=a(g,o,m),null===u?c=g:u.sibling=g,u=g);return e&&d.forEach((function(e){return t(i,e)})),io&&Qi(i,m),c}function g(i,s,l,c){var u=P(l);if("function"!=typeof u)throw Error(o(150));if(null==(l=u.call(l)))throw Error(o(151));for(var d=u=null,m=s,g=s=0,v=null,y=l.next();null!==m&&!y.done;g++,y=l.next()){m.index>g?(v=m,m=null):v=m.sibling;var b=f(i,m,y.value,c);if(null===b){null===m&&(m=v);break}e&&m&&null===b.alternate&&t(i,m),s=a(b,s,g),null===d?u=b:d.sibling=b,d=b,m=v}if(y.done)return n(i,m),io&&Qi(i,g),u;if(null===m){for(;!y.done;g++,y=l.next())null!==(y=h(i,y.value,c))&&(s=a(y,s,g),null===d?u=y:d.sibling=y,d=y);return io&&Qi(i,g),u}for(m=r(i,m);!y.done;g++,y=l.next())null!==(y=p(m,i,g,y.value,c))&&(e&&null!==y.alternate&&m.delete(null===y.key?g:y.key),s=a(y,s,g),null===d?u=y:d.sibling=y,d=y);return e&&m.forEach((function(e){return t(i,e)})),io&&Qi(i,g),u}return function e(r,o,a,l){if("object"==typeof a&&null!==a&&a.type===x&&null===a.key&&(a=a.props.children),"object"==typeof a&&null!==a){switch(a.$$typeof){case _:e:{for(var c=a.key,u=o;null!==u;){if(u.key===c){if((c=a.type)===x){if(7===u.tag){n(r,u.sibling),(o=i(u,a.props.children)).return=r,r=o;break e}}else if(u.elementType===c||"object"==typeof c&&null!==c&&c.$$typeof===D&&bo(c)===u.type){n(r,u.sibling),(o=i(u,a.props)).ref=vo(r,u,a),o.return=r,r=o;break e}n(r,u);break}t(r,u),u=u.sibling}a.type===x?((o=Pc(a.props.children,r.mode,l,a.key)).return=r,r=o):((l=Lc(a.type,a.key,a.props,null,r.mode,l)).ref=vo(r,o,a),l.return=r,r=l)}return s(r);case E:e:{for(u=a.key;null!==o;){if(o.key===u){if(4===o.tag&&o.stateNode.containerInfo===a.containerInfo&&o.stateNode.implementation===a.implementation){n(r,o.sibling),(o=i(o,a.children||[])).return=r,r=o;break e}n(r,o);break}t(r,o),o=o.sibling}(o=zc(a,r.mode,l)).return=r,r=o}return s(r);case D:return e(r,o,(u=a._init)(a._payload),l)}if(te(a))return m(r,o,a,l);if(P(a))return g(r,o,a,l);yo(r,a)}return"string"==typeof a&&""!==a||"number"==typeof a?(a=""+a,null!==o&&6===o.tag?(n(r,o.sibling),(o=i(o,a)).return=r,r=o):(n(r,o),(o=$c(a,r.mode,l)).return=r,r=o),s(r)):n(r,o)}}var _o=wo(!0),Eo=wo(!1),xo=Si(null),So=null,To=null,Oo=null;function Ao(){Oo=To=So=null}function Co(e){var t=xo.current;Ti(xo),e._currentValue=t}function ko(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Mo(e,t){So=e,Oo=To=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&t)&&(bs=!0),e.firstContext=null)}function No(e){var t=e._currentValue;if(Oo!==e)if(e={context:e,memoizedValue:t,next:null},null===To){if(null===So)throw Error(o(308));To=e,So.dependencies={lanes:0,firstContext:e}}else To=To.next=e;return t}var Do=null;function Ro(e){null===Do?Do=[e]:Do.push(e)}function Lo(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,Ro(t)):(n.next=i.next,i.next=n),t.interleaved=n,Po(e,r)}function Po(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Io=!1;function $o(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function zo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Bo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function jo(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!=(2&Cl)){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Po(e,n)}return null===(i=r.interleaved)?(t.next=t,Ro(r)):(t.next=i.next,i.next=t),r.interleaved=t,Po(e,n)}function Fo(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!=(4194240&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,yt(e,n)}}function Uo(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?i=o=a:o=o.next=a,n=n.next}while(null!==n);null===o?i=o=t:o=o.next=t}else i=o=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ho(e,t,n,r){var i=e.updateQueue;Io=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(null!==s){i.shared.pending=null;var l=s,c=l.next;l.next=null,null===a?o=c:a.next=c,a=l;var u=e.alternate;null!==u&&(s=(u=u.updateQueue).lastBaseUpdate)!==a&&(null===s?u.firstBaseUpdate=c:s.next=c,u.lastBaseUpdate=l)}if(null!==o){var d=i.baseState;for(a=0,u=c=l=null,s=o;;){var h=s.lane,f=s.eventTime;if((r&h)===h){null!==u&&(u=u.next={eventTime:f,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var p=e,m=s;switch(h=t,f=n,m.tag){case 1:if("function"==typeof(p=m.payload)){d=p.call(f,d,h);break e}d=p;break e;case 3:p.flags=-65537&p.flags|128;case 0:if(null==(h="function"==typeof(p=m.payload)?p.call(f,d,h):p))break e;d=$({},d,h);break e;case 2:Io=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(h=i.effects)?i.effects=[s]:h.push(s))}else f={eventTime:f,lane:h,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===u?(c=u=f,l=d):u=u.next=f,a|=h;if(null===(s=s.next)){if(null===(s=i.shared.pending))break;s=(h=s).next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}if(null===u&&(l=d),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,null!==(t=i.shared.interleaved)){i=t;do{a|=i.lane,i=i.next}while(i!==t)}else null===o&&(i.shared.lanes=0);Il|=a,e.lanes=a,e.memoizedState=d}}function Vo(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!=typeof i)throw Error(o(191,i));i.call(r)}}}var Zo={},Wo=Si(Zo),Go=Si(Zo),qo=Si(Zo);function Yo(e){if(e===Zo)throw Error(o(174));return e}function Ko(e,t){switch(Oi(qo,t),Oi(Go,e),Oi(Wo,Zo),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:le(null,"");break;default:t=le(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Ti(Wo),Oi(Wo,t)}function Xo(){Ti(Wo),Ti(Go),Ti(qo)}function Qo(e){Yo(qo.current);var t=Yo(Wo.current),n=le(t,e.type);t!==n&&(Oi(Go,e),Oi(Wo,n))}function Jo(e){Go.current===e&&(Ti(Wo),Ti(Go))}var ea=Si(0);function ta(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var na=[];function ra(){for(var e=0;e<na.length;e++)na[e]._workInProgressVersionPrimary=null;na.length=0}var ia=w.ReactCurrentDispatcher,oa=w.ReactCurrentBatchConfig,aa=0,sa=null,la=null,ca=null,ua=!1,da=!1,ha=0,fa=0;function pa(){throw Error(o(321))}function ma(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!sr(e[n],t[n]))return!1;return!0}function ga(e,t,n,r,i,a){if(aa=a,sa=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ia.current=null===e||null===e.memoizedState?Ja:es,e=n(r,i),da){a=0;do{if(da=!1,ha=0,25<=a)throw Error(o(301));a+=1,ca=la=null,t.updateQueue=null,ia.current=ts,e=n(r,i)}while(da)}if(ia.current=Qa,t=null!==la&&null!==la.next,aa=0,ca=la=sa=null,ua=!1,t)throw Error(o(300));return e}function va(){var e=0!==ha;return ha=0,e}function ya(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ca?sa.memoizedState=ca=e:ca=ca.next=e,ca}function ba(){if(null===la){var e=sa.alternate;e=null!==e?e.memoizedState:null}else e=la.next;var t=null===ca?sa.memoizedState:ca.next;if(null!==t)ca=t,la=e;else{if(null===e)throw Error(o(310));e={memoizedState:(la=e).memoizedState,baseState:la.baseState,baseQueue:la.baseQueue,queue:la.queue,next:null},null===ca?sa.memoizedState=ca=e:ca=ca.next=e}return ca}function wa(e,t){return"function"==typeof t?t(e):t}function _a(e){var t=ba(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=la,i=r.baseQueue,a=n.pending;if(null!==a){if(null!==i){var s=i.next;i.next=a.next,a.next=s}r.baseQueue=i=a,n.pending=null}if(null!==i){a=i.next,r=r.baseState;var l=s=null,c=null,u=a;do{var d=u.lane;if((aa&d)===d)null!==c&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var h={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};null===c?(l=c=h,s=r):c=c.next=h,sa.lanes|=d,Il|=d}u=u.next}while(null!==u&&u!==a);null===c?s=r:c.next=l,sr(r,t.memoizedState)||(bs=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=c,n.lastRenderedState=r}if(null!==(e=n.interleaved)){i=e;do{a=i.lane,sa.lanes|=a,Il|=a,i=i.next}while(i!==e)}else null===i&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Ea(e){var t=ba(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,a=t.memoizedState;if(null!==i){n.pending=null;var s=i=i.next;do{a=e(a,s.action),s=s.next}while(s!==i);sr(a,t.memoizedState)||(bs=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function xa(){}function Sa(e,t){var n=sa,r=ba(),i=t(),a=!sr(r.memoizedState,i);if(a&&(r.memoizedState=i,bs=!0),r=r.queue,Ia(Aa.bind(null,n,r,e),[e]),r.getSnapshot!==t||a||null!==ca&&1&ca.memoizedState.tag){if(n.flags|=2048,Na(9,Oa.bind(null,n,r,i,t),void 0,null),null===kl)throw Error(o(349));0!=(30&aa)||Ta(n,t,i)}return i}function Ta(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=sa.updateQueue)?(t={lastEffect:null,stores:null},sa.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Oa(e,t,n,r){t.value=n,t.getSnapshot=r,Ca(t)&&ka(e)}function Aa(e,t,n){return n((function(){Ca(t)&&ka(e)}))}function Ca(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!sr(e,n)}catch(e){return!0}}function ka(e){var t=Po(e,1);null!==t&&nc(t,e,1,-1)}function Ma(e){var t=ya();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:wa,lastRenderedState:e},t.queue=e,e=e.dispatch=qa.bind(null,sa,e),[t.memoizedState,e]}function Na(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=sa.updateQueue)?(t={lastEffect:null,stores:null},sa.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Da(){return ba().memoizedState}function Ra(e,t,n,r){var i=ya();sa.flags|=e,i.memoizedState=Na(1|t,n,void 0,void 0===r?null:r)}function La(e,t,n,r){var i=ba();r=void 0===r?null:r;var o=void 0;if(null!==la){var a=la.memoizedState;if(o=a.destroy,null!==r&&ma(r,a.deps))return void(i.memoizedState=Na(t,n,o,r))}sa.flags|=e,i.memoizedState=Na(1|t,n,o,r)}function Pa(e,t){return Ra(8390656,8,e,t)}function Ia(e,t){return La(2048,8,e,t)}function $a(e,t){return La(4,2,e,t)}function za(e,t){return La(4,4,e,t)}function Ba(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function ja(e,t,n){return n=null!=n?n.concat([e]):null,La(4,4,Ba.bind(null,t,e),n)}function Fa(){}function Ua(e,t){var n=ba();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ma(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ha(e,t){var n=ba();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ma(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Va(e,t,n){return 0==(21&aa)?(e.baseState&&(e.baseState=!1,bs=!0),e.memoizedState=n):(sr(n,t)||(n=mt(),sa.lanes|=n,Il|=n,e.baseState=!0),t)}function Za(e,t){var n=bt;bt=0!==n&&4>n?n:4,e(!0);var r=oa.transition;oa.transition={};try{e(!1),t()}finally{bt=n,oa.transition=r}}function Wa(){return ba().memoizedState}function Ga(e,t,n){var r=tc(e);n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ya(e)?Ka(t,n):null!==(n=Lo(e,t,n,r))&&(nc(n,e,r,ec()),Xa(n,t,r))}function qa(e,t,n){var r=tc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ya(e))Ka(t,i);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,sr(s,a)){var l=t.interleaved;return null===l?(i.next=i,Ro(t)):(i.next=l.next,l.next=i),void(t.interleaved=i)}}catch(e){}null!==(n=Lo(e,t,i,r))&&(nc(n,e,r,i=ec()),Xa(n,t,r))}}function Ya(e){var t=e.alternate;return e===sa||null!==t&&t===sa}function Ka(e,t){da=ua=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Xa(e,t,n){if(0!=(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,yt(e,n)}}var Qa={readContext:No,useCallback:pa,useContext:pa,useEffect:pa,useImperativeHandle:pa,useInsertionEffect:pa,useLayoutEffect:pa,useMemo:pa,useReducer:pa,useRef:pa,useState:pa,useDebugValue:pa,useDeferredValue:pa,useTransition:pa,useMutableSource:pa,useSyncExternalStore:pa,useId:pa,unstable_isNewReconciler:!1},Ja={readContext:No,useCallback:function(e,t){return ya().memoizedState=[e,void 0===t?null:t],e},useContext:No,useEffect:Pa,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Ra(4194308,4,Ba.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ra(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ra(4,2,e,t)},useMemo:function(e,t){var n=ya();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ya();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Ga.bind(null,sa,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},ya().memoizedState=e},useState:Ma,useDebugValue:Fa,useDeferredValue:function(e){return ya().memoizedState=e},useTransition:function(){var e=Ma(!1),t=e[0];return e=Za.bind(null,e[1]),ya().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=sa,i=ya();if(io){if(void 0===n)throw Error(o(407));n=n()}else{if(n=t(),null===kl)throw Error(o(349));0!=(30&aa)||Ta(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,Pa(Aa.bind(null,r,a,e),[e]),r.flags|=2048,Na(9,Oa.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=ya(),t=kl.identifierPrefix;if(io){var n=Xi;t=":"+t+"R"+(n=(Ki&~(1<<32-at(Ki)-1)).toString(32)+n),0<(n=ha++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=fa++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},es={readContext:No,useCallback:Ua,useContext:No,useEffect:Ia,useImperativeHandle:ja,useInsertionEffect:$a,useLayoutEffect:za,useMemo:Ha,useReducer:_a,useRef:Da,useState:function(){return _a(wa)},useDebugValue:Fa,useDeferredValue:function(e){return Va(ba(),la.memoizedState,e)},useTransition:function(){return[_a(wa)[0],ba().memoizedState]},useMutableSource:xa,useSyncExternalStore:Sa,useId:Wa,unstable_isNewReconciler:!1},ts={readContext:No,useCallback:Ua,useContext:No,useEffect:Ia,useImperativeHandle:ja,useInsertionEffect:$a,useLayoutEffect:za,useMemo:Ha,useReducer:Ea,useRef:Da,useState:function(){return Ea(wa)},useDebugValue:Fa,useDeferredValue:function(e){var t=ba();return null===la?t.memoizedState=e:Va(t,la.memoizedState,e)},useTransition:function(){return[Ea(wa)[0],ba().memoizedState]},useMutableSource:xa,useSyncExternalStore:Sa,useId:Wa,unstable_isNewReconciler:!1};function ns(e,t){if(e&&e.defaultProps){for(var n in t=$({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function rs(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:$({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var is={isMounted:function(e){return!!(e=e._reactInternals)&&Ue(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ec(),i=tc(e),o=Bo(r,i);o.payload=t,null!=n&&(o.callback=n),null!==(t=jo(e,o,i))&&(nc(t,e,i,r),Fo(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ec(),i=tc(e),o=Bo(r,i);o.tag=1,o.payload=t,null!=n&&(o.callback=n),null!==(t=jo(e,o,i))&&(nc(t,e,i,r),Fo(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ec(),r=tc(e),i=Bo(n,r);i.tag=2,null!=t&&(i.callback=t),null!==(t=jo(e,i,r))&&(nc(t,e,r,n),Fo(t,e,r))}};function os(e,t,n,r,i,o,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!(t.prototype&&t.prototype.isPureReactComponent&&lr(n,r)&&lr(i,o))}function as(e,t,n){var r=!1,i=Ai,o=t.contextType;return"object"==typeof o&&null!==o?o=No(o):(i=Di(t)?Mi:Ci.current,o=(r=null!=(r=t.contextTypes))?Ni(e,i):Ai),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=is,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function ss(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&is.enqueueReplaceState(t,t.state,null)}function ls(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},$o(e);var o=t.contextType;"object"==typeof o&&null!==o?i.context=No(o):(o=Di(t)?Mi:Ci.current,i.context=Ni(e,o)),i.state=e.memoizedState,"function"==typeof(o=t.getDerivedStateFromProps)&&(rs(e,t,o,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&is.enqueueReplaceState(i,i.state,null),Ho(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.flags|=4194308)}function cs(e,t){try{var n="",r=t;do{n+=F(r),r=r.return}while(r);var i=n}catch(e){i="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:i,digest:null}}function us(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function ds(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}var hs="function"==typeof WeakMap?WeakMap:Map;function fs(e,t,n){(n=Bo(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Vl||(Vl=!0,Zl=r),ds(0,t)},n}function ps(e,t,n){(n=Bo(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){ds(0,t)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){ds(0,t),"function"!=typeof r&&(null===Wl?Wl=new Set([this]):Wl.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function ms(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new hs;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Tc.bind(null,e,t,n),t.then(e,e))}function gs(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function vs(e,t,n,r,i){return 0==(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Bo(-1,1)).tag=2,jo(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var ys=w.ReactCurrentOwner,bs=!1;function ws(e,t,n,r){t.child=null===e?Eo(t,null,n,r):_o(t,e.child,n,r)}function _s(e,t,n,r,i){n=n.render;var o=t.ref;return Mo(t,i),r=ga(e,t,n,r,o,i),n=va(),null===e||bs?(io&&n&&eo(t),t.flags|=1,ws(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Vs(e,t,i))}function Es(e,t,n,r,i){if(null===e){var o=n.type;return"function"!=typeof o||Dc(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Lc(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,xs(e,t,o,r,i))}if(o=e.child,0==(e.lanes&i)){var a=o.memoizedProps;if((n=null!==(n=n.compare)?n:lr)(a,r)&&e.ref===t.ref)return Vs(e,t,i)}return t.flags|=1,(e=Rc(o,r)).ref=t.ref,e.return=t,t.child=e}function xs(e,t,n,r,i){if(null!==e){var o=e.memoizedProps;if(lr(o,r)&&e.ref===t.ref){if(bs=!1,t.pendingProps=r=o,0==(e.lanes&i))return t.lanes=e.lanes,Vs(e,t,i);0!=(131072&e.flags)&&(bs=!0)}}return Os(e,t,n,r,i)}function Ss(e,t,n){var r=t.pendingProps,i=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0==(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Oi(Rl,Dl),Dl|=n;else{if(0==(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Oi(Rl,Dl),Dl|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==o?o.baseLanes:n,Oi(Rl,Dl),Dl|=r}else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,Oi(Rl,Dl),Dl|=r;return ws(e,t,i,n),t.child}function Ts(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Os(e,t,n,r,i){var o=Di(n)?Mi:Ci.current;return o=Ni(t,o),Mo(t,i),n=ga(e,t,n,r,o,i),r=va(),null===e||bs?(io&&r&&eo(t),t.flags|=1,ws(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Vs(e,t,i))}function As(e,t,n,r,i){if(Di(n)){var o=!0;Ii(t)}else o=!1;if(Mo(t,i),null===t.stateNode)Hs(e,t),as(t,n,r),ls(t,n,r,i),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,c=n.contextType;c="object"==typeof c&&null!==c?No(c):Ni(t,c=Di(n)?Mi:Ci.current);var u=n.getDerivedStateFromProps,d="function"==typeof u||"function"==typeof a.getSnapshotBeforeUpdate;d||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||l!==c)&&ss(t,a,r,c),Io=!1;var h=t.memoizedState;a.state=h,Ho(t,r,a,i),l=t.memoizedState,s!==r||h!==l||ki.current||Io?("function"==typeof u&&(rs(t,n,u,r),l=t.memoizedState),(s=Io||os(t,n,s,r,h,l,c))?(d||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.flags|=4194308)):("function"==typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=c,r=s):("function"==typeof a.componentDidMount&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,zo(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:ns(t.type,s),a.props=c,d=t.pendingProps,h=a.context,l="object"==typeof(l=n.contextType)&&null!==l?No(l):Ni(t,l=Di(n)?Mi:Ci.current);var f=n.getDerivedStateFromProps;(u="function"==typeof f||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==d||h!==l)&&ss(t,a,r,l),Io=!1,h=t.memoizedState,a.state=h,Ho(t,r,a,i);var p=t.memoizedState;s!==d||h!==p||ki.current||Io?("function"==typeof f&&(rs(t,n,f,r),p=t.memoizedState),(c=Io||os(t,n,c,r,h,p,l)||!1)?(u||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,p,l),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,p,l)),"function"==typeof a.componentDidUpdate&&(t.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=l,r=c):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Cs(e,t,n,r,o,i)}function Cs(e,t,n,r,i,o){Ts(e,t);var a=0!=(128&t.flags);if(!r&&!a)return i&&$i(t,n,!1),Vs(e,t,o);r=t.stateNode,ys.current=t;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=_o(t,e.child,null,o),t.child=_o(t,null,s,o)):ws(e,t,s,o),t.memoizedState=r.state,i&&$i(t,n,!0),t.child}function ks(e){var t=e.stateNode;t.pendingContext?Li(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Li(0,t.context,!1),Ko(e,t.containerInfo)}function Ms(e,t,n,r,i){return po(),mo(i),t.flags|=256,ws(e,t,n,r),t.child}var Ns,Ds,Rs,Ls,Ps={dehydrated:null,treeContext:null,retryLane:0};function Is(e){return{baseLanes:e,cachePool:null,transitions:null}}function $s(e,t,n){var r,i=t.pendingProps,a=ea.current,s=!1,l=0!=(128&t.flags);if((r=l)||(r=(null===e||null!==e.memoizedState)&&0!=(2&a)),r?(s=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(a|=1),Oi(ea,1&a),null===e)return co(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0==(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(l=i.children,e=i.fallback,s?(i=t.mode,s=t.child,l={mode:"hidden",children:l},0==(1&i)&&null!==s?(s.childLanes=0,s.pendingProps=l):s=Ic(l,i,0,null),e=Pc(e,i,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Is(n),t.memoizedState=Ps,e):zs(t,l));if(null!==(a=e.memoizedState)&&null!==(r=a.dehydrated))return function(e,t,n,r,i,a,s){if(n)return 256&t.flags?(t.flags&=-257,Bs(e,t,s,r=us(Error(o(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(a=r.fallback,i=t.mode,r=Ic({mode:"visible",children:r.children},i,0,null),(a=Pc(a,i,s,null)).flags|=2,r.return=t,a.return=t,r.sibling=a,t.child=r,0!=(1&t.mode)&&_o(t,e.child,null,s),t.child.memoizedState=Is(s),t.memoizedState=Ps,a);if(0==(1&t.mode))return Bs(e,t,s,null);if("$!"===i.data){if(r=i.nextSibling&&i.nextSibling.dataset)var l=r.dgst;return r=l,Bs(e,t,s,r=us(a=Error(o(419)),r,void 0))}if(l=0!=(s&e.childLanes),bs||l){if(null!==(r=kl)){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}0!==(i=0!=(i&(r.suspendedLanes|s))?0:i)&&i!==a.retryLane&&(a.retryLane=i,Po(e,i),nc(r,e,i,-1))}return mc(),Bs(e,t,s,r=us(Error(o(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=Ac.bind(null,e),i._reactRetry=t,null):(e=a.treeContext,ro=ci(i.nextSibling),no=t,io=!0,oo=null,null!==e&&(Gi[qi++]=Ki,Gi[qi++]=Xi,Gi[qi++]=Yi,Ki=e.id,Xi=e.overflow,Yi=t),(t=zs(t,r.children)).flags|=4096,t)}(e,t,l,i,r,a,n);if(s){s=i.fallback,l=t.mode,r=(a=e.child).sibling;var c={mode:"hidden",children:i.children};return 0==(1&l)&&t.child!==a?((i=t.child).childLanes=0,i.pendingProps=c,t.deletions=null):(i=Rc(a,c)).subtreeFlags=14680064&a.subtreeFlags,null!==r?s=Rc(r,s):(s=Pc(s,l,n,null)).flags|=2,s.return=t,i.return=t,i.sibling=s,t.child=i,i=s,s=t.child,l=null===(l=e.child.memoizedState)?Is(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},s.memoizedState=l,s.childLanes=e.childLanes&~n,t.memoizedState=Ps,i}return e=(s=e.child).sibling,i=Rc(s,{mode:"visible",children:i.children}),0==(1&t.mode)&&(i.lanes=n),i.return=t,i.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=i,t.memoizedState=null,i}function zs(e,t){return(t=Ic({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Bs(e,t,n,r){return null!==r&&mo(r),_o(t,e.child,null,n),(e=zs(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function js(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),ko(e.return,t,n)}function Fs(e,t,n,r,i){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function Us(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(ws(e,t,r.children,n),0!=(2&(r=ea.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!=(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&js(e,n,t);else if(19===e.tag)js(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Oi(ea,r),0==(1&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===ta(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Fs(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===ta(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Fs(t,!0,n,null,o);break;case"together":Fs(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Hs(e,t){0==(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Vs(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Il|=t.lanes,0==(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(o(153));if(null!==t.child){for(n=Rc(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Rc(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Zs(e,t){if(!io)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ws(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Gs(e,t,n){var r=t.pendingProps;switch(to(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ws(t),null;case 1:case 17:return Di(t.type)&&Ri(),Ws(t),null;case 3:return r=t.stateNode,Xo(),Ti(ki),Ti(Ci),ra(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(ho(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0==(256&t.flags)||(t.flags|=1024,null!==oo&&(ac(oo),oo=null))),Ds(e,t),Ws(t),null;case 5:Jo(t);var i=Yo(qo.current);if(n=t.type,null!==e&&null!=t.stateNode)Rs(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(o(166));return Ws(t),null}if(e=Yo(Wo.current),ho(t)){r=t.stateNode,n=t.type;var a=t.memoizedProps;switch(r[hi]=t,r[fi]=a,e=0!=(1&t.mode),n){case"dialog":Br("cancel",r),Br("close",r);break;case"iframe":case"object":case"embed":Br("load",r);break;case"video":case"audio":for(i=0;i<Pr.length;i++)Br(Pr[i],r);break;case"source":Br("error",r);break;case"img":case"image":case"link":Br("error",r),Br("load",r);break;case"details":Br("toggle",r);break;case"input":K(r,a),Br("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},Br("invalid",r);break;case"textarea":ie(r,a),Br("invalid",r)}for(var l in ye(n,a),i=null,a)if(a.hasOwnProperty(l)){var c=a[l];"children"===l?"string"==typeof c?r.textContent!==c&&(!0!==a.suppressHydrationWarning&&Qr(r.textContent,c,e),i=["children",c]):"number"==typeof c&&r.textContent!==""+c&&(!0!==a.suppressHydrationWarning&&Qr(r.textContent,c,e),i=["children",""+c]):s.hasOwnProperty(l)&&null!=c&&"onScroll"===l&&Br("scroll",r)}switch(n){case"input":W(r),J(r,a,!0);break;case"textarea":W(r),ae(r);break;case"select":case"option":break;default:"function"==typeof a.onClick&&(r.onclick=Jr)}r=i,t.updateQueue=r,null!==r&&(t.flags|=4)}else{l=9===i.nodeType?i:i.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=se(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),"select"===n&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[hi]=t,e[fi]=r,Ns(e,t,!1,!1),t.stateNode=e;e:{switch(l=be(n,r),n){case"dialog":Br("cancel",e),Br("close",e),i=r;break;case"iframe":case"object":case"embed":Br("load",e),i=r;break;case"video":case"audio":for(i=0;i<Pr.length;i++)Br(Pr[i],e);i=r;break;case"source":Br("error",e),i=r;break;case"img":case"image":case"link":Br("error",e),Br("load",e),i=r;break;case"details":Br("toggle",e),i=r;break;case"input":K(e,r),i=Y(e,r),Br("invalid",e);break;case"option":default:i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=$({},r,{value:void 0}),Br("invalid",e);break;case"textarea":ie(e,r),i=re(e,r),Br("invalid",e)}for(a in ye(n,i),c=i)if(c.hasOwnProperty(a)){var u=c[a];"style"===a?ge(e,u):"dangerouslySetInnerHTML"===a?null!=(u=u?u.__html:void 0)&&de(e,u):"children"===a?"string"==typeof u?("textarea"!==n||""!==u)&&he(e,u):"number"==typeof u&&he(e,""+u):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(s.hasOwnProperty(a)?null!=u&&"onScroll"===a&&Br("scroll",e):null!=u&&b(e,a,u,l))}switch(n){case"input":W(e),J(e,r,!1);break;case"textarea":W(e),ae(e);break;case"option":null!=r.value&&e.setAttribute("value",""+V(r.value));break;case"select":e.multiple=!!r.multiple,null!=(a=r.value)?ne(e,!!r.multiple,a,!1):null!=r.defaultValue&&ne(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof i.onClick&&(e.onclick=Jr)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Ws(t),null;case 6:if(e&&null!=t.stateNode)Ls(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(o(166));if(n=Yo(qo.current),Yo(Wo.current),ho(t)){if(r=t.stateNode,n=t.memoizedProps,r[hi]=t,(a=r.nodeValue!==n)&&null!==(e=no))switch(e.tag){case 3:Qr(r.nodeValue,n,0!=(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Qr(r.nodeValue,n,0!=(1&e.mode))}a&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[hi]=t,t.stateNode=r}return Ws(t),null;case 13:if(Ti(ea),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(io&&null!==ro&&0!=(1&t.mode)&&0==(128&t.flags))fo(),po(),t.flags|=98560,a=!1;else if(a=ho(t),null!==r&&null!==r.dehydrated){if(null===e){if(!a)throw Error(o(318));if(!(a=null!==(a=t.memoizedState)?a.dehydrated:null))throw Error(o(317));a[hi]=t}else po(),0==(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Ws(t),a=!1}else null!==oo&&(ac(oo),oo=null),a=!0;if(!a)return 65536&t.flags?t:null}return 0!=(128&t.flags)?(t.lanes=n,t):((r=null!==r)!=(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,0!=(1&t.mode)&&(null===e||0!=(1&ea.current)?0===Ll&&(Ll=3):mc())),null!==t.updateQueue&&(t.flags|=4),Ws(t),null);case 4:return Xo(),Ds(e,t),null===e&&Ur(t.stateNode.containerInfo),Ws(t),null;case 10:return Co(t.type._context),Ws(t),null;case 19:if(Ti(ea),null===(a=t.memoizedState))return Ws(t),null;if(r=0!=(128&t.flags),null===(l=a.rendering))if(r)Zs(a,!1);else{if(0!==Ll||null!==e&&0!=(128&e.flags))for(e=t.child;null!==e;){if(null!==(l=ta(e))){for(t.flags|=128,Zs(a,!1),null!==(r=l.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(a=n).flags&=14680066,null===(l=a.alternate)?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=l.childLanes,a.lanes=l.lanes,a.child=l.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=l.memoizedProps,a.memoizedState=l.memoizedState,a.updateQueue=l.updateQueue,a.type=l.type,e=l.dependencies,a.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Oi(ea,1&ea.current|2),t.child}e=e.sibling}null!==a.tail&&Xe()>Ul&&(t.flags|=128,r=!0,Zs(a,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=ta(l))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Zs(a,!0),null===a.tail&&"hidden"===a.tailMode&&!l.alternate&&!io)return Ws(t),null}else 2*Xe()-a.renderingStartTime>Ul&&1073741824!==n&&(t.flags|=128,r=!0,Zs(a,!1),t.lanes=4194304);a.isBackwards?(l.sibling=t.child,t.child=l):(null!==(n=a.last)?n.sibling=l:t.child=l,a.last=l)}return null!==a.tail?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Xe(),t.sibling=null,n=ea.current,Oi(ea,r?1&n|2:1&n),t):(Ws(t),null);case 22:case 23:return dc(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!=(1&t.mode)?0!=(1073741824&Dl)&&(Ws(t),6&t.subtreeFlags&&(t.flags|=8192)):Ws(t),null;case 24:case 25:return null}throw Error(o(156,t.tag))}function qs(e,t){switch(to(t),t.tag){case 1:return Di(t.type)&&Ri(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Xo(),Ti(ki),Ti(Ci),ra(),0!=(65536&(e=t.flags))&&0==(128&e)?(t.flags=-65537&e|128,t):null;case 5:return Jo(t),null;case 13:if(Ti(ea),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(o(340));po()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Ti(ea),null;case 4:return Xo(),null;case 10:return Co(t.type._context),null;case 22:case 23:return dc(),null;default:return null}}Ns=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ds=function(){},Rs=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Yo(Wo.current);var o,a=null;switch(n){case"input":i=Y(e,i),r=Y(e,r),a=[];break;case"select":i=$({},i,{value:void 0}),r=$({},r,{value:void 0}),a=[];break;case"textarea":i=re(e,i),r=re(e,r),a=[];break;default:"function"!=typeof i.onClick&&"function"==typeof r.onClick&&(e.onclick=Jr)}for(u in ye(n,r),n=null,i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&null!=i[u])if("style"===u){var l=i[u];for(o in l)l.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else"dangerouslySetInnerHTML"!==u&&"children"!==u&&"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(s.hasOwnProperty(u)?a||(a=[]):(a=a||[]).push(u,null));for(u in r){var c=r[u];if(l=null!=i?i[u]:void 0,r.hasOwnProperty(u)&&c!==l&&(null!=c||null!=l))if("style"===u)if(l){for(o in l)!l.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in c)c.hasOwnProperty(o)&&l[o]!==c[o]&&(n||(n={}),n[o]=c[o])}else n||(a||(a=[]),a.push(u,n)),n=c;else"dangerouslySetInnerHTML"===u?(c=c?c.__html:void 0,l=l?l.__html:void 0,null!=c&&l!==c&&(a=a||[]).push(u,c)):"children"===u?"string"!=typeof c&&"number"!=typeof c||(a=a||[]).push(u,""+c):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&(s.hasOwnProperty(u)?(null!=c&&"onScroll"===u&&Br("scroll",e),a||l===c||(a=[])):(a=a||[]).push(u,c))}n&&(a=a||[]).push("style",n);var u=a;(t.updateQueue=u)&&(t.flags|=4)}},Ls=function(e,t,n,r){n!==r&&(t.flags|=4)};var Ys=!1,Ks=!1,Xs="function"==typeof WeakSet?WeakSet:Set,Qs=null;function Js(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){Sc(e,t,n)}else n.current=null}function el(e,t,n){try{n()}catch(n){Sc(e,t,n)}}var tl=!1;function nl(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,void 0!==o&&el(t,n,o)}i=i.next}while(i!==r)}}function rl(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function il(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function ol(e){var t=e.alternate;null!==t&&(e.alternate=null,ol(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&null!==(t=e.stateNode)&&(delete t[hi],delete t[fi],delete t[mi],delete t[gi],delete t[vi]),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function al(e){return 5===e.tag||3===e.tag||4===e.tag}function sl(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||al(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function ll(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Jr));else if(4!==r&&null!==(e=e.child))for(ll(e,t,n),e=e.sibling;null!==e;)ll(e,t,n),e=e.sibling}function cl(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(cl(e,t,n),e=e.sibling;null!==e;)cl(e,t,n),e=e.sibling}var ul=null,dl=!1;function hl(e,t,n){for(n=n.child;null!==n;)fl(e,t,n),n=n.sibling}function fl(e,t,n){if(ot&&"function"==typeof ot.onCommitFiberUnmount)try{ot.onCommitFiberUnmount(it,n)}catch(e){}switch(n.tag){case 5:Ks||Js(n,t);case 6:var r=ul,i=dl;ul=null,hl(e,t,n),dl=i,null!==(ul=r)&&(dl?(e=ul,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):ul.removeChild(n.stateNode));break;case 18:null!==ul&&(dl?(e=ul,n=n.stateNode,8===e.nodeType?li(e.parentNode,n):1===e.nodeType&&li(e,n),Ut(e)):li(ul,n.stateNode));break;case 4:r=ul,i=dl,ul=n.stateNode.containerInfo,dl=!0,hl(e,t,n),ul=r,dl=i;break;case 0:case 11:case 14:case 15:if(!Ks&&null!==(r=n.updateQueue)&&null!==(r=r.lastEffect)){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,void 0!==a&&(0!=(2&o)||0!=(4&o))&&el(n,t,a),i=i.next}while(i!==r)}hl(e,t,n);break;case 1:if(!Ks&&(Js(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){Sc(n,t,e)}hl(e,t,n);break;case 21:hl(e,t,n);break;case 22:1&n.mode?(Ks=(r=Ks)||null!==n.memoizedState,hl(e,t,n),Ks=r):hl(e,t,n);break;default:hl(e,t,n)}}function pl(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Xs),t.forEach((function(t){var r=Cc.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function ml(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r];try{var a=e,s=t,l=s;e:for(;null!==l;){switch(l.tag){case 5:ul=l.stateNode,dl=!1;break e;case 3:case 4:ul=l.stateNode.containerInfo,dl=!0;break e}l=l.return}if(null===ul)throw Error(o(160));fl(a,s,i),ul=null,dl=!1;var c=i.alternate;null!==c&&(c.return=null),i.return=null}catch(e){Sc(i,t,e)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)gl(t,e),t=t.sibling}function gl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ml(t,e),vl(e),4&r){try{nl(3,e,e.return),rl(3,e)}catch(t){Sc(e,e.return,t)}try{nl(5,e,e.return)}catch(t){Sc(e,e.return,t)}}break;case 1:ml(t,e),vl(e),512&r&&null!==n&&Js(n,n.return);break;case 5:if(ml(t,e),vl(e),512&r&&null!==n&&Js(n,n.return),32&e.flags){var i=e.stateNode;try{he(i,"")}catch(t){Sc(e,e.return,t)}}if(4&r&&null!=(i=e.stateNode)){var a=e.memoizedProps,s=null!==n?n.memoizedProps:a,l=e.type,c=e.updateQueue;if(e.updateQueue=null,null!==c)try{"input"===l&&"radio"===a.type&&null!=a.name&&X(i,a),be(l,s);var u=be(l,a);for(s=0;s<c.length;s+=2){var d=c[s],h=c[s+1];"style"===d?ge(i,h):"dangerouslySetInnerHTML"===d?de(i,h):"children"===d?he(i,h):b(i,d,h,u)}switch(l){case"input":Q(i,a);break;case"textarea":oe(i,a);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!a.multiple;var p=a.value;null!=p?ne(i,!!a.multiple,p,!1):f!==!!a.multiple&&(null!=a.defaultValue?ne(i,!!a.multiple,a.defaultValue,!0):ne(i,!!a.multiple,a.multiple?[]:"",!1))}i[fi]=a}catch(t){Sc(e,e.return,t)}}break;case 6:if(ml(t,e),vl(e),4&r){if(null===e.stateNode)throw Error(o(162));i=e.stateNode,a=e.memoizedProps;try{i.nodeValue=a}catch(t){Sc(e,e.return,t)}}break;case 3:if(ml(t,e),vl(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Ut(t.containerInfo)}catch(t){Sc(e,e.return,t)}break;case 4:default:ml(t,e),vl(e);break;case 13:ml(t,e),vl(e),8192&(i=e.child).flags&&(a=null!==i.memoizedState,i.stateNode.isHidden=a,!a||null!==i.alternate&&null!==i.alternate.memoizedState||(Fl=Xe())),4&r&&pl(e);break;case 22:if(d=null!==n&&null!==n.memoizedState,1&e.mode?(Ks=(u=Ks)||d,ml(t,e),Ks=u):ml(t,e),vl(e),8192&r){if(u=null!==e.memoizedState,(e.stateNode.isHidden=u)&&!d&&0!=(1&e.mode))for(Qs=e,d=e.child;null!==d;){for(h=Qs=d;null!==Qs;){switch(p=(f=Qs).child,f.tag){case 0:case 11:case 14:case 15:nl(4,f,f.return);break;case 1:Js(f,f.return);var m=f.stateNode;if("function"==typeof m.componentWillUnmount){r=f,n=f.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(e){Sc(r,n,e)}}break;case 5:Js(f,f.return);break;case 22:if(null!==f.memoizedState){_l(h);continue}}null!==p?(p.return=f,Qs=p):_l(h)}d=d.sibling}e:for(d=null,h=e;;){if(5===h.tag){if(null===d){d=h;try{i=h.stateNode,u?"function"==typeof(a=i.style).setProperty?a.setProperty("display","none","important"):a.display="none":(l=h.stateNode,s=null!=(c=h.memoizedProps.style)&&c.hasOwnProperty("display")?c.display:null,l.style.display=me("display",s))}catch(t){Sc(e,e.return,t)}}}else if(6===h.tag){if(null===d)try{h.stateNode.nodeValue=u?"":h.memoizedProps}catch(t){Sc(e,e.return,t)}}else if((22!==h.tag&&23!==h.tag||null===h.memoizedState||h===e)&&null!==h.child){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;null===h.sibling;){if(null===h.return||h.return===e)break e;d===h&&(d=null),h=h.return}d===h&&(d=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:ml(t,e),vl(e),4&r&&pl(e);case 21:}}function vl(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(al(n)){var r=n;break e}n=n.return}throw Error(o(160))}switch(r.tag){case 5:var i=r.stateNode;32&r.flags&&(he(i,""),r.flags&=-33),cl(e,sl(e),i);break;case 3:case 4:var a=r.stateNode.containerInfo;ll(e,sl(e),a);break;default:throw Error(o(161))}}catch(t){Sc(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function yl(e,t,n){Qs=e,bl(e,t,n)}function bl(e,t,n){for(var r=0!=(1&e.mode);null!==Qs;){var i=Qs,o=i.child;if(22===i.tag&&r){var a=null!==i.memoizedState||Ys;if(!a){var s=i.alternate,l=null!==s&&null!==s.memoizedState||Ks;s=Ys;var c=Ks;if(Ys=a,(Ks=l)&&!c)for(Qs=i;null!==Qs;)l=(a=Qs).child,22===a.tag&&null!==a.memoizedState?El(i):null!==l?(l.return=a,Qs=l):El(i);for(;null!==o;)Qs=o,bl(o,t,n),o=o.sibling;Qs=i,Ys=s,Ks=c}wl(e)}else 0!=(8772&i.subtreeFlags)&&null!==o?(o.return=i,Qs=o):wl(e)}}function wl(e){for(;null!==Qs;){var t=Qs;if(0!=(8772&t.flags)){var n=t.alternate;try{if(0!=(8772&t.flags))switch(t.tag){case 0:case 11:case 15:Ks||rl(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!Ks)if(null===n)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:ns(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;null!==a&&Vo(t,a,r);break;case 3:var s=t.updateQueue;if(null!==s){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Vo(t,s,n)}break;case 5:var l=t.stateNode;if(null===n&&4&t.flags){n=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var u=t.alternate;if(null!==u){var d=u.memoizedState;if(null!==d){var h=d.dehydrated;null!==h&&Ut(h)}}}break;default:throw Error(o(163))}Ks||512&t.flags&&il(t)}catch(e){Sc(t,t.return,e)}}if(t===e){Qs=null;break}if(null!==(n=t.sibling)){n.return=t.return,Qs=n;break}Qs=t.return}}function _l(e){for(;null!==Qs;){var t=Qs;if(t===e){Qs=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Qs=n;break}Qs=t.return}}function El(e){for(;null!==Qs;){var t=Qs;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{rl(4,t)}catch(e){Sc(t,n,e)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(e){Sc(t,i,e)}}var o=t.return;try{il(t)}catch(e){Sc(t,o,e)}break;case 5:var a=t.return;try{il(t)}catch(e){Sc(t,a,e)}}}catch(e){Sc(t,t.return,e)}if(t===e){Qs=null;break}var s=t.sibling;if(null!==s){s.return=t.return,Qs=s;break}Qs=t.return}}var xl,Sl=Math.ceil,Tl=w.ReactCurrentDispatcher,Ol=w.ReactCurrentOwner,Al=w.ReactCurrentBatchConfig,Cl=0,kl=null,Ml=null,Nl=0,Dl=0,Rl=Si(0),Ll=0,Pl=null,Il=0,$l=0,zl=0,Bl=null,jl=null,Fl=0,Ul=1/0,Hl=null,Vl=!1,Zl=null,Wl=null,Gl=!1,ql=null,Yl=0,Kl=0,Xl=null,Ql=-1,Jl=0;function ec(){return 0!=(6&Cl)?Xe():-1!==Ql?Ql:Ql=Xe()}function tc(e){return 0==(1&e.mode)?1:0!=(2&Cl)&&0!==Nl?Nl&-Nl:null!==go.transition?(0===Jl&&(Jl=mt()),Jl):0!==(e=bt)?e:e=void 0===(e=window.event)?16:Kt(e.type)}function nc(e,t,n,r){if(50<Kl)throw Kl=0,Xl=null,Error(o(185));vt(e,n,r),0!=(2&Cl)&&e===kl||(e===kl&&(0==(2&Cl)&&($l|=n),4===Ll&&sc(e,Nl)),rc(e,r),1===n&&0===Cl&&0==(1&t.mode)&&(Ul=Xe()+500,Bi&&Ui()))}function rc(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var a=31-at(o),s=1<<a,l=i[a];-1===l?0!=(s&n)&&0==(s&r)||(i[a]=ft(s,t)):l<=t&&(e.expiredLanes|=s),o&=~s}}(e,t);var r=ht(e,e===kl?Nl:0);if(0===r)null!==n&&qe(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&qe(n),1===t)0===e.tag?function(e){Bi=!0,Fi(e)}(lc.bind(null,e)):Fi(lc.bind(null,e)),ai((function(){0==(6&Cl)&&Ui()})),n=null;else{switch(wt(r)){case 1:n=Je;break;case 4:n=et;break;case 16:default:n=tt;break;case 536870912:n=rt}n=kc(n,ic.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function ic(e,t){if(Ql=-1,Jl=0,0!=(6&Cl))throw Error(o(327));var n=e.callbackNode;if(Ec()&&e.callbackNode!==n)return null;var r=ht(e,e===kl?Nl:0);if(0===r)return null;if(0!=(30&r)||0!=(r&e.expiredLanes)||t)t=gc(e,r);else{t=r;var i=Cl;Cl|=2;var a=pc();for(kl===e&&Nl===t||(Hl=null,Ul=Xe()+500,hc(e,t));;)try{yc();break}catch(t){fc(e,t)}Ao(),Tl.current=a,Cl=i,null!==Ml?t=0:(kl=null,Nl=0,t=Ll)}if(0!==t){if(2===t&&0!==(i=pt(e))&&(r=i,t=oc(e,i)),1===t)throw n=Pl,hc(e,0),sc(e,r),rc(e,Xe()),n;if(6===t)sc(e,r);else{if(i=e.current.alternate,0==(30&r)&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!sr(o(),i))return!1}catch(e){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(i)&&(2===(t=gc(e,r))&&0!==(a=pt(e))&&(r=a,t=oc(e,a)),1===t))throw n=Pl,hc(e,0),sc(e,r),rc(e,Xe()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(o(345));case 2:case 5:_c(e,jl,Hl);break;case 3:if(sc(e,r),(130023424&r)===r&&10<(t=Fl+500-Xe())){if(0!==ht(e,0))break;if(((i=e.suspendedLanes)&r)!==r){ec(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=ri(_c.bind(null,e,jl,Hl),t);break}_c(e,jl,Hl);break;case 4:if(sc(e,r),(4194240&r)===r)break;for(t=e.eventTimes,i=-1;0<r;){var s=31-at(r);a=1<<s,(s=t[s])>i&&(i=s),r&=~a}if(r=i,10<(r=(120>(r=Xe()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Sl(r/1960))-r)){e.timeoutHandle=ri(_c.bind(null,e,jl,Hl),r);break}_c(e,jl,Hl);break;default:throw Error(o(329))}}}return rc(e,Xe()),e.callbackNode===n?ic.bind(null,e):null}function oc(e,t){var n=Bl;return e.current.memoizedState.isDehydrated&&(hc(e,t).flags|=256),2!==(e=gc(e,t))&&(t=jl,jl=n,null!==t&&ac(t)),e}function ac(e){null===jl?jl=e:jl.push.apply(jl,e)}function sc(e,t){for(t&=~zl,t&=~$l,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-at(t),r=1<<n;e[n]=-1,t&=~r}}function lc(e){if(0!=(6&Cl))throw Error(o(327));Ec();var t=ht(e,0);if(0==(1&t))return rc(e,Xe()),null;var n=gc(e,t);if(0!==e.tag&&2===n){var r=pt(e);0!==r&&(t=r,n=oc(e,r))}if(1===n)throw n=Pl,hc(e,0),sc(e,t),rc(e,Xe()),n;if(6===n)throw Error(o(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,_c(e,jl,Hl),rc(e,Xe()),null}function cc(e,t){var n=Cl;Cl|=1;try{return e(t)}finally{0===(Cl=n)&&(Ul=Xe()+500,Bi&&Ui())}}function uc(e){null!==ql&&0===ql.tag&&0==(6&Cl)&&Ec();var t=Cl;Cl|=1;var n=Al.transition,r=bt;try{if(Al.transition=null,bt=1,e)return e()}finally{bt=r,Al.transition=n,0==(6&(Cl=t))&&Ui()}}function dc(){Dl=Rl.current,Ti(Rl)}function hc(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,ii(n)),null!==Ml)for(n=Ml.return;null!==n;){var r=n;switch(to(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&Ri();break;case 3:Xo(),Ti(ki),Ti(Ci),ra();break;case 5:Jo(r);break;case 4:Xo();break;case 13:case 19:Ti(ea);break;case 10:Co(r.type._context);break;case 22:case 23:dc()}n=n.return}if(kl=e,Ml=e=Rc(e.current,null),Nl=Dl=t,Ll=0,Pl=null,zl=$l=Il=0,jl=Bl=null,null!==Do){for(t=0;t<Do.length;t++)if(null!==(r=(n=Do[t]).interleaved)){n.interleaved=null;var i=r.next,o=n.pending;if(null!==o){var a=o.next;o.next=i,r.next=a}n.pending=r}Do=null}return e}function fc(e,t){for(;;){var n=Ml;try{if(Ao(),ia.current=Qa,ua){for(var r=sa.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}ua=!1}if(aa=0,ca=la=sa=null,da=!1,ha=0,Ol.current=null,null===n||null===n.return){Ll=1,Pl=t,Ml=null;break}e:{var a=e,s=n.return,l=n,c=t;if(t=Nl,l.flags|=32768,null!==c&&"object"==typeof c&&"function"==typeof c.then){var u=c,d=l,h=d.tag;if(0==(1&d.mode)&&(0===h||11===h||15===h)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var p=gs(s);if(null!==p){p.flags&=-257,vs(p,s,l,0,t),1&p.mode&&ms(a,u,t),c=u;var m=(t=p).updateQueue;if(null===m){var g=new Set;g.add(c),t.updateQueue=g}else m.add(c);break e}if(0==(1&t)){ms(a,u,t),mc();break e}c=Error(o(426))}else if(io&&1&l.mode){var v=gs(s);if(null!==v){0==(65536&v.flags)&&(v.flags|=256),vs(v,s,l,0,t),mo(cs(c,l));break e}}a=c=cs(c,l),4!==Ll&&(Ll=2),null===Bl?Bl=[a]:Bl.push(a),a=s;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t,Uo(a,fs(0,c,t));break e;case 1:l=c;var y=a.type,b=a.stateNode;if(0==(128&a.flags)&&("function"==typeof y.getDerivedStateFromError||null!==b&&"function"==typeof b.componentDidCatch&&(null===Wl||!Wl.has(b)))){a.flags|=65536,t&=-t,a.lanes|=t,Uo(a,ps(a,l,t));break e}}a=a.return}while(null!==a)}wc(n)}catch(e){t=e,Ml===n&&null!==n&&(Ml=n=n.return);continue}break}}function pc(){var e=Tl.current;return Tl.current=Qa,null===e?Qa:e}function mc(){0!==Ll&&3!==Ll&&2!==Ll||(Ll=4),null===kl||0==(268435455&Il)&&0==(268435455&$l)||sc(kl,Nl)}function gc(e,t){var n=Cl;Cl|=2;var r=pc();for(kl===e&&Nl===t||(Hl=null,hc(e,t));;)try{vc();break}catch(t){fc(e,t)}if(Ao(),Cl=n,Tl.current=r,null!==Ml)throw Error(o(261));return kl=null,Nl=0,Ll}function vc(){for(;null!==Ml;)bc(Ml)}function yc(){for(;null!==Ml&&!Ye();)bc(Ml)}function bc(e){var t=xl(e.alternate,e,Dl);e.memoizedProps=e.pendingProps,null===t?wc(e):Ml=t,Ol.current=null}function wc(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(32768&t.flags)){if(null!==(n=Gs(n,t,Dl)))return void(Ml=n)}else{if(null!==(n=qs(n,t)))return n.flags&=32767,void(Ml=n);if(null===e)return Ll=6,void(Ml=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(Ml=t);Ml=t=e}while(null!==t);0===Ll&&(Ll=5)}function _c(e,t,n){var r=bt,i=Al.transition;try{Al.transition=null,bt=1,function(e,t,n,r){do{Ec()}while(null!==ql);if(0!=(6&Cl))throw Error(o(327));n=e.finishedWork;var i=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(o(177));e.callbackNode=null,e.callbackPriority=0;var a=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-at(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}(e,a),e===kl&&(Ml=kl=null,Nl=0),0==(2064&n.subtreeFlags)&&0==(2064&n.flags)||Gl||(Gl=!0,kc(tt,(function(){return Ec(),null}))),a=0!=(15990&n.flags),0!=(15990&n.subtreeFlags)||a){a=Al.transition,Al.transition=null;var s=bt;bt=1;var l=Cl;Cl|=4,Ol.current=null,function(e,t){if(ei=Vt,fr(e=hr())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch(e){n=null;break e}var s=0,l=-1,c=-1,u=0,d=0,h=e,f=null;t:for(;;){for(var p;h!==n||0!==i&&3!==h.nodeType||(l=s+i),h!==a||0!==r&&3!==h.nodeType||(c=s+r),3===h.nodeType&&(s+=h.nodeValue.length),null!==(p=h.firstChild);)f=h,h=p;for(;;){if(h===e)break t;if(f===n&&++u===i&&(l=s),f===a&&++d===r&&(c=s),null!==(p=h.nextSibling))break;f=(h=f).parentNode}h=p}n=-1===l||-1===c?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(ti={focusedElem:e,selectionRange:n},Vt=!1,Qs=t;null!==Qs;)if(e=(t=Qs).child,0!=(1028&t.subtreeFlags)&&null!==e)e.return=t,Qs=e;else for(;null!==Qs;){t=Qs;try{var m=t.alternate;if(0!=(1024&t.flags))switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==m){var g=m.memoizedProps,v=m.memoizedState,y=t.stateNode,b=y.getSnapshotBeforeUpdate(t.elementType===t.type?g:ns(t.type,g),v);y.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var w=t.stateNode.containerInfo;1===w.nodeType?w.textContent="":9===w.nodeType&&w.documentElement&&w.removeChild(w.documentElement);break;default:throw Error(o(163))}}catch(e){Sc(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,Qs=e;break}Qs=t.return}m=tl,tl=!1}(e,n),gl(n,e),pr(ti),Vt=!!ei,ti=ei=null,e.current=n,yl(n,e,i),Ke(),Cl=l,bt=s,Al.transition=a}else e.current=n;if(Gl&&(Gl=!1,ql=e,Yl=i),0===(a=e.pendingLanes)&&(Wl=null),function(e){if(ot&&"function"==typeof ot.onCommitFiberRoot)try{ot.onCommitFiberRoot(it,e,void 0,128==(128&e.current.flags))}catch(e){}}(n.stateNode),rc(e,Xe()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)r((i=t[n]).value,{componentStack:i.stack,digest:i.digest});if(Vl)throw Vl=!1,e=Zl,Zl=null,e;0!=(1&Yl)&&0!==e.tag&&Ec(),0!=(1&(a=e.pendingLanes))?e===Xl?Kl++:(Kl=0,Xl=e):Kl=0,Ui()}(e,t,n,r)}finally{Al.transition=i,bt=r}return null}function Ec(){if(null!==ql){var e=wt(Yl),t=Al.transition,n=bt;try{if(Al.transition=null,bt=16>e?16:e,null===ql)var r=!1;else{if(e=ql,ql=null,Yl=0,0!=(6&Cl))throw Error(o(331));var i=Cl;for(Cl|=4,Qs=e.current;null!==Qs;){var a=Qs,s=a.child;if(0!=(16&Qs.flags)){var l=a.deletions;if(null!==l){for(var c=0;c<l.length;c++){var u=l[c];for(Qs=u;null!==Qs;){var d=Qs;switch(d.tag){case 0:case 11:case 15:nl(8,d,a)}var h=d.child;if(null!==h)h.return=d,Qs=h;else for(;null!==Qs;){var f=(d=Qs).sibling,p=d.return;if(ol(d),d===u){Qs=null;break}if(null!==f){f.return=p,Qs=f;break}Qs=p}}}var m=a.alternate;if(null!==m){var g=m.child;if(null!==g){m.child=null;do{var v=g.sibling;g.sibling=null,g=v}while(null!==g)}}Qs=a}}if(0!=(2064&a.subtreeFlags)&&null!==s)s.return=a,Qs=s;else e:for(;null!==Qs;){if(0!=(2048&(a=Qs).flags))switch(a.tag){case 0:case 11:case 15:nl(9,a,a.return)}var y=a.sibling;if(null!==y){y.return=a.return,Qs=y;break e}Qs=a.return}}var b=e.current;for(Qs=b;null!==Qs;){var w=(s=Qs).child;if(0!=(2064&s.subtreeFlags)&&null!==w)w.return=s,Qs=w;else e:for(s=b;null!==Qs;){if(0!=(2048&(l=Qs).flags))try{switch(l.tag){case 0:case 11:case 15:rl(9,l)}}catch(e){Sc(l,l.return,e)}if(l===s){Qs=null;break e}var _=l.sibling;if(null!==_){_.return=l.return,Qs=_;break e}Qs=l.return}}if(Cl=i,Ui(),ot&&"function"==typeof ot.onPostCommitFiberRoot)try{ot.onPostCommitFiberRoot(it,e)}catch(e){}r=!0}return r}finally{bt=n,Al.transition=t}}return!1}function xc(e,t,n){e=jo(e,t=fs(0,t=cs(n,t),1),1),t=ec(),null!==e&&(vt(e,1,t),rc(e,t))}function Sc(e,t,n){if(3===e.tag)xc(e,e,n);else for(;null!==t;){if(3===t.tag){xc(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Wl||!Wl.has(r))){t=jo(t,e=ps(t,e=cs(n,e),1),1),e=ec(),null!==t&&(vt(t,1,e),rc(t,e));break}}t=t.return}}function Tc(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=ec(),e.pingedLanes|=e.suspendedLanes&n,kl===e&&(Nl&n)===n&&(4===Ll||3===Ll&&(130023424&Nl)===Nl&&500>Xe()-Fl?hc(e,0):zl|=n),rc(e,t)}function Oc(e,t){0===t&&(0==(1&e.mode)?t=1:(t=ut,0==(130023424&(ut<<=1))&&(ut=4194304)));var n=ec();null!==(e=Po(e,t))&&(vt(e,t,n),rc(e,n))}function Ac(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Oc(e,n)}function Cc(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(o(314))}null!==r&&r.delete(t),Oc(e,n)}function kc(e,t){return Ge(e,t)}function Mc(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Nc(e,t,n,r){return new Mc(e,t,n,r)}function Dc(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Rc(e,t){var n=e.alternate;return null===n?((n=Nc(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Lc(e,t,n,r,i,a){var s=2;if(r=e,"function"==typeof e)Dc(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case x:return Pc(n.children,i,a,t);case S:s=8,i|=8;break;case T:return(e=Nc(12,n,t,2|i)).elementType=T,e.lanes=a,e;case k:return(e=Nc(13,n,t,i)).elementType=k,e.lanes=a,e;case M:return(e=Nc(19,n,t,i)).elementType=M,e.lanes=a,e;case R:return Ic(n,i,a,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case O:s=10;break e;case A:s=9;break e;case C:s=11;break e;case N:s=14;break e;case D:s=16,r=null;break e}throw Error(o(130,null==e?e:typeof e,""))}return(t=Nc(s,n,t,i)).elementType=e,t.type=r,t.lanes=a,t}function Pc(e,t,n,r){return(e=Nc(7,e,r,t)).lanes=n,e}function Ic(e,t,n,r){return(e=Nc(22,e,r,t)).elementType=R,e.lanes=n,e.stateNode={isHidden:!1},e}function $c(e,t,n){return(e=Nc(6,e,null,t)).lanes=n,e}function zc(e,t,n){return(t=Nc(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Bc(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=gt(0),this.expirationTimes=gt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function jc(e,t,n,r,i,o,a,s,l){return e=new Bc(e,t,n,s,l),1===t?(t=1,!0===o&&(t|=8)):t=0,o=Nc(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},$o(o),e}function Fc(e){if(!e)return Ai;e:{if(Ue(e=e._reactInternals)!==e||1!==e.tag)throw Error(o(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Di(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(o(171))}if(1===e.tag){var n=e.type;if(Di(n))return Pi(e,n,t)}return t}function Uc(e,t,n,r,i,o,a,s,l){return(e=jc(n,r,!0,e,0,o,0,s,l)).context=Fc(null),n=e.current,(o=Bo(r=ec(),i=tc(n))).callback=null!=t?t:null,jo(n,o,i),e.current.lanes=i,vt(e,i,r),rc(e,r),e}function Hc(e,t,n,r){var i=t.current,o=ec(),a=tc(i);return n=Fc(n),null===t.context?t.context=n:t.pendingContext=n,(t=Bo(o,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=jo(i,t,a))&&(nc(e,i,a,o),Fo(e,i,a)),a}function Vc(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Zc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Wc(e,t){Zc(e,t),(e=e.alternate)&&Zc(e,t)}xl=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||ki.current)bs=!0;else{if(0==(e.lanes&n)&&0==(128&t.flags))return bs=!1,function(e,t,n){switch(t.tag){case 3:ks(t),po();break;case 5:Qo(t);break;case 1:Di(t.type)&&Ii(t);break;case 4:Ko(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Oi(xo,r._currentValue),r._currentValue=i;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Oi(ea,1&ea.current),t.flags|=128,null):0!=(n&t.child.childLanes)?$s(e,t,n):(Oi(ea,1&ea.current),null!==(e=Vs(e,t,n))?e.sibling:null);Oi(ea,1&ea.current);break;case 19:if(r=0!=(n&t.childLanes),0!=(128&e.flags)){if(r)return Us(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),Oi(ea,ea.current),r)break;return null;case 22:case 23:return t.lanes=0,Ss(e,t,n)}return Vs(e,t,n)}(e,t,n);bs=0!=(131072&e.flags)}else bs=!1,io&&0!=(1048576&t.flags)&&Ji(t,Wi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Hs(e,t),e=t.pendingProps;var i=Ni(t,Ci.current);Mo(t,n),i=ga(null,t,r,e,i,n);var a=va();return t.flags|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Di(r)?(a=!0,Ii(t)):a=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,$o(t),i.updater=is,t.stateNode=i,i._reactInternals=t,ls(t,r,e,n),t=Cs(null,t,r,!0,a,n)):(t.tag=0,io&&a&&eo(t),ws(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Hs(e,t),e=t.pendingProps,r=(i=r._init)(r._payload),t.type=r,i=t.tag=function(e){if("function"==typeof e)return Dc(e)?1:0;if(null!=e){if((e=e.$$typeof)===C)return 11;if(e===N)return 14}return 2}(r),e=ns(r,e),i){case 0:t=Os(null,t,r,e,n);break e;case 1:t=As(null,t,r,e,n);break e;case 11:t=_s(null,t,r,e,n);break e;case 14:t=Es(null,t,r,ns(r.type,e),n);break e}throw Error(o(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,Os(e,t,r,i=t.elementType===r?i:ns(r,i),n);case 1:return r=t.type,i=t.pendingProps,As(e,t,r,i=t.elementType===r?i:ns(r,i),n);case 3:e:{if(ks(t),null===e)throw Error(o(387));r=t.pendingProps,i=(a=t.memoizedState).element,zo(e,t),Ho(t,r,null,n);var s=t.memoizedState;if(r=s.element,a.isDehydrated){if(a={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=a,t.memoizedState=a,256&t.flags){t=Ms(e,t,r,n,i=cs(Error(o(423)),t));break e}if(r!==i){t=Ms(e,t,r,n,i=cs(Error(o(424)),t));break e}for(ro=ci(t.stateNode.containerInfo.firstChild),no=t,io=!0,oo=null,n=Eo(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(po(),r===i){t=Vs(e,t,n);break e}ws(e,t,r,n)}t=t.child}return t;case 5:return Qo(t),null===e&&co(t),r=t.type,i=t.pendingProps,a=null!==e?e.memoizedProps:null,s=i.children,ni(r,i)?s=null:null!==a&&ni(r,a)&&(t.flags|=32),Ts(e,t),ws(e,t,s,n),t.child;case 6:return null===e&&co(t),null;case 13:return $s(e,t,n);case 4:return Ko(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=_o(t,null,r,n):ws(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,_s(e,t,r,i=t.elementType===r?i:ns(r,i),n);case 7:return ws(e,t,t.pendingProps,n),t.child;case 8:case 12:return ws(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,a=t.memoizedProps,s=i.value,Oi(xo,r._currentValue),r._currentValue=s,null!==a)if(sr(a.value,s)){if(a.children===i.children&&!ki.current){t=Vs(e,t,n);break e}}else for(null!==(a=t.child)&&(a.return=t);null!==a;){var l=a.dependencies;if(null!==l){s=a.child;for(var c=l.firstContext;null!==c;){if(c.context===r){if(1===a.tag){(c=Bo(-1,n&-n)).tag=2;var u=a.updateQueue;if(null!==u){var d=(u=u.shared).pending;null===d?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}a.lanes|=n,null!==(c=a.alternate)&&(c.lanes|=n),ko(a.return,n,t),l.lanes|=n;break}c=c.next}}else if(10===a.tag)s=a.type===t.type?null:a.child;else if(18===a.tag){if(null===(s=a.return))throw Error(o(341));s.lanes|=n,null!==(l=s.alternate)&&(l.lanes|=n),ko(s,n,t),s=a.sibling}else s=a.child;if(null!==s)s.return=a;else for(s=a;null!==s;){if(s===t){s=null;break}if(null!==(a=s.sibling)){a.return=s.return,s=a;break}s=s.return}a=s}ws(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Mo(t,n),r=r(i=No(i)),t.flags|=1,ws(e,t,r,n),t.child;case 14:return i=ns(r=t.type,t.pendingProps),Es(e,t,r,i=ns(r.type,i),n);case 15:return xs(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ns(r,i),Hs(e,t),t.tag=1,Di(r)?(e=!0,Ii(t)):e=!1,Mo(t,n),as(t,r,i),ls(t,r,i,n),Cs(null,t,r,!0,e,n);case 19:return Us(e,t,n);case 22:return Ss(e,t,n)}throw Error(o(156,t.tag))};var Gc="function"==typeof reportError?reportError:function(e){console.error(e)};function qc(e){this._internalRoot=e}function Yc(e){this._internalRoot=e}function Kc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Xc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Qc(){}function Jc(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o;if("function"==typeof i){var s=i;i=function(){var e=Vc(a);s.call(e)}}Hc(t,a,e,i)}else a=function(e,t,n,r,i){if(i){if("function"==typeof r){var o=r;r=function(){var e=Vc(a);o.call(e)}}var a=Uc(t,r,e,0,null,!1,0,"",Qc);return e._reactRootContainer=a,e[pi]=a.current,Ur(8===e.nodeType?e.parentNode:e),uc(),a}for(;i=e.lastChild;)e.removeChild(i);if("function"==typeof r){var s=r;r=function(){var e=Vc(l);s.call(e)}}var l=jc(e,0,!1,null,0,!1,0,"",Qc);return e._reactRootContainer=l,e[pi]=l.current,Ur(8===e.nodeType?e.parentNode:e),uc((function(){Hc(t,l,n,r)})),l}(n,t,e,i,r);return Vc(a)}Yc.prototype.render=qc.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(o(409));Hc(e,t,null,null)},Yc.prototype.unmount=qc.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;uc((function(){Hc(null,e,null,null)})),t[pi]=null}},Yc.prototype.unstable_scheduleHydration=function(e){if(e){var t=St();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Rt.length&&0!==t&&t<Rt[n].priority;n++);Rt.splice(n,0,e),0===n&&$t(e)}},_t=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=dt(t.pendingLanes);0!==n&&(yt(t,1|n),rc(t,Xe()),0==(6&Cl)&&(Ul=Xe()+500,Ui()))}break;case 13:uc((function(){var t=Po(e,1);if(null!==t){var n=ec();nc(t,e,1,n)}})),Wc(e,1)}},Et=function(e){if(13===e.tag){var t=Po(e,134217728);null!==t&&nc(t,e,134217728,ec()),Wc(e,134217728)}},xt=function(e){if(13===e.tag){var t=tc(e),n=Po(e,t);null!==n&&nc(n,e,t,ec()),Wc(e,t)}},St=function(){return bt},Tt=function(e,t){var n=bt;try{return bt=e,t()}finally{bt=n}},Ee=function(e,t,n){switch(t){case"input":if(Q(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=_i(r);if(!i)throw Error(o(90));G(r),Q(r,i)}}}break;case"textarea":oe(e,n);break;case"select":null!=(t=n.value)&&ne(e,!!n.multiple,t,!1)}},Ce=cc,ke=uc;var eu={usingClientEntryPoint:!1,Events:[bi,wi,_i,Oe,Ae,cc]},tu={findFiberByHostInstance:yi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},nu={bundleType:tu.bundleType,version:tu.version,rendererPackageName:tu.rendererPackageName,rendererConfig:tu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:w.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Ze(e))?null:e.stateNode},findFiberByHostInstance:tu.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var ru=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ru.isDisabled&&ru.supportsFiber)try{it=ru.inject(nu),ot=ru}catch(ue){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=eu,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Kc(t))throw Error(o(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:E,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.createRoot=function(e,t){if(!Kc(e))throw Error(o(299));var n=!1,r="",i=Gc;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(i=t.onRecoverableError)),t=jc(e,1,!1,null,0,n,0,r,i),e[pi]=t.current,Ur(8===e.nodeType?e.parentNode:e),new qc(t)},t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(o(188));throw e=Object.keys(e).join(","),Error(o(268,e))}return null===(e=Ze(t))?null:e.stateNode},t.flushSync=function(e){return uc(e)},t.hydrate=function(e,t,n){if(!Xc(t))throw Error(o(200));return Jc(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!Kc(e))throw Error(o(405));var r=null!=n&&n.hydratedSources||null,i=!1,a="",s=Gc;if(null!=n&&(!0===n.unstable_strictMode&&(i=!0),void 0!==n.identifierPrefix&&(a=n.identifierPrefix),void 0!==n.onRecoverableError&&(s=n.onRecoverableError)),t=Uc(t,null,e,1,null!=n?n:null,i,0,a,s),e[pi]=t.current,Ur(e),r)for(e=0;e<r.length;e++)i=(i=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Yc(t)},t.render=function(e,t,n){if(!Xc(t))throw Error(o(200));return Jc(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Xc(e))throw Error(o(40));return!!e._reactRootContainer&&(uc((function(){Jc(null,null,e,!1,(function(){e._reactRootContainer=null,e[pi]=null}))})),!0)},t.unstable_batchedUpdates=cc,t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Xc(n))throw Error(o(200));if(null==e||void 0===e._reactInternals)throw Error(o(38));return Jc(e,t,n,!1,r)},t.version="18.3.1-next-f1338f8080-20240426"},8316:(e,t,n)=>{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(2967)},6866:(e,t)=>{"use strict";var n=Symbol.for("react.element");Symbol.for("react.portal"),Symbol.for("react.fragment"),Symbol.for("react.strict_mode"),Symbol.for("react.profiler"),Symbol.for("react.provider"),Symbol.for("react.context"),Symbol.for("react.server_context"),Symbol.for("react.forward_ref"),Symbol.for("react.suspense"),Symbol.for("react.suspense_list"),Symbol.for("react.memo"),Symbol.for("react.lazy"),Symbol.for("react.offscreen");Symbol.for("react.module.reference"),t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}},8570:(e,t,n)=>{"use strict";e.exports=n(6866)},6475:(e,t)=>{"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,i=e[r];if(!(0<o(i,t)))break e;e[r]=t,e[n]=i,n=r}}function r(e){return 0===e.length?null:e[0]}function i(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length,a=i>>>1;r<a;){var s=2*(r+1)-1,l=e[s],c=s+1,u=e[c];if(0>o(l,n))c<i&&0>o(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[s]=n,r=s);else{if(!(c<i&&0>o(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function o(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var c=[],u=[],d=1,h=null,f=3,p=!1,m=!1,g=!1,v="function"==typeof setTimeout?setTimeout:null,y="function"==typeof clearTimeout?clearTimeout:null,b="undefined"!=typeof setImmediate?setImmediate:null;function w(e){for(var t=r(u);null!==t;){if(null===t.callback)i(u);else{if(!(t.startTime<=e))break;i(u),t.sortIndex=t.expirationTime,n(c,t)}t=r(u)}}function _(e){if(g=!1,w(e),!m)if(null!==r(c))m=!0,R(E);else{var t=r(u);null!==t&&L(_,t.startTime-e)}}function E(e,n){m=!1,g&&(g=!1,y(O),O=-1),p=!0;var o=f;try{for(w(n),h=r(c);null!==h&&(!(h.expirationTime>n)||e&&!k());){var a=h.callback;if("function"==typeof a){h.callback=null,f=h.priorityLevel;var s=a(h.expirationTime<=n);n=t.unstable_now(),"function"==typeof s?h.callback=s:h===r(c)&&i(c),w(n)}else i(c);h=r(c)}if(null!==h)var l=!0;else{var d=r(u);null!==d&&L(_,d.startTime-n),l=!1}return l}finally{h=null,f=o,p=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var x,S=!1,T=null,O=-1,A=5,C=-1;function k(){return!(t.unstable_now()-C<A)}function M(){if(null!==T){var e=t.unstable_now();C=e;var n=!0;try{n=T(!0,e)}finally{n?x():(S=!1,T=null)}}else S=!1}if("function"==typeof b)x=function(){b(M)};else if("undefined"!=typeof MessageChannel){var N=new MessageChannel,D=N.port2;N.port1.onmessage=M,x=function(){D.postMessage(null)}}else x=function(){v(M,0)};function R(e){T=e,S||(S=!0,x())}function L(e,n){O=v((function(){e(t.unstable_now())}),n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){m||p||(m=!0,R(E))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return f},t.unstable_getFirstCallbackNode=function(){return r(c)},t.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},t.unstable_scheduleCallback=function(e,i,o){var a=t.unstable_now();switch(o="object"==typeof o&&null!==o&&"number"==typeof(o=o.delay)&&0<o?a+o:a,e){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return e={id:d++,callback:i,priorityLevel:e,startTime:o,expirationTime:s=o+s,sortIndex:-1},o>a?(e.sortIndex=o,n(u,e),null===r(c)&&e===r(u)&&(g?(y(O),O=-1):g=!0,L(_,o-a))):(e.sortIndex=s,n(c,e),m||p||(m=!0,R(E))),e},t.unstable_shouldYield=k,t.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}},4616:(e,t,n)=>{"use strict";e.exports=n(6475)},7210:(e,t,n)=>{"use strict";var r=n(2870),i=(r.Type.String,r.Type.String,r.Type.Boolean,r.Type.String,r.Type.Array,r.Type.ConceptUuid,r.Type.String,r.Type.String,r.Type.Number,r.validators.inRange(0,10),r.Type.Number,r.Type.Boolean,r.Type.Array,r.Type.String,r.Type.String,r.Type.Boolean,n(7900)),o=n.n(i),a=n(4924),s=n(526),l=n(5508),c=n(2074),u=n(884),d=n(3255);function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e){var t,n,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=(0,r.useConfig)(),a=o.encounterTypes,s=o.data,l=a.length?"&encounter.type=".concat(a.toString()):"",c="".concat(r.fhirBaseUrl,"/Observation?subject:Patient=").concat(e,"&code=").concat(s.map((function(e){return e.concept})).join(","),"&_summary=data&_sort=-date&_count=").concat(100).concat(l);i&&(c+="&_include=Observation:encounter");var u,f=(0,d.ZP)(c,r.openmrsFetch),p=f.data,m=f.error,g=f.isLoading,v=f.isValidating,y=i?null==(u=null==p||null===(t=p.data)||void 0===t?void 0:t.entry)?void 0:u.filter((function(e){var t;return"Encounter"===(null==e||null===(t=e.resource)||void 0===t?void 0:t.resourceType)})).map((function(e){var t,n,r,i;return{reference:"Encounter/".concat(e.resource.id),display:(null===(i=e.resource.type)||void 0===i||null===(r=i[0])||void 0===r||null===(n=r.coding)||void 0===n||null===(t=n[0])||void 0===t?void 0:t.display)||"--"}})):[],b=function(e,t){var n;return(null==e||null===(n=e.filter((function(e){var t;return"Observation"===(null==e||null===(t=e.resource)||void 0===t?void 0:t.resourceType)})))||void 0===n?void 0:n.map((function(e){var n,r,i,o,a=e.resource,s=(i=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){h(e,t,n[t])}))}return e}({},a),o=null!=(o={conceptUuid:null===(n=a.code.coding.find((function(e){return 36===e.code.length})))||void 0===n?void 0:n.code})?o:{},Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(o)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(o)).forEach((function(e){Object.defineProperty(i,e,Object.getOwnPropertyDescriptor(o,e))})),i);return a.hasOwnProperty("valueDateTime")&&(s.dataType="DateTime"),e.resource.hasOwnProperty("valueString")&&(s.dataType="Text"),e.resource.hasOwnProperty("valueQuantity")&&(s.dataType="Number"),e.resource.hasOwnProperty("valueCodeableConcept")&&(s.dataType="Coded"),s.encounter.name=null===(r=t.find((function(e){return e.reference===a.encounter.reference})))||void 0===r?void 0:r.display,s})))||[]}(null==p||null===(n=p.data)||void 0===n?void 0:n.entry,y);return{data:b,error:m,isLoading:g,isValidating:v}}var p=n(2524),m=n.n(p),g=n(5771),v=n(321),y=n.n(v),b=n(1195),w=n.n(b),_=n(3275),E=n.n(_),x=n(7162),S=n.n(x),T=n(2094),O=n.n(T),A=n(757),C=n.n(A),k=n(4512),M={};M.styleTagTransform=C(),M.setAttributes=S(),M.insert=E().bind(null,"head"),M.domAPI=w(),M.insertStyleElement=O(),y()(k.Z,M);const N=k.Z&&k.Z.locals?k.Z.locals:void 0;function D(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var R;!function(e){e.TIME="time",e.LINEAR="linear",e.LOG="log",e.LABELS="labels",e.LABELS_RATIO="labels-ratio"}(R||(R={}));const L=function(e){var t,n,l,c,u=e.patientUuid,d=(0,a.useTranslation)().t,h=(0,r.useConfig)(),p=f(u).data,v=(l=o().useState({label:null===(t=h.data[0])||void 0===t?void 0:t.label,uuid:null===(n=h.data[0])||void 0===n?void 0:n.concept}),c=2,function(e){if(Array.isArray(e))return e}(l)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(l,c)||function(e,t){if(e){if("string"==typeof e)return D(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?D(e,t):void 0}}(l,c)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),y=v[0],b=v[1],w=(0,i.useMemo)((function(){var e=p.filter((function(e){return e.conceptUuid===y.uuid&&"Number"===e.dataType})).map((function(e){return{group:y.label,key:(0,r.formatDate)(new Date(e.effectiveDateTime),{year:!0,time:!1}),value:e.valueQuantity.value}}));return h.graphOldestFirst&&e.reverse(),e}),[p,h.graphOldestFirst,y.uuid,y.label]),_=Object.fromEntries(h.data.map((function(e){return[e.label,e.color]}))),E={axes:{bottom:{title:"Date",mapsTo:"key",scaleType:"labels"},left:{mapsTo:"value",title:y.label,scaleType:"linear",includeZero:!1}},legend:{enabled:!1},color:{scale:_},height:"400px"};return o().createElement(o().Fragment,null,o().createElement("div",{className:N.graphContainer},o().createElement("div",{className:N.conceptPickerTabs},o().createElement("label",{className:N.conceptLabel,htmlFor:"concept-tab-group"},d("displaying","Displaying")),o().createElement(s.mQc,{id:"concept-tab-group",className:N.verticalTabs,type:"default"},o().createElement(s.tdY,{className:N.tablist,"aria-label":"Obs tabs"},h.data.map((function(e,t){var n,r,i,a=e.concept,l=e.label,c=m()(N.tab,N.bodyLong01,(n={},r=N.selectedTab,i=y.label===l,r in n?Object.defineProperty(n,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[r]=i,n));return o().createElement(s.OK9,{key:a,className:c,onClick:function(){return b({label:l,uuid:a})}},l)}))))),o().createElement("div",{className:N.lineChartContainer},o().createElement(g.wW,{data:w.flat(),options:E}))),h.interpretationSlot?o().createElement("div",null,o().createElement(r.ExtensionSlot,{name:h.interpretationSlot,style:{gridTemplateColumns:"1fr"}})):null)};var P=n(5136),I={};I.styleTagTransform=C(),I.setAttributes=S(),I.insert=E().bind(null,"head"),I.domAPI=w(),I.insertStyleElement=O(),y()(P.Z,I);const $=P.Z&&P.Z.locals?P.Z.locals:void 0;function z(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function B(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function j(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){B(e,t,n[t])}))}return e}function F(e){return function(e){if(Array.isArray(e))return z(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return z(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?z(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const U=function(e){var t=e.patientUuid,n=(0,a.useTranslation)().t,i=(0,r.useConfig)(),l=f(t,i.showEncounterType),c=l.data,d=(l.error,l.isLoading,l.isValidating,F(new Set(c.map((function(e){return e.issued})))).sort().map((function(e){return c.filter((function(t){return t.issued===e}))}))),h=[{key:"date",header:n("dateAndTime","Date and time"),isSortable:!0}].concat(F(i.data.map((function(e){return{key:e.concept,header:e.label}}))));i.showEncounterType&&h.splice(1,0,{key:"encounter",header:n("encounterType","Encounter type"),isSortable:!0});var p=o().useMemo((function(){return null==d?void 0:d.map((function(e,t){var n={id:"".concat(t),date:(0,r.formatDatetime)(new Date(e[0].effectiveDateTime),{mode:"wide"}),encounter:e[0].encounter.name},o=!0,a=!1,s=void 0;try{for(var l,c=function(){var e=l.value;switch(e.dataType){case"Text":n[e.conceptUuid]=e.valueString;break;case"Number":var t,o,a,s,c,u=null===(t=i.data.find((function(t){return t.concept===e.conceptUuid})))||void 0===t?void 0:t.decimalPlaces;(null===(o=e.valueQuantity)||void 0===o?void 0:o.value)%1!=0?n[e.conceptUuid]=u>0?null===(a=e.valueQuantity)||void 0===a?void 0:a.value.toFixed(u):null===(s=e.valueQuantity)||void 0===s?void 0:s.value.toFixed(2):n[e.conceptUuid]=null===(c=e.valueQuantity)||void 0===c?void 0:c.value;break;case"Coded":var d,h;n[e.conceptUuid]=null===(h=e.valueCodeableConcept)||void 0===h||null===(d=h.coding[0])||void 0===d?void 0:d.display;break;case"DateTime":"dateTime"===(null==i?void 0:i.dateFormat)?n[e.conceptUuid]=(0,r.formatDatetime)(new Date(e.valueDateTime),{mode:"standard"}):"time"===(null==i?void 0:i.dateFormat)?n[e.conceptUuid]=(0,r.formatTime)(new Date(e.valueDateTime)):"date"===(null==i?void 0:i.dateFormat)?n[e.conceptUuid]=(0,r.formatDate)(new Date(e.valueDateTime),{mode:"standard"}):n[e.conceptUuid]=(0,r.formatDatetime)(new Date(e.valueDateTime),{mode:"standard"})}},u=e[Symbol.iterator]();!(o=(l=u.next()).done);o=!0)c()}catch(e){a=!0,s=e}finally{try{o||null==u.return||u.return()}finally{if(a)throw s}}return n}))}),[i,d]),m=(0,r.usePagination)(p,i.table.pageSize),g=m.results,v=m.goTo,y=m.currentPage;return o().createElement("div",null,o().createElement(s.wQF,{rows:g,headers:h,isSortable:!0,size:"sm",useZebraStyles:!0},(function(e){var t,n,r=e.rows,i=e.headers,a=e.getHeaderProps,l=e.getTableProps;return o().createElement(s.xJi,null,o().createElement(s.iA_,(t=j({},l()),n=null!=(n={className:$.customRow})?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})),t),o().createElement(s.ssF,null,o().createElement(s.SCH,null,i.map((function(e){var t,n;return o().createElement(s.xDH,j({className:$.tableHeader},a({header:e,isSortable:e.isSortable})),null!==(n=null===(t=e.header)||void 0===t?void 0:t.content)&&void 0!==n?n:e.header)})))),o().createElement(s.RMI,null,r.map((function(e){return o().createElement(s.SCH,{key:e.id},e.cells.map((function(e){var t,n,r;return o().createElement(s.pj1,{key:e.id},null!==(r=null!==(n=null===(t=e.value)||void 0===t?void 0:t.content)&&void 0!==n?n:e.value)&&void 0!==r?r:"--")})))})))))})),o().createElement(u.PatientChartPagination,{pageNumber:y,totalItems:p.length,currentItems:g.length,pageSize:i.table.pageSize,onPageNumberChange:function(e){var t=e.page;return v(t)}}))};var H=n(1897),V={};V.styleTagTransform=C(),V.setAttributes=S(),V.insert=E().bind(null,"head"),V.domAPI=w(),V.insertStyleElement=O(),y()(H.Z,V);const Z=H.Z&&H.Z.locals?H.Z.locals:void 0;function W(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function G(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function q(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){G(e,t,n[t])}))}return e}n(3979);var Y={featureName:"Generic widgets",moduleName:"@openmrs/esm-generic-patient-widgets-app"};(0,r.getSyncLifecycle)((function(e){var t,n,i=e.patientUuid,d=(0,a.useTranslation)().t,h=(0,r.useConfig)(),p=(t=o().useState(h.showGraphByDefault),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(t,n)||function(e,t){if(e){if("string"==typeof e)return W(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?W(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),m=p[0],g=p[1],v=f(i),y=v.data,b=v.error,w=v.isLoading,_=v.isValidating,E=y.find((function(e){return"Number"===e.dataType}));return o().createElement(o().Fragment,null,w?o().createElement(s.gqd,{role:"progressbar"}):b?o().createElement(u.ErrorState,{error:b,headerTitle:h.title}):(null==y?void 0:y.length)?o().createElement("div",{className:Z.widgetContainer},o().createElement(u.CardHeader,{title:h.title},o().createElement("div",{className:Z.backgroundDataFetchingIndicator},o().createElement("span",null,_?o().createElement(s.lSo,null):null)),E?o().createElement("div",{className:Z.headerActionItems},o().createElement("div",{className:Z.toggleButtons},o().createElement(s.zxk,{className:Z.toggle,size:"md",kind:m?"ghost":"tertiary",hasIconOnly:!0,renderIcon:function(e){return o().createElement(l.iA,q({size:16},e))},iconDescription:d("tableView","Table View"),onClick:function(){return g(!1)}}),o().createElement(s.zxk,{className:Z.toggle,size:"md",kind:m?"tertiary":"ghost",hasIconOnly:!0,renderIcon:function(e){return o().createElement(c.eA,q({size:16},e))},iconDescription:d("chartView","Chart View"),onClick:function(){return g(!0)}}))):null),m&&E?o().createElement(L,{patientUuid:i}):o().createElement(U,{patientUuid:i})):o().createElement(u.EmptyState,{displayText:h.resultsName,headerTitle:h.title}))}),Y)},452:(e,t,n)=>{"use strict";var r=n(7900),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=r.useState,a=r.useEffect,s=r.useLayoutEffect,l=r.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=o({inst:{value:n,getSnapshot:t}}),i=r[0].inst,u=r[1];return s((function(){i.value=n,i.getSnapshot=t,c(i)&&u({inst:i})}),[e,n,t]),a((function(){return c(i)&&u({inst:i}),e((function(){c(i)&&u({inst:i})}))}),[e]),l(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:u},3100:(e,t,n)=>{"use strict";e.exports=n(452)},3883:function(e,t,n){"use strict";e.exports="object"==typeof self&&self.self===self&&self||"object"==typeof n.g&&n.g.global===n.g&&n.g||this},3979:(e,t,n)=>{var r={"./am.json":[8788,788],"./ar.json":[4460,460],"./en.json":[3574,574],"./es.json":[8319,319],"./fr.json":[2757,757],"./he.json":[5833,833],"./km.json":[7807,807],"./zh.json":[8271,271],"./zh_CN.json":[1644,644]};function i(e){if(!n.o(r,e))return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=r[e],i=t[0];return n.e(t[1]).then((()=>n(i)))}i.keys=()=>Object.keys(r),i.id=3979,e.exports=i},2524:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=a(e,o(n)))}return e}function o(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return i.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)r.call(e,n)&&e[n]&&(t=a(t,n));return t}function a(e,t){return t?e?e+" "+t:e+t:e}e.exports?(i.default=i,e.exports=i):void 0===(n=function(){return i}.apply(t,[]))||(e.exports=n)}()},5771:(e,t,n)=>{"use strict";n.d(t,{wW:()=>M_});var r=n(7900),i=Object.defineProperty,o=(e,t,n)=>(((e,t,n)=>{t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n),a=(e=>(e.RENDER_FINISHED="render-finished",e.RESIZE="chart-resize",e.MOUSEOVER="chart-mouseover",e.MOUSEOUT="chart-mouseout",e))(a||{}),s=(e=>(e.SHOW="show-modal",e.HIDE="hide-modal",e))(s||{}),l=(e=>(e.UPDATE="model-update",e))(l||{}),c=(e=>(e.SHOW_OVERFLOW_MENU="show-toolbar-overflow-menu",e.HIDE_OVERFLOW_MENU="hide-toolbar-overflow-menu",e.BUTTON_CLICK="toolbar-button-click",e))(c||{}),u=(e=>(e.UPDATE="zoom-bar-update",e.SELECTION_START="zoom-bar-selection-start",e.SELECTION_IN_PROGRESS="zoom-bar-selection-in-progress",e.SELECTION_END="zoom-bar-selection-end",e))(u||{}),d=(e=>(e.CHANGE="zoom-domain-change",e))(d||{}),h=(e=>(e.CANVAS_ZOOM_IN="canvas-zoom-in",e.CANVAS_ZOOM_OUT="canvas-zoom-out",e))(h||{}),f=(e=>(e.LABEL_MOUSEOVER="axis-label-mouseover",e.LABEL_MOUSEMOVE="axis-label-mousemove",e.LABEL_CLICK="axis-label-click",e.LABEL_MOUSEOUT="axis-label-mouseout",e.LABEL_FOCUS="axis-label-focus",e.LABEL_BLUR="axis-label-blur",e.RENDER_COMPLETE="axis-render-complete",e))(f||{}),p=(e=>(e.POINT_MOUSEOVER="scatter-mouseover",e.POINT_MOUSEMOVE="scatter-mousemove",e.POINT_CLICK="scatter-click",e.POINT_MOUSEOUT="scatter-mouseout",e))(p||{}),m=(e=>(e.WORD_MOUSEOVER="wordcloud-word-mouseover",e.WORD_MOUSEMOVE="wordcloud-word-mousemove",e.WORD_CLICK="wordcloud-word-click",e.WORD_MOUSEOUT="wordcloud-word-mouseout",e))(m||{}),g=(e=>(e.SLICE_MOUSEOVER="pie-slice-mouseover",e.SLICE_MOUSEMOVE="pie-slice-mousemove",e.SLICE_CLICK="pie-slice-click",e.SLICE_MOUSEOUT="pie-slice-mouseout",e))(g||{}),v=(e=>(e.ARC_MOUSEOVER="gauge-arc-mouseover",e.ARC_MOUSEMOVE="gauge-arc-mousemove",e.ARC_CLICK="gauge-arc-click",e.ARC_MOUSEOUT="gauge-arc-mouseout",e))(v||{}),y=(e=>(e.BAR_MOUSEOVER="bar-mouseover",e.BAR_MOUSEMOVE="bar-mousemove",e.BAR_CLICK="bar-click",e.BAR_MOUSEOUT="bar-mouseout",e))(y||{}),b=(e=>(e.BOX_MOUSEOVER="box-mouseover",e.BOX_MOUSEMOVE="box-mousemove",e.BOX_CLICK="box-click",e.BOX_MOUSEOUT="box-mouseout",e.OUTLIER_MOUSEOVER="outlier-mouseover",e.OUTLIER_MOUSEMOVE="outlier-mousemove",e.OUTLIER_CLICK="outlier-click",e.OUTLIER_MOUSEOUT="outlier-mouseout",e))(b||{}),w=(e=>(e.SCATTER_MOUSEOVER="scatter-mouseover",e.SCATTER_MOUSEMOVE="scatter-mousemove",e.SCATTER_CLICK="scatter-click",e.SCATTER_MOUSEOUT="scatter-mouseout",e))(w||{}),_=(e=>(e.POINT_MOUSEOVER="scatter-mouseover",e.POINT_MOUSEMOVE="scatter-mousemove",e.POINT_CLICK="scatter-click",e.POINT_MOUSEOUT="scatter-mouseout",e))(_||{}),E=(e=>(e.X_AXIS_MOUSEOVER="radar-x-axis-mouseover",e.X_AXIS_MOUSEMOVE="radar-x-axis-mousemove",e.X_AXIS_CLICK="radar-x-axis-click",e.X_AXIS_MOUSEOUT="radar-x-axis-mouseout",e))(E||{}),x=(e=>(e.NODE_MOUSEOVER="tree-node-mouseover",e.NODE_CLICK="tree-node-click",e.NODE_MOUSEOUT="tree-node-mouseout",e))(x||{}),S=(e=>(e.LEAF_MOUSEOVER="leaf-mouseover",e.LEAF_MOUSEMOVE="leaf-mousemove",e.LEAF_CLICK="leaf-click",e.LEAF_MOUSEOUT="leaf-mouseout",e))(S||{}),T=(e=>(e.SHOW="show-tooltip",e.MOVE="move-tooltip",e.HIDE="hide-tooltip",e))(T||{}),O=(e=>(e.SHOW="show-threshold",e.HIDE="hide-threshold",e))(O||{}),A=(e=>(e.ITEM_HOVER="legend-item-onhover",e.ITEM_CLICK="legend-item-onclick",e.ITEM_MOUSEOUT="legend-item-onmouseout",e.ITEMS_UPDATE="legend-items-update",e))(A||{}),C=(e=>(e.CIRCLE_MOUSEOVER="circle-leaf-mouseover",e.CIRCLE_CLICK="circle-leaf-click",e.CIRCLE_MOUSEOUT="circle-leaf-mouseout",e.CIRCLE_MOUSEMOVE="circle-leaf-mousemove",e))(C||{}),k=(e=>(e.NODE_MOUSEOVER="alluvial-node-mouseover",e.NODE_CLICK="alluvial-node-click",e.NODE_MOUSEOUT="alluvial-node-mouseout",e.NODE_MOUSEMOVE="alluvial-node-mousemove",e.LINE_MOUSEOVER="alluvial-line-mouseover",e.LINE_CLICK="alluvial-line-click",e.LINE_MOUSEOUT="alluvial-line-mouseout",e.LINE_MOUSEMOVE="alluvial-line-mousemove",e))(k||{}),M=(e=>(e.METER_MOUSEOVER="meter-mouseover",e.METER_CLICK="meter-click",e.METER_MOUSEOUT="meter-mouseout",e.METER_MOUSEMOVE="meter-mousemove",e))(M||{}),N=(e=>(e.HEATMAP_MOUSEOVER="heatmap-mouseover",e.HEATMAP_CLICK="heatmap-click",e.HEATMAP_MOUSEOUT="heatmap-mouseout",e.HEATMAP_MOUSEMOVE="hetmap-mousemove",e))(N||{}),D=(e=>(e.CHOROPLETH_MOUSEOVER="choropleth-mouseover",e.CHOROPLETH_CLICK="choropleth-click",e.CHOROPLETH_MOUSEOUT="choropleth-mouseout",e.CHOROPLETH_MOUSEMOVE="choropleth-mousemove",e))(D||{});const R=Object.freeze(Object.defineProperty({__proto__:null,Alluvial:k,Area:p,Axis:f,Bar:y,Boxplot:b,CanvasZoom:h,Chart:a,Choropleth:D,CirclePack:C,Gauge:v,Heatmap:N,Legend:A,Line:_,Meter:M,Modal:s,Model:l,Pie:g,Radar:E,Scatter:w,Threshold:O,Toolbar:c,Tooltip:T,Tree:x,Treemap:S,WordCloud:m,ZoomBar:u,ZoomDomain:d},Symbol.toStringTag,{value:"Module"}));var L=(e=>(e.HTML="html",e.SVG="svg",e))(L||{}),P=(e=>(e.WHITE="white",e.G100="g100",e.G90="g90",e.G10="g10",e))(P||{}),I=(e=>(e.BACKGROUND="background",e.FILL="fill",e.STROKE="stroke",e.TOOLTIP="tooltip",e))(I||{}),$=(e=>(e.LEFT="left",e.RIGHT="right",e.TOP="top",e.BOTTOM="bottom",e))($||{}),z=(e=>(e.GRAPH_VIEW="graph_view",e.SLIDER_VIEW="slider_view",e))(z||{}),B=(e=>(e.END_LINE="end_line",e.MID_LINE="mid_line",e.FRONT_LINE="front_line",e.NONE="none",e))(B||{}),j=(e=>(e.VERTICAL="vertical",e.HORIZONTAL="horizontal",e))(j||{}),F=(e=>(e.TIME="time",e.LINEAR="linear",e.LOG="log",e.LABELS="labels",e.LABELS_RATIO="labels-ratio",e))(F||{}),U=(e=>(e.RIGHT="right",e.LEFT="left",e.TOP="top",e.BOTTOM="bottom",e))(U||{}),H=(e=>(e.LEFT="left",e.CENTER="center",e.RIGHT="right",e))(H||{}),V=(e=>(e.HORIZONTAL="horizontal",e.VERTICAL="vertical",e))(V||{}),Z=(e=>(e.TREE="tree",e.DENDROGRAM="dendrogram",e))(Z||{}),W=(e=>(e.ROW="row",e.COLUMN="column",e.ROW_REVERSE="row-reverse",e.COLUMN_REVERSE="column-reverse",e))(W||{}),G=(e=>(e.FIXED="fixed",e.PREFERRED="preferred",e.STRETCH="stretch",e))(G||{}),q=(e=>(e.CENTER="center",e))(q||{}),Y=(e=>(e.GRID="grid",e.VERT_OR_HORIZ="vertOrHoriz",e.PIE="pie",e.DONUT="donut",e))(Y||{}),K=(e=>(e.SEMI="semi",e.FULL="full",e))(K||{}),X=(e=>(e.ALWAYS="always",e.AUTO="auto",e.NEVER="never",e))(X||{}),Q=(e=>(e.SCATTER="scatter",e.LINE="line",e.SIMPLE_BAR="simple-bar",e.STACKED_BAR="stacked-bar",e.GROUPED_BAR="grouped-bar",e.AREA="area",e.STACKED_AREA="stacked-area",e))(Q||{}),J=(e=>(e.EXPORT_CSV="Export as CSV",e.EXPORT_PNG="Export as PNG",e.EXPORT_JPG="Export as JPG",e.ZOOM_IN="Zoom in",e.ZOOM_OUT="Zoom out",e.RESET_ZOOM="Reset zoom",e.MAKE_FULLSCREEN="Make fullscreen",e.SHOW_AS_DATATABLE="Show as data-table",e.CUSTOM="Custom",e))(J||{}),ee=(e=>(e.LEFT="left",e.RIGHT="right",e))(ee||{}),te=(e=>(e.CHECKBOX="checkbox",e.RADIUS="radius",e.AREA="area",e.SIZE="size",e.LINE="line",e.QUARTILE="quartile",e.ZOOM="zoom",e))(te||{}),ne=(e=>(e.ON="on",e.AUTO="auto",e.OFF="off",e))(ne||{}),re=(e=>(e.DEFAULT="default",e.HOVERABLE="hoverable",e))(re||{}),ie=(e=>(e.geoEqualEarth="geoEqualEarth",e.geoAlbers="geoAlbers",e.geoConicEqualArea="geoConicEqualArea",e.geoConicEquidistant="geoConicEquidistant",e.geoEquirectangular="geoEquirectangular",e.geoMercator="geoMercator",e.geoNaturalEarth1="geoNaturalEarth1",e))(ie||{});function oe(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ae(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function se(e){let t,n,r;function i(e,r,i=0,o=e.length){if(i<o){if(0!==t(r,r))return o;do{const t=i+o>>>1;n(e[t],r)<0?i=t+1:o=t}while(i<o)}return i}return 2!==e.length?(t=oe,n=(t,n)=>oe(e(t),n),r=(t,n)=>e(t)-n):(t=e===oe||e===ae?e:le,n=e,r=e),{left:i,center:function(e,t,n=0,o=e.length){const a=i(e,t,n,o-1);return a>n&&r(e[a-1],t)>-r(e[a],t)?a-1:a},right:function(e,r,i=0,o=e.length){if(i<o){if(0!==t(r,r))return o;do{const t=i+o>>>1;n(e[t],r)<=0?i=t+1:o=t}while(i<o)}return i}}}function le(){return 0}const ce=se(oe).right;se((function(e){return null===e?NaN:+e})).center;const ue=ce;function de(e,t){let n,r;if(void 0===t)for(const t of e)null!=t&&(void 0===n?t>=t&&(n=r=t):(n>t&&(n=t),r<t&&(r=t)));else{let i=-1;for(let o of e)null!=(o=t(o,++i,e))&&(void 0===n?o>=o&&(n=r=o):(n>o&&(n=o),r<o&&(r=o)))}return[n,r]}class he{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){const t=this._partials;let n=0;for(let r=0;r<this._n&&r<32;r++){const i=t[r],o=e+i,a=Math.abs(e)<Math.abs(i)?e-(o-i):i-(o-e);a&&(t[n++]=a),e=o}return t[n]=e,this._n=n+1,this}valueOf(){const e=this._partials;let t,n,r,i=this._n,o=0;if(i>0){for(o=e[--i];i>0&&(t=o,n=e[--i],o=t+n,r=n-(o-t),!r););i>0&&(r<0&&e[i-1]<0||r>0&&e[i-1]>0)&&(n=2*r,t=o+n,n==t-o&&(o=t))}return o}}class fe extends Map{constructor(e,t=me){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[t,n]of e)this.set(t,n)}get(e){return super.get(pe(this,e))}has(e){return super.has(pe(this,e))}set(e,t){return super.set(function({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}(this,e),t)}delete(e){return super.delete(function({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}(this,e))}}function pe({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function me(e){return null!==e&&"object"==typeof e?e.valueOf():e}function ge(e){return e}var ve=Array.prototype.slice;function ye(e){return()=>e}const be=Math.sqrt(50),we=Math.sqrt(10),_e=Math.sqrt(2);function Ee(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=be?10:o>=we?5:o>=_e?2:1;let s,l,c;return i<0?(c=Math.pow(10,-i)/a,s=Math.round(e*c),l=Math.round(t*c),s/c<e&&++s,l/c>t&&--l,c=-c):(c=Math.pow(10,i)*a,s=Math.round(e/c),l=Math.round(t/c),s*c<e&&++s,l*c>t&&--l),l<s&&.5<=n&&n<2?Ee(e,t,2*n):[s,l,c]}function xe(e,t,n){if(!((n=+n)>0))return[];if((e=+e)==(t=+t))return[e];const r=t<e,[i,o,a]=r?Ee(t,e,n):Ee(e,t,n);if(!(o>=i))return[];const s=o-i+1,l=new Array(s);if(r)if(a<0)for(let e=0;e<s;++e)l[e]=(o-e)/-a;else for(let e=0;e<s;++e)l[e]=(o-e)*a;else if(a<0)for(let e=0;e<s;++e)l[e]=(i+e)/-a;else for(let e=0;e<s;++e)l[e]=(i+e)*a;return l}function Se(e,t,n){return Ee(e=+e,t=+t,n=+n)[2]}function Te(e,t,n){n=+n;const r=(t=+t)<(e=+e),i=r?Se(t,e,n):Se(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function Oe(e){return Math.max(1,Math.ceil(Math.log(function(e,t){let n=0;for(let t of e)null!=t&&(t=+t)>=t&&++n;return n}(e))/Math.LN2)+1)}function Ae(e,t){let n;if(void 0===t)for(const t of e)null!=t&&(n<t||void 0===n&&t>=t)&&(n=t);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n<i||void 0===n&&i>=i)&&(n=i)}return n}function Ce(e){return e}var ke=1,Me=2,Ne=3,De=4,Re=1e-6;function Le(e){return"translate("+e+",0)"}function Pe(e){return"translate(0,"+e+")"}function Ie(e){return t=>+e(t)}function $e(e,t){return t=Math.max(0,e.bandwidth()-2*t)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function ze(){return!this.__axis}function Be(e,t){var n=[],r=null,i=null,o=6,a=6,s=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,c=e===ke||e===De?-1:1,u=e===De||e===Me?"x":"y",d=e===ke||e===Ne?Le:Pe;function h(h){var f=r??(t.ticks?t.ticks.apply(t,n):t.domain()),p=i??(t.tickFormat?t.tickFormat.apply(t,n):Ce),m=Math.max(o,0)+s,g=t.range(),v=+g[0]+l,y=+g[g.length-1]+l,b=(t.bandwidth?$e:Ie)(t.copy(),l),w=h.selection?h.selection():h,_=w.selectAll(".domain").data([null]),E=w.selectAll(".tick").data(f,t).order(),x=E.exit(),S=E.enter().append("g").attr("class","tick"),T=E.select("line"),O=E.select("text");_=_.merge(_.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),E=E.merge(S),T=T.merge(S.append("line").attr("stroke","currentColor").attr(u+"2",c*o)),O=O.merge(S.append("text").attr("fill","currentColor").attr(u,c*m).attr("dy",e===ke?"0em":e===Ne?"0.71em":"0.32em")),h!==w&&(_=_.transition(h),E=E.transition(h),T=T.transition(h),O=O.transition(h),x=x.transition(h).attr("opacity",Re).attr("transform",(function(e){return isFinite(e=b(e))?d(e+l):this.getAttribute("transform")})),S.attr("opacity",Re).attr("transform",(function(e){var t=this.parentNode.__axis;return d((t&&isFinite(t=t(e))?t:b(e))+l)}))),x.remove(),_.attr("d",e===De||e===Me?a?"M"+c*a+","+v+"H"+l+"V"+y+"H"+c*a:"M"+l+","+v+"V"+y:a?"M"+v+","+c*a+"V"+l+"H"+y+"V"+c*a:"M"+v+","+l+"H"+y),E.attr("opacity",1).attr("transform",(function(e){return d(b(e)+l)})),T.attr(u+"2",c*o),O.attr(u,c*m).text(p),w.filter(ze).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===Me?"start":e===De?"end":"middle"),w.each((function(){this.__axis=b}))}return h.scale=function(e){return arguments.length?(t=e,h):t},h.ticks=function(){return n=Array.from(arguments),h},h.tickArguments=function(e){return arguments.length?(n=null==e?[]:Array.from(e),h):n.slice()},h.tickValues=function(e){return arguments.length?(r=null==e?null:Array.from(e),h):r&&r.slice()},h.tickFormat=function(e){return arguments.length?(i=e,h):i},h.tickSize=function(e){return arguments.length?(o=a=+e,h):o},h.tickSizeInner=function(e){return arguments.length?(o=+e,h):o},h.tickSizeOuter=function(e){return arguments.length?(a=+e,h):a},h.tickPadding=function(e){return arguments.length?(s=+e,h):s},h.offset=function(e){return arguments.length?(l=+e,h):l},h}function je(e){return Be(ke,e)}function Fe(e){return Be(Me,e)}function Ue(e){return Be(Ne,e)}function He(e){return Be(De,e)}var Ve={value:()=>{}};function Ze(){for(var e,t=0,n=arguments.length,r={};t<n;++t){if(!(e=arguments[t]+"")||e in r||/[\s.]/.test(e))throw new Error("illegal type: "+e);r[e]=[]}return new We(r)}function We(e){this._=e}function Ge(e,t){for(var n,r=0,i=e.length;r<i;++r)if((n=e[r]).name===t)return n.value}function qe(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=Ve,e=e.slice(0,r).concat(e.slice(r+1));break}return null!=n&&e.push({name:t,value:n}),e}We.prototype=Ze.prototype={constructor:We,on:function(e,t){var n,r=this._,i=function(e,t){return e.trim().split(/^|\s+/).map((function(e){var n="",r=e.indexOf(".");if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:n}}))}(e+"",r),o=-1,a=i.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++o<a;)if(n=(e=i[o]).type)r[n]=qe(r[n],e.name,t);else if(null==t)for(n in r)r[n]=qe(r[n],e.name,null);return this}for(;++o<a;)if((n=(e=i[o]).type)&&(n=Ge(r[n],e.name)))return n},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new We(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=0,n=(r=this._[e]).length;o<n;++o)r[o].value.apply(t,i)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,o=r.length;i<o;++i)r[i].value.apply(t,n)}};var Ye="http://www.w3.org/1999/xhtml";const Ke={svg:"http://www.w3.org/2000/svg",xhtml:Ye,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Xe(e){var t=e+="",n=t.indexOf(":");return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),Ke.hasOwnProperty(t)?{space:Ke[t],local:e}:e}function Qe(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Ye&&t.documentElement.namespaceURI===Ye?t.createElement(e):t.createElementNS(n,e)}}function Je(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function et(e){var t=Xe(e);return(t.local?Je:Qe)(t)}function tt(){}function nt(e){return null==e?tt:function(){return this.querySelector(e)}}function rt(){return[]}function it(e){return null==e?rt:function(){return this.querySelectorAll(e)}}function ot(e){return function(){return this.matches(e)}}function at(e){return function(t){return t.matches(e)}}var st=Array.prototype.find;function lt(){return this.firstElementChild}var ct=Array.prototype.filter;function ut(){return Array.from(this.children)}function dt(e){return new Array(e.length)}function ht(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}function ft(e,t,n,r,i,o){for(var a,s=0,l=t.length,c=o.length;s<c;++s)(a=t[s])?(a.__data__=o[s],r[s]=a):n[s]=new ht(e,o[s]);for(;s<l;++s)(a=t[s])&&(i[s]=a)}function pt(e,t,n,r,i,o,a){var s,l,c,u=new Map,d=t.length,h=o.length,f=new Array(d);for(s=0;s<d;++s)(l=t[s])&&(f[s]=c=a.call(l,l.__data__,s,t)+"",u.has(c)?i[s]=l:u.set(c,l));for(s=0;s<h;++s)c=a.call(e,o[s],s,o)+"",(l=u.get(c))?(r[s]=l,l.__data__=o[s],u.delete(c)):n[s]=new ht(e,o[s]);for(s=0;s<d;++s)(l=t[s])&&u.get(f[s])===l&&(i[s]=l)}function mt(e){return e.__data__}function gt(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function vt(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function yt(e){return function(){this.removeAttribute(e)}}function bt(e){return function(){this.removeAttributeNS(e.space,e.local)}}function wt(e,t){return function(){this.setAttribute(e,t)}}function _t(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Et(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function xt(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function St(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Tt(e){return function(){this.style.removeProperty(e)}}function Ot(e,t,n){return function(){this.style.setProperty(e,t,n)}}function At(e,t,n){return function(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Ct(e,t){return e.style.getPropertyValue(t)||St(e).getComputedStyle(e,null).getPropertyValue(t)}function kt(e){return function(){delete this[e]}}function Mt(e,t){return function(){this[e]=t}}function Nt(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}function Dt(e){return e.trim().split(/^|\s+/)}function Rt(e){return e.classList||new Lt(e)}function Lt(e){this._node=e,this._names=Dt(e.getAttribute("class")||"")}function Pt(e,t){for(var n=Rt(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function It(e,t){for(var n=Rt(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function $t(e){return function(){Pt(this,e)}}function zt(e){return function(){It(this,e)}}function Bt(e,t){return function(){(t.apply(this,arguments)?Pt:It)(this,e)}}function jt(){this.textContent=""}function Ft(e){return function(){this.textContent=e}}function Ut(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Ht(){this.innerHTML=""}function Vt(e){return function(){this.innerHTML=e}}function Zt(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Wt(){this.nextSibling&&this.parentNode.appendChild(this)}function Gt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function qt(){return null}function Yt(){var e=this.parentNode;e&&e.removeChild(this)}function Kt(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Xt(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Qt(e){return function(){var t=this.__on;if(t){for(var n,r=0,i=-1,o=t.length;r<o;++r)n=t[r],e.type&&n.type!==e.type||n.name!==e.name?t[++i]=n:this.removeEventListener(n.type,n.listener,n.options);++i?t.length=i:delete this.__on}}}function Jt(e,t,n){return function(){var r,i=this.__on,o=function(e){return function(t){e.call(this,t,this.__data__)}}(t);if(i)for(var a=0,s=i.length;a<s;++a)if((r=i[a]).type===e.type&&r.name===e.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=o,r.options=n),void(r.value=t);this.addEventListener(e.type,o,n),r={type:e.type,name:e.name,value:t,listener:o,options:n},i?i.push(r):this.__on=[r]}}function en(e,t,n){var r=St(e),i=r.CustomEvent;"function"==typeof i?i=new i(t,n):(i=r.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function tn(e,t){return function(){return en(this,e,t)}}function nn(e,t){return function(){return en(this,e,t.apply(this,arguments))}}ht.prototype={constructor:ht,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}},Lt.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};var rn=[null];function on(e,t){this._groups=e,this._parents=t}function an(){return new on([[document.documentElement]],rn)}function sn(e){return"string"==typeof e?new on([[document.querySelector(e)]],[document.documentElement]):new on([[e]],rn)}function ln(e,t){if(e=function(e){let t;for(;t=e.sourceEvent;)e=t;return e}(e),void 0===t&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}on.prototype=an.prototype={constructor:on,select:function(e){"function"!=typeof e&&(e=nt(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o,a,s=t[i],l=s.length,c=r[i]=new Array(l),u=0;u<l;++u)(o=s[u])&&(a=e.call(o,o.__data__,u,s))&&("__data__"in o&&(a.__data__=o.__data__),c[u]=a);return new on(r,this._parents)},selectAll:function(e){e="function"==typeof e?function(e){return function(){return function(e){return null==e?[]:Array.isArray(e)?e:Array.from(e)}(e.apply(this,arguments))}}(e):it(e);for(var t=this._groups,n=t.length,r=[],i=[],o=0;o<n;++o)for(var a,s=t[o],l=s.length,c=0;c<l;++c)(a=s[c])&&(r.push(e.call(a,a.__data__,c,s)),i.push(a));return new on(r,i)},selectChild:function(e){return this.select(null==e?lt:function(e){return function(){return st.call(this.children,e)}}("function"==typeof e?e:at(e)))},selectChildren:function(e){return this.selectAll(null==e?ut:function(e){return function(){return ct.call(this.children,e)}}("function"==typeof e?e:at(e)))},filter:function(e){"function"!=typeof e&&(e=ot(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o,a=t[i],s=a.length,l=r[i]=[],c=0;c<s;++c)(o=a[c])&&e.call(o,o.__data__,c,a)&&l.push(o);return new on(r,this._parents)},data:function(e,t){if(!arguments.length)return Array.from(this,mt);var n=t?pt:ft,r=this._parents,i=this._groups;"function"!=typeof e&&(e=function(e){return function(){return e}}(e));for(var o=i.length,a=new Array(o),s=new Array(o),l=new Array(o),c=0;c<o;++c){var u=r[c],d=i[c],h=d.length,f=gt(e.call(u,u&&u.__data__,c,r)),p=f.length,m=s[c]=new Array(p),g=a[c]=new Array(p);n(u,d,m,g,l[c]=new Array(h),f,t);for(var v,y,b=0,w=0;b<p;++b)if(v=m[b]){for(b>=w&&(w=b+1);!(y=g[w])&&++w<p;);v._next=y||null}}return(a=new on(a,r))._enter=s,a._exit=l,a},enter:function(){return new on(this._enter||this._groups.map(dt),this._parents)},exit:function(){return new on(this._exit||this._groups.map(dt),this._parents)},join:function(e,t,n){var r=this.enter(),i=this,o=this.exit();return"function"==typeof e?(r=e(r))&&(r=r.selection()):r=r.append(e+""),null!=t&&(i=t(i))&&(i=i.selection()),null==n?o.remove():n(o),r&&i?r.merge(i).order():i},merge:function(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),l=0;l<a;++l)for(var c,u=n[l],d=r[l],h=u.length,f=s[l]=new Array(h),p=0;p<h;++p)(c=u[p]||d[p])&&(f[p]=c);for(;l<i;++l)s[l]=n[l];return new on(s,this._parents)},selection:function(){return this},order:function(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r,i=e[t],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=vt);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a,s=n[o],l=s.length,c=i[o]=new Array(l),u=0;u<l;++u)(a=s[u])&&(c[u]=a);c.sort(t)}return new on(i,this._parents).order()},call:function(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null},size:function(){let e=0;for(const t of this)++e;return e},empty:function(){return!this.node()},each:function(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i,o=t[n],a=0,s=o.length;a<s;++a)(i=o[a])&&e.call(i,i.__data__,a,o);return this},attr:function(e,t){var n=Xe(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==t?n.local?bt:yt:"function"==typeof t?n.local?xt:Et:n.local?_t:wt)(n,t))},style:function(e,t,n){return arguments.length>1?this.each((null==t?Tt:"function"==typeof t?At:Ot)(e,t,n??"")):Ct(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?kt:"function"==typeof t?Nt:Mt)(e,t)):this.node()[e]},classed:function(e,t){var n=Dt(e+"");if(arguments.length<2){for(var r=Rt(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof t?Bt:t?$t:zt)(n,t))},text:function(e){return arguments.length?this.each(null==e?jt:("function"==typeof e?Ut:Ft)(e)):this.node().textContent},html:function(e){return arguments.length?this.each(null==e?Ht:("function"==typeof e?Zt:Vt)(e)):this.node().innerHTML},raise:function(){return this.each(Wt)},lower:function(){return this.each(Gt)},append:function(e){var t="function"==typeof e?e:et(e);return this.select((function(){return this.appendChild(t.apply(this,arguments))}))},insert:function(e,t){var n="function"==typeof e?e:et(e),r=null==t?qt:"function"==typeof t?t:nt(t);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(Yt)},clone:function(e){return this.select(e?Xt:Kt)},datum:function(e){return arguments.length?this.property("__data__",e):this.node().__data__},on:function(e,t,n){var r,i,o=function(e){return e.trim().split(/^|\s+/).map((function(e){var t="",n=e.indexOf(".");return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}}))}(e+""),a=o.length;if(!(arguments.length<2)){for(s=t?Jt:Qt,r=0;r<a;++r)this.each(s(o[r],t,n));return this}var s=this.node().__on;if(s)for(var l,c=0,u=s.length;c<u;++c)for(r=0,l=s[c];r<a;++r)if((i=o[r]).type===l.type&&i.name===l.name)return l.value},dispatch:function(e,t){return this.each(("function"==typeof t?nn:tn)(e,t))},[Symbol.iterator]:function*(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r,i=e[t],o=0,a=i.length;o<a;++o)(r=i[o])&&(yield r)}};const cn={capture:!0,passive:!1};function un(e){e.preventDefault(),e.stopImmediatePropagation()}function dn(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function hn(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function fn(){}var pn=.7,mn=1/pn,gn="\\s*([+-]?\\d+)\\s*",vn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",yn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",bn=/^#([0-9a-f]{3,8})$/,wn=new RegExp(`^rgb\\(${gn},${gn},${gn}\\)$`),_n=new RegExp(`^rgb\\(${yn},${yn},${yn}\\)$`),En=new RegExp(`^rgba\\(${gn},${gn},${gn},${vn}\\)$`),xn=new RegExp(`^rgba\\(${yn},${yn},${yn},${vn}\\)$`),Sn=new RegExp(`^hsl\\(${vn},${yn},${yn}\\)$`),Tn=new RegExp(`^hsla\\(${vn},${yn},${yn},${vn}\\)$`),On={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 An(){return this.rgb().formatHex()}function Cn(){return this.rgb().formatRgb()}function kn(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=bn.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Mn(t):3===n?new Rn(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Nn(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Nn(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=wn.exec(e))?new Rn(t[1],t[2],t[3],1):(t=_n.exec(e))?new Rn(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=En.exec(e))?Nn(t[1],t[2],t[3],t[4]):(t=xn.exec(e))?Nn(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Sn.exec(e))?Bn(t[1],t[2]/100,t[3]/100,1):(t=Tn.exec(e))?Bn(t[1],t[2]/100,t[3]/100,t[4]):On.hasOwnProperty(e)?Mn(On[e]):"transparent"===e?new Rn(NaN,NaN,NaN,0):null}function Mn(e){return new Rn(e>>16&255,e>>8&255,255&e,1)}function Nn(e,t,n,r){return r<=0&&(e=t=n=NaN),new Rn(e,t,n,r)}function Dn(e,t,n,r){return 1===arguments.length?function(e){return e instanceof fn||(e=kn(e)),e?new Rn((e=e.rgb()).r,e.g,e.b,e.opacity):new Rn}(e):new Rn(e,t,n,r??1)}function Rn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Ln(){return`#${zn(this.r)}${zn(this.g)}${zn(this.b)}`}function Pn(){const e=In(this.opacity);return`${1===e?"rgb(":"rgba("}${$n(this.r)}, ${$n(this.g)}, ${$n(this.b)}${1===e?")":`, ${e})`}`}function In(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function $n(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function zn(e){return((e=$n(e))<16?"0":"")+e.toString(16)}function Bn(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Fn(e,t,n,r)}function jn(e){if(e instanceof Fn)return new Fn(e.h,e.s,e.l,e.opacity);if(e instanceof fn||(e=kn(e)),!e)return new Fn;if(e instanceof Fn)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new Fn(a,s,l,e.opacity)}function Fn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Un(e){return(e=(e||0)%360)<0?e+360:e}function Hn(e){return Math.max(0,Math.min(1,e||0))}function Vn(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}dn(fn,kn,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:An,formatHex:An,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return jn(this).formatHsl()},formatRgb:Cn,toString:Cn}),dn(Rn,Dn,hn(fn,{brighter(e){return e=null==e?mn:Math.pow(mn,e),new Rn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?pn:Math.pow(pn,e),new Rn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Rn($n(this.r),$n(this.g),$n(this.b),In(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:Ln,formatHex:Ln,formatHex8:function(){return`#${zn(this.r)}${zn(this.g)}${zn(this.b)}${zn(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Pn,toString:Pn})),dn(Fn,(function(e,t,n,r){return 1===arguments.length?jn(e):new Fn(e,t,n,r??1)}),hn(fn,{brighter(e){return e=null==e?mn:Math.pow(mn,e),new Fn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?pn:Math.pow(pn,e),new Fn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Rn(Vn(e>=240?e-240:e+120,i,r),Vn(e,i,r),Vn(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Fn(Un(this.h),Hn(this.s),Hn(this.l),In(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 e=In(this.opacity);return`${1===e?"hsl(":"hsla("}${Un(this.h)}, ${100*Hn(this.s)}%, ${100*Hn(this.l)}%${1===e?")":`, ${e})`}`}}));const Zn=e=>()=>e;function Wn(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):Zn(isNaN(e)?t:e)}const Gn=function e(t){var n=function(e){return 1==(e=+e)?Wn:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):Zn(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=Dn(e)).r,(t=Dn(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=Wn(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function qn(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,i=t.slice();return function(o){for(n=0;n<r;++n)i[n]=e[n]*(1-o)+t[n]*o;return i}}function Yn(e,t){var n,r=t?t.length:0,i=e?Math.min(r,e.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=nr(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<i;++n)a[n]=o[n](e);return a}}function Kn(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Xn(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Qn(e,t){var n,r={},i={};for(n in(null===e||"object"!=typeof e)&&(e={}),(null===t||"object"!=typeof t)&&(t={}),t)n in e?r[n]=nr(e[n],t[n]):i[n]=t[n];return function(e){for(n in r)i[n]=r[n](e);return i}}var Jn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,er=new RegExp(Jn.source,"g");function tr(e,t){var n,r,i,o=Jn.lastIndex=er.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=Jn.exec(e))&&(r=er.exec(t));)(i=r.index)>o&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:Xn(n,r)})),o=er.lastIndex;return o<t.length&&(i=t.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}function nr(e,t){var n,r=typeof t;return null==t||"boolean"===r?Zn(t):("number"===r?Xn:"string"===r?(n=kn(t))?(t=n,Gn):tr:t instanceof kn?Gn:t instanceof Date?Kn:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?qn:Array.isArray(t)?Yn:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?Qn:Xn)(e,t)}function rr(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var ir,or=180/Math.PI,ar={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function sr(e,t,n,r,i,o){var a,s,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,l/=s),e*r<t*n&&(e=-e,t=-t,l=-l,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*or,skewX:Math.atan(l)*or,scaleX:a,scaleY:s}}function lr(e,t,n,r){function i(e){return e.length?e.pop()+" ":""}return function(o,a){var s=[],l=[];return o=e(o),a=e(a),function(e,r,i,o,a,s){if(e!==i||r!==o){var l=a.push("translate(",null,t,null,n);s.push({i:l-4,x:Xn(e,i)},{i:l-2,x:Xn(r,o)})}else(i||o)&&a.push("translate("+i+t+o+n)}(o.translateX,o.translateY,a.translateX,a.translateY,s,l),function(e,t,n,o){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),o.push({i:n.push(i(n)+"rotate(",null,r)-2,x:Xn(e,t)})):t&&n.push(i(n)+"rotate("+t+r)}(o.rotate,a.rotate,s,l),function(e,t,n,o){e!==t?o.push({i:n.push(i(n)+"skewX(",null,r)-2,x:Xn(e,t)}):t&&n.push(i(n)+"skewX("+t+r)}(o.skewX,a.skewX,s,l),function(e,t,n,r,o,a){if(e!==n||t!==r){var s=o.push(i(o)+"scale(",null,",",null,")");a.push({i:s-4,x:Xn(e,n)},{i:s-2,x:Xn(t,r)})}else(1!==n||1!==r)&&o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,s,l),o=a=null,function(e){for(var t,n=-1,r=l.length;++n<r;)s[(t=l[n]).i]=t.x(e);return s.join("")}}}var cr,ur,dr=lr((function(e){const t=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?ar:sr(t.a,t.b,t.c,t.d,t.e,t.f)}),"px, ","px)","deg)"),hr=lr((function(e){return null!=e&&(ir||(ir=document.createElementNS("http://www.w3.org/2000/svg","g")),ir.setAttribute("transform",e),e=ir.transform.baseVal.consolidate())?sr((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):ar}),", ",")",")"),fr=0,pr=0,mr=0,gr=1e3,vr=0,yr=0,br=0,wr="object"==typeof performance&&performance.now?performance:Date,_r="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Er(){return yr||(_r(xr),yr=wr.now()+br)}function xr(){yr=0}function Sr(){this._call=this._time=this._next=null}function Tr(e,t,n){var r=new Sr;return r.restart(e,t,n),r}function Or(){yr=(vr=wr.now())+br,fr=pr=0;try{!function(){Er(),++fr;for(var e,t=cr;t;)(e=yr-t._time)>=0&&t._call.call(void 0,e),t=t._next;--fr}()}finally{fr=0,function(){for(var e,t,n=cr,r=1/0;n;)n._call?(r>n._time&&(r=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:cr=t);ur=e,Cr(r)}(),yr=0}}function Ar(){var e=wr.now(),t=e-vr;t>gr&&(br-=t,vr=e)}function Cr(e){fr||(pr&&(pr=clearTimeout(pr)),e-yr>24?(e<1/0&&(pr=setTimeout(Or,e-wr.now()-br)),mr&&(mr=clearInterval(mr))):(mr||(vr=wr.now(),mr=setInterval(Ar,gr)),fr=1,_r(Or)))}function kr(e,t,n){var r=new Sr;return t=null==t?0:+t,r.restart((n=>{r.stop(),e(n+t)}),t,n),r}Sr.prototype=Tr.prototype={constructor:Sr,restart:function(e,t,n){if("function"!=typeof e)throw new TypeError("callback is not a function");n=(null==n?Er():+n)+(null==t?0:+t),!this._next&&ur!==this&&(ur?ur._next=this:cr=this,ur=this),this._call=e,this._time=n,Cr()},stop:function(){this._call&&(this._call=null,this._time=1/0,Cr())}};var Mr=Ze("start","end","cancel","interrupt"),Nr=[],Dr=0,Rr=2,Lr=3,Pr=5,Ir=6;function $r(e,t,n,r,i,o){var a=e.__transition;if(a){if(n in a)return}else e.__transition={};!function(e,t,n){var r,i=e.__transition;function o(l){var c,u,d,h;if(1!==n.state)return s();for(c in i)if((h=i[c]).name===n.name){if(h.state===Lr)return kr(o);4===h.state?(h.state=Ir,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete i[c]):+c<t&&(h.state=Ir,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete i[c])}if(kr((function(){n.state===Lr&&(n.state=4,n.timer.restart(a,n.delay,n.time),a(l))})),n.state=Rr,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Rr){for(n.state=Lr,r=new Array(d=n.tween.length),c=0,u=-1;c<d;++c)(h=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(r[++u]=h);r.length=u+1}}function a(t){for(var i=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(s),n.state=Pr,1),o=-1,a=r.length;++o<a;)r[o].call(e,i);n.state===Pr&&(n.on.call("end",e,e.__data__,n.index,n.group),s())}function s(){for(var r in n.state=Ir,n.timer.stop(),delete i[t],i)return;delete e.__transition}i[t]=n,n.timer=Tr((function(e){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=e&&o(e-n.delay)}),0,n.time)}(e,n,{name:t,index:r,group:i,on:Mr,tween:Nr,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Dr})}function zr(e,t){var n=jr(e,t);if(n.state>Dr)throw new Error("too late; already scheduled");return n}function Br(e,t){var n=jr(e,t);if(n.state>Lr)throw new Error("too late; already running");return n}function jr(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function Fr(e,t){var n,r,i,o=e.__transition,a=!0;if(o){for(i in t=null==t?null:t+"",o)(n=o[i]).name===t?(r=n.state>Rr&&n.state<Pr,n.state=Ir,n.timer.stop(),n.on.call(r?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete o[i]):a=!1;a&&delete e.__transition}}function Ur(e,t){var n,r;return function(){var i=Br(this,e),o=i.tween;if(o!==n)for(var a=0,s=(r=n=o).length;a<s;++a)if(r[a].name===t){(r=r.slice()).splice(a,1);break}i.tween=r}}function Hr(e,t,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var o=Br(this,e),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:t,value:n},l=0,c=i.length;l<c;++l)if(i[l].name===t){i[l]=s;break}l===c&&i.push(s)}o.tween=i}}function Vr(e,t,n){var r=e._id;return e.each((function(){var e=Br(this,r);(e.value||(e.value={}))[t]=n.apply(this,arguments)})),function(e){return jr(e,r).value[t]}}function Zr(e,t){var n;return("number"==typeof t?Xn:t instanceof kn?Gn:(n=kn(t))?(t=n,Gn):tr)(e,t)}function Wr(e){return function(){this.removeAttribute(e)}}function Gr(e){return function(){this.removeAttributeNS(e.space,e.local)}}function qr(e,t,n){var r,i,o=n+"";return function(){var a=this.getAttribute(e);return a===o?null:a===r?i:i=t(r=a,n)}}function Yr(e,t,n){var r,i,o=n+"";return function(){var a=this.getAttributeNS(e.space,e.local);return a===o?null:a===r?i:i=t(r=a,n)}}function Kr(e,t,n){var r,i,o;return function(){var a,s,l=n(this);return null==l?void this.removeAttribute(e):(a=this.getAttribute(e))===(s=l+"")?null:a===r&&s===i?o:(i=s,o=t(r=a,l))}}function Xr(e,t,n){var r,i,o;return function(){var a,s,l=n(this);return null==l?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local))===(s=l+"")?null:a===r&&s===i?o:(i=s,o=t(r=a,l))}}function Qr(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&function(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}(e,i)),n}return i._value=t,i}function Jr(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&function(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}(e,i)),n}return i._value=t,i}function ei(e,t){return function(){zr(this,e).delay=+t.apply(this,arguments)}}function ti(e,t){return t=+t,function(){zr(this,e).delay=t}}function ni(e,t){return function(){Br(this,e).duration=+t.apply(this,arguments)}}function ri(e,t){return t=+t,function(){Br(this,e).duration=t}}var ii=an.prototype.constructor;function oi(e){return function(){this.style.removeProperty(e)}}var ai=0;function si(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function li(){return++ai}var ci=an.prototype;si.prototype={constructor:si,select:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=nt(e));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s,l,c=r[a],u=c.length,d=o[a]=new Array(u),h=0;h<u;++h)(s=c[h])&&(l=e.call(s,s.__data__,h,c))&&("__data__"in s&&(l.__data__=s.__data__),d[h]=l,$r(d[h],t,n,h,d,jr(s,n)));return new si(o,this._parents,t,n)},selectAll:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=it(e));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var l,c=r[s],u=c.length,d=0;d<u;++d)if(l=c[d]){for(var h,f=e.call(l,l.__data__,d,c),p=jr(l,n),m=0,g=f.length;m<g;++m)(h=f[m])&&$r(h,t,n,m,f,p);o.push(f),a.push(l)}return new si(o,a,t,n)},selectChild:ci.selectChild,selectChildren:ci.selectChildren,filter:function(e){"function"!=typeof e&&(e=ot(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o,a=t[i],s=a.length,l=r[i]=[],c=0;c<s;++c)(o=a[c])&&e.call(o,o.__data__,c,a)&&l.push(o);return new si(r,this._parents,this._name,this._id)},merge:function(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var l,c=t[s],u=n[s],d=c.length,h=a[s]=new Array(d),f=0;f<d;++f)(l=c[f]||u[f])&&(h[f]=l);for(;s<r;++s)a[s]=t[s];return new si(a,this._parents,this._name,this._id)},selection:function(){return new ii(this._groups,this._parents)},transition:function(){for(var e=this._name,t=this._id,n=li(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],l=s.length,c=0;c<l;++c)if(a=s[c]){var u=jr(a,t);$r(a,e,n,c,s,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new si(r,this._parents,e,n)},call:ci.call,nodes:ci.nodes,node:ci.node,size:ci.size,empty:ci.empty,each:ci.each,on:function(e,t){var n=this._id;return arguments.length<2?jr(this.node(),n).on.on(e):this.each(function(e,t,n){var r,i,o=function(e){return(e+"").trim().split(/^|\s+/).every((function(e){var t=e.indexOf(".");return t>=0&&(e=e.slice(0,t)),!e||"start"===e}))}(t)?zr:Br;return function(){var a=o(this,e),s=a.on;s!==r&&(i=(r=s).copy()).on(t,n),a.on=i}}(n,e,t))},attr:function(e,t){var n=Xe(e),r="transform"===n?hr:Zr;return this.attrTween(e,"function"==typeof t?(n.local?Xr:Kr)(n,r,Vr(this,"attr."+e,t)):null==t?(n.local?Gr:Wr)(n):(n.local?Yr:qr)(n,r,t))},attrTween:function(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;var r=Xe(e);return this.tween(n,(r.local?Qr:Jr)(r,t))},style:function(e,t,n){var r="transform"==(e+="")?dr:Zr;return null==t?this.styleTween(e,function(e,t){var n,r,i;return function(){var o=Ct(this,e),a=(this.style.removeProperty(e),Ct(this,e));return o===a?null:o===n&&a===r?i:i=t(n=o,r=a)}}(e,r)).on("end.style."+e,oi(e)):"function"==typeof t?this.styleTween(e,function(e,t,n){var r,i,o;return function(){var a=Ct(this,e),s=n(this),l=s+"";return null==s&&(this.style.removeProperty(e),l=s=Ct(this,e)),a===l?null:a===r&&l===i?o:(i=l,o=t(r=a,s))}}(e,r,Vr(this,"style."+e,t))).each(function(e,t){var n,r,i,o,a="style."+t,s="end."+a;return function(){var l=Br(this,e),c=l.on,u=null==l.value[a]?o||(o=oi(t)):void 0;(c!==n||i!==u)&&(r=(n=c).copy()).on(s,i=u),l.on=r}}(this._id,e)):this.styleTween(e,function(e,t,n){var r,i,o=n+"";return function(){var a=Ct(this,e);return a===o?null:a===r?i:i=t(r=a,n)}}(e,r,t),n).on("end.style."+e,null)},styleTween:function(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==t)return this.tween(r,null);if("function"!=typeof t)throw new Error;return this.tween(r,function(e,t,n){var r,i;function o(){var o=t.apply(this,arguments);return o!==i&&(r=(i=o)&&function(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}(e,o,n)),r}return o._value=t,o}(e,t,n??""))},text:function(e){return this.tween("text","function"==typeof e?function(e){return function(){var t=e(this);this.textContent=t??""}}(Vr(this,"text",e)):function(e){return function(){this.textContent=e}}(null==e?"":e+""))},textTween:function(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(null==e)return this.tween(t,null);if("function"!=typeof e)throw new Error;return this.tween(t,function(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&function(e){return function(t){this.textContent=e.call(this,t)}}(r)),t}return r._value=e,r}(e))},remove:function(){return this.on("end.remove",(e=this._id,function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}));var e},tween:function(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r,i=jr(this.node(),n).tween,o=0,a=i.length;o<a;++o)if((r=i[o]).name===e)return r.value;return null}return this.each((null==t?Ur:Hr)(n,e,t))},delay:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?ei:ti)(t,e)):jr(this.node(),t).delay},duration:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?ni:ri)(t,e)):jr(this.node(),t).duration},ease:function(e){var t=this._id;return arguments.length?this.each(function(e,t){if("function"!=typeof t)throw new Error;return function(){Br(this,e).ease=t}}(t,e)):jr(this.node(),t).ease},easeVarying:function(e){if("function"!=typeof e)throw new Error;return this.each(function(e,t){return function(){var n=t.apply(this,arguments);if("function"!=typeof n)throw new Error;Br(this,e).ease=n}}(this._id,e))},end:function(){var e,t,n=this,r=n._id,i=n.size();return new Promise((function(o,a){var s={value:a},l={value:function(){0==--i&&o()}};n.each((function(){var n=Br(this,r),i=n.on;i!==e&&((t=(e=i).copy())._.cancel.push(s),t._.interrupt.push(s),t._.end.push(l)),n.on=t})),0===i&&o()}))},[Symbol.iterator]:ci[Symbol.iterator]};const ui=e=>+e;function di(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var hi={time:null,delay:0,duration:250,ease:di};function fi(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}an.prototype.interrupt=function(e){return this.each((function(){Fr(this,e)}))},an.prototype.transition=function(e){var t,n;e instanceof si?(t=e._id,e=e._name):(t=li(),(n=hi).time=Er(),e=null==e?null:e+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],l=s.length,c=0;c<l;++c)(a=s[c])&&$r(a,e,t,c,s,n||fi(a,t));return new si(r,this._parents,e,t)};const pi=e=>()=>e;function mi(e,{sourceEvent:t,target:n,selection:r,mode:i,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},selection:{value:r,enumerable:!0,configurable:!0},mode:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function gi(e){e.preventDefault(),e.stopImmediatePropagation()}var vi={name:"drag"},yi={name:"space"},bi={name:"handle"},wi={name:"center"};const{abs:_i,max:Ei,min:xi}=Math;function Si(e){return[+e[0],+e[1]]}function Ti(e){return[Si(e[0]),Si(e[1])]}var Oi={name:"x",handles:["w","e"].map(Ri),input:function(e,t){return null==e?null:[[+e[0],t[0][1]],[+e[1],t[1][1]]]},output:function(e){return e&&[e[0][0],e[1][0]]}},Ai={name:"y",handles:["n","s"].map(Ri),input:function(e,t){return null==e?null:[[t[0][0],+e[0]],[t[1][0],+e[1]]]},output:function(e){return e&&[e[0][1],e[1][1]]}},Ci={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"},ki={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},Mi={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},Ni={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},Di={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Ri(e){return{type:e}}function Li(e){return!e.ctrlKey&&!e.button}function Pi(){var e=this.ownerSVGElement||this;return e.hasAttribute("viewBox")?[[(e=e.viewBox.baseVal).x,e.y],[e.x+e.width,e.y+e.height]]:[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]}function Ii(){return navigator.maxTouchPoints||"ontouchstart"in this}function $i(e){for(;!e.__brush;)if(!(e=e.parentNode))return;return e.__brush}function zi(){return function(e){var t,n=Pi,r=Li,i=Ii,o=!0,a=Ze("start","brush","end"),s=6;function l(t){var n=t.property("__brush",m).selectAll(".overlay").data([Ri("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Ci.overlay).merge(n).each((function(){var e=$i(this).extent;sn(this).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(".selection").data([Ri("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Ci.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=t.selectAll(".handle").data(e.handles,(function(e){return e.type}));r.exit().remove(),r.enter().append("rect").attr("class",(function(e){return"handle handle--"+e.type})).attr("cursor",(function(e){return Ci[e.type]})),t.each(c).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",h).filter(i).on("touchstart.brush",h).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 e=sn(this),t=$i(this).selection;t?(e.selectAll(".selection").style("display",null).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(".handle").style("display",null).attr("x",(function(e){return"e"===e.type[e.type.length-1]?t[1][0]-s/2:t[0][0]-s/2})).attr("y",(function(e){return"s"===e.type[0]?t[1][1]-s/2:t[0][1]-s/2})).attr("width",(function(e){return"n"===e.type||"s"===e.type?t[1][0]-t[0][0]+s:s})).attr("height",(function(e){return"e"===e.type||"w"===e.type?t[1][1]-t[0][1]+s:s}))):e.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function u(e,t,n){var r=e.__brush.emitter;return!r||n&&r.clean?new d(e,t,n):r}function d(e,t,n){this.that=e,this.args=t,this.state=e.__brush,this.active=0,this.clean=n}function h(n){if((!t||n.touches)&&r.apply(this,arguments)){var i,a,s,l,d,h,f,p,m,g,v,y=this,b=n.target.__data__.type,w="selection"===(o&&n.metaKey?b="overlay":b)?vi:o&&n.altKey?wi:bi,_=e===Ai?null:Ni[b],E=e===Oi?null:Di[b],x=$i(y),S=x.extent,T=x.selection,O=S[0][0],A=S[0][1],C=S[1][0],k=S[1][1],M=0,N=0,D=_&&E&&o&&n.shiftKey,R=Array.from(n.touches||[n],(e=>{const t=e.identifier;return(e=ln(e,y)).point0=e.slice(),e.identifier=t,e}));Fr(y);var L=u(y,arguments,!0).beforestart();if("overlay"===b){T&&(m=!0);const t=[R[0],R[1]||R[0]];x.selection=T=[[i=e===Ai?O:xi(t[0][0],t[1][0]),s=e===Oi?A:xi(t[0][1],t[1][1])],[d=e===Ai?C:Ei(t[0][0],t[1][0]),f=e===Oi?k:Ei(t[0][1],t[1][1])]],R.length>1&&B(n)}else i=T[0][0],s=T[0][1],d=T[1][0],f=T[1][1];a=i,l=s,h=d,p=f;var P=sn(y).attr("pointer-events","none"),I=P.selectAll(".overlay").attr("cursor",Ci[b]);if(n.touches)L.moved=z,L.ended=j;else{var $=sn(n.view).on("mousemove.brush",z,!0).on("mouseup.brush",j,!0);o&&$.on("keydown.brush",(function(e){switch(e.keyCode){case 16:D=_&&E;break;case 18:w===bi&&(_&&(d=h-M*_,i=a+M*_),E&&(f=p-N*E,s=l+N*E),w=wi,B(e));break;case 32:(w===bi||w===wi)&&(_<0?d=h-M:_>0&&(i=a-M),E<0?f=p-N:E>0&&(s=l-N),w=yi,I.attr("cursor",Ci.selection),B(e));break;default:return}gi(e)}),!0).on("keyup.brush",(function(e){switch(e.keyCode){case 16:D&&(g=v=D=!1,B(e));break;case 18:w===wi&&(_<0?d=h:_>0&&(i=a),E<0?f=p:E>0&&(s=l),w=bi,B(e));break;case 32:w===yi&&(e.altKey?(_&&(d=h-M*_,i=a+M*_),E&&(f=p-N*E,s=l+N*E),w=wi):(_<0?d=h:_>0&&(i=a),E<0?f=p:E>0&&(s=l),w=bi),I.attr("cursor",Ci[b]),B(e));break;default:return}gi(e)}),!0),function(e){var t=e.document.documentElement,n=sn(e).on("dragstart.drag",un,cn);"onselectstart"in t?n.on("selectstart.drag",un,cn):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}(n.view)}c.call(y),L.start(n,w.name)}function z(e){for(const t of e.changedTouches||[e])for(const e of R)e.identifier===t.identifier&&(e.cur=ln(t,y));if(D&&!g&&!v&&1===R.length){const e=R[0];_i(e.cur[0]-e[0])>_i(e.cur[1]-e[1])?v=!0:g=!0}for(const e of R)e.cur&&(e[0]=e.cur[0],e[1]=e.cur[1]);m=!0,gi(e),B(e)}function B(e){const t=R[0],n=t.point0;var r;switch(M=t[0]-n[0],N=t[1]-n[1],w){case yi:case vi:_&&(M=Ei(O-i,xi(C-d,M)),a=i+M,h=d+M),E&&(N=Ei(A-s,xi(k-f,N)),l=s+N,p=f+N);break;case bi:R[1]?(_&&(a=Ei(O,xi(C,R[0][0])),h=Ei(O,xi(C,R[1][0])),_=1),E&&(l=Ei(A,xi(k,R[0][1])),p=Ei(A,xi(k,R[1][1])),E=1)):(_<0?(M=Ei(O-i,xi(C-i,M)),a=i+M,h=d):_>0&&(M=Ei(O-d,xi(C-d,M)),a=i,h=d+M),E<0?(N=Ei(A-s,xi(k-s,N)),l=s+N,p=f):E>0&&(N=Ei(A-f,xi(k-f,N)),l=s,p=f+N));break;case wi:_&&(a=Ei(O,xi(C,i-M*_)),h=Ei(O,xi(C,d+M*_))),E&&(l=Ei(A,xi(k,s-N*E)),p=Ei(A,xi(k,f+N*E)))}h<a&&(_*=-1,r=i,i=d,d=r,r=a,a=h,h=r,b in ki&&I.attr("cursor",Ci[b=ki[b]])),p<l&&(E*=-1,r=s,s=f,f=r,r=l,l=p,p=r,b in Mi&&I.attr("cursor",Ci[b=Mi[b]])),x.selection&&(T=x.selection),g&&(a=T[0][0],h=T[1][0]),v&&(l=T[0][1],p=T[1][1]),(T[0][0]!==a||T[0][1]!==l||T[1][0]!==h||T[1][1]!==p)&&(x.selection=[[a,l],[h,p]],c.call(y),L.brush(e,w.name))}function j(e){if(function(e){e.stopImmediatePropagation()}(e),e.touches){if(e.touches.length)return;t&&clearTimeout(t),t=setTimeout((function(){t=null}),500)}else(function(e,t){var n=e.document.documentElement,r=sn(e).on("dragstart.drag",null);t&&(r.on("click.drag",un,cn),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)})(e.view,m),$.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);P.attr("pointer-events","all"),I.attr("cursor",Ci.overlay),x.selection&&(T=x.selection),function(e){return e[0][0]===e[1][0]||e[0][1]===e[1][1]}(T)&&(x.selection=null,c.call(y)),L.end(e,w.name)}}function f(e){u(this,arguments).moved(e)}function p(e){u(this,arguments).ended(e)}function m(){var t=this.__brush||{selection:null};return t.extent=Ti(n.apply(this,arguments)),t.dim=e,t}return l.move=function(t,n,r){t.tween?t.on("start.brush",(function(e){u(this,arguments).beforestart().start(e)})).on("interrupt.brush end.brush",(function(e){u(this,arguments).end(e)})).tween("brush",(function(){var t=this,r=t.__brush,i=u(t,arguments),o=r.selection,a=e.input("function"==typeof n?n.apply(this,arguments):n,r.extent),s=nr(o,a);function l(e){r.selection=1===e&&null===a?null:s(e),c.call(t),i.brush()}return null!==o&&null!==a?l:l(1)})):t.each((function(){var t=this,i=arguments,o=t.__brush,a=e.input("function"==typeof n?n.apply(t,i):n,o.extent),s=u(t,i).beforestart();Fr(t),o.selection=null===a?null:a,c.call(t),s.start(r).brush(r).end(r)}))},l.clear=function(e,t){l.move(e,null,t)},d.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(e,t){return this.starting?(this.starting=!1,this.emit("start",e,t)):this.emit("brush",e),this},brush:function(e,t){return this.emit("brush",e,t),this},end:function(e,t){return 0==--this.active&&(delete this.state.emitter,this.emit("end",e,t)),this},emit:function(t,n,r){var i=sn(this.that).datum();a.call(t,this.that,new mi(t,{sourceEvent:n,target:l,selection:e.output(this.state.selection),mode:r,dispatch:a}),i)}},l.extent=function(e){return arguments.length?(n="function"==typeof e?e:pi(Ti(e)),l):n},l.filter=function(e){return arguments.length?(r="function"==typeof e?e:pi(!!e),l):r},l.touchable=function(e){return arguments.length?(i="function"==typeof e?e:pi(!!e),l):i},l.handleSize=function(e){return arguments.length?(s=+e,l):s},l.keyModifiers=function(e){return arguments.length?(o=!!e,l):o},l.on=function(){var e=a.on.apply(a,arguments);return e===a?l:e},l}(Oi)}const Bi=Math.PI,ji=2*Bi,Fi=1e-6,Ui=ji-Fi;function Hi(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}let Vi=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?Hi:function(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Hi;const n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,o){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+o}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,(i=+i)<0)throw new Error(`negative radius: ${i}`);let o=this._x1,a=this._y1,s=n-e,l=r-t,c=o-e,u=a-t,d=c*c+u*u;if(null===this._x1)this._append`M${this._x1=e},${this._y1=t}`;else if(d>Fi)if(Math.abs(u*s-l*c)>Fi&&i){let h=n-o,f=r-a,p=s*s+l*l,m=h*h+f*f,g=Math.sqrt(p),v=Math.sqrt(d),y=i*Math.tan((Bi-Math.acos((p+d-m)/(2*g*v)))/2),b=y/v,w=y/g;Math.abs(b-1)>Fi&&this._append`L${e+b*c},${t+b*u}`,this._append`A${i},${i},0,0,${+(u*h>c*f)},${this._x1=e+w*s},${this._y1=t+w*l}`}else this._append`L${this._x1=e},${this._y1=t}`}arc(e,t,n,r,i,o){if(e=+e,t=+t,o=!!o,(n=+n)<0)throw new Error(`negative radius: ${n}`);let a=n*Math.cos(r),s=n*Math.sin(r),l=e+a,c=t+s,u=1^o,d=o?r-i:i-r;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>Fi||Math.abs(this._y1-c)>Fi)&&this._append`L${l},${c}`,n&&(d<0&&(d=d%ji+ji),d>Ui?this._append`A${n},${n},0,1,${u},${e-a},${t-s}A${n},${n},0,1,${u},${this._x1=l},${this._y1=c}`:d>Fi&&this._append`A${n},${n},0,${+(d>=Bi)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};function Zi(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Wi(e){return(e=Zi(Math.abs(e)))?e[1]:NaN}Vi.prototype;var Gi,qi=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Yi(e){if(!(t=qi.exec(e)))throw new Error("invalid format: "+e);var t;return new Ki({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function Ki(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function Xi(e,t){var n=Zi(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}Yi.prototype=Ki.prototype,Ki.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 Qi={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Xi(100*e,t),r:Xi,s:function(e,t){var n=Zi(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(Gi=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Zi(e,Math.max(0,t+o-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Ji(e){return e}var eo,to,no,ro=Array.prototype.map,io=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];eo=function(e){var t=void 0===e.grouping||void 0===e.thousands?Ji:function(e,t){return function(n,r){for(var i=n.length,o=[],a=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(n.substring(i-=s,i+s)),!((l+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}(ro.call(e.grouping,Number),e.thousands+""),n=void 0===e.currency?"":e.currency[0]+"",r=void 0===e.currency?"":e.currency[1]+"",i=void 0===e.decimal?".":e.decimal+"",o=void 0===e.numerals?Ji:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(ro.call(e.numerals,String)),a=void 0===e.percent?"%":e.percent+"",s=void 0===e.minus?"−":e.minus+"",l=void 0===e.nan?"NaN":e.nan+"";function c(e){var c=(e=Yi(e)).fill,u=e.align,d=e.sign,h=e.symbol,f=e.zero,p=e.width,m=e.comma,g=e.precision,v=e.trim,y=e.type;"n"===y?(m=!0,y="g"):Qi[y]||(void 0===g&&(g=12),v=!0,y="g"),(f||"0"===c&&"="===u)&&(f=!0,c="0",u="=");var b="$"===h?n:"#"===h&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",w="$"===h?r:/[%p]/.test(y)?a:"",_=Qi[y],E=/[defgprs%]/.test(y);function x(e){var n,r,a,h=b,x=w;if("c"===y)x=_(e)+x,e="";else{var S=(e=+e)<0||1/e<0;if(e=isNaN(e)?l:_(Math.abs(e),g),v&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r<n;++r)switch(e[r]){case".":i=t=r;break;case"0":0===i&&(i=r),t=r;break;default:if(!+e[r])break e;i>0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),S&&0==+e&&"+"!==d&&(S=!1),h=(S?"("===d?d:s:"-"===d||"("===d?"":d)+h,x=("s"===y?io[8+Gi/3]:"")+x+(S&&"("===d?")":""),E)for(n=-1,r=e.length;++n<r;)if(48>(a=e.charCodeAt(n))||a>57){x=(46===a?i+e.slice(n+1):e.slice(n))+x,e=e.slice(0,n);break}}m&&!f&&(e=t(e,1/0));var T=h.length+e.length+x.length,O=T<p?new Array(p-T+1).join(c):"";switch(m&&f&&(e=t(O+e,O.length?p-x.length:1/0),O=""),u){case"<":e=h+e+x+O;break;case"=":e=h+O+e+x;break;case"^":e=O.slice(0,T=O.length>>1)+h+e+x+O.slice(T);break;default:e=O+h+e+x}return o(e)}return g=void 0===g?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),x.toString=function(){return e+""},x}return{format:c,formatPrefix:function(e,t){var n=c(((e=Yi(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(Wi(t)/3))),i=Math.pow(10,-r),o=io[8+r/3];return function(e){return n(i*e)+o}}}}({thousands:",",grouping:[3],currency:["$",""]}),to=eo.format,no=eo.formatPrefix;var oo=1e-6,ao=Math.PI,so=ao/2,lo=2*ao,co=ao/180,uo=Math.abs,ho=Math.atan,fo=(Math.atan2,Math.cos),po=(Math.exp,Math.log,Math.sin),mo=(Math.sign,Math.sqrt);Math.tan;function go(e,t){return uo(e)>ao&&(e-=Math.round(e/lo)*lo),[e,t]}function vo(){}function yo(e,t){return[e,t]}go.invert=go,new he,new he,new he,vo.prototype={constructor:vo,point:function(e,t){this.stream.point(e,t)},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()}},fo(30*co),yo.invert=yo;mo(3);function bo(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function wo(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=Eo)):void 0===t&&(t=_o);for(var n,r,i,o,a,s=new To(e),l=[s];n=l.pop();)if((i=t(n.data))&&(a=(i=Array.from(i)).length))for(n.children=i,o=a-1;o>=0;--o)l.push(r=i[o]=new To(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(So)}function _o(e){return e.children}function Eo(e){return Array.isArray(e)?e[1]:null}function xo(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function So(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function To(e){this.data=e,this.depth=this.height=0,this.parent=null}function Oo(e,t,n,r,i){for(var o,a=e.children,s=-1,l=a.length,c=e.value&&(r-t)/e.value;++s<l;)(o=a[s]).y0=n,o.y1=i,o.x0=t,o.x1=t+=o.value*c}function Ao(e,t,n,r,i){for(var o,a=e.children,s=-1,l=a.length,c=e.value&&(i-n)/e.value;++s<l;)(o=a[s]).x0=t,o.x1=r,o.y0=n,o.y1=n+=o.value*c}function Co(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}To.prototype=wo.prototype={constructor:To,count:function(){return this.eachAfter(bo)},each:function(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,i,o=this,a=[o],s=[],l=-1;o=a.pop();)if(s.push(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r]);for(;o=s.pop();)e.call(t,o,++l,this);return this},eachBefore:function(e,t){for(var n,r,i=this,o=[i],a=-1;i=o.pop();)if(e.call(t,i,++a,this),n=i.children)for(r=n.length-1;r>=0;--r)o.push(n[r]);return this},find:function(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(n){n!==e&&t.push({source:n.parent,target:n})})),t},copy:function(){return wo(this).eachBefore(xo)},[Symbol.iterator]:function*(){var e,t,n,r,i=this,o=[i];do{for(e=o.reverse(),o=[];i=e.pop();)if(yield i,t=i.children)for(n=0,r=t.length;n<r;++n)o.push(t[n])}while(o.length)}},Object.create(To.prototype),function e(t){function n(e,n,r,i,o){!function(e,t,n,r,i,o){for(var a,s,l,c,u,d,h,f,p,m,g,v=[],y=t.children,b=0,w=0,_=y.length,E=t.value;b<_;){l=i-n,c=o-r;do{u=y[w++].value}while(!u&&w<_);for(d=h=u,g=u*u*(m=Math.max(c/l,l/c)/(E*e)),p=Math.max(h/g,g/d);w<_;++w){if(u+=s=y[w].value,s<d&&(d=s),s>h&&(h=s),g=u*u*m,(f=Math.max(h/g,g/d))>p){u-=s;break}p=f}v.push(a={value:u,dice:l<c,children:y.slice(b,w)}),a.dice?Oo(a,n,r,i,E?r+=c*u/E:o):Ao(a,n,r,E?n+=l*u/E:i,o),E-=u,b=w}}(t,e,n,r,i,o)}return n.ratio=function(t){return e((t=+t)>1?t:1)},n}((1+Math.sqrt(5))/2);const ko=Symbol("implicit");function Mo(){var e=new fe,t=[],n=[],r=ko;function i(i){let o=e.get(i);if(void 0===o){if(r!==ko)return r;e.set(i,o=t.push(i)-1)}return n[o%n.length]}return i.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new fe;for(const r of n)e.has(r)||e.set(r,t.push(r)-1);return i},i.range=function(e){return arguments.length?(n=Array.from(e),i):n.slice()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return Mo(t,n).unknown(r)},Co.apply(i,arguments),i}function No(){var e,t,n=Mo().unknown(void 0),r=n.domain,i=n.range,o=0,a=1,s=!1,l=0,c=0,u=.5;function d(){var n=r().length,d=a<o,h=d?a:o,f=d?o:a;e=(f-h)/Math.max(1,n-l+2*c),s&&(e=Math.floor(e)),h+=(f-h-e*(n-l))*u,t=e*(1-l),s&&(h=Math.round(h),t=Math.round(t));var p=function(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((t-e)/n)),o=new Array(i);++r<i;)o[r]=e+r*n;return o}(n).map((function(t){return h+e*t}));return i(d?p.reverse():p)}return delete n.unknown,n.domain=function(e){return arguments.length?(r(e),d()):r()},n.range=function(e){return arguments.length?([o,a]=e,o=+o,a=+a,d()):[o,a]},n.rangeRound=function(e){return[o,a]=e,o=+o,a=+a,s=!0,d()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(s=!!e,d()):s},n.padding=function(e){return arguments.length?(l=Math.min(1,c=+e),d()):l},n.paddingInner=function(e){return arguments.length?(l=Math.min(1,e),d()):l},n.paddingOuter=function(e){return arguments.length?(c=+e,d()):c},n.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),d()):u},n.copy=function(){return No(r(),[o,a]).round(s).paddingInner(l).paddingOuter(c).align(u)},Co.apply(d(),arguments)}function Do(e){return+e}var Ro=[0,1];function Lo(e){return e}function Po(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function Io(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=Po(i,r),o=n(a,o)):(r=Po(r,i),o=n(o,a)),function(e){return o(r(e))}}function $o(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=Po(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(t){var n=ue(e,t,1,r)-1;return o[n](i[n](t))}}function zo(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Bo(){var e,t,n,r,i,o,a=Ro,s=Ro,l=nr,c=Lo;function u(){var e=Math.min(a.length,s.length);return c!==Lo&&(c=function(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}(a[0],a[e-1])),r=e>2?$o:Io,i=o=null,d}function d(t){return null==t||isNaN(t=+t)?n:(i||(i=r(a.map(e),s,l)))(e(c(t)))}return d.invert=function(n){return c(t((o||(o=r(s,a.map(e),Xn)))(n)))},d.domain=function(e){return arguments.length?(a=Array.from(e,Do),u()):a.slice()},d.range=function(e){return arguments.length?(s=Array.from(e),u()):s.slice()},d.rangeRound=function(e){return s=Array.from(e),l=rr,u()},d.clamp=function(e){return arguments.length?(c=!!e||Lo,u()):c!==Lo},d.interpolate=function(e){return arguments.length?(l=e,u()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,u()}}function jo(){return Bo()(Lo,Lo)}function Fo(e){var t=e.domain;return e.ticks=function(e){var n=t();return xe(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var r=t();return function(e,t,n,r){var i,o=Te(e,t,n);switch((r=Yi(r??",f")).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null==r.precision&&!isNaN(i=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Wi(t)/3)))-Wi(Math.abs(e)))}(o,a))&&(r.precision=i),no(r,a);case"":case"e":case"g":case"p":case"r":null==r.precision&&!isNaN(i=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Wi(t)-Wi(e))+1}(o,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=i-("e"===r.type));break;case"f":case"%":null==r.precision&&!isNaN(i=function(e){return Math.max(0,-Wi(Math.abs(e)))}(o))&&(r.precision=i-2*("%"===r.type))}return to(r)}(r[0],r[r.length-1],e??10,n)},e.nice=function(n){null==n&&(n=10);var r,i,o=t(),a=0,s=o.length-1,l=o[a],c=o[s],u=10;for(c<l&&(i=l,l=c,c=i,i=a,a=s,s=i);u-- >0;){if((i=Se(l,c,n))===r)return o[a]=l,o[s]=c,t(o);if(i>0)l=Math.floor(l/i)*i,c=Math.ceil(c/i)*i;else{if(!(i<0))break;l=Math.ceil(l*i)/i,c=Math.floor(c*i)/i}r=i}return e},e}function Uo(){var e=jo();return e.copy=function(){return zo(e,Uo())},Co.apply(e,arguments),Fo(e)}function Ho(e,t){var n,r=0,i=(e=e.slice()).length-1,o=e[r],a=e[i];return a<o&&(n=r,r=i,i=n,n=o,o=a,a=n),e[r]=t.floor(o),e[i]=t.ceil(a),e}function Vo(e){return Math.log(e)}function Zo(e){return Math.exp(e)}function Wo(e){return-Math.log(-e)}function Go(e){return-Math.exp(-e)}function qo(e){return isFinite(e)?+("1e"+e):e<0?0:e}function Yo(e){return(t,n)=>-e(-t,n)}function Ko(){const e=function(e){const t=e(Vo,Zo),n=t.domain;let r,i,o=10;function a(){return r=function(e){return e===Math.E?Math.log:10===e&&Math.log10||2===e&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}(o),i=function(e){return 10===e?qo:e===Math.E?Math.exp:t=>Math.pow(e,t)}(o),n()[0]<0?(r=Yo(r),i=Yo(i),e(Wo,Go)):e(Vo,Zo),t}return t.base=function(e){return arguments.length?(o=+e,a()):o},t.domain=function(e){return arguments.length?(n(e),a()):n()},t.ticks=e=>{const t=n();let a=t[0],s=t[t.length-1];const l=s<a;l&&([a,s]=[s,a]);let c,u,d=r(a),h=r(s);const f=null==e?10:+e;let p=[];if(!(o%1)&&h-d<f){if(d=Math.floor(d),h=Math.ceil(h),a>0){for(;d<=h;++d)for(c=1;c<o;++c)if(u=d<0?c/i(-d):c*i(d),!(u<a)){if(u>s)break;p.push(u)}}else for(;d<=h;++d)for(c=o-1;c>=1;--c)if(u=d>0?c/i(-d):c*i(d),!(u<a)){if(u>s)break;p.push(u)}2*p.length<f&&(p=xe(a,s,f))}else p=xe(d,h,Math.min(h-d,f)).map(i);return l?p.reverse():p},t.tickFormat=(e,n)=>{if(null==e&&(e=10),null==n&&(n=10===o?"s":","),"function"!=typeof n&&(!(o%1)&&null==(n=Yi(n)).precision&&(n.trim=!0),n=to(n)),e===1/0)return n;const a=Math.max(1,o*e/t.ticks().length);return e=>{let t=e/i(Math.round(r(e)));return t*o<o-.5&&(t*=o),t<=a?n(e):""}},t.nice=()=>n(Ho(n(),{floor:e=>i(Math.floor(r(e))),ceil:e=>i(Math.ceil(r(e)))})),t}(Bo()).domain([1,10]);return e.copy=()=>zo(e,Ko()).base(e.base()),Co.apply(e,arguments),e}const Xo=new Date,Qo=new Date;function Jo(e,t,n,r){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{const t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),null==n?1:Math.floor(n)),e),i.range=(n,r,o)=>{const a=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return a;let s;do{a.push(s=new Date(+n)),t(n,o),e(n)}while(s<n&&n<r);return a},i.filter=n=>Jo((t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),((e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););})),n&&(i.count=(t,r)=>(Xo.setTime(+t),Qo.setTime(+r),e(Xo),e(Qo),Math.floor(n(Xo,Qo))),i.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?t=>r(t)%e==0:t=>i.count(0,t)%e==0):i:null)),i}const ea=Jo((()=>{}),((e,t)=>{e.setTime(+e+t)}),((e,t)=>t-e));ea.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?Jo((t=>{t.setTime(Math.floor(t/e)*e)}),((t,n)=>{t.setTime(+t+n*e)}),((t,n)=>(n-t)/e)):ea:null),ea.range;const ta=1e3,na=6e4,ra=60*na,ia=24*ra,oa=7*ia,aa=30*ia,sa=365*ia,la=Jo((e=>{e.setTime(e-e.getMilliseconds())}),((e,t)=>{e.setTime(+e+t*ta)}),((e,t)=>(t-e)/ta),(e=>e.getUTCSeconds()));la.range;const ca=Jo((e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ta)}),((e,t)=>{e.setTime(+e+t*na)}),((e,t)=>(t-e)/na),(e=>e.getMinutes()));ca.range;const ua=Jo((e=>{e.setUTCSeconds(0,0)}),((e,t)=>{e.setTime(+e+t*na)}),((e,t)=>(t-e)/na),(e=>e.getUTCMinutes()));ua.range;const da=Jo((e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ta-e.getMinutes()*na)}),((e,t)=>{e.setTime(+e+t*ra)}),((e,t)=>(t-e)/ra),(e=>e.getHours()));da.range;const ha=Jo((e=>{e.setUTCMinutes(0,0,0)}),((e,t)=>{e.setTime(+e+t*ra)}),((e,t)=>(t-e)/ra),(e=>e.getUTCHours()));ha.range;const fa=Jo((e=>e.setHours(0,0,0,0)),((e,t)=>e.setDate(e.getDate()+t)),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*na)/ia),(e=>e.getDate()-1));fa.range;const pa=Jo((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/ia),(e=>e.getUTCDate()-1));pa.range;const ma=Jo((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/ia),(e=>Math.floor(e/ia)));function ga(e){return Jo((t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),((e,t)=>{e.setDate(e.getDate()+7*t)}),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*na)/oa))}ma.range;const va=ga(0),ya=ga(1),ba=ga(2),wa=ga(3),_a=ga(4),Ea=ga(5),xa=ga(6);function Sa(e){return Jo((t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)}),((e,t)=>(t-e)/oa))}va.range,ya.range,ba.range,wa.range,_a.range,Ea.range,xa.range;const Ta=Sa(0),Oa=Sa(1),Aa=Sa(2),Ca=Sa(3),ka=Sa(4),Ma=Sa(5),Na=Sa(6);Ta.range,Oa.range,Aa.range,Ca.range,ka.range,Ma.range,Na.range;const Da=Jo((e=>{e.setDate(1),e.setHours(0,0,0,0)}),((e,t)=>{e.setMonth(e.getMonth()+t)}),((e,t)=>t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())),(e=>e.getMonth()));Da.range;const Ra=Jo((e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)}),((e,t)=>t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())),(e=>e.getUTCMonth()));Ra.range;const La=Jo((e=>{e.setMonth(0,1),e.setHours(0,0,0,0)}),((e,t)=>{e.setFullYear(e.getFullYear()+t)}),((e,t)=>t.getFullYear()-e.getFullYear()),(e=>e.getFullYear()));La.every=e=>isFinite(e=Math.floor(e))&&e>0?Jo((t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,n)=>{t.setFullYear(t.getFullYear()+n*e)})):null,La.range;const Pa=Jo((e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)}),((e,t)=>t.getUTCFullYear()-e.getUTCFullYear()),(e=>e.getUTCFullYear()));Pa.every=e=>isFinite(e=Math.floor(e))&&e>0?Jo((t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null,Pa.range;const[Ia,$a]=function(e,t,n,r,i,o){const a=[[la,1,ta],[la,5,5e3],[la,15,15e3],[la,30,3e4],[o,1,na],[o,5,5*na],[o,15,15*na],[o,30,30*na],[i,1,ra],[i,3,3*ra],[i,6,6*ra],[i,12,12*ra],[r,1,ia],[r,2,2*ia],[n,1,oa],[t,1,aa],[t,3,3*aa],[e,1,sa]];function s(t,n,r){const i=Math.abs(n-t)/r,o=se((([,,e])=>e)).right(a,i);if(o===a.length)return e.every(Te(t/sa,n/sa,r));if(0===o)return ea.every(Math.max(Te(t,n,r),1));const[s,l]=a[i/a[o-1][2]<a[o][2]/i?o-1:o];return s.every(l)}return[function(e,t,n){const r=t<e;r&&([e,t]=[t,e]);const i=n&&"function"==typeof n.range?n:s(e,t,n),o=i?i.range(e,+t+1):[];return r?o.reverse():o},s]}(La,Da,va,fa,da,ca);function za(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Ba(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function ja(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}var Fa,Ua,Ha={"-":"",_:" ",0:"0"},Va=/^\s*\d+/,Za=/^%/,Wa=/[\\^$*+?|[\]().{}]/g;function Ga(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function qa(e){return e.replace(Wa,"\\$&")}function Ya(e){return new RegExp("^(?:"+e.map(qa).join("|")+")","i")}function Ka(e){return new Map(e.map(((e,t)=>[e.toLowerCase(),t])))}function Xa(e,t,n){var r=Va.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Qa(e,t,n){var r=Va.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Ja(e,t,n){var r=Va.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function es(e,t,n){var r=Va.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function ts(e,t,n){var r=Va.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function ns(e,t,n){var r=Va.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function rs(e,t,n){var r=Va.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function is(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function os(e,t,n){var r=Va.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function as(e,t,n){var r=Va.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function ss(e,t,n){var r=Va.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function ls(e,t,n){var r=Va.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function cs(e,t,n){var r=Va.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function us(e,t,n){var r=Va.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function ds(e,t,n){var r=Va.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function hs(e,t,n){var r=Va.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function fs(e,t,n){var r=Va.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function ps(e,t,n){var r=Za.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function ms(e,t,n){var r=Va.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function gs(e,t,n){var r=Va.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function vs(e,t){return Ga(e.getDate(),t,2)}function ys(e,t){return Ga(e.getHours(),t,2)}function bs(e,t){return Ga(e.getHours()%12||12,t,2)}function ws(e,t){return Ga(1+fa.count(La(e),e),t,3)}function _s(e,t){return Ga(e.getMilliseconds(),t,3)}function Es(e,t){return _s(e,t)+"000"}function xs(e,t){return Ga(e.getMonth()+1,t,2)}function Ss(e,t){return Ga(e.getMinutes(),t,2)}function Ts(e,t){return Ga(e.getSeconds(),t,2)}function Os(e){var t=e.getDay();return 0===t?7:t}function As(e,t){return Ga(va.count(La(e)-1,e),t,2)}function Cs(e){var t=e.getDay();return t>=4||0===t?_a(e):_a.ceil(e)}function ks(e,t){return e=Cs(e),Ga(_a.count(La(e),e)+(4===La(e).getDay()),t,2)}function Ms(e){return e.getDay()}function Ns(e,t){return Ga(ya.count(La(e)-1,e),t,2)}function Ds(e,t){return Ga(e.getFullYear()%100,t,2)}function Rs(e,t){return Ga((e=Cs(e)).getFullYear()%100,t,2)}function Ls(e,t){return Ga(e.getFullYear()%1e4,t,4)}function Ps(e,t){var n=e.getDay();return Ga((e=n>=4||0===n?_a(e):_a.ceil(e)).getFullYear()%1e4,t,4)}function Is(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ga(t/60|0,"0",2)+Ga(t%60,"0",2)}function $s(e,t){return Ga(e.getUTCDate(),t,2)}function zs(e,t){return Ga(e.getUTCHours(),t,2)}function Bs(e,t){return Ga(e.getUTCHours()%12||12,t,2)}function js(e,t){return Ga(1+pa.count(Pa(e),e),t,3)}function Fs(e,t){return Ga(e.getUTCMilliseconds(),t,3)}function Us(e,t){return Fs(e,t)+"000"}function Hs(e,t){return Ga(e.getUTCMonth()+1,t,2)}function Vs(e,t){return Ga(e.getUTCMinutes(),t,2)}function Zs(e,t){return Ga(e.getUTCSeconds(),t,2)}function Ws(e){var t=e.getUTCDay();return 0===t?7:t}function Gs(e,t){return Ga(Ta.count(Pa(e)-1,e),t,2)}function qs(e){var t=e.getUTCDay();return t>=4||0===t?ka(e):ka.ceil(e)}function Ys(e,t){return e=qs(e),Ga(ka.count(Pa(e),e)+(4===Pa(e).getUTCDay()),t,2)}function Ks(e){return e.getUTCDay()}function Xs(e,t){return Ga(Oa.count(Pa(e)-1,e),t,2)}function Qs(e,t){return Ga(e.getUTCFullYear()%100,t,2)}function Js(e,t){return Ga((e=qs(e)).getUTCFullYear()%100,t,2)}function el(e,t){return Ga(e.getUTCFullYear()%1e4,t,4)}function tl(e,t){var n=e.getUTCDay();return Ga((e=n>=4||0===n?ka(e):ka.ceil(e)).getUTCFullYear()%1e4,t,4)}function nl(){return"+0000"}function rl(){return"%"}function il(e){return+e}function ol(e){return Math.floor(+e/1e3)}function al(e){return new Date(e)}function sl(e){return e instanceof Date?+e:+new Date(+e)}function ll(e,t,n,r,i,o,a,s,l,c){var u=jo(),d=u.invert,h=u.domain,f=c(".%L"),p=c(":%S"),m=c("%I:%M"),g=c("%I %p"),v=c("%a %d"),y=c("%b %d"),b=c("%B"),w=c("%Y");function _(e){return(l(e)<e?f:s(e)<e?p:a(e)<e?m:o(e)<e?g:r(e)<e?i(e)<e?v:y:n(e)<e?b:w)(e)}return u.invert=function(e){return new Date(d(e))},u.domain=function(e){return arguments.length?h(Array.from(e,sl)):h().map(al)},u.ticks=function(t){var n=h();return e(n[0],n[n.length-1],t??10)},u.tickFormat=function(e,t){return null==t?_:c(t)},u.nice=function(e){var n=h();return(!e||"function"!=typeof e.range)&&(e=t(n[0],n[n.length-1],e??10)),e?h(Ho(n,e)):u},u.copy=function(){return zo(u,ll(e,t,n,r,i,o,a,s,l,c))},u}function cl(){return Co.apply(ll(Ia,$a,La,Da,va,fa,da,ca,la,Ua).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function ul(e){return function(){return e}}Fa=function(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=Ya(i),u=Ka(i),d=Ya(o),h=Ka(o),f=Ya(a),p=Ka(a),m=Ya(s),g=Ka(s),v=Ya(l),y=Ka(l),b={a:function(e){return a[e.getDay()]},A:function(e){return o[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:vs,e:vs,f:Es,g:Rs,G:Ps,H:ys,I:bs,j:ws,L:_s,m:xs,M:Ss,p:function(e){return i[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:il,s:ol,S:Ts,u:Os,U:As,V:ks,w:Ms,W:Ns,x:null,X:null,y:Ds,Y:Ls,Z:Is,"%":rl},w={a:function(e){return a[e.getUTCDay()]},A:function(e){return o[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:$s,e:$s,f:Us,g:Js,G:tl,H:zs,I:Bs,j:js,L:Fs,m:Hs,M:Vs,p:function(e){return i[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:il,s:ol,S:Zs,u:Ws,U:Gs,V:Ys,w:Ks,W:Xs,x:null,X:null,y:Qs,Y:el,Z:nl,"%":rl},_={a:function(e,t,n){var r=f.exec(t.slice(n));return r?(e.w=p.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=h.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){var r=v.exec(t.slice(n));return r?(e.m=y.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){var r=m.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,n,r){return S(e,t,n,r)},d:ss,e:ss,f:fs,g:rs,G:ns,H:cs,I:cs,j:ls,L:hs,m:as,M:us,p:function(e,t,n){var r=c.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1},q:os,Q:ms,s:gs,S:ds,u:Qa,U:Ja,V:es,w:Xa,W:ts,x:function(e,t,r){return S(e,n,t,r)},X:function(e,t,n){return S(e,r,t,n)},y:rs,Y:ns,Z:is,"%":ps};function E(e,t){return function(n){var r,i,o,a=[],s=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(i=Ha[r=e.charAt(++s)])?r=e.charAt(++s):i="e"===r?" ":"0",(o=t[r])&&(r=o(n,i)),a.push(r),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function x(e,t){return function(n){var r,i,o=ja(1900,void 0,1);if(S(o,e,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(t&&!("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?(i=(r=Ba(ja(o.y,0,1))).getUTCDay(),r=i>4||0===i?Oa.ceil(r):Oa(r),r=pa.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=za(ja(o.y,0,1))).getDay(),r=i>4||0===i?ya.ceil(r):ya(r),r=fa.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.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),i="Z"in o?Ba(ja(o.y,0,1)).getUTCDay():za(ja(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,Ba(o)):za(o)}}function S(e,t,n,r){for(var i,o,a=0,s=t.length,l=n.length;a<s;){if(r>=l)return-1;if(37===(i=t.charCodeAt(a++))){if(i=t.charAt(a++),!(o=_[i in Ha?t.charAt(a++):i])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return b.x=E(n,b),b.X=E(r,b),b.c=E(t,b),w.x=E(n,w),w.X=E(r,w),w.c=E(t,w),{format:function(e){var t=E(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=x(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=E(e+="",w);return t.toString=function(){return e},t},utcParse:function(e){var t=x(e+="",!0);return t.toString=function(){return e},t}}}({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"]}),Ua=Fa.format,Fa.parse,Fa.utcFormat,Fa.utcParse;const dl=Math.abs,hl=Math.atan2,fl=Math.cos,pl=Math.max,ml=Math.min,gl=Math.sin,vl=Math.sqrt,yl=1e-12,bl=Math.PI,wl=bl/2,_l=2*bl;function El(e){return e>=1?wl:e<=-1?-wl:Math.asin(e)}function xl(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(null==n)t=null;else{const e=Math.floor(n);if(!(e>=0))throw new RangeError(`invalid digits: ${n}`);t=e}return e},()=>new Vi(t)}function Sl(e){return e.innerRadius}function Tl(e){return e.outerRadius}function Ol(e){return e.startAngle}function Al(e){return e.endAngle}function Cl(e){return e&&e.padAngle}function kl(e,t,n,r,i,o,a){var s=e-n,l=t-r,c=(a?o:-o)/vl(s*s+l*l),u=c*l,d=-c*s,h=e+u,f=t+d,p=n+u,m=r+d,g=(h+p)/2,v=(f+m)/2,y=p-h,b=m-f,w=y*y+b*b,_=i-o,E=h*m-p*f,x=(b<0?-1:1)*vl(pl(0,_*_*w-E*E)),S=(E*b-y*x)/w,T=(-E*y-b*x)/w,O=(E*b+y*x)/w,A=(-E*y+b*x)/w,C=S-g,k=T-v,M=O-g,N=A-v;return C*C+k*k>M*M+N*N&&(S=O,T=A),{cx:S,cy:T,x01:-u,y01:-d,x11:S*(i/_-1),y11:T*(i/_-1)}}function Ml(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function Nl(e){this._context=e}function Dl(e){return new Nl(e)}function Rl(e){return e[0]}function Ll(e){return e[1]}function Pl(e,t){var n=ul(!0),r=null,i=Dl,o=null,a=xl(s);function s(s){var l,c,u,d=(s=Ml(s)).length,h=!1;for(null==r&&(o=i(u=a())),l=0;l<=d;++l)!(l<d&&n(c=s[l],l,s))===h&&((h=!h)?o.lineStart():o.lineEnd()),h&&o.point(+e(c,l,s),+t(c,l,s));if(u)return o=null,u+""||null}return e="function"==typeof e?e:void 0===e?Rl:ul(e),t="function"==typeof t?t:void 0===t?Ll:ul(t),s.x=function(t){return arguments.length?(e="function"==typeof t?t:ul(+t),s):e},s.y=function(e){return arguments.length?(t="function"==typeof e?e:ul(+e),s):t},s.defined=function(e){return arguments.length?(n="function"==typeof e?e:ul(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,null!=r&&(o=i(r)),s):i},s.context=function(e){return arguments.length?(null==e?r=o=null:o=i(r=e),s):r},s}function Il(e,t,n){var r=null,i=ul(!0),o=null,a=Dl,s=null,l=xl(c);function c(c){var u,d,h,f,p,m=(c=Ml(c)).length,g=!1,v=new Array(m),y=new Array(m);for(null==o&&(s=a(p=l())),u=0;u<=m;++u){if(!(u<m&&i(f=c[u],u,c))===g)if(g=!g)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),h=u-1;h>=d;--h)s.point(v[h],y[h]);s.lineEnd(),s.areaEnd()}g&&(v[u]=+e(f,u,c),y[u]=+t(f,u,c),s.point(r?+r(f,u,c):v[u],n?+n(f,u,c):y[u]))}if(p)return s=null,p+""||null}function u(){return Pl().defined(i).curve(a).context(o)}return e="function"==typeof e?e:void 0===e?Rl:ul(+e),t="function"==typeof t?t:ul(void 0===t?0:+t),n="function"==typeof n?n:void 0===n?Ll:ul(+n),c.x=function(t){return arguments.length?(e="function"==typeof t?t:ul(+t),r=null,c):e},c.x0=function(t){return arguments.length?(e="function"==typeof t?t:ul(+t),c):e},c.x1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:ul(+e),c):r},c.y=function(e){return arguments.length?(t="function"==typeof e?e:ul(+e),n=null,c):t},c.y0=function(e){return arguments.length?(t="function"==typeof e?e:ul(+e),c):t},c.y1=function(e){return arguments.length?(n=null==e?null:"function"==typeof e?e:ul(+e),c):n},c.lineX0=c.lineY0=function(){return u().x(e).y(t)},c.lineY1=function(){return u().x(e).y(n)},c.lineX1=function(){return u().x(r).y(t)},c.defined=function(e){return arguments.length?(i="function"==typeof e?e:ul(!!e),c):i},c.curve=function(e){return arguments.length?(a=e,null!=o&&(s=a(o)),c):a},c.context=function(e){return arguments.length?(null==e?o=s=null:s=a(o=e),c):o},c}function $l(e){this._curve=e}function zl(){}function Bl(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function jl(e){this._context=e}function Fl(e){return new jl(e)}function Ul(e){this._context=e}function Hl(e){return new Ul(e)}function Vl(e){this._context=e}function Zl(e){return new Vl(e)}function Wl(e,t){this._basis=new jl(e),this._beta=t}Array.prototype.slice,Nl.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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}},function(e){function t(t){return new $l(e(t))}t._curve=e}(Dl),$l.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}},jl.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:Bl(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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);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:Bl(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},Ul.prototype={areaStart:zl,areaEnd:zl,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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Bl(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},Vl.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(e,t){switch(e=+e,t=+t,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+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Bl(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},Wl.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r,i=e[0],o=t[0],a=e[n]-i,s=t[n]-o,l=-1;++l<=n;)r=l/n,this._basis.point(this._beta*e[l]+(1-this._beta)*(i+r*a),this._beta*t[l]+(1-this._beta)*(o+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const Gl=function e(t){function n(e){return 1===t?new jl(e):new Wl(e,t)}return n.beta=function(t){return e(+t)},n}(.85);function ql(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function Yl(e,t){this._context=e,this._k=(1-t)/6}Yl.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:ql(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:ql(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Kl=function e(t){function n(e){return new Yl(e,t)}return n.tension=function(t){return e(+t)},n}(0);function Xl(e,t){this._context=e,this._k=(1-t)/6}Xl.prototype={areaStart:zl,areaEnd:zl,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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:ql(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Ql=function e(t){function n(e){return new Xl(e,t)}return n.tension=function(t){return e(+t)},n}(0);function Jl(e,t){this._context=e,this._k=(1-t)/6}Jl.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(e,t){switch(e=+e,t=+t,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:ql(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const ec=function e(t){function n(e){return new Jl(e,t)}return n.tension=function(t){return e(+t)},n}(0);function tc(e,t,n){var r=e._x1,i=e._y1,o=e._x2,a=e._y2;if(e._l01_a>yl){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>yl){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*c+e._x1*e._l23_2a-t*e._l12_2a)/u,a=(a*c+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,o,a,e._x2,e._y2)}function nc(e,t){this._context=e,this._alpha=t}nc.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(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:tc(this,e,t)}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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const rc=function e(t){function n(e){return t?new nc(e,t):new Yl(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function ic(e,t){this._context=e,this._alpha=t}ic.prototype={areaStart:zl,areaEnd:zl,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(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:tc(this,e,t)}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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const oc=function e(t){function n(e){return t?new ic(e,t):new Xl(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function ac(e,t){this._context=e,this._alpha=t}ac.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(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,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:tc(this,e,t)}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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const sc=function e(t){function n(e){return t?new ac(e,t):new Jl(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function lc(e){this._context=e}function cc(e){return new lc(e)}function uc(e){return e<0?-1:1}function dc(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(uc(o)+uc(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function hc(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function fc(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-r)/3;e._context.bezierCurveTo(r+s,i+s*t,o-s,a-s*n,o,a)}function pc(e){this._context=e}function mc(e){this._context=new gc(e)}function gc(e){this._context=e}function vc(e){return new pc(e)}function yc(e){return new mc(e)}function bc(e){this._context=e}function wc(e){var t,n,r=e.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,o[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/o[t-1],o[t]-=n,a[t]-=n*a[t-1];for(i[r-1]=a[r-1]/o[r-1],t=r-2;t>=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function _c(e){return new bc(e)}function Ec(e,t){this._context=e,this._t=t}function xc(e){return new Ec(e,.5)}function Sc(e){return new Ec(e,0)}function Tc(e){return new Ec(e,1)}function Oc(e,t){if((i=e.length)>1)for(var n,r,i,o=1,a=e[t[0]],s=a.length;o<i;++o)for(r=a,a=e[t[o]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function Ac(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function Cc(e,t){return e[t]}function kc(e){const t=[];return t.key=e,t}function Mc(){var e=ul([]),t=Ac,n=Oc,r=Cc;function i(i){var o,a,s=Array.from(e.apply(this,arguments),kc),l=s.length,c=-1;for(const e of i)for(o=0,++c;o<l;++o)(s[o][c]=[0,+r(e,s[o].key,c,i)]).data=e;for(o=0,a=Ml(t(s));o<l;++o)s[a[o]].index=o;return n(s,a),s}return i.keys=function(t){return arguments.length?(e="function"==typeof t?t:ul(Array.from(t)),i):e},i.value=function(e){return arguments.length?(r="function"==typeof e?e:ul(+e),i):r},i.order=function(e){return arguments.length?(t=null==e?Ac:"function"==typeof e?e:ul(Array.from(e)),i):t},i.offset=function(e){return arguments.length?(n=e??Oc,i):n},i}function Nc(e,t){if((s=e.length)>0)for(var n,r,i,o,a,s,l=0,c=e[t[0]].length;l<c;++l)for(o=a=0,n=0;n<s;++n)(i=(r=e[t[n]][l])[1]-r[0])>0?(r[0]=o,r[1]=o+=i):i<0?(r[1]=a,r[0]=a+=i):(r[0]=0,r[1]=i)}function Dc(e,t,n){this.k=e,this.x=t,this.y=n}function Rc(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}function Lc(e){return(t,n)=>{let r;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,i=null!=n&&n.width?String(n.width):t;r=e.formattingValues[i]||e.formattingValues[t]}else{const t=e.defaultWidth,i=null!=n&&n.width?String(n.width):e.defaultWidth;r=e.values[i]||e.values[t]}return r[e.argumentCallback?e.argumentCallback(t):t]}}function Pc(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;const a=o[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?function(e,t){for(let t=0;t<e.length;t++)if(e[t].test(a))return t}(s):function(e,t){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&e[t].test(a))return t}(s);let c;return c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c,{value:c,rest:t.slice(a.length)}}}function Ic(e){const t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):"number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?new Date(e):new Date(NaN)}lc.prototype={areaStart:zl,areaEnd:zl,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}},pc.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:fc(this,this._t0,hc(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(t=+t,(e=+e)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,fc(this,hc(this,n=dc(this,e,t)),n);break;default:fc(this,this._t0,n=dc(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(mc.prototype=Object.create(pc.prototype)).point=function(e,t){pc.prototype.point.call(this,t,e)},gc.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}},bc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===n)this._context.lineTo(e[1],t[1]);else for(var r=wc(e),i=wc(t),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],e[a],t[a]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}},Ec.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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}},Dc.prototype={constructor:Dc,scale:function(e){return 1===e?this:new Dc(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new Dc(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},Dc.prototype;let $c={};function zc(){return $c}function Bc(e,t){var n,r,i,o;const a=zc(),s=(null==t?void 0:t.weekStartsOn)??(null==(r=null==(n=null==t?void 0:t.locale)?void 0:n.options)?void 0:r.weekStartsOn)??a.weekStartsOn??(null==(o=null==(i=a.locale)?void 0:i.options)?void 0:o.weekStartsOn)??0,l=Ic(e),c=l.getDay(),u=(c<s?7:0)+c-s;return l.setDate(l.getDate()-u),l.setHours(0,0,0,0),l}const jc={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"}},Fc={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Uc={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Lc({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Lc({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Lc({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:Lc({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:Lc({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"})},Hc={ordinalNumber:function(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],o=t.match(e.parsePattern);if(!o)return null;let a=e.valueCallback?e.valueCallback(o[0]):o[0];return a=n.valueCallback?n.valueCallback(a):a,{value:a,rest:t.slice(i.length)}}}({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:Pc({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:Pc({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:e=>e+1}),month:Pc({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:Pc({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:Pc({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"})},Vc={code:"en-US",formatDistance:(e,t,n)=>{let r;const i=jc[e];return r="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",t.toString()),null!=n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:{date:Rc({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Rc({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:Rc({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},formatRelative:(e,t,n,r)=>Fc[e],localize:Uc,match:Hc,options:{weekStartsOn:0,firstWeekContainsDate:1}},Zc="object"==typeof global&&global&&global.Object===Object&&global;var Wc="object"==typeof self&&self&&self.Object===Object&&self;const Gc=Zc||Wc||Function("return this")(),qc=Gc.Symbol;var Yc=Object.prototype,Kc=Yc.hasOwnProperty,Xc=Yc.toString,Qc=qc?qc.toStringTag:void 0,Jc=Object.prototype.toString,eu="[object Null]",tu="[object Undefined]",nu=qc?qc.toStringTag:void 0;function ru(e){return null==e?void 0===e?tu:eu:nu&&nu in Object(e)?function(e){var t=Kc.call(e,Qc),n=e[Qc];try{e[Qc]=void 0;var r=!0}catch{}var i=Xc.call(e);return r&&(t?e[Qc]=n:delete e[Qc]),i}(e):function(e){return Jc.call(e)}(e)}function iu(e){return null!=e&&"object"==typeof e}var ou="[object Symbol]";function au(e){return"symbol"==typeof e||iu(e)&&ru(e)==ou}const su=Array.isArray;var lu=1/0,cu=qc?qc.prototype:void 0,uu=cu?cu.toString:void 0;function du(e){if("string"==typeof e)return e;if(su(e))return function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}(e,du)+"";if(au(e))return uu?uu.call(e):"";var t=e+"";return"0"==t&&1/e==-lu?"-0":t}function hu(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function fu(e){return e}var pu="[object AsyncFunction]",mu="[object Function]",gu="[object GeneratorFunction]",vu="[object Proxy]";function yu(e){if(!hu(e))return!1;var t=ru(e);return t==mu||t==gu||t==pu||t==vu}const bu=Gc["__core-js_shared__"];var wu=function(){var e=/[^.]+$/.exec(bu&&bu.keys&&bu.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),_u=Function.prototype.toString;function Eu(e){if(null!=e){try{return _u.call(e)}catch{}try{return e+""}catch{}}return""}var xu=/^\[object .+?Constructor\]$/,Su=Function.prototype,Tu=Object.prototype,Ou=Su.toString,Au=Tu.hasOwnProperty,Cu=RegExp("^"+Ou.call(Au).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ku(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!hu(e)||function(e){return!!wu&&wu in e}(e))&&(yu(e)?Cu:xu).test(Eu(e))}(n)?n:void 0}const Mu=ku(Gc,"WeakMap");var Nu=Object.create,Du=function(){function e(){}return function(t){if(!hu(t))return{};if(Nu)return Nu(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const Ru=Du;function Lu(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var Pu=Date.now;function Iu(e){return function(){return e}}var $u=function(){try{var e=ku(Object,"defineProperty");return e({},"",{}),e}catch{}}();const zu=$u;var Bu=zu?function(e,t){return zu(e,"toString",{configurable:!0,enumerable:!1,value:Iu(t),writable:!0})}:fu,ju=function(e){var t=0,n=0;return function(){var r=Pu(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(Bu);const Fu=ju;function Uu(e){return e!=e}function Hu(e,t){return!(null==e||!e.length)&&function(e,t,n){return t==t?function(e,t,n){for(var r=-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}(e,t):function(e,t,n,r){for(var i=e.length,o=-1;++o<i;)if(t(e[o],o,e))return o;return-1}(e,Uu)}(e,t)>-1}var Vu=9007199254740991,Zu=/^(?:0|[1-9]\d*)$/;function Wu(e,t){var n=typeof e;return!!(t=t??Vu)&&("number"==n||"symbol"!=n&&Zu.test(e))&&e>-1&&e%1==0&&e<t}function Gu(e,t,n){"__proto__"==t&&zu?zu(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function qu(e,t){return e===t||e!=e&&t!=t}var Yu=Object.prototype.hasOwnProperty;function Ku(e,t,n){var r=e[t];(!Yu.call(e,t)||!qu(r,n)||void 0===n&&!(t in e))&&Gu(e,t,n)}function Xu(e,t,n,r){var i=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var s=t[o],l=r?r(n[s],e[s],s,n,e):void 0;void 0===l&&(l=e[s]),i?Gu(n,s,l):Ku(n,s,l)}return n}var Qu=Math.max;function Ju(e,t){return Fu(function(e,t,n){return t=Qu(void 0===t?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=Qu(r.length-t,0),a=Array(o);++i<o;)a[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(a),function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(e,this,s)}}(e,t,fu),e+"")}var ed=9007199254740991;function td(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=ed}function nd(e){return null!=e&&td(e.length)&&!yu(e)}function rd(e,t,n){if(!hu(n))return!1;var r=typeof t;return!!("number"==r?nd(n)&&Wu(t,n.length):"string"==r&&t in n)&&qu(n[t],e)}var id=Object.prototype;function od(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||id)}function ad(e){return iu(e)&&"[object Arguments]"==ru(e)}var sd=Object.prototype,ld=sd.hasOwnProperty,cd=sd.propertyIsEnumerable,ud=ad(function(){return arguments}())?ad:function(e){return iu(e)&&ld.call(e,"callee")&&!cd.call(e,"callee")};const dd=ud;var hd="object"==typeof exports&&exports&&!exports.nodeType&&exports,fd=hd&&"object"==typeof module&&module&&!module.nodeType&&module,pd=fd&&fd.exports===hd?Gc.Buffer:void 0;const md=(pd?pd.isBuffer:void 0)||function(){return!1};var gd={};function vd(e){return function(t){return e(t)}}gd["[object Float32Array]"]=gd["[object Float64Array]"]=gd["[object Int8Array]"]=gd["[object Int16Array]"]=gd["[object Int32Array]"]=gd["[object Uint8Array]"]=gd["[object Uint8ClampedArray]"]=gd["[object Uint16Array]"]=gd["[object Uint32Array]"]=!0,gd["[object Arguments]"]=gd["[object Array]"]=gd["[object ArrayBuffer]"]=gd["[object Boolean]"]=gd["[object DataView]"]=gd["[object Date]"]=gd["[object Error]"]=gd["[object Function]"]=gd["[object Map]"]=gd["[object Number]"]=gd["[object Object]"]=gd["[object RegExp]"]=gd["[object Set]"]=gd["[object String]"]=gd["[object WeakMap]"]=!1;var yd="object"==typeof exports&&exports&&!exports.nodeType&&exports,bd=yd&&"object"==typeof module&&module&&!module.nodeType&&module,wd=bd&&bd.exports===yd&&Zc.process;const _d=function(){try{return bd&&bd.require&&bd.require("util").types||wd&&wd.binding&&wd.binding("util")}catch{}}();var Ed=_d&&_d.isTypedArray,xd=Ed?vd(Ed):function(e){return iu(e)&&td(e.length)&&!!gd[ru(e)]};const Sd=xd;var Td=Object.prototype.hasOwnProperty;function Od(e,t){var n=su(e),r=!n&&dd(e),i=!n&&!r&&md(e),o=!n&&!r&&!i&&Sd(e),a=n||r||i||o,s=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],l=s.length;for(var c in e)(t||Td.call(e,c))&&(!a||!("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Wu(c,l)))&&s.push(c);return s}function Ad(e,t){return function(n){return e(t(n))}}const Cd=Ad(Object.keys,Object);var kd=Object.prototype.hasOwnProperty;function Md(e){if(!od(e))return Cd(e);var t=[];for(var n in Object(e))kd.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Nd(e){return nd(e)?Od(e):Md(e)}var Dd=Object.prototype.hasOwnProperty;function Rd(e){return nd(e)?Od(e,!0):function(e){if(!hu(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=od(e),n=[];for(var r in e)"constructor"==r&&(t||!Dd.call(e,r))||n.push(r);return n}(e)}var Ld=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Pd=/^\w*$/;function Id(e,t){if(su(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!au(e))||Pd.test(e)||!Ld.test(e)||null!=t&&e in Object(t)}const $d=ku(Object,"create");var zd=Object.prototype.hasOwnProperty,Bd=Object.prototype.hasOwnProperty;function jd(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Fd(e,t){for(var n=e.length;n--;)if(qu(e[n][0],t))return n;return-1}jd.prototype.clear=function(){this.__data__=$d?$d(null):{},this.size=0},jd.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},jd.prototype.get=function(e){var t=this.__data__;if($d){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return zd.call(t,e)?t[e]:void 0},jd.prototype.has=function(e){var t=this.__data__;return $d?void 0!==t[e]:Bd.call(t,e)},jd.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=$d&&void 0===t?"__lodash_hash_undefined__":t,this};var Ud=Array.prototype.splice;function Hd(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Hd.prototype.clear=function(){this.__data__=[],this.size=0},Hd.prototype.delete=function(e){var t=this.__data__,n=Fd(t,e);return!(n<0||(n==t.length-1?t.pop():Ud.call(t,n,1),--this.size,0))},Hd.prototype.get=function(e){var t=this.__data__,n=Fd(t,e);return n<0?void 0:t[n][1]},Hd.prototype.has=function(e){return Fd(this.__data__,e)>-1},Hd.prototype.set=function(e,t){var n=this.__data__,r=Fd(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};const Vd=ku(Gc,"Map");function Zd(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function Wd(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Wd.prototype.clear=function(){this.size=0,this.__data__={hash:new jd,map:new(Vd||Hd),string:new jd}},Wd.prototype.delete=function(e){var t=Zd(this,e).delete(e);return this.size-=t?1:0,t},Wd.prototype.get=function(e){return Zd(this,e).get(e)},Wd.prototype.has=function(e){return Zd(this,e).has(e)},Wd.prototype.set=function(e,t){var n=Zd(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function Gd(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Gd.Cache||Wd),n}Gd.Cache=Wd;var qd=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yd=/\\(\\)?/g,Kd=function(e){var t=Gd((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(qd,(function(e,n,r,i){t.push(r?i.replace(Yd,"$1"):n||e)})),t}),(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}();const Xd=Kd;function Qd(e){return null==e?"":du(e)}function Jd(e,t){return su(e)?e:Id(e,t)?[e]:Xd(Qd(e))}var eh=1/0;function th(e){if("string"==typeof e||au(e))return e;var t=e+"";return"0"==t&&1/e==-eh?"-0":t}function nh(e,t){for(var n=0,r=(t=Jd(t,e)).length;null!=e&&n<r;)e=e[th(t[n++])];return n&&n==r?e:void 0}function rh(e,t,n){var r=null==e?void 0:nh(e,t);return void 0===r?n:r}function ih(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var oh=qc?qc.isConcatSpreadable:void 0;function ah(e){return su(e)||dd(e)||!!(oh&&e&&e[oh])}function sh(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=ah),i||(i=[]);++o<a;){var s=e[o];t>0&&n(s)?t>1?sh(s,t-1,n,r,i):ih(i,s):r||(i[i.length]=s)}return i}const lh=Ad(Object.getPrototypeOf,Object);var ch="[object Object]",uh=Function.prototype,dh=Object.prototype,hh=uh.toString,fh=dh.hasOwnProperty,ph=hh.call(Object);function mh(e){var t=this.__data__=new Hd(e);this.size=t.size}mh.prototype.clear=function(){this.__data__=new Hd,this.size=0},mh.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},mh.prototype.get=function(e){return this.__data__.get(e)},mh.prototype.has=function(e){return this.__data__.has(e)},mh.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Hd){var r=n.__data__;if(!Vd||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Wd(r)}return n.set(e,t),this.size=n.size,this};var gh="object"==typeof exports&&exports&&!exports.nodeType&&exports,vh=gh&&"object"==typeof module&&module&&!module.nodeType&&module,yh=vh&&vh.exports===gh?Gc.Buffer:void 0,bh=yh?yh.allocUnsafe:void 0;function wh(e,t){if(t)return e.slice();var n=e.length,r=bh?bh(n):new e.constructor(n);return e.copy(r),r}function _h(){return[]}var Eh=Object.prototype.propertyIsEnumerable,xh=Object.getOwnPropertySymbols,Sh=xh?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a)&&(o[i++]=a)}return o}(xh(e),(function(t){return Eh.call(e,t)})))}:_h;const Th=Sh;var Oh=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)ih(t,Th(e)),e=lh(e);return t}:_h;const Ah=Oh;function Ch(e,t,n){var r=t(e);return su(e)?r:ih(r,n(e))}function kh(e){return Ch(e,Nd,Th)}function Mh(e){return Ch(e,Rd,Ah)}const Nh=ku(Gc,"DataView"),Dh=ku(Gc,"Promise"),Rh=ku(Gc,"Set");var Lh="[object Map]",Ph="[object Promise]",Ih="[object Set]",$h="[object WeakMap]",zh="[object DataView]",Bh=Eu(Nh),jh=Eu(Vd),Fh=Eu(Dh),Uh=Eu(Rh),Hh=Eu(Mu),Vh=ru;(Nh&&Vh(new Nh(new ArrayBuffer(1)))!=zh||Vd&&Vh(new Vd)!=Lh||Dh&&Vh(Dh.resolve())!=Ph||Rh&&Vh(new Rh)!=Ih||Mu&&Vh(new Mu)!=$h)&&(Vh=function(e){var t=ru(e),n="[object Object]"==t?e.constructor:void 0,r=n?Eu(n):"";if(r)switch(r){case Bh:return zh;case jh:return Lh;case Fh:return Ph;case Uh:return Ih;case Hh:return $h}return t});const Zh=Vh;var Wh=Object.prototype.hasOwnProperty;const Gh=Gc.Uint8Array;function qh(e){var t=new e.constructor(e.byteLength);return new Gh(t).set(new Gh(e)),t}var Yh=/\w*$/,Kh=qc?qc.prototype:void 0,Xh=Kh?Kh.valueOf:void 0;function Qh(e,t){var n=t?qh(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var Jh="[object Boolean]",ef="[object Date]",tf="[object Map]",nf="[object Number]",rf="[object RegExp]",of="[object Set]",af="[object String]",sf="[object Symbol]",lf="[object ArrayBuffer]",cf="[object DataView]",uf="[object Float32Array]",df="[object Float64Array]",hf="[object Int8Array]",ff="[object Int16Array]",pf="[object Int32Array]",mf="[object Uint8Array]",gf="[object Uint8ClampedArray]",vf="[object Uint16Array]",yf="[object Uint32Array]";function bf(e){return"function"!=typeof e.constructor||od(e)?{}:Ru(lh(e))}var wf=_d&&_d.isMap,_f=wf?vd(wf):function(e){return iu(e)&&"[object Map]"==Zh(e)};const Ef=_f;var xf=_d&&_d.isSet,Sf=xf?vd(xf):function(e){return iu(e)&&"[object Set]"==Zh(e)};const Tf=Sf;var Of=1,Af=2,Cf=4,kf="[object Arguments]",Mf="[object Function]",Nf="[object GeneratorFunction]",Df="[object Object]",Rf={};function Lf(e,t,n,r,i,o){var a,s=t&Of,l=t&Af,c=t&Cf;if(n&&(a=i?n(e,r,i,o):n(e)),void 0!==a)return a;if(!hu(e))return e;var u=su(e);if(u){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Wh.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!s)return Lu(e,a)}else{var d=Zh(e),h=d==Mf||d==Nf;if(md(e))return wh(e,s);if(d==Df||d==kf||h&&!i){if(a=l||h?{}:bf(e),!s)return l?function(e,t){return Xu(e,Ah(e),t)}(e,function(e,t){return e&&Xu(t,Rd(t),e)}(a,e)):function(e,t){return Xu(e,Th(e),t)}(e,function(e,t){return e&&Xu(t,Nd(t),e)}(a,e))}else{if(!Rf[d])return i?e:{};a=function(e,t,n){var r=e.constructor;switch(t){case lf:return qh(e);case Jh:case ef:return new r(+e);case cf:return function(e,t){var n=t?qh(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case uf:case df:case hf:case ff:case pf:case mf:case gf:case vf:case yf:return Qh(e,n);case tf:return new r;case nf:case af:return new r(e);case rf:return function(e){var t=new e.constructor(e.source,Yh.exec(e));return t.lastIndex=e.lastIndex,t}(e);case of:return new r;case sf:return function(e){return Xh?Object(Xh.call(e)):{}}(e)}}(e,d,s)}}o||(o=new mh);var f=o.get(e);if(f)return f;o.set(e,a),Tf(e)?e.forEach((function(r){a.add(Lf(r,t,n,r,e,o))})):Ef(e)&&e.forEach((function(r,i){a.set(i,Lf(r,t,n,i,e,o))}));var p=u?void 0:(c?l?Mh:kh:l?Rd:Nd)(e);return function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n););}(p||e,(function(r,i){p&&(r=e[i=r]),Ku(a,i,Lf(r,t,n,i,e,o))})),a}Rf[kf]=Rf["[object Array]"]=Rf["[object ArrayBuffer]"]=Rf["[object DataView]"]=Rf["[object Boolean]"]=Rf["[object Date]"]=Rf["[object Float32Array]"]=Rf["[object Float64Array]"]=Rf["[object Int8Array]"]=Rf["[object Int16Array]"]=Rf["[object Int32Array]"]=Rf["[object Map]"]=Rf["[object Number]"]=Rf[Df]=Rf["[object RegExp]"]=Rf["[object Set]"]=Rf["[object String]"]=Rf["[object Symbol]"]=Rf["[object Uint8Array]"]=Rf["[object Uint8ClampedArray]"]=Rf["[object Uint16Array]"]=Rf["[object Uint32Array]"]=!0,Rf["[object Error]"]=Rf[Mf]=Rf["[object WeakMap]"]=!1;var Pf=1,If=4;function $f(e){return Lf(e,Pf|If)}function zf(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Wd;++t<n;)this.add(e[t])}function Bf(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function jf(e,t){return e.has(t)}zf.prototype.add=zf.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},zf.prototype.has=function(e){return this.__data__.has(e)};var Ff=1,Uf=2;function Hf(e,t,n,r,i,o){var a=n&Ff,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var c=o.get(e),u=o.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,f=n&Uf?new zf:void 0;for(o.set(e,t),o.set(t,e);++d<s;){var p=e[d],m=t[d];if(r)var g=a?r(m,p,d,t,e,o):r(p,m,d,e,t,o);if(void 0!==g){if(g)continue;h=!1;break}if(f){if(!Bf(t,(function(e,t){if(!jf(f,t)&&(p===e||i(p,e,n,r,o)))return f.push(t)}))){h=!1;break}}else if(p!==m&&!i(p,m,n,r,o)){h=!1;break}}return o.delete(e),o.delete(t),h}function Vf(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function Zf(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var Wf=1,Gf=2,qf="[object Boolean]",Yf="[object Date]",Kf="[object Error]",Xf="[object Map]",Qf="[object Number]",Jf="[object RegExp]",ep="[object Set]",tp="[object String]",np="[object Symbol]",rp="[object ArrayBuffer]",ip="[object DataView]",op=qc?qc.prototype:void 0,ap=op?op.valueOf:void 0,sp=1,lp=Object.prototype.hasOwnProperty,cp=1,up="[object Arguments]",dp="[object Array]",hp="[object Object]",fp=Object.prototype.hasOwnProperty;function pp(e,t,n,r,i){return e===t||(null==e||null==t||!iu(e)&&!iu(t)?e!=e&&t!=t:function(e,t,n,r,i,o){var a=su(e),s=su(t),l=a?dp:Zh(e),c=s?dp:Zh(t),u=(l=l==up?hp:l)==hp,d=(c=c==up?hp:c)==hp,h=l==c;if(h&&md(e)){if(!md(t))return!1;a=!0,u=!1}if(h&&!u)return o||(o=new mh),a||Sd(e)?Hf(e,t,n,r,i,o):function(e,t,n,r,i,o,a){switch(n){case ip:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case rp:return!(e.byteLength!=t.byteLength||!o(new Gh(e),new Gh(t)));case qf:case Yf:case Qf:return qu(+e,+t);case Kf:return e.name==t.name&&e.message==t.message;case Jf:case tp:return e==t+"";case Xf:var s=Vf;case ep:var l=r&Wf;if(s||(s=Zf),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;r|=Gf,a.set(e,t);var u=Hf(s(e),s(t),r,i,o,a);return a.delete(e),u;case np:if(ap)return ap.call(e)==ap.call(t)}return!1}(e,t,l,n,r,i,o);if(!(n&cp)){var f=u&&fp.call(e,"__wrapped__"),p=d&&fp.call(t,"__wrapped__");if(f||p){var m=f?e.value():e,g=p?t.value():t;return o||(o=new mh),i(m,g,n,r,o)}}return!!h&&(o||(o=new mh),function(e,t,n,r,i,o){var a=n&sp,s=kh(e),l=s.length;if(l!=kh(t).length&&!a)return!1;for(var c=l;c--;){var u=s[c];if(!(a?u in t:lp.call(t,u)))return!1}var d=o.get(e),h=o.get(t);if(d&&h)return d==t&&h==e;var f=!0;o.set(e,t),o.set(t,e);for(var p=a;++c<l;){var m=e[u=s[c]],g=t[u];if(r)var v=a?r(g,m,u,t,e,o):r(m,g,u,e,t,o);if(!(void 0===v?m===g||i(m,g,n,r,o):v)){f=!1;break}p||(p="constructor"==u)}if(f&&!p){var y=e.constructor,b=t.constructor;y!=b&&"constructor"in e&&"constructor"in t&&!("function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b)&&(f=!1)}return o.delete(e),o.delete(t),f}(e,t,n,r,i,o))}(e,t,n,r,pp,i))}var mp=1,gp=2;function vp(e){return e==e&&!hu(e)}function yp(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}function bp(e,t){return null!=e&&t in Object(e)}var wp=1,_p=2;function Ep(e){return"function"==typeof e?e:null==e?fu:"object"==typeof e?su(e)?function(e,t){return Id(e)&&vp(t)?yp(th(e),t):function(n){var r=rh(n,e);return void 0===r&&r===t?function(e,t){return null!=e&&function(e,t,n){for(var r=-1,i=(t=Jd(t,e)).length,o=!1;++r<i;){var a=th(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&td(i)&&Wu(a,i)&&(su(e)||dd(e))}(e,t,bp)}(n,e):pp(t,r,wp|_p)}}(e[0],e[1]):function(e){var t=function(e){for(var t=Nd(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,vp(i)]}return t}(e);return 1==t.length&&t[0][2]?yp(t[0][0],t[0][1]):function(n){return n===e||function(e,t,n,r){var i=n.length,o=i;if(null==e)return!o;for(e=Object(e);i--;){var a=n[i];if(a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++i<o;){var s=(a=n[i])[0],l=e[s],c=a[1];if(a[2]){if(void 0===l&&!(s in e))return!1}else{var u,d=new mh;if(!(void 0===u?pp(c,l,mp|gp,r,d):u))return!1}}return!0}(n,0,t)}}(e):function(e){return Id(e)?function(e){return function(t){return null==t?void 0:t[e]}}(th(e)):function(e){return function(t){return nh(t,e)}}(e)}(e)}var xp=function(e,t,n){for(var r=-1,i=Object(e),o=n(e),a=o.length;a--;){var s=o[++r];if(!1===t(i[s],s,i))break}return e};const Sp=xp;function Tp(e,t,n){(void 0!==n&&!qu(e[t],n)||void 0===n&&!(t in e))&&Gu(e,t,n)}function Op(e){return iu(e)&&nd(e)}function Ap(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}function Cp(e,t,n,r,i){e!==t&&Sp(t,(function(o,a){if(i||(i=new mh),hu(o))!function(e,t,n,r,i,o,a){var s=Ap(e,n),l=Ap(t,n),c=a.get(l);if(c)Tp(e,n,c);else{var u=o?o(s,l,n+"",e,t,a):void 0,d=void 0===u;if(d){var h=su(l),f=!h&&md(l),p=!h&&!f&&Sd(l);u=l,h||f||p?su(s)?u=s:Op(s)?u=Lu(s):f?(d=!1,u=wh(l,!0)):p?(d=!1,u=Qh(l,!0)):u=[]:function(e){if(!iu(e)||ru(e)!=ch)return!1;var t=lh(e);if(null===t)return!0;var n=fh.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&hh.call(n)==ph}(l)||dd(l)?(u=s,dd(s)?u=function(e){return Xu(e,Rd(e))}(s):(!hu(s)||yu(s))&&(u=bf(l))):d=!1}d&&(a.set(l,u),i(u,l,r,o,a),a.delete(l)),Tp(e,n,u)}}(e,t,a,n,Cp,r,i);else{var s=r?r(Ap(e,a),o,a+"",e,t,i):void 0;void 0===s&&(s=o),Tp(e,a,s)}}),Rd)}function kp(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}var Mp=Object.prototype.hasOwnProperty;var Np=function(e){return Ju((function(t,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o=e.length>3&&"function"==typeof o?(i--,o):void 0,a&&rd(n[0],n[1],a)&&(o=i<3?void 0:o,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r)}return t}))}((function(e,t,n){Cp(e,t,n)}));const Dp=Np;var Rp=Rh&&1/Zf(new Rh([,-0]))[1]==1/0?function(e){return new Rh(e)}:function(){};const Lp=Rp;var Pp=200;function Ip(e,t,n){var r=-1,i=Hu,o=e.length,a=!0,s=[],l=s;if(n)a=!1,i=kp;else if(o>=Pp){var c=t?null:Lp(e);if(c)return Zf(c);a=!1,i=jf,l=new zf}else l=t?[]:s;e:for(;++r<o;){var u=e[r],d=t?t(u):u;if(u=n||0!==u?u:0,a&&d==d){for(var h=l.length;h--;)if(l[h]===d)continue e;t&&l.push(d),s.push(u)}else i(l,d,n)||(l!==s&&l.push(d),s.push(u))}return s}var $p=Ju((function(e){var t=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}(e);return Op(t)&&(t=void 0),Ip(sh(e,1,Op,!0),Ep(t))}));const zp=$p;function Bp(e){return e&&e.length?Ip(e):[]}const jp="cds",Fp=7,Up=2.5,Hp=3.5,Vp={reference:"value",compareTo:"marker"},Zp=4,Wp={duration:1e3,ease:di,zoomLevel:3},Gp={"1-color":4,"2-color":5,"3-color":5,"4-color":3,"5-color":2,"14-color":1},qp={defaultBins:10},Yp={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}},Kp=.3,Xp=1,Qp=24,Jp={horizontalOffset:10},em={default:{duration:300},pie_slice_mouseover:{duration:100},pie_chart_titles:{duration:375},graph_element_mouseover_fill_update:{duration:100},graph_element_mouseout_fill_update:{duration:100}},tm={height:{[z.GRAPH_VIEW]:32,[z.SLIDER_VIEW]:10},spacerHeight:8,handleWidth:5,handleBarWidth:1,handleBarHeight:12},nm=[{type:te.RADIUS,name:"Radius"},{type:te.AREA,name:"Poor area"},{type:te.AREA,name:"Satisfactory area"},{type:te.AREA,name:"Great area"},{type:te.QUARTILE,name:"Quartiles"}],rm={type:B.END_LINE,threshold:16,numCharacter:14},im={enabled:!0,position:U.BOTTOM,clickable:!0,truncation:rm,alignment:H.LEFT,order:null,additionalItems:[]},om={enabled:!0,showTotal:!0,truncation:rm,groupLabel:"Group"},am={top:{visible:!0,includeZero:!0,truncation:rm},bottom:{visible:!0,includeZero:!0,truncation:rm},left:{visible:!0,includeZero:!0,truncation:rm},right:{visible:!0,includeZero:!0,truncation:rm}},sm={addSpaceOnEdges:1,showDayName:!1,localeObject:Vc,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"}}},lm=typeof document<"u"&&(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled),cm={width:null,height:null,resizable:!0,theme:P.WHITE,tooltip:om,legend:im,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},...lm?[{type:J.MAKE_FULLSCREEN}]:[],{type:J.EXPORT_CSV},{type:J.EXPORT_PNG},{type:J.EXPORT_JPG}]}},um=Dp({},cm,{thematic:{projection:ie.geoNaturalEarth1}}),dm=Dp({},cm,{axes:am,timeScale:sm,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:z.GRAPH_VIEW}}}),hm=Dp({},dm,{bars:{maxWidth:16,spacingFactor:.25},timeScale:Dp(sm,{addSpaceOnEdges:1})}),fm=Dp({},hm,{}),pm=Dp({},hm,{}),mm=Dp({},hm,{bars:Dp({},hm.bars,{dividerSize:1.5})}),gm=Dp({},hm,{}),vm=Dp({},dm,{points:{radius:4,fillOpacity:.3,filled:!0,enabled:!0}}),ym=vm,bm=Dp({},vm,{points:{radius:3,filled:!1,enabled:!0}}),wm=Dp({},bm,{timeScale:Dp(sm,{addSpaceOnEdges:0})}),_m=wm,Em=Dp({},dm,{bubble:{radiusMapsTo:"radius",radiusLabel:"Radius",radiusRange:e=>{const t=Math.min(e.width,e.height);return[3*t/400,25*t/400]},fillOpacity:.2,enabled:!0},points:{filled:!0},legend:{additionalItems:[{type:te.RADIUS,name:"Radius"}]}}),xm=Dp({},dm,{bullet:{performanceAreaTitles:["Poor","Satisfactory","Great"]},grid:{x:{enabled:!1},y:{enabled:!1}},legend:{additionalItems:[{type:te.AREA,name:"Poor area"},{type:te.AREA,name:"Satisfactory area"},{type:te.AREA,name:"Great area"},{type:te.QUARTILE,name:"Quartiles"}]}}),Sm=Dp({},hm,{bars:{dividerSize:1.5},timeScale:Dp(sm,{addSpaceOnEdges:0})}),Tm=Dp({},cm,{tooltip:Dp({},om,{wordLabel:"Word",valueLabel:"Value"}),wordCloud:{fontSizeMapsTo:"value",fontSizeRange:e=>{const t=Math.min(e.width,e.height);return[20*t/400,75*t/400]},wordMapsTo:"word"}}),Om=Dp({},cm,{pie:{labels:{formatter:null,enabled:!0},alignment:H.LEFT,sortFunction:null,valueMapsTo:"value"}}),Am=Dp({},cm,{legend:{enabled:!1},gauge:{type:K.SEMI,arcWidth:16,deltaArrow:{size:e=>e/8,enabled:!0},showPercentageSymbol:!0,status:null,numberSpacing:10,deltaFontSize:e=>e/8,valueFontSize:e=>e/2.5,numberFormatter:e=>Number(e.toFixed(2))%1!=0?e.toFixed(2).toLocaleString():e.toFixed().toLocaleString(),alignment:H.LEFT}}),Cm=Dp({},Om,{donut:{center:{numberFontSize:e=>`${Math.min(e/100*24,24)}px`,titleFontSize:e=>`${Math.min(e/100*15,15)}px`,titleYPosition:e=>Math.min(e/80*20,20),numberFormatter:e=>Math.floor(e).toLocaleString()},alignment:H.LEFT}}),km=Dp({},cm,{legend:{enabled:!1,clickable:!1},meter:{showLabels:!0,proportional:null,statusBar:{percentageIndicator:{enabled:!0}}}}),Mm=Dp({},km,{legend:{enabled:!0}}),Nm=Dp({},cm,{radar:{axes:{angle:"key",value:"value"},alignment:H.LEFT},tooltip:{gridline:{enabled:!0},valueFormatter:e=>e??"N/A"}}),Dm=Dp({},hm,{comboChartTypes:[]}),Rm=Dp({tree:{type:Z.TREE}},cm,{}),Lm=Dp({},cm,{data:Dp(cm.data,{groupMapsTo:"name"})}),Pm=Dp({},cm,{circles:{fillOpacity:.3,hover:{stroke:"#FFF"}},padding:{mainGroup:4,children:2},hierarchyLevel:2},{data:Dp(cm.data,{groupMapsTo:"name"})}),Im=Dp({},cm,{alluvial:{data:Dp(cm.data,{groupMapsTo:"source"}),nodeAlignment:H.CENTER,nodePadding:24,monochrome:!1,nodes:[]}}),$m=Dp({},cm,{axes:am,heatmap:{divider:{state:ne.AUTO},colorLegend:{type:"linear"}}}),zm={alluvialChart:Im,areaChart:wm,axisChart:dm,boxplotChart:gm,bubbleChart:Em,bulletChart:xm,chart:cm,circlePackChart:Pm,choroplethChart:Dp({},um,{choropleth:{colorLegend:{type:"linear"}}}),comboChart:Dm,donutChart:Cm,gaugeChart:Am,groupedBarChart:pm,heatmapChart:$m,histogramChart:Sm,lineChart:bm,lollipopChart:ym,meterChart:km,pieChart:Om,proportionalMeterChart:Mm,radarChart:Nm,scatterChart:vm,simpleBarChart:fm,stackedAreaChart:_m,stackedBarChart:mm,thematicChart:um,treeChart:Rm,treemapChart:Lm,wordCloudChart:Tm};function Bm(e){if(!e)return;const t=e.getAttribute("transform").match(/translate\([0-9]+\.?[0-9]*,[0-9]+\.?[0-9]*\)/);if(!t)return null;if(t[0]){const e=t[0].replace(/translate\(/,"").replace(/\)/,"").split(",");return{tx:e[0],ty:e[1]}}return null}function jm(e,t,n){return n>e.length?e:t===B.MID_LINE?e.substr(0,n/2)+"..."+e.substr(-n/2):t===B.FRONT_LINE?"..."+e.substr(-n):t===B.END_LINE?e.substr(0,n)+"...":void 0}function Fm(e,t){const n=Um(e,"legend","additionalItems"),r=Um(t,"legend","additionalItems");if(n&&r){const i=r.map((e=>e.type)),o=n.map((e=>e.type)),a=nm.filter((e=>o.includes(e.type)&&!i.includes(e.type)));e.legend.additionalItems=a,t.legend.additionalItems=zp(a,r,"name")}}const Um=(e,...t)=>{let n=e;if(n){for(const e of t){if(null===n[e]||void 0===n[e])return null;n=n[e]}return n}return null},Hm=(e,t)=>t===j.HORIZONTAL?{y0:e.x0,y1:e.x1,x0:e.y0,x1:e.y1}:e;function Vm(e,t,n){return n===j.VERTICAL?[e,t]:[t,e]}const Zm=6048e5,Wm=864e5,Gm=6e4,qm=36e5;function Ym(e){const t=Ic(e);return t.setHours(0,0,0,0),t}function Km(e){const t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function Xm(e,t){const n=Ym(e),r=Ym(t),i=n.getTime()-Km(n),o=r.getTime()-Km(r);return Math.round((i-o)/Wm)}function Qm(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function Jm(e){return Bc(e,{weekStartsOn:1})}function eg(e){const t=Ic(e),n=t.getFullYear(),r=Qm(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const i=Jm(r),o=Qm(e,0);o.setFullYear(n,0,4),o.setHours(0,0,0,0);const a=Jm(o);return t.getTime()>=i.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function tg(e,t){var n,r,i,o;const a=Ic(e),s=a.getFullYear(),l=zc(),c=(null==t?void 0:t.firstWeekContainsDate)??(null==(r=null==(n=null==t?void 0:t.locale)?void 0:n.options)?void 0:r.firstWeekContainsDate)??l.firstWeekContainsDate??(null==(o=null==(i=l.locale)?void 0:i.options)?void 0:o.firstWeekContainsDate)??1,u=Qm(e,0);u.setFullYear(s+1,0,c),u.setHours(0,0,0,0);const d=Bc(u,t),h=Qm(e,0);h.setFullYear(s,0,c),h.setHours(0,0,0,0);const f=Bc(h,t);return a.getTime()>=d.getTime()?s+1:a.getTime()>=f.getTime()?s:s-1}function ng(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const rg={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return ng("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):ng(n+1,2)},d:(e,t)=>ng(e.getDate(),t.length),a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){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:(e,t)=>ng(e.getHours()%12||12,t.length),H:(e,t)=>ng(e.getHours(),t.length),m:(e,t)=>ng(e.getMinutes(),t.length),s:(e,t)=>ng(e.getSeconds(),t.length),S(e,t){const n=t.length,r=e.getMilliseconds();return ng(Math.floor(r*Math.pow(10,n-3)),t.length)}},ig={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){const t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:"year"})}return rg.y(e,t)},Y:function(e,t,n,r){const i=tg(e,r),o=i>0?i:1-i;return"YY"===t?ng(o%100,2):"Yo"===t?n.ordinalNumber(o,{unit:"year"}):ng(o,t.length)},R:function(e,t){return ng(eg(e),t.length)},u:function(e,t){return ng(e.getFullYear(),t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return ng(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return ng(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return rg.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return ng(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=function(e,t){const n=Ic(e),r=Bc(n,t).getTime()-function(e,t){var n,r,i,o;const a=zc(),s=(null==t?void 0:t.firstWeekContainsDate)??(null==(r=null==(n=null==t?void 0:t.locale)?void 0:n.options)?void 0:r.firstWeekContainsDate)??a.firstWeekContainsDate??(null==(o=null==(i=a.locale)?void 0:i.options)?void 0:o.firstWeekContainsDate)??1,l=tg(e,t),c=Qm(e,0);return c.setFullYear(l,0,s),c.setHours(0,0,0,0),Bc(c,t)}(n,t).getTime();return Math.round(r/Zm)+1}(e,r);return"wo"===t?n.ordinalNumber(i,{unit:"week"}):ng(i,t.length)},I:function(e,t,n){const r=function(e){const t=Ic(e),n=Jm(t).getTime()-function(e){const t=eg(e),n=Qm(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Jm(n)}(t).getTime();return Math.round(n/Zm)+1}(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):ng(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):rg.d(e,t)},D:function(e,t,n){const r=function(e){const t=Ic(e);return Xm(t,function(e){const t=Ic(e),n=Qm(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}(t))+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):ng(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":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"})}},e:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return ng(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});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"})}},c:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return ng(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=0===r?7:r;switch(t){case"i":return String(i);case"ii":return ng(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(i=12===r?"noon":0===r?"midnight":r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(i=r>=17?"evening":r>=12?"afternoon":r>=4?"morning":"night",t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return rg.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):rg.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):ng(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):ng(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):rg.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):rg.s(e,t)},S:function(e,t){return rg.S(e,t)},X:function(e,t,n,r){const i=(r._originalDate||e).getTimezoneOffset();if(0===i)return"Z";switch(t){case"X":return ag(i);case"XXXX":case"XX":return sg(i);default:return sg(i,":")}},x:function(e,t,n,r){const i=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return ag(i);case"xxxx":case"xx":return sg(i);default:return sg(i,":")}},O:function(e,t,n,r){const i=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+og(i,":");default:return"GMT"+sg(i,":")}},z:function(e,t,n,r){const i=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+og(i,":");default:return"GMT"+sg(i,":")}},t:function(e,t,n,r){const i=r._originalDate||e;return ng(Math.floor(i.getTime()/1e3),t.length)},T:function(e,t,n,r){return ng((r._originalDate||e).getTime(),t.length)}};function og(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),o=r%60;return 0===o?n+String(i):n+String(i)+t+ng(o,2)}function ag(e,t){return e%60==0?(e>0?"-":"+")+ng(Math.abs(e)/60,2):sg(e,t)}function sg(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+ng(Math.floor(r/60),2)+t+ng(r%60,2)}const lg=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},cg=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},ug={p:cg,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return lg(e,t);let o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;default:o=t.dateTime({width:"full"})}return o.replace("{{date}}",lg(r,t)).replace("{{time}}",cg(i,t))}},dg=["D","DD"],hg=["YY","YYYY"];function fg(e,t,n){if("YYYY"===e)throw new RangeError(`Use \`yyyy\` instead of \`YYYY\` (in \`${t}\`) for formatting years to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`);if("YY"===e)throw new RangeError(`Use \`yy\` instead of \`YY\` (in \`${t}\`) for formatting years to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`);if("D"===e)throw new RangeError(`Use \`d\` instead of \`D\` (in \`${t}\`) for formatting days of the month to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`);if("DD"===e)throw new RangeError(`Use \`dd\` instead of \`DD\` (in \`${t}\`) for formatting days of the month to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`)}const pg=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,mg=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,gg=/^'([^]*?)'?$/,vg=/''/g,yg=/[a-zA-Z]/;function bg(e,t,n){var r,i,o,a,s,l,c,u;const d=zc(),h=(null==n?void 0:n.locale)??d.locale??Vc,f=(null==n?void 0:n.firstWeekContainsDate)??(null==(i=null==(r=null==n?void 0:n.locale)?void 0:r.options)?void 0:i.firstWeekContainsDate)??d.firstWeekContainsDate??(null==(a=null==(o=d.locale)?void 0:o.options)?void 0:a.firstWeekContainsDate)??1,p=(null==n?void 0:n.weekStartsOn)??(null==(l=null==(s=null==n?void 0:n.locale)?void 0:s.options)?void 0:l.weekStartsOn)??d.weekStartsOn??(null==(u=null==(c=d.locale)?void 0:c.options)?void 0:u.weekStartsOn)??0,m=Ic(e);if(!function(e){if(!function(e){return e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}(e)&&"number"!=typeof e)return!1;const t=Ic(e);return!isNaN(Number(t))}(m))throw new RangeError("Invalid time value");const g={firstWeekContainsDate:f,weekStartsOn:p,locale:h,_originalDate:m};return t.match(mg).map((function(e){const t=e[0];return"p"===t||"P"===t?(0,ug[t])(e,h.formatLong):e})).join("").match(pg).map((function(r){if("''"===r)return"'";const i=r[0];if("'"===i)return function(e){const t=e.match(gg);return t?t[1].replace(vg,"'"):e}(r);const o=ig[i];if(o)return!(null!=n&&n.useAdditionalWeekYearTokens)&&function(e){return-1!==hg.indexOf(e)}(r)&&fg(r,t,String(e)),!(null!=n&&n.useAdditionalDayOfYearTokens)&&function(e){return-1!==dg.indexOf(e)}(r)&&fg(r,t,String(e)),o(m,r,h.localize,g);if(i.match(yg))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");return r})).join("")}var wg=(e=>(e["15seconds"]="15seconds",e.minute="minute",e["30minutes"]="30minutes",e.hourly="hourly",e.daily="daily",e.weekly="weekly",e.monthly="monthly",e.quarterly="quarterly",e.yearly="yearly",e))(wg||{});const _g=[["15seconds",15e3],["minute",6e4],["30minutes",18e5],["hourly",36e5],["daily",864e5],["monthly",2592e6],["quarterly",7776e6],["yearly",31104e6]];function Eg(e,t,n,r,i){const o=0===t,a=2===Number(bg(new Date(e),"c")),s=1===Number(bg(new Date(e),"q")),l=0!==t?n[t-1]:null;switch(r){case"15seconds":case"minute":case"30minutes":case"hourly":return o||function(e){const{s:t,m:n,H:r}=Sg(e);return 0===r&&0===n&&0===t}(e)||Og(e,l)||Ag(e);case"daily":return i?o||a||Ag(e):o||Og(e,l)||Ag(e);case"weekly":return o||a||Ag(e);case"monthly":return o||Ag(e);case"quarterly":return o||s;case"yearly":return!1;default:throw new Error(`${r} is not a valid time interval.`)}}function xg(e,t,n,r,i){const o=i.showDayName,a="daily"===r&&o?"weekly":r,s=new Date(e),l=Um(i,"timeIntervalFormats")[a],c=Um(l,"primary"),u=Um(l,"secondary");let d=Eg(e,t,n,r,o)?c:u;return"15seconds"===r&&0!==s.getMilliseconds()&&(d=d.replace("pp","h:mm:ss.SSS a")),bg(s,d,{locale:i.localeObject})}function Sg(e){const t=new Date(e);return{M:t.getMonth()+1,d:t.getDate(),H:t.getHours(),m:t.getMinutes(),s:t.getSeconds()}}function Tg(e,t){if(wg[t])return t;if(1===e.length)return"15seconds";const n=function(e){if(e)return e.slice(1).map(((t,n)=>t-e[n]))}(e);return function(e){const t=_g.reduce(((t,[,n],r)=>{const i=_g[t][1];return Math.abs(i-e)<Math.abs(n-e)?t:r}),0);return _g[t][0]}(function(e,t){let n;if(void 0===t)for(const t of e)null!=t&&(n>t||void 0===n&&t>=t)&&(n=t);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}(n))}function Og(e,t){return Sg(e).M!==Sg(t).M}function Ag(e){const{M:t,d:n,s:r,m:i,H:o}=Sg(e);return 1===t&&1===n&&0===o&&0===i&&0===r}function Cg(e){return void 0===e?"":e.toISOString()}var kg=(e=>(e.GRAPHICS_DOCUMENT="graphics-document",e.GRAPHICS_OBJECT="graphics-object",e.GRAPHICS_SYMBOL="graphics-symbol",e.GROUP="group",e.DOCUMENT="document",e.CHECKBOX="checkbox",e.BUTTON="button",e.MENU="menu",e.MENU_ITEM="menuitem",e.IMG="img",e))(kg||{}),Mg=function(e,t){if(null==e)return e;if(!nd(e))return function(e,t){return e&&Sp(e,t,Nd)}(e,t);for(var n=e.length,r=-1,i=Object(e);++r<n&&!1!==t(i[r],r,i););return e};const Ng=Mg;function Dg(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(r,a,n(a),e)}return r}function Rg(e,t,n,r){return Ng(e,(function(e,i,o){t(r,e,n(e),o)})),r}var Lg=Object.prototype.hasOwnProperty,Pg=function(e,t){return function(t,n){var r={};return(su(t)?Dg:Rg)(t,e,Ep(n),r)}}((function(e,t,n){Lg.call(e,n)?e[n].push(t):Gu(e,n,[t])}));const Ig=Pg;class $g{constructor(e){this.state={options:{}},this.colorScale={},this.colorClassNames={},this.services=e}getAllDataFromDomain(e){if(!this.getData())return null;const t=this.getOptions();let n=this.getData();const r=this.getDataGroups(),{groupMapsTo:i}=Um(t,"data"),o=Um(t,"axes");return e&&(n=n.filter((t=>e.includes(t[i])))),o&&Object.keys(o).forEach((e=>{const t=o[e].mapsTo,r=o[e].scaleType;if((r===F.LINEAR||r===F.LOG)&&(n=n.map((e=>({...e,[t]:null===e[t]?e[t]:Number(e[t])})))),t&&o[e].domain)if(r===F.LABELS)n=n.filter((n=>o[e].domain.includes(n[t])));else{const[r,i]=o[e].domain;n=n.filter((e=>!(t in e)||e[t]>=r&&e[t]<=i))}})),n.filter((e=>r.find((t=>t.name===e[i]))))}getDisplayData(e){if(!this.get("data"))return null;const{ACTIVE:t}=Yp.items.status,n=this.getDataGroups(e),{groupMapsTo:r}=this.getOptions().data;return this.getAllDataFromDomain(e).filter((e=>n.find((n=>n.name===e[r]&&n.status===t))))}getData(){return this.get("data")}isDataEmpty(){return!this.getData().length}setData(e){const t=this.sanitize($f(e)),n=this.generateDataGroups(t);return this.set({data:t,dataGroups:n}),t}getDataGroups(e){return Um(this.getOptions(),"data","loading")?[]:e?this.get("dataGroups").filter((t=>e.includes(t.name))):this.get("dataGroups")}getActiveDataGroups(e){const{ACTIVE:t}=Yp.items.status;return this.getDataGroups(e).filter((e=>e.status===t))}getDataGroupNames(e){return this.getDataGroups(e).map((e=>e.name))}getActiveDataGroupNames(e){return this.getActiveDataGroups(e).map((e=>e.name))}aggregateBinDataByGroup(e){return Ig(e,"group")}getBinConfigurations(){const e=this.getDisplayData(),t=this.getOptions(),n=this.services.cartesianScales.getMainXAxisPosition(),r=this.services.cartesianScales.getDomainIdentifier(),i=t.axes[n],{groupMapsTo:o}=t.data,{bins:a=qp.defaultBins}=i,s=Array.isArray(a),l=function(){var e=ge,t=de,n=Oe;function r(r){Array.isArray(r)||(r=Array.from(r));var i,o,a,s=r.length,l=new Array(s);for(i=0;i<s;++i)l[i]=e(r[i],i,r);var c=t(l),u=c[0],d=c[1],h=n(l,u,d);if(!Array.isArray(h)){const e=d,n=+h;if(t===de&&([u,d]=function(e,t,n){let r;for(;;){const i=Se(e,t,n);if(i===r||0===i||!isFinite(i))return[e,t];i>0?(e=Math.floor(e/i)*i,t=Math.ceil(t/i)*i):i<0&&(e=Math.ceil(e*i)/i,t=Math.floor(t*i)/i),r=i}}(u,d,n)),(h=xe(u,d,n))[0]<=u&&(a=Se(u,d,n)),h[h.length-1]>=d)if(e>=d&&t===de){const e=Se(u,d,n);isFinite(e)&&(e>0?d=(Math.floor(d/e)+1)*e:e<0&&(d=(Math.ceil(d*-e)+1)/-e))}else h.pop()}for(var f=h.length,p=0,m=f;h[p]<=u;)++p;for(;h[m-1]>d;)--m;(p||m<f)&&(h=h.slice(p,m),f=m-p);var g,v=new Array(f+1);for(i=0;i<=f;++i)(g=v[i]=[]).x0=i>0?h[i-1]:u,g.x1=i<f?h[i]:d;if(isFinite(a)){if(a>0)for(i=0;i<s;++i)null!=(o=l[i])&&u<=o&&o<=d&&v[Math.min(f,Math.floor((o-u)/a))].push(r[i]);else if(a<0)for(i=0;i<s;++i)if(null!=(o=l[i])&&u<=o&&o<=d){const e=Math.floor((u-o)*a);v[Math.min(f,e+(h[e]<=o))].push(r[i])}}else for(i=0;i<s;++i)null!=(o=l[i])&&u<=o&&o<=d&&v[ue(h,o,0,f)].push(r[i]);return v}return r.value=function(t){return arguments.length?(e="function"==typeof t?t:ye(t),r):e},r.domain=function(e){return arguments.length?(t="function"==typeof e?e:ye([e[0],e[1]]),r):t},r.thresholds=function(e){return arguments.length?(n="function"==typeof e?e:ye(Array.isArray(e)?ve.call(e):e),r):n},r}().value((e=>e[r])).thresholds(a)(e);if(s)l[l.length-1].x1=a[a.length-1];else{const e=l[0].x1-l[0].x0;l[l.length-1].x1=+l[l.length-1].x0+e}const c=s?[a[0],a[a.length-1]]:[l[0].x0,l[l.length-1].x1],u=Array.from(new Set(e.map((e=>e[o])))),d=[];return l.forEach((e=>{const t=`${e.x0}-${e.x1}`,n=this.aggregateBinDataByGroup(e);u.forEach((r=>{d.push({group:r,key:t,value:n[r]||0,bin:e.x0})}))})),{bins:l,binsDomain:c}}getBinnedStackedData(){const e=this.getOptions(),{groupMapsTo:t}=e.data,n=this.getActiveDataGroupNames(),{bins:r}=this.getBinConfigurations(),i=this.getDataValuesGroupedByKeys({bins:r});return Mc().keys(n)(i).map(((e,r)=>Object.keys(e).filter((e=>!isNaN(e))).map((i=>{const o=e[i];return o[t]=n[r],o}))))}getGroupedData(e){const t=this.getDisplayData(e),n={},{groupMapsTo:r}=this.getOptions().data;return t.map((e=>{const t=e[r];null!==n[t]&&void 0!==n[t]?n[t].push(e):n[t]=[e]})),Object.keys(n).map((e=>({name:e,data:n[e]})))}getStackKeys({bins:e=null,groups:t=null}={bins:null,groups:null}){const n=this.getOptions(),r=this.getDisplayData(t);let i;i=e?e.map((e=>`${e.x0}:${e.x1}`)):Bp(r.map((e=>{const t=this.services.cartesianScales.getDomainIdentifier(e);return e[t]instanceof Date?Cg(e[t]):e[t]&&"function"==typeof e[t].toString?e[t].toString():e[t]})));const o=this.services.cartesianScales.domainAxisPosition,a=n.axes[o].scaleType;return a===F.TIME?i.sort(((e,t)=>new Date(e)-new Date(t))):(a===F.LOG||a===F.LINEAR)&&i.sort(((e,t)=>e-t)),i}getDataValuesGroupedByKeys({bins:e=null,groups:t=null}){const n=this.getOptions(),{groupMapsTo:r}=n.data,i=this.getDisplayData(t),o=this.getDataGroupNames(),a=this.getStackKeys({bins:e,groups:t});return e?a.map((t=>{const[n,i]=t.split(":"),a={x0:n,x1:i},s=e.find((e=>e.x0.toString()===n.toString()));return o.forEach((e=>{a[e]=s.filter((t=>t[r]===e)).length})),a})):a.map((e=>{const t={sharedStackKey:e};return o.forEach((n=>{const o=i.find((t=>{const i=this.services.cartesianScales.getDomainIdentifier(t);return t[r]===n&&Object.prototype.hasOwnProperty.call(t,i)&&(t[i]instanceof Date?Cg(t[i])===e:t[i].toString()===e)})),a=this.services.cartesianScales.getRangeIdentifier(t);t[n]=o?o[a]:null})),t}))}getStackedData({percentage:e=!1,groups:t=null,divergent:n=!1}){const r=this.getOptions(),{groupMapsTo:i}=r.data,o=this.getActiveDataGroupNames(t),a=this.getDataValuesGroupedByKeys({groups:t});if(e){const e=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r}(a.map((e=>[e.sharedStackKey,0])));a.forEach((t=>{o.forEach((n=>{e[t.sharedStackKey]+=t[n]}))})),a.forEach((t=>{o.forEach((n=>{const r=e[t.sharedStackKey];e[t.sharedStackKey]?t[n]=t[n]/r*100:t[n]=0}))}))}return(n?Mc().offset(Nc):Mc()).keys(o)(a).map(((e,t)=>Object.keys(e).filter((e=>!isNaN(e))).map((n=>{const r=e[n];return r[i]=o[t],r}))))}getOptions(){return this.state.options}set(e,t){this.state=Object.assign({},this.state,e);const n=Object.assign({skipUpdate:!1,animate:!0},t);n.skipUpdate||this.update(n.animate)}get(e){return e?this.state[e]:this.state}setOptions(e){const t=this.getOptions();Fm(t,e),this.set({options:Dp(t,e)})}update(e=!0){this.getDisplayData()&&(this.updateAllDataGroups(),this.setCustomColorScale(),this.setColorClassNames(),this.services.events.dispatchEvent(R.Model.UPDATE,{animate:e}))}toggleDataLabel(e){const{ACTIVE:t,DISABLED:n}=Yp.items.status,r=this.getDataGroups(),i=r.some((e=>e.status===n)),o=r.filter((e=>e.status===t));if(i)if(1===o.length&&o[0].name===e)r.forEach(((e,n)=>{r[n].status=t}));else{const i=r.findIndex((t=>t.name===e));r[i].status=r[i].status===n?t:n}else r.forEach(((i,o)=>{r[o].status=i.name===e?t:n}));const a=r.filter((e=>e.status===t)),s=this.getOptions();r.some((e=>e.status===n))?s.data.selectedGroups=a.map((e=>e.name)):s.data.selectedGroups=[],this.services.events.dispatchEvent(R.Legend.ITEMS_UPDATE,{dataGroups:r}),this.set({dataGroups:r})}getIsFilled(e,t,n,r){const i=this.getOptions();return i.getIsFilled?i.getIsFilled(e,t,n,r):r}getFillColor(e,t,n){const r=this.getOptions(),i=Um(this.colorScale,e);return r.getFillColor?r.getFillColor(e,t,n,i):i}getStrokeColor(e,t,n){const r=this.getOptions(),i=Um(this.colorScale,e);return r.getStrokeColor?r.getStrokeColor(e,t,n,i):i}isUserProvidedColorScaleValid(){const e=Um(this.getOptions(),"color","scale"),t=this.getDataGroups();return null!=e&&0!=Object.keys(e).length&&t.some((t=>Object.keys(e).includes(t.name)))}getColorClassName(e){const t=this.colorClassNames(e.dataGroupName);let n=e.originalClassName;return e.classNameTypes.forEach((r=>n=e.originalClassName?`${n} ${r}-${t}`:`${r}-${t}`)),n||""}getStatus(){return null}getAllDataGroupsNames(){return this.allDataGroups}transformToTabularData(e){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/?path=/story/docs-tutorials--tabular-data-format");const t=[],{datasets:n,labels:r}=e;return n.forEach((e=>{e.data.forEach(((n,i)=>{let o;const a=Um(e,"label");if(null===a){o=Um(r,i)||"Ungrouped"}else o=a;const s={group:o,key:r[i]};isNaN(n)?(s.value=n.value,s.date=n.date):s.value=n,t.push(s)}))})),t}getTabularDataArray(){return[]}exportToCSV(){const e=this.getTabularDataArray().map((e=>e.map((e=>`"${("&ndash;"===e?"–":e).split(/[,;'"`]/).map((e=>function(e){const t=e.trim();return["=","+","-","@","\t","\r"].includes(t.charAt(0))?` ${t}`:/[,\"\n]/.test(t)?`"${t}"`:t}(e))).join("")}"`)))).map((e=>e.join(","))).join("\n"),t=this.getOptions();let n="myChart";const r=Um(t,"fileDownload","fileName");"function"==typeof r?n=r("csv"):"string"==typeof r&&(n=r),this.services.files.downloadCSV(e,`${n}.csv`)}getTabularData(e){return Array.isArray(e)?e:this.transformToTabularData(e)}sanitize(e){return this.getTabularData(e)}updateAllDataGroups(){this.allDataGroups?this.getDataGroupNames().forEach((e=>{-1===this.allDataGroups.indexOf(e)&&this.allDataGroups.push(e)})):this.allDataGroups=this.getDataGroupNames()}generateDataGroups(e){const{groupMapsTo:t}=this.getOptions().data,{ACTIVE:n,DISABLED:r}=Yp.items.status,i=this.getOptions(),o=Bp(e.map((e=>e[t])));i.data.selectedGroups.length&&(i.data.selectedGroups.every((e=>o.includes(e)))||(i.data.selectedGroups=[]));const a=e=>!i.data.selectedGroups.length||i.data.selectedGroups.includes(e)?n:r;return o.map((e=>({name:e,status:a(e)})))}setCustomColorScale(){if(!this.isUserProvidedColorScaleValid())return;const e=this.getOptions(),t=Um(e,"color","scale");Object.keys(t).forEach((e=>{this.allDataGroups.includes(e)||console.warn(`"${e}" does not exist in data groups.`)})),this.allDataGroups.filter((e=>t[e])).forEach((e=>this.colorScale[e]=t[e]))}setColorClassNames(){const e=Um(this.getOptions(),"color","pairing");let t=Um(e,"numberOfVariants");(!t||t<this.allDataGroups.length)&&(t=this.allDataGroups.length);let n=Um(e,"option");const r=t>5?14:t;n=n<=Gp[`${r}-color`]?n:1;const i=this.allDataGroups.map(((e,t)=>`${r}-${n}-${t%14+1}`));this.colorClassNames=Mo().range(i).domain(this.allDataGroups)}}let zg=class extends $g{constructor(e){super(e),this.axisFlavor=re.DEFAULT}assignRangeAndDomains(){const{cartesianScales:e}=this.services,t=this.getOptions(),n=e.isDualAxes(),r={primaryDomain:e.domainAxisPosition,primaryRange:e.rangeAxisPosition,secondaryDomain:null,secondaryRange:null};return n&&(r.secondaryDomain=e.secondaryDomainAxisPosition,r.secondaryRange=e.secondaryRangeAxisPosition),Object.keys(r).forEach((n=>{const i=r[n];e.scales[i]?r[n]={position:i,label:e.getScaleLabel(i),identifier:Um(t,"axes",i,"mapsTo")}:r[n]=null})),r}getTabularDataArray(){const e=this.getDisplayData(),t=this.getOptions(),{groupMapsTo:n}=t.data,{cartesianScales:r}=this.services,{primaryDomain:i,primaryRange:o,secondaryDomain:a,secondaryRange:s}=this.assignRangeAndDomains();let l;return r.getDomainAxisScaleType()===F.TIME&&(l=e=>bg(e,"MMM d, yyyy")),[["Group",i.label,o.label,...a?[a.label]:[],...s?[s.label]:[]],...e.map((e=>[e[n],null===e[i.identifier]?"&ndash;":l?l(e[i.identifier]):e[i.identifier],null===e[o.identifier]||isNaN(e[o.identifier])?"&ndash;":e[o.identifier].toLocaleString(),...a?[null===e[a.identifier]?"&ndash;":e[a.identifier]]:[],...s?[null===e[s.identifier]||isNaN(e[s.identifier])?"&ndash;":e[s.identifier]]:[]]))]}setData(e){let t;if(e&&(t=super.setData(e),Um(this.getOptions(),"zoomBar",$.TOP,"enabled"))){const e=Um(this.getOptions(),"zoomBar",$.TOP,"data");this.setZoomBarData(e)}return t}setZoomBarData(e){const t=e?this.sanitize($f(e)):this.getDisplayData();let n=t;const{cartesianScales:r}=this.services;if(t&&r.domainAxisPosition&&r.rangeAxisPosition){const e=r.getDomainIdentifier(),i=r.getRangeIdentifier();let o=t.map((t=>t[e].getTime()));o=Bp(o).sort(),n=o.map((n=>{let r=0;const o={};return t.forEach((t=>{t[e].getTime()===n&&(r+=t[i])})),o[e]=new Date(n),o[i]=r,o}))}this.set({zoomBarData:n})}getZoomBarData(){return this.get("zoomBarData")}sanitizeDateValues(e){const t=this.getOptions();if(!t.axes)return e;const n=[];return Object.keys($).forEach((e=>{const r=$[e],i=t.axes[r];if(i&&i.scaleType===F.TIME){const e=i.mapsTo;(null!==e||void 0!==e)&&n.push(e)}})),n.length>0&&e.forEach((e=>{n.forEach((t=>{null===Um(e,t,"getTime")&&(e[t]=new Date(e[t]))}))})),e}sanitize(e){return e=super.sanitize(e),this.sanitizeDateValues(e)}};var Bg=/\s/,jg=/^\s+/;var Fg=NaN,Ug=/^[-+]0x[0-9a-f]+$/i,Hg=/^0b[01]+$/i,Vg=/^0o[0-7]+$/i,Zg=parseInt;function Wg(e){if("number"==typeof e)return e;if(au(e))return Fg;if(hu(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=hu(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=function(e){return e&&e.slice(0,function(e){for(var t=e.length;t--&&Bg.test(e.charAt(t)););return t}(e)+1).replace(jg,"")}(e);var n=Hg.test(e);return n||Vg.test(e)?Zg(e.slice(2),n?2:8):Ug.test(e)?Fg:+e}const Gg=function(){return Gc.Date.now()};var qg=Math.max,Yg=Math.min;const Kg=(()=>{let e=0;return()=>(e+=1,`u${`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4)}${e}`)})();function Xg(e){const t=[];for(let n=0,r=e.length;n<r;n++)t.push(e[n]);return t}function Qg(e,t){const n=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return n?parseFloat(n.replace("px","")):0}function Jg(e,t={}){const n=t.width||function(e){const t=Qg(e,"border-left-width"),n=Qg(e,"border-right-width");return e.clientWidth+t+n}(e),r=t.height||function(e){const t=Qg(e,"border-top-width"),n=Qg(e,"border-bottom-width");return e.clientHeight+t+n}(e);return{width:n,height:r}}const ev=16384;function tv(e){return new Promise(((t,n)=>{const r=new Image;r.decode=()=>t(r),r.onload=()=>t(r),r.onerror=n,r.crossOrigin="anonymous",r.decoding="async",r.src=e}))}const nv=(e,t)=>{if(e instanceof t)return!0;const n=Object.getPrototypeOf(e);return null!==n&&(n.constructor.name===t.name||nv(n,t))};function rv(e,t,n){const r=window.getComputedStyle(e,n),i=r.getPropertyValue("content");if(""===i||"none"===i)return;const o=Kg();try{t.className=`${t.className} ${o}`}catch{return}const a=document.createElement("style");a.appendChild(function(e,t,n){const r=`.${e}:${t}`,i=n.cssText?function(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}(n):function(e){return Xg(e).map((t=>`${t}: ${e.getPropertyValue(t)}${e.getPropertyPriority(t)?" !important":""};`)).join(" ")}(n);return document.createTextNode(`${r}{${i}}`)}(o,n,r)),t.appendChild(a)}const iv="application/font-woff",ov="image/jpeg",av={woff:iv,woff2:iv,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:ov,jpeg:ov,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function sv(e){const t=function(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}(e).toLowerCase();return av[t]||""}function lv(e){return-1!==e.search(/^(data:)/)}function cv(e,t){return`data:${t};base64,${e}`}async function uv(e,t,n){const r=await fetch(e,t);if(404===r.status)throw new Error(`Resource "${r.url}" not found`);const i=await r.blob();return new Promise(((e,t)=>{const o=new FileReader;o.onerror=t,o.onloadend=()=>{try{e(n({res:r,result:o.result}))}catch(e){t(e)}},o.readAsDataURL(i)}))}const dv={};async function hv(e,t,n){const r=function(e,t,n){let r=e.replace(/\?.*/,"");return n&&(r=e),/ttf|otf|eot|woff2?/i.test(r)&&(r=r.replace(/.*\//,"")),t?`[${t}]${r}`:r}(e,t,n.includeQueryParams);if(null!=dv[r])return dv[r];let i;n.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+(new Date).getTime());try{const r=await uv(e,n.fetchRequestInit,(({res:e,result:n})=>(t||(t=e.headers.get("Content-Type")||""),function(e){return e.split(/,/)[1]}(n))));i=cv(r,t)}catch(t){i=n.imagePlaceholder||"";let r=`Failed to fetch resource: ${e}`;t&&(r="string"==typeof t?t:t.message),r&&console.warn(r)}return dv[r]=i,i}const fv=e=>null!=e.tagName&&"SLOT"===e.tagName.toUpperCase();async function pv(e,t,n){return n||!t.filter||t.filter(e)?Promise.resolve(e).then((e=>async function(e,t){return nv(e,HTMLCanvasElement)?async function(e){const t=e.toDataURL();return"data:,"===t?e.cloneNode(!1):tv(t)}(e):nv(e,HTMLVideoElement)?async function(e,t){if(e.currentSrc){const t=document.createElement("canvas"),n=t.getContext("2d");return t.width=e.clientWidth,t.height=e.clientHeight,null==n||n.drawImage(e,0,0,t.width,t.height),tv(t.toDataURL())}const n=e.poster,r=sv(n);return tv(await hv(n,r,t))}(e,t):nv(e,HTMLIFrameElement)?async function(e){var t;try{if(null!==(t=null==e?void 0:e.contentDocument)&&void 0!==t&&t.body)return await pv(e.contentDocument.body,{},!0)}catch{}return e.cloneNode(!1)}(e):e.cloneNode(!1)}(e,t))).then((n=>async function(e,t,n){var r,i;let o=[];return o=fv(e)&&e.assignedNodes?Xg(e.assignedNodes()):nv(e,HTMLIFrameElement)&&null!==(r=e.contentDocument)&&void 0!==r&&r.body?Xg(e.contentDocument.body.childNodes):Xg((null!==(i=e.shadowRoot)&&void 0!==i?i:e).childNodes),0===o.length||nv(e,HTMLVideoElement)||await o.reduce(((e,r)=>e.then((()=>pv(r,n))).then((e=>{e&&t.appendChild(e)}))),Promise.resolve()),t}(e,n,t))).then((t=>function(e,t){return nv(t,Element)&&(function(e,t){const n=t.style;if(!n)return;const r=window.getComputedStyle(e);r.cssText?(n.cssText=r.cssText,n.transformOrigin=r.transformOrigin):Xg(r).forEach((i=>{let o=r.getPropertyValue(i);"font-size"===i&&o.endsWith("px")&&(o=Math.floor(parseFloat(o.substring(0,o.length-2)))-.1+"px"),nv(e,HTMLIFrameElement)&&"display"===i&&"inline"===o&&(o="block"),"d"===i&&t.getAttribute("d")&&(o=`path(${t.getAttribute("d")})`),n.setProperty(i,o,r.getPropertyPriority(i))}))}(e,t),function(e,t){rv(e,t,":before"),rv(e,t,":after")}(e,t),function(e,t){nv(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),nv(e,HTMLInputElement)&&t.setAttribute("value",e.value)}(e,t),function(e,t){if(nv(e,HTMLSelectElement)){const n=t,r=Array.from(n.children).find((t=>e.value===t.getAttribute("value")));r&&r.setAttribute("selected","")}}(e,t)),t}(e,t))).then((e=>async function(e,t){const n=e.querySelectorAll?e.querySelectorAll("use"):[];if(0===n.length)return e;const r={};for(let i=0;i<n.length;i++){const o=n[i].getAttribute("xlink:href");if(o){const n=e.querySelector(o),i=document.querySelector(o);!n&&i&&!r[o]&&(r[o]=await pv(i,t,!0))}}const i=Object.values(r);if(i.length){const t="http://www.w3.org/1999/xhtml",n=document.createElementNS(t,"svg");n.setAttribute("xmlns",t),n.style.position="absolute",n.style.width="0",n.style.height="0",n.style.overflow="hidden",n.style.display="none";const r=document.createElementNS(t,"defs");n.appendChild(r);for(let e=0;e<i.length;e++)r.appendChild(i[e]);e.appendChild(n)}return e}(e,t))):null}const mv=/url\((['"]?)([^'"]+?)\1\)/g,gv=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,vv=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function yv(e){return-1!==e.search(mv)}async function bv(e,t,n){if(!yv(e))return e;const r=function(e,{preferredFontFormat:t}){return t?e.replace(vv,(e=>{for(;;){const[n,,r]=gv.exec(e)||[];if(!r)return"";if(r===t)return`src: ${n};`}})):e}(e,n);return function(e){const t=[];return e.replace(mv,((e,n,r)=>(t.push(r),e))),t.filter((e=>!lv(e)))}(r).reduce(((e,r)=>e.then((e=>async function(e,t,n,r,i){try{const o=n?function(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;const n=document.implementation.createHTMLDocument(),r=n.createElement("base"),i=n.createElement("a");return n.head.appendChild(r),n.body.appendChild(i),t&&(r.href=t),i.href=e,i.href}(t,n):t,a=sv(t);let s;return s=i?cv(await i(o),a):await hv(o,a,r),e.replace(function(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}(t),`$1${s}$3`)}catch{}return e}(e,r,t,n)))),Promise.resolve(r))}async function wv(e,t,n){var r;const i=null===(r=t.style)||void 0===r?void 0:r.getPropertyValue(e);if(i){const r=await bv(i,null,n);return t.style.setProperty(e,r,t.style.getPropertyPriority(e)),!0}return!1}async function _v(e,t){nv(e,Element)&&(await async function(e,t){await wv("background",e,t)||await wv("background-image",e,t),await wv("mask",e,t)||await wv("mask-image",e,t)}(e,t),await async function(e,t){const n=nv(e,HTMLImageElement);if((!n||lv(e.src))&&(!nv(e,SVGImageElement)||lv(e.href.baseVal)))return;const r=n?e.src:e.href.baseVal,i=await hv(r,sv(r),t);await new Promise(((t,r)=>{e.onload=t,e.onerror=r;const o=e;o.decode&&(o.decode=t),"lazy"===o.loading&&(o.loading="eager"),n?(e.srcset="",e.src=i):e.href.baseVal=i}))}(e,t),await async function(e,t){const n=Xg(e.childNodes).map((e=>_v(e,t)));await Promise.all(n).then((()=>e))}(e,t))}const Ev={};async function xv(e){let t=Ev[e];return null!=t||(t={url:e,cssText:await(await fetch(e)).text()},Ev[e]=t),t}async function Sv(e,t){let n=e.cssText;const r=/url\(["']?([^"')]+)["']?\)/g,i=(n.match(/url\([^)]+\)/g)||[]).map((async i=>{let o=i.replace(r,"$1");return o.startsWith("https://")||(o=new URL(o,e.url).href),uv(o,t.fetchRequestInit,(({result:e})=>(n=n.replace(i,`url(${e})`),[i,e])))}));return Promise.all(i).then((()=>n))}function Tv(e){if(null==e)return[];const t=[];let n=e.replace(/(\/\*[\s\S]*?\*\/)/gi,"");const r=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const e=r.exec(n);if(null===e)break;t.push(e[0])}n=n.replace(r,"");const i=/@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 e=i.exec(n);if(null===e){if(e=o.exec(n),null===e)break;i.lastIndex=o.lastIndex}else o.lastIndex=i.lastIndex;t.push(e[0])}return t}async function Ov(e,t){const n=null!=t.fontEmbedCSS?t.fontEmbedCSS:t.skipFonts?null:await async function(e,t){const n=await async function(e,t){if(null==e.ownerDocument)throw new Error("Provided element is not within a Document");const n=Xg(e.ownerDocument.styleSheets),r=await async function(e,t){const n=[],r=[];return e.forEach((n=>{if("cssRules"in n)try{Xg(n.cssRules||[]).forEach(((e,i)=>{if(e.type===CSSRule.IMPORT_RULE){let o=i+1;const a=xv(e.href).then((e=>Sv(e,t))).then((e=>Tv(e).forEach((e=>{try{n.insertRule(e,e.startsWith("@import")?o+=1:n.cssRules.length)}catch(t){console.error("Error inserting rule from remote css",{rule:e,error:t})}})))).catch((e=>{console.error("Error loading remote css",e.toString())}));r.push(a)}}))}catch(i){const o=e.find((e=>null==e.href))||document.styleSheets[0];null!=n.href&&r.push(xv(n.href).then((e=>Sv(e,t))).then((e=>Tv(e).forEach((e=>{o.insertRule(e,n.cssRules.length)})))).catch((e=>{console.error("Error loading remote stylesheet",e)}))),console.error("Error inlining remote css file",i)}})),Promise.all(r).then((()=>(e.forEach((e=>{if("cssRules"in e)try{Xg(e.cssRules||[]).forEach((e=>{n.push(e)}))}catch(t){console.error(`Error while reading CSS rules from ${e.href}`,t)}})),n)))}(n,t);return function(e){return e.filter((e=>e.type===CSSRule.FONT_FACE_RULE)).filter((e=>yv(e.style.getPropertyValue("src"))))}(r)}(e,t);return(await Promise.all(n.map((e=>{const n=e.parentStyleSheet?e.parentStyleSheet.href:null;return bv(e.cssText,n,t)})))).join("\n")}(e,t);if(n){const t=document.createElement("style"),r=document.createTextNode(n);t.appendChild(r),e.firstChild?e.insertBefore(t,e.firstChild):e.appendChild(t)}}async function Av(e,t={}){const{width:n,height:r}=Jg(e,t),i=await pv(e,t,!0);return await Ov(i,t),await _v(i,t),function(e,t){const{style:n}=e;t.backgroundColor&&(n.backgroundColor=t.backgroundColor),t.width&&(n.width=`${t.width}px`),t.height&&(n.height=`${t.height}px`);const r=t.style;null!=r&&Object.keys(r).forEach((e=>{n[e]=r[e]}))}(i,t),await async function(e,t,n){const r="http://www.w3.org/2000/svg",i=document.createElementNS(r,"svg"),o=document.createElementNS(r,"foreignObject");return i.setAttribute("width",`${t}`),i.setAttribute("height",`${n}`),i.setAttribute("viewBox",`0 0 ${t} ${n}`),o.setAttribute("width","100%"),o.setAttribute("height","100%"),o.setAttribute("x","0"),o.setAttribute("y","0"),o.setAttribute("externalResourcesRequired","true"),i.appendChild(o),o.appendChild(e),async function(e){return Promise.resolve().then((()=>(new XMLSerializer).serializeToString(e))).then(encodeURIComponent).then((e=>`data:image/svg+xml;charset=utf-8,${e}`))}(i)}(i,n,r)}async function Cv(e,t={}){const{width:n,height:r}=Jg(e,t),i=await Av(e,t),o=await tv(i),a=document.createElement("canvas"),s=a.getContext("2d"),l=t.pixelRatio||function(){let e,t;try{t=process}catch{}const n=t&&t.env?t.env.devicePixelRatio:null;return n&&(e=parseInt(n,10),Number.isNaN(e)&&(e=1)),e||window.devicePixelRatio||1}(),c=t.canvasWidth||n,u=t.canvasHeight||r;return a.width=c*l,a.height=u*l,t.skipAutoScale||function(e){(e.width>ev||e.height>ev)&&(e.width>ev&&e.height>ev?e.width>e.height?(e.height*=ev/e.width,e.width=ev):(e.width*=ev/e.height,e.height=ev):e.width>ev?(e.height*=ev/e.width,e.width=ev):(e.width*=ev/e.height,e.height=ev))}(a),a.style.width=`${c}`,a.style.height=`${u}`,t.backgroundColor&&(s.fillStyle=t.backgroundColor,s.fillRect(0,0,a.width,a.height)),s.drawImage(o,0,0,a.width,a.height),a}class kv{constructor(e,t){this.model=e,this.services=t,this.init()}init(){}update(){}setModel(e){this.model=e}setServices(e){this.services=e}}let Mv=class e extends kv{constructor(e,t){super(e,t),this.chartID=""}static getHTMLElementSize(e){return{width:e.clientWidth,height:e.clientHeight}}static getSVGElementSize(e,t={useAttrs:!1,useClientDimensions:!1,useBBox:!1,useBoundingRect:!1}){e.attr||(e=sn(e));const n={width:0,height:0},r=e=>{e&&Object.keys(n).forEach((t=>{if(e[t]){const r=e[t],i=parseFloat(r);r&&i>n[t]&&-1===(""+r).indexOf("%")&&(n[t]=i)}}))},i={width:e.attr("width"),height:e.attr("height")},o=e.node();let a,s,l,c,u;try{"function"==typeof o.getBBox&&(a=o.getBBox(),s={width:a.width,height:a.height})}catch(e){console.error(e)}try{"function"==typeof(null==o?void 0:o.getBoundingClientRect)&&(l=o.getBoundingClientRect(),c={width:l.width,height:l.height})}catch(e){console.error(e)}if(o instanceof SVGSVGElement&&(u={width:o.clientWidth,height:o.clientHeight}),t){if(t.useAttrs&&(r(i),n.width>0&&n.height>0))return n;if(t.useClientDimensions&&(r(u),n.width>0&&n.height>0))return u;if(t.useBBox&&(r(s),n.width>0&&n.height>0))return s;if(t.useBoundingRect&&(r(c),n.width>0&&n.height>0))return c}try{r({width:Um(e.node(),"width","baseVal","value"),height:Um(e.node(),"height","baseVal","value")})}catch{r(u),r(s),r(i)}return n}static appendOrSelect(e,t){const n=e.select(`${t}`);if(n.empty()){let n,r,i=t.split("#");return 2===i.length?(n=i[0],i=i[1].split("."),r=i[0]):(i=t.split("."),n=i[0]),e.append(n).attr("id",r).attr("class",i.slice(1).join(" "))}return n}init(){this.styleHolderElement(),this.initializeID(),this.addMainContainer(),this.model.getOptions().resizable&&this.addResizeListener(),this.addHolderListeners(),this.handleFullscreenChange()}getChartID(){return this.chartID}generateElementIDString(e){return`chart-${this.chartID}-${e}`}initializeID(){this.chartID=Math.floor(281474976710656*(1+Math.random())).toString(16)}addMainContainer(){const e=this.model.getOptions(),t=Um(e,"style","prefix"),n=sn(this.getHolder()).append("div").classed(`${jp}--${t}--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 e=this.getHolder(),{width:t,height:n,theme:r}=this.model.getOptions();t!==this.width&&(e.style.width=t,this.width=t),n!==this.height&&(e.style.height=n,this.height=n),sn(this.getHolder()).classed(`${jp}--chart-holder`,!0).attr("data-carbon-theme",r)}getHolder(){return this.model.get("holder")}exportToJPG(){const e=this,t=this.model.getOptions(),n=sn(this.getHolder());n.classed("filled",!0),async function(e,t={}){return(await Cv(e,t)).toDataURL("image/jpeg",t.quality||1)}(this.getMainContainer(),{quality:1,filter:e=>!(e.classList&&e.classList.contains("cds--cc--toolbar"))}).then((function(r){var i;let o="myChart";const a=Um(t,"fileDownload","fileName");"function"==typeof a?o=a("jpg"):"string"==typeof a&&(o=a),null==(i=e.services.files)||i.downloadImage(r,`${o}.jpg`),n.classed("filled",!1)}))}exportToPNG(){const e=this,t=this.model.getOptions(),n=sn(this.getHolder());n.classed("filled",!0),async function(e,t={}){return(await Cv(e,t)).toDataURL()}(this.getMainContainer(),{quality:1,filter:e=>!(e.classList&&e.classList.contains("cds--cc--toolbar"))}).then((function(r){var i;let o="myChart";const a=Um(t,"fileDownload","fileName");"function"==typeof a?o=a("png"):"string"==typeof a&&(o=a),null==(i=e.services.files)||i.downloadImage(r,`${o}.png`),n.classed("filled",!1)})).catch((function(e){console.error("oops, something went wrong!",e)}))}toggleFullscreen(){const e=this.getHolder();sn(e).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():e.requestFullscreen?e.requestFullscreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.msRequestFullscreen&&e.msRequestFullscreen()}handleFullscreenChange(){document.addEventListener("fullscreenchange",(()=>{const e=sn(this.getHolder()),t=e.classed("fullscreen");e.classed("fullscreen",!t)}))}setSVGMaxHeight(){if(!this.model.getOptions().height){const{height:t}=e.getSVGElementSize(sn(this.mainContainer),{useBBox:!0}),n=sn(this.mainContainer).attr("class"),r=sn(this.mainContainer).selectAll(`.${n} > svg`);let i=0;r.nodes().forEach((function(t){i+=Number(e.getSVGElementSize(sn(t),{useBBox:!0}).height)})),i<=t?sn(this.mainContainer).attr("height",i):sn(this.mainContainer).attr("height","100%")}}getMainContainer(){return this.mainContainer}addHolderListeners(){const e=this.getHolder();e&&sn(e).on("mouseover",(()=>{var e;null==(e=this.services.events)||e.dispatchEvent(R.Chart.MOUSEOVER)})).on("mouseout",(()=>{var e;null==(e=this.services.events)||e.dispatchEvent(R.Chart.MOUSEOUT)}))}addResizeListener(){const e=this.getHolder();if(!e)return;let t=e.clientWidth,n=e.clientHeight;const r=function(e,t,n){var r,i,o,a,s,l,c=0,u=!1,d=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function f(t){var n=r,o=i;return r=i=void 0,c=t,a=e.apply(o,n)}function p(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-c>=o}function m(){var e=Gg();if(p(e))return g(e);s=setTimeout(m,function(e){var n=t-(e-l);return d?Yg(n,o-(e-c)):n}(e))}function g(e){return s=void 0,h&&r?f(e):(r=i=void 0,a)}function v(){var e=Gg(),n=p(e);if(r=arguments,i=this,l=e,n){if(void 0===s)return function(e){return c=e,s=setTimeout(m,t),u?f(e):a}(l);if(d)return clearTimeout(s),s=setTimeout(m,t),f(l)}return void 0===s&&(s=setTimeout(m,t)),a}return t=Wg(t)||0,hu(n)&&(u=!!n.leading,o=(d="maxWait"in n)?qg(Wg(n.maxWait)||0,t):o,h="trailing"in n?!!n.trailing:h),v.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=l=i=s=void 0},v.flush=function(){return void 0===s?a:g(Gg())},v}((()=>{var r;e&&(Math.abs(t-e.clientWidth)>1||Math.abs(n-e.clientHeight)>1)&&(t=e.clientWidth,n=e.clientHeight,null==(r=this.services.events)||r.dispatchEvent(R.Chart.RESIZE))}),12.5);new ResizeObserver(r).observe(e)}},Nv=class e extends kv{static appendOrUpdateLinearGradient(e){let t=e.svg.select(`defs linearGradient#${e.id}`);t.empty()&&(t=e.svg.append("defs").append("linearGradient").attr("id",e.id).attr("x1",e.x1).attr("x2",e.x2).attr("y1",e.y1).attr("y2",e.y2)),t.selectAll("stop").remove(),t.selectAll("stop").data(e.stops).enter().append("stop").attr("offset",(e=>e.offset)).style("stop-color",(e=>e.color)).style("stop-opacity",(e=>e.opacity))}static getOffsetRatio(e){return(100*Math.abs(e[1])/Math.abs(e[0]-e[1])).toFixed(2)+"%"}static getStops(t,n){let r=[{offset:"0%",color:n,opacity:"0.6"},{offset:"80%",color:n,opacity:"0"}];return t[0]<0&&t[1]>0&&(r=[{offset:"0%",color:n,opacity:"0.6"},{offset:e.getOffsetRatio(t),color:n,opacity:"0"},{offset:"100%",color:n,opacity:"0.6"}]),r}};var Dv=Math.PI,Rv=2*Dv,Lv=1e-6,Pv=Rv-Lv;function Iv(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function $v(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),n}Iv.prototype=function(){return new Iv}.prototype={constructor:Iv,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,i,o){this._+="C"+ +e+","+ +t+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(e,t,n,r,i){e=+e,t=+t,n=+n,r=+r,i=+i;var o=this._x1,a=this._y1,s=n-e,l=r-t,c=o-e,u=a-t,d=c*c+u*u;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(d>Lv)if(Math.abs(u*s-l*c)>Lv&&i){var h=n-o,f=r-a,p=s*s+l*l,m=h*h+f*f,g=Math.sqrt(p),v=Math.sqrt(d),y=i*Math.tan((Dv-Math.acos((p+d-m)/(2*g*v)))/2),b=y/v,w=y/g;Math.abs(b-1)>Lv&&(this._+="L"+(e+b*c)+","+(t+b*u)),this._+="A"+i+","+i+",0,0,"+ +(u*h>c*f)+","+(this._x1=e+w*s)+","+(this._y1=t+w*l)}else this._+="L"+(this._x1=e)+","+(this._y1=t)},arc:function(e,t,n,r,i,o){e=+e,t=+t,o=!!o;var a=(n=+n)*Math.cos(r),s=n*Math.sin(r),l=e+a,c=t+s,u=1^o,d=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>Lv||Math.abs(this._y1-c)>Lv)&&(this._+="L"+l+","+c),n&&(d<0&&(d=d%Rv+Rv),d>Pv?this._+="A"+n+","+n+",0,1,"+u+","+(e-a)+","+(t-s)+"A"+n+","+n+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):d>Lv&&(this._+="A"+n+","+n+",0,"+ +(d>=Dv)+","+u+","+(this._x1=e+n*Math.cos(i))+","+(this._y1=t+n*Math.sin(i))))},rect:function(e,t,n,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}},Array.prototype.slice;var zv={value:function(){}};function Bv(){for(var e,t=0,n=arguments.length,r={};t<n;++t){if(!(e=arguments[t]+"")||e in r||/[\s.]/.test(e))throw new Error("illegal type: "+e);r[e]=[]}return new jv(r)}function jv(e){this._=e}function Fv(e,t){for(var n,r=0,i=e.length;r<i;++r)if((n=e[r]).name===t)return n.value}function Uv(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=zv,e=e.slice(0,r).concat(e.slice(r+1));break}return null!=n&&e.push({name:t,value:n}),e}jv.prototype=Bv.prototype={constructor:jv,on:function(e,t){var n,r=this._,i=function(e,t){return e.trim().split(/^|\s+/).map((function(e){var n="",r=e.indexOf(".");if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:n}}))}(e+"",r),o=-1,a=i.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++o<a;)if(n=(e=i[o]).type)r[n]=Uv(r[n],e.name,t);else if(null==t)for(n in r)r[n]=Uv(r[n],e.name,null);return this}for(;++o<a;)if((n=(e=i[o]).type)&&(n=Fv(r[n],e.name)))return n},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new jv(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=0,n=(r=this._[e]).length;o<n;++o)r[o].value.apply(t,i)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,o=r.length;i<o;++i)r[i].value.apply(t,n)}},$v(Object.freeze(Object.defineProperty({__proto__:null,dispatch:Bv},Symbol.toStringTag,{value:"Module"}))).dispatch,Math.PI;var Hv=function(e){return function(t){return null==e?void 0:e[t]}}({À:"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"});const Vv=Hv;var Zv=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Wv=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g"),Gv=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,qv=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Yv="\\ud800-\\udfff",Kv="\\u2700-\\u27bf",Xv="a-z\\xdf-\\xf6\\xf8-\\xff",Qv="A-Z\\xc0-\\xd6\\xd8-\\xde",Jv="\\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",ey="["+Jv+"]",ty="\\d+",ny="["+Kv+"]",ry="["+Xv+"]",iy="[^"+Yv+Jv+ty+Kv+Xv+Qv+"]",oy="(?:\\ud83c[\\udde6-\\uddff]){2}",ay="[\\ud800-\\udbff][\\udc00-\\udfff]",sy="["+Qv+"]",ly="(?:"+ry+"|"+iy+")",cy="(?:"+sy+"|"+iy+")",uy="(?:['’](?:d|ll|m|re|s|t|ve))?",dy="(?:['’](?:D|LL|M|RE|S|T|VE))?",hy="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",fy="[\\ufe0e\\ufe0f]?",py=fy+hy+"(?:\\u200d(?:"+["[^"+Yv+"]",oy,ay].join("|")+")"+fy+hy+")*",my="(?:"+[ny,oy,ay].join("|")+")"+py,gy=RegExp([sy+"?"+ry+"+"+uy+"(?="+[ey,sy,"$"].join("|")+")",cy+"+"+dy+"(?="+[ey,sy+ly,"$"].join("|")+")",sy+"?"+ly+"+"+uy,sy+"+"+dy,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ty,my].join("|"),"g");var vy=RegExp("['’]","g");function yy(e){return function(t){return function(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;)n=t(n,e[i],i,e);return n}(function(e,t,n){return e=Qd(e),void 0===(t=n?void 0:t)?function(e){return qv.test(e)}(e)?function(e){return e.match(gy)||[]}(e):function(e){return e.match(Gv)||[]}(e):e.match(t)||[]}(function(e){return(e=Qd(e))&&e.replace(Zv,Vv).replace(Wv,"")}(t).replace(vy,"")),e,"")}}function by(e,t){var n;return Ng(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function wy(e,t,n){var r=su(e)?Bf:by;return n&&rd(e,t,n)&&(t=void 0),r(e,Ep(t))}yy((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}));let _y=class{constructor(e,t,n){if(this.type="",this.renderType=L.HTML,this.id="",this.parent=void 0,this.configs={},this.model=e,this.services=t,n&&(this.configs=n,this.configs.id)){const e=Um(this.model.getOptions(),"style","prefix");this.id=`${e}--${this.configs.id}`}this.parent||this.setParent(sn(this.services.domUtils.getMainContainer()))}init(){}render(e=!0){console.error("Error: Component did not provide the required render function.")}destroy(){}setModel(e){this.model=e}setServices(e){this.services=e}setParent(e){var t;const n=this.parent;if(this.parent=e,(!n||n.node()!==e.node())&&this.type){const e=Um(this.model.getOptions(),"style","prefix");null==(t=this.parent)||t.classed(`${jp}--${e}--${this.type}`,!0),n&&n.classed(`${jp}--${e}--${this.type}`,!1)}}getParent(){return this.parent}getComponentContainer(e={withinChartClip:!1}){if(this.type){const t=Um(this.model.getOptions(),"style","prefix"),n=this.id?`#${this.id}`:"",r=Mv.appendOrSelect(this.parent,`${this.renderType===L.SVG?"svg":"div"}${n}.${jp}--${t}--${this.type}`);if(e.withinChartClip){const e=this.model.get("chartClipId");if(e){const t=sn(`#${e}`).select("rect");0!==t.size()&&parseFloat(t.attr("height"))>0&&r.attr("clip-path",`url(#${e})`)}}return r.attr("width","100%").attr("height","100%")}return this.parent}getOptions(){return this.configs.options?Dp({},this.model.getOptions(),this.configs.options):this.model.getOptions()}};const{entries:Ey,setPrototypeOf:xy,isFrozen:Sy,getPrototypeOf:Ty,getOwnPropertyDescriptor:Oy}=Object;let{freeze:Ay,seal:Cy,create:ky}=Object,{apply:My,construct:Ny}=typeof Reflect<"u"&&Reflect;Ay||(Ay=function(e){return e}),Cy||(Cy=function(e){return e}),My||(My=function(e,t,n){return e.apply(t,n)}),Ny||(Ny=function(e,t){return new e(...t)});const Dy=Hy(Array.prototype.forEach),Ry=Hy(Array.prototype.pop),Ly=Hy(Array.prototype.push),Py=Hy(String.prototype.toLowerCase),Iy=Hy(String.prototype.toString),$y=Hy(String.prototype.match),zy=Hy(String.prototype.replace),By=Hy(String.prototype.indexOf),jy=Hy(String.prototype.trim),Fy=Hy(RegExp.prototype.test),Uy=function(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Ny(e,n)}}(TypeError);function Hy(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return My(e,t,r)}}function Vy(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Py;xy&&xy(e,null);let r=t.length;for(;r--;){let i=t[r];if("string"==typeof i){const e=n(i);e!==i&&(Sy(t)||(t[r]=e),i=e)}e[i]=!0}return e}function Zy(e){const t=ky(null);for(const[n,r]of Ey(e))void 0!==Oy(e,n)&&(t[n]=r);return t}function Wy(e,t){for(;null!==e;){const n=Oy(e,t);if(n){if(n.get)return Hy(n.get);if("function"==typeof n.value)return Hy(n.value)}e=Ty(e)}return function(e){return console.warn("fallback value for",e),null}}const Gy=Ay(["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"]),qy=Ay(["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"]),Yy=Ay(["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"]),Ky=Ay(["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"]),Xy=Ay(["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"]),Qy=Ay(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Jy=Ay(["#text"]),eb=Ay(["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","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","xmlns","slot"]),tb=Ay(["accent-height","accumulate","additive","alignment-baseline","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","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","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","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","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"]),nb=Ay(["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"]),rb=Ay(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),ib=Cy(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ob=Cy(/<%[\w\W]*|[\w\W]*%>/gm),ab=Cy(/\${[\w\W]*}/gm),sb=Cy(/^data-[\-\w.\u00B7-\uFFFF]/),lb=Cy(/^aria-[\-\w]+$/),cb=Cy(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ub=Cy(/^(?:\w+script|data):/i),db=Cy(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),hb=Cy(/^html$/i);var fb=Object.freeze({__proto__:null,MUSTACHE_EXPR:ib,ERB_EXPR:ob,TMPLIT_EXPR:ab,DATA_ATTR:sb,ARIA_ATTR:lb,IS_ALLOWED_URI:cb,IS_SCRIPT_OR_DATA:ub,ATTR_WHITESPACE:db,DOCTYPE_NAME:hb}),pb=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:typeof window>"u"?null:window;const n=t=>e(t);if(n.version="3.0.6",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;let{document:r}=t;const i=r,o=i.currentScript,{DocumentFragment:a,HTMLTemplateElement:s,Node:l,Element:c,NodeFilter:u,NamedNodeMap:d=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:h,DOMParser:f,trustedTypes:p}=t,m=c.prototype,g=Wy(m,"cloneNode"),v=Wy(m,"nextSibling"),y=Wy(m,"childNodes"),b=Wy(m,"parentNode");if("function"==typeof s){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let w,_="";const{implementation:E,createNodeIterator:x,createDocumentFragment:S,getElementsByTagName:T}=r,{importNode:O}=i;let A={};n.isSupported="function"==typeof Ey&&"function"==typeof b&&E&&void 0!==E.createHTMLDocument;const{MUSTACHE_EXPR:C,ERB_EXPR:k,TMPLIT_EXPR:M,DATA_ATTR:N,ARIA_ATTR:D,IS_SCRIPT_OR_DATA:R,ATTR_WHITESPACE:L}=fb;let{IS_ALLOWED_URI:P}=fb,I=null;const $=Vy({},[...Gy,...qy,...Yy,...Xy,...Jy]);let z=null;const B=Vy({},[...eb,...tb,...nb,...rb]);let j=Object.seal(ky(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}})),F=null,U=null,H=!0,V=!0,Z=!1,W=!0,G=!1,q=!1,Y=!1,K=!1,X=!1,Q=!1,J=!1,ee=!0,te=!1,ne=!0,re=!1,ie={},oe=null;const ae=Vy({},["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 se=null;const le=Vy({},["audio","video","img","source","image","track"]);let ce=null;const ue=Vy({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),de="http://www.w3.org/1998/Math/MathML",he="http://www.w3.org/2000/svg",fe="http://www.w3.org/1999/xhtml";let pe=fe,me=!1,ge=null;const ve=Vy({},[de,he,fe],Iy);let ye=null;const be=["application/xhtml+xml","text/html"];let we=null,_e=null;const Ee=r.createElement("form"),xe=function(e){return e instanceof RegExp||e instanceof Function},Se=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!_e||_e!==e){if((!e||"object"!=typeof e)&&(e={}),e=Zy(e),ye=ye=-1===be.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,we="application/xhtml+xml"===ye?Iy:Py,I="ALLOWED_TAGS"in e?Vy({},e.ALLOWED_TAGS,we):$,z="ALLOWED_ATTR"in e?Vy({},e.ALLOWED_ATTR,we):B,ge="ALLOWED_NAMESPACES"in e?Vy({},e.ALLOWED_NAMESPACES,Iy):ve,ce="ADD_URI_SAFE_ATTR"in e?Vy(Zy(ue),e.ADD_URI_SAFE_ATTR,we):ue,se="ADD_DATA_URI_TAGS"in e?Vy(Zy(le),e.ADD_DATA_URI_TAGS,we):le,oe="FORBID_CONTENTS"in e?Vy({},e.FORBID_CONTENTS,we):ae,F="FORBID_TAGS"in e?Vy({},e.FORBID_TAGS,we):{},U="FORBID_ATTR"in e?Vy({},e.FORBID_ATTR,we):{},ie="USE_PROFILES"in e&&e.USE_PROFILES,H=!1!==e.ALLOW_ARIA_ATTR,V=!1!==e.ALLOW_DATA_ATTR,Z=e.ALLOW_UNKNOWN_PROTOCOLS||!1,W=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,G=e.SAFE_FOR_TEMPLATES||!1,q=e.WHOLE_DOCUMENT||!1,X=e.RETURN_DOM||!1,Q=e.RETURN_DOM_FRAGMENT||!1,J=e.RETURN_TRUSTED_TYPE||!1,K=e.FORCE_BODY||!1,ee=!1!==e.SANITIZE_DOM,te=e.SANITIZE_NAMED_PROPS||!1,ne=!1!==e.KEEP_CONTENT,re=e.IN_PLACE||!1,P=e.ALLOWED_URI_REGEXP||cb,pe=e.NAMESPACE||fe,j=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&xe(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(j.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&xe(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(j.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(j.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),G&&(V=!1),Q&&(X=!0),ie&&(I=Vy({},[...Jy]),z=[],!0===ie.html&&(Vy(I,Gy),Vy(z,eb)),!0===ie.svg&&(Vy(I,qy),Vy(z,tb),Vy(z,rb)),!0===ie.svgFilters&&(Vy(I,Yy),Vy(z,tb),Vy(z,rb)),!0===ie.mathMl&&(Vy(I,Xy),Vy(z,nb),Vy(z,rb))),e.ADD_TAGS&&(I===$&&(I=Zy(I)),Vy(I,e.ADD_TAGS,we)),e.ADD_ATTR&&(z===B&&(z=Zy(z)),Vy(z,e.ADD_ATTR,we)),e.ADD_URI_SAFE_ATTR&&Vy(ce,e.ADD_URI_SAFE_ATTR,we),e.FORBID_CONTENTS&&(oe===ae&&(oe=Zy(oe)),Vy(oe,e.FORBID_CONTENTS,we)),ne&&(I["#text"]=!0),q&&Vy(I,["html","head","body"]),I.table&&(Vy(I,["tbody"]),delete F.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw Uy('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw Uy('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=e.TRUSTED_TYPES_POLICY,_=w.createHTML("")}else void 0===w&&(w=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const i="dompurify"+(n?"#"+n:"");try{return e.createPolicy(i,{createHTML:e=>e,createScriptURL:e=>e})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}}(p,o)),null!==w&&"string"==typeof _&&(_=w.createHTML(""));Ay&&Ay(e),_e=e}},Te=Vy({},["mi","mo","mn","ms","mtext"]),Oe=Vy({},["foreignobject","desc","title","annotation-xml"]),Ae=Vy({},["title","style","font","a","script"]),Ce=Vy({},qy);Vy(Ce,Yy),Vy(Ce,Ky);const ke=Vy({},Xy);Vy(ke,Qy);const Me=function(e){Ly(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch{e.remove()}},Ne=function(e,t){try{Ly(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch{Ly(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!z[e])if(X||Q)try{Me(t)}catch{}else try{t.setAttribute(e,"")}catch{}},De=function(e){let t=null,n=null;if(K)e="<remove></remove>"+e;else{const t=$y(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===ye&&pe===fe&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const i=w?w.createHTML(e):e;if(pe===fe)try{t=(new f).parseFromString(i,ye)}catch{}if(!t||!t.documentElement){t=E.createDocument(pe,"template",null);try{t.documentElement.innerHTML=me?_:i}catch{}}const o=t.body||t.documentElement;return e&&n&&o.insertBefore(r.createTextNode(n),o.childNodes[0]||null),pe===fe?T.call(t,q?"html":"body")[0]:q?t.documentElement:o},Re=function(e){return x.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,null)},Le=function(e){return"function"==typeof l&&e instanceof l},Pe=function(e,t,r){A[e]&&Dy(A[e],(e=>{e.call(n,t,r,_e)}))},Ie=function(e){let t=null;if(Pe("beforeSanitizeElements",e,null),function(e){return e instanceof h&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof d)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)}(e))return Me(e),!0;const r=we(e.nodeName);if(Pe("uponSanitizeElement",e,{tagName:r,allowedTags:I}),e.hasChildNodes()&&!Le(e.firstElementChild)&&Fy(/<[/\w]/g,e.innerHTML)&&Fy(/<[/\w]/g,e.textContent))return Me(e),!0;if(!I[r]||F[r]){if(!F[r]&&ze(r)&&(j.tagNameCheck instanceof RegExp&&Fy(j.tagNameCheck,r)||j.tagNameCheck instanceof Function&&j.tagNameCheck(r)))return!1;if(ne&&!oe[r]){const t=b(e)||e.parentNode,n=y(e)||e.childNodes;if(n&&t)for(let r=n.length-1;r>=0;--r)t.insertBefore(g(n[r],!0),v(e))}return Me(e),!0}return e instanceof c&&!function(e){let t=b(e);(!t||!t.tagName)&&(t={namespaceURI:pe,tagName:"template"});const n=Py(e.tagName),r=Py(t.tagName);return!!ge[e.namespaceURI]&&(e.namespaceURI===he?t.namespaceURI===fe?"svg"===n:t.namespaceURI===de?"svg"===n&&("annotation-xml"===r||Te[r]):!!Ce[n]:e.namespaceURI===de?t.namespaceURI===fe?"math"===n:t.namespaceURI===he?"math"===n&&Oe[r]:!!ke[n]:e.namespaceURI===fe?!(t.namespaceURI===he&&!Oe[r]||t.namespaceURI===de&&!Te[r])&&!ke[n]&&(Ae[n]||!Ce[n]):!("application/xhtml+xml"!==ye||!ge[e.namespaceURI]))}(e)||("noscript"===r||"noembed"===r||"noframes"===r)&&Fy(/<\/no(script|embed|frames)/i,e.innerHTML)?(Me(e),!0):(G&&3===e.nodeType&&(t=e.textContent,Dy([C,k,M],(e=>{t=zy(t,e," ")})),e.textContent!==t&&(Ly(n.removed,{element:e.cloneNode()}),e.textContent=t)),Pe("afterSanitizeElements",e,null),!1)},$e=function(e,t,n){if(ee&&("id"===t||"name"===t)&&(n in r||n in Ee))return!1;if((!V||U[t]||!Fy(N,t))&&(!H||!Fy(D,t)))if(!z[t]||U[t]){if(!(ze(e)&&(j.tagNameCheck instanceof RegExp&&Fy(j.tagNameCheck,e)||j.tagNameCheck instanceof Function&&j.tagNameCheck(e))&&(j.attributeNameCheck instanceof RegExp&&Fy(j.attributeNameCheck,t)||j.attributeNameCheck instanceof Function&&j.attributeNameCheck(t))||"is"===t&&j.allowCustomizedBuiltInElements&&(j.tagNameCheck instanceof RegExp&&Fy(j.tagNameCheck,n)||j.tagNameCheck instanceof Function&&j.tagNameCheck(n))))return!1}else if(!ce[t]&&!Fy(P,zy(n,L,""))&&("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==By(n,"data:")||!se[e])&&(!Z||Fy(R,zy(n,L,"")))&&n)return!1;return!0},ze=function(e){return e.indexOf("-")>0},Be=function(e){Pe("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:z};let i=t.length;for(;i--;){const o=t[i],{name:a,namespaceURI:s,value:l}=o,c=we(a);let u="value"===a?l:jy(l);if(r.attrName=c,r.attrValue=u,r.keepAttr=!0,r.forceKeepAttr=void 0,Pe("uponSanitizeAttribute",e,r),u=r.attrValue,r.forceKeepAttr||(Ne(a,e),!r.keepAttr))continue;if(!W&&Fy(/\/>/i,u)){Ne(a,e);continue}G&&Dy([C,k,M],(e=>{u=zy(u,e," ")}));const d=we(e.nodeName);if($e(d,c,u)){if(te&&("id"===c||"name"===c)&&(Ne(a,e),u="user-content-"+u),w&&"object"==typeof p&&"function"==typeof p.getAttributeType&&!s)switch(p.getAttributeType(d,c)){case"TrustedHTML":u=w.createHTML(u);break;case"TrustedScriptURL":u=w.createScriptURL(u)}try{s?e.setAttributeNS(s,a,u):e.setAttribute(a,u),Ry(n.removed)}catch{}}}Pe("afterSanitizeAttributes",e,null)},je=function e(t){let n=null;const r=Re(t);for(Pe("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)Pe("uponSanitizeShadowNode",n,null),!Ie(n)&&(n.content instanceof a&&e(n.content),Be(n));Pe("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,o=null,s=null,c=null;if(me=!e,me&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Le(e)){if("function"!=typeof e.toString)throw Uy("toString is not a function");if("string"!=typeof(e=e.toString()))throw Uy("dirty is not a string, aborting")}if(!n.isSupported)return e;if(Y||Se(t),n.removed=[],"string"==typeof e&&(re=!1),re){if(e.nodeName){const t=we(e.nodeName);if(!I[t]||F[t])throw Uy("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof l)r=De("\x3c!----\x3e"),o=r.ownerDocument.importNode(e,!0),1===o.nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?r=o:r.appendChild(o);else{if(!X&&!G&&!q&&-1===e.indexOf("<"))return w&&J?w.createHTML(e):e;if(r=De(e),!r)return X?null:J?_:""}r&&K&&Me(r.firstChild);const u=Re(re?e:r);for(;s=u.nextNode();)Ie(s)||(s.content instanceof a&&je(s.content),Be(s));if(re)return e;if(X){if(Q)for(c=S.call(r.ownerDocument);r.firstChild;)c.appendChild(r.firstChild);else c=r;return(z.shadowroot||z.shadowrootmode)&&(c=O.call(i,c,!0)),c}let d=q?r.outerHTML:r.innerHTML;return q&&I["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&Fy(hb,r.ownerDocument.doctype.name)&&(d="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+d),G&&Dy([C,k,M],(e=>{d=zy(d,e," ")})),w&&J?w.createHTML(d):d},n.setConfig=function(){Se(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Y=!0},n.clearConfig=function(){_e=null,Y=!1},n.isValidAttribute=function(e,t,n){_e||Se({});const r=we(e),i=we(t);return $e(r,i,n)},n.addHook=function(e,t){"function"==typeof t&&(A[e]=A[e]||[],Ly(A[e],t))},n.removeHook=function(e){if(A[e])return Ry(A[e])},n.removeHooks=function(e){A[e]&&(A[e]=[])},n.removeAllHooks=function(){A={}},n}();const mb=e=>pb.sanitize(e,{USE_PROFILES:{html:!0,svg:!0,svgFilters:!0}}),gb=e=>pb.sanitize(e,{ALLOWED_TAGS:[]}),vb=class e extends _y{constructor(){super(...arguments),this.type="toolbar",this.renderType=L.HTML}init(){const e=()=>this.updateOverflowMenu(!1);this.services.events.addEventListener(R.Toolbar.SHOW_OVERFLOW_MENU,(()=>{this.renderOverflowMenu(),document.body.addEventListener("click",e)})),this.services.events.addEventListener(R.Toolbar.HIDE_OVERFLOW_MENU,(()=>{document.body.removeEventListener("click",e)}))}render(e=!0){const t=this.getComponentContainer().attr("role","toolbar").attr("aria-label",`chart-${this.services.domUtils.getChartID()} toolbar`);if(Um(this.getOptions(),"data","loading"))t.html(""),this.overflowMenu=null;else{this.overflowMenu||(this.overflowMenu=t.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:e,overflowMenuItemList:n}=this.getControlConfigs();n&&e.push(this.getOverflowButtonConfig());const r=t.selectAll("div.toolbar-control").data(e,(e=>e.id));r.exit().remove();const i=r.enter().append("div").attr("class","toolbar-control cds--overflow-menu cds--overflow-menu"),o=this;i.merge(r).classed("disabled",(e=>e.shouldBeDisabled())).attr("aria-disabled",(e=>e.shouldBeDisabled())).attr("aria-label",(e=>e.title)).html((e=>`\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-${gb(e.id)}`)}" aria-label="${gb(e.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${(e=>pb.sanitize(e,{NAMESPACE:"http://www.w3.org/2000/svg",USE_PROFILES:{html:!0,svg:!0,svgFilters:!0}}))(e.iconSVG.content)}\n\t\t\t\t</svg>\n\t\t\t</button>`)).each((function(e,t){sn(this).select("svg").style("will-change","transform").style("width",void 0!==e.iconSVG.width?e.iconSVG.width:"20px").style("height",void 0!==e.iconSVG.height?e.iconSVG.height:"20px"),sn(this).select("button").on("click",(t=>{e.shouldBeDisabled()||o.triggerFunctionAndEvent(e,t,this)})).on("keydown",(n=>{n.key&&"Enter"===n.key||" "===n.key?(n.preventDefault(),o.triggerFunctionAndEvent(e,n,this)):n.key&&"ArrowLeft"===n.key?o.focusOnPreviousEnabledToolbarItem(t):n.key&&"ArrowRight"===n.key&&o.focusOnNextEnabledToolbarItem(t)}))})),this.overflowButton=this.getComponentContainer().select(`button.cds--overflow-menu__trigger#${this.services.domUtils.generateElementIDString("control-toolbar-overflow-menu")}`)}}renderOverflowMenu(){const{overflowMenuItemList:e}=this.getControlConfigs(),t=this.overflowMenu.select("ul").selectAll("li.cds--overflow-menu-options__option").data(e,(e=>Um(e,"id")));t.exit().remove();const n=t.enter().append("li").attr("id",(e=>this.services.domUtils.generateElementIDString(`control-${e.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(t).classed("cds--overflow-menu-options__option--disabled",(e=>e.shouldBeDisabled())).classed("cds--overflow-menu-options__option--disabled",(e=>e.shouldBeDisabled())).attr("aria-disabled",(e=>e.shouldBeDisabled())).selectAll("button").text((e=>e.text))}isOverflowMenuOpen(){return this.overflowMenu.classed("is-open")}updateOverflowMenu(e){this.overflowMenu&&(this.overflowMenu.classed("is-open",e),this.overflowButton&&(this.overflowButton.attr("aria-expanded",e),sn(this.overflowButton.node().parentNode).classed("cds--overflow-menu--open",e).classed("cds--overflow-menu--open",e)),e?this.services.events.dispatchEvent(R.Toolbar.SHOW_OVERFLOW_MENU):this.services.events.dispatchEvent(R.Toolbar.HIDE_OVERFLOW_MENU))}focusOnPreviousEnabledToolbarItem(e){const t=this.getToolbarButtonItems();let n=t.length;for(let r=e-1;r>=0;r--)if(!t[r].shouldBeDisabled()){n=r;break}if(n<t.length){const e=sn(`button#${this.services.domUtils.generateElementIDString(`control-${t[n].id}`)}`).node();"focus"in e&&e.focus()}}focusOnNextEnabledToolbarItem(e){const t=this.getToolbarButtonItems();let n=-1;for(let r=e+1;r<t.length;r++)if(!t[r].shouldBeDisabled()){n=r;break}if(n>-1){const e=sn(`button#${this.services.domUtils.generateElementIDString(`control-${t[n].id}`)}`).node();"focus"in e&&e.focus()}}focusOnPreviousEnabledMenuItem(e){const t=this.getOverflowMenuItems();let n=t.length;for(let r=e-1;r>=0;r--)if(!t[r].shouldBeDisabled()){n=r;break}if(n<t.length){const e=sn(`#${this.services.domUtils.generateElementIDString(`control-${t[n].id}`)} button`).node();"focus"in e&&e.focus()}}focusOnNextEnabledMenuItem(e){const t=this.getOverflowMenuItems();let n=-1;for(let r=e+1;r<t.length;r++)if(!t[r].shouldBeDisabled()){n=r;break}if(n>-1){const e=sn(`#${this.services.domUtils.generateElementIDString(`control-${t[n].id}`)} button`).node();"focus"in e&&e.focus()}}toggleOverflowMenu(e){if(this.isOverflowMenuOpen())this.updateOverflowMenu(!1);else{this.updateOverflowMenu(!0);const t=this;this.getOverflowMenuItems().forEach(((n,r)=>{const i=sn(`#${this.services.domUtils.generateElementIDString(`control-${n.id}`)}`);null!==i&&(i.on("click",(()=>{t.triggerFunctionAndEvent(n,e,i.node()),t.updateOverflowMenu(!1)})),i.on("keydown",(o=>{o&&"Enter"===o.key?t.triggerFunctionAndEvent(n,e,i.node()):o&&"ArrowUp"===o.key?t.focusOnPreviousEnabledMenuItem(r):o&&"ArrowDown"===o.key?t.focusOnNextEnabledMenuItem(r):o&&"Escape"===o.key&&t.updateOverflowMenu(!1),o.preventDefault()})))})),t.focusOnNextEnabledMenuItem(-1)}e&&e.stopImmediatePropagation()}triggerFunctionAndEvent(e,t,n){"function"==typeof e.shouldBeDisabled&&e.shouldBeDisabled()||("function"==typeof e.clickFunction&&e.clickFunction(t),this.services.events.dispatchEvent(R.Toolbar.BUTTON_CLICK,{control:e,event:t,element:n}))}getControlConfigs(){const t=Um(this.getOptions(),"toolbar","numberOfIcons")-1,n=Um(this.getOptions(),"toolbar","controls"),r=[],i=[],o=[];return n.forEach((n=>{let a=null;n.type===J.CUSTOM?(null===Um(n,"id")&&(n.id="toolbar-button-"+e.buttonID++),null===Um(n,"shouldBeDisabled")&&(n.shouldBeDisabled=()=>!1),a=n):a=this.getControlConfigByType(n.type),a&&(a.text=n.text?n.text:n.type,-1!==a.id.indexOf("toolbar-export")?r.push(a):i.length<t?null===Um(a,"iconSVG","content")?o.push(a):i.push(a):o.push(a))})),o.push(...r),o.length?{buttonList:i,overflowMenuItemList:o}:{buttonList:i}}getToolbarButtonItems(){const{buttonList:e,overflowMenuItemList:t}=this.getControlConfigs();return t&&e.push(this.getOverflowButtonConfig()),e||[]}getOverflowMenuItems(){const{overflowMenuItemList:e}=this.getControlConfigs();return e||[]}getOverflowButtonConfig(){return{id:"toolbar-overflow-menu",title:"More options",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:e=>this.toggleOverflowMenu(e)}}getControlConfigByType(e){const t=this.services.zoom&&this.services.zoom.isZoomBarEnabled()&&!this.services.zoom.isEmptyState(),n=this.model.getDisplayData();let r;switch(e){case J.ZOOM_IN:t&&(r={id:"toolbar-zoomIn",title:"Zoom in",shouldBeDisabled:()=>this.services.zoom.isMinZoomDomain(),iconSVG:{content:this.getControlIconByType(e)},clickFunction:()=>this.services.zoom.zoomIn()});break;case J.ZOOM_OUT:t&&(r={id:"toolbar-zoomOut",title:"Zoom out",shouldBeDisabled:()=>this.services.zoom.isMaxZoomDomain(),iconSVG:{content:this.getControlIconByType(e)},clickFunction:()=>this.services.zoom.zoomOut()});break;case J.RESET_ZOOM:t&&(r={id:"toolbar-resetZoom",title:"Reset zoom",shouldBeDisabled:()=>this.services.zoom.isMaxZoomDomain(),iconSVG:{content:this.getControlIconByType(e)},clickFunction:()=>this.services.zoom.resetZoomDomain()});break;case J.MAKE_FULLSCREEN:r={id:"toolbar-makefullscreen",iconSVG:{content:this.getControlIconByType(e),width:"15px",height:"15px"},title:"Make fullscreen",shouldBeDisabled:()=>!1,clickFunction:()=>{this.services.domUtils.toggleFullscreen()}};break;case J.SHOW_AS_DATATABLE:r={id:"toolbar-showasdatatable",iconSVG:{content:this.getControlIconByType(e)},title:"Show as table",shouldBeDisabled:()=>0===n.length,clickFunction:()=>this.services.events.dispatchEvent(R.Modal.SHOW)};break;case J.EXPORT_CSV:r={id:"toolbar-export-CSV",title:"Export as CSV",shouldBeDisabled:()=>!1,iconSVG:{content:this.getControlIconByType(e)},clickFunction:()=>this.model.exportToCSV()};break;case J.EXPORT_PNG:r={id:"toolbar-export-PNG",title:"Export as PNG",shouldBeDisabled:()=>!1,iconSVG:{content:this.getControlIconByType(e)},clickFunction:()=>this.services.domUtils.exportToPNG()};break;case J.EXPORT_JPG:r={id:"toolbar-export-JPG",title:"Export as JPG",shouldBeDisabled:()=>!1,iconSVG:{content:this.getControlIconByType(e)},clickFunction:()=>this.services.domUtils.exportToJPG()};break;default:throw Error("Not supported toolbar control type: "+e)}return r}getControlIconByType(e){switch(e){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.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: "+e)}}};vb.buttonID=0;let yb=vb;const bb=class e extends _y{constructor(t,n,r,i){super(t,n,i),this.type="layout",this.configs=i,this.children=r,this._instanceID=e.instanceID++,this.init()}init(){this.children.forEach((e=>{e.components.forEach((e=>{e.init()}))}))}getPreferedAndFixedSizeSum(){const e=this.parent;let t=0;return e.selectAll(`div.layout-child-${this._instanceID}`).filter((e=>{const t=Um(e,"growth");return t===G.PREFERRED||t===G.FIXED})).each((function(e){t+=e.size})),t}getNumOfStretchChildren(){return this.parent.selectAll(`div.layout-child-${this._instanceID}`).filter((e=>Um(e,"growth")===G.STRETCH)).size()}render(e=!0){const t=this.parent,{width:n,height:r}=Mv.getHTMLElementSize(t.node()),i=this.configs.direction===W.ROW||this.configs.direction===W.ROW_REVERSE,o=Um(this.model.getOptions(),"style","prefix"),a=t.classed(`${jp}--${o}--layout-row`,this.configs.direction===W.ROW).classed(`${jp}--${o}--layout-row-reverse`,this.configs.direction===W.ROW_REVERSE).classed(`${jp}--${o}--layout-column`,this.configs.direction===W.COLUMN).classed(`${jp}--${o}--layout-column-reverse`,this.configs.direction===W.COLUMN_REVERSE).classed(`${jp}--${o}--layout-alignitems-center`,this.configs.alignItems===q.CENTER).selectAll(`div.layout-child-${this._instanceID}`).data(this.children,(e=>e.id));a.enter().append("div").merge(t.selectAll(`div.layout-child-${this._instanceID}`)).attr("class",(e=>`layout-child layout-child-${this._instanceID} ${e.id}`)).each((function(t){t.components.forEach((n=>{const r=sn(this),i=Um(t,"renderType")===L.SVG;n.setParent(i?Mv.appendOrSelect(r,"svg.layout-svg-wrapper").attr("width","100%").attr("height","100%"):r);const o=Um(t,"growth");(o===G.PREFERRED||o===G.FIXED)&&n.render(e)}))})),t.selectAll(`div.layout-child-${this._instanceID}`).style("height",null).style("width",null).each((function(e){const t=Um(e,"growth"),o=Um(e,"renderType")===L.SVG?Mv.getSVGElementSize(sn(this).select("svg.layout-svg-wrapper"),{useBBox:!0}):Mv.getHTMLElementSize(this);if(t===G.PREFERRED){const t=i?o.width:o.height,a=i?n:r;e.size=t/a*100}})),a.exit().remove(),this.children.filter((e=>Um(e,"growth")===G.STRETCH)).forEach((e=>{e.size=(100-+this.getPreferedAndFixedSizeSum())/+this.getNumOfStretchChildren()}));const s=t.selectAll(`div.layout-child-${this._instanceID}`).data(this.children,(e=>e.id));i?s.style("width",(e=>e.size/100*n+"px")).style("height","100%"):s.style("height",(e=>e.size/100*r+"px")).style("width","100%"),s.each((function(t){t.components.forEach((n=>{Um(t,"growth")===G.STRETCH&&n.render(e)}))}))}setModel(e){super.setModel(e),this.children.forEach((t=>{t.components.forEach((t=>t.setModel(e)))}))}setServices(e){super.setServices(e),this.children.forEach((t=>{t.components.forEach((t=>t.setServices(e)))}))}destroy(){this.children.forEach((e=>{e.components.forEach((e=>e.destroy()))}))}};bb.instanceID=Math.floor(99999999999*Math.random());let wb=bb;class _b extends _y{constructor(){super(...arguments),this.type="spacer"}render(e=!1){this.getComponentContainer().style("width",`${this.configs.size||Qp}px`).style("height",`${this.configs.size||Qp}px`).attr("opacity",0)}}var Eb="bx",xb="\n a[href], area[href], input:not([disabled]):not([tabindex='-1']),\n button:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']),\n textarea:not([disabled]):not([tabindex='-1']),\n iframe, object, embed, *[tabindex]:not([tabindex='-1']), *[contenteditable=true]\n ";function Sb(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Tb(e){return e.reduce((function(e,t){return Array.isArray(t)?e.push.apply(e,function(e){return function(e){if(Array.isArray(e))return Sb(e)}(e)||function(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Sb(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Sb(e,t)}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(Tb(t))):e.push(t),e}),[])}function Ob(e){return(Ob="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ab(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Cb(e,t){return(Cb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function kb(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Mb(e){return(Mb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Nb(e){return(Nb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Db(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Rb(){return Rb=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Pb(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Rb.apply(this,arguments)}function Lb(e,t){return(Lb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Pb(e){return(Pb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ib(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.addEventListener.apply(e,n),{release:function(){return e.removeEventListener.apply(e,n),null}}}function $b(e){return($b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function zb(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Bb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function jb(e,t){return(jb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Fb(e){return(Fb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ub(e,t){var n=e.target,r=e.currentTarget;if("function"==typeof n.matches){if(n.matches(t))return n;if(n.matches("".concat(t," *"))){var i=n.closest(t);if((r.nodeType===Node.DOCUMENT_NODE?r.documentElement:r).contains(i))return i}}}function Hb(e){if(!e||"function"==typeof e)return{launchingElement:null,launchingEvent:null};var t=e.delegateTarget||e.currentTarget||e,n=e.currentTarget&&e;if(t&&!t.nodeType)throw new TypeError("DOM Node should be given for launching element.");if(n&&!n.type)throw new TypeError("DOM event should be given for launching event.");return{launchingElement:t,launchingEvent:n}}function Vb(e){return(Vb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Zb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Wb(e,t){return(Wb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Gb(e){return(Gb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var qb=[function(e){var t=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&jb(e,t)}(n,e);var t=function(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=Fb(e);if(t){var i=Fb(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===$b(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}(n);function n(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),t.apply(this,arguments)}return function(e,t,n){t&&Bb(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1})}(n,[{key:"_changeState",value:function(){throw new Error("_changeState() should be overridden to perform actual change in state.")}},{key:"changeState",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i="string"==typeof n[0]?n.shift():void 0,o=Object(n[0])===n[0]&&"function"!=typeof n[0]?n.shift():void 0,a="function"==typeof n[0]?n.shift():void 0;if("function"!=typeof this.shouldStateBeChanged||this.shouldStateBeChanged(i,o)){var s={group:o&&o.group,state:i},l=[s.group,i].filter(Boolean).join("-").split("-").map((function(e){return e[0].toUpperCase()+e.substr(1)})).join(""),c=new CustomEvent(this.options["eventBefore".concat(l)],{bubbles:!0,cancelable:!0,detail:o}),u=o&&o.delegatorNode||this.element;if(u.dispatchEvent(c)){var d=[i,o].filter(Boolean);this._changeState.apply(this,function(e){return function(e){if(Array.isArray(e))return zb(e)}(e)||function(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return zb(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return zb(e,t)}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(d).concat([function(){u.dispatchEvent(new CustomEvent(e.options["eventAfter".concat(l)],{bubbles:!0,cancelable:!0,detail:o})),a&&a()}]))}else if(a){var h=new Error("Changing state (".concat(JSON.stringify(s),") has been canceled."));h.canceled=!0,a(h)}}else a&&a(null,!0)}}]),n}(e);return t},function(e){var t=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Wb(e,t)}(n,e);var t=function(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=Gb(e);if(t){var i=Gb(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Vb(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}(n);function n(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),t.apply(this,arguments)}return function(e,t,n){t&&Zb(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1})}(n,[{key:"show",value:function(e,t){(!e||"function"==typeof e)&&(t=e),this.changeState("shown",Hb(e),t)}},{key:"hide",value:function(e,t){(!e||"function"==typeof e)&&(t=e),this.changeState("hidden",Hb(e),t)}}]),n}(e);return t}];function Yb(e){return(Yb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Kb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Xb(e,t){return(Xb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Qb(e){return(Qb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Jb(e){return(Jb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ew(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function tw(e,t){return(tw=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function nw(e){return(nw=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var rw=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&tw(e,t)}(n,e);var t=function(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=nw(e);if(t){var i=nw(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Jb(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}(n);function n(e,r){var i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(i=t.call(this,e,r))._handleFocusinListener=void 0,i._handleKeydownListener=void 0,i._handleFocusin=function(e){var t=i.element.querySelector(i.options.selectorModalContainer)||i.element;i.element.classList.contains(i.options.classVisible)&&!t.contains(e.target)&&i.options.selectorsFloatingMenus.every((function(t){return!Ub(e,t)}))&&i.element.querySelector(xb).focus()},i._hookCloseActions(),i}return function(e,t,n){t&&ew(e.prototype,t),n&&ew(e,n),Object.defineProperty(e,"prototype",{writable:!1})}(n,[{key:"createdByLauncher",value:function(e){this.show(e)}},{key:"shouldStateBeChanged",value:function(e){return"shown"===e?!this.element.classList.contains(this.options.classVisible):this.element.classList.contains(this.options.classVisible)}},{key:"_changeState",value:function(e,t,n){var r,i=this;if(this._handleFocusinListener&&(this._handleFocusinListener=this.unmanage(this._handleFocusinListener).release()),"shown"===e){var o="onfocusin"in this.element.ownerDocument.defaultView,a=o?"focusin":"focus";this._handleFocusinListener=this.manage(Ib(this.element.ownerDocument,a,this._handleFocusin,!o))}"hidden"===e?(this.element.classList.toggle(this.options.classVisible,!1),this.element.ownerDocument.body.classList.toggle(this.options.classBody,!1),(this.options.selectorFocusOnClose||this.previouslyFocusedNode)&&(this.element.ownerDocument.querySelector(this.options.selectorFocusOnClose)||this.previouslyFocusedNode).focus()):"shown"===e&&(this.element.classList.toggle(this.options.classVisible,!0),this.element.ownerDocument.body.classList.toggle(this.options.classBody,!0)),r=this.manage(Ib(this.element,"transitionend",(function(){r&&(r=i.unmanage(r).release()),"shown"===e&&i.element.offsetWidth>0&&i.element.offsetHeight>0&&(i.previouslyFocusedNode=i.element.ownerDocument.activeElement,(i.element.querySelector(i.options.selectorPrimaryFocus)||i.element.querySelector(xb)).focus()),n()})))}},{key:"_hookCloseActions",value:function(){var e=this;this.manage(Ib(this.element,"click",(function(t){var n=Ub(t,e.options.selectorModalClose);n&&(t.delegateTarget=n),(n||t.target===e.element)&&e.hide(t)}))),this._handleKeydownListener&&(this._handleKeydownListener=this.unmanage(this._handleKeydownListener).release()),this._handleKeydownListener=this.manage(Ib(this.element.ownerDocument.body,"keydown",(function(t){27===t.which&&e.shouldStateBeChanged("hidden")&&(t.stopPropagation(),e.hide(t))})))}}],[{key:"options",get:function(){var e=Eb;return{selectorInit:"[data-modal]",selectorModalClose:"[data-modal-close]",selectorPrimaryFocus:"[data-modal-primary-focus]",selectorsFloatingMenus:[".".concat(e,"--overflow-menu-options"),".".concat(e,"--tooltip"),".flatpickr-calendar"],selectorModalContainer:".".concat(e,"--modal-container"),classVisible:"is-visible",classBody:"".concat(e,"--body--with-modal-open"),attribInitTarget:"data-modal-target",initEventNames:["click"],eventBeforeShown:"modal-beingshown",eventAfterShown:"modal-shown",eventBeforeHidden:"modal-beinghidden",eventAfterHidden:"modal-hidden"}}}]),n.components=new WeakMap,n}(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Tb(t).reduce((function(e,t){return t(e)}),function(){return function(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}))}())}((function(e){var t=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Cb(e,t)}(n,e);var t=function(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=Mb(e);if(t){var i=Mb(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Ob(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return kb(e)}(this,n)}}(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(r=t.call(this,e,i)).children=[],!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");return r.element=e,r.options=Object.assign(Object.create(r.constructor.options),i),r.constructor.components.set(r.element,kb(r)),r}return function(e,t,n){t&&Ab(e.prototype,t),n&&Ab(e,n),Object.defineProperty(e,"prototype",{writable:!1})}(n,[{key:"release",value:function(){for(var e=this.children.pop();e;e=this.children.pop())e.release();return this.constructor.components.delete(this.element),null}}],[{key:"create",value:function(e,t){return this.components.get(e)||new this(e,t)}}]),n}(e);return t}),(function(e){var t=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xb(e,t)}(n,e);var t=function(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=Qb(e);if(t){var i=Qb(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Yb(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}(n);function n(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),t.apply(this,arguments)}return function(e,t,n){n&&Kb(e,n),Object.defineProperty(e,"prototype",{writable:!1})}(n,0,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Object.assign(Object.create(this.options),n);if(!t||t.nodeType!==Node.ELEMENT_NODE&&t.nodeType!==Node.DOCUMENT_NODE)throw new TypeError("DOM document or DOM element should be given to search for and initialize this widget.");if(t.nodeType!==Node.ELEMENT_NODE||!t.matches(r.selectorInit)){var i=r.initEventNames.map((function(i){return Ib(t,i,(function(t){var i=Ub(t,"[".concat(r.attribInitTarget,"]"));if(i){t.delegateTarget=i;var o=i.ownerDocument.querySelectorAll(i.getAttribute(r.attribInitTarget));if(o.length>1)throw new Error("Target widget must be unique.");if(1===o.length){"A"===i.tagName&&t.preventDefault();var a=e.create(o[0],n);"function"==typeof a.createdByLauncher&&a.createdByLauncher(t)}}}))}));return{release:function(){for(var e=i.pop();e;e=i.pop())e.release()}}}return this.create(t,n),""}}]),n.forLazyInit=!0,n}(e);return t}),qb,(function(e){var t=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Lb(e,t)}(n,e);var t=function(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=Pb(e);if(t){var i=Pb(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Nb(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}(n);function n(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return(e=t.call.apply(t,[this].concat(i))).handles=new Set,e}return function(e,t,n){t&&Db(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1})}(n,[{key:"manage",value:function(e){return this.handles.add(e),e}},{key:"unmanage",value:function(e){return this.handles.delete(e),e}},{key:"release",value:function(){var e=this;return this.handles.forEach((function(t){t.release(),e.handles.delete(t)})),Rb(Pb(n.prototype),"release",this).call(this)}}]),n}(e);return t})));const iw=rw;class ow extends _y{constructor(e,t,n){super(e,t,n),this.type="modal",this.isEventListenerAdded=!1,this.handleShowModal=()=>{this.modal.attr("data-modal",!0).attr("class","cds--modal").attr("role","dialog").attr("aria-modal",!0).attr("aria-labelledby","modal-title").attr("aria-describedby","modal-description").attr("tabindex",-1),this.modal.html(this.getModalHTML()),this.modal.select("div.cds--modal-footer button.cds--btn").on("click",(()=>this.model.exportToCSV())),iw.create(this.modal.node()).show(),document.addEventListener("modal-hidden",this.handleHideModal)},this.handleHideModal=()=>{this.modal.attr("role",null).attr("aria-modal",null).attr("aria-labelledby",null).attr("aria-describedby",null).attr("tabindex",null),document.removeEventListener("modal-hidden",this.handleHideModal)},this.init()}addEventListeners(){this.services.events.addEventListener(R.Modal.SHOW,this.handleShowModal)}removeEventListeners(){this.services.events.removeEventListener(R.Modal.SHOW,this.handleShowModal)}getModalHTML(){const e=this.model.getOptions(),t=Um(e,"style","prefix"),n=this.model.getTabularDataArray();return`\n\t\t<div class="cds--modal-container cds--modal-container">\n\t\t\t<div class="cds--modal-header cds--modal-header">\n\t\t\t\t<p class="cds--modal-header__label cds--type-delta cds--modal-header__label cds--type-delta" id="modal-title">Tabular representation</p>\n\n\t\t\t\t<p class="cds--modal-header__heading cds--type-beta cds--modal-header__heading cds--type-beta" id="modal-description">${gb(e.title)}</p>\n\n\t\t\t\t<button class="cds--modal-close 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 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 cds--modal-content">\n\t\t\t\t<table class="cds--data-table cds--data-table--no-border 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${rh(n,0).map((e=>`<th scope="col">\n\t\t\t\t\t\t\t\t<div class="cds--table-header-label cds--table-header-label">${gb(e)}</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>${n.slice(1).map((e=>`\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t${e.map((e=>`<td>${gb(e)}</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 cds--modal-footer">\n\t\t\t <div class="${jp}--${t}-modal-footer-spacer"></div>\n\t\t\t <button class="cds--btn cds--btn--primary cds--btn cds--btn--primary" type="button" data-modal-primary-focus>Download as CSV</button>\n\t\t\t</div>\n\t\t</div>`}render(e=!1){const t=this.model.getOptions();if(!this.isEventListenerAdded){const e=sn(this.services.domUtils.getHolder()),n=Um(t,"style","prefix");this.modal=Mv.appendOrSelect(e,`div.${jp}--${n}--modal`),this.addEventListeners(),this.isEventListenerAdded=!0}}destroy(){this.removeEventListeners(),this.isEventListenerAdded=!1}}class aw extends _y{constructor(){super(...arguments),this.type="title",this.renderType=L.HTML}render(e=!1){const t=this.getComponentContainer(),n=Um(this.getOptions(),"title"),r=t.selectAll("p.title").data([n]);if(r.enter().append("p").classed("title",!0).attr("role","heading").attr("aria-level",2).merge(r).html((e=>gb(e))),r.node()&&r.node().offsetWidth<r.node().scrollWidth){const e=this;r.on("mouseover",(function(t){e.services.events.dispatchEvent(R.Tooltip.SHOW,{event:t,hoveredElement:r,content:r.text()})})).on("mousemove",(function(t){e.services.events.dispatchEvent(R.Tooltip.MOVE,{event:t})})).on("mouseout",(function(){e.services.events.dispatchEvent(R.Tooltip.HIDE)}))}r.exit().remove()}truncateTitle(e,t){if(t<=0)return;const n=e.text();if(e.node().getComputedTextLength()>t){e.append("tspan").text("...");const r=Mv.appendOrSelect(e,"tspan").node().getComputedTextLength(),i=e.text(),o=this.getSubstringIndex(e.node(),0,i.length-1,t-r);e.html(i.substring(0,o-1)).append("tspan").text("...");const a=this;e.on("mouseover",(function(t){a.services.events.dispatchEvent(R.Tooltip.SHOW,{event:t,hoveredElement:e,content:n})})).on("mousemove",(function(e){a.services.events.dispatchEvent(R.Tooltip.MOVE,{event:e})})).on("mouseout",(function(){a.services.events.dispatchEvent(R.Tooltip.HIDE)}))}}getMaxTitleWidth(){return Mv.getSVGElementSize(this.parent.node(),{useAttrs:!0}).width}getSubstringIndex(e,t,n,r){const i=Math.floor((n+t)/2);return e.getSubStringLength(0,i)>r?this.getSubstringIndex(e,t,i,r):e.getSubStringLength(0,i)<r?e.getSubStringLength(0,i+1)>r?i:this.getSubstringIndex(e,i,n,r):i}}class sw extends _y{constructor(){super(...arguments),this.type="legend",this.renderType=L.HTML}render(e=!1){const t=this.getOptions(),n=Um(t,"legend"),r=Um(n,"alignment"),i=Um(t,"legend","orientation");let o=this.model.getDataGroups();const{DISABLED:a}=Yp.items.status,s=o.some((e=>e.status===a)),l=Um(n,"order"),c=this.getComponentContainer().classed("center-aligned",r===H.CENTER).classed("right-aligned",r===H.RIGHT).classed(i,!0).classed("has-deactivated-items",s).attr("role",kg.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,(e=>e.name)),d=u.enter().append("div").attr("class","legend-item");d.merge(c.selectAll("div.legend-item")).classed("active",(function(e){return e.status===Yp.items.status.ACTIVE}));const h=Um(this.getOptions(),"legend","clickable");c.classed("clickable",h&&o.length>1);const f=Yp.checkbox.radius,p=d.append("div").classed("checkbox",!0),m=p.merge(u.select("div.checkbox")).attr("role",kg.CHECKBOX).attr("tabindex",h?0:-1).attr("aria-labelledby",((e,t)=>this.services.domUtils.generateElementIDString(`legend-datagroup-${t}-title`))).attr("aria-checked",(({status:e})=>e===Yp.items.status.ACTIVE)).attr("width",2*f).attr("height",2*f).attr("class",(e=>this.model.getColorClassName({classNameTypes:[I.BACKGROUND],dataGroupName:e.name,originalClassName:"checkbox"}))).style("background",(e=>e.status===Yp.items.status.ACTIVE?this.model.getFillColor(e.name)||this.model.getStrokeColor(e.name):null)).classed("active",(function(e){return e.status===Yp.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"),d.append("p").merge(u.select("p"));const g=Um(t,"legend","additionalItems");if(g&&o.length){const e=this,t=c.selectAll("div.additional-item").data(g);t.exit().remove();const n=t.enter().append("div").merge(t).classed("legend-item",!0).classed("additional",!0).attr("aria-labelledby",((e,t)=>this.services.domUtils.generateElementIDString(`legend-datagroup-${m.size()+t}-title`)));n.selectAll("*").remove();let r,i=1;n.append("svg").classed("icon",!0).each((function(t){const n=sn(this);r&&r==t.type?i++:(r=t.type,i=1),e.addAdditionalItem(n,t,i)})),n.append("p").merge(n.select("p")),this.truncateLegendText()}u.exit().on("mouseover",null).on("click",null).on("mouseout",null).remove(),h&&d.size()>1&&this.addEventListeners()}sortDataGroups(e,t){if(e.sort(((e,n)=>t.indexOf(e.name)-t.indexOf(n.name))),t.length<e.length){const n=e.length-t.length;return e.slice(n).concat(e.slice(0,n))}return e}addAdditionalItem(e,t,n){const{width:r,height:i}=Yp.area;if(t.type===te.RADIUS?e.style("width",`${i}px`).style("height",`${i}px`):e.style("width",`${r}px`).style("height",`${i}px`),t.type===te.RADIUS){const{iconData:n,fill:r,stroke:i}=Yp.radius;e.attr("fill","none").selectAll("circle").data(n).enter().append("circle").classed("radius",!0).attr("role",kg.IMG).attr("aria-label","radius").attr("cx",(e=>e.cx)).attr("cy",(e=>e.cy)).attr("r",(e=>e.r)).style("fill",t.fill?t.fill:r).style("stroke",t.stroke?t.stroke:i)}else if(t.type===te.LINE){const i=Yp.line;e.select("line.line").empty()&&e.append("line").classed(`line-${n}`,!0).attr("role",kg.IMG).attr("aria-label","line").attr("x1",0).attr("y1",i.yPosition).attr("x2",r).attr("y2",i.yPosition).style("stroke",t.stroke?t.stroke:i.stroke).style("stroke-width",i.strokeWidth)}else if(t.type===te.AREA)e.select("rect.area").empty()&&e.append("rect").classed(`area-${n}`,!0).attr("role",kg.IMG).attr("aria-label","area").attr("width",r).attr("height",i).style("fill",n>3&&!t.fill?Yp.area.fill:t.fill).style("stroke",t.stroke);else if(t.type===te.SIZE){const{iconData:n,fill:r,stroke:i}=Yp.size;e.attr("fill","none").attr("role",kg.IMG).attr("aria-label","size").selectAll("rect").data(n).enter().append("rect").classed("size",!0).attr("width",(e=>e.width)).attr("height",(e=>e.height)).attr("y",(()=>0)).style("fill",t.fill?t.fill:r).style("stroke",t.stroke?t.stroke:i).style("stroke-width",1)}else if(t.type===te.QUARTILE){const{iconData:t}=Yp.quartile;e.selectAll("rect").attr("role",kg.IMG).attr("aria-label","quartile").data(t).enter().append("rect").attr("class",((e,t)=>"quartile-"+(0===t?"wrapper":"line"))).attr("x",(e=>e.x)).attr("y",(e=>e.y)).attr("width",(e=>e.width)).attr("height",(e=>e.height))}else if(t.type===te.ZOOM){const{iconData:n,color:r}=Um(Yp,"zoom"),i=e.attr("role",kg.IMG).attr("aria-label","zoom").selectAll("g.icon").data(n).enter();i.append("g").attr("x",(e=>e.x)).attr("y",(e=>e.y)).attr("width",(e=>e.width)).attr("height",(e=>e.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",(()=>t.color?t.color:r)),i.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",(()=>t.color?t.color:r))}}truncateLegendText(){const e=this.getComponentContainer(),t=Um(this.getOptions(),"legend","truncation"),n=Um(t,"type"),r=Um(t,"threshold"),i=Um(t,"numCharacter"),o=e.selectAll("div.legend-item p");o.attr("id",(function(){return(this.parentNode.querySelector("div.checkbox")||this.parentNode).getAttribute("aria-labelledby")})),n!==B.NONE?o.html((function(e){const t=gb(e.name);return t.length>r&&t.length!==i?jm(t,n,i):t})):o.html((e=>gb(e.name)))}addEventListeners(){const e=this,t=this.getComponentContainer(),n=this.getOptions(),r=Um(n,"legend"),i=Um(r,"truncation");t.selectAll("div.legend-item").on("mouseover",(function(t){e.services.events.dispatchEvent(R.Legend.ITEM_HOVER,{hoveredElement:sn(this)});const n=sn(this);n.select("div.checkbox").classed("hovered",!0);const r=n.datum();r.name.length>i.threshold&&i.numCharacter<r.name.length&&i.type!==B.NONE&&e.services.events.dispatchEvent(R.Tooltip.SHOW,{event:t,hoveredElement:n,content:r.name})})).on("mousemove",(function(t){sn(this).datum().name.length>i.threshold&&i.type!==B.NONE&&e.services.events.dispatchEvent(R.Tooltip.MOVE,{event:t})})).on("click",(function(){e.services.events.dispatchEvent(R.Legend.ITEM_CLICK,{clickedElement:sn(this)});const t=sn(this).datum();e.model.toggleDataLabel(t.name)})).on("mouseout",(function(){const t=sn(this);t.select("div.checkbox").classed("hovered",!1),t.datum().name.length>i.threshold&&i.type!==B.NONE&&e.services.events.dispatchEvent(R.Tooltip.HIDE),e.services.events.dispatchEvent(R.Legend.ITEM_MOUSEOUT,{hoveredElement:t})})),t.selectAll("div.legend-item div.checkbox").on("keyup",(function(t){t.key&&"Tab"===t.key&&e.services.events.dispatchEvent(R.Legend.ITEM_HOVER,{hoveredElement:sn(this)})})),t.selectAll("div.legend-item div.checkbox").on("keydown",(function(t,n){t.key&&" "===t.key?(t.preventDefault(),e.model.toggleDataLabel(n.name)):t.key&&"Tab"===t.key&&e.services.events.dispatchEvent(R.Legend.ITEM_MOUSEOUT,{hoveredElement:sn(this)})})),t.selectAll("g.additional-item").on("mouseover",(function(t){const n=sn(this),r=n.datum();r.name.length>i.threshold&&e.services.events.dispatchEvent(R.Tooltip.SHOW,{event:t,hoveredElement:n,content:r.name})}))}}class lw extends _y{constructor(e,t,n){super(e,t,n),this.type="chart-clip",this.renderType=L.SVG,this.chartClipId="chart-clip-id-"+Math.floor(99999999999*Math.random()),this.init()}init(){this.model.set({chartClipId:this.chartClipId},{skipUpdate:!0})}render(e=!0){this.createClipPath()}createClipPath(){const e=this.parent,{cartesianScales:t}=this.services;if(!t)throw new Error("Service cartesianScales was undefined");const n=t.getMainXScale(),r=t.getMainYScale(),[i,o]=n.range(),[a,s]=r.range();if(!e)throw new Error("svg is undefined");this.chartClipPath=Mv.appendOrSelect(e,`clipPath.${this.type}`).attr("id",this.chartClipId);const l=Mv.appendOrSelect(this.chartClipPath,`rect.${this.type}`);o-i>0&&l.attr("x",i).attr("y",s).attr("width",o-i).attr("height",a-s),this.chartClipPath.merge(l).lower()}}class cw extends lw{constructor(){super(...arguments),this.type="canvas-chart-clip",this.chartClipId="canvas-chart-clip-id-"+Math.floor(99999999999*Math.random())}createClipPath(){const e=this.parent,{width:t,height:n}=Mv.getSVGElementSize(this.parent,{useAttrs:!0});this.chartClipPath=Mv.appendOrSelect(e,`clipPath.${this.type}`).attr("id",this.chartClipId);const r=Mv.appendOrSelect(this.chartClipPath,`rect.${this.type}`);r.attr("x",0).attr("y",0).attr("width",t).attr("height",n),this.chartClipPath.merge(r).lower()}}var uw,dw;!function(e){e.LEFT="left",e.RIGHT="right",e.TOP="top",e.BOTTOM="bottom"}(dw||(dw={}));var hw=((uw={})[dw.LEFT]=function(e,t,n){return{top:e.top-Math.round(t.offsetHeight/2)+Math.round(n.height/2),left:Math.round(e.left-t.offsetWidth)}},uw[dw.RIGHT]=function(e,t,n){return{top:e.top-Math.round(t.offsetHeight/2)+Math.round(n.height/2),left:Math.round(e.left+n.width)}},uw[dw.TOP]=function(e,t,n){return{top:Math.round(e.top-t.offsetHeight),left:e.left-Math.round(t.offsetWidth/2)+Math.round(n.width/2)}},uw[dw.BOTTOM]=function(e,t,n){return{top:Math.round(e.top+n.height),left:e.left-Math.round(t.offsetWidth/2)+Math.round(n.width/2)}},uw),fw=typeof window<"u"?window:{innerHeight:0,scrollY:0,innerWidth:0,scrollX:0},pw=function(){function e(e){void 0===e&&(e={}),this.positions=hw,this.positions=Object.assign({},hw,e)}return e.prototype.getRelativeOffset=function(e){for(var t={left:e.offsetLeft,top:e.offsetTop};e.offsetParent&&"static"===getComputedStyle(e.offsetParent).position;)t.left+=e.offsetLeft,t.top+=e.offsetTop,e=e.offsetParent;return t},e.prototype.getAbsoluteOffset=function(e){for(var t=e,n={top:0,left:0};t.offsetParent;){var r=getComputedStyle(t.offsetParent);"static"===r.position&&r.marginLeft&&r.marginTop&&(parseInt(r.marginTop,10)&&(n.top+=parseInt(r.marginTop,10)),parseInt(r.marginLeft,10)&&(n.left+=parseInt(r.marginLeft,10))),t=t.offsetParent}var i=e.getBoundingClientRect(),o=document.body.getBoundingClientRect();return{top:i.top-o.top+n.top,left:i.left-o.left+n.left}},e.prototype.findRelative=function(e,t,n){var r=this.getRelativeOffset(e),i=e.getBoundingClientRect();return this.calculatePosition(r,i,t,n)},e.prototype.findAbsolute=function(e,t,n){var r=this.getAbsoluteOffset(e),i=e.getBoundingClientRect();return this.calculatePosition(r,i,t,n)},e.prototype.findPosition=function(e,t,n,r){void 0===r&&(r=this.getAbsoluteOffset.bind(this));var i=r(e),o=e.getBoundingClientRect();return this.calculatePosition(i,o,t,n)},e.prototype.findPositionAt=function(e,t,n){return this.calculatePosition(e,{top:0,left:0,height:0,width:0},t,n)},e.prototype.getPlacementBox=function(e,t){var n=e.offsetHeight+t.top,r=e.offsetWidth+t.left;return{top:t.top,bottom:n,left:t.left,right:r}},e.prototype.addOffset=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=0),Object.assign({},e,{top:e.top+t,left:e.left+n})},e.prototype.setElement=function(e,t){e.style.top=t.top+"px",e.style.left=t.left+"px"},e.prototype.findBestPlacement=function(e,t,n,r,i){var o=this;void 0===r&&(r=this.defaultContainerFunction.bind(this)),void 0===i&&(i=this.findPosition.bind(this));var a=n.map((function(n){var a=i(e,t,n),s=o.getPlacementBox(t,a),l=0,c=0,u=r();s.top<u.top?l=u.top-s.top:s.bottom>u.height&&(l=s.bottom-u.height),s.left<u.left?c=u.left-s.left:s.right>u.width&&(c=s.right-u.width),l&&!c?c=1:c&&!l&&(l=1);var d=t.offsetHeight*t.offsetWidth;return{placement:n,weight:(d-l*c)/d}}));return a.sort((function(e,t){return t.weight-e.weight})),a[0].placement},e.prototype.findBestPlacementAt=function(e,t,n,r){var i=this;return void 0===r&&(r=this.defaultContainerFunction.bind(this)),this.findBestPlacement(null,t,n,r,(function(t,n,r){return i.findPositionAt(e,n,r)}))},e.prototype.defaultContainerFunction=function(){return{top:0,left:0,height:fw.innerHeight,width:fw.innerWidth}},e.prototype.calculatePosition=function(e,t,n,r){return this.positions[r]?this.positions[r](e,n,t):(console.error("No function found for placement, defaulting to 0,0"),{left:0,top:0})},e}();new pw;class mw extends _y{constructor(e,t,n){super(e,t,n),this.type="tooltip",this.renderType=L.HTML,this.isEventListenerAdded=!1,this.positionService=new pw,this.handleShowTooltip=e=>{const t=e.detail.data||e.detail.items;let n;const r=this.formatItems(this.getItems(e));n=e.detail.content?`<div class="title-tooltip"><p>${mb(e.detail.content)}</p></div>`:mb(this.getTooltipHTML(r));const i=Mv.appendOrSelect(this.tooltip,"div.content-box");if(Um(this.getOptions(),"tooltip","customHTML"))if(e.detail.content){const t=`<div class="title-tooltip"><p>${mb(e.detail.content)}</p></div>`;i.html(t)}else i.html(`<div class="title-tooltip"><p>${mb(this.model.getOptions().tooltip.customHTML(t,n))}</p></div>`);else i.html(n);i.selectAll(".datapoint-tooltip").each((function(e,t){const n=r[t];r[t]&&r[t].color&&sn(this).select(".tooltip-color").attr("class","tooltip-color").style("background-color",n.color)})),this.positionTooltip(e),this.tooltip.classed("hidden",!1).attr("aria-hidden",!1)},this.handleHideTooltip=()=>{this.tooltip.classed("hidden",!0).attr("aria-hidden",!0)},this.init()}addTooltipEventListener(){this.services.events.addEventListener(R.Tooltip.MOVE,(e=>{!1===this.tooltip.classed("hidden")&&this.positionTooltip(e)})),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)}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)}getItems(e){return e.detail.items?e.detail.items:[]}formatItems(e){const t=this.getOptions(),n=Um(t,"tooltip","truncation","type"),r=Um(t,"tooltip","truncation","threshold"),i=Um(t,"tooltip","truncation","numCharacter");return n!==B.NONE?e.map((e=>{const t=e.labelIcon?12:0;return e.value=e.value?this.valueFormatter(e.value,e.label):e.value,e.label&&e.label.length+t>r&&(e.label=jm(e.label,n,i)),e.value&&e.value.length>r&&(e.value=jm(e.value,n,i)),e})):e.map((e=>(e.value=e.value?this.valueFormatter(e.value,e.label):e.value,e)))}getTooltipHTML(e){return'<ul class="multi-tooltip">'+e.map((e=>`<li>\n\t\t\t\t\t<div class="datapoint-tooltip${e.bold?" bold":""}">\n\t\t\t\t\t\t${e.class||e.color?`<div class="tooltip-color ${e.class}"></div>`:""}\n\t\t\t\t\t\t<div class="label">\n\t\t\t\t\t\t<p>${e.label||""}</p>\n\t\t\t\t\t\t${e.labelIcon?`<span class="label-icon"/>${e.labelIcon}</span>`:""}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t${void 0===e.value||null===e.value?"":`<p class="value"/>${e.value}</p>`}\n\t\t\t\t\t</div>\n\t\t\t\t</li>`)).join("")+"</ul>"}valueFormatter(e,t){const n=this.getOptions(),r=Um(n,"tooltip","valueFormatter");if(r)return r(e,t);if("function"==typeof e.getTime)return bg(e,"MMM d, yyyy");try{if("string"==typeof e&&/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/.test(e))return bg(Date.parse(e),"MMM d, yyyy")}catch{}return e.toLocaleString()}render(e=!1){const t=this.getOptions(),n=Um(t,"tooltip","enabled");if(n){const e=sn(this.services.domUtils.getHolder()),n=Um(t,"style","prefix");this.tooltip=Mv.appendOrSelect(e,`div.${jp}--${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)}positionTooltip(e){const t=this.services.domUtils.getHolder(),n=this.tooltip.node(),r=this.getOptions(),i=Um(r,"zoomBar","top","enabled");let o=Um(e,"detail","mousePosition");if(o){const e=Um(r,"zoomBar","top","type"),t=tm.height[e];i&&(o[1]+=t+tm.spacerHeight)}else o=ln(Um(e,"detail","event"),t);const a=t.offsetWidth,s=t.offsetHeight;let l;l=o[0]/a>.9?dw.LEFT:o[0]/a<.1?dw.RIGHT:this.positionService.findBestPlacementAt({left:o[0],top:o[1]},n,[dw.RIGHT,dw.LEFT,dw.TOP,dw.BOTTOM],(()=>({top:void 0,left:void 0,width:a,height:s})));let{horizontalOffset:c}=Jp;l===dw.LEFT&&(c*=-1);const u=this.positionService.findPositionAt({left:o[0]+c,top:o[1]},n,l);this.positionService.setElement(n,u)}}const gw=class e extends _y{constructor(){super(...arguments),this.type="grid-brush",this.renderType=L.SVG,this.selectionSelector="rect.selection",this.frontSelectionSelector="rect.frontSelection"}render(t=!0){const n=this.parent,r=this.getComponentContainer();if(!n)throw new Error("SVG was not defined");const i=Mv.appendOrSelect(n,"svg.chart-grid-backdrop"),o=Mv.appendOrSelect(i,`g.${this.type}`),a=Mv.appendOrSelect(o,this.selectionSelector),{width:s,height:l}=Mv.getSVGElementSize(i,{useAttrs:!0}),{cartesianScales:c}=this.services,u=c.getMainXScaleType(),d=c.getMainXScale(),[h]=d.range();r.attr("transform",`translate(${h},0)`);const f=Mv.appendOrSelect(r,this.frontSelectionSelector);if(d&&u===F.TIME){let t=this.model.get("zoomDomain");void 0===t&&(t=this.services.zoom.getDefaultZoomBarDomain(),t&&this.model.set({zoomDomain:t},{animate:!1}));const n=t=>{const n=t[1]-t[0];let r="0,"+n.toString();const i=Math.floor(l/e.DASH_LENGTH),o=i*e.DASH_LENGTH;for(let t=0;t<i;t++)r+=","+e.DASH_LENGTH;r+=","+(l-o),i%2==1&&(r+=",0"),r+=","+n.toString(),r+=","+l.toString(),f.attr("stroke-dasharray",r)},r=e=>{const t=e.selection;null===t||t[0]===t[1]||(f.attr("x",parseFloat(a.attr("x"))+parseFloat(i.attr("x"))).attr("y",a.attr("y")).attr("width",a.attr("width")).attr("height",a.attr("height")).style("cursor","pointer").style("display",null),n(t))},c=(e,n)=>{const r=cl().range([0,s]).domain(t);let i=[r.invert(e),r.invert(n)];i[0].valueOf()===i[1].valueOf()&&(i=this.services.zoom.getDefaultZoomBarDomain()),(t[0].valueOf()!==i[0].valueOf()||t[1].valueOf()!==i[1].valueOf())&&this.services.zoom.handleDomainChange(i)};let u;const d=e=>{const t=e.selection;null!==t&&(c(t[0],t[1]),o.call(u.move,null),f.style("display","none"))};0!=l&&0!=s&&(u=zi().extent([[0,0],[s-1,l]]).on("start brush end",r).on("end.brushed",d),o.call(u));const h=this.services.zoom.getZoomRatio();i.on("click",(function(e){if(e.shiftKey){const e=this.services.domUtils.getHolder(),t=ln(o.node(),e)[0];let n=t-s*h/2;n<0&&(n=0);let r=t+s*h/2;r>s&&(r=s),c(n,r)}}))}}};gw.DASH_LENGTH=4;let vw=gw;class yw extends _y{constructor(){super(...arguments),this.type="zoom-bar",this.renderType=L.SVG,this.MIN_SELECTION_DIFF=9e-10,this.brushSelector="g.zoom-bar-brush",this.clipId="zoomBarClip-"+Math.floor(99999999999*Math.random()),this.brush=zi(),this.highlightStrokeWidth=1}init(){this.services.events.addEventListener(R.ZoomBar.UPDATE,this.render.bind(this));const e=Um(this.getOptions(),"zoomBar",$.TOP,"data");this.model.setZoomBarData(e)}render(e=!0){const t=this.getComponentContainer(),n=this.services.zoom.isZoomBarLoading($.TOP),r=this.services.zoom.isZoomBarLocked($.TOP),i=Um(this.getOptions(),"zoomBar",$.TOP,"type"),o=Um(this.getOptions(),"axes",$.BOTTOM,"highlights"),a=tm.height[i],{width:s}=Mv.getSVGElementSize(this.parent,{useAttrs:!0});if(0===s)return;let l=0;const c=this.model.get("axesMargins");c&&c.left&&(l=c.left);const u=Mv.appendOrSelect(t,"svg.zoom-container").attr("width","100%").attr("height",a).attr("opacity",1);if(Mv.appendOrSelect(t,"rect.zoom-spacer").attr("x",0).attr("y",a).attr("width","100%").attr("height",tm.spacerHeight).attr("opacity",1).attr("fill","none"),i===z.GRAPH_VIEW?Mv.appendOrSelect(u,"rect.zoom-bg").attr("x",l).attr("y",0).attr("width",s-l).attr("height","100%").classed("zoom-bg-skeleton",n).style("stroke",n?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null):i===z.SLIDER_VIEW&&Mv.appendOrSelect(u,"rect.zoom-slider-bg").attr("x",l).attr("y",a/2-1).attr("width",s-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,s);const{cartesianScales:d}=this.services,h=d.getMainXScale(),f=d.getMainYScale(),p=d.getMainXScaleType();if(h&&p===F.TIME){let e=this.services.zoom.getZoomBarData();if(function(e){if(null==e)return!0;if(nd(e)&&(su(e)||"string"==typeof e||"function"==typeof e.splice||md(e)||Sd(e)||dd(e)))return!e.length;var t=Zh(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(od(e))return!Md(e).length;for(var n in e)if(Mp.call(e,n))return!1;return!0}(e)||1===e.length)return;this.xScale=h.copy(),this.yScale=f.copy();const n=this.services.zoom.getDefaultZoomBarDomain(e);e=this.compensateDataForDefaultDomain(e,n);const c=this.model.get("initialZoomDomain"),d=Um(this.getOptions(),"zoomBar",$.TOP,"initialZoomDomain");d&&d[0]&&d[1]&&(d[0]=new Date(d[0]),d[1]=new Date(d[1])),!d||c&&c[0].valueOf()===d[0].valueOf()&&c[1].valueOf()===d[1].valueOf()?null===d&&null!==c&&this.model.set({initialZoomDomain:null,zoomDomain:Dp([],n)},{skipUpdate:!0}):this.model.set({initialZoomDomain:Dp([],d),zoomDomain:d?Dp([],d):n},{skipUpdate:!0}),this.xScale.range([l,s]).domain(n),this.maxSelectionRange=this.xScale.range(),this.yScale.range([0,a-6]).domain(de(e,(e=>e.value)));const p=this.model.get("zoomDomain");if(i===z.GRAPH_VIEW&&(this.renderZoomBarArea(u,"path.zoom-graph-area-unselected",e,null),this.updateClipPath(t,this.clipId,0,0,0,0),this.renderZoomBarArea(u,"path.zoom-graph-area",e,this.clipId),this.renderZoomBarBaseline(u,l,s),o)){const e=o.highlightStartMapsTo,t=o.highlightEndMapsTo,n=o.color,r=o.labelMapsTo;o.data.forEach(((i,o)=>{Mv.appendOrSelect(u,`rect.highlight-${o}`).attr("height",a-2*this.highlightStrokeWidth).attr("y",this.highlightStrokeWidth).attr("x",this.xScale(i[e])).attr("width",this.xScale(i[t])-this.xScale(i[e])).style("fill",n&&n.scale[i[r]]?n.scale[i[r]]:null).style("fill-opacity",.1).style("stroke",n&&n.scale[i[r]]?n.scale[i[r]]:null).style("stroke-dasharray","2, 2").attr("stroke-width","1px")}))}this.addBrushEventListener(p,l,s);const m=Mv.appendOrSelect(t,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 e=p.map((e=>this.xScale(e)));e[1]-e[0]<this.MIN_SELECTION_DIFF||(m.call(this.brush.move,e),this.updateBrushHandle(this.getComponentContainer(),e))}r&&(this.brush.filter((()=>!1)),m.selectAll("rect").attr("cursor","auto"))}}addBrushEventListener(e,t,n){const r=Um(this.getOptions(),"zoomBar",$.TOP,"type"),i=tm.height[r];this.brush.extent([[t,0],[n,i]]).on("start brush end",null).on("start brush end",(t=>{const n=t.selection;null===n?this.handleBrushedEvent(t,e,this.xScale,this.xScale.range()):n[0]===n[1]||this.handleBrushedEvent(t,e,this.xScale,n)}))}handleBrushedEvent(e,t,n,r){const i=[n.invert(r[0]),n.invert(r[1])];if(this.updateBrushHandle(this.getComponentContainer(),r),null!=e.sourceEvent&&("mousemove"===e.sourceEvent.type||"mouseup"===e.sourceEvent.type||"mousedown"===e.sourceEvent.type||"touchstart"===e.sourceEvent.type||"touchmove"===e.sourceEvent.type||"touchend"===e.sourceEvent.type)){let n;(void 0===t||t[0]!==i[0]||t[1]!==i[1])&&this.services.zoom.handleDomainChange(i,{dispatchEvent:!1}),"start"===e.type?n=R.ZoomBar.SELECTION_START:"brush"===e.type?n=R.ZoomBar.SELECTION_IN_PROGRESS:"end"===e.type&&(n=R.ZoomBar.SELECTION_END,this.services.events.dispatchEvent(R.ZoomDomain.CHANGE,{newDomain:i})),this.services.events.dispatchEvent(n,{selection:r,newDomain:i})}}updateBrushHandle(e,t){const n=this,r=tm.handleWidth,i=Um(this.getOptions(),"zoomBar",$.TOP,"type"),o=tm.height[i],a=-r/2,s=tm.handleBarWidth,l=i===z.GRAPH_VIEW?tm.handleBarHeight:6,c=-s/2,u=(o-l)/2;e.select(this.brushSelector).selectAll("rect.handle").data([{type:"w"},{type:"e"}]).attr("x",(function(e){return"w"===e.type?Math.max(t[0]+a,n.maxSelectionRange[0]):"e"===e.type?Math.min(t[1]+a,n.maxSelectionRange[1]-r):void 0})).attr("y",0).attr("width",r).attr("height",o).attr("cursor","ew-resize").style("display",null);const d=e.select(this.brushSelector).selectAll("rect.handle-bar").data([{type:"w"},{type:"e"}]);d.enter().append("rect").attr("class",(function(e){return"handle-bar handle-bar--"+e.type})),d.attr("x",(function(e){return"w"===e.type?Math.max(t[0]+c,n.maxSelectionRange[0]-a+c):"e"===e.type?Math.min(t[1]+c,n.maxSelectionRange[1]+a+c):void 0})).attr("y",u).attr("width",s).attr("height",l).attr("cursor","ew-resize"),i===z.SLIDER_VIEW&&this.updateSliderSelectedArea(t),this.updateClipPath(e,this.clipId,t[0],0,t[1]-t[0],o)}updateSliderSelectedArea(e){const t=Um(this.getOptions(),"zoomBar",$.TOP,"type"),n=tm.height[t],r=this.getComponentContainer().select("svg.zoom-container");Mv.appendOrSelect(r,"rect.zoom-slider-selected-area").attr("x",e[0]).attr("y",n/2-1).attr("width",e[1]-e[0]).attr("height",2)}renderZoomBarArea(e,t,n,r){const{cartesianScales:i}=this.services,o=i.getMainXAxisPosition(),a=i.getMainYAxisPosition(),s=i.getMainXScaleType(),l=i.getMainYScaleType(),c=(e,t,n)=>r=>i.getValueFromScale(e,t,n,r),u=c(this.xScale,s,o),d=c(this.yScale,l,a),h=Um(this.getOptions(),"zoomBar",$.TOP,"type"),f=tm.height[h],p=Il().x((e=>u(e))).y0(f).y1((e=>f-d(e))),m=Mv.appendOrSelect(e,t).datum(n).attr("d",p);r&&m.attr("clip-path",`url(#${r})`)}updateClipPath(e,t,n,r,i,o){const a=Mv.appendOrSelect(e,"clipPath").attr("id",t);Mv.appendOrSelect(a,"rect").attr("x",n).attr("y",r).attr("width",i).attr("height",o)}compensateDataForDefaultDomain(e,t){if(!e||e.length<2)return;const n=$f(e),r=this.services.cartesianScales.getDomainIdentifier(),i=this.services.cartesianScales.getRangeIdentifier();if(Number(t[0])<Number(n[0][r])){const e={};e[r]=t[0],e[i]=0,n.unshift(e)}if(Number(t[1])>Number(n[n.length-1][r])){const e={};e[r]=t[1],e[i]=0,n.push(e)}return n}renderZoomBarBaseline(e,t,n,r=!1){const i=Um(this.model.getOptions(),"zoomBar",$.TOP,"type"),o=tm.height[i],a=Pl()([[t,o],[n,o]]);Mv.appendOrSelect(e,"path.zoom-bg-baseline").attr("d",a).classed("zoom-bg-baseline-skeleton",r).style("stroke",r?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}renderSkeleton(e,t,n){this.renderZoomBarArea(e,"path.zoom-graph-area-unselected",[],null),this.renderZoomBarArea(e,"path.zoom-graph-area",[],this.clipId),this.brush.on("start brush end",null),Mv.appendOrSelect(this.getComponentContainer(),this.brushSelector).html(null),Um(this.getOptions(),"zoomBar",$.TOP,"type")===z.GRAPH_VIEW&&this.renderZoomBarBaseline(e,t,n,!0)}destroy(){this.brush.on("start brush end",null),this.services.events.removeEventListener(R.ZoomBar.UPDATE,this.render.bind(this))}}class bw extends _y{constructor(e,t){super(e,t),this.type="threshold",this.renderType=L.SVG,this.positionService=new pw}render(e=!1){const t=Um(this.getOptions(),"axes"),n=[];Object.keys(t).forEach((e=>{if(Object.values($).includes(e)){const r=t[e];r.thresholds&&r.thresholds.length>0&&n.push({axisPosition:e,thresholds:r.thresholds,correspondingDatasets:null==r?void 0:r.correspondingDatasets,mapsTo:null==r?void 0:r.mapsTo})}}));const r=this.getComponentContainer({withinChartClip:!0}).selectAll("g.axis-thresholds").data(n,(e=>e.axisPosition));r.exit().attr("opacity",0).remove();const i=r.enter().append("g").merge(r);i.attr("class",(e=>`axis-thresholds ${e.axisPosition}`));const o=i.selectAll("g.threshold-group").data((e=>e.thresholds.map((t=>(t.axisPosition=e.axisPosition,t.datum=this.constructDatumObj(e,t),t)))));o.exit().attr("opacity",0).remove();const a=o.enter().append("g");a.append("line").attr("class","threshold-line"),a.append("rect").attr("class","threshold-hoverable-area"),a.merge(o).attr("class","threshold-group");const s=this;i.each((function({axisPosition:t}){const n=s.services.cartesianScales.getScaleByPosition(t),r=s.services.cartesianScales.getScaleTypeByPosition(t);let i=null,o=null;t===$.LEFT||t===$.RIGHT?(o=n,i=s.services.cartesianScales.getMainXScale()):(i=n,o=s.services.cartesianScales.getMainYScale());const a=r===F.LABELS,[l,c]=i.range(),[u,d]=o.range(),{cartesianScales:h}=s.services,f=h.getOrientation(),[p,m]=Vm((e=>h.getDomainValue(e)),(e=>h.getRangeValue(e)),f),g=sn(this);t===$.TOP||t===$.BOTTOM?(g.selectAll("line.threshold-line").transition().call((t=>s.services.transitions.setupTransition({transition:t,name:"threshold-line-update",animate:e}))).attr("y1",d).attr("y2",u).attr("x1",(({datum:e})=>p(e)+(a?n.step()/2:0))).attr("x2",(({datum:e})=>p(e)+(a?n.step()/2:0))).style("stroke",(({fillColor:e})=>e)),g.selectAll("rect.threshold-hoverable-area").attr("x",0).attr("y",(({datum:e})=>-p(e))).attr("width",Math.abs(u-d)).classed("rotate",!0)):(g.selectAll("line.threshold-line").transition().call((t=>s.services.transitions.setupTransition({transition:t,name:"threshold-line-update",animate:e}))).attr("x1",l).attr("x2",c).attr("y1",(({datum:e})=>m(e)+(a?n.step()/2:0))).attr("y2",(({datum:e})=>m(e)+(a?n.step()/2:0))).style("stroke",(({fillColor:e})=>e)),g.selectAll("rect.threshold-hoverable-area").attr("x",l).attr("y",(({datum:e})=>m(e))).attr("width",Math.abs(c-l)).classed("rotate",!1))})),this.services.events.addEventListener(R.Threshold.SHOW,(e=>{this.setThresholdLabelPosition(e.detail),this.label.classed("hidden",!1)})),this.services.events.addEventListener(R.Threshold.HIDE,(()=>{this.label.classed("hidden",!0)})),this.appendThresholdLabel(),this.addEventListeners()}getFormattedValue(e){const{value:t,axisPosition:n}=e,r=this.getOptions();if(this.services.cartesianScales.getScaleTypeByPosition(n)===F.TIME){const e=[$.LEFT,$.RIGHT].includes(n),i=this.services.cartesianScales.getMainXScale(),o=this.services.cartesianScales.getMainYScale(),a=e?o:i,s=Um(r,"timeScale"),l=Tg(a.ticks(),Um(s,"timeInterval"));return xg(t,0,a.ticks(),l,s)}return t.toLocaleString("en")}appendThresholdLabel(){const e=sn(this.services.domUtils.getHolder()),t=Um(this.getOptions(),"style","prefix");this.label=Mv.appendOrSelect(e,`div.${jp}--${t}--threshold--label`).classed("hidden",!0)}setThresholdLabelPosition({event:e,datum:t}){const n=this.services.domUtils.getHolder(),r=ln(e,n),i=t.valueFormatter?t.valueFormatter(t.value):this.getFormattedValue(t);this.label.html(gb(`${t.label||"Threshold"}: ${i}`)).style("background-color",t.fillColor);const o=this.label.node(),a=this.positionService.findBestPlacementAt({left:r[0],top:r[1]},o,[dw.RIGHT,dw.LEFT,dw.TOP,dw.BOTTOM],(()=>({top:void 0,left:void 0,width:n.offsetWidth,height:n.offsetHeight}))),s=this.positionService.findPositionAt({left:r[0],top:r[1]},o,a);this.positionService.setElement(o,s)}constructDatumObj(e,t){const n={};return e.correspondingDatasets&&(n.group=Um(e,"correspondingDatasets",0)),n[e.mapsTo]=t.value,n}addEventListeners(){const e=this;this.getComponentContainer({withinChartClip:!0}).selectAll("rect.threshold-hoverable-area").on("mouseover mousemove",(function(t){sn(this.parentNode).select("line.threshold-line").classed("active",!0),e.services.events.dispatchEvent(R.Threshold.SHOW,{event:t,hoveredElement:sn(this),datum:sn(this).datum()})})).on("mouseout",(function(t){sn(this.parentNode).select("line.threshold-line").classed("active",!1),e.services.events.dispatchEvent(R.Threshold.HIDE,{event:t,hoveredElement:sn(this),datum:sn(this).datum()})}))}}class ww extends _y{constructor(e,t){super(e,t),this.type="highlight",this.renderType=L.SVG,this.positionService=new pw,this.highlightStrokeWidth=1}render(e=!1){const t=Um(this.getOptions(),"axes"),n=[];Object.keys(t).forEach((e=>{if(Object.values($).includes(e)){const r=t[e];r.highlights&&r.highlights.data.length>0&&n.push({axisPosition:e,highlightStartMapsTo:r.highlights.highlightStartMapsTo,highlightEndMapsTo:r.highlights.highlightEndMapsTo,labelMapsTo:r.highlights.labelMapsTo,highlight:r.highlights.data,color:r.highlights.color})}}));const r=this.getComponentContainer({withinChartClip:!0}).selectAll("g.axis-highlight").data(n,(e=>e.axisPosition));r.exit().attr("opacity",0).remove();const i=r.enter().append("g").merge(r);i.attr("class",(e=>`axis-highlight ${e.axisPosition}`));const o=i.selectAll("g.highlight-group").data((e=>e.highlight.map((t=>(t.axisPosition=e.axisPosition,t.highlightStartMapsTo=e.highlightStartMapsTo,t.labelMapsTo=e.labelMapsTo,t.color=e.color,t.highlightEndMapsTo=e.highlightEndMapsTo,t)))));o.exit().attr("opacity",0).remove();const a=o.enter().append("g");a.append("rect").attr("class","highlight-bar"),a.append("line").attr("class","highlight-line"),a.merge(o).attr("class","highlight-group");const s=this;i.each((function({axisPosition:t}){const n=s.services.cartesianScales.getMainXScale(),r=s.services.cartesianScales.getMainYScale(),[i,o]=n.range(),[a,l]=r.range(),{cartesianScales:c}=s.services,u=c.getOrientation(),[d,h]=Vm((e=>c.getDomainValue(e)),(e=>c.getRangeValue(e)),u),f=sn(this);t===$.TOP||t===$.BOTTOM?f.selectAll("rect.highlight-bar").transition().call((t=>s.services.transitions.setupTransition({transition:t,name:"highlight-bar-update",animate:e}))).attr("y",Math.max(l+s.highlightStrokeWidth,0)).attr("height",Math.max(a-2*s.highlightStrokeWidth,0)).attr("x",(({highlightStartMapsTo:e,...t})=>d(t[e]))).attr("width",(({highlightStartMapsTo:e,highlightEndMapsTo:t,...n})=>Math.max(d(n[t])-d(n[e]),0))).style("stroke",(({color:e,labelMapsTo:t,...n})=>e&&e.scale[n[t]]?e.scale[n[t]]:null)).style("stroke-dasharray","2, 2").attr("stroke-width",s.highlightStrokeWidth+"px").style("fill-opacity",.1).style("fill",(({color:e,labelMapsTo:t,...n})=>e&&e.scale[n[t]]?e.scale[n[t]]:null)):f.selectAll("rect.highlight-bar").transition().call((t=>s.services.transitions.setupTransition({transition:t,name:"highlight-bar-update",animate:e}))).attr("x",i).attr("width",Math.max(o-i,0)).attr("y",(({highlightEndMapsTo:e,...t})=>h(t[e]))).attr("height",(({highlightStartMapsTo:e,highlightEndMapsTo:t,...n})=>Math.max(h(n[e])-h(n[t]),0))).style("stroke",(({color:e,labelMapsTo:t,...n})=>e&&e.scale[n[t]]?e.scale[n[t]]:null)).style("stroke-dasharray","2, 2").attr("stroke-width",s.highlightStrokeWidth+"px").style("fill-opacity",.1).style("fill",(({color:e,labelMapsTo:t,...n})=>e&&e.scale[n[t]]?e.scale[n[t]]:null))}))}}class _w extends mw{getItems(e){if(e.detail.items)return e.detail.items;const{data:t}=e.detail;if(!t||!t.length||!t[0])return[];const n=this.getOptions(),{cartesianScales:r}=this.services,i=r.getDomainIdentifier(),o=r.isDualAxes(),{groupMapsTo:a}=n.data,s=r.getDomainLabel();let l=r.getRangeLabel();const c=t[0][i];let u;if(1===t.length){const i=t[0],d=r.getRangeIdentifier(i);if(o){const e=r.getRangeAxisPosition({datum:i,groups:[i[a]]});l=r.getScaleLabel(e)}const h=i[d];u=[{label:s,value:c},...Array.isArray(h)&&2===h.length?[{label:"Start",value:h[0]},{label:"End",value:h[1]}]:[{label:l,value:i[d]}]],e.detail.additionalItems&&e.detail.additionalItems.forEach((e=>u.push({label:e.label,value:e.value}))),u.push({label:n.tooltip.groupLabel,value:i[a],color:this.model.getFillColor(i[a]),class:this.model.getColorClassName({classNameTypes:[I.TOOLTIP],dataGroupName:i[a]})})}else if(t.length>1&&(u=[{label:s,value:c}],u=u.concat(t.map((e=>{const t=e[r.getRangeIdentifier(e)];return{label:e[a],value:Array.isArray(t)&&2===t.length?`${t[0]} - ${t[1]}`:t,color:this.model.getFillColor(e[a]),class:this.model.getColorClassName({classNameTypes:[I.TOOLTIP],dataGroupName:e[a]})}})).sort(((e,t)=>t.value-e.value))),!o&&!0===Um(n,"tooltip","showTotal"))){const e=r.getRangeIdentifier();u.push({label:rh(n,"tooltip.totalLabel")||"Total",value:t.reduce(((t,n)=>t+n[e]),0),bold:!0})}return u}}class Ew extends _y{constructor(){super(...arguments),this.type="grid",this.renderType=L.SVG}render(e=!0){const t=Um(this.getOptions(),"grid","x","enabled"),n=Um(this.getOptions(),"grid","y","enabled");this.drawBackdrop(t,n),(t||n)&&(t&&(Mv.appendOrSelect(this.backdrop,"g.x.grid"),this.drawXGrid(e)),n&&(Mv.appendOrSelect(this.backdrop,"g.y.grid"),this.drawYGrid(e)))}drawXGrid(e){const t=this.parent,n=this.backdrop.attr("height"),r=Ue(this.services.cartesianScales.getMainXScale()).tickSizeInner(-n).tickSizeOuter(0);if(Um(this.getOptions(),"grid","x","alignWithAxisTicks")){const e=this.services.cartesianScales.getDomainAxisPosition(),t=Um(this.getOptions(),"axes",e,"ticks","values");t&&r.tickValues(t)}else{const e=Um(this.getOptions(),"grid","x","numberOfTicks");r.ticks(e)}const i=t.select(".x.grid").attr("transform",`translate(${-this.backdrop.attr("x")}, ${n})`);e?i.transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"grid-update",animate:e}))).call(r):i.call(r),this.cleanGrid(i)}drawYGrid(e){const t=this.parent,n=this.backdrop.attr("width"),r=He(this.services.cartesianScales.getMainYScale()).tickSizeInner(-n).tickSizeOuter(0);if(Um(this.getOptions(),"grid","y","alignWithAxisTicks")){const e=this.services.cartesianScales.getRangeAxisPosition(),t=Um(this.getOptions(),"axes",e,"ticks","values");t&&r.tickValues(t)}else{const e=Um(this.getOptions(),"grid","y","numberOfTicks");r.ticks(e)}const i=t.select(".y.grid").attr("transform",`translate(0, ${-this.backdrop.attr("y")})`);e?i.transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"grid-update",animate:e}))).call(r):i.call(r),this.cleanGrid(i)}getGridlineThreshold(e){const t=this.parent,n=t.selectAll(".x.grid .tick").nodes().sort(((e,t)=>Number(Bm(e).tx)-Number(Bm(t).tx)));let r=-1;if(!n.length)return;n.forEach((t=>{e[0]>=+Bm(t).tx&&r++}));const i=r+1<n.length?r+1:n.length,o=n[r],a=n[i];let s;if(o)if(a)s=+Bm(a).tx-+Bm(o).tx;else{const e=t.select("rect.chart-grid-backdrop").node();s=Mv.getSVGElementSize(e).width-+Bm(o).tx}else s=+Bm(a).tx;const{threshold:l}=this.getOptions().tooltip.gridline;return s*l}getActiveGridline(e){const t=Um(this.getOptions,"tooltip","gridline","threshold")||this.getGridlineThreshold(e);return this.parent.selectAll(".x.grid .tick").filter((function(){const n=Bm(this),r=Number(n.tx)-t,i=Number(n.tx)+t;return r<=e[0]&&e[0]<=i}))}drawBackdrop(e,t){const n=this.parent,r=this.services.cartesianScales.getMainXScale(),i=this.services.cartesianScales.getMainYScale(),[o,a]=r.range(),[s,l]=i.range();this.backdrop=Mv.appendOrSelect(n,"svg.chart-grid-backdrop");const c=Mv.appendOrSelect(this.backdrop,e||t?"rect.chart-grid-backdrop.stroked":"rect.chart-grid-backdrop");this.backdrop.merge(c).attr("x",o).attr("y",l).attr("width",Math.abs(a-o)).attr("height",Math.abs(s-l)).lower(),c.attr("width","100%").attr("height","100%")}cleanGrid(e){e.selectAll("text").remove(),e.select(".domain").remove()}}class xw extends _y{constructor(){super(...arguments),this.type="line",this.renderType=L.SVG,this.handleLegendOnHover=e=>{const{hoveredElement:t}=e.detail;this.parent.selectAll("path.line").transition("legend-hover-line").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-hover-line"}))).attr("opacity",(e=>e.name!==t.datum().name?Kp:Xp))},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.line").transition("legend-mouseout-line").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-mouseout-line"}))).attr("opacity",Xp)}}init(){const{events:e}=this.services;e.addEventListener(R.Legend.ITEM_HOVER,this.handleLegendOnHover),e.addEventListener(R.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(e=!0){const t=this.getComponentContainer({withinChartClip:!0}),{cartesianScales:n,curves:r}=this.services,[i,o]=Vm((e=>n.getDomainValue(e)),(e=>n.getRangeValue(e)),n.getOrientation()),a=this.getOptions(),s=Pl().x(i).y(o).curve(r.getD3Curve()).defined((e=>null!=e[n.getRangeIdentifier(e)]));let l=[];if(this.configs.stacked){const e=Object.keys(a.axes).some((e=>a.axes[e].percentage)),{groupMapsTo:t}=a.data;l=this.model.getStackedData({groups:this.configs.groups,percentage:e}).map((e=>{const n=this.services.cartesianScales.getDomainIdentifier(e),r=this.services.cartesianScales.getRangeIdentifier(e);return{name:Um(e,0,t),data:e.map((e=>({[n]:e.data.sharedStackKey,[t]:e[t],[r]:e[1]}))),hidden:!wy(e,(e=>e[0]!==e[1]))}}))}else l=this.model.getGroupedData(this.configs.groups);const c=t.selectAll("path.line").data(l,(e=>e.name));c.exit().attr("opacity",0).remove(),c.enter().append("path").classed("line",!0).attr("opacity",0).merge(c).data(l,(e=>e.name)).attr("class",(e=>this.model.getColorClassName({classNameTypes:[I.STROKE],dataGroupName:e.name,originalClassName:"line"}))).style("stroke",(e=>this.model.getStrokeColor(e.name))).attr("role",kg.GRAPHICS_SYMBOL).attr("aria-roledescription","line").attr("aria-label",(e=>{const{data:t}=e;return t.map((e=>e[this.services.cartesianScales.getRangeIdentifier(e)])).join(",")})).transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"line-update-enter",animate:e}))).attr("opacity",(e=>e.hidden?0:1)).attr("d",(e=>{const{data:t}=e;return s(t)}))}destroy(){const e=this.services.events;e.removeEventListener(R.Legend.ITEM_HOVER,this.handleLegendOnHover),e.removeEventListener(R.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}}class Sw extends _y{constructor(){super(...arguments),this.type="ruler",this.renderType=L.SVG,this.isXGridEnabled=Um(this.getOptions(),"grid","x","enabled"),this.isYGridEnabled=Um(this.getOptions(),"grid","y","enabled"),this.isEventListenerAdded=!1}render(e=!1){const t=Um(this.getOptions(),"ruler","enabled");this.drawBackdrop(),t&&!this.isEventListenerAdded?this.addBackdropEventListeners():!t&&this.isEventListenerAdded&&this.removeBackdropEventListeners()}removeBackdropEventListeners(){this.isEventListenerAdded=!1,this.backdrop.on("mousemove mouseover mouseout",null)}formatTooltipData(e){return e}showRuler(e,[t,n]){const r=this.parent,i=this.services.cartesianScales.getOrientation(),o=this.model.getDisplayData(),a=this.services.cartesianScales.getRangeScale(),[s,l]=a.range(),c=i===j.HORIZONTAL?n:t,u=Mv.appendOrSelect(r,"g.ruler").attr("aria-label","ruler"),d=Mv.appendOrSelect(u,"line.ruler-line"),h=r.selectAll("[role=graphics-symbol]"),f=o.map((e=>({domainValue:this.services.cartesianScales.getDomainValue(e),originalData:e}))).filter((e=>function(e,t){return e>t-5&&e<t+5}(e.domainValue,c)));if(this.pointsWithinLine&&f.length===this.pointsWithinLine.length&&f.map((e=>e.domainValue)).join()===this.pointsWithinLine.map((e=>e.domainValue)).join())return this.pointsWithinLine=f,this.services.events.dispatchEvent(R.Tooltip.MOVE,{mousePosition:[t,n]});this.pointsWithinLine=f;const p=this.pointsWithinLine.reduce(((e,t)=>{if(0===e.length)return e.push(t),e;const n=e[0].domainValue,r=Math.abs(c-t.domainValue),i=Math.abs(c-n);return r>i||(r<i?e=[t]:e.push(t)),e}),[]);if(p.length>0){const e=p.map((e=>e.originalData)).filter((e=>null!=e[this.services.cartesianScales.getRangeIdentifier(e)])),r=p.map((e=>e.domainValue)),o=h.filter((e=>{const t=this.services.cartesianScales.getDomainValue(e);return r.includes(t)}));this.elementsToHighlight&&this.elementsToHighlight.size()>0&&!function(e,t){return pp(e,t)}(this.elementsToHighlight,o)&&this.hideRuler(),o.dispatch("mouseover"),this.elementsToHighlight=o,this.services.events.dispatchEvent(R.Tooltip.SHOW,{mousePosition:[t,n],hoveredElement:d,data:this.formatTooltipData(e)}),u.attr("opacity",1);const a=p[0];"horizontal"===i?d.attr("x1",l).attr("x2",s).attr("y1",a.domainValue).attr("y2",a.domainValue):d.attr("y1",l).attr("y2",s).attr("x1",a.domainValue).attr("x2",a.domainValue)}else this.hideRuler()}hideRuler(){const e=this.parent,t=Mv.appendOrSelect(e,"g.ruler");e.selectAll("[role=graphics-symbol]").dispatch("mouseout"),this.services.events.dispatchEvent(R.Tooltip.HIDE),t.attr("opacity",0)}addBackdropEventListeners(){this.isEventListenerAdded=!0;const e=this,t=this.services.domUtils.getHolder(),n=this.model.getDisplayData();let r=function(t){const n=ln(t,e.parent.node());e.showRuler(t,n)};n.length>100&&(r=function(e,t,n){let r=null;return function(...i){const o=this;o.mousePosition=ln(i[0],n),clearTimeout(r),r=setTimeout((function(){e.apply(o,i)}),t)}}((function(t){const{mousePosition:n}=this;e.showRuler(t,n)}),n.length%50*12.5,t)),this.backdrop.on("mousemove mouseover",r).on("mouseout",this.hideRuler.bind(this))}drawBackdrop(){const e=this.parent;this.backdrop=Mv.appendOrSelect(e,"svg.chart-grid-backdrop")}}class Tw extends _y{constructor(){super(...arguments),this.type="scatter",this.renderType=L.SVG,this.handleChartHolderOnHover=()=>{if(!this.parent)throw new Error("Parent not defined");this.parent.selectAll("circle.dot").transition("chart-holder-hover-scatter").call((e=>{var t;return null==(t=this.services.transitions)?void 0:t.setupTransition({transition:e,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((e=>{var t;return null==(t=this.services.transitions)?void 0:t.setupTransition({transition:e,name:"chart-holder-mouseout-scatter"})})).attr("opacity",0)},this.handleLegendOnHover=e=>{const{hoveredElement:t}=e.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((e=>{var t;return null==(t=this.services.transitions)?void 0:t.setupTransition({transition:e,name:"legend-hover-scatter"})})).attr("opacity",(e=>e[n]!==t.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((e=>{var t;return null==(t=this.services.transitions)?void 0:t.setupTransition({transition:e,name:"legend-mouseout-scatter"})})).attr("opacity",1)}}init(){const{events:e}=this.services;if(!e)throw new Error("Services events are undefined.");e.addEventListener(R.Legend.ITEM_HOVER,this.handleLegendOnHover),e.addEventListener(R.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut);const{fadeInOnChartHolderMouseover:t}=this.configs;t&&(e.addEventListener(R.Chart.MOUSEOVER,this.handleChartHolderOnHover),e.addEventListener(R.Chart.MOUSEOUT,this.handleChartHolderOnMouseOut))}filterBasedOnZoomDomain(e){const{cartesianScales:t}=this.services;if(!t)throw new Error("Services cartesianScales are undefined.");const n=t.getDomainIdentifier(e),r=this.model.get("zoomDomain");return void 0!==r?e.filter((e=>e[n].getTime()>=r[0].getTime()&&e[n].getTime()<=r[1].getTime())):e}getScatterData(){const e=this.getOptions(),{stacked:t}=this.configs;let n;if(t){const t=Object.keys(e.axes).some((t=>e.axes[t].percentage));n=this.model.getStackedData({groups:this.configs.groups,percentage:t})}else{const{cartesianScales:e}=this.services;if(!e)throw new Error("Services cartesianScales are undefined.");n=this.model.getDisplayData(this.configs.groups).filter((t=>{const n=e.getRangeIdentifier(t);return void 0!==t[n]&&null!==t[n]}))}return this.filterBasedOnZoomDomain(n)}render(e){if(!Um(this.getOptions(),"points","enabled")&&!Um(this.getOptions(),"bubble","enabled"))return;const t=this.getComponentContainer({withinChartClip:!0}),n=this.getOptions(),{groupMapsTo:r}=n.data,{cartesianScales:i}=this.services;if(!i)throw new Error("Services cartesianScales are undefined.");const o=i.getDomainIdentifier(),a=t.selectAll("circle.dot").data(this.getScatterData(),(e=>`${e[r]}-${e[o]}`));a.exit().attr("opacity",0).remove();const s=a.enter().append("circle").classed("dot",!0).attr("opacity",0).merge(a);this.styleCircles(s,e),this.addEventListeners()}isDatapointThresholdAnomaly(e){const{handleThresholds:t}=this.configs;if(!t)return!1;const{cartesianScales:n}=this.services;if(!n)throw new Error("Cartesian scales service is undefined");const r=n.getOrientation(),[i,o]=Vm(n.getHighestDomainThreshold(),n.getHighestRangeThreshold(),r),[a,s]=Vm((e=>n.getDomainValue(e)),(e=>n.getRangeValue(e)),r),l=a(e),c=s(e);return o&&i?c<=o.scaleValue&&l>=i.scaleValue:o?c<=o.scaleValue:!!i&&l>=i.scaleValue}styleCircles(e,t){const n=this.getOptions(),{filled:r,fillOpacity:i}=n.points,{cartesianScales:o}=this.services;if(!o)throw new Error("Cartesian scales service is undefined");const{groupMapsTo:a}=n.data,[s,l]=Vm((e=>o.getDomainValue(e)),(e=>o.getRangeValue(e)),o.getOrientation()),{fadeInOnChartHolderMouseover:c}=this.configs;e.raise().classed("dot",!0).attr("class",(e=>{const t=o.getDomainIdentifier(e),n=this.model.getIsFilled(e[a],e[t],e,r)?[I.FILL,I.STROKE]:[I.STROKE];return this.model.getColorClassName({classNameTypes:n,dataGroupName:e[a],originalClassName:"dot"})||""})).classed("threshold-anomaly",(e=>this.isDatapointThresholdAnomaly(e))).classed("filled",(e=>{const t=o.getDomainIdentifier(e);return this.model.getIsFilled(e[a],e[t],e,r)})).classed("unfilled",(e=>{const t=o.getDomainIdentifier(e);return!this.model.getIsFilled(e[a],e[t],e,r)})).transition().call((e=>{var n;return null==(n=this.services.transitions)?void 0:n.setupTransition({transition:e,name:"scatter-update-enter",animate:t})})).attr("cx",s).attr("cy",l).attr("r",n.points.radius).style("fill",(e=>{const t=o.getDomainIdentifier(e);if(this.model.getIsFilled(e[a],e[t],e,r))return this.model.getFillColor(e[a],e[t],e)})).style("stroke",(e=>{const t=o.getDomainIdentifier(e);return this.model.getStrokeColor(e[a],e[t],e)})).attr("fill-opacity",r?i:1).attr("opacity",c?0:1).attr("role",kg.GRAPHICS_SYMBOL).attr("aria-roledescription","point").attr("aria-label",(e=>e[o.getRangeIdentifier(e)])),this.addEventListeners()}getTooltipAdditionalItems(e){return null}addEventListeners(){const e=this,{groupMapsTo:t}=e.getOptions().data;if(!this.parent)throw new Error("Parent not defined");this.parent.selectAll("circle").on("mouseover",(function(n,r){var i,o;const a=sn(this);a.classed("hovered",!0).attr("class",(n=>e.model.getColorClassName({classNameTypes:[I.FILL],dataGroupName:n[t],originalClassName:a.attr("class")}))).style("fill",(n=>{var r;const i=null==(r=e.services.cartesianScales)?void 0:r.getDomainIdentifier(n);return e.model.getFillColor(n[t],n[i],n)})).classed("unfilled",!1),null==(i=e.services.events)||i.dispatchEvent(R.Tooltip.SHOW,{event:n,hoveredElement:a,data:[r],additionalItems:e.getTooltipAdditionalItems(r)}),null==(o=e.services.events)||o.dispatchEvent(R.Scatter.SCATTER_MOUSEOVER,{event:n,element:a,datum:r})})).on("mousemove",(function(t,n){var r,i;const o=sn(this);null==(r=e.services.events)||r.dispatchEvent(R.Scatter.SCATTER_MOUSEMOVE,{event:t,element:o,datum:n}),null==(i=e.services.events)||i.dispatchEvent(R.Tooltip.MOVE,{event:t})})).on("click",(function(t,n){var r;null==(r=e.services.events)||r.dispatchEvent(R.Scatter.SCATTER_CLICK,{event:t,element:sn(this),datum:n})})).on("mouseout",(function(n,r){var i,o,a;const s=sn(this);if(s.classed("hovered",!1),!e.configs.filled){const{filled:n}=e.getOptions().points,o=null==(i=e.services.cartesianScales)?void 0:i.getDomainIdentifier(r),a=e.model.getIsFilled(r[t],r[o],r,n);s.classed("unfilled",!a).style("fill",(r=>a||n?e.model.getFillColor(r[t],r[o],r):null))}null==(o=e.services.events)||o.dispatchEvent(R.Scatter.SCATTER_MOUSEOUT,{event:n,element:s,datum:r}),null==(a=e.services.events)||a.dispatchEvent(R.Tooltip.HIDE,{hoveredElement:s})}))}destroy(){var e;null==(e=this.parent)||e.selectAll("circle").on("mousemove",null).on("mouseout",null);const{events:t}=this.services;if(!t)throw new Error("Services events undefined");t.removeEventListener(R.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(R.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),t.removeEventListener(R.Chart.MOUSEOVER,this.handleChartHolderOnHover),t.removeEventListener(R.Chart.MOUSEOUT,this.handleChartHolderOnMouseOut)}}class Ow extends _y{constructor(e,t,n){super(e,t,n),this.type="axes",this.renderType=L.SVG,this.truncation={[$.LEFT]:!1,[$.RIGHT]:!1,[$.TOP]:!1,[$.BOTTOM]:!1},n&&(this.configs=n),this.margins=this.configs.margins}render(e=!0){const{position:t}=this.configs,n=this.getOptions(),r=Um(n,"axes",t,"visible"),i=this.getComponentContainer(),{width:o,height:a}=Mv.getSVGElementSize(i,{useAttrs:!0}),s=Mv.appendOrSelect(i,`g.axis.${t}`);let l,c;if(t===$.BOTTOM||t===$.TOP?(l=this.configs.axes[$.LEFT]?this.margins.left:0,c=this.configs.axes[$.RIGHT]?o-this.margins.right:o):(l=a-this.margins.bottom,c=this.margins.top),!this.services.cartesianScales)throw new Error("Services cartesianScales undefined");const u=this.services.cartesianScales.getScaleByPosition(t);let d;switch(this.scaleType===F.LABELS||this.scaleType===F.LABELS_RATIO?u.rangeRound([l,c]):u.range([l,c]),t){case $.LEFT:d=He;break;case $.BOTTOM:d=Ue;break;case $.RIGHT:d=Fe;break;case $.TOP:d=je}s.attr("aria-label",`${t} axis`);const h=!s.select("g.ticks").empty();let f=Mv.appendOrSelect(s,"g.ticks");h||(f.attr("role",`${kg.GRAPHICS_OBJECT} ${kg.GROUP}`),f.attr("aria-label",`${t} ticks`));const p=Mv.appendOrSelect(s,"g.ticks.invisible").style("opacity","0").style("pointer-events","none").attr("aria-hidden",!0).attr("aria-label",`invisible ${t} ticks`),m=Um(n,"axes",t),g=this.scaleType===F.TIME||m.scaleType===F.TIME,v=t===$.LEFT||t===$.RIGHT,y=this.model.get("zoomDomain");if(y&&g&&!v&&u.domain(y),!r)return void f.attr("aria-hidden",!0);const b=Um(m,"scaleType"),w=Um(n,"data","loading"),_=Um(m,"ticks","number"),E=Um(m,"ticks","values"),x=Um(m,"truncation","type"),S=Um(m,"truncation","threshold"),T=Um(m,"truncation","numCharacter"),O=null!==_,A=Um(n,"timeScale"),C=Mv.appendOrSelect(p,"g.tick"),k=Mv.appendOrSelect(C,"text").text("0"),M=Mv.getSVGElementSize(k.node(),{useBBox:!0}).height;C.remove();const N=this.scaleType||m.scaleType||F.LINEAR,D=d(u).tickSizeOuter(0);if(u.ticks){let e;if(O?e=_:(e=Fp,v&&(e=this.getNumberOfFittingTicks(a,M,Up))),1===u.ticks().length&&0===u.ticks()[0]&&(e=0),D.ticks(e),g)if(u.ticks(e).length){const r=Um(n,"timeScale","addSpaceOnEdges"),i=Um(n,"axes",t,"domain"),o=u.copy();r&&!i&&o.nice(e);const a=o.ticks(e);r&&a.length>2&&!i&&(a.splice(a.length-1,1),a.splice(0,1)),D.tickValues(a)}else D.tickValues([])}let R;const L=Um(m,"ticks","formatter");if(g){const e=Tg(D.tickValues(),Um(n,"timeScale","timeInterval"));R=null===L?(t,n)=>xg(t,n,D.tickValues(),e,A):(t,n)=>{const r=xg(t,n,D.tickValues(),e,A);return L(t,n,r)}}else null===L?N===F.LINEAR&&(R=e=>e.toLocaleString()):R=L;D.tickFormat(R);const[P,I]=this.services.cartesianScales.getScaleByPosition(t).domain();let z;if(E){if(g)E.forEach(((e,t)=>{void 0===e.getTime&&(E[t]=new Date(e))})),z=E.filter((e=>{const t=e.getTime();return t>=new Date(P).getTime()&&t<=new Date(I).getTime()}));else if(b===F.LABELS){const e=this.services.cartesianScales.getScaleByPosition(t).domain();z=E.filter((t=>e.includes(t)))}else z=E.filter((e=>e>=P&&e<=I));D.tickValues(z)}switch(t){case $.LEFT:f.attr("transform",`translate(${this.margins.left}, 0)`);break;case $.BOTTOM:f.attr("transform",`translate(0, ${a-this.margins.bottom})`);break;case $.RIGHT:f.attr("transform",`translate(${o-this.margins.right}, 0)`);break;case $.TOP:f.attr("transform",`translate(0, ${this.margins.top})`)}const j=this.model.isDataEmpty();if(m.title){const e=Mv.appendOrSelect(s,"text.axis-title").html(j||w?"":gb(m.title)),n=Um(m,"titleOrientation");let r;switch(t){case $.LEFT:n===ee.RIGHT?e.attr("transform","rotate(90)").attr("y",0).attr("x",u.range()[0]/2).attr("dy","-0.5em").style("text-anchor","middle"):e.attr("transform","rotate(-90)").attr("y",0).attr("x",-u.range()[0]/2).attr("dy","0.75em").style("text-anchor","middle");break;case $.BOTTOM:e.attr("transform",`translate(${this.margins.left/2+u.range()[1]/2}, ${a+4})`).style("text-anchor","middle");break;case $.RIGHT:n===ee.LEFT?e.attr("transform","rotate(-90)").attr("y",o).attr("x",-u.range()[0]/2).style("text-anchor","middle"):e.attr("transform","rotate(90)").attr("y",-o).attr("x",u.range()[0]/2).attr("dy","0.75em").style("text-anchor","middle");break;case $.TOP:r=Mv.getSVGElementSize(e,{useBBox:!0}).height,e.attr("transform",`translate(${this.margins.left/2+u.range()[1]/2}, ${r/2})`).style("text-anchor","middle")}}if(g){const t=Tg(D.tickValues(),Um(n,"timeScale","timeInterval")),r=A.showDayName,i=f;e&&(f=f.transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"axis-update",animate:e})))),f=f.call(D),i.selectAll(".tick").data(D.tickValues(),u).order().select("text").style("font-weight",((e,n)=>Eg(e,n,D.tickValues(),t,r)?"bold":"normal"))}else f=e&&h?f.transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"axis-update",animate:e}))).call(D):f.call(D);if(p.call(D),t===$.BOTTOM||t===$.TOP){let e=!1;const n=Um(m,"ticks","rotation");if(n===X.ALWAYS)e=!0;else if(n===X.NEVER)e=!1;else if(!n||n===X.AUTO)if(u.step)e=p.selectAll("g.tick text").nodes().some((e=>Mv.getSVGElementSize(e,{useBBox:!0}).width>=u.step()));else{e=!1;const t=p.append("text").text("A"),n=Mv.getSVGElementSize(t.node(),{useBBox:!0}).width;let r;p.selectAll("g.tick").each((function(){const t=sn(this),i=parseFloat(Um(Bm(this),"tx"));null!==i&&r+t.text().length*n*.8>=i&&(e=!0),r=i})),t.remove()}e?(O||(D.ticks(this.getNumberOfFittingTicks(o,M,Hp)),p.call(D),f.call(D)),s.selectAll("g.ticks g.tick text").attr("transform","rotate(-45)").attr("text-anchor",t===$.TOP?"start":"end")):s.selectAll("g.ticks g.tick text").attr("transform",null).attr("text-anchor",null)}if(w?s.attr("opacity",0):s.attr("opacity",1),f.selectAll("g.tick").attr("aria-label",(e=>e)),p.selectAll("g.tick").attr("aria-label",(e=>e)),x!==B.NONE&&b===F.LABELS&&!E){const e=this.services.cartesianScales.getScaleDomain(t);if(e.length>0){const n=i.select(`g.axis.${t} g.ticks g.tick`).html();s.selectAll("g.ticks g.tick").html(n);const r=this;s.selectAll("g.tick text").data(e).text((function(e){return e.length>S?(r.truncation[t]=!0,jm(e,x,T)):e})),this.getInvisibleAxisRef().selectAll("g.tick text").data(e).text((function(e){return e.length>S?jm(e,x,T):e})),s.selectAll("g.ticks").html(this.getInvisibleAxisRef().html()),s.selectAll("g.tick text").data(e)}}this.addEventListeners()}addEventListeners(){const e=this.getComponentContainer(),{position:t}=this.configs,n=Mv.appendOrSelect(e,`g.axis.${t}`),r=this.getOptions(),i=Um(r,"axes",t),o=Um(i,"scaleType"),a=Um(i,"truncation","threshold"),s=this;n.selectAll("g.tick text").on("mouseover",(function(e,t){s.services.events.dispatchEvent(R.Axis.LABEL_MOUSEOVER,{event:e,element:sn(this),datum:t}),o===F.LABELS&&t.length>a&&s.services.events.dispatchEvent(R.Tooltip.SHOW,{event:e,hoveredElement:sn(this),content:t})})).on("mousemove",(function(e,t){s.services.events.dispatchEvent(R.Axis.LABEL_MOUSEMOVE,{event:e,element:sn(this),datum:t}),o===F.LABELS&&t.length>a&&s.services.events.dispatchEvent(R.Tooltip.MOVE,{event:e})})).on("click",(function(e,t){s.services.events.dispatchEvent(R.Axis.LABEL_CLICK,{event:e,element:sn(this),datum:t})})).on("mouseout",(function(e,t){s.services.events.dispatchEvent(R.Axis.LABEL_MOUSEOUT,{event:e,element:sn(this),datum:t}),o===F.LABELS&&s.services.events.dispatchEvent(R.Tooltip.HIDE)}))}getInvisibleAxisRef(){const{position:e}=this.configs;return this.getComponentContainer().select(`g.axis.${e} g.ticks.invisible`)}getTitleRef(){const{position:e}=this.configs;return this.getComponentContainer().select(`g.axis.${e} text.axis-title`)}getNumberOfFittingTicks(e,t,n){return function(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=Wg(n))==n?n:0),void 0!==t&&(t=(t=Wg(t))==t?t:0),function(e,t,n){return e==e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e}(Wg(e),t,n)}(Math.floor(e/(t*n)),2,Fp)}destroy(){const e=this.getComponentContainer(),{position:t}=this.configs;Mv.appendOrSelect(e,`g.axis.${t}`).selectAll("g.tick text").on("mouseover",null).on("mousemove",null).on("mouseout",null)}}class Aw extends Ow{constructor(e,t,n){super(e,t,n)}render(e=!0){super.render(e),super.destroy();const t=this.configs.position,n=this.getComponentContainer(),r=Mv.appendOrSelect(n,`g.axis.${t}`),i=this;r.selectAll("g.tick").each((function(e,n){const r=sn(this);r.classed("tick-hover",!0).attr("tabindex",0===n?0:-1);const o=r.select("text"),{width:a,height:s}=Mv.getSVGElementSize(o,{useBBox:!0}),l=Mv.appendOrSelect(r,"rect.axis-holder");let c=0,u=0;switch(t){case $.LEFT:c=-a+Number(o.attr("x")),u=-s/2;break;case $.RIGHT:c=Math.abs(Number(o.attr("x"))),u=-s/2;break;case $.TOP:c=-a/2,u=-s+Number(o.attr("y"))/2,i.truncation[t]&&(c=0,l.attr("transform","rotate(-45)"));break;case $.BOTTOM:c=-a/2,u=s/2-2,i.truncation[t]&&(c=-a,l.attr("transform","rotate(-45)"))}l.attr("x",c-Zp).attr("y",u).attr("width",a+2*Zp).attr("height",s).lower()})),this.addEventListeners()}addEventListeners(){const e=this.getComponentContainer(),{position:t}=this.configs,n=Mv.appendOrSelect(e,`g.axis.${t}`),r=this.getOptions(),i=Um(r,"axes",t),o=Um(i,"scaleType"),a=Um(i,"truncation","threshold"),s=this;n.selectAll("g.tick.tick-hover").on("mouseover",(function(e){const t=sn(this).select("text"),n=t.datum();s.services.events.dispatchEvent(R.Axis.LABEL_MOUSEOVER,{event:e,element:t,datum:n}),o===F.LABELS&&n.length>a&&s.services.events.dispatchEvent(R.Tooltip.SHOW,{event:e,element:t,datum:n})})).on("mousemove",(function(e){const t=sn(this).select("text"),n=t.datum();s.services.events.dispatchEvent(R.Axis.LABEL_MOUSEMOVE,{event:e,element:t,datum:n}),s.services.events.dispatchEvent(R.Tooltip.MOVE,{event:e})})).on("click",(function(e){s.services.events.dispatchEvent(R.Axis.LABEL_CLICK,{event:e,element:sn(this).select("text"),datum:sn(this).select("text").datum()})})).on("mouseout",(function(e){s.services.events.dispatchEvent(R.Axis.LABEL_MOUSEOUT,{event:e,element:sn(this).select("text"),datum:sn(this).select("text").datum()}),o===F.LABELS&&s.services.events.dispatchEvent(R.Tooltip.HIDE)})).on("focus",(function(e){const t={clientX:0,clientY:0};if(e.target){e.target.focus();const n=e.target.getBoundingClientRect();t.clientX=n.x,t.clientY=n.y}s.services.events.dispatchEvent(R.Axis.LABEL_FOCUS,{event:{...e,...t},element:sn(this),datum:sn(this).select("text").datum()})})).on("blur",(function(e){s.services.events.dispatchEvent(R.Axis.LABEL_BLUR,{event:e,element:sn(this),datum:sn(this).select("text").datum()})})).on("keydown",(function(e){e.key&&"Escape"===e.key&&(s.services.events.dispatchEvent(R.Tooltip.HIDE),s.services.events.dispatchEvent(R.Axis.LABEL_BLUR,{event:e,element:sn(this),datum:sn(this).select("text").datum()})),t===$.LEFT||t===$.RIGHT?e.key&&"ArrowUp"===e.key?s.goNext(this,e):e.key&&"ArrowDown"===e.key&&s.goPrevious(this,e):e.key&&"ArrowLeft"===e.key?s.goPrevious(this,e):e.key&&"ArrowRight"===e.key&&s.goNext(this,e)}))}goNext(e,t){e.nextElementSibling&&"path"!==e.nextElementSibling.tagName&&e.nextElementSibling.dispatchEvent(new Event("focus")),t.preventDefault()}goPrevious(e,t){e.previousElementSibling&&"path"!==e.previousElementSibling.tagName&&e.previousElementSibling.dispatchEvent(new Event("focus")),t.preventDefault()}destroy(){const e=this.getComponentContainer(),{position:t}=this.configs;Mv.appendOrSelect(e,`g.axis.${t}`).selectAll("g.tick.tick-hover").on("mouseover",null).on("mousemove",null).on("mouseout",null).on("focus",null).on("blur",null)}}class Cw extends _y{constructor(){super(...arguments),this.type="2D-axes",this.renderType=L.SVG,this.children={},this.thresholds=[],this.margins={top:0,right:0,bottom:0,left:0}}render(e=!1){const t={},n=Object.keys($),r=Um(this.getOptions(),"axes");n.forEach((e=>{r[$[e]]&&(t[$[e]]=!0)})),this.configs.axes=t,n.forEach((e=>{const t=$[e];if(this.configs.axes[t]&&!this.children[t]){const e={position:t,axes:this.configs.axes,margins:this.margins},n=this.model.axisFlavor===re.DEFAULT?new Ow(this.model,this.services,e):new Aw(this.model,this.services,e);n.setModel(this.model),n.setServices(this.services),n.setParent(this.parent),this.children[t]=n}})),Object.keys(this.children).forEach((t=>{this.children[t].render(e)}));const i={};Object.keys(this.children).forEach((e=>{const t=this.children[e],n=t.configs.position,r=t.getInvisibleAxisRef(),{width:o,height:a}=Mv.getSVGElementSize(r,{useBBox:!0});let s;switch(t.getTitleRef().empty()?s=0:(s=Mv.getSVGElementSize(t.getTitleRef(),{useBBox:!0}).height,(n===$.LEFT||n===$.RIGHT)&&(s+=5)),n){case $.TOP:i.top=a+s;break;case $.BOTTOM:i.bottom=a+s;break;case $.LEFT:i.left=o+s;break;case $.RIGHT:i.right=o+s}})),this.services.events.dispatchEvent(R.Axis.RENDER_COMPLETE),Object.keys(i).some((e=>this.margins[e]!==i[e]))&&(this.margins=Object.assign(this.margins,i),this.model.set({axesMargins:this.margins},{skipUpdate:!0}),this.services.events.dispatchEvent(R.ZoomBar.UPDATE),Object.keys(this.children).forEach((e=>{this.children[e].margins=this.margins})),this.render(!0))}}class kw extends _y{constructor(){super(...arguments),this.type="skeleton"}render(e=!0){const t=Um(this.getOptions(),"data","loading");t?this.renderSkeleton(t):this.removeSkeleton()}renderSkeleton(e){if(this.configs.skeleton===Y.GRID)this.renderGridSkeleton(e);else if(this.configs.skeleton===Y.VERT_OR_HORIZ)this.renderVertOrHorizSkeleton(e);else if(this.configs.skeleton===Y.PIE)this.renderPieSkeleton(e);else{if(this.configs.skeleton!==Y.DONUT)throw new Error(`"${this.configs.skeleton}" is not a valid Skeleton type.`);this.renderDonutSkeleton(e)}}renderGridSkeleton(e){this.setScales(),this.drawBackdrop(e),this.drawXGrid(e),this.drawYGrid(e),e&&this.setShimmerEffect("shimmer-lines")}renderVertOrHorizSkeleton(e){const t=this.services.cartesianScales.getOrientation();this.setScales(),this.drawBackdrop(e),t===j.VERTICAL&&this.drawYGrid(e),t===j.HORIZONTAL&&this.drawXGrid(e),this.setShimmerEffect("shimmer-lines")}renderPieSkeleton(e){const t=this.computeOuterRadius();this.drawRing(t,0,e),e&&this.setShimmerEffect("shimmer-areas")}renderDonutSkeleton(e){const t=this.computeOuterRadius(),n=this.computeInnerRadius();this.drawRing(t,n,e),e&&this.setShimmerEffect("shimmer-areas")}setScales(){const e=this.services.cartesianScales.getMainXScale().range(),t=this.services.cartesianScales.getMainYScale().range();this.xScale=Uo().domain([0,1]).range(e),this.yScale=Uo().domain([0,1]).range(t)}drawBackdrop(e){const t=this.parent,{width:n,height:r}=Mv.getSVGElementSize(t,{useAttrs:!0});this.backdrop=Mv.appendOrSelect(t,"svg.chart-skeleton.DAII").attr("width",n).attr("height",r);const i=Mv.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop");i.attr("width","100%").attr("height","100%");const[o]=this.xScale.range(),[,a]=this.yScale.range();this.backdrop.merge(i).attr("x",o).attr("y",a),i.classed("shimmer-effect-lines",e).classed("empty-state-lines",!e).style("stroke",e?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}drawXGrid(e){const t=+this.backdrop.attr("width"),n=Um(this.getOptions(),"grid","x","numberOfTicks"),r=this.xScale.ticks(n).map((e=>e*t)),i=Mv.appendOrSelect(this.backdrop,"g.x.skeleton"),o=i.selectAll("line").data(r);o.enter().append("line").merge(o).attr("x1",(e=>e)).attr("x2",(e=>e)).attr("y1",0).attr("y2","100%"),i.selectAll("line").classed("shimmer-effect-lines",e).classed("empty-state-lines",!e).style("stroke",e?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}drawYGrid(e){const t=+this.backdrop.attr("height"),n=this.backdrop.attr("width"),r=Um(this.getOptions(),"grid","y","numberOfTicks"),i=this.xScale.ticks(r).map((e=>e*t)),o=Mv.appendOrSelect(this.backdrop,"g.y.skeleton"),a=o.selectAll("line").data(i);a.enter().append("line").merge(a).attr("x1",0).attr("x2",n).attr("y1",(e=>e)).attr("y2",(e=>e)),o.selectAll("line").classed("shimmer-effect-lines",e).classed("empty-state-lines",!e).style("stroke",e?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}drawRing(e,t,n=!0){const r=this.parent,{width:i,height:o}=Mv.getSVGElementSize(r,{useAttrs:!0}),a=Mv.appendOrSelect(r,"svg.chart-skeleton").attr("width",i).attr("height",o),s=0===t?"pie":"donut",l=Um(this.getOptions(),s,"alignment");Mv.appendOrSelect(a,"rect.chart-skeleton-area-container").attr("width",i).attr("height",o).attr("fill","none");const c=function(){var e=Sl,t=Tl,n=ul(0),r=null,i=Ol,o=Al,a=Cl,s=null,l=xl(c);function c(){var c,u,d=+e.apply(this,arguments),h=+t.apply(this,arguments),f=i.apply(this,arguments)-wl,p=o.apply(this,arguments)-wl,m=dl(p-f),g=p>f;if(s||(s=c=l()),h<d&&(u=h,h=d,d=u),h>yl)if(m>_l-yl)s.moveTo(h*fl(f),h*gl(f)),s.arc(0,0,h,f,p,!g),d>yl&&(s.moveTo(d*fl(p),d*gl(p)),s.arc(0,0,d,p,f,g));else{var v,y,b=f,w=p,_=f,E=p,x=m,S=m,T=a.apply(this,arguments)/2,O=T>yl&&(r?+r.apply(this,arguments):vl(d*d+h*h)),A=ml(dl(h-d)/2,+n.apply(this,arguments)),C=A,k=A;if(O>yl){var M=El(O/d*gl(T)),N=El(O/h*gl(T));(x-=2*M)>yl?(_+=M*=g?1:-1,E-=M):(x=0,_=E=(f+p)/2),(S-=2*N)>yl?(b+=N*=g?1:-1,w-=N):(S=0,b=w=(f+p)/2)}var D=h*fl(b),R=h*gl(b),L=d*fl(E),P=d*gl(E);if(A>yl){var I,$=h*fl(w),z=h*gl(w),B=d*fl(_),j=d*gl(_);if(m<bl)if(I=function(e,t,n,r,i,o,a,s){var l=n-e,c=r-t,u=a-i,d=s-o,h=d*l-u*c;if(!(h*h<yl))return[e+(h=(u*(t-o)-d*(e-i))/h)*l,t+h*c]}(D,R,B,j,$,z,L,P)){var F=D-I[0],U=R-I[1],H=$-I[0],V=z-I[1],Z=1/gl(function(e){return e>1?0:e<-1?bl:Math.acos(e)}((F*H+U*V)/(vl(F*F+U*U)*vl(H*H+V*V)))/2),W=vl(I[0]*I[0]+I[1]*I[1]);C=ml(A,(d-W)/(Z-1)),k=ml(A,(h-W)/(Z+1))}else C=k=0}S>yl?k>yl?(v=kl(B,j,D,R,h,k,g),y=kl($,z,L,P,h,k,g),s.moveTo(v.cx+v.x01,v.cy+v.y01),k<A?s.arc(v.cx,v.cy,k,hl(v.y01,v.x01),hl(y.y01,y.x01),!g):(s.arc(v.cx,v.cy,k,hl(v.y01,v.x01),hl(v.y11,v.x11),!g),s.arc(0,0,h,hl(v.cy+v.y11,v.cx+v.x11),hl(y.cy+y.y11,y.cx+y.x11),!g),s.arc(y.cx,y.cy,k,hl(y.y11,y.x11),hl(y.y01,y.x01),!g))):(s.moveTo(D,R),s.arc(0,0,h,b,w,!g)):s.moveTo(D,R),d>yl&&x>yl?C>yl?(v=kl(L,P,$,z,d,-C,g),y=kl(D,R,B,j,d,-C,g),s.lineTo(v.cx+v.x01,v.cy+v.y01),C<A?s.arc(v.cx,v.cy,C,hl(v.y01,v.x01),hl(y.y01,y.x01),!g):(s.arc(v.cx,v.cy,C,hl(v.y01,v.x01),hl(v.y11,v.x11),!g),s.arc(0,0,d,hl(v.cy+v.y11,v.cx+v.x11),hl(y.cy+y.y11,y.cx+y.x11),g),s.arc(y.cx,y.cy,C,hl(y.y11,y.x11),hl(y.y01,y.x01),!g))):s.arc(0,0,d,E,_,g):s.lineTo(L,P)}else s.moveTo(0,0);if(s.closePath(),c)return s=null,c+""||null}return c.centroid=function(){var n=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-bl/2;return[fl(r)*n,gl(r)*n]},c.innerRadius=function(t){return arguments.length?(e="function"==typeof t?t:ul(+t),c):e},c.outerRadius=function(e){return arguments.length?(t="function"==typeof e?e:ul(+e),c):t},c.cornerRadius=function(e){return arguments.length?(n="function"==typeof e?e:ul(+e),c):n},c.padRadius=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:ul(+e),c):r},c.startAngle=function(e){return arguments.length?(i="function"==typeof e?e:ul(+e),c):i},c.endAngle=function(e){return arguments.length?(o="function"==typeof e?e:ul(+e),c):o},c.padAngle=function(e){return arguments.length?(a="function"==typeof e?e:ul(+e),c):a},c.context=function(e){return arguments.length?(s=e??null,c):s},c}().innerRadius(t).outerRadius(e).startAngle(0).endAngle(2*Math.PI),u=e+Math.abs(-15),d=e+(Math.min(i,o)-2*e)/2,h=Mv.appendOrSelect(a,"path").attr("class","skeleton-area-shape").attr("transform",`translate(${u}, ${d})`).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=e+30;l===H.CENTER?f=i/2:l===H.RIGHT&&(f=i-e-30);const p=e+20;h.attr("transform",`translate(${f}, ${p})`)}computeOuterRadius(){const{width:e,height:t}=Mv.getSVGElementSize(this.parent,{useAttrs:!0});return Math.min(e,t)/2-15}computeInnerRadius(){return this.computeOuterRadius()*(3/4)}setShimmerEffect(e){const t="stop-bg-shimmer",n=this.parent.select(".chart-skeleton"),{width:r}=Mv.getSVGElementSize(this.parent,{useAttrs:!0}),i=r,o=Mv.appendOrSelect(n,"defs").lower(),a=Mv.appendOrSelect(o,"linearGradient").attr("id",this.services.domUtils.generateElementIDString(e)).attr("class",e).attr("x1",0-3*.2*r).attr("x2",i).attr("y1",0).attr("y2",0).attr("gradientUnits","userSpaceOnUse").attr("gradientTransform","translate(0, 0)"),s=`\n\t\t\t<stop class="${t}" offset="0"></stop>\n\t\t\t<stop class="stop-shimmer" offset="0.2"></stop>\n\t\t\t<stop class="${t}" offset="0.4"></stop>\n\t\t`;a.html(s),function e(){a.attr("gradientTransform",`translate(${0-3*.2*r}, 0)`).transition().duration(2e3).delay(1e3).ease(ui).attr("gradientTransform",`translate(${i+3*.2*r}, 0)`).on("end",e)}()}removeSkeleton(){this.parent.select(".chart-skeleton").remove()}}class Mw extends _y{constructor(){super(...arguments),this.type="zero-line",this.renderType=L.SVG}render(e){const t=this.services.cartesianScales.getRangeAxisPosition({groups:this.configs.groups}),n=this.services.cartesianScales.getScaleByPosition(t),[r,i]=n.domain(),o=r>0&&i<0||r<0&&i>0,a=this.getComponentContainer();if(!o)return void a.selectAll("line.domain").remove();const[s,l]=this.services.cartesianScales.getDomainScale().range();let c=+n(0)+.5;c||(c=n.range()[0]);const u=Hm({x0:s,x1:l,y0:c,y1:c},this.services.cartesianScales.getOrientation());Mv.appendOrSelect(a,"line.domain").transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"zero-line-update",animate:e}))).attr("y1",u.y0).attr("y2",u.y1).attr("x1",u.x0).attr("x2",u.x1)}}class Nw extends kw{constructor(){super(...arguments),this.type="skeleton-lines"}render(e=!0){const t=Um(this.getOptions(),"data","loading"),n=!(Um(this.getOptions(),"grid","x","enabled")||Um(this.getOptions(),"grid","y","enabled")||Um(this.getOptions(),"axes","bottom","visible")||Um(this.getOptions(),"axes","left","visible"));t&&!n?super.renderGridSkeleton(t):t&&n?this.renderSparklineSkeleton(t):this.removeSkeleton()}renderSparklineSkeleton(e){this.setScales(),this.drawBackdrop(e),this.drawSparkline(e),this.updateBackdropStyle(),e&&this.setShimmerEffect("shimmer-lines")}drawSparkline(e){const t=this.backdrop.attr("width"),n=Mv.appendOrSelect(this.backdrop,"g.y.skeleton"),r=n.selectAll("line").data([100]);r.enter().append("line").merge(r).attr("x1",0).attr("x2",t).attr("y1",(e=>e)).attr("y2",(e=>e)),n.selectAll("line").classed("shimmer-effect-lines",e).classed("empty-state-lines",!e).style("stroke",e?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}updateBackdropStyle(){const e=this.parent;this.backdrop=Mv.appendOrSelect(e,"svg.chart-skeleton.DAII"),Mv.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop").classed("shimmer-effect-lines",!1).classed("shimmer-effect-sparkline",!0).style("stroke",null)}}function Dw(e){return null!=e&&e.length?sh(e,1):[]}class Rw extends kv{zoomIn(e,t,n){let r,i,o;const a=n||Wp;e&&(r=e.x,i=e.y,o=2);const{width:s,height:l}=Mv.getSVGElementSize(this.services.domUtils.getHolder(),{useClientDimensions:!0});t.transition().duration(a.duration).ease(a.ease).attr("transform",`translate(${s/2}, ${l/2}) scale(${o}) translate(${-r},${-i})`),this.services.events.dispatchEvent(R.CanvasZoom.CANVAS_ZOOM_IN,{element:sn(e)})}zoomOut(e,t){const n=t||Wp;e.transition().duration(n.duration).ease(n.ease).attr("transform",""),this.services.events.dispatchEvent(R.CanvasZoom.CANVAS_ZOOM_OUT)}}class Lw extends kv{init(){this.documentFragment=document.createDocumentFragment()}addEventListener(e,t){this.documentFragment.addEventListener(e,t)}removeEventListener(e,t){this.documentFragment.removeEventListener(e,t)}dispatchEvent(e,t){let n;t?n=new CustomEvent(e,{detail:t}):(n=document.createEvent("Event"),n.initEvent(e,!1,!0)),this.documentFragment.dispatchEvent(n)}}class Pw extends kv{constructor(e,t){super(e,t)}downloadCSV(e,t){const n=document.createElement("a"),r="text/csv;encoding:utf-8";if(navigator.msSaveBlob)navigator.msSaveBlob(new Blob([e],{type:r}),t);else if(URL&&"download"in n){const i=URL.createObjectURL(new Blob([e],{type:r}));n.href=i,n.setAttribute("download",t),document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(i)}else location.href=`data:application/octet-stream,${encodeURIComponent(e)}`}downloadImage(e,t){const n=document.createElement("a");n.download=t,n.href=e,document.body.appendChild(n),n.click(),document.body.removeChild(n)}}class Iw extends kv{constructor(){super(...arguments),this.pendingTransitions={}}init(){var e;null==(e=this.services.events)||e.addEventListener(R.Model.UPDATE,(()=>{this.pendingTransitions={}}))}setupTransition({transition:e,name:t,animate:n}){return this.pendingTransitions[e._id]=e,e.on("end interrupt cancel",(()=>{delete this.pendingTransitions[e._id]})),!1===this.model.getOptions().animations||!1===n?e.duration(0):e.duration(Um(em,t,"duration")||em.default.duration)}getPendingTransitions(){return this.pendingTransitions}}function $w(e,t){const n=Ic(e),r=Ic(t),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}function zw(e,t){const n=Ic(e);if(isNaN(t))return Qm(e,NaN);if(!t)return n;const r=n.getDate(),i=Qm(e,n.getTime());return i.setMonth(n.getMonth()+t+1,0),r>=i.getDate()?i:(n.setFullYear(i.getFullYear(),i.getMonth(),r),n)}function Bw(e,t){return zw(e,12*t)}function jw(e,t){return Bw(e,-t)}function Fw(e,t){const n=Ic(e),r=Ic(t),i=$w(n,r),o=Math.abs(function(e,t){const n=Ic(e),r=Ic(t);return 12*(n.getFullYear()-r.getFullYear())+(n.getMonth()-r.getMonth())}(n,r));let a;if(o<1)a=0;else{1===n.getMonth()&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-i*o);let t=$w(n,r)===-i;(function(e){const t=Ic(e);return+function(e){const t=Ic(e);return t.setHours(23,59,59,999),t}(t)==+function(e){const t=Ic(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}(t)})(Ic(e))&&1===o&&1===$w(e,r)&&(t=!1),a=i*(o-Number(t))}return 0===a?0:a}function Uw(e,t){return zw(e,-t)}function Hw(e,t){const n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function Vw(e,t){const n=Ic(e);return isNaN(t)?Qm(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function Zw(e,t){return Vw(e,-t)}function Ww(e,t){return Ic(e).getTime()-Ic(t).getTime()}function Gw(e){return e?Math[e]:Math.trunc}function qw(e,t){return Qm(e,+Ic(e)+t)}function Yw(e,t){return qw(e,t*qm)}function Kw(e,t){return Yw(e,-t)}function Xw(e,t,n){const r=Ww(e,t)/Gm;return Gw(null==n?void 0:n.roundingMethod)(r)}function Qw(e,t){return qw(e,t*Gm)}function Jw(e,t){return Qw(e,-t)}function e_(e,t,n){const r=Ww(e,t)/1e3;return Gw(null==n?void 0:n.roundingMethod)(r)}function t_(e,t){return qw(e,1e3*t)}function n_(e,t){return t_(e,-t)}class r_ extends kv{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:e=null}={}){if(this.dualAxes&&e){const t=this.model.getOptions(),{groupMapsTo:n}=t.data,r=Um(t,"axes",this.secondaryDomainAxisPosition),i=e[n];if(null!=r&&r.correspondingDatasets&&r.correspondingDatasets.includes(i))return this.secondaryDomainAxisPosition}return this.domainAxisPosition}getRangeAxisPosition({datum:e=null,groups:t=null}={}){if(this.dualAxes){const n=this.model.getOptions(),{groupMapsTo:r}=n.data,i=Um(n,"axes",this.secondaryRangeAxisPosition);let o;if(null!==e?o=e[r]:t&&t.length>0&&(o=t[0]),null!=i&&i.correspondingDatasets&&i.correspondingDatasets.includes(o))return this.secondaryRangeAxisPosition}return this.rangeAxisPosition}getAxisOptions(e){return Um(this.model.getOptions(),"axes",e)}getDomainAxisOptions(){const e=this.getDomainAxisPosition();return this.getAxisOptions(e)}getRangeAxisOptions(){const e=this.getRangeAxisPosition();return this.getAxisOptions(e)}getScaleLabel(e){return this.getAxisOptions(e).title||(e===$.BOTTOM||e===$.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($).map((e=>$[e])).forEach((e=>{this.scales[e]=this.createScale(e)}))}findDomainAndRangeAxes(){const e=this.findVerticalAxesPositions(),t=this.findHorizontalAxesPositions(),n=this.findDomainAndRangeAxesPositions(e,t);this.domainAxisPosition=n.primaryDomainAxisPosition,this.rangeAxisPosition=n.primaryRangeAxisPosition,this.isDualAxes()&&(this.secondaryDomainAxisPosition=n.secondaryDomainAxisPosition,this.secondaryRangeAxisPosition=n.secondaryRangeAxisPosition)}determineOrientation(){this.rangeAxisPosition!==$.LEFT&&this.rangeAxisPosition!==$.RIGHT||this.domainAxisPosition!==$.BOTTOM&&this.domainAxisPosition!==$.TOP?this.orientation=j.HORIZONTAL:this.orientation=j.VERTICAL}isDualAxes(){return this.dualAxes}determineAxisDuality(){var e,t,n,r;const i=this.model.getOptions(),o=Um(i,"axes");(null!=(e=o[$.LEFT])&&e.correspondingDatasets&&o[$.RIGHT]||null!=(t=o[$.RIGHT])&&t.correspondingDatasets&&o[$.LEFT]||null!=(n=o[$.TOP])&&n.correspondingDatasets&&o[$.BOTTOM]||null!=(r=o[$.BOTTOM])&&r.correspondingDatasets&&o[$.TOP])&&(this.dualAxes=!0)}getCustomDomainValuesByposition(e){const t=Um(this.model.getOptions(),"axes",e,"domain");if(t&&!Array.isArray(t))throw new Error(`Domain in ${e} axis is not a valid array`);if(Array.isArray(t)&&(this.scaleTypes[e]===F.LINEAR||this.scaleTypes[e]===F.TIME)&&2!==t.length)throw new Error(`There can only be 2 elements in domain for scale type: ${this.scaleTypes[e]}`);return t}getOrientation(){return this.orientation}getScaleByPosition(e){return this.scales[e]}getScaleTypeByPosition(e){return this.scaleTypes[e]}getDomainAxisScaleType(){const e=this.getDomainAxisPosition();return this.getScaleTypeByPosition(e)}getRangeAxisScaleType(){const e=this.getRangeAxisPosition();return this.getScaleTypeByPosition(e)}getDomainScale(){return this.scales[this.domainAxisPosition]}getRangeScale(){return this.scales[this.rangeAxisPosition]}getMainXAxisPosition(){const e=[$.BOTTOM,$.TOP];return[this.domainAxisPosition,this.rangeAxisPosition].find((t=>e.indexOf(t)>-1))}getMainYAxisPosition(){const e=[$.LEFT,$.RIGHT];return[this.domainAxisPosition,this.rangeAxisPosition].find((t=>e.indexOf(t)>-1))}getMainXScale(){return this.scales[this.getMainXAxisPosition()]}getMainYScale(){return this.scales[this.getMainYAxisPosition()]}getValueFromScale(e,t,n,r){const i=this.model.getOptions(),o=Um(i,"axes")[n],{mapsTo:a}=o,s=null!==Um(r,a)?r[a]:r;let l;switch(t){case F.LABELS:l=e(s)+e.step()/2;break;case F.TIME:l=e(new Date(s));break;default:l=e(s)}return l}getBoundedScaledValues(e){const{bounds:t}=this.model.getOptions(),n=this.getRangeAxisPosition({datum:e}),r=this.scales[n],i=this.model.getOptions(),o=Um(i,"axes")[n],{mapsTo:a}=o,s=void 0!==e[a]?e[a]:e;return[r(null!==Um(e,t.upperBoundMapsTo)?e[t.upperBoundMapsTo]:s),r(null!==Um(e,t.lowerBoundMapsTo)?e[t.lowerBoundMapsTo]:s)]}getValueThroughAxisPosition(e,t){const n=this.scaleTypes[e],r=this.scales[e];return this.getValueFromScale(r,n,e,t)}getDomainValue(e){const t=this.getDomainAxisPosition({datum:e});return this.getValueThroughAxisPosition(t,e)}getRangeValue(e){const t=this.getRangeAxisPosition({datum:e});return this.getValueThroughAxisPosition(t,e)}getMainXScaleType(){return this.getScaleTypeByPosition(this.getMainXAxisPosition())}getMainYScaleType(){return this.getScaleTypeByPosition(this.getMainYAxisPosition())}getDomainIdentifier(e){const t=this.model.getOptions();return Um(t,"axes",this.getDomainAxisPosition({datum:e}),"mapsTo")}getRangeIdentifier(e){const t=this.model.getOptions();return Um(t,"axes",this.getRangeAxisPosition({datum:e}),"mapsTo")}extendsDomain(e,t){const n=this.model.getOptions(),r=Um(n,"axes",e);return r.scaleType===F.TIME?function(e,t){const n=new Date(e[0]),r=new Date(e[1]);return function(e,t){const n=Ic(e),r=Ic(t),i=$w(n,r),o=Math.abs(function(e,t){const n=Ic(e),r=Ic(t);return n.getFullYear()-r.getFullYear()}(n,r));n.setFullYear(1584),r.setFullYear(1584);const a=i*(o-+($w(n,r)===-i));return 0===a?0:a}(r,n)>1?[jw(n,t),Bw(r,t)]:Fw(r,n)>1?[Uw(n,t),zw(r,t)]:function(e,t){const n=Ic(e),r=Ic(t),i=Hw(n,r),o=Math.abs(Xm(n,r));n.setDate(n.getDate()-i*o);const a=i*(o-+(Hw(n,r)===-i));return 0===a?0:a}(r,n)>1?[Zw(n,t),Vw(r,t)]:function(e,t,n){const r=Ww(e,t)/qm;return Gw(void 0)(r)}(r,n)>1?[Kw(n,t),Yw(r,t)]:Xw(r,n)>30?[Jw(n,30*t),Qw(r,30*t)]:Xw(r,n)>1?[Jw(n,t),Qw(r,t)]:e_(r,n)>15?[n_(n,15*t),t_(r,15*t)]:e_(r,n)>1?[n_(n,t),t_(r,t)]:[n,r]}(t,Um(n,"timeScale","addSpaceOnEdges")):function([e,t],n,r){const i=(t-e)*n,o=t<=0&&t+i>0?0:t+i;let a=e>=0&&e-i<0?0:e-i;if(r===F.LOG&&a<=0){if(e<=0)throw Error("Data must have values greater than 0 if log scale type is used.");a=e}return[a,o]}(t,.1,r.scaleType)}findVerticalAxesPositions(){const e=this.model.getOptions(),t=Um(e,"axes"),n=this.isDualAxes();return null===Um(t,$.LEFT)&&null!==Um(t,$.RIGHT)||!0===Um(t,$.RIGHT,"main")||n&&Um(t,$.LEFT,"correspondingDatasets")?{primary:$.RIGHT,secondary:$.LEFT}:{primary:$.LEFT,secondary:$.RIGHT}}findHorizontalAxesPositions(){const e=this.model.getOptions(),t=Um(e,"axes"),n=this.isDualAxes();return null===Um(t,$.BOTTOM)&&null!==Um(t,$.TOP)||!0===Um(t,$.TOP,"main")||n&&Um(t,$.BOTTOM,"correspondingDatasets")?{primary:$.TOP,secondary:$.BOTTOM}:{primary:$.BOTTOM,secondary:$.TOP}}findDomainAndRangeAxesPositions(e,t){const n=this.model.getOptions(),r=Um(n,"axes",e.primary),i=Um(n,"axes",t.primary),o=r.scaleType||F.LINEAR,a=i.scaleType||F.LINEAR,s={primaryDomainAxisPosition:null,secondaryDomainAxisPosition:null,primaryRangeAxisPosition:null,secondaryRangeAxisPosition:null};return s.primaryDomainAxisPosition=t.primary,s.primaryRangeAxisPosition=e.primary,s.secondaryDomainAxisPosition=t.secondary,s.secondaryRangeAxisPosition=e.secondary,(!(a===F.LABELS||a===F.TIME)&&o===F.LABELS||o===F.TIME)&&(s.primaryDomainAxisPosition=e.primary,s.primaryRangeAxisPosition=t.primary,s.secondaryDomainAxisPosition=e.secondary,s.secondaryRangeAxisPosition=t.secondary),s}getScaleDomain(e){const t=this.model.getOptions(),n=Um(t,"axes",e),r=Um(t,"bounds"),{includeZero:i}=n,o=Um(n,"scaleType")||F.LINEAR;if(this.model.isDataEmpty())return[];if(n.binned){const{bins:e}=this.model.getBinConfigurations();return[0,Ae(e,(e=>e.length))]}if(n.limitDomainToBins){const{bins:e}=this.model.getBinConfigurations(),t=this.model.getStackKeys({bins:e});return[t[0].split(":")[0],t[t.length-1].split(":")[1]]}const a=this.model.getDisplayData(),{extendLinearDomainBy:s,mapsTo:l,percentage:c,thresholds:u}=n,{reference:d,compareTo:h}=Vp;if(n.domain)return o===F.LABELS?n.domain:(o===F.TIME&&(n.domain=n.domain.map((e=>void 0===e.getTime?new Date(e):e))),this.extendsDomain(e,n.domain));if(c)return[0,100];if(n&&o===F.LABELS)return Bp(a.map((e=>e[l])));let f,p;const m=this.model.getDataGroupNames();if(o===F.LABELS_RATIO)return a.map((e=>`${e[d]}/${e[h]}`));if(o===F.TIME)p=a.map((e=>+new Date(e[l])));else if(r&&t.axes)p=[],a.forEach((e=>{p.push(e[l]),e[r.upperBoundMapsTo]&&p.push(e[r.upperBoundMapsTo]),e[r.lowerBoundMapsTo]&&p.push(e[r.lowerBoundMapsTo])}));else if(!0===n.stacked&&m&&e===this.getRangeAxisPosition()){const{groupMapsTo:e}=t.data,n=this.model.getDataValuesGroupedByKeys({groups:m}),r=a.filter((t=>!m.includes(t[e]))),i=[];n.forEach((e=>{const{...t}=e;let n=0,r=0;Object.values(t).forEach((e=>{isNaN(e)||(e<0?r+=e:n+=e)})),i.push([r,n])})),p=[...Dw(i),...r.map((e=>e[l]))]}else p=[],a.forEach((e=>{const t=e[l];Array.isArray(t)&&2===t.length?(p.push(t[0]),p.push(t[1])):(s&&p.push(Math.max(e[l],e[s])),p.push(t))}));return o!==F.TIME&&o!==F.LOG&&i&&p.push(0),u&&u.length>0&&u.forEach((e=>{const t=Um(e,"value");null!==t&&p.push(t)})),f=de(p),f=this.extendsDomain(e,f),f}createScale(e){const t=this.model.getOptions(),n=Um(t,"axes",e);if(!n)return null;const r=Um(n,"scaleType")||F.LINEAR;let i;return this.scaleTypes[e]=r,i=r===F.TIME?cl():r===F.LOG?Ko().base(n.base||10):r===F.LABELS||r===F.LABELS_RATIO?No():Uo(),i.domain(this.getScaleDomain(e)),i}getHighestDomainThreshold(){const e=Um(this.model.getOptions(),"axes"),t=this.getDomainAxisPosition(),{thresholds:n}=e[t];if(!Array.isArray(n)||Array.isArray(n)&&!n.length)return null;const r=this.getDomainScale(),i=n.sort(((e,t)=>t.value-e.value))[0];return this.getScaleTypeByPosition(t)===F.TIME&&("string"==typeof i.value||void 0===i.value.getTime)&&(i.value=new Date(i.value)),{threshold:i,scaleValue:r(i.value)}}getHighestRangeThreshold(){const e=Um(this.model.getOptions(),"axes"),t=this.getRangeAxisPosition(),{thresholds:n}=e[t];if(!Array.isArray(n)||Array.isArray(n)&&!n.length)return null;const r=this.getRangeScale(),i=n.sort(((e,t)=>t.value-e.value))[0];return{threshold:i,scaleValue:r(i.value)}}}class i_ extends kv{constructor(){super(...arguments),this.curveTypes={curveLinear:Dl,curveLinearClosed:cc,curveBasis:Fl,curveBasisClosed:Hl,curveBasisOpen:Zl,curveBundle:Gl,curveCardinal:Kl,curveCardinalClosed:Ql,curveCardinalOpen:ec,curveCatmullRom:rc,curveCatmullRomClosed:oc,curveCatmullRomOpen:sc,curveMonotoneX:vc,curveMonotoneY:yc,curveNatural:_c,curveStep:xc,curveStepAfter:Tc,curveStepBefore:Sc}}getD3Curve(){let e="curveLinear";const t=this.model.getOptions().curve;if(t&&(e="string"==typeof t?t:t.name),this.curveTypes[e]){let n=this.curveTypes[e];return t&&Object.keys(t).forEach((e=>{n[e]&&(n=n[e](t[e]))})),n}return console.warn(`The curve type '${e}' is invalid, using 'curveLinear' instead`),this.curveTypes.curveLinear}}class o_ extends kv{isZoomBarEnabled(){if(!this.services.cartesianScales||!Um(this.model.getOptions(),"zoomBar","top","enabled"))return!1;this.services.cartesianScales.findDomainAndRangeAxes();const e=this.services.cartesianScales.getMainXAxisPosition(),t=Um(this.model.getOptions(),"axes",e,"scaleType");return e===$.BOTTOM&&t===F.TIME}getZoomBarData(){const e=this.model.getZoomBarData();return e&&e.length>1?e:this.model.getDisplayData()}getDefaultZoomBarDomain(e){if(!this.services.zoom)throw new Error("Services zoom not defined");const t=e||this.services.zoom.getZoomBarData(),{cartesianScales:n}=this.services;if(!n)throw new Error("Services cartesianScales undefined");const r=n.getMainXAxisPosition(),i=n.getDomainIdentifier(),o=Um(this.model.getOptions(),"axes",r,"domain");if(Array.isArray(o)&&2===o.length)return o;if(!r)throw new Error("Not defined: mainXAxisPosition");return n.extendsDomain(r,de(t,(e=>e[i])))}handleDomainChange(e,t={dispatchEvent:!0}){var n;this.model.set({zoomDomain:e},{animate:!1}),t.dispatchEvent&&(null==(n=this.services.events)||n.dispatchEvent(R.ZoomDomain.CHANGE,{newDomain:e}))}getZoomRatio(){return Um(this.model.getOptions(),"zoomBar","zoomRatio")}filterDataForRangeAxis(e,t){var n;const r=this.model.get("zoomDomain"),i=Object.assign({stacked:!1},t),o=Um(this.model.getOptions(),"zoomBar","updateRangeAxis");if(this.isZoomBarEnabled()&&o&&r){const t=i.stacked?"sharedStackKey":null==(n=this.services.cartesianScales)?void 0:n.getDomainIdentifier(),o=e.filter((e=>new Date(e[t])>=r[0]&&new Date(e[t])<=r[1]));if(o.length>0)return o}return e}zoomIn(e=this.getZoomRatio()){var t;const n=this.model.get("zoomDomain"),r=tm.handleWidth,i=null==(t=this.services.cartesianScales)?void 0:t.getMainXScale().copy();i.domain(this.getDefaultZoomBarDomain());const o=i(n[0]),a=i(n[1]);if(a-o<r+1)return;const s=i.range(),l=a-o,c=Math.min((s[1]-s[0])/2*(e/2),l/2);let u=o+c,d=a-c;u>=d&&(u=o+l/2-r/2,d=a-l/2+r/2);const h=[i.invert(u),i.invert(d)];(n[0].valueOf()!==h[0].valueOf()||n[1].valueOf()!==h[1].valueOf())&&this.handleDomainChange(h)}zoomOut(e=this.getZoomRatio()){const t=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 r=n(t[0]),i=n(t[1]),o=n.range(),a=(o[1]-o[0])/2*(e/2),s=Math.max(r-a,o[0]),l=Math.min(i+a,o[1]),c=[n.invert(s),n.invert(l)];(t[0].valueOf()!==c[0].valueOf()||t[1].valueOf()!==c[1].valueOf())&&this.handleDomainChange(c)}resetZoomDomain(){const e=this.model.get("zoomDomain"),t=this.getDefaultZoomBarDomain();(e[0].valueOf()!==t[0].valueOf()||e[1].valueOf()!==t[1].valueOf())&&this.handleDomainChange(t)}isMinZoomDomain(){const e=this.model.get("zoomDomain"),t=this.getDefaultZoomBarDomain();return!(!e||!t)&&(e[1].valueOf()-e[0].valueOf())/(t[1].valueOf()-t[0].valueOf())<Um(this.model.getOptions(),"zoomBar","minZoomRatio")}isMaxZoomDomain(){const e=this.model.get("zoomDomain"),t=this.getDefaultZoomBarDomain();return!(!e||!t||e[0].valueOf()!==t[0].valueOf()||e[1].valueOf()!==t[1].valueOf())}isEmptyState(){return 0===this.getZoomBarData().length}isZoomBarLoading(e){return Um(this.model.getOptions(),"zoomBar",e,"loading")}isZoomBarLocked(e){return Um(this.model.getOptions(),"zoomBar",e,"locked")}}var a_=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function s_(e){return a_.test(e)}var l_="\\ud800-\\udfff",c_="["+l_+"]",u_="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",d_="\\ud83c[\\udffb-\\udfff]",h_="[^"+l_+"]",f_="(?:\\ud83c[\\udde6-\\uddff]){2}",p_="[\\ud800-\\udbff][\\udc00-\\udfff]",m_="(?:"+u_+"|"+d_+")?",g_="[\\ufe0e\\ufe0f]?",v_=g_+m_+"(?:\\u200d(?:"+[h_,f_,p_].join("|")+")"+g_+m_+")*",y_="(?:"+[h_+u_+"?",u_,f_,p_,c_].join("|")+")",b_=RegExp(d_+"(?="+d_+")|"+y_+v_,"g");var w_=function(e){var t=s_(e=Qd(e))?function(e){return s_(e)?function(e){return e.match(b_)||[]}(e):function(e){return e.split("")}(e)}(e):void 0,n=t?t[0]:e.charAt(0),r=t?function(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:function(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r<i;)o[r]=e[r+t];return o}(e,t,n)}(t,1).join(""):e.slice(1);return n.toUpperCase()+r};const __=w_;yy((function(e,t,n){return t=t.toLowerCase(),e+(n?function(e){return __(Qd(e).toLowerCase())}(t):t)}));class E_{constructor(e,t){this.components=[],this.services={canvasZoom:Rw,domUtils:Mv,events:Lw,files:Pw,gradientUtils:Nv,transitions:Iw},this.model=new $g(this.services)}init(e,t){this.model.set({holder:e},{skipUpdate:!0}),Object.keys(this.services).forEach((e=>{const t=this.services[e];this.services[e]=new t(this.model,this.services)})),this.services.events.addEventListener(R.Model.UPDATE,(e=>{const t=!!Um(e,"detail","animate");this.update(t)})),this.model.setData(t.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(e=!0){if(!this.components)return;Object.keys(this.services).forEach((e=>{this.services[e].update()})),this.components.forEach((t=>t.render(e)));const t=this.services.transitions.getPendingTransitions(),n=Object.keys(t).map((e=>t[e].end().catch((e=>e))));Promise.all(n).then((()=>this.services.events.dispatchEvent(R.Chart.RENDER_FINISHED)))}destroy(){this.components.forEach((e=>e.destroy())),this.services.domUtils.getHolder().remove(),this.model.set({destroyed:!0},{skipUpdate:!0})}getChartComponents(e,t){const n=this.model.getOptions(),r=Um(n,"toolbar","enabled"),i={id:"legend",components:[new sw(this.model,this.services)],growth:G.PREFERRED},o=Um(n,"canvasZoom","enabled");o&&!0===o&&e.push(new cw(this.model,this.services));const a=!!this.model.getOptions().title,s={id:"title",components:[new aw(this.model,this.services)],growth:G.STRETCH},l={id:"toolbar",components:[new yb(this.model,this.services)],growth:G.PREFERRED},c={id:"header",components:[new wb(this.model,this.services,[s,...r?[l]:[]],{direction:W.ROW,alignItems:q.CENTER})],growth:G.PREFERRED},u={id:"graph-frame",components:e,growth:G.STRETCH,renderType:Um(t,"graphFrameRenderType")||L.SVG},d=!0!==Um(t,"excludeLegend")&&!1!==n.legend.enabled;let h=W.COLUMN;if(d){const e=Um(n,"legend","position");"left"===e?(h=W.ROW,n.legend.orientation||(n.legend.orientation=V.VERTICAL)):"right"===e?(h=W.ROW_REVERSE,n.legend.orientation||(n.legend.orientation=V.VERTICAL)):"bottom"===e&&(h=W.COLUMN_REVERSE)}const f={id:"spacer",components:[new _b(this.model,this.services)],growth:G.PREFERRED},p={id:"full-frame",components:[new wb(this.model,this.services,[...d?[i]:[],...d?[f]:[],u],{direction:h})],growth:G.STRETCH},m=[];if(a||r){m.push(c);const e={id:"spacer",components:[new _b(this.model,this.services,r?{size:15}:void 0)],growth:G.PREFERRED};m.push(e)}return m.push(p),[new mw(this.model,this.services),new ow(this.model,this.services),new wb(this.model,this.services,m,{direction:W.COLUMN})]}}class x_ extends E_{constructor(e,t){super(e,t),this.services=Object.assign(this.services,{cartesianScales:r_,curves:i_,zoom:o_}),this.model=new zg(this.services)}getAxisChartComponents(e,t){const n=this.model.getOptions(),r=Um(n,"zoomBar",$.TOP,"enabled"),i=Um(n,"toolbar","enabled");this.services.cartesianScales.determineAxisDuality(),this.services.cartesianScales.findDomainAndRangeAxes(),this.services.cartesianScales.determineOrientation();const o=this.services.cartesianScales.getMainXAxisPosition(),a=Um(n,"axes",o,"scaleType"),s=r&&o===$.BOTTOM&&a===F.TIME,l=this.services.zoom.isZoomBarLocked($.TOP),c=!!this.model.getOptions().title,u={id:"title",components:[new aw(this.model,this.services)],growth:G.STRETCH},d={id:"toolbar",components:[new yb(this.model,this.services)],growth:G.PREFERRED},h={id:"header",components:[new wb(this.model,this.services,[u,...i?[d]:[]],{direction:W.ROW,alignItems:q.CENTER})],growth:G.PREFERRED},f={id:"legend",components:[new sw(this.model,this.services)],growth:G.PREFERRED};s&&!l&&e.push(new lw(this.model,this.services),new vw(this.model,this.services)),e.push(new bw(this.model,this.services)),e.push(new ww(this.model,this.services));const p={id:"graph-frame",components:e,growth:G.STRETCH,renderType:L.SVG},m=!1!==Um(t,"legend","enabled")&&!1!==this.model.getOptions().legend.enabled;let g=W.COLUMN;if(m){const e=Um(this.model.getOptions(),"legend","position");e===U.LEFT?(g=W.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=V.VERTICAL)):e===U.RIGHT?(g=W.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=V.VERTICAL)):e===U.BOTTOM&&(g=W.COLUMN_REVERSE)}const v={id:"spacer",components:[new _b(this.model,this.services)],growth:G.PREFERRED},y={id:"full-frame",components:[new wb(this.model,this.services,[...m?[f]:[],...m?[v]:[],p],{direction:g})],growth:G.STRETCH},b={id:"zoom-bar",components:[new yw(this.model,this.services)],growth:G.PREFERRED,renderType:L.SVG},w=[];if(c||i){w.push(h);const e={id:"spacer",components:[new _b(this.model,this.services,i?{size:15}:void 0)],growth:G.PREFERRED};w.push(e)}return s&&w.push(b),w.push(y),[new _w(this.model,this.services),new ow(this.model,this.services),new wb(this.model,this.services,w,{direction:W.COLUMN})]}}Q.LINE,Q.SCATTER,Q.AREA,Q.STACKED_AREA,Q.SIMPLE_BAR,Q.GROUPED_BAR,Q.STACKED_BAR;class S_ extends x_{constructor(e,t){super(e,t),this.model.setOptions(function(e,t){var n;const r=$f(e),i=Object.keys(t.axes||{});null!=(n=null==t?void 0:t.toolbar)&&n.controls&&delete r.toolbar.controls,0===i.length&&delete r.axes;for(const e in r.axes)if(i.includes(e)){const n=t.axes[e];if((n.primary||n.secondary)&&console.warn("`primary` & `secondary` are no longer needed for axis configurations. Read more here https://charts.carbondesignsystem.com/?path=/story/docs-tutorials--tabular-data-format"),null==n.mapsTo){const e=n.scaleType;null==e?n.mapsTo="value":e===F.TIME?n.mapsTo="date":e===F.LABELS&&(n.mapsTo="key")}}else delete r.axes[e];return Fm(r,t),Dp(r,t)}(zm.lineChart,t.options)),this.init(e,t)}getComponents(){const e=[new Cw(this.model,this.services),new Ew(this.model,this.services),new Sw(this.model,this.services),new xw(this.model,this.services),new Tw(this.model,this.services,{handleThresholds:!0}),new Nw(this.model,this.services),new Mw(this.model,this.services)];return this.getAxisChartComponents(e)}}var T_,O_={exports:{}},A_={};O_.exports=function(){if(T_)return A_;T_=1;var e=r,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function s(e,n,r){var s,l={},c=null,u=null;for(s in void 0!==r&&(c=""+r),void 0!==n.key&&(c=""+n.key),void 0!==n.ref&&(u=n.ref),n)i.call(n,s)&&!a.hasOwnProperty(s)&&(l[s]=n[s]);if(e&&e.defaultProps)for(s in n=e.defaultProps)void 0===l[s]&&(l[s]=n[s]);return{$$typeof:t,type:e,key:c,ref:u,props:l,_owner:o.current}}return A_.Fragment=n,A_.jsx=s,A_.jsxs=s,A_}();var C_=O_.exports;class k_ extends r.PureComponent{constructor(){super(...arguments),o(this,"chart"),o(this,"chartRef",r.createRef())}createChart(e,t,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(e){var t,n;this.props.data!==e.data&&(null==(t=this.chart)||t.model.setData(this.props.data)),this.props.options!==e.options&&(null==(n=this.chart)||n.model.setOptions(this.props.options))}render(){return C_.jsx("div",{ref:this.chartRef,className:"chart-holder"})}}class M_ extends k_{createChart(e,t,n){return new S_(e,{data:t,options:n})}}!function(e){!function(){var t={}.hasOwnProperty;function n(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=i(e,r(n)))}return e}function r(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return n.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var r="";for(var o in e)t.call(e,o)&&e[o]&&(r=i(r,o));return r}function i(e,t){return t?e?e+" "+t:e+t:e}e.exports?(n.default=n,e.exports=n):window.classNames=n}()}({exports:{}})},6300:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(8804);const i=function(e,t){for(var n=e.length;n--;)if((0,r.Z)(e[n][0],t))return n;return-1};var o=Array.prototype.splice;function a(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}a.prototype.clear=function(){this.__data__=[],this.size=0},a.prototype.delete=function(e){var t=this.__data__,n=i(t,e);return!(n<0||(n==t.length-1?t.pop():o.call(t,n,1),--this.size,0))},a.prototype.get=function(e){var t=this.__data__,n=i(t,e);return n<0?void 0:t[n][1]},a.prototype.has=function(e){return i(this.__data__,e)>-1},a.prototype.set=function(e,t){var n=this.__data__,r=i(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};const s=a},8896:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(2411),i=n(3221);const o=(0,r.Z)(i.Z,"Map")},3549:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});const r=(0,n(2411).Z)(Object,"create");var i=Object.prototype.hasOwnProperty;var o=Object.prototype.hasOwnProperty;function a(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}a.prototype.clear=function(){this.__data__=r?r(null):{},this.size=0},a.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},a.prototype.get=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(t,e)?t[e]:void 0},a.prototype.has=function(e){var t=this.__data__;return r?void 0!==t[e]:o.call(t,e)},a.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this};const s=a;var l=n(6300),c=n(8896);const u=function(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map};function d(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}d.prototype.clear=function(){this.size=0,this.__data__={hash:new s,map:new(c.Z||l.Z),string:new s}},d.prototype.delete=function(e){var t=u(this,e).delete(e);return this.size-=t?1:0,t},d.prototype.get=function(e){return u(this,e).get(e)},d.prototype.has=function(e){return u(this,e).has(e)},d.prototype.set=function(e,t){var n=u(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};const h=d},7459:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(2411),i=n(3221);const o=(0,r.Z)(i.Z,"Set")},463:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(3549);function i(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r.Z;++t<n;)this.add(e[t])}i.prototype.add=i.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},i.prototype.has=function(e){return this.__data__.has(e)};const o=i},187:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=n(3221).Z.Symbol},1960:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}},8147:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(187),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=r.Z?r.Z.toStringTag:void 0;var l=Object.prototype.toString;var c=r.Z?r.Z.toStringTag:void 0;const u=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":c&&c in Object(e)?function(e){var t=o.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var i=a.call(e);return r&&(t?e[s]=n:delete e[s]),i}(e):function(e){return l.call(e)}(e)}},8233:(e,t,n)=>{"use strict";n.d(t,{Z:()=>ue});var r=n(6300);var i=n(8896),o=n(3549);function a(e){var t=this.__data__=new r.Z(e);this.size=t.size}a.prototype.clear=function(){this.__data__=new r.Z,this.size=0},a.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},a.prototype.get=function(e){return this.__data__.get(e)},a.prototype.has=function(e){return this.__data__.has(e)},a.prototype.set=function(e,t){var n=this.__data__;if(n instanceof r.Z){var a=n.__data__;if(!i.Z||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new o.Z(a)}return n.set(e,t),this.size=n.size,this};const s=a;var l=n(463);const c=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1};var u=n(1749);const d=function(e,t,n,r,i,o){var a=1&n,s=e.length,d=t.length;if(s!=d&&!(a&&d>s))return!1;var h=o.get(e),f=o.get(t);if(h&&f)return h==t&&f==e;var p=-1,m=!0,g=2&n?new l.Z:void 0;for(o.set(e,t),o.set(t,e);++p<s;){var v=e[p],y=t[p];if(r)var b=a?r(y,v,p,t,e,o):r(v,y,p,e,t,o);if(void 0!==b){if(b)continue;m=!1;break}if(g){if(!c(t,(function(e,t){if(!(0,u.Z)(g,t)&&(v===e||i(v,e,n,r,o)))return g.push(t)}))){m=!1;break}}else if(v!==y&&!i(v,y,n,r,o)){m=!1;break}}return o.delete(e),o.delete(t),m};var h=n(187);const f=n(3221).Z.Uint8Array;var p=n(8804);const m=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n};var g=n(3249),v=h.Z?h.Z.prototype:void 0,y=v?v.valueOf:void 0;var b=n(7885);var w=Object.prototype.propertyIsEnumerable,_=Object.getOwnPropertySymbols;const E=_?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}(_(e),(function(t){return w.call(e,t)})))}:function(){return[]};var x=n(2198);const S=function(e){return function(e,t,n){var r=t(e);return(0,b.Z)(e)?r:function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}(r,n(e))}(e,x.Z,E)};var T=Object.prototype.hasOwnProperty;var O=n(2263),A=n(2143),C=n(2663),k="[object Arguments]",M="[object Array]",N="[object Object]",D=Object.prototype.hasOwnProperty;const R=function(e,t,n,r,i,o){var a=(0,b.Z)(e),l=(0,b.Z)(t),c=a?M:(0,O.Z)(e),u=l?M:(0,O.Z)(t),h=(c=c==k?N:c)==N,v=(u=u==k?N:u)==N,w=c==u;if(w&&(0,A.Z)(e)){if(!(0,A.Z)(t))return!1;a=!0,h=!1}if(w&&!h)return o||(o=new s),a||(0,C.Z)(e)?d(e,t,n,r,i,o):function(e,t,n,r,i,o,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!o(new f(e),new f(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return(0,p.Z)(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=m;case"[object Set]":var l=1&r;if(s||(s=g.Z),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var u=d(s(e),s(t),r,i,o,a);return a.delete(e),u;case"[object Symbol]":if(y)return y.call(e)==y.call(t)}return!1}(e,t,c,n,r,i,o);if(!(1&n)){var _=h&&D.call(e,"__wrapped__"),E=v&&D.call(t,"__wrapped__");if(_||E){var x=_?e.value():e,R=E?t.value():t;return o||(o=new s),i(x,R,n,r,o)}}return!!w&&(o||(o=new s),function(e,t,n,r,i,o){var a=1&n,s=S(e),l=s.length;if(l!=S(t).length&&!a)return!1;for(var c=l;c--;){var u=s[c];if(!(a?u in t:T.call(t,u)))return!1}var d=o.get(e),h=o.get(t);if(d&&h)return d==t&&h==e;var f=!0;o.set(e,t),o.set(t,e);for(var p=a;++c<l;){var m=e[u=s[c]],g=t[u];if(r)var v=a?r(g,m,u,t,e,o):r(m,g,u,e,t,o);if(!(void 0===v?m===g||i(m,g,n,r,o):v)){f=!1;break}p||(p="constructor"==u)}if(f&&!p){var y=e.constructor,b=t.constructor;y==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b||(f=!1)}return o.delete(e),o.delete(t),f}(e,t,n,r,i,o))};var L=n(3391);const P=function e(t,n,r,i,o){return t===n||(null==t||null==n||!(0,L.Z)(t)&&!(0,L.Z)(n)?t!=t&&n!=n:R(t,n,r,i,e,o))};var I=n(3122);const $=function(e){return e==e&&!(0,I.Z)(e)},z=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}},B=function(e){var t=function(e){for(var t=(0,x.Z)(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,$(i)]}return t}(e);return 1==t.length&&t[0][2]?z(t[0][0],t[0][1]):function(n){return n===e||function(e,t,n,r){var i=n.length,o=i,a=!r;if(null==e)return!o;for(e=Object(e);i--;){var l=n[i];if(a&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i<o;){var c=(l=n[i])[0],u=e[c],d=l[1];if(a&&l[2]){if(void 0===u&&!(c in e))return!1}else{var h=new s;if(r)var f=r(u,d,c,e,t,h);if(!(void 0===f?P(d,u,3,r,h):f))return!1}}return!0}(n,e,t)}};var j=n(2758),F=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,U=/^\w*$/;const H=function(e,t){if((0,b.Z)(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!(0,j.Z)(e))||U.test(e)||!F.test(e)||null!=t&&e in Object(t)};function V(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(V.Cache||o.Z),n}V.Cache=o.Z;var Z=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,W=/\\(\\)?/g;const G=(q=V((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Z,(function(e,n,r,i){t.push(r?i.replace(W,"$1"):n||e)})),t}),(function(e){return 500===Y.size&&Y.clear(),e})),Y=q.cache,q);var q,Y;var K=h.Z?h.Z.prototype:void 0,X=K?K.toString:void 0;const Q=function e(t){if("string"==typeof t)return t;if((0,b.Z)(t))return function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}(t,e)+"";if((0,j.Z)(t))return X?X.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n},J=function(e,t){return(0,b.Z)(e)?e:H(e,t)?[e]:G(function(e){return null==e?"":Q(e)}(e))},ee=function(e){if("string"==typeof e||(0,j.Z)(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t},te=function(e,t){for(var n=0,r=(t=J(t,e)).length;null!=e&&n<r;)e=e[ee(t[n++])];return n&&n==r?e:void 0},ne=function(e,t){return null!=e&&t in Object(e)};var re=n(4405),ie=n(6401),oe=n(1164);const ae=function(e,t){return null!=e&&function(e,t,n){for(var r=-1,i=(t=J(t,e)).length,o=!1;++r<i;){var a=ee(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&(0,oe.Z)(i)&&(0,ie.Z)(a,i)&&((0,b.Z)(e)||(0,re.Z)(e))}(e,t,ne)},se=function(e,t){return H(e)&&$(t)?z(ee(e),t):function(n){var r=function(e,t,n){var r=null==e?void 0:te(e,t);return void 0===r?n:r}(n,e);return void 0===r&&r===t?ae(n,e):P(t,r,3)}},le=function(e){return e},ce=function(e){return H(e)?(t=ee(e),function(e){return null==e?void 0:e[t]}):function(e){return function(t){return te(t,e)}}(e);var t},ue=function(e){return"function"==typeof e?e:null==e?le:"object"==typeof e?(0,b.Z)(e)?se(e[0],e[1]):B(e):ce(e)}},5986:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(5441);const i=(o=Object.keys,a=Object,function(e){return o(a(e))});var o,a,s=Object.prototype.hasOwnProperty;const l=function(e){if(!(0,r.Z)(e))return i(e);var t=[];for(var n in Object(e))s.call(e,n)&&"constructor"!=n&&t.push(n);return t}},1749:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e,t){return e.has(t)}},2168:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r="object"==typeof global&&global&&global.Object===Object&&global},2411:(e,t,n)=>{"use strict";n.d(t,{Z:()=>g});var r=n(8936);const i=n(3221).Z["__core-js_shared__"];var o,a=(o=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+o:"";var s=n(3122),l=n(6682),c=/^\[object .+?Constructor\]$/,u=Function.prototype,d=Object.prototype,h=u.toString,f=d.hasOwnProperty,p=RegExp("^"+h.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const m=function(e){return!(!(0,s.Z)(e)||(t=e,a&&a in t))&&((0,r.Z)(e)?p:c).test((0,l.Z)(e));var t},g=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return m(n)?n:void 0}},2263:(e,t,n)=>{"use strict";n.d(t,{Z:()=>x});var r=n(2411),i=n(3221);const o=(0,r.Z)(i.Z,"DataView");var a=n(8896);const s=(0,r.Z)(i.Z,"Promise");var l=n(7459);const c=(0,r.Z)(i.Z,"WeakMap");var u=n(8147),d=n(6682),h="[object Map]",f="[object Promise]",p="[object Set]",m="[object WeakMap]",g="[object DataView]",v=(0,d.Z)(o),y=(0,d.Z)(a.Z),b=(0,d.Z)(s),w=(0,d.Z)(l.Z),_=(0,d.Z)(c),E=u.Z;(o&&E(new o(new ArrayBuffer(1)))!=g||a.Z&&E(new a.Z)!=h||s&&E(s.resolve())!=f||l.Z&&E(new l.Z)!=p||c&&E(new c)!=m)&&(E=function(e){var t=(0,u.Z)(e),n="[object Object]"==t?e.constructor:void 0,r=n?(0,d.Z)(n):"";if(r)switch(r){case v:return g;case y:return h;case b:return f;case w:return p;case _:return m}return t});const x=E},6401:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=/^(?:0|[1-9]\d*)$/;const i=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&r.test(e))&&e>-1&&e%1==0&&e<t}},5441:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=Object.prototype;const i=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||r)}},3221:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(2168),i="object"==typeof self&&self&&self.Object===Object&&self;const o=r.Z||i||Function("return this")()},3249:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},6682:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=Function.prototype.toString;const i=function(e){if(null!=e){try{return r.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},8804:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e,t){return e===t||e!=e&&t!=t}},4405:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(8147),i=n(3391);const o=function(e){return(0,i.Z)(e)&&"[object Arguments]"==(0,r.Z)(e)};var a=Object.prototype,s=a.hasOwnProperty,l=a.propertyIsEnumerable;const c=o(function(){return arguments}())?o:function(e){return(0,i.Z)(e)&&s.call(e,"callee")&&!l.call(e,"callee")}},7885:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=Array.isArray},3282:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(8936),i=n(1164);const o=function(e){return null!=e&&(0,i.Z)(e.length)&&!(0,r.Z)(e)}},2143:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(3221);var i="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=i&&"object"==typeof module&&module&&!module.nodeType&&module,a=o&&o.exports===i?r.Z.Buffer:void 0;const s=(a?a.isBuffer:void 0)||function(){return!1}},8936:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(8147),i=n(3122);const o=function(e){if(!(0,i.Z)(e))return!1;var t=(0,r.Z)(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1164:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},3122:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},3391:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e){return null!=e&&"object"==typeof e}},2758:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(8147),i=n(3391);const o=function(e){return"symbol"==typeof e||(0,i.Z)(e)&&"[object Symbol]"==(0,r.Z)(e)}},2663:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});var r=n(8147),i=n(1164),o=n(3391),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1;var s=n(2168),l="object"==typeof exports&&exports&&!exports.nodeType&&exports,c=l&&"object"==typeof module&&module&&!module.nodeType&&module,u=c&&c.exports===l&&s.Z.process,d=function(){try{return c&&c.require&&c.require("util").types||u&&u.binding&&u.binding("util")}catch(e){}}(),h=d&&d.isTypedArray;const f=h?(p=h,function(e){return p(e)}):function(e){return(0,o.Z)(e)&&(0,i.Z)(e.length)&&!!a[(0,r.Z)(e)]};var p},2198:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var r=n(4405),i=n(7885),o=n(2143),a=n(6401),s=n(2663),l=Object.prototype.hasOwnProperty;const c=function(e,t){var n=(0,i.Z)(e),c=!n&&(0,r.Z)(e),u=!n&&!c&&(0,o.Z)(e),d=!n&&!c&&!u&&(0,s.Z)(e),h=n||c||u||d,f=h?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],p=f.length;for(var m in e)!t&&!l.call(e,m)||h&&("length"==m||u&&("offset"==m||"parent"==m)||d&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||(0,a.Z)(m,p))||f.push(m);return f};var u=n(5986),d=n(3282);const h=function(e){return(0,d.Z)(e)?c(e):(0,u.Z)(e)}},3255:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>l,kY:()=>o.useSWRConfig});var r=n(7900),i=n(3100),o=n(3325);const a=r.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;throw"rejected"===e.status?e.reason:(e.status="pending",e.then((t=>{e.status="fulfilled",e.value=t}),(t=>{e.status="rejected",e.reason=t})),e)}),s={dedupe:!0},l=(o.OBJECT.defineProperty(o.SWRConfig,"defaultValue",{value:o.defaultConfig}),(0,o.withArgs)(((e,t,n)=>{const{cache:l,compare:c,suspense:u,fallbackData:d,revalidateOnMount:h,revalidateIfStale:f,refreshInterval:p,refreshWhenHidden:m,refreshWhenOffline:g,keepPreviousData:v}=n,[y,b,w,_]=o.SWRGlobalState.get(l),[E,x]=(0,o.serialize)(e),S=(0,r.useRef)(!1),T=(0,r.useRef)(!1),O=(0,r.useRef)(E),A=(0,r.useRef)(t),C=(0,r.useRef)(n),k=()=>C.current,M=()=>k().isVisible()&&k().isOnline(),[N,D,R,L]=(0,o.createCacheHelper)(l,E),P=(0,r.useRef)({}).current,I=(0,o.isUndefined)(d)?n.fallback[E]:d,$=(e,t)=>{for(const n in P){const r=n;if("data"===r){if(!c(e[r],t[r])){if(!(0,o.isUndefined)(e[r]))return!1;if(!c(W,t[r]))return!1}}else if(t[r]!==e[r])return!1}return!0},z=(0,r.useMemo)((()=>{const e=!!E&&!!t&&((0,o.isUndefined)(h)?!k().isPaused()&&!u&&(!!(0,o.isUndefined)(f)||f):h),n=t=>{const n=(0,o.mergeObjects)(t);return delete n._k,e?{isValidating:!0,isLoading:!0,...n}:n},r=N(),i=L(),a=n(r),s=r===i?a:n(i);let l=a;return[()=>{const e=n(N());return $(e,l)?(l.data=e.data,l.isLoading=e.isLoading,l.isValidating=e.isValidating,l.error=e.error,l):(l=e,e)},()=>s]}),[l,E]),B=(0,i.useSyncExternalStore)((0,r.useCallback)((e=>R(E,((t,n)=>{$(n,t)||e()}))),[l,E]),z[0],z[1]),j=!S.current,F=y[E]&&y[E].length>0,U=B.data,H=(0,o.isUndefined)(U)?I:U,V=B.error,Z=(0,r.useRef)(H),W=v?(0,o.isUndefined)(U)?Z.current:U:H,G=!(F&&!(0,o.isUndefined)(V))&&(j&&!(0,o.isUndefined)(h)?h:!k().isPaused()&&(u?!(0,o.isUndefined)(H)&&f:(0,o.isUndefined)(H)||f)),q=!!(E&&t&&j&&G),Y=(0,o.isUndefined)(B.isValidating)?q:B.isValidating,K=(0,o.isUndefined)(B.isLoading)?q:B.isLoading,X=(0,r.useCallback)((async e=>{const t=A.current;if(!E||!t||T.current||k().isPaused())return!1;let r,i,a=!0;const s=e||{},l=!w[E]||!s.dedupe,u=()=>o.IS_REACT_LEGACY?!T.current&&E===O.current&&S.current:E===O.current,d={isValidating:!1,isLoading:!1},h=()=>{D(d)},f=()=>{const e=w[E];e&&e[1]===i&&delete w[E]},p={isValidating:!0};(0,o.isUndefined)(N().data)&&(p.isLoading=!0);try{if(l&&(D(p),n.loadingTimeout&&(0,o.isUndefined)(N().data)&&setTimeout((()=>{a&&u()&&k().onLoadingSlow(E,n)}),n.loadingTimeout),w[E]=[t(x),(0,o.getTimestamp)()]),[r,i]=w[E],r=await r,l&&setTimeout(f,n.dedupingInterval),!w[E]||w[E][1]!==i)return l&&u()&&k().onDiscarded(E),!1;d.error=o.UNDEFINED;const e=b[E];if(!(0,o.isUndefined)(e)&&(i<=e[0]||i<=e[1]||0===e[1]))return h(),l&&u()&&k().onDiscarded(E),!1;const s=N().data;d.data=c(s,r)?s:r,l&&u()&&k().onSuccess(r,E,n)}catch(e){f();const t=k(),{shouldRetryOnError:n}=t;t.isPaused()||(d.error=e,l&&u()&&(t.onError(e,E,t),(!0===n||(0,o.isFunction)(n)&&n(e))&&M()&&t.onErrorRetry(e,E,t,(e=>{const t=y[E];t&&t[0]&&t[0](o.revalidateEvents.ERROR_REVALIDATE_EVENT,e)}),{retryCount:(s.retryCount||0)+1,dedupe:!0})))}return a=!1,h(),!0}),[E,l]),Q=(0,r.useCallback)(((...e)=>(0,o.internalMutate)(l,O.current,...e)),[]);if((0,o.useIsomorphicLayoutEffect)((()=>{A.current=t,C.current=n,(0,o.isUndefined)(U)||(Z.current=U)})),(0,o.useIsomorphicLayoutEffect)((()=>{if(!E)return;const e=X.bind(o.UNDEFINED,s);let t=0;const n=(0,o.subscribeCallback)(E,y,((n,r={})=>{if(n==o.revalidateEvents.FOCUS_EVENT){const n=Date.now();k().revalidateOnFocus&&n>t&&M()&&(t=n+k().focusThrottleInterval,e())}else if(n==o.revalidateEvents.RECONNECT_EVENT)k().revalidateOnReconnect&&M()&&e();else{if(n==o.revalidateEvents.MUTATE_EVENT)return X();if(n==o.revalidateEvents.ERROR_REVALIDATE_EVENT)return X(r)}}));return T.current=!1,O.current=E,S.current=!0,D({_k:x}),G&&((0,o.isUndefined)(H)||o.IS_SERVER?e():(0,o.rAF)(e)),()=>{T.current=!0,n()}}),[E]),(0,o.useIsomorphicLayoutEffect)((()=>{let e;function t(){const t=(0,o.isFunction)(p)?p(N().data):p;t&&-1!==e&&(e=setTimeout(n,t))}function n(){N().error||!m&&!k().isVisible()||!g&&!k().isOnline()?t():X(s).then(t)}return t(),()=>{e&&(clearTimeout(e),e=-1)}}),[p,m,g,E]),(0,r.useDebugValue)(W),u&&(0,o.isUndefined)(H)&&E){if(!o.IS_REACT_LEGACY&&o.IS_SERVER)throw new Error("Fallback data is required when using suspense in SSR.");A.current=t,C.current=n,T.current=!1;const e=_[E];if(!(0,o.isUndefined)(e)){const t=Q(e);a(t)}if(!(0,o.isUndefined)(V))throw V;{const e=X(s);(0,o.isUndefined)(W)||(e.status="fulfilled",e.value=!0),a(e)}}return{mutate:Q,get data(){return P.data=!0,W},get error(){return P.error=!0,V},get isValidating(){return P.isValidating=!0,Y},get isLoading(){return P.isLoading=!0,K}}})))}},r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var o=r[e]={id:e,loaded:!1,exports:{}};return n[e].call(o.exports,o,o.exports,i),o.loaded=!0,o.exports}i.m=n,i.c=r,i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((t,n)=>(i.f[n](e,t),t)),[])),i.u=e=>e+".js",i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="@openmrs/esm-generic-patient-widgets-app:",i.l=(n,r,o,a)=>{if(e[n])e[n].push(r);else{var s,l;if(void 0!==o)for(var c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var d=c[u];if(d.getAttribute("src")==n||d.getAttribute("data-webpack")==t+o){s=d;break}}s||(l=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,i.nc&&s.setAttribute("nonce",i.nc),s.setAttribute("data-webpack",t+o),s.src=n),e[n]=[r];var h=(t,r)=>{s.onerror=s.onload=null,clearTimeout(f);var i=e[n];if(delete e[n],s.parentNode&&s.parentNode.removeChild(s),i&&i.forEach((e=>e(r))),t)return t(r)},f=setTimeout(h.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=h.bind(null,s.onerror),s.onload=h.bind(null,s.onload),l&&document.head.appendChild(s)}},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{i.S={};var e={},t={};i.I=(n,r)=>{r||(r=[]);var o=t[n];if(o||(o=t[n]={}),!(r.indexOf(o)>=0)){if(r.push(o),e[n])return e[n];i.o(i.S,n)||(i.S[n]={});var a=i.S[n],s="@openmrs/esm-generic-patient-widgets-app",l=(e,t,n,r)=>{var i=a[e]=a[e]||{},o=i[t];(!o||!o.loaded&&(!r!=!o.eager?r:s>o.from))&&(i[t]={get:n,from:s,eager:!!r})},c=[];return"default"===n&&(l("@openmrs/esm-framework","5.6.1-pre.1955",(()=>Promise.all([i.e(130),i.e(900)]).then((()=>()=>i(130))))),l("@openmrs/esm-patient-common-lib","8.0.2-pre.4836",(()=>Promise.all([i.e(255),i.e(663),i.e(900),i.e(325),i.e(878),i.e(868)]).then((()=>()=>i(9878))))),l("react-i18next","11.18.6",(()=>Promise.all([i.e(443),i.e(900)]).then((()=>()=>i(443))))),l("react-router-dom","6.16.0",(()=>Promise.all([i.e(591),i.e(900)]).then((()=>()=>i(6591))))),l("react","18.3.1",(()=>i.e(784).then((()=>()=>i(2784))))),l("swr/_internal","2.2.4",(()=>Promise.all([i.e(729),i.e(900)]).then((()=>()=>i(4729))))),l("swr/immutable","2.2.4",(()=>Promise.all([i.e(255),i.e(900),i.e(325),i.e(303)]).then((()=>()=>i(2303)))))),e[n]=c.length?Promise.all(c).then((()=>e[n]=1)):1}}})(),(()=>{var e;i.g.importScripts&&(e=i.g.location+"");var t=i.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&!e;)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e})(),(()=>{var e=e=>{var t=e=>e.split(".").map((e=>+e==e?+e:e)),n=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(e),r=n[1]?t(n[1]):[];return n[2]&&(r.length++,r.push.apply(r,t(n[2]))),n[3]&&(r.push([]),r.push.apply(r,t(n[3]))),r},t=e=>{var n=e[0],r="";if(1===e.length)return"*";if(n+.5){r+=0==n?">=":-1==n?"<":1==n?"^":2==n?"~":n>0?"=":"!=";for(var i=1,o=1;o<e.length;o++)i--,r+="u"==(typeof(s=e[o]))[0]?"-":(i>0?".":"")+(i=2,s);return r}var a=[];for(o=1;o<e.length;o++){var s=e[o];a.push(0===s?"not("+l()+")":1===s?"("+l()+" || "+l()+")":2===s?a.pop()+" "+a.pop():t(s))}return l();function l(){return a.pop().replace(/^\((.+)\)$/,"$1")}},n=(t,r)=>{if(0 in t){r=e(r);var i=t[0],o=i<0;o&&(i=-i-1);for(var a=0,s=1,l=!0;;s++,a++){var c,u,d=s<t.length?(typeof t[s])[0]:"";if(a>=r.length||"o"==(u=(typeof(c=r[a]))[0]))return!l||("u"==d?s>i&&!o:""==d!=o);if("u"==u){if(!l||"u"!=d)return!1}else if(l)if(d==u)if(s<=i){if(c!=t[s])return!1}else{if(o?c>t[s]:c<t[s])return!1;c!=t[s]&&(l=!1)}else if("s"!=d&&"n"!=d){if(o||s<=i)return!1;l=!1,s--}else{if(s<=i||u<d!=o)return!1;l=!1}else"s"!=d&&"n"!=d&&(l=!1,s--)}}var h=[],f=h.pop.bind(h);for(a=1;a<t.length;a++){var p=t[a];h.push(1==p?f()|f():2==p?f()&f():p?n(p,r):!f())}return!!f()},r=(t,n)=>{var r=t[n];return Object.keys(r).reduce(((t,n)=>!t||!r[t].loaded&&((t,n)=>{t=e(t),n=e(n);for(var r=0;;){if(r>=t.length)return r<n.length&&"u"!=(typeof n[r])[0];var i=t[r],o=(typeof i)[0];if(r>=n.length)return"u"==o;var a=n[r],s=(typeof a)[0];if(o!=s)return"o"==o&&"n"==s||"s"==s||"u"==o;if("o"!=o&&"u"!=o&&i!=a)return i<a;r++}})(t,n)?n:t),0)},o=(e,i,o,l)=>{var c=r(e,o);return n(l,c)||a(((e,n,r,i)=>"Unsatisfied version "+r+" from "+(r&&e[n][r].from)+" of shared singleton module "+n+" (required "+t(i)+")")(e,o,c,l)),s(e[o][c])},a=e=>{"undefined"!=typeof console&&console.warn&&console.warn(e)},s=e=>(e.loaded=1,e.get()),l=(e=>function(t,n,r,o){var a=i.I(t);return a&&a.then?a.then(e.bind(e,t,i.S[t],n,r,o)):e(t,i.S[t],n,r,o)})(((e,t,n,r,a)=>t&&i.o(t,n)?o(t,0,n,r):a())),c={},u={8744:()=>l("default","react-router-dom",[1,6],(()=>i.e(591).then((()=>()=>i(6591))))),9198:()=>l("default","swr/immutable",[1,2],(()=>i.e(152).then((()=>()=>i(2303))))),7900:()=>l("default","react",[1,18,2,0],(()=>i.e(784).then((()=>()=>i(2784))))),3325:()=>l("default","swr/_internal",[1,2],(()=>i.e(729).then((()=>()=>i(4729))))),884:()=>l("default","@openmrs/esm-patient-common-lib",[1,8],(()=>i.e(878).then((()=>()=>i(9878))))),2870:()=>l("default","@openmrs/esm-framework",[1,5],(()=>i.e(130).then((()=>()=>i(130))))),4924:()=>l("default","react-i18next",[1,11],(()=>i.e(443).then((()=>()=>i(443)))))};[2870,7900,4924,884,3325].forEach((e=>{i.m[e]=t=>{c[e]=0,delete i.c[e];var n=u[e]();if("function"!=typeof n)throw new Error("Shared module is not available for eager consumption: "+e);t.exports=n()}}));var d={325:[3325],868:[884,2870,4924],878:[8744,9198],900:[7900]};i.f.consumes=(e,t)=>{i.o(d,e)&&d[e].forEach((e=>{if(i.o(c,e))return t.push(c[e]);var n=t=>{c[e]=0,i.m[e]=n=>{delete i.c[e],n.exports=t()}},r=t=>{delete c[e],i.m[e]=n=>{throw delete i.c[e],t}};try{var o=u[e]();o.then?t.push(c[e]=o.then(n).catch(r)):n(o)}catch(e){r(e)}}))}})(),(()=>{var e={179:0,868:0,900:0,210:0,255:0,663:0,962:0,325:0};i.f.j=(t,n)=>{var r=i.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else if(/^(325|868|900)$/.test(t))e[t]=0;else{var o=new Promise(((n,i)=>r=e[t]=[n,i]));n.push(r[2]=o);var a=i.p+i.u(t),s=new Error;i.l(a,(n=>{if(i.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),a=n&&n.target&&n.target.src;s.message="Loading chunk "+t+" failed.\n("+o+": "+a+")",s.name="ChunkLoadError",s.type=o,s.request=a,r[1](s)}}),"chunk-"+t,t)}};var t=(t,n)=>{var r,o,[a,s,l]=n,c=0;if(a.some((t=>0!==e[t]))){for(r in s)i.o(s,r)&&(i.m[r]=s[r]);l&&l(i)}for(t&&t(n);c<a.length;c++)o=a[c],i.o(e,o)&&e[o]&&e[o][0](),e[o]=0},n=globalThis.webpackChunk_openmrs_esm_generic_patient_widgets_app=globalThis.webpackChunk_openmrs_esm_generic_patient_widgets_app||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),i.nc=void 0,i(7210)})();