@iqworksai/common-components 0.1.0

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.
Files changed (195) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/README.md +398 -0
  3. package/dist/.gitkeep +3 -0
  4. package/dist/components/Alert/Alert.stories.d.ts +14 -0
  5. package/dist/components/Alert/Alert.stories.d.ts.map +1 -0
  6. package/dist/components/Alert/index.d.ts +15 -0
  7. package/dist/components/Alert/index.d.ts.map +1 -0
  8. package/dist/components/CSVImporter/CSVImporter.stories.d.ts +10 -0
  9. package/dist/components/CSVImporter/CSVImporter.stories.d.ts.map +1 -0
  10. package/dist/components/CSVImporter/helpers.d.ts +8 -0
  11. package/dist/components/CSVImporter/helpers.d.ts.map +1 -0
  12. package/dist/components/CSVImporter/index.d.ts +15 -0
  13. package/dist/components/CSVImporter/index.d.ts.map +1 -0
  14. package/dist/components/Charts/ChartHeader/ChartHeader.stories.d.ts +9 -0
  15. package/dist/components/Charts/ChartHeader/ChartHeader.stories.d.ts.map +1 -0
  16. package/dist/components/Charts/ChartHeader/index.d.ts +10 -0
  17. package/dist/components/Charts/ChartHeader/index.d.ts.map +1 -0
  18. package/dist/components/Charts/CustomLegends/CustomLegends.stories.d.ts +10 -0
  19. package/dist/components/Charts/CustomLegends/CustomLegends.stories.d.ts.map +1 -0
  20. package/dist/components/Charts/CustomLegends/index.d.ts +13 -0
  21. package/dist/components/Charts/CustomLegends/index.d.ts.map +1 -0
  22. package/dist/components/Charts/DonutChart/DonutChart.stories.d.ts +10 -0
  23. package/dist/components/Charts/DonutChart/DonutChart.stories.d.ts.map +1 -0
  24. package/dist/components/Charts/DonutChart/index.d.ts +21 -0
  25. package/dist/components/Charts/DonutChart/index.d.ts.map +1 -0
  26. package/dist/components/Charts/GaugeChart/GaugeChart.stories.d.ts +10 -0
  27. package/dist/components/Charts/GaugeChart/GaugeChart.stories.d.ts.map +1 -0
  28. package/dist/components/Charts/GaugeChart/index.d.ts +47 -0
  29. package/dist/components/Charts/GaugeChart/index.d.ts.map +1 -0
  30. package/dist/components/Charts/GeoChart/GeoChart.stories.d.ts +9 -0
  31. package/dist/components/Charts/GeoChart/GeoChart.stories.d.ts.map +1 -0
  32. package/dist/components/Charts/GeoChart/index.d.ts +35 -0
  33. package/dist/components/Charts/GeoChart/index.d.ts.map +1 -0
  34. package/dist/components/Charts/HorizontalBarChart/HorizontalBarChart.stories.d.ts +11 -0
  35. package/dist/components/Charts/HorizontalBarChart/HorizontalBarChart.stories.d.ts.map +1 -0
  36. package/dist/components/Charts/HorizontalBarChart/index.d.ts +12 -0
  37. package/dist/components/Charts/HorizontalBarChart/index.d.ts.map +1 -0
  38. package/dist/components/Charts/NoDataChart/NoDataChart.stories.d.ts +9 -0
  39. package/dist/components/Charts/NoDataChart/NoDataChart.stories.d.ts.map +1 -0
  40. package/dist/components/Charts/NoDataChart/index.d.ts +8 -0
  41. package/dist/components/Charts/NoDataChart/index.d.ts.map +1 -0
  42. package/dist/components/Charts/PieChart/PieChart.stories.d.ts +10 -0
  43. package/dist/components/Charts/PieChart/PieChart.stories.d.ts.map +1 -0
  44. package/dist/components/Charts/PieChart/index.d.ts +22 -0
  45. package/dist/components/Charts/PieChart/index.d.ts.map +1 -0
  46. package/dist/components/Charts/StorageChart/StorageChart.stories.d.ts +10 -0
  47. package/dist/components/Charts/StorageChart/StorageChart.stories.d.ts.map +1 -0
  48. package/dist/components/Charts/StorageChart/index.d.ts +11 -0
  49. package/dist/components/Charts/StorageChart/index.d.ts.map +1 -0
  50. package/dist/components/Charts/VerticalBarChart/VerticalBarChart.stories.d.ts +9 -0
  51. package/dist/components/Charts/VerticalBarChart/VerticalBarChart.stories.d.ts.map +1 -0
  52. package/dist/components/Charts/VerticalBarChart/index.d.ts +15 -0
  53. package/dist/components/Charts/VerticalBarChart/index.d.ts.map +1 -0
  54. package/dist/components/ConfidenceScoreTooltip/ConfidenceScoreTooltip.stories.d.ts +10 -0
  55. package/dist/components/ConfidenceScoreTooltip/ConfidenceScoreTooltip.stories.d.ts.map +1 -0
  56. package/dist/components/ConfidenceScoreTooltip/index.d.ts +16 -0
  57. package/dist/components/ConfidenceScoreTooltip/index.d.ts.map +1 -0
  58. package/dist/components/ConfirmationModal/ConfirmationModal.stories.d.ts +10 -0
  59. package/dist/components/ConfirmationModal/ConfirmationModal.stories.d.ts.map +1 -0
  60. package/dist/components/ConfirmationModal/index.d.ts +16 -0
  61. package/dist/components/ConfirmationModal/index.d.ts.map +1 -0
  62. package/dist/components/CountryBox/CountryBox.stories.d.ts +9 -0
  63. package/dist/components/CountryBox/CountryBox.stories.d.ts.map +1 -0
  64. package/dist/components/CountryBox/index.d.ts +9 -0
  65. package/dist/components/CountryBox/index.d.ts.map +1 -0
  66. package/dist/components/Dropdown/Dropdown.stories.d.ts +9 -0
  67. package/dist/components/Dropdown/Dropdown.stories.d.ts.map +1 -0
  68. package/dist/components/Dropdown/index.d.ts +14 -0
  69. package/dist/components/Dropdown/index.d.ts.map +1 -0
  70. package/dist/components/ErrorBoundary/ComponentErrorBoundary.d.ts +19 -0
  71. package/dist/components/ErrorBoundary/ComponentErrorBoundary.d.ts.map +1 -0
  72. package/dist/components/ErrorBoundary/ErrorBoundary.stories.d.ts +10 -0
  73. package/dist/components/ErrorBoundary/ErrorBoundary.stories.d.ts.map +1 -0
  74. package/dist/components/ErrorBoundary/index.d.ts +29 -0
  75. package/dist/components/ErrorBoundary/index.d.ts.map +1 -0
  76. package/dist/components/FileTypeIcon/FileTypeIcon.stories.d.ts +9 -0
  77. package/dist/components/FileTypeIcon/FileTypeIcon.stories.d.ts.map +1 -0
  78. package/dist/components/FileTypeIcon/index.d.ts +9 -0
  79. package/dist/components/FileTypeIcon/index.d.ts.map +1 -0
  80. package/dist/components/ImagePreviewModal/ImagePreviewModal.stories.d.ts +12 -0
  81. package/dist/components/ImagePreviewModal/ImagePreviewModal.stories.d.ts.map +1 -0
  82. package/dist/components/ImagePreviewModal/index.d.ts +23 -0
  83. package/dist/components/ImagePreviewModal/index.d.ts.map +1 -0
  84. package/dist/components/InstallUpdateLoader/InstallUpdateLoader.stories.d.ts +11 -0
  85. package/dist/components/InstallUpdateLoader/InstallUpdateLoader.stories.d.ts.map +1 -0
  86. package/dist/components/InstallUpdateLoader/index.d.ts +11 -0
  87. package/dist/components/InstallUpdateLoader/index.d.ts.map +1 -0
  88. package/dist/components/Loader/Loader.stories.d.ts +10 -0
  89. package/dist/components/Loader/Loader.stories.d.ts.map +1 -0
  90. package/dist/components/Loader/index.d.ts +9 -0
  91. package/dist/components/Loader/index.d.ts.map +1 -0
  92. package/dist/components/Modal/Modal.stories.d.ts +12 -0
  93. package/dist/components/Modal/Modal.stories.d.ts.map +1 -0
  94. package/dist/components/Modal/index.d.ts +23 -0
  95. package/dist/components/Modal/index.d.ts.map +1 -0
  96. package/dist/components/MultiSelect/MultiSelect.stories.d.ts +11 -0
  97. package/dist/components/MultiSelect/MultiSelect.stories.d.ts.map +1 -0
  98. package/dist/components/MultiSelect/index.d.ts +37 -0
  99. package/dist/components/MultiSelect/index.d.ts.map +1 -0
  100. package/dist/components/NoActiveAttributeWarning/NoActiveAttributeWarning.stories.d.ts +9 -0
  101. package/dist/components/NoActiveAttributeWarning/NoActiveAttributeWarning.stories.d.ts.map +1 -0
  102. package/dist/components/NoActiveAttributeWarning/index.d.ts +8 -0
  103. package/dist/components/NoActiveAttributeWarning/index.d.ts.map +1 -0
  104. package/dist/components/ResourceUsageBadge/ResourceUsageBadge.stories.d.ts +11 -0
  105. package/dist/components/ResourceUsageBadge/ResourceUsageBadge.stories.d.ts.map +1 -0
  106. package/dist/components/ResourceUsageBadge/index.d.ts +13 -0
  107. package/dist/components/ResourceUsageBadge/index.d.ts.map +1 -0
  108. package/dist/components/RiskScoreLabel/RiskScoreLabel.stories.d.ts +12 -0
  109. package/dist/components/RiskScoreLabel/RiskScoreLabel.stories.d.ts.map +1 -0
  110. package/dist/components/RiskScoreLabel/index.d.ts +9 -0
  111. package/dist/components/RiskScoreLabel/index.d.ts.map +1 -0
  112. package/dist/components/ShowMultiData/ShowMultiData.stories.d.ts +10 -0
  113. package/dist/components/ShowMultiData/ShowMultiData.stories.d.ts.map +1 -0
  114. package/dist/components/ShowMultiData/index.d.ts +15 -0
  115. package/dist/components/ShowMultiData/index.d.ts.map +1 -0
  116. package/dist/components/StatusBadge/StatusBadge.stories.d.ts +15 -0
  117. package/dist/components/StatusBadge/StatusBadge.stories.d.ts.map +1 -0
  118. package/dist/components/StatusBadge/index.d.ts +24 -0
  119. package/dist/components/StatusBadge/index.d.ts.map +1 -0
  120. package/dist/components/Table/Table.stories.d.ts +20 -0
  121. package/dist/components/Table/Table.stories.d.ts.map +1 -0
  122. package/dist/components/Table/index.d.ts +43 -0
  123. package/dist/components/Table/index.d.ts.map +1 -0
  124. package/dist/components/TaskResult/TaskResult.stories.d.ts +10 -0
  125. package/dist/components/TaskResult/TaskResult.stories.d.ts.map +1 -0
  126. package/dist/components/TaskResult/index.d.ts +27 -0
  127. package/dist/components/TaskResult/index.d.ts.map +1 -0
  128. package/dist/components/Timer/Timer.stories.d.ts +10 -0
  129. package/dist/components/Timer/Timer.stories.d.ts.map +1 -0
  130. package/dist/components/Timer/index.d.ts +11 -0
  131. package/dist/components/Timer/index.d.ts.map +1 -0
  132. package/dist/components/Toast/Toast.stories.d.ts +13 -0
  133. package/dist/components/Toast/Toast.stories.d.ts.map +1 -0
  134. package/dist/components/Toast/index.d.ts +12 -0
  135. package/dist/components/Toast/index.d.ts.map +1 -0
  136. package/dist/components/ToggleSwitch/ToggleSwitch.stories.d.ts +12 -0
  137. package/dist/components/ToggleSwitch/ToggleSwitch.stories.d.ts.map +1 -0
  138. package/dist/components/ToggleSwitch/index.d.ts +12 -0
  139. package/dist/components/ToggleSwitch/index.d.ts.map +1 -0
  140. package/dist/components/ToolTip/ToolTip.stories.d.ts +13 -0
  141. package/dist/components/ToolTip/ToolTip.stories.d.ts.map +1 -0
  142. package/dist/components/ToolTip/index.d.ts +12 -0
  143. package/dist/components/ToolTip/index.d.ts.map +1 -0
  144. package/dist/constants/enums.d.ts +54 -0
  145. package/dist/constants/enums.d.ts.map +1 -0
  146. package/dist/constants/statusBadgeClasses.d.ts +2 -0
  147. package/dist/constants/statusBadgeClasses.d.ts.map +1 -0
  148. package/dist/context/ContextProvider.d.ts +33 -0
  149. package/dist/context/ContextProvider.d.ts.map +1 -0
  150. package/dist/context/ContextProvider.stories.d.ts +9 -0
  151. package/dist/context/ContextProvider.stories.d.ts.map +1 -0
  152. package/dist/context/LoaderContext.d.ts +13 -0
  153. package/dist/context/LoaderContext.d.ts.map +1 -0
  154. package/dist/context/LoaderContext.stories.d.ts +8 -0
  155. package/dist/context/LoaderContext.stories.d.ts.map +1 -0
  156. package/dist/context/ThemeContext.d.ts +51 -0
  157. package/dist/context/ThemeContext.d.ts.map +1 -0
  158. package/dist/context/ThemeContext.stories.d.ts +11 -0
  159. package/dist/context/ThemeContext.stories.d.ts.map +1 -0
  160. package/dist/context/ToastContext.d.ts +39 -0
  161. package/dist/context/ToastContext.d.ts.map +1 -0
  162. package/dist/context/ToastContext.stories.d.ts +9 -0
  163. package/dist/context/ToastContext.stories.d.ts.map +1 -0
  164. package/dist/hooks/useApiCache.d.ts +26 -0
  165. package/dist/hooks/useApiCache.d.ts.map +1 -0
  166. package/dist/hooks/useAssetPath.d.ts +28 -0
  167. package/dist/hooks/useAssetPath.d.ts.map +1 -0
  168. package/dist/hooks/useBodyScrollLock.d.ts +6 -0
  169. package/dist/hooks/useBodyScrollLock.d.ts.map +1 -0
  170. package/dist/hooks/useClickOutside.d.ts +13 -0
  171. package/dist/hooks/useClickOutside.d.ts.map +1 -0
  172. package/dist/hooks/useDebounce.d.ts +8 -0
  173. package/dist/hooks/useDebounce.d.ts.map +1 -0
  174. package/dist/hooks/useFilterCache.d.ts +26 -0
  175. package/dist/hooks/useFilterCache.d.ts.map +1 -0
  176. package/dist/hooks/useReduxHook.d.ts +19 -0
  177. package/dist/hooks/useReduxHook.d.ts.map +1 -0
  178. package/dist/index.cjs +168 -0
  179. package/dist/index.d.ts +56 -0
  180. package/dist/index.d.ts.map +1 -0
  181. package/dist/index.mjs +29076 -0
  182. package/dist/style.css +1 -0
  183. package/dist/types/table.d.ts +59 -0
  184. package/dist/types/table.d.ts.map +1 -0
  185. package/dist/utils/classNames.d.ts +16 -0
  186. package/dist/utils/classNames.d.ts.map +1 -0
  187. package/dist/utils/formatBytes.d.ts +8 -0
  188. package/dist/utils/formatBytes.d.ts.map +1 -0
  189. package/dist/utils/memoUtils.d.ts +13 -0
  190. package/dist/utils/memoUtils.d.ts.map +1 -0
  191. package/dist/utils/riskScore.d.ts +11 -0
  192. package/dist/utils/riskScore.d.ts.map +1 -0
  193. package/dist/utils/statusConfig.d.ts +14 -0
  194. package/dist/utils/statusConfig.d.ts.map +1 -0
  195. package/package.json +124 -0
package/dist/index.cjs ADDED
@@ -0,0 +1,168 @@
1
+ "use strict";var b2=Object.defineProperty;var v2=(e,t,n)=>t in e?b2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var z=(e,t,n)=>v2(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("react/jsx-runtime"),C=require("react"),Vn=require("react-dom");function Tm(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const B=Tm(C),ll=Tm(Vn);var Nm={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Yh=C.createContext&&C.createContext(Nm),x2=["attr","size","title"];function y2(e,t){if(e==null)return{};var n=C2(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function C2(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function cl(){return cl=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},cl.apply(this,arguments)}function Xh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ul(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Xh(Object(n),!0).forEach(function(r){w2(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xh(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function w2(e,t,n){return t=S2(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function S2(e){var t=_2(e,"string");return typeof t=="symbol"?t:t+""}function _2(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Lm(e){return e&&e.map((t,n)=>C.createElement(t.tag,ul({key:n},t.attr),Lm(t.child)))}function fe(e){return t=>C.createElement(I2,cl({attr:ul({},e.attr)},t),Lm(e.child))}function I2(e){var t=n=>{var{attr:r,size:i,title:s}=e,o=y2(e,x2),a=i||n.size||"1em",l;return n.className&&(l=n.className),e.className&&(l=(l?l+" ":"")+e.className),C.createElement("svg",cl({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,o,{className:l,style:ul(ul({color:e.color||n.color},n.style),e.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),s&&C.createElement("title",null,s),e.children)};return Yh!==void 0?C.createElement(Yh.Consumer,null,n=>t(n)):t(Nm)}function M2(e){return fe({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 48C141.31 48 48 141.31 48 256s93.31 208 208 208 208-93.31 208-208S370.69 48 256 48zm108.25 138.29-134.4 160a16 16 0 0 1-12 5.71h-.27a16 16 0 0 1-11.89-5.3l-57.6-64a16 16 0 1 1 23.78-21.4l45.29 50.32 122.59-145.91a16 16 0 0 1 24.5 20.58z"},child:[]}]})(e)}function E2(e){return fe({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 48C141.31 48 48 141.31 48 256s93.31 208 208 208 208-93.31 208-208S370.69 48 256 48zm75.31 260.69a16 16 0 1 1-22.62 22.62L256 278.63l-52.69 52.68a16 16 0 0 1-22.62-22.62L233.37 256l-52.68-52.69a16 16 0 0 1 22.62-22.62L256 233.37l52.69-52.68a16 16 0 0 1 22.62 22.62L278.63 256z"},child:[]}]})(e)}function A2(e){return fe({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 56C145.72 56 56 145.72 56 256s89.72 200 200 200 200-89.72 200-200S366.28 56 256 56zm0 82a26 26 0 1 1-26 26 26 26 0 0 1 26-26zm48 226h-88a16 16 0 0 1 0-32h28v-88h-16a16 16 0 0 1 0-32h32a16 16 0 0 1 16 16v104h28a16 16 0 0 1 0 32z"},child:[]}]})(e)}function k2(e){return fe({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M449.07 399.08 278.64 82.58c-12.08-22.44-44.26-22.44-56.35 0L51.87 399.08A32 32 0 0 0 80 446.25h340.89a32 32 0 0 0 28.18-47.17zm-198.6-1.83a20 20 0 1 1 20-20 20 20 0 0 1-20 20zm21.72-201.15-5.74 122a16 16 0 0 1-32 0l-5.74-121.95a21.73 21.73 0 0 1 21.5-22.69h.21a21.74 21.74 0 0 1 21.73 22.7z"},child:[]}]})(e)}const R2={info:"bg-brand-surface-subtle border-brand-primary",warning:"bg-amber-50 dark:bg-amber-900/20 border-amber-200 dark:border-amber-700 text-amber-800 dark:text-amber-200",success:"bg-green-50 dark:bg-green-900/20 border-green-200 dark:border-green-800 text-green-800 dark:text-green-200",error:"bg-red-50 dark:bg-red-900/20 border-red-200 dark:border-red-800 text-red-800 dark:text-red-200"},P2={info:A2,warning:k2,success:M2,error:E2},O2=({variant:e="info",title:t,children:n,compact:r=!1,className:i="",borderStyle:s="left",icon:o=!0})=>{const a=P2[e],l=r?"p-3":"p-4",c=s==="left"?"border-l-4":"border rounded-lg";return v.jsx("div",{className:`${R2[e]} ${c} ${l} ${i}`,children:v.jsxs("div",{className:o?"flex items-start":"",children:[o&&v.jsx(a,{className:`${r?"text-lg":"text-xl"} mr-3 flex-shrink-0 mt-0.5`}),v.jsxs("div",{className:"flex-1",children:[t&&v.jsx("p",{className:`font-semibold ${r?"text-sm":""} ${typeof n=="string"?"":"mb-1"}`,children:t}),typeof n=="string"?v.jsx("p",{className:r?"text-sm":"",children:n}):v.jsx("div",{className:r?"text-sm":"",children:n})]})]})})},D2=({isLoading:e,isRelative:t})=>e?v.jsxs("div",{"data-testid":"loader-overlay",role:"status","aria-live":"polite","aria-label":"Loading",className:`${t?"absolute":"fixed"} inset-0 flex items-center justify-center bg-black/50 dark:bg-black/70 z-[99990]`,children:[v.jsx("div",{"data-testid":"loader-spinner",className:"loader rounded-full w-12 h-12 animate-spin",style:{border:"4px solid var(--brand-light)",borderTopColor:"var(--brand-orange)"}}),v.jsx("span",{className:"sr-only",children:"Loading..."})]}):null;function Zh(e){return fe({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 8C119.034 8 8 119.033 8 256s111.034 248 248 248 248-111.034 248-248S392.967 8 256 8zm130.108 117.892c65.448 65.448 70 165.481 20.677 235.637L150.47 105.216c70.204-49.356 170.226-44.735 235.638 20.676zM125.892 386.108c-65.448-65.448-70-165.481-20.677-235.637L361.53 406.784c-70.203 49.356-170.226 44.736-235.638-20.676z"},child:[]}]})(e)}function Uh(e){return fe({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"},child:[]}]})(e)}function Jh(e){return fe({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256,8C119,8,8,119,8,256S119,504,256,504,504,393,504,256,393,8,256,8Zm92.49,313h0l-20,25a16,16,0,0,1-22.49,2.5h0l-67-49.72a40,40,0,0,1-15-31.23V112a16,16,0,0,1,16-16h32a16,16,0,0,1,16,16V256l58,42.5A16,16,0,0,1,348.49,321Z"},child:[]}]})(e)}function Vm(e){return fe({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},child:[]}]})(e)}function F2(e){return fe({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M487.976 0H24.028C2.71 0-8.047 25.866 7.058 40.971L192 225.941V432c0 7.831 3.821 15.17 10.237 19.662l80 55.98C298.02 518.69 320 507.493 320 487.98V225.941l184.947-184.97C520.021 25.896 509.338 0 487.976 0z"},child:[]}]})(e)}function Qh(e){return fe({attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M360 64c13.255 0 24-10.745 24-24V24c0-13.255-10.745-24-24-24H24C10.745 0 0 10.745 0 24v16c0 13.255 10.745 24 24 24 0 90.965 51.016 167.734 120.842 192C75.016 280.266 24 357.035 24 448c-13.255 0-24 10.745-24 24v16c0 13.255 10.745 24 24 24h336c13.255 0 24-10.745 24-24v-16c0-13.255-10.745-24-24-24 0-90.965-51.016-167.734-120.842-192C308.984 231.734 360 154.965 360 64z"},child:[]}]})(e)}function T2(e){return fe({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"},child:[]}]})(e)}function N2(e){return fe({attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M202.021 0C122.202 0 70.503 32.703 29.914 91.026c-7.363 10.58-5.093 25.086 5.178 32.874l43.138 32.709c10.373 7.865 25.132 6.026 33.253-4.148 25.049-31.381 43.63-49.449 82.757-49.449 30.764 0 68.816 19.799 68.816 49.631 0 22.552-18.617 34.134-48.993 51.164-35.423 19.86-82.299 44.576-82.299 106.405V320c0 13.255 10.745 24 24 24h72.471c13.255 0 24-10.745 24-24v-5.773c0-42.86 125.268-44.645 125.268-160.627C377.504 66.256 286.902 0 202.021 0zM192 373.459c-38.196 0-69.271 31.075-69.271 69.271 0 38.195 31.075 69.27 69.271 69.27s69.271-31.075 69.271-69.271-31.075-69.27-69.271-69.27z"},child:[]}]})(e)}function L2(e){return fe({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M304 48c0 26.51-21.49 48-48 48s-48-21.49-48-48 21.49-48 48-48 48 21.49 48 48zm-48 368c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zm208-208c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zM96 256c0-26.51-21.49-48-48-48S0 229.49 0 256s21.49 48 48 48 48-21.49 48-48zm12.922 99.078c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.491-48-48-48zm294.156 0c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.49-48-48-48zM108.922 60.922c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.491-48-48-48z"},child:[]}]})(e)}function V2(e){return fe({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm121.6 313.1c4.7 4.7 4.7 12.3 0 17L338 377.6c-4.7 4.7-12.3 4.7-17 0L256 312l-65.1 65.6c-4.7 4.7-12.3 4.7-17 0L134.4 338c-4.7-4.7-4.7-12.3 0-17l65.6-65-65.6-65.1c-4.7-4.7-4.7-12.3 0-17l39.6-39.6c4.7-4.7 12.3-4.7 17 0l65 65.7 65.1-65.6c4.7-4.7 12.3-4.7 17 0l39.6 39.6c4.7 4.7 4.7 12.3 0 17L312 256l65.6 65.1z"},child:[]}]})(e)}function Bm(e){return fe({attr:{viewBox:"0 0 352 512"},child:[{tag:"path",attr:{d:"M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"},child:[]}]})(e)}function Zt(...e){const t=[];for(const n of e)if(n){if(typeof n=="string")t.push(n);else if(typeof n=="number")t.push(String(n));else if(Array.isArray(n)){const r=Zt(...n);r&&t.push(r)}}return t.join(" ")}function B2(e,t,n=""){return e?t:n}function j2(e,t,n=""){return t[e]||n}const qd=e=>{C.useEffect(()=>{if(!e)return;const t=document.body.style.overflow,n=document.body.style.paddingRight,r=window.innerWidth-document.documentElement.clientWidth;return document.body.style.overflow="hidden",r>0&&(document.body.style.paddingRight=`${r}px`),document.body.classList.add("overflow-hidden"),()=>{document.body.style.overflow=t,document.body.style.paddingRight=n,document.body.classList.remove("overflow-hidden")}},[e])},ef=({title:e,subtitle:t,isUuidSubtitle:n=!0,body:r,onClose:i,onConfirm:s,onDelete:o,showFooter:a=!0,customFooter:l,isOpen:c,confirmButtonText:u="Confirm",disableConfirm:d,deleteButtonText:f="Delete",cancelButtonText:h="Cancel",customWidth:g="max-w-screen-lg max-h-[90vh] lg:min-w-[600px]",wrapperClass:p})=>{if(qd(c),!c)return null;const m=v.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex justify-center items-center z-[40] p-4 overflow-y-auto",children:v.jsxs("div",{className:Zt("relative py-4 rounded-lg shadow-lg modal","w-[95%] sm:w-[90%] md:w-[85%] lg:w-auto","min-w-[320px] sm:min-w-[400px] md:min-w-[500px]","max-h-[90vh] flex flex-col",g,p),style:{backgroundColor:"var(--bg-color)",border:"1px solid var(--border-color)"},children:[v.jsx(G2,{title:e,onClose:i}),t&&v.jsx($2,{subtitle:t,isUuidSubtitle:n}),r&&v.jsx(W2,{body:r}),a&&v.jsx(H2,{customFooter:l,onClose:i,onConfirm:s,onDelete:o,cancelButtonText:h,confirmButtonText:u,deleteButtonText:f,disableConfirm:d})]})});return Vn.createPortal(m,document.getElementById("modal-root")||document.body)},G2=({title:e,onClose:t})=>v.jsx("div",{className:"px-4 flex-shrink-0",children:v.jsxs("div",{className:"flex justify-between items-center",children:[v.jsx("h2",{className:"text-lg font-semibold",style:{color:"var(--text-color)",fontFamily:"var(--font-family-heading, 'Afacad', 'Rubik', sans-serif)"},children:typeof e=="string"?v.jsx("span",{children:e}):e}),v.jsx("button",{onClick:t,className:"text-brand-primary hover:opacity-80","aria-label":"Close",children:v.jsx(Bm,{size:16})})]})}),$2=({subtitle:e,isUuidSubtitle:t})=>v.jsx("div",{className:"px-4 flex-shrink-0",children:v.jsxs("div",{className:Zt("mt-1 p-2 text-xs rounded-md flex flex-wrap",t?"gap-1":"flex-col"),style:{backgroundColor:"var(--hover-bg-color)",color:"var(--text-color)"},children:[t&&v.jsx("b",{style:{color:"var(--text-color)"},children:"UUID:"}),typeof e=="string"?v.jsx("span",{className:"break-all",children:e}):e]})}),W2=({body:e})=>v.jsx("div",{className:Zt("px-4 text-sm modal-body flex-1",typeof e=="string"?"pb-4 mt-2":"pb-1 mt-1"),children:typeof e=="string"?v.jsx("p",{className:"break-words",style:{color:"var(--text-color)"},children:e}):e}),H2=({customFooter:e,onClose:t,onConfirm:n,onDelete:r,cancelButtonText:i,confirmButtonText:s,deleteButtonText:o,disableConfirm:a})=>v.jsx("div",{className:"px-4 mt-1 flex-shrink-0",children:e||v.jsxs("div",{className:"flex flex-wrap justify-between gap-2 sm:space-x-2",children:[t&&i&&v.jsx("button",{"data-testid":"modal-cancel-button",onClick:t,className:"px-4 py-2 rounded footer-button",style:{backgroundColor:"var(--hover-bg-color)",color:"var(--text-color)",border:"1px solid var(--border-color)"},onMouseEnter:l=>l.currentTarget.style.backgroundColor="var(--brand-light)",onMouseLeave:l=>l.currentTarget.style.backgroundColor="var(--hover-bg-color)",children:i}),r&&v.jsx("button",{"data-testid":"modal-delete-button",onClick:r,className:Zt("border border-red-600 text-red-600 px-4 py-2 rounded-md","hover:bg-red-200 dark:text-red-400","dark:hover:bg-red-700 dark:border-red-500","footer-button"),children:o}),n&&v.jsx("button",{"data-testid":"modal-save-button",onClick:n,disabled:a,className:Zt("bg-brand-primary text-white px-4 py-2 rounded-md hover:bg-[var(--brand-orange)]/90","footer-button",a&&"opacity-50 cursor-not-allowed"),children:s})]})});function z2(e){return fe({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 48C140.559 48 48 140.559 48 256c0 115.436 92.559 208 208 208 115.435 0 208-92.564 208-208 0-115.441-92.564-208-208-208zm104.002 282.881l-29.12 29.117L256 285.117l-74.881 74.881-29.121-29.117L226.881 256l-74.883-74.881 29.121-29.116L256 226.881l74.881-74.878 29.12 29.116L285.119 256l74.883 74.881z"},child:[]}]})(e)}function Y2(e){return fe({attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 0 1-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"},child:[]}]})(e)}function X2(e){return fe({attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 0 1 0-96 48.01 48.01 0 0 1 0 96z"},child:[]}]})(e)}function Z2(e){return fe({attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 0 1 0-96 48.01 48.01 0 0 1 0 96z"},child:[]}]})(e)}function U2(e){return fe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M9.836 3.244c.963-1.665 3.365-1.665 4.328 0l8.967 15.504c.963 1.667-.24 3.752-2.165 3.752H3.034c-1.926 0-3.128-2.085-2.165-3.752ZM12 8.5a.75.75 0 0 0-.75.75v4.5a.75.75 0 0 0 1.5 0v-4.5A.75.75 0 0 0 12 8.5Zm1 9a1 1 0 1 0-2 0 1 1 0 0 0 2 0Z"},child:[]}]})(e)}var zt=(e=>(e.SUCCESS="success",e.ERROR="error",e.INFO="info",e.WARNING="warning",e))(zt||{}),tf=(e=>(e.SCANS="scans",e.ATTRIBUTE="attributes",e.ENDPOINT="endpoint",e.DEPARTMENTS="departments",e.CONNECTORS="connectors",e.SHARED_DRIVE="shared_drive",e.ONE_DRIVE="one_drive",e.AWS_S3="aws_s3",e.OUTLOOK="outlook",e.SALESFORCE="salesforce",e.SCANRESULT="scansResult",e.PROCESSED="ProcessedResults",e.FILE="File",e.FILEBROWSER="fileBrowser",e.SCANCONNECTORS="scanConnectors",e.METADATA="metaData",e.FILTERED="filtered",e.LEGENDS="legends",e.REPORTS="reports",e.APPLICATION_CATALOG="application_catalog",e.CLASSIFICATION_LEVELS="classification_levels",e.CLASSIFICATION_RULES="classification_rules",e.AUDIT_TRAIL="audit_trail",e.RETENTION_RULES="retention_rules",e.RETENTION_AUDIT_TRAIL="retention_audit_trail",e))(tf||{}),ii=(e=>(e.LINEAR="Linear",e.LOG="logarithmic",e.NORMALISED="normalised",e))(ii||{}),jm=(e=>(e.DEPARTMENTS="departments",e.GEOLOCATIONS="geolocations",e))(jm||{}),Gm=(e=>(e.DATABASE="database",e.SHARED_DRIVE="shared_drive",e.ONE_DRIVE="one_drive",e.AWS_S3="aws_s3",e.SALESFORCE="salesforce",e))(Gm||{}),$m=(e=>(e.SCAN_STATUS="scan_status",e))($m||{});const Kh={[zt.SUCCESS]:v.jsx(Y2,{size:"1.5rem"}),[zt.INFO]:v.jsx(Z2,{size:"1.5rem"}),[zt.ERROR]:v.jsx(X2,{size:"1.5rem"}),[zt.WARNING]:v.jsx(U2,{size:"1.5rem"})},J2=({message:e,type:t=zt.INFO,duration:n=5e3,onClose:r})=>{C.useEffect(()=>{const s=setTimeout(()=>{r()},n);return()=>clearTimeout(s)},[n,r]);const i=s=>{s.stopPropagation(),r()};return v.jsxs("div",{className:`toast toast-${t}`,role:"alert","aria-live":"assertive",onClick:s=>s.stopPropagation(),children:[Kh[t]&&v.jsx("span",{className:"toast-icon",children:Kh[t]}),v.jsx("div",{className:"toast-message",children:e}),v.jsx("button",{onClick:i,"aria-label":"Close notification",className:"toast-close-button",children:v.jsx(z2,{size:"1.2rem"})})]})},ic=({text:e,children:t,position:n="bottom",fixedWidth:r=!1,isVisible:i=!0})=>{const[s,o]=C.useState(!1),[a,l]=C.useState({}),[c,u]=C.useState({}),d=C.useRef(null),f=C.useRef(null);return C.useEffect(()=>{if(!i){o(!1);return}if(!s||!d.current)return;const h=d.current.getBoundingClientRect(),g=f.current;if(!g)return;const p=g.getBoundingClientRect(),m=window.innerWidth,b=window.innerHeight;let x=n,y=0,_=0,w=0,E=0;switch(n==="top"&&h.top-p.height<10?x="bottom":n==="bottom"&&h.bottom+p.height>b-10?x="top":n==="left"&&h.left-p.width<10?x="right":n==="right"&&h.right+p.width>m-10&&(x="left"),x){case"top":y=h.top-p.height-8,_=h.left+h.width/2-p.width/2,w=p.height-4,E=p.width/2-5;break;case"bottom":y=h.bottom+8,_=h.left+h.width/2-p.width/2,w=-5,E=p.width/2-5;break;case"left":y=h.top+h.height/2-p.height/2,_=h.left-p.width-8,w=p.height/2-5,E=p.width-4;break;case"right":y=h.top+h.height/2-p.height/2,_=h.right+8,w=p.height/2-5,E=-5;break}l({top:`${y}px`,left:`${_}px`,opacity:1,visibility:"visible"}),u({top:`${w}px`,left:`${E}px`,transform:"rotate(45deg)"})},[i,s,n]),v.jsxs("div",{className:"tooltip-wrapper",ref:d,onMouseEnter:()=>i&&o(!0),onMouseLeave:()=>i&&o(!1),children:[t,i&&s&&Vn.createPortal(v.jsxs("div",{ref:f,className:`tooltip ${r?"fixed-width":""}`,style:a,children:[e,v.jsx("span",{className:"tooltip-arrow",style:c})]}),document.body)]})},gn={failed:"bg-red-100 text-red-700 dark:bg-red-900/30 dark:text-red-400",running:"bg-yellow-200 text-yellow-700 dark:bg-yellow-900/30 dark:text-yellow-400",partial_successful:"bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400",successful:"bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400",not_started:"bg-gray-100 text-gray-700 dark:bg-gray-700 dark:text-gray-300",request_received:"bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400",completed:"bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400",suspended:"bg-orange-100 text-orange-700 dark:bg-orange-900/30 dark:text-orange-400",cancelled:"bg-purple-100 text-purple-700 dark:bg-purple-900/30 dark:text-purple-400",scheduled:"bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400"},Lu={scheduled:{icon:Jh,label:"Scheduled",colorClass:gn.scheduled||"bg-blue-100 text-blue-700"},completed:{icon:Uh,label:"Completed",colorClass:gn.completed||"bg-green-100 text-green-700"},successful:{icon:Uh,label:"Successful",colorClass:gn.successful||"bg-green-100 text-green-700"},failed:{icon:V2,label:"Failed",colorClass:gn.failed||"bg-red-100 text-red-700"},partial_successful:{icon:Vm,label:"Partially Successful",colorClass:gn.partial_successful||"bg-blue-100 text-blue-700"},running:{icon:L2,animation:"animate-spin",label:"Running",colorClass:gn.running||"bg-yellow-200 text-yellow-700"},not_started:{icon:Jh,label:"Not Started",colorClass:gn.not_started||"bg-gray-100 text-gray-700"},request_received:{icon:Qh,label:"Request Received",colorClass:gn.request_received||"bg-blue-100 text-blue-700"},queue:{icon:Qh,label:"In Queue",colorClass:"bg-blue-100 text-blue-700"},suspended:{icon:Zh,label:"Suspended",colorClass:gn.suspended||"bg-orange-100 text-orange-700"},cancelled:{icon:Zh,label:"Cancelled",colorClass:gn.cancelled||"bg-purple-100 text-purple-700"},unknown:{icon:N2,label:"Unknown",colorClass:"bg-gray-100 text-gray-700"}},nf=e=>Lu[e]||Lu.unknown,Q2=e=>["running","not_started","request_received"].includes(e),K2=e=>["failed","cancelled","suspended","unknown"].includes(e),q2=e=>["completed","successful"].includes(e),dl=C.memo(({statusKey:e})=>{const{icon:t,animation:n}=nf(e);return v.jsx(t,{className:Zt("mr-1",n)})});dl.displayName="StatusIcon";const eC=({statusKey:e,statusLabel:t,scheduledTime:n,recurrenceDetails:r,showScheduledInfo:i=!1,adjustWidth:s=!0})=>{const{colorClass:o}=nf(e);return i&&n?v.jsxs("div",{className:`flex flex-col items-center ${s?"w-max":""}`,children:[v.jsxs("span",{className:Zt("inline-flex items-center px-2 py-1 text-xs font-medium rounded w-max",o),children:[v.jsx(dl,{statusKey:e}),t]}),v.jsxs("div",{className:"flex items-center gap-1 mt-1",children:[v.jsx("span",{className:"text-[10px] text-gray-500",children:n}),r&&v.jsx(ic,{text:r,position:"top",children:v.jsx(T2,{className:"text-xs cursor-pointer",style:{color:"var(--secondary-text-color)"}})})]})]}):v.jsxs("span",{className:Zt("inline-flex items-center px-2 py-1 text-xs font-medium rounded",o),children:[v.jsx(dl,{statusKey:e}),t]})},tC=({enabled:e,setEnabled:t,id:n="toggle-switch",disabled:r=!1,ariaLabel:i})=>{const s=C.useCallback(()=>{r||t(!e)},[e,t,r]);return v.jsx("button",{id:n,type:"button",role:"switch","aria-checked":e,"aria-label":i,disabled:r,onClick:s,className:Zt("toggle-switch",e?"toggle-on":"toggle-off",r&&"opacity-50 cursor-not-allowed"),children:v.jsx("span",{className:Zt("toggle-knob",e?"knob-on":"knob-off")})})},nC=typeof document<"u"?C.useLayoutEffect:()=>{},Yr=e=>{var t;return(t=e==null?void 0:e.ownerDocument)!==null&&t!==void 0?t:document},oi=e=>e&&"window"in e&&e.window===e?e:Yr(e).defaultView||window;function rC(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"}function iC(e){return rC(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}let sC=!1;function rf(){return sC}function Wm(e,t){if(!rf())return t&&e?e.contains(t):!1;if(!e||!t)return!1;let n=t;for(;n!==null;){if(n===e)return!0;n.tagName==="SLOT"&&n.assignedSlot?n=n.assignedSlot.parentNode:iC(n)?n=n.host:n=n.parentNode}return!1}const Vu=(e=document)=>{var t;if(!rf())return e.activeElement;let n=e.activeElement;for(;n&&"shadowRoot"in n&&(!((t=n.shadowRoot)===null||t===void 0)&&t.activeElement);)n=n.shadowRoot.activeElement;return n};function Hm(e){return rf()&&e.target.shadowRoot&&e.composedPath?e.composedPath()[0]:e.target}function oC(e){if(aC())e.focus({preventScroll:!0});else{let t=lC(e);e.focus(),cC(t)}}let qo=null;function aC(){if(qo==null){qo=!1;try{document.createElement("div").focus({get preventScroll(){return qo=!0,!0}})}catch{}}return qo}function lC(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function cC(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}function sc(e){var t;if(typeof window>"u"||window.navigator==null)return!1;let n=(t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands;return Array.isArray(n)&&n.some(r=>e.test(r.brand))||e.test(window.navigator.userAgent)}function sf(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function yr(e){if(process.env.NODE_ENV==="test")return e;let t=null;return()=>(t==null&&(t=e()),t)}const fo=yr(function(){return sf(/^Mac/i)}),uC=yr(function(){return sf(/^iPhone/i)}),zm=yr(function(){return sf(/^iPad/i)||fo()&&navigator.maxTouchPoints>1}),dC=yr(function(){return uC()||zm()});yr(function(){return fo()||dC()});const fC=yr(function(){return sc(/AppleWebKit/i)&&!hC()}),hC=yr(function(){return sc(/Chrome/i)}),gC=yr(function(){return sc(/Android/i)}),pC=yr(function(){return sc(/Firefox/i)});function ho(e,t,n=!0){var r,i;let{metaKey:s,ctrlKey:o,altKey:a,shiftKey:l}=t;pC()&&(!((i=window.event)===null||i===void 0||(r=i.type)===null||r===void 0)&&r.startsWith("key"))&&e.target==="_blank"&&(fo()?s=!0:o=!0);let c=fC()&&fo()&&!zm()&&process.env.NODE_ENV!=="test"?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:s,ctrlKey:o,altKey:a,shiftKey:l}):new MouseEvent("click",{metaKey:s,ctrlKey:o,altKey:a,shiftKey:l,detail:1,bubbles:!0,cancelable:!0});ho.isOpening=n,oC(e),e.dispatchEvent(c),ho.isOpening=!1}ho.isOpening=!1;function Ym(){let e=C.useRef(new Map),t=C.useCallback((i,s,o,a)=>{let l=a!=null&&a.once?(...c)=>{e.current.delete(o),o(...c)}:o;e.current.set(o,{type:s,eventTarget:i,fn:l,options:a}),i.addEventListener(s,l,a)},[]),n=C.useCallback((i,s,o,a)=>{var l;let c=((l=e.current.get(o))===null||l===void 0?void 0:l.fn)||o;i.removeEventListener(s,c,a),e.current.delete(o)},[]),r=C.useCallback(()=>{e.current.forEach((i,s)=>{n(i.eventTarget,i.type,s,i.options)})},[n]);return C.useEffect(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function mC(e){return e.pointerType===""&&e.isTrusted?!0:gC()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Xm(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function bC(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function Zm(e){let t=C.useRef({isFocused:!1,observer:null});return nC(()=>{const n=t.current;return()=>{n.observer&&(n.observer.disconnect(),n.observer=null)}},[]),C.useCallback(n=>{if(n.target instanceof HTMLButtonElement||n.target instanceof HTMLInputElement||n.target instanceof HTMLTextAreaElement||n.target instanceof HTMLSelectElement){t.current.isFocused=!0;let r=n.target,i=s=>{if(t.current.isFocused=!1,r.disabled){let o=Xm(s);e==null||e(o)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};r.addEventListener("focusout",i,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&r.disabled){var s;(s=t.current.observer)===null||s===void 0||s.disconnect();let o=r===document.activeElement?null:document.activeElement;r.dispatchEvent(new FocusEvent("blur",{relatedTarget:o})),r.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:o}))}}),t.current.observer.observe(r,{attributes:!0,attributeFilter:["disabled"]})}},[e])}let vC=!1,No=null,Bu=new Set,Zs=new Map,Ci=!1,ju=!1;const xC={Tab:!0,Escape:!0};function of(e,t){for(let n of Bu)n(e,t)}function yC(e){return!(e.metaKey||!fo()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function fl(e){Ci=!0,!ho.isOpening&&yC(e)&&(No="keyboard",of("keyboard",e))}function nn(e){No="pointer","pointerType"in e&&e.pointerType,(e.type==="mousedown"||e.type==="pointerdown")&&(Ci=!0,of("pointer",e))}function Um(e){!ho.isOpening&&mC(e)&&(Ci=!0,No="virtual")}function Jm(e){e.target===window||e.target===document||vC||!e.isTrusted||(!Ci&&!ju&&(No="virtual",of("virtual",e)),Ci=!1,ju=!1)}function Qm(){Ci=!1,ju=!0}function Gu(e){if(typeof window>"u"||typeof document>"u"||Zs.get(oi(e)))return;const t=oi(e),n=Yr(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){Ci=!0,r.apply(this,arguments)},n.addEventListener("keydown",fl,!0),n.addEventListener("keyup",fl,!0),n.addEventListener("click",Um,!0),t.addEventListener("focus",Jm,!0),t.addEventListener("blur",Qm,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",nn,!0),n.addEventListener("pointermove",nn,!0),n.addEventListener("pointerup",nn,!0)):process.env.NODE_ENV==="test"&&(n.addEventListener("mousedown",nn,!0),n.addEventListener("mousemove",nn,!0),n.addEventListener("mouseup",nn,!0)),t.addEventListener("beforeunload",()=>{Km(e)},{once:!0}),Zs.set(t,{focus:r})}const Km=(e,t)=>{const n=oi(e),r=Yr(e);t&&r.removeEventListener("DOMContentLoaded",t),Zs.has(n)&&(n.HTMLElement.prototype.focus=Zs.get(n).focus,r.removeEventListener("keydown",fl,!0),r.removeEventListener("keyup",fl,!0),r.removeEventListener("click",Um,!0),n.removeEventListener("focus",Jm,!0),n.removeEventListener("blur",Qm,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",nn,!0),r.removeEventListener("pointermove",nn,!0),r.removeEventListener("pointerup",nn,!0)):process.env.NODE_ENV==="test"&&(r.removeEventListener("mousedown",nn,!0),r.removeEventListener("mousemove",nn,!0),r.removeEventListener("mouseup",nn,!0)),Zs.delete(n))};function CC(e){const t=Yr(e);let n;return t.readyState!=="loading"?Gu(e):(n=()=>{Gu(e)},t.addEventListener("DOMContentLoaded",n)),()=>Km(e,n)}typeof document<"u"&&CC();function qm(){return No!=="pointer"}const wC=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function SC(e,t,n){let r=Yr(n==null?void 0:n.target);const i=typeof window<"u"?oi(n==null?void 0:n.target).HTMLInputElement:HTMLInputElement,s=typeof window<"u"?oi(n==null?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,o=typeof window<"u"?oi(n==null?void 0:n.target).HTMLElement:HTMLElement,a=typeof window<"u"?oi(n==null?void 0:n.target).KeyboardEvent:KeyboardEvent;return e=e||r.activeElement instanceof i&&!wC.has(r.activeElement.type)||r.activeElement instanceof s||r.activeElement instanceof o&&r.activeElement.isContentEditable,!(e&&t==="keyboard"&&n instanceof a&&!xC[n.key])}function _C(e,t,n){Gu(),C.useEffect(()=>{let r=(i,s)=>{SC(!!(n!=null&&n.isTextInput),i,s)&&e(qm())};return Bu.add(r),()=>{Bu.delete(r)}},t)}function IC(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:i}=e;const s=C.useCallback(l=>{if(l.target===l.currentTarget)return r&&r(l),i&&i(!1),!0},[r,i]),o=Zm(s),a=C.useCallback(l=>{const c=Yr(l.target),u=c?Vu(c):Vu();l.target===l.currentTarget&&u===Hm(l.nativeEvent)&&(n&&n(l),i&&i(!0),o(l))},[i,n,o]);return{focusProps:{onFocus:!t&&(n||i||r)?a:void 0,onBlur:!t&&(r||i)?s:void 0}}}function MC(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=e,s=C.useRef({isFocusWithin:!1}),{addGlobalListener:o,removeAllGlobalListeners:a}=Ym(),l=C.useCallback(d=>{d.currentTarget.contains(d.target)&&s.current.isFocusWithin&&!d.currentTarget.contains(d.relatedTarget)&&(s.current.isFocusWithin=!1,a(),n&&n(d),i&&i(!1))},[n,i,s,a]),c=Zm(l),u=C.useCallback(d=>{if(!d.currentTarget.contains(d.target))return;const f=Yr(d.target),h=Vu(f);if(!s.current.isFocusWithin&&h===Hm(d.nativeEvent)){r&&r(d),i&&i(!0),s.current.isFocusWithin=!0,c(d);let g=d.currentTarget;o(f,"focus",p=>{if(s.current.isFocusWithin&&!Wm(g,p.target)){let m=new f.defaultView.FocusEvent("blur",{relatedTarget:p.target});bC(m,g);let b=Xm(m);l(b)}},{capture:!0})}},[r,i,c,o,l]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:u,onBlur:l}}}let hl=!1,ea=0;function $u(){hl=!0,setTimeout(()=>{hl=!1},50)}function qh(e){e.pointerType==="touch"&&$u()}function EC(){if(!(typeof document>"u"))return ea===0&&(typeof PointerEvent<"u"?document.addEventListener("pointerup",qh):process.env.NODE_ENV==="test"&&document.addEventListener("touchend",$u)),ea++,()=>{ea--,!(ea>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",qh):process.env.NODE_ENV==="test"&&document.removeEventListener("touchend",$u))}}function AC(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:i}=e,[s,o]=C.useState(!1),a=C.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;C.useEffect(EC,[]);let{addGlobalListener:l,removeAllGlobalListeners:c}=Ym(),{hoverProps:u,triggerHoverEnd:d}=C.useMemo(()=>{let f=(p,m)=>{if(a.pointerType=m,i||m==="touch"||a.isHovered||!p.currentTarget.contains(p.target))return;a.isHovered=!0;let b=p.currentTarget;a.target=b,l(Yr(p.target),"pointerover",x=>{a.isHovered&&a.target&&!Wm(a.target,x.target)&&h(x,x.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:b,pointerType:m}),n&&n(!0),o(!0)},h=(p,m)=>{let b=a.target;a.pointerType="",a.target=null,!(m==="touch"||!a.isHovered||!b)&&(a.isHovered=!1,c(),r&&r({type:"hoverend",target:b,pointerType:m}),n&&n(!1),o(!1))},g={};return typeof PointerEvent<"u"?(g.onPointerEnter=p=>{hl&&p.pointerType==="mouse"||f(p,p.pointerType)},g.onPointerLeave=p=>{!i&&p.currentTarget.contains(p.target)&&h(p,p.pointerType)}):process.env.NODE_ENV==="test"&&(g.onTouchStart=()=>{a.ignoreEmulatedMouseEvents=!0},g.onMouseEnter=p=>{!a.ignoreEmulatedMouseEvents&&!hl&&f(p,"mouse"),a.ignoreEmulatedMouseEvents=!1},g.onMouseLeave=p=>{!i&&p.currentTarget.contains(p.target)&&h(p,"mouse")}),{hoverProps:g,triggerHoverEnd:h}},[t,n,r,i,a,l,c]);return C.useEffect(()=>{i&&d({currentTarget:a.target},a.pointerType)},[i]),{hoverProps:u,isHovered:s}}function kC(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,i=C.useRef({isFocused:!1,isFocusVisible:t||qm()}),[s,o]=C.useState(!1),[a,l]=C.useState(()=>i.current.isFocused&&i.current.isFocusVisible),c=C.useCallback(()=>l(i.current.isFocused&&i.current.isFocusVisible),[]),u=C.useCallback(h=>{i.current.isFocused=h,o(h),c()},[c]);_C(h=>{i.current.isFocusVisible=h,c()},[],{isTextInput:n});let{focusProps:d}=IC({isDisabled:r,onFocusChange:u}),{focusWithinProps:f}=MC({isDisabled:!r,onFocusWithinChange:u});return{isFocused:s,isFocusVisible:a,focusProps:r?f:d}}var RC=Object.defineProperty,PC=(e,t,n)=>t in e?RC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,jc=(e,t,n)=>(PC(e,typeof t!="symbol"?t+"":t,n),n);let OC=class{constructor(){jc(this,"current",this.detect()),jc(this,"handoffState","pending"),jc(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},fi=new OC;function Lo(e){var t;return fi.isServer?null:e==null?document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function gl(e){var t,n;return fi.isServer?null:e==null?document:(n=(t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))!=null?n:document}function af(e){var t,n;return(n=(t=gl(e))==null?void 0:t.activeElement)!=null?n:null}function DC(e){return af(e)===e}function eb(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Wt(){let e=[],t={addEventListener(n,r,i,s){return n.addEventListener(r,i,s),t.add(()=>n.removeEventListener(r,i,s))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return eb(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,i){let s=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:i}),this.add(()=>{Object.assign(n.style,{[r]:s})})},group(n){let r=Wt();return n(r),this.add(()=>r.dispose())},add(n){return e.includes(n)||e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let i of e.splice(r,1))i()}},dispose(){for(let n of e.splice(0))n()}};return t}function Vo(){let[e]=C.useState(Wt);return C.useEffect(()=>()=>e.dispose(),[e]),e}let xt=(e,t)=>{fi.isServer?C.useEffect(e,t):C.useLayoutEffect(e,t)};function Bo(e){let t=C.useRef(e);return xt(()=>{t.current=e},[e]),t}let Le=function(e){let t=Bo(e);return C.useCallback((...n)=>t.current(...n),[t])};function FC(e){let t=e.width/2,n=e.height/2;return{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}function TC(e,t){return!(!e||!t||e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)}function NC({disabled:e=!1}={}){let t=C.useRef(null),[n,r]=C.useState(!1),i=Vo(),s=Le(()=>{t.current=null,r(!1),i.dispose()}),o=Le(a=>{if(i.dispose(),t.current===null){t.current=a.currentTarget,r(!0);{let l=Lo(a.currentTarget);i.addEventListener(l,"pointerup",s,!1),i.addEventListener(l,"pointermove",c=>{if(t.current){let u=FC(c);r(TC(u,t.current.getBoundingClientRect()))}},!1),i.addEventListener(l,"pointercancel",s,!1)}}});return{pressed:n,pressProps:e?{}:{onPointerDown:o,onPointerUp:s,onClick:s}}}function ds(e){return C.useMemo(()=>e,Object.values(e))}let LC=C.createContext(void 0);function tb(){return C.useContext(LC)}function eg(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function fs(e,t,...n){if(e in t){let i=t[e];return typeof i=="function"?i(...n):i}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(i=>`"${i}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,fs),r}var Wu=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Wu||{}),VC=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(VC||{});function cn(){let e=jC();return C.useCallback(t=>BC({mergeRefs:e,...t}),[e])}function BC({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:s=!0,name:o,mergeRefs:a}){a=a??GC;let l=nb(t,e);if(s)return ta(l,n,r,o,a);let c=i??0;if(c&2){let{static:u=!1,...d}=l;if(u)return ta(d,n,r,o,a)}if(c&1){let{unmount:u=!0,...d}=l;return fs(u?0:1,{0(){return null},1(){return ta({...d,hidden:!0,style:{display:"none"}},n,r,o,a)}})}return ta(l,n,r,o,a)}function ta(e,t={},n,r,i){let{as:s=n,children:o,refName:a="ref",...l}=Gc(e,["unmount","static"]),c=e.ref!==void 0?{[a]:e.ref}:{},u=typeof o=="function"?o(t):o;"className"in l&&l.className&&typeof l.className=="function"&&(l.className=l.className(t)),l["aria-labelledby"]&&l["aria-labelledby"]===l.id&&(l["aria-labelledby"]=void 0);let d={};if(t){let f=!1,h=[];for(let[g,p]of Object.entries(t))typeof p=="boolean"&&(f=!0),p===!0&&h.push(g.replace(/([A-Z])/g,m=>`-${m.toLowerCase()}`));if(f){d["data-headlessui-state"]=h.join(" ");for(let g of h)d[`data-${g}`]=""}}if(Ga(s)&&(Object.keys(Ti(l)).length>0||Object.keys(Ti(d)).length>0))if(!C.isValidElement(u)||Array.isArray(u)&&u.length>1||WC(u)){if(Object.keys(Ti(l)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(Ti(l)).concat(Object.keys(Ti(d))).map(f=>` - ${f}`).join(`
2
+ `),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(f=>` - ${f}`).join(`
3
+ `)].join(`
4
+ `))}else{let f=u.props,h=f==null?void 0:f.className,g=typeof h=="function"?(...b)=>eg(h(...b),l.className):eg(h,l.className),p=g?{className:g}:{},m=nb(u.props,Ti(Gc(l,["ref"])));for(let b in d)b in m&&delete d[b];return C.cloneElement(u,Object.assign({},m,d,c,{ref:i($C(u),c.ref)},p))}return C.createElement(s,Object.assign({},Gc(l,["ref"]),!Ga(s)&&c,!Ga(s)&&d),u)}function jC(){let e=C.useRef([]),t=C.useCallback(n=>{for(let r of e.current)r!=null&&(typeof r=="function"?r(n):r.current=n)},[]);return(...n)=>{if(!n.every(r=>r==null))return e.current=n,t}}function GC(...e){return e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}function nb(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let i in r)i.startsWith("on")&&typeof r[i]=="function"?(n[i]!=null||(n[i]=[]),n[i].push(r[i])):t[i]=r[i];if(t.disabled||t["aria-disabled"])for(let r in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r)&&(n[r]=[i=>{var s;return(s=i==null?void 0:i.preventDefault)==null?void 0:s.call(i)}]);for(let r in n)Object.assign(t,{[r](i,...s){let o=n[r];for(let a of o){if((i instanceof Event||(i==null?void 0:i.nativeEvent)instanceof Event)&&i.defaultPrevented)return;a(i,...s)}}});return t}function rb(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let i in r)i.startsWith("on")&&typeof r[i]=="function"?(n[i]!=null||(n[i]=[]),n[i].push(r[i])):t[i]=r[i];for(let r in n)Object.assign(t,{[r](...i){let s=n[r];for(let o of s)o==null||o(...i)}});return t}function un(e){var t;return Object.assign(C.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Ti(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function Gc(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function $C(e){return C.version.split(".")[0]>="19"?e.props.ref:e.ref}function Ga(e){return e===C.Fragment||e===Symbol.for("react.fragment")}function WC(e){return Ga(e.type)}let HC=C.createContext(void 0);function zC(){return C.useContext(HC)}function ib(e){return typeof e!="object"||e===null?!1:"nodeType"in e}function oc(e){return ib(e)&&"tagName"in e}function Cr(e){return oc(e)&&"accessKey"in e}function ai(e){return oc(e)&&"tabIndex"in e}function YC(e){return oc(e)&&"style"in e}function XC(e){return Cr(e)&&e.nodeName==="IFRAME"}function sb(e){return Cr(e)&&e.nodeName==="INPUT"}function tg(e){return Cr(e)&&e.nodeName==="LABEL"}function ZC(e){return Cr(e)&&e.nodeName==="FIELDSET"}function ob(e){return Cr(e)&&e.nodeName==="LEGEND"}function UC(e){return oc(e)?e.matches('a[href],audio[controls],button,details,embed,iframe,img[usemap],input:not([type="hidden"]),label,select,textarea,video[controls]'):!1}function ng(e){let t=e.parentElement,n=null;for(;t&&!ZC(t);)ob(t)&&(n=t),t=t.parentElement;let r=(t==null?void 0:t.getAttribute("disabled"))==="";return r&&JC(n)?!1:r}function JC(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(ob(t))return!1;t=t.previousElementSibling}return!0}let ab=Symbol();function QC(e,t=!0){return Object.assign(e,{[ab]:t})}function wr(...e){let t=C.useRef(e);C.useEffect(()=>{t.current=e},[e]);let n=Le(r=>{for(let i of t.current)i!=null&&(typeof i=="function"?i(r):i.current=r)});return e.every(r=>r==null||(r==null?void 0:r[ab]))?void 0:n}let lf=C.createContext(null);lf.displayName="DescriptionContext";function lb(){let e=C.useContext(lf);if(e===null){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,lb),t}return e}function KC(){let[e,t]=C.useState([]);return[e.length>0?e.join(" "):void 0,C.useMemo(()=>function(n){let r=Le(s=>(t(o=>[...o,s]),()=>t(o=>{let a=o.slice(),l=a.indexOf(s);return l!==-1&&a.splice(l,1),a}))),i=C.useMemo(()=>({register:r,slot:n.slot,name:n.name,props:n.props,value:n.value}),[r,n.slot,n.name,n.props,n.value]);return C.createElement(lf.Provider,{value:i},n.children)},[t])]}let qC="p";function ew(e,t){let n=C.useId(),r=tb(),{id:i=`headlessui-description-${n}`,...s}=e,o=lb(),a=wr(t);xt(()=>o.register(i),[i,o.register]);let l=ds({...o.slot,disabled:r||!1}),c={ref:a,...o.props,id:i};return cn()({ourProps:c,theirProps:s,slot:l,defaultTag:qC,name:o.name||"Description"})}let tw=un(ew);Object.assign(tw,{});var bt=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(bt||{});let ac=C.createContext(null);ac.displayName="LabelContext";function cf(){let e=C.useContext(ac);if(e===null){let t=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,cf),t}return e}function nw(e){var t,n,r;let i=(n=(t=C.useContext(ac))==null?void 0:t.value)!=null?n:void 0;return((r=void 0)!=null?r:0)>0?[i,...e].filter(Boolean).join(" "):i}function cb({inherit:e=!1}={}){let t=nw(),[n,r]=C.useState([]),i=e?[t,...n].filter(Boolean):n;return[i.length>0?i.join(" "):void 0,C.useMemo(()=>function(s){let o=Le(l=>(r(c=>[...c,l]),()=>r(c=>{let u=c.slice(),d=u.indexOf(l);return d!==-1&&u.splice(d,1),u}))),a=C.useMemo(()=>({register:o,slot:s.slot,name:s.name,props:s.props,value:s.value}),[o,s.slot,s.name,s.props,s.value]);return C.createElement(ac.Provider,{value:a},s.children)},[r])]}let rw="label";function iw(e,t){var n;let r=C.useId(),i=cf(),s=zC(),o=tb(),{id:a=`headlessui-label-${r}`,htmlFor:l=s??((n=i.props)==null?void 0:n.htmlFor),passive:c=!1,...u}=e,d=wr(t);xt(()=>i.register(a),[a,i.register]);let f=Le(p=>{let m=p.currentTarget;if(!(p.target!==p.currentTarget&&UC(p.target))&&(tg(m)&&p.preventDefault(),i.props&&"onClick"in i.props&&typeof i.props.onClick=="function"&&i.props.onClick(p),tg(m))){let b=document.getElementById(m.htmlFor);if(b){let x=b.getAttribute("disabled");if(x==="true"||x==="")return;let y=b.getAttribute("aria-disabled");if(y==="true"||y==="")return;(sb(b)&&(b.type==="file"||b.type==="radio"||b.type==="checkbox")||b.role==="radio"||b.role==="checkbox"||b.role==="switch")&&b.click(),b.focus({preventScroll:!0})}}}),h=ds({...i.slot,disabled:o||!1}),g={ref:d,...i.props,id:a,htmlFor:l,onClick:f};return c&&("onClick"in g&&(delete g.htmlFor,delete g.onClick),"onClick"in u&&delete u.onClick),cn()({ourProps:g,theirProps:u,slot:h,defaultTag:l?rw:"div",name:i.name||"Label"})}let sw=un(iw);Object.assign(sw,{});function rg(e){if(e===null)return{width:0,height:0};let{width:t,height:n}=e.getBoundingClientRect();return{width:t,height:n}}function ow(e,t,n=!1){let[r,i]=C.useState(()=>rg(t));return xt(()=>{if(!t||!e)return;let s=Wt();return s.requestAnimationFrame(function o(){s.requestAnimationFrame(o),i(a=>{let l=rg(t);return l.width===a.width&&l.height===a.height?a:l})}),()=>{s.dispose()}},[t,e]),n?{width:`${r.width}px`,height:`${r.height}px`}:r}var ub=(e=>(e[e.Left=0]="Left",e[e.Right=2]="Right",e))(ub||{});function aw(e){let t=C.useRef(null),n=Le(i=>{t.current=i.pointerType,!ng(i.currentTarget)&&i.pointerType==="mouse"&&i.button===ub.Left&&(i.preventDefault(),e(i))}),r=Le(i=>{t.current!=="mouse"&&(ng(i.currentTarget)||e(i))});return{onPointerDown:n,onClick:r}}let db=class extends Map{constructor(t){super(),this.factory=t}get(t){let n=super.get(t);return n===void 0&&(n=this.factory(t),this.set(t,n)),n}};var lw=Object.defineProperty,cw=(e,t,n)=>t in e?lw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,uw=(e,t,n)=>(cw(e,t+"",n),n),fb=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},en=(e,t,n)=>(fb(e,t,"read from private field"),n?n.call(e):t.get(e)),$c=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},ig=(e,t,n,r)=>(fb(e,t,"write to private field"),t.set(e,n),n),Mn,Ts,Ns;let hb=class{constructor(t){$c(this,Mn,{}),$c(this,Ts,new db(()=>new Set)),$c(this,Ns,new Set),uw(this,"disposables",Wt()),ig(this,Mn,t),fi.isServer&&this.disposables.microTask(()=>{this.dispose()})}dispose(){this.disposables.dispose()}get state(){return en(this,Mn)}subscribe(t,n){if(fi.isServer)return()=>{};let r={selector:t,callback:n,current:t(en(this,Mn))};return en(this,Ns).add(r),this.disposables.add(()=>{en(this,Ns).delete(r)})}on(t,n){return fi.isServer?()=>{}:(en(this,Ts).get(t).add(n),this.disposables.add(()=>{en(this,Ts).get(t).delete(n)}))}send(t){let n=this.reduce(en(this,Mn),t);if(n!==en(this,Mn)){ig(this,Mn,n);for(let r of en(this,Ns)){let i=r.selector(en(this,Mn));gb(r.current,i)||(r.current=i,r.callback(i))}for(let r of en(this,Ts).get(t.type))r(en(this,Mn),t)}}};Mn=new WeakMap,Ts=new WeakMap,Ns=new WeakMap;function gb(e,t){return Object.is(e,t)?!0:typeof e!="object"||e===null||typeof t!="object"||t===null?!1:Array.isArray(e)&&Array.isArray(t)?e.length!==t.length?!1:Wc(e[Symbol.iterator](),t[Symbol.iterator]()):e instanceof Map&&t instanceof Map||e instanceof Set&&t instanceof Set?e.size!==t.size?!1:Wc(e.entries(),t.entries()):sg(e)&&sg(t)?Wc(Object.entries(e)[Symbol.iterator](),Object.entries(t)[Symbol.iterator]()):!1}function Wc(e,t){do{let n=e.next(),r=t.next();if(n.done&&r.done)return!0;if(n.done||r.done||!Object.is(n.value,r.value))return!1}while(!0)}function sg(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;let t=Object.getPrototypeOf(e);return t===null||Object.getPrototypeOf(t)===null}function og(e){let[t,n]=e(),r=Wt();return(...i)=>{t(...i),r.dispose(),r.microTask(n)}}var dw=Object.defineProperty,fw=(e,t,n)=>t in e?dw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ag=(e,t,n)=>(fw(e,typeof t!="symbol"?t+"":t,n),n),pb=(e=>(e[e.Push=0]="Push",e[e.Pop=1]="Pop",e))(pb||{});let hw={0(e,t){let n=t.id,r=e.stack,i=e.stack.indexOf(n);if(i!==-1){let s=e.stack.slice();return s.splice(i,1),s.push(n),r=s,{...e,stack:r}}return{...e,stack:[...e.stack,n]}},1(e,t){let n=t.id,r=e.stack.indexOf(n);if(r===-1)return e;let i=e.stack.slice();return i.splice(r,1),{...e,stack:i}}},gw=class mb extends hb{constructor(){super(...arguments),ag(this,"actions",{push:t=>this.send({type:0,id:t}),pop:t=>this.send({type:1,id:t})}),ag(this,"selectors",{isTop:(t,n)=>t.stack[t.stack.length-1]===n,inStack:(t,n)=>t.stack.includes(n)})}static new(){return new mb({stack:[]})}reduce(t,n){return fs(n.type,hw,t,n)}};const uf=new db(()=>gw.new());var pw=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function mw(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Hu={exports:{}},Hc={};/**
5
+ * @license React
6
+ * use-sync-external-store-with-selector.production.js
7
+ *
8
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
9
+ *
10
+ * This source code is licensed under the MIT license found in the
11
+ * LICENSE file in the root directory of this source tree.
12
+ */var lg;function bw(){if(lg)return Hc;lg=1;var e=C;function t(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,i=e.useRef,s=e.useEffect,o=e.useMemo,a=e.useDebugValue;return Hc.useSyncExternalStoreWithSelector=function(l,c,u,d,f){var h=i(null);if(h.current===null){var g={hasValue:!1,value:null};h.current=g}else g=h.current;h=o(function(){function m(w){if(!b){if(b=!0,x=w,w=d(w),f!==void 0&&g.hasValue){var E=g.value;if(f(E,w))return y=E}return y=w}if(E=y,n(x,w))return E;var M=d(w);return f!==void 0&&f(E,M)?(x=w,E):(x=w,y=M)}var b=!1,x,y,_=u===void 0?null:u;return[function(){return m(c())},_===null?void 0:function(){return m(_())}]},[c,u,d,f]);var p=r(l,h[0],h[1]);return s(function(){g.hasValue=!0,g.value=p},[p]),a(p),p},Hc}var zc={};/**
13
+ * @license React
14
+ * use-sync-external-store-with-selector.development.js
15
+ *
16
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
17
+ *
18
+ * This source code is licensed under the MIT license found in the
19
+ * LICENSE file in the root directory of this source tree.
20
+ */var cg;function vw(){return cg||(cg=1,process.env.NODE_ENV!=="production"&&function(){function e(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=C,n=typeof Object.is=="function"?Object.is:e,r=t.useSyncExternalStore,i=t.useRef,s=t.useEffect,o=t.useMemo,a=t.useDebugValue;zc.useSyncExternalStoreWithSelector=function(l,c,u,d,f){var h=i(null);if(h.current===null){var g={hasValue:!1,value:null};h.current=g}else g=h.current;h=o(function(){function m(w){if(!b){if(b=!0,x=w,w=d(w),f!==void 0&&g.hasValue){var E=g.value;if(f(E,w))return y=E}return y=w}if(E=y,n(x,w))return E;var M=d(w);return f!==void 0&&f(E,M)?(x=w,E):(x=w,y=M)}var b=!1,x,y,_=u===void 0?null:u;return[function(){return m(c())},_===null?void 0:function(){return m(_())}]},[c,u,d,f]);var p=r(l,h[0],h[1]);return s(function(){g.hasValue=!0,g.value=p},[p]),a(p),p},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),zc}process.env.NODE_ENV==="production"?Hu.exports=bw():Hu.exports=vw();var xw=Hu.exports;function mn(e,t,n=gb){return xw.useSyncExternalStoreWithSelector(Le(r=>e.subscribe(yw,r)),Le(()=>e.state),Le(()=>e.state),Le(t),n)}function yw(e){return e}function bb(e,t){let n=C.useId(),r=uf.get(t),[i,s]=mn(r,C.useCallback(o=>[r.selectors.isTop(o,n),r.selectors.inStack(o,n)],[r,n]));return xt(()=>{if(e)return r.actions.push(n),()=>r.actions.pop(n)},[r,e,n]),e?s?i:!0:!1}let zu=new Map,Us=new Map;function ug(e){var t;let n=(t=Us.get(e))!=null?t:0;return Us.set(e,n+1),n!==0?()=>dg(e):(zu.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0,()=>dg(e))}function dg(e){var t;let n=(t=Us.get(e))!=null?t:1;if(n===1?Us.delete(e):Us.set(e,n-1),n!==1)return;let r=zu.get(e);r&&(r["aria-hidden"]===null?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r["aria-hidden"]),e.inert=r.inert,zu.delete(e))}function Cw(e,{allowed:t,disallowed:n}={}){let r=bb(e,"inert-others");xt(()=>{var i,s;if(!r)return;let o=Wt();for(let l of(i=n==null?void 0:n())!=null?i:[])l&&o.add(ug(l));let a=(s=t==null?void 0:t())!=null?s:[];for(let l of a){if(!l)continue;let c=Lo(l);if(!c)continue;let u=l.parentElement;for(;u&&u!==c.body;){for(let d of u.children)a.some(f=>d.contains(f))||o.add(ug(d));u=u.parentElement}}return o.dispose},[r,t,n])}function ww(e,t,n){let r=Bo(i=>{let s=i.getBoundingClientRect();s.x===0&&s.y===0&&s.width===0&&s.height===0&&n()});C.useEffect(()=>{if(!e)return;let i=t===null?null:Cr(t)?t:t.current;if(!i)return;let s=Wt();if(typeof ResizeObserver<"u"){let o=new ResizeObserver(()=>r.current(i));o.observe(i),s.add(()=>o.disconnect())}if(typeof IntersectionObserver<"u"){let o=new IntersectionObserver(()=>r.current(i));o.observe(i),s.add(()=>o.disconnect())}return()=>s.dispose()},[t,r,e])}let Yu=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","details>summary","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(","),Sw=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var Xu=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e[e.AutoFocus=64]="AutoFocus",e))(Xu||{}),_w=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(_w||{}),Iw=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(Iw||{});function vb(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Yu)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}function Mw(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Sw)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var df=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(df||{});function ff(e,t=0){var n;return e===((n=Lo(e))==null?void 0:n.body)?!1:fs(t,{0(){return e.matches(Yu)},1(){let r=e;for(;r!==null;){if(r.matches(Yu))return!0;r=r.parentElement}return!1}})}function xb(e){Wt().nextFrame(()=>{let t=af(e);t&&ai(t)&&!ff(t,0)&&Aw(e)})}var Ew=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Ew||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function Aw(e){e==null||e.focus({preventScroll:!0})}let kw=["textarea","input"].join(",");function Rw(e){var t,n;return(n=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,kw))!=null?n:!1}function yb(e,t=n=>n){return e.slice().sort((n,r)=>{let i=t(n),s=t(r);if(i===null||s===null)return 0;let o=i.compareDocumentPosition(s);return o&Node.DOCUMENT_POSITION_FOLLOWING?-1:o&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Pw(e,t,n=e===null?document.body:gl(e)){return Ow(vb(n),t,{relativeTo:e})}function Ow(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:i=[]}={}){let s=Array.isArray(e)?e.length>0?gl(e[0]):document:gl(e),o=Array.isArray(e)?n?yb(e):e:t&64?Mw(e):vb(e);i.length>0&&o.length>1&&(o=o.filter(h=>!i.some(g=>g!=null&&"current"in g?(g==null?void 0:g.current)===h:g===h))),r=r??(s==null?void 0:s.activeElement);let a=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),l=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,o.indexOf(r))-1;if(t&4)return Math.max(0,o.indexOf(r))+1;if(t&8)return o.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=t&32?{preventScroll:!0}:{},u=0,d=o.length,f;do{if(u>=d||u+d<=0)return 0;let h=l+u;if(t&16)h=(h+d)%d;else{if(h<0)return 3;if(h>=d)return 1}f=o[h],f==null||f.focus(c),u+=a}while(f!==af(f));return t&6&&Rw(f)&&f.select(),2}function Cb(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function Dw(){return/Android/gi.test(window.navigator.userAgent)}function fg(){return Cb()||Dw()}function Gi(e,t,n,r){let i=Bo(n);C.useEffect(()=>{if(!e)return;function s(o){i.current(o)}return document.addEventListener(t,s,r),()=>document.removeEventListener(t,s,r)},[e,t,r])}function Fw(e,t,n,r){let i=Bo(n);C.useEffect(()=>{if(!e)return;function s(o){i.current(o)}return window.addEventListener(t,s,r),()=>window.removeEventListener(t,s,r)},[e,t,r])}const hg=30;function Tw(e,t,n){let r=Bo(n),i=C.useCallback(function(a,l){if(a.defaultPrevented)return;let c=l(a);if(c===null||!c.getRootNode().contains(c)||!c.isConnected)return;let u=function d(f){return typeof f=="function"?d(f()):Array.isArray(f)||f instanceof Set?f:[f]}(t);for(let d of u)if(d!==null&&(d.contains(c)||a.composed&&a.composedPath().includes(d)))return;return!ff(c,df.Loose)&&c.tabIndex!==-1&&a.preventDefault(),r.current(a,c)},[r,t]),s=C.useRef(null);Gi(e,"pointerdown",a=>{var l,c;fg()||(s.current=((c=(l=a.composedPath)==null?void 0:l.call(a))==null?void 0:c[0])||a.target)},!0),Gi(e,"pointerup",a=>{if(fg()||!s.current)return;let l=s.current;return s.current=null,i(a,()=>l)},!0);let o=C.useRef({x:0,y:0});Gi(e,"touchstart",a=>{o.current.x=a.touches[0].clientX,o.current.y=a.touches[0].clientY},!0),Gi(e,"touchend",a=>{let l={x:a.changedTouches[0].clientX,y:a.changedTouches[0].clientY};if(!(Math.abs(l.x-o.current.x)>=hg||Math.abs(l.y-o.current.y)>=hg))return i(a,()=>ai(a.target)?a.target:null)},!0),Fw(e,"blur",a=>i(a,()=>XC(window.document.activeElement)?window.document.activeElement:null),!0)}function Zu(...e){return C.useMemo(()=>Lo(...e),[...e])}var Nw=(e=>(e[e.Ignore=0]="Ignore",e[e.Select=1]="Select",e[e.Close=2]="Close",e))(Nw||{});const na={Ignore:{kind:0},Select:e=>({kind:1,target:e}),Close:{kind:2}},Lw=200,gg=5;function Vw(e,{trigger:t,action:n,close:r,select:i}){let s=C.useRef(null),o=C.useRef(null),a=C.useRef(null);Gi(e&&t!==null,"pointerdown",l=>{ib(l==null?void 0:l.target)&&t!=null&&t.contains(l.target)&&(o.current=l.x,a.current=l.y,s.current=l.timeStamp)}),Gi(e&&t!==null,"pointerup",l=>{var c,u;let d=s.current;if(d===null||(s.current=null,!ai(l.target))||Math.abs(l.x-((c=o.current)!=null?c:l.x))<gg&&Math.abs(l.y-((u=a.current)!=null?u:l.y))<gg)return;let f=n(l);switch(f.kind){case 0:return;case 1:{l.timeStamp-d>Lw&&(i(f.target),r());break}case 2:{r();break}}},{capture:!0})}function Bw(e,t){return C.useMemo(()=>{var n;if(e.type)return e.type;let r=(n=e.as)!=null?n:"button";if(typeof r=="string"&&r.toLowerCase()==="button"||(t==null?void 0:t.tagName)==="BUTTON"&&!t.hasAttribute("type"))return"button"},[e.type,e.as,t])}function jw(e){return C.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot)}function Gw(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(i){return r.add(i),()=>r.delete(i)},dispatch(i,...s){let o=t[i].call(n,...s);o&&(n=o,r.forEach(a=>a()))}}}function $w(){let e;return{before({doc:t}){var n;let r=t.documentElement,i=(n=t.defaultView)!=null?n:window;e=Math.max(0,i.innerWidth-r.clientWidth)},after({doc:t,d:n}){let r=t.documentElement,i=Math.max(0,r.clientWidth-r.offsetWidth),s=Math.max(0,e-i);n.style(r,"paddingRight",`${s}px`)}}}function Ww(){return Cb()?{before({doc:e,d:t,meta:n}){function r(i){for(let s of n().containers)for(let o of s())if(o.contains(i))return!0;return!1}t.microTask(()=>{var i;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let a=Wt();a.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>a.dispose()))}let s=(i=window.scrollY)!=null?i:window.pageYOffset,o=null;t.addEventListener(e,"click",a=>{if(ai(a.target))try{let l=a.target.closest("a");if(!l)return;let{hash:c}=new URL(l.href),u=e.querySelector(c);ai(u)&&!r(u)&&(o=u)}catch{}},!0),t.group(a=>{t.addEventListener(e,"touchstart",l=>{if(a.dispose(),ai(l.target)&&YC(l.target))if(r(l.target)){let c=l.target;for(;c.parentElement&&r(c.parentElement);)c=c.parentElement;a.style(c,"overscrollBehavior","contain")}else a.style(l.target,"touchAction","none")})}),t.addEventListener(e,"touchmove",a=>{if(ai(a.target)){if(sb(a.target))return;if(r(a.target)){let l=a.target;for(;l.parentElement&&l.dataset.headlessuiPortal!==""&&!(l.scrollHeight>l.clientHeight||l.scrollWidth>l.clientWidth);)l=l.parentElement;l.dataset.headlessuiPortal===""&&a.preventDefault()}else a.preventDefault()}},{passive:!1}),t.add(()=>{var a;let l=(a=window.scrollY)!=null?a:window.pageYOffset;s!==l&&window.scrollTo(0,s),o&&o.isConnected&&(o.scrollIntoView({block:"nearest"}),o=null)})})}}:{}}function Hw(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function pg(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let li=Gw(()=>new Map,{PUSH(e,t){var n;let r=(n=this.get(e))!=null?n:{doc:e,count:0,d:Wt(),meta:new Set,computedMeta:{}};return r.count++,r.meta.add(t),r.computedMeta=pg(r.meta),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t),n.computedMeta=pg(n.meta)),this},SCROLL_PREVENT(e){let t={doc:e.doc,d:e.d,meta(){return e.computedMeta}},n=[Ww(),$w(),Hw()];n.forEach(({before:r})=>r==null?void 0:r(t)),n.forEach(({after:r})=>r==null?void 0:r(t))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});li.subscribe(()=>{let e=li.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let r=t.get(n.doc)==="hidden",i=n.count!==0;(i&&!r||!i&&r)&&li.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&li.dispatch("TEARDOWN",n)}});function zw(e,t,n=()=>({containers:[]})){let r=jw(li),i=t?r.get(t):void 0,s=i?i.count>0:!1;return xt(()=>{if(!(!t||!e))return li.dispatch("PUSH",t,n),()=>li.dispatch("POP",t,n)},[e,t]),s}function Yw(e,t,n=()=>[document.body]){let r=bb(e,"scroll-lock");zw(r,t,i=>{var s;return{containers:[...(s=i.containers)!=null?s:[],n]}})}function mg(e){return[e.screenX,e.screenY]}function Xw(){let e=C.useRef([-1,-1]);return{wasMoved(t){let n=mg(t);return e.current[0]===n[0]&&e.current[1]===n[1]?!1:(e.current=n,!0)},update(t){e.current=mg(t)}}}function Zw(e=0){let[t,n]=C.useState(e),r=C.useCallback(l=>n(l),[]),i=C.useCallback(l=>n(c=>c|l),[]),s=C.useCallback(l=>(t&l)===l,[t]),o=C.useCallback(l=>n(c=>c&~l),[]),a=C.useCallback(l=>n(c=>c^l),[]);return{flags:t,setFlag:r,addFlag:i,hasFlag:s,removeFlag:o,toggleFlag:a}}var bg,vg;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((bg=process==null?void 0:process.env)==null?void 0:bg.NODE_ENV)==="test"&&typeof((vg=Element==null?void 0:Element.prototype)==null?void 0:vg.getAnimations)>"u"&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(`
21
+ `)),[]});var Uw=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(Uw||{});function Jw(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function Qw(e,t,n,r){let[i,s]=C.useState(n),{hasFlag:o,addFlag:a,removeFlag:l}=Zw(e&&i?3:0),c=C.useRef(!1),u=C.useRef(!1),d=Vo();return xt(()=>{var f;if(e){if(n&&s(!0),!t){n&&a(3);return}return(f=void 0)==null||f.call(r,n),Kw(t,{inFlight:c,prepare(){u.current?u.current=!1:u.current=c.current,c.current=!0,!u.current&&(n?(a(3),l(4)):(a(4),l(2)))},run(){u.current?n?(l(3),a(4)):(l(4),a(3)):n?l(1):a(1)},done(){var h;u.current&&tS(t)||(c.current=!1,l(7),n||s(!1),(h=void 0)==null||h.call(r,n))}})}},[e,n,t,d]),e?[i,{closed:o(1),enter:o(2),leave:o(4),transition:o(2)||o(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function Kw(e,{prepare:t,run:n,done:r,inFlight:i}){let s=Wt();return eS(e,{prepare:t,inFlight:i}),s.nextFrame(()=>{n(),s.requestAnimationFrame(()=>{s.add(qw(e,r))})}),s.dispose}function qw(e,t){var n,r;let i=Wt();if(!e)return i.dispose;let s=!1;i.add(()=>{s=!0});let o=(r=(n=e.getAnimations)==null?void 0:n.call(e).filter(a=>a instanceof CSSTransition))!=null?r:[];return o.length===0?(t(),i.dispose):(Promise.allSettled(o.map(a=>a.finished)).then(()=>{s||t()}),i.dispose)}function eS(e,{inFlight:t,prepare:n}){if(t!=null&&t.current){n();return}let r=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=r}function tS(e){var t,n;return((n=(t=e.getAnimations)==null?void 0:t.call(e))!=null?n:[]).some(r=>r instanceof CSSTransition&&r.playState!=="finished")}function nS(e,{container:t,accept:n,walk:r}){let i=C.useRef(n),s=C.useRef(r);C.useEffect(()=>{i.current=n,s.current=r},[n,r]),xt(()=>{if(!t||!e)return;let o=Lo(t);if(!o)return;let a=i.current,l=s.current,c=Object.assign(d=>a(d),{acceptNode:a}),u=o.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,c,!1);for(;u.nextNode();)l(u.currentNode)},[t,e,i,s])}function lc(){return typeof window<"u"}function hs(e){return wb(e)?(e.nodeName||"").toLowerCase():"#document"}function Yt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Wn(e){var t;return(t=(wb(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function wb(e){return lc()?e instanceof Node||e instanceof Yt(e).Node:!1}function kt(e){return lc()?e instanceof Element||e instanceof Yt(e).Element:!1}function Bn(e){return lc()?e instanceof HTMLElement||e instanceof Yt(e).HTMLElement:!1}function xg(e){return!lc()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Yt(e).ShadowRoot}const rS=new Set(["inline","contents"]);function jo(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Cn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!rS.has(i)}const iS=new Set(["table","td","th"]);function sS(e){return iS.has(hs(e))}const oS=[":popover-open",":modal"];function cc(e){return oS.some(t=>{try{return e.matches(t)}catch{return!1}})}const aS=["transform","translate","scale","rotate","perspective"],lS=["transform","translate","scale","rotate","perspective","filter"],cS=["paint","layout","strict","content"];function hf(e){const t=gf(),n=kt(e)?Cn(e):e;return aS.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||lS.some(r=>(n.willChange||"").includes(r))||cS.some(r=>(n.contain||"").includes(r))}function uS(e){let t=Br(e);for(;Bn(t)&&!ts(t);){if(hf(t))return t;if(cc(t))return null;t=Br(t)}return null}function gf(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const dS=new Set(["html","body","#document"]);function ts(e){return dS.has(hs(e))}function Cn(e){return Yt(e).getComputedStyle(e)}function uc(e){return kt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Br(e){if(hs(e)==="html")return e;const t=e.assignedSlot||e.parentNode||xg(e)&&e.host||Wn(e);return xg(t)?t.host:t}function Sb(e){const t=Br(e);return ts(t)?e.ownerDocument?e.ownerDocument.body:e.body:Bn(t)&&jo(t)?t:Sb(t)}function go(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=Sb(e),s=i===((r=e.ownerDocument)==null?void 0:r.body),o=Yt(i);if(s){const a=Uu(o);return t.concat(o,o.visualViewport||[],jo(i)?i:[],a&&n?go(a):[])}return t.concat(i,go(i,[],n))}function Uu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function fS(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}const wi=Math.min,At=Math.max,po=Math.round,ra=Math.floor,Dn=e=>({x:e,y:e}),hS={left:"right",right:"left",bottom:"top",top:"bottom"},gS={start:"end",end:"start"};function yg(e,t,n){return At(e,wi(t,n))}function gs(e,t){return typeof e=="function"?e(t):e}function jr(e){return e.split("-")[0]}function Go(e){return e.split("-")[1]}function _b(e){return e==="x"?"y":"x"}function Ib(e){return e==="y"?"height":"width"}const pS=new Set(["top","bottom"]);function sr(e){return pS.has(jr(e))?"y":"x"}function Mb(e){return _b(sr(e))}function mS(e,t,n){n===void 0&&(n=!1);const r=Go(e),i=Mb(e),s=Ib(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(o=pl(o)),[o,pl(o)]}function bS(e){const t=pl(e);return[Ju(e),t,Ju(t)]}function Ju(e){return e.replace(/start|end/g,t=>gS[t])}const Cg=["left","right"],wg=["right","left"],vS=["top","bottom"],xS=["bottom","top"];function yS(e,t,n){switch(e){case"top":case"bottom":return n?t?wg:Cg:t?Cg:wg;case"left":case"right":return t?vS:xS;default:return[]}}function CS(e,t,n,r){const i=Go(e);let s=yS(jr(e),n==="start",r);return i&&(s=s.map(o=>o+"-"+i),t&&(s=s.concat(s.map(Ju)))),s}function pl(e){return e.replace(/left|right|bottom|top/g,t=>hS[t])}function wS(e){return{top:0,right:0,bottom:0,left:0,...e}}function SS(e){return typeof e!="number"?wS(e):{top:e,right:e,bottom:e,left:e}}function ml(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Sg(e,t,n){let{reference:r,floating:i}=e;const s=sr(t),o=Mb(t),a=Ib(o),l=jr(t),c=s==="y",u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[a]/2-i[a]/2;let h;switch(l){case"top":h={x:u,y:r.y-i.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-i.width,y:d};break;default:h={x:r.x,y:r.y}}switch(Go(t)){case"start":h[o]-=f*(n&&c?-1:1);break;case"end":h[o]+=f*(n&&c?-1:1);break}return h}const _S=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:o}=n,a=s.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let c=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Sg(c,r,l),f=r,h={},g=0;for(let p=0;p<a.length;p++){const{name:m,fn:b}=a[p],{x,y,data:_,reset:w}=await b({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:h,rects:c,platform:o,elements:{reference:e,floating:t}});u=x??u,d=y??d,h={...h,[m]:{...h[m],..._}},w&&g<=50&&(g++,typeof w=="object"&&(w.placement&&(f=w.placement),w.rects&&(c=w.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):w.rects),{x:u,y:d}=Sg(c,f,l)),p=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:h}};async function dc(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:s,rects:o,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=gs(t,e),g=SS(h),m=a[f?d==="floating"?"reference":"floating":d],b=ml(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(m)))==null||n?m:m.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),x=d==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,y=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),_=await(s.isElement==null?void 0:s.isElement(y))?await(s.getScale==null?void 0:s.getScale(y))||{x:1,y:1}:{x:1,y:1},w=ml(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:x,offsetParent:y,strategy:l}):x);return{top:(b.top-w.top+g.top)/_.y,bottom:(w.bottom-b.bottom+g.bottom)/_.y,left:(b.left-w.left+g.left)/_.x,right:(w.right-b.right+g.right)/_.x}}const IS=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:s,rects:o,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:p=!0,...m}=gs(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const b=jr(i),x=sr(a),y=jr(a)===a,_=await(l.isRTL==null?void 0:l.isRTL(c.floating)),w=f||(y||!p?[pl(a)]:bS(a)),E=g!=="none";!f&&E&&w.push(...CS(a,p,g,_));const M=[a,...w],S=await dc(t,m),I=[];let A=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&I.push(S[b]),d){const V=mS(i,o,_);I.push(S[V[0]],S[V[1]])}if(A=[...A,{placement:i,overflows:I}],!I.every(V=>V<=0)){var k,D;const V=(((k=s.flip)==null?void 0:k.index)||0)+1,P=M[V];if(P&&(!(d==="alignment"?x!==sr(P):!1)||A.every(R=>sr(R.placement)===x?R.overflows[0]>0:!0)))return{data:{index:V,overflows:A},reset:{placement:P}};let T=(D=A.filter(L=>L.overflows[0]<=0).sort((L,R)=>L.overflows[1]-R.overflows[1])[0])==null?void 0:D.placement;if(!T)switch(h){case"bestFit":{var N;const L=(N=A.filter(R=>{if(E){const O=sr(R.placement);return O===x||O==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(O=>O>0).reduce((O,$)=>O+$,0)]).sort((R,O)=>R[1]-O[1])[0])==null?void 0:N[0];L&&(T=L);break}case"initialPlacement":T=a;break}if(i!==T)return{reset:{placement:T}}}return{}}}},MS=new Set(["left","top"]);async function ES(e,t){const{placement:n,platform:r,elements:i}=e,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=jr(n),a=Go(n),l=sr(n)==="y",c=MS.has(o)?-1:1,u=s&&l?-1:1,d=gs(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof g=="number"&&(h=a==="end"?g*-1:g),l?{x:h*u,y:f*c}:{x:f*c,y:h*u}}const AS=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:s,placement:o,middlewareData:a}=t,l=await ES(t,e);return o===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:o}}}}},kS=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:s=!0,crossAxis:o=!1,limiter:a={fn:m=>{let{x:b,y:x}=m;return{x:b,y:x}}},...l}=gs(e,t),c={x:n,y:r},u=await dc(t,l),d=sr(jr(i)),f=_b(d);let h=c[f],g=c[d];if(s){const m=f==="y"?"top":"left",b=f==="y"?"bottom":"right",x=h+u[m],y=h-u[b];h=yg(x,h,y)}if(o){const m=d==="y"?"top":"left",b=d==="y"?"bottom":"right",x=g+u[m],y=g-u[b];g=yg(x,g,y)}const p=a.fn({...t,[f]:h,[d]:g});return{...p,data:{x:p.x-n,y:p.y-r,enabled:{[f]:s,[d]:o}}}}}},RS=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:s,platform:o,elements:a}=t,{apply:l=()=>{},...c}=gs(e,t),u=await dc(t,c),d=jr(i),f=Go(i),h=sr(i)==="y",{width:g,height:p}=s.floating;let m,b;d==="top"||d==="bottom"?(m=d,b=f===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(b=d,m=f==="end"?"top":"bottom");const x=p-u.top-u.bottom,y=g-u.left-u.right,_=wi(p-u[m],x),w=wi(g-u[b],y),E=!t.middlewareData.shift;let M=_,S=w;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(S=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(M=x),E&&!f){const A=At(u.left,0),k=At(u.right,0),D=At(u.top,0),N=At(u.bottom,0);h?S=g-2*(A!==0||k!==0?A+k:At(u.left,u.right)):M=p-2*(D!==0||N!==0?D+N:At(u.top,u.bottom))}await l({...t,availableWidth:S,availableHeight:M});const I=await o.getDimensions(a.floating);return g!==I.width||p!==I.height?{reset:{rects:!0}}:{}}}};function Eb(e){const t=Cn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Bn(e),s=i?e.offsetWidth:n,o=i?e.offsetHeight:r,a=po(n)!==s||po(r)!==o;return a&&(n=s,r=o),{width:n,height:r,$:a}}function pf(e){return kt(e)?e:e.contextElement}function Yi(e){const t=pf(e);if(!Bn(t))return Dn(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:s}=Eb(t);let o=(s?po(n.width):n.width)/r,a=(s?po(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const PS=Dn(0);function Ab(e){const t=Yt(e);return!gf()||!t.visualViewport?PS:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function OS(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Yt(e)?!1:t}function Si(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=pf(e);let o=Dn(1);t&&(r?kt(r)&&(o=Yi(r)):o=Yi(e));const a=OS(s,n,r)?Ab(s):Dn(0);let l=(i.left+a.x)/o.x,c=(i.top+a.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(s){const f=Yt(s),h=r&&kt(r)?Yt(r):r;let g=f,p=Uu(g);for(;p&&r&&h!==g;){const m=Yi(p),b=p.getBoundingClientRect(),x=Cn(p),y=b.left+(p.clientLeft+parseFloat(x.paddingLeft))*m.x,_=b.top+(p.clientTop+parseFloat(x.paddingTop))*m.y;l*=m.x,c*=m.y,u*=m.x,d*=m.y,l+=y,c+=_,g=Yt(p),p=Uu(g)}}return ml({width:u,height:d,x:l,y:c})}function fc(e,t){const n=uc(e).scrollLeft;return t?t.left+n:Si(Wn(e)).left+n}function kb(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-fc(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function DS(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const s=i==="fixed",o=Wn(r),a=t?cc(t.floating):!1;if(r===o||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=Dn(1);const u=Dn(0),d=Bn(r);if((d||!d&&!s)&&((hs(r)!=="body"||jo(o))&&(l=uc(r)),Bn(r))){const h=Si(r);c=Yi(r),u.x=h.x+r.clientLeft,u.y=h.y+r.clientTop}const f=o&&!d&&!s?kb(o,l):Dn(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}}function FS(e){return Array.from(e.getClientRects())}function TS(e){const t=Wn(e),n=uc(e),r=e.ownerDocument.body,i=At(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=At(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+fc(e);const a=-n.scrollTop;return Cn(r).direction==="rtl"&&(o+=At(t.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:a}}const _g=25;function NS(e,t){const n=Yt(e),r=Wn(e),i=n.visualViewport;let s=r.clientWidth,o=r.clientHeight,a=0,l=0;if(i){s=i.width,o=i.height;const u=gf();(!u||u&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}const c=fc(r);if(c<=0){const u=r.ownerDocument,d=u.body,f=getComputedStyle(d),h=u.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,g=Math.abs(r.clientWidth-d.clientWidth-h);g<=_g&&(s-=g)}else c<=_g&&(s+=c);return{width:s,height:o,x:a,y:l}}const LS=new Set(["absolute","fixed"]);function VS(e,t){const n=Si(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,s=Bn(e)?Yi(e):Dn(1),o=e.clientWidth*s.x,a=e.clientHeight*s.y,l=i*s.x,c=r*s.y;return{width:o,height:a,x:l,y:c}}function Ig(e,t,n){let r;if(t==="viewport")r=NS(e,n);else if(t==="document")r=TS(Wn(e));else if(kt(t))r=VS(t,n);else{const i=Ab(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return ml(r)}function Rb(e,t){const n=Br(e);return n===t||!kt(n)||ts(n)?!1:Cn(n).position==="fixed"||Rb(n,t)}function BS(e,t){const n=t.get(e);if(n)return n;let r=go(e,[],!1).filter(a=>kt(a)&&hs(a)!=="body"),i=null;const s=Cn(e).position==="fixed";let o=s?Br(e):e;for(;kt(o)&&!ts(o);){const a=Cn(o),l=hf(o);!l&&a.position==="fixed"&&(i=null),(s?!l&&!i:!l&&a.position==="static"&&!!i&&LS.has(i.position)||jo(o)&&!l&&Rb(e,o))?r=r.filter(u=>u!==o):i=a,o=Br(o)}return t.set(e,r),r}function jS(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?cc(t)?[]:BS(t,this._c):[].concat(n),r],a=o[0],l=o.reduce((c,u)=>{const d=Ig(t,u,i);return c.top=At(d.top,c.top),c.right=wi(d.right,c.right),c.bottom=wi(d.bottom,c.bottom),c.left=At(d.left,c.left),c},Ig(t,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function GS(e){const{width:t,height:n}=Eb(e);return{width:t,height:n}}function $S(e,t,n){const r=Bn(t),i=Wn(t),s=n==="fixed",o=Si(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=Dn(0);function c(){l.x=fc(i)}if(r||!r&&!s)if((hs(t)!=="body"||jo(i))&&(a=uc(t)),r){const h=Si(t,!0,s,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else i&&c();s&&!r&&i&&c();const u=i&&!r&&!s?kb(i,a):Dn(0),d=o.left+a.scrollLeft-l.x-u.x,f=o.top+a.scrollTop-l.y-u.y;return{x:d,y:f,width:o.width,height:o.height}}function Yc(e){return Cn(e).position==="static"}function Mg(e,t){if(!Bn(e)||Cn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Wn(e)===n&&(n=n.ownerDocument.body),n}function Pb(e,t){const n=Yt(e);if(cc(e))return n;if(!Bn(e)){let i=Br(e);for(;i&&!ts(i);){if(kt(i)&&!Yc(i))return i;i=Br(i)}return n}let r=Mg(e,t);for(;r&&sS(r)&&Yc(r);)r=Mg(r,t);return r&&ts(r)&&Yc(r)&&!hf(r)?n:r||uS(e)||n}const WS=async function(e){const t=this.getOffsetParent||Pb,n=this.getDimensions,r=await n(e.floating);return{reference:$S(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function HS(e){return Cn(e).direction==="rtl"}const zS={convertOffsetParentRelativeRectToViewportRelativeRect:DS,getDocumentElement:Wn,getClippingRect:jS,getOffsetParent:Pb,getElementRects:WS,getClientRects:FS,getDimensions:GS,getScale:Yi,isElement:kt,isRTL:HS};function Ob(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function YS(e,t){let n=null,r;const i=Wn(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:h}=c;if(a||t(),!f||!h)return;const g=ra(d),p=ra(i.clientWidth-(u+f)),m=ra(i.clientHeight-(d+h)),b=ra(u),y={rootMargin:-g+"px "+-p+"px "+-m+"px "+-b+"px",threshold:At(0,wi(1,l))||1};let _=!0;function w(E){const M=E[0].intersectionRatio;if(M!==l){if(!_)return o();M?o(!1,M):r=setTimeout(()=>{o(!1,1e-7)},1e3)}M===1&&!Ob(c,e.getBoundingClientRect())&&o(),_=!1}try{n=new IntersectionObserver(w,{...y,root:i.ownerDocument})}catch{n=new IntersectionObserver(w,y)}n.observe(e)}return o(!0),s}function Db(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=pf(e),u=i||s?[...c?go(c):[],...go(t)]:[];u.forEach(b=>{i&&b.addEventListener("scroll",n,{passive:!0}),s&&b.addEventListener("resize",n)});const d=c&&a?YS(c,n):null;let f=-1,h=null;o&&(h=new ResizeObserver(b=>{let[x]=b;x&&x.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var y;(y=h)==null||y.observe(t)})),n()}),c&&!l&&h.observe(c),h.observe(t));let g,p=l?Si(e):null;l&&m();function m(){const b=Si(e);p&&!Ob(p,b)&&n(),p=b,g=requestAnimationFrame(m)}return n(),()=>{var b;u.forEach(x=>{i&&x.removeEventListener("scroll",n),s&&x.removeEventListener("resize",n)}),d==null||d(),(b=h)==null||b.disconnect(),h=null,l&&cancelAnimationFrame(g)}}const Xc=dc,XS=AS,ZS=kS,US=IS,JS=RS,QS=(e,t,n)=>{const r=new Map,i={platform:zS,...n},s={...i.platform,_c:r};return _S(e,t,{...i,platform:s})};var KS=typeof document<"u",qS=function(){},$a=KS?C.useLayoutEffect:qS;function bl(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!bl(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const s=i[r];if(!(s==="_owner"&&e.$$typeof)&&!bl(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Fb(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Eg(e,t){const n=Fb(e);return Math.round(t*n)/n}function Zc(e){const t=B.useRef(e);return $a(()=>{t.current=e}),t}function e_(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:s,floating:o}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,d]=B.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=B.useState(r);bl(f,r)||h(r);const[g,p]=B.useState(null),[m,b]=B.useState(null),x=B.useCallback(R=>{R!==E.current&&(E.current=R,p(R))},[]),y=B.useCallback(R=>{R!==M.current&&(M.current=R,b(R))},[]),_=s||g,w=o||m,E=B.useRef(null),M=B.useRef(null),S=B.useRef(u),I=l!=null,A=Zc(l),k=Zc(i),D=Zc(c),N=B.useCallback(()=>{if(!E.current||!M.current)return;const R={placement:t,strategy:n,middleware:f};k.current&&(R.platform=k.current),QS(E.current,M.current,R).then(O=>{const $={...O,isPositioned:D.current!==!1};V.current&&!bl(S.current,$)&&(S.current=$,ll.flushSync(()=>{d($)}))})},[f,t,n,k,D]);$a(()=>{c===!1&&S.current.isPositioned&&(S.current.isPositioned=!1,d(R=>({...R,isPositioned:!1})))},[c]);const V=B.useRef(!1);$a(()=>(V.current=!0,()=>{V.current=!1}),[]),$a(()=>{if(_&&(E.current=_),w&&(M.current=w),_&&w){if(A.current)return A.current(_,w,N);N()}},[_,w,N,A,I]);const P=B.useMemo(()=>({reference:E,floating:M,setReference:x,setFloating:y}),[x,y]),T=B.useMemo(()=>({reference:_,floating:w}),[_,w]),L=B.useMemo(()=>{const R={position:n,left:0,top:0};if(!T.floating)return R;const O=Eg(T.floating,u.x),$=Eg(T.floating,u.y);return a?{...R,transform:"translate("+O+"px, "+$+"px)",...Fb(T.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:O,top:$}},[n,a,T.floating,u.x,u.y]);return B.useMemo(()=>({...u,update:N,refs:P,elements:T,floatingStyles:L}),[u,N,P,T,L])}const Tb=(e,t)=>({...XS(e),options:[e,t]}),t_=(e,t)=>({...ZS(e),options:[e,t]}),n_=(e,t)=>({...US(e),options:[e,t]}),r_=(e,t)=>({...JS(e),options:[e,t]}),Nb={...B},i_=Nb.useInsertionEffect,s_=i_||(e=>e());function Lb(e){const t=B.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return s_(()=>{t.current=e}),B.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current==null?void 0:t.current(...r)},[])}var Qu=typeof document<"u"?C.useLayoutEffect:C.useEffect;let Ag=!1,o_=0;const kg=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+o_++;function a_(){const[e,t]=B.useState(()=>Ag?kg():void 0);return Qu(()=>{e==null&&t(kg())},[]),B.useEffect(()=>{Ag=!0},[]),e}const l_=Nb.useId,c_=l_||a_;let mo;process.env.NODE_ENV!=="production"&&(mo=new Set);function u_(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const i="Floating UI: "+n.join(" ");if(!((e=mo)!=null&&e.has(i))){var s;(s=mo)==null||s.add(i),console.warn(i)}}function d_(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const i="Floating UI: "+n.join(" ");if(!((e=mo)!=null&&e.has(i))){var s;(s=mo)==null||s.add(i),console.error(i)}}function f_(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(i=>i(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(i=>i!==n))||[])}}}const h_=B.createContext(null),g_=B.createContext(null),p_=()=>{var e;return((e=B.useContext(h_))==null?void 0:e.id)||null},m_=()=>B.useContext(g_),b_="data-floating-ui-focusable";function v_(e){const{open:t=!1,onOpenChange:n,elements:r}=e,i=c_(),s=B.useRef({}),[o]=B.useState(()=>f_()),a=p_()!=null;if(process.env.NODE_ENV!=="production"){const h=r.reference;h&&!kt(h)&&d_("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=B.useState(r.reference),u=Lb((h,g,p)=>{s.current.openEvent=h?g:void 0,o.emit("openchange",{open:h,event:g,reason:p,nested:a}),n==null||n(h,g,p)}),d=B.useMemo(()=>({setPositionReference:c}),[]),f=B.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return B.useMemo(()=>({dataRef:s,open:t,onOpenChange:u,elements:f,events:o,floatingId:i,refs:d}),[t,u,f,o,i,d])}function x_(e){e===void 0&&(e={});const{nodeId:t}=e,n=v_({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,i=r.elements,[s,o]=B.useState(null),[a,l]=B.useState(null),u=(i==null?void 0:i.domReference)||s,d=B.useRef(null),f=m_();Qu(()=>{u&&(d.current=u)},[u]);const h=e_({...e,elements:{...i,...a&&{reference:a}}}),g=B.useCallback(y=>{const _=kt(y)?{getBoundingClientRect:()=>y.getBoundingClientRect(),contextElement:y}:y;l(_),h.refs.setReference(_)},[h.refs]),p=B.useCallback(y=>{(kt(y)||y===null)&&(d.current=y,o(y)),(kt(h.refs.reference.current)||h.refs.reference.current===null||y!==null&&!kt(y))&&h.refs.setReference(y)},[h.refs]),m=B.useMemo(()=>({...h.refs,setReference:p,setPositionReference:g,domReference:d}),[h.refs,p,g]),b=B.useMemo(()=>({...h.elements,domReference:u}),[h.elements,u]),x=B.useMemo(()=>({...h,...r,refs:m,elements:b,nodeId:t}),[h,m,b,t,r]);return Qu(()=>{r.dataRef.current.floatingContext=x;const y=f==null?void 0:f.nodesRef.current.find(_=>_.id===t);y&&(y.context=x)}),B.useMemo(()=>({...h,context:x,refs:m,elements:b}),[h,m,b,x])}const Rg="active",Pg="selected";function Uc(e,t,n){const r=new Map,i=n==="item";let s=e;if(i&&e){const{[Rg]:o,[Pg]:a,...l}=e;s=l}return{...n==="floating"&&{tabIndex:-1,[b_]:""},...s,...t.map(o=>{const a=o?o[n]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((o,a)=>(a&&Object.entries(a).forEach(l=>{let[c,u]=l;if(!(i&&[Rg,Pg].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var d;(d=r.get(c))==null||d.push(u),o[c]=function(){for(var f,h=arguments.length,g=new Array(h),p=0;p<h;p++)g[p]=arguments[p];return(f=r.get(c))==null?void 0:f.map(m=>m(...g)).find(m=>m!==void 0)}}}else o[c]=u}),o),{})}}function y_(e){e===void 0&&(e=[]);const t=e.map(a=>a==null?void 0:a.reference),n=e.map(a=>a==null?void 0:a.floating),r=e.map(a=>a==null?void 0:a.item),i=B.useCallback(a=>Uc(a,e,"reference"),t),s=B.useCallback(a=>Uc(a,e,"floating"),n),o=B.useCallback(a=>Uc(a,e,"item"),r);return B.useMemo(()=>({getReferenceProps:i,getFloatingProps:s,getItemProps:o}),[i,s,o])}function Og(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}const C_=e=>({name:"inner",options:e,async fn(t){const{listRef:n,overflowRef:r,onFallbackChange:i,offset:s=0,index:o=0,minItemsVisible:a=4,referenceOverflowThreshold:l=0,scrollRef:c,...u}=gs(e,t),{rects:d,elements:{floating:f}}=t,h=n.current[o],g=(c==null?void 0:c.current)||f,p=f.clientTop||g.clientTop,m=f.clientTop!==0,b=g.clientTop!==0,x=f===g;if(process.env.NODE_ENV!=="production"&&(t.placement.startsWith("bottom")||u_('`placement` side must be "bottom" when using the `inner`',"middleware.")),!h)return{};const y={...t,...await Tb(-h.offsetTop-f.clientTop-d.reference.height/2-h.offsetHeight/2-s).fn(t)},_=await Xc(Og(y,g.scrollHeight+p+f.clientTop),u),w=await Xc(y,{...u,elementContext:"reference"}),E=At(0,_.top),M=y.y+E,A=(g.scrollHeight>g.clientHeight?k=>k:po)(At(0,g.scrollHeight+(m&&x||b?p*2:0)-E-At(0,_.bottom)));if(g.style.maxHeight=A+"px",g.scrollTop=E,i){const k=g.offsetHeight<h.offsetHeight*wi(a,n.current.length)-1||w.top>=-l||w.bottom>=-l;ll.flushSync(()=>i(k))}return r&&(r.current=await Xc(Og({...y,y:M},g.offsetHeight+p+f.clientTop),u)),{y:M}}});function w_(e,t){const{open:n,elements:r}=e,{enabled:i=!0,overflowRef:s,scrollRef:o,onChange:a}=t,l=Lb(a),c=B.useRef(!1),u=B.useRef(null),d=B.useRef(null);B.useEffect(()=>{if(!i)return;function h(p){if(p.ctrlKey||!g||s.current==null)return;const m=p.deltaY,b=s.current.top>=-.5,x=s.current.bottom>=-.5,y=g.scrollHeight-g.clientHeight,_=m<0?-1:1,w=m<0?"max":"min";g.scrollHeight<=g.clientHeight||(!b&&m>0||!x&&m<0?(p.preventDefault(),ll.flushSync(()=>{l(E=>E+Math[w](m,y*_))})):/firefox/i.test(fS())&&(g.scrollTop+=m))}const g=(o==null?void 0:o.current)||r.floating;if(n&&g)return g.addEventListener("wheel",h),requestAnimationFrame(()=>{u.current=g.scrollTop,s.current!=null&&(d.current={...s.current})}),()=>{u.current=null,d.current=null,g.removeEventListener("wheel",h)}},[i,n,r.floating,s,o,l]);const f=B.useMemo(()=>({onKeyDown(){c.current=!0},onWheel(){c.current=!1},onPointerMove(){c.current=!1},onScroll(){const h=(o==null?void 0:o.current)||r.floating;if(!(!s.current||!h||!c.current)){if(u.current!==null){const g=h.scrollTop-u.current;(s.current.bottom<-.5&&g<-1||s.current.top<-.5&&g>1)&&ll.flushSync(()=>l(p=>p+g))}requestAnimationFrame(()=>{u.current=h.scrollTop})}}}),[r.floating,l,s,o]);return B.useMemo(()=>i?{floating:f}:{},[i,f])}let ps=C.createContext({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});ps.displayName="FloatingContext";let mf=C.createContext(null);mf.displayName="PlacementContext";function S_(e){return C.useMemo(()=>e?typeof e=="string"?{to:e}:e:null,[e])}function __(){return C.useContext(ps).setReference}function I_(){return C.useContext(ps).getReferenceProps}function M_(){let{getFloatingProps:e,slot:t}=C.useContext(ps);return C.useCallback((...n)=>Object.assign({},e(...n),{"data-anchor":t.anchor}),[e,t])}function E_(e=null){e===!1&&(e=null),typeof e=="string"&&(e={to:e});let t=C.useContext(mf),n=C.useMemo(()=>e,[JSON.stringify(e,(i,s)=>{var o;return(o=s==null?void 0:s.outerHTML)!=null?o:s})]);xt(()=>{t==null||t(n??null)},[t,n]);let r=C.useContext(ps);return C.useMemo(()=>[r.setFloating,e?r.styles:{}],[r.setFloating,e,r.styles])}let Dg=4;function A_({children:e,enabled:t=!0}){let[n,r]=C.useState(null),[i,s]=C.useState(0),o=C.useRef(null),[a,l]=C.useState(null);k_(a);let c=t&&n!==null&&a!==null,{to:u="bottom",gap:d=0,offset:f=0,padding:h=0,inner:g}=R_(n,a),[p,m="center"]=u.split(" ");xt(()=>{c&&s(0)},[c]);let{refs:b,floatingStyles:x,context:y}=x_({open:c,placement:p==="selection"?m==="center"?"bottom":`bottom-${m}`:m==="center"?`${p}`:`${p}-${m}`,strategy:"absolute",transform:!1,middleware:[Tb({mainAxis:p==="selection"?0:d,crossAxis:f}),t_({padding:h}),p!=="selection"&&n_({padding:h}),p==="selection"&&g?C_({...g,padding:h,overflowRef:o,offset:i,minItemsVisible:Dg,referenceOverflowThreshold:h,onFallbackChange(k){var D,N;if(!k)return;let V=y.elements.floating;if(!V)return;let P=parseFloat(getComputedStyle(V).scrollPaddingBottom)||0,T=Math.min(Dg,V.childElementCount),L=0,R=0;for(let O of(N=(D=y.elements.floating)==null?void 0:D.childNodes)!=null?N:[])if(Cr(O)){let $=O.offsetTop,Y=$+O.clientHeight+P,W=V.scrollTop,G=W+V.clientHeight;if($>=W&&Y<=G)T--;else{R=Math.max(0,Math.min(Y,G)-Math.max($,W)),L=O.clientHeight;break}}T>=1&&s(O=>{let $=L*T-R+P;return O>=$?O:$})}}):null,r_({padding:h,apply({availableWidth:k,availableHeight:D,elements:N}){Object.assign(N.floating.style,{overflow:"auto",maxWidth:`${k}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${D}px)`})}})].filter(Boolean),whileElementsMounted:Db}),[_=p,w=m]=y.placement.split("-");p==="selection"&&(_="selection");let E=C.useMemo(()=>({anchor:[_,w].filter(Boolean).join(" ")}),[_,w]),M=w_(y,{overflowRef:o,onChange:s}),{getReferenceProps:S,getFloatingProps:I}=y_([M]),A=Le(k=>{l(k),b.setFloating(k)});return B.createElement(mf.Provider,{value:r},B.createElement(ps.Provider,{value:{setFloating:A,setReference:b.setReference,styles:x,getReferenceProps:S,getFloatingProps:I,slot:E}},e))}function k_(e){xt(()=>{if(!e)return;let t=new MutationObserver(()=>{let n=window.getComputedStyle(e).maxHeight,r=parseFloat(n);if(isNaN(r))return;let i=parseInt(n);isNaN(i)||r!==i&&(e.style.maxHeight=`${Math.ceil(r)}px`)});return t.observe(e,{attributes:!0,attributeFilter:["style"]}),()=>{t.disconnect()}},[e])}function R_(e,t){var n,r,i;let s=Jc((n=e==null?void 0:e.gap)!=null?n:"var(--anchor-gap, 0)",t),o=Jc((r=e==null?void 0:e.offset)!=null?r:"var(--anchor-offset, 0)",t),a=Jc((i=e==null?void 0:e.padding)!=null?i:"var(--anchor-padding, 0)",t);return{...e,gap:s,offset:o,padding:a}}function Jc(e,t,n=void 0){let r=Vo(),i=Le((l,c)=>{if(l==null)return[n,null];if(typeof l=="number")return[l,null];if(typeof l=="string"){if(!c)return[n,null];let u=Fg(l,c);return[u,d=>{let f=Vb(l);{let h=f.map(g=>window.getComputedStyle(c).getPropertyValue(g));r.requestAnimationFrame(function g(){r.nextFrame(g);let p=!1;for(let[b,x]of f.entries()){let y=window.getComputedStyle(c).getPropertyValue(x);if(h[b]!==y){h[b]=y,p=!0;break}}if(!p)return;let m=Fg(l,c);u!==m&&(d(m),u=m)})}return r.dispose}]}return[n,null]}),s=C.useMemo(()=>i(e,t)[0],[e,t]),[o=s,a]=C.useState();return xt(()=>{let[l,c]=i(e,t);if(a(l),!!c)return c(a)},[e,t]),o}function Vb(e){let t=/var\((.*)\)/.exec(e);if(t){let n=t[1].indexOf(",");if(n===-1)return[t[1]];let r=t[1].slice(0,n).trim(),i=t[1].slice(n+1).trim();return i?[r,...Vb(i)]:[r]}return[]}function Fg(e,t){let n=document.createElement("div");t.appendChild(n),n.style.setProperty("margin-top","0px","important"),n.style.setProperty("margin-top",e,"important");let r=parseFloat(window.getComputedStyle(n).marginTop)||0;return t.removeChild(n),r}let bf=C.createContext(null);bf.displayName="OpenClosedContext";var bo=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(bo||{});function P_(){return C.useContext(bf)}function O_({value:e,children:t}){return C.createElement(bf.Provider,{value:e},t)}function D_(e){throw new Error("Unexpected object: "+e)}var lt=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(lt||{});function ia(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),i=r??-1;switch(e.focus){case 0:{for(let s=0;s<n.length;++s)if(!t.resolveDisabled(n[s],s,n))return s;return r}case 1:{i===-1&&(i=n.length);for(let s=i-1;s>=0;--s)if(!t.resolveDisabled(n[s],s,n))return s;return r}case 2:{for(let s=i+1;s<n.length;++s)if(!t.resolveDisabled(n[s],s,n))return s;return r}case 3:{for(let s=n.length-1;s>=0;--s)if(!t.resolveDisabled(n[s],s,n))return s;return r}case 4:{for(let s=0;s<n.length;++s)if(t.resolveId(n[s],s,n)===e.id)return s;return r}case 5:return null;default:D_(e)}}function Bb(e){let t=Le(e),n=C.useRef(!1);C.useEffect(()=>(n.current=!1,()=>{n.current=!0,eb(()=>{n.current&&t()})}),[t])}let F_=C.createContext(!1);function T_(){return C.useContext(F_)}function N_(e){let t=T_(),n=C.useContext(Gb),[r,i]=C.useState(()=>{var s;if(!t&&n!==null)return(s=n.current)!=null?s:null;if(fi.isServer)return null;let o=e==null?void 0:e.getElementById("headlessui-portal-root");if(o)return o;if(e===null)return null;let a=e.createElement("div");return a.setAttribute("id","headlessui-portal-root"),e.body.appendChild(a)});return C.useEffect(()=>{r!==null&&(e!=null&&e.body.contains(r)||e==null||e.body.appendChild(r))},[r,e]),C.useEffect(()=>{t||n!==null&&i(n.current)},[n,i,t]),r}let jb=C.Fragment,L_=un(function(e,t){let{ownerDocument:n=null,...r}=e,i=C.useRef(null),s=wr(QC(f=>{i.current=f}),t),o=Zu(i.current),a=n??o,l=N_(a),c=C.useContext(G_),u=Vo(),d=cn();return Bb(()=>{var f;l&&l.childNodes.length<=0&&((f=l.parentElement)==null||f.removeChild(l))}),l?Vn.createPortal(C.createElement("div",{"data-headlessui-portal":"",ref:f=>{u.dispose(),c&&f&&u.add(c.register(f))}},d({ourProps:{ref:s},theirProps:r,slot:{},defaultTag:jb,name:"Portal"})),l):null});function V_(e,t){let n=wr(t),{enabled:r=!0,ownerDocument:i,...s}=e,o=cn();return r?C.createElement(L_,{...s,ownerDocument:i,ref:n}):o({ourProps:{ref:n},theirProps:s,slot:{},defaultTag:jb,name:"Portal"})}let B_=C.Fragment,Gb=C.createContext(null);function j_(e,t){let{target:n,...r}=e,i={ref:wr(t)},s=cn();return C.createElement(Gb.Provider,{value:n},s({ourProps:i,theirProps:r,defaultTag:B_,name:"Popover.Group"}))}let G_=C.createContext(null),$_=un(V_),W_=un(j_),H_=Object.assign($_,{Group:W_});const Wa={Idle:{kind:"Idle"},Tracked:e=>({kind:"Tracked",position:e}),Moved:{kind:"Moved"}};function $b(e){let t=e.getBoundingClientRect();return`${t.x},${t.y}`}function z_(e,t,n){let r=Wt();if(t.kind==="Tracked"){let i=function(){s!==$b(e)&&(r.dispose(),n())},{position:s}=t,o=new ResizeObserver(i);o.observe(e),r.add(()=>o.disconnect()),r.addEventListener(window,"scroll",i,{passive:!0}),r.addEventListener(window,"resize",i)}return()=>r.dispose()}let Tg=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Ng(e){var t,n;let r=(t=e.innerText)!=null?t:"",i=e.cloneNode(!0);if(!Cr(i))return r;let s=!1;for(let a of i.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))a.remove(),s=!0;let o=s?(n=i.innerText)!=null?n:"":r;return Tg.test(o)&&(o=o.replace(Tg,"")),o}function Y_(e){let t=e.getAttribute("aria-label");if(typeof t=="string")return t.trim();let n=e.getAttribute("aria-labelledby");if(n){let r=n.split(" ").map(i=>{let s=document.getElementById(i);if(s){let o=s.getAttribute("aria-label");return typeof o=="string"?o.trim():Ng(s).trim()}return null}).filter(Boolean);if(r.length>0)return r.join(", ")}return Ng(e).trim()}function X_(e){let t=C.useRef(""),n=C.useRef("");return Le(()=>{let r=e.current;if(!r)return"";let i=r.innerText;if(t.current===i)return n.current;let s=Y_(r).trim().toLowerCase();return t.current=i,n.current=s,s})}var Z_=Object.defineProperty,U_=(e,t,n)=>t in e?Z_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Lg=(e,t,n)=>(U_(e,typeof t!="symbol"?t+"":t,n),n),Mt=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Mt||{}),vl=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(vl||{}),He=(e=>(e[e.OpenMenu=0]="OpenMenu",e[e.CloseMenu=1]="CloseMenu",e[e.GoToItem=2]="GoToItem",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterItems=5]="RegisterItems",e[e.UnregisterItems=6]="UnregisterItems",e[e.SetButtonElement=7]="SetButtonElement",e[e.SetItemsElement=8]="SetItemsElement",e[e.SortItems=9]="SortItems",e[e.MarkButtonAsMoved=10]="MarkButtonAsMoved",e))(He||{});function Vg(e,t=n=>n){let n=e.activeItemIndex!==null?e.items[e.activeItemIndex]:null,r=yb(t(e.items.slice()),s=>s.dataRef.current.domRef.current),i=n?r.indexOf(n):null;return i===-1&&(i=null),{items:r,activeItemIndex:i}}let J_={1(e){if(e.menuState===1)return e;let t=e.buttonElement?Wa.Tracked($b(e.buttonElement)):e.buttonPositionState;return{...e,activeItemIndex:null,pendingFocus:{focus:lt.Nothing},menuState:1,buttonPositionState:t}},0(e,t){return e.menuState===0?e:{...e,__demoMode:!1,pendingFocus:t.focus,menuState:0,buttonPositionState:Wa.Idle}},2:(e,t)=>{var n,r,i,s,o;if(e.menuState===1)return e;let a={...e,searchQuery:"",activationTrigger:(n=t.trigger)!=null?n:1,__demoMode:!1};if(t.focus===lt.Nothing)return{...a,activeItemIndex:null};if(t.focus===lt.Specific)return{...a,activeItemIndex:e.items.findIndex(u=>u.id===t.id)};if(t.focus===lt.Previous){let u=e.activeItemIndex;if(u!==null){let d=e.items[u].dataRef.current.domRef,f=ia(t,{resolveItems:()=>e.items,resolveActiveIndex:()=>e.activeItemIndex,resolveId:h=>h.id,resolveDisabled:h=>h.dataRef.current.disabled});if(f!==null){let h=e.items[f].dataRef.current.domRef;if(((r=d.current)==null?void 0:r.previousElementSibling)===h.current||((i=h.current)==null?void 0:i.previousElementSibling)===null)return{...a,activeItemIndex:f}}}}else if(t.focus===lt.Next){let u=e.activeItemIndex;if(u!==null){let d=e.items[u].dataRef.current.domRef,f=ia(t,{resolveItems:()=>e.items,resolveActiveIndex:()=>e.activeItemIndex,resolveId:h=>h.id,resolveDisabled:h=>h.dataRef.current.disabled});if(f!==null){let h=e.items[f].dataRef.current.domRef;if(((s=d.current)==null?void 0:s.nextElementSibling)===h.current||((o=h.current)==null?void 0:o.nextElementSibling)===null)return{...a,activeItemIndex:f}}}}let l=Vg(e),c=ia(t,{resolveItems:()=>l.items,resolveActiveIndex:()=>l.activeItemIndex,resolveId:u=>u.id,resolveDisabled:u=>u.dataRef.current.disabled});return{...a,...l,activeItemIndex:c}},3:(e,t)=>{let n=e.searchQuery!==""?0:1,r=e.searchQuery+t.value.toLowerCase(),i=(e.activeItemIndex!==null?e.items.slice(e.activeItemIndex+n).concat(e.items.slice(0,e.activeItemIndex+n)):e.items).find(o=>{var a;return((a=o.dataRef.current.textValue)==null?void 0:a.startsWith(r))&&!o.dataRef.current.disabled}),s=i?e.items.indexOf(i):-1;return s===-1||s===e.activeItemIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeItemIndex:s,activationTrigger:1}},4(e){return e.searchQuery===""?e:{...e,searchQuery:"",searchActiveItemIndex:null}},5:(e,t)=>{let n=e.items.concat(t.items.map(i=>i)),r=e.activeItemIndex;return e.pendingFocus.focus!==lt.Nothing&&(r=ia(e.pendingFocus,{resolveItems:()=>n,resolveActiveIndex:()=>e.activeItemIndex,resolveId:i=>i.id,resolveDisabled:i=>i.dataRef.current.disabled})),{...e,items:n,activeItemIndex:r,pendingFocus:{focus:lt.Nothing},pendingShouldSort:!0}},6:(e,t)=>{let n=e.items,r=[],i=new Set(t.items);for(let[s,o]of n.entries())if(i.has(o.id)&&(r.push(s),i.delete(o.id),i.size===0))break;if(r.length>0){n=n.slice();for(let s of r.reverse())n.splice(s,1)}return{...e,items:n,activationTrigger:1}},7:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},8:(e,t)=>e.itemsElement===t.element?e:{...e,itemsElement:t.element},9:e=>e.pendingShouldSort?{...e,...Vg(e),pendingShouldSort:!1}:e,10(e){return e.buttonPositionState.kind!=="Tracked"?e:{...e,buttonPositionState:Wa.Moved}}};class vf extends hb{constructor(t){super(t),Lg(this,"actions",{registerItem:og(()=>{let n=[],r=new Set;return[(i,s)=>{r.has(s)||(r.add(s),n.push({id:i,dataRef:s}))},()=>(r.clear(),this.send({type:5,items:n.splice(0)}))]}),unregisterItem:og(()=>{let n=[];return[r=>n.push(r),()=>this.send({type:6,items:n.splice(0)})]})}),Lg(this,"selectors",{activeDescendantId(n){var r;let i=n.activeItemIndex,s=n.items;return i===null||(r=s[i])==null?void 0:r.id},isActive(n,r){var i;let s=n.activeItemIndex,o=n.items;return s!==null?((i=o[s])==null?void 0:i.id)===r:!1},shouldScrollIntoView(n,r){return n.__demoMode||n.menuState!==0||n.activationTrigger===0?!1:this.isActive(n,r)},didButtonMove(n){return n.buttonPositionState.kind==="Moved"}}),this.on(5,()=>{this.disposables.requestAnimationFrame(()=>{this.send({type:9})})});{let n=this.state.id,r=uf.get(null);this.disposables.add(r.on(pb.Push,i=>{!r.selectors.isTop(i,n)&&this.state.menuState===0&&this.send({type:1})})),this.on(0,()=>r.actions.push(n)),this.on(1,()=>r.actions.pop(n))}this.disposables.group(n=>{this.on(1,r=>{r.buttonElement&&(n.dispose(),n.add(z_(r.buttonElement,r.buttonPositionState,()=>{this.send({type:10})})))})})}static new({id:t,__demoMode:n=!1}){return new vf({id:t,__demoMode:n,menuState:n?0:1,buttonElement:null,itemsElement:null,items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1,pendingShouldSort:!1,pendingFocus:{focus:lt.Nothing},buttonPositionState:Wa.Idle})}reduce(t,n){return fs(n.type,J_,t,n)}}const Wb=C.createContext(null);function xf(e){let t=C.useContext(Wb);if(t===null){let n=new Error(`<${e} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Hb),n}return t}function Hb({id:e,__demoMode:t=!1}){let n=C.useMemo(()=>vf.new({id:e,__demoMode:t}),[]);return Bb(()=>n.dispose()),n}let Q_=C.Fragment;function K_(e,t){let n=C.useId(),{__demoMode:r=!1,...i}=e,s=Hb({id:n,__demoMode:r}),[o,a,l]=mn(s,m=>[m.menuState,m.itemsElement,m.buttonElement]),c=wr(t),u=uf.get(null),d=mn(u,C.useCallback(m=>u.selectors.isTop(m,n),[u,n]));Tw(d,[l,a],(m,b)=>{var x;s.send({type:He.CloseMenu}),ff(b,df.Loose)||(m.preventDefault(),(x=s.state.buttonElement)==null||x.focus())});let f=Le(()=>{s.send({type:He.CloseMenu})}),h=ds({open:o===Mt.Open,close:f}),g={ref:c},p=cn();return C.createElement(A_,null,C.createElement(Wb.Provider,{value:s},C.createElement(O_,{value:fs(o,{[Mt.Open]:bo.Open,[Mt.Closed]:bo.Closed})},p({ourProps:g,theirProps:i,slot:h,defaultTag:Q_,name:"Menu"}))))}let q_="button";function e4(e,t){let n=xf("Menu.Button"),r=C.useId(),{id:i=`headlessui-menu-button-${r}`,disabled:s=!1,autoFocus:o=!1,...a}=e,l=C.useRef(null),c=I_(),u=wr(t,l,__(),Le(A=>n.send({type:He.SetButtonElement,element:A}))),d=Le(A=>{switch(A.key){case bt.Space:case bt.Enter:case bt.ArrowDown:A.preventDefault(),A.stopPropagation(),n.send({type:He.OpenMenu,focus:{focus:lt.First}});break;case bt.ArrowUp:A.preventDefault(),A.stopPropagation(),n.send({type:He.OpenMenu,focus:{focus:lt.Last}});break}}),f=Le(A=>{switch(A.key){case bt.Space:A.preventDefault();break}}),[h,g,p]=mn(n,A=>[A.menuState,A.buttonElement,A.itemsElement]),m=h===Mt.Open;Vw(m,{trigger:g,action:C.useCallback(A=>{if(g!=null&&g.contains(A.target))return na.Ignore;let k=A.target.closest('[role="menuitem"]:not([data-disabled])');return Cr(k)?na.Select(k):p!=null&&p.contains(A.target)?na.Ignore:na.Close},[g,p]),close:C.useCallback(()=>n.send({type:He.CloseMenu}),[]),select:C.useCallback(A=>A.click(),[])});let b=aw(A=>{var k;s||(h===Mt.Open?(Vn.flushSync(()=>n.send({type:He.CloseMenu})),(k=l.current)==null||k.focus({preventScroll:!0})):(A.preventDefault(),n.send({type:He.OpenMenu,focus:{focus:lt.Nothing},trigger:vl.Pointer})))}),{isFocusVisible:x,focusProps:y}=kC({autoFocus:o}),{isHovered:_,hoverProps:w}=AC({isDisabled:s}),{pressed:E,pressProps:M}=NC({disabled:s}),S=ds({open:h===Mt.Open,active:E||h===Mt.Open,disabled:s,hover:_,focus:x,autofocus:o}),I=rb(c(),{ref:u,id:i,type:Bw(e,l.current),"aria-haspopup":"menu","aria-controls":p==null?void 0:p.id,"aria-expanded":h===Mt.Open,disabled:s||void 0,autoFocus:o,onKeyDown:d,onKeyUp:f},b,y,w,M);return cn()({ourProps:I,theirProps:a,slot:S,defaultTag:q_,name:"Menu.Button"})}let t4="div",n4=Wu.RenderStrategy|Wu.Static;function r4(e,t){let n=C.useId(),{id:r=`headlessui-menu-items-${n}`,anchor:i,portal:s=!1,modal:o=!0,transition:a=!1,...l}=e,c=S_(i),u=xf("Menu.Items"),[d,f]=E_(c),h=M_(),[g,p]=C.useState(null),m=wr(t,c?d:null,Le(R=>u.send({type:He.SetItemsElement,element:R})),p),[b,x]=mn(u,R=>[R.menuState,R.buttonElement]),y=Zu(x),_=Zu(g);c&&(s=!0);let w=P_(),[E,M]=Qw(a,g,w!==null?(w&bo.Open)===bo.Open:b===Mt.Open);ww(E,x,()=>{u.send({type:He.CloseMenu})});let S=mn(u,R=>R.__demoMode),I=S?!1:o&&b===Mt.Open;Yw(I,_);let A=S?!1:o&&b===Mt.Open;Cw(A,{allowed:C.useCallback(()=>[x,g],[x,g])});let k=mn(u,u.selectors.didButtonMove)?!1:E;C.useEffect(()=>{let R=g;R&&b===Mt.Open&&(DC(R)||R.focus({preventScroll:!0}))},[b,g]),nS(b===Mt.Open,{container:g,accept(R){return R.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:R.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(R){R.setAttribute("role","none")}});let D=Vo(),N=Le(R=>{var O,$,Y;switch(D.dispose(),R.key){case bt.Space:if(u.state.searchQuery!=="")return R.preventDefault(),R.stopPropagation(),u.send({type:He.Search,value:R.key});case bt.Enter:if(R.preventDefault(),R.stopPropagation(),u.state.activeItemIndex!==null){let{dataRef:W}=u.state.items[u.state.activeItemIndex];($=(O=W.current)==null?void 0:O.domRef.current)==null||$.click()}u.send({type:He.CloseMenu}),xb(u.state.buttonElement);break;case bt.ArrowDown:return R.preventDefault(),R.stopPropagation(),u.send({type:He.GoToItem,focus:lt.Next});case bt.ArrowUp:return R.preventDefault(),R.stopPropagation(),u.send({type:He.GoToItem,focus:lt.Previous});case bt.Home:case bt.PageUp:return R.preventDefault(),R.stopPropagation(),u.send({type:He.GoToItem,focus:lt.First});case bt.End:case bt.PageDown:return R.preventDefault(),R.stopPropagation(),u.send({type:He.GoToItem,focus:lt.Last});case bt.Escape:R.preventDefault(),R.stopPropagation(),Vn.flushSync(()=>u.send({type:He.CloseMenu})),(Y=u.state.buttonElement)==null||Y.focus({preventScroll:!0});break;case bt.Tab:R.preventDefault(),R.stopPropagation(),Vn.flushSync(()=>u.send({type:He.CloseMenu})),Pw(u.state.buttonElement,R.shiftKey?Xu.Previous:Xu.Next);break;default:R.key.length===1&&(u.send({type:He.Search,value:R.key}),D.setTimeout(()=>u.send({type:He.ClearSearch}),350));break}}),V=Le(R=>{switch(R.key){case bt.Space:R.preventDefault();break}}),P=ds({open:b===Mt.Open}),T=rb(c?h():{},{"aria-activedescendant":mn(u,u.selectors.activeDescendantId),"aria-labelledby":mn(u,R=>{var O;return(O=R.buttonElement)==null?void 0:O.id}),id:r,onKeyDown:N,onKeyUp:V,role:"menu",tabIndex:b===Mt.Open?0:void 0,ref:m,style:{...l.style,...f,"--button-width":ow(E,x,!0).width},...Jw(M)}),L=cn();return C.createElement(H_,{enabled:s?e.static||E:!1,ownerDocument:y},L({ourProps:T,theirProps:l,slot:P,defaultTag:t4,features:n4,visible:k,name:"Menu.Items"}))}let i4=C.Fragment;function s4(e,t){let n=C.useId(),{id:r=`headlessui-menu-item-${n}`,disabled:i=!1,...s}=e,o=xf("Menu.Item"),a=mn(o,k=>o.selectors.isActive(k,r)),l=C.useRef(null),c=wr(t,l),u=mn(o,k=>o.selectors.shouldScrollIntoView(k,r));xt(()=>{if(u)return Wt().requestAnimationFrame(()=>{var k,D;(D=(k=l.current)==null?void 0:k.scrollIntoView)==null||D.call(k,{block:"nearest"})})},[u,l]);let d=X_(l),f=C.useRef({disabled:i,domRef:l,get textValue(){return d()}});xt(()=>{f.current.disabled=i},[f,i]),xt(()=>(o.actions.registerItem(r,f),()=>o.actions.unregisterItem(r)),[f,r]);let h=Le(()=>{o.send({type:He.CloseMenu})}),g=Le(k=>{if(i)return k.preventDefault();o.send({type:He.CloseMenu}),xb(o.state.buttonElement)}),p=Le(()=>{if(i)return o.send({type:He.GoToItem,focus:lt.Nothing});o.send({type:He.GoToItem,focus:lt.Specific,id:r})}),m=Xw(),b=Le(k=>m.update(k)),x=Le(k=>{m.wasMoved(k)&&(i||a||o.send({type:He.GoToItem,focus:lt.Specific,id:r,trigger:vl.Pointer}))}),y=Le(k=>{m.wasMoved(k)&&(i||a&&o.state.activationTrigger===vl.Pointer&&o.send({type:He.GoToItem,focus:lt.Nothing}))}),[_,w]=cb(),[E,M]=KC(),S=ds({active:a,focus:a,disabled:i,close:h}),I={id:r,ref:c,role:"menuitem",tabIndex:i===!0?void 0:-1,"aria-disabled":i===!0?!0:void 0,"aria-labelledby":_,"aria-describedby":E,disabled:void 0,onClick:g,onFocus:p,onPointerEnter:b,onMouseEnter:b,onPointerMove:x,onMouseMove:x,onPointerLeave:y,onMouseLeave:y},A=cn();return C.createElement(w,null,C.createElement(M,null,A({ourProps:I,theirProps:s,slot:S,defaultTag:i4,name:"Menu.Item"})))}let o4="div";function a4(e,t){let[n,r]=cb(),i=e,s={ref:t,"aria-labelledby":n,role:"group"},o=cn();return C.createElement(r,null,o({ourProps:s,theirProps:i,slot:{},defaultTag:o4,name:"Menu.Section"}))}let l4="header";function c4(e,t){let n=C.useId(),{id:r=`headlessui-menu-heading-${n}`,...i}=e,s=cf();xt(()=>s.register(r),[r,s.register]);let o={id:r,ref:t,role:"presentation",...s.props};return cn()({ourProps:o,theirProps:i,slot:{},defaultTag:l4,name:"Menu.Heading"})}let u4="div";function d4(e,t){let n=e,r={ref:t,role:"separator"};return cn()({ourProps:r,theirProps:n,slot:{},defaultTag:u4,name:"Menu.Separator"})}let f4=un(K_),zb=un(e4),Yb=un(r4),Xb=un(s4),h4=un(a4),g4=un(c4),p4=un(d4),m4=Object.assign(f4,{Button:zb,Items:Yb,Item:Xb,Section:h4,Heading:g4,Separator:p4});const b4=({menuButton:e,menuItems:t})=>{const[n,r]=C.useState(),[i,s]=C.useState(!1),o=a=>{const l=a.currentTarget.getBoundingClientRect(),c=160,d=window.innerWidth-l.right,f={top:l.bottom+window.scrollY};d>=c?f.left=l.left+window.scrollX:f.right=d+window.scrollX,r(f),s(!0)};return C.useEffect(()=>{const a=()=>s(!1);return window.addEventListener("scroll",a,!0),window.addEventListener("resize",a),()=>{window.removeEventListener("scroll",a),window.removeEventListener("resize",a)}},[]),v.jsxs(m4,{as:"div","data-open":i,className:"relative",children:[v.jsx(zb,{"data-testid":"dropdown-menu-button",onClick:o,className:"headlessui-menu-button",children:e}),i&&n&&v.jsx(Yb,{className:"fixed min-w-30 shadow-lg rounded-md z-40 overflow-hidden",style:{top:`${n.top}px`,left:n.left!==void 0?`${n.left}px`:"auto",right:n.right!==void 0?`${n.right}px`:"auto",backgroundColor:"var(--bg-color)",border:"1px solid var(--border-color)"},children:t.map(({label:a,icon:l,action:c,disabled:u=!1},d)=>v.jsx(Xb,{disabled:u,children:({close:f})=>v.jsxs("button",{"data-testid":`dropdown-menu-item-${a.toLowerCase().replace(/\s+/g,"-")}`,onClick:()=>{u||(c(),f(),s(!1))},disabled:u,className:`w-full px-4 py-2 text-xs text-left flex items-center gap-2 transition-colors ${u?"opacity-50 cursor-not-allowed":"cursor-pointer"}`,style:{color:"var(--text-color)"},onMouseEnter:h=>{u||(h.currentTarget.style.backgroundColor="var(--hover-bg-color)")},onMouseLeave:h=>{h.currentTarget.style.backgroundColor="transparent"},children:[l,a]})},d))})]})};function _i(e){"@babel/helpers - typeof";return _i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_i(e)}function v4(e,t){if(_i(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(_i(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Zb(e){var t=v4(e,"string");return _i(t)=="symbol"?t:t+""}function Ls(e,t,n){return(t=Zb(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ee(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Bg(Object(n),!0).forEach(function(r){Ls(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bg(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function x4(e){if(Array.isArray(e))return e}function y4(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,c=!1;try{if(s=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}function Ku(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ub(e,t){if(e){if(typeof e=="string")return Ku(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ku(e,t):void 0}}function C4(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
22
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gr(e,t){return x4(e)||y4(e,t)||Ub(e,t)||C4()}function w4(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Hn(e,t){if(e==null)return{};var n,r,i=w4(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var S4=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function Jb(e){var t=e.defaultInputValue,n=t===void 0?"":t,r=e.defaultMenuIsOpen,i=r===void 0?!1:r,s=e.defaultValue,o=s===void 0?null:s,a=e.inputValue,l=e.menuIsOpen,c=e.onChange,u=e.onInputChange,d=e.onMenuClose,f=e.onMenuOpen,h=e.value,g=Hn(e,S4),p=C.useState(a!==void 0?a:n),m=gr(p,2),b=m[0],x=m[1],y=C.useState(l!==void 0?l:i),_=gr(y,2),w=_[0],E=_[1],M=C.useState(h!==void 0?h:o),S=gr(M,2),I=S[0],A=S[1],k=C.useCallback(function(R,O){typeof c=="function"&&c(R,O),A(R)},[c]),D=C.useCallback(function(R,O){var $;typeof u=="function"&&($=u(R,O)),x($!==void 0?$:R)},[u]),N=C.useCallback(function(){typeof f=="function"&&f(),E(!0)},[f]),V=C.useCallback(function(){typeof d=="function"&&d(),E(!1)},[d]),P=a!==void 0?a:b,T=l!==void 0?l:w,L=h!==void 0?h:I;return ee(ee({},g),{},{inputValue:P,menuIsOpen:T,onChange:k,onInputChange:D,onMenuClose:V,onMenuOpen:N,value:L})}function te(){return te=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},te.apply(null,arguments)}function _4(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jg(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,Zb(r.key),r)}}function I4(e,t,n){return t&&jg(e.prototype,t),n&&jg(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function qu(e,t){return qu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},qu(e,t)}function M4(e,t){if(typeof t!="function"&&t!==null)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&&qu(e,t)}function xl(e){return xl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},xl(e)}function Qb(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Qb=function(){return!!e})()}function E4(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function A4(e,t){if(t&&(_i(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return E4(e)}function k4(e){var t=Qb();return function(){var n,r=xl(e);if(t){var i=xl(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return A4(this,n)}}function R4(e){if(Array.isArray(e))return Ku(e)}function P4(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function O4(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
23
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Xi(e){return R4(e)||P4(e)||Ub(e)||O4()}function D4(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function F4(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var T4=function(){function e(n){var r=this;this._insertTag=function(i){var s;r.tags.length===0?r.insertionPoint?s=r.insertionPoint.nextSibling:r.prepend?s=r.container.firstChild:s=r.before:s=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(i,s),r.tags.push(i)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(F4(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var s=D4(i);try{s.insertRule(r,s.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var i;return(i=r.parentNode)==null?void 0:i.removeChild(r)}),this.tags=[],this.ctr=0},e}(),_t="-ms-",yl="-moz-",ke="-webkit-",Kb="comm",yf="rule",Cf="decl",N4="@import",qb="@keyframes",L4="@layer",V4=Math.abs,hc=String.fromCharCode,B4=Object.assign;function j4(e,t){return vt(e,0)^45?(((t<<2^vt(e,0))<<2^vt(e,1))<<2^vt(e,2))<<2^vt(e,3):0}function ev(e){return e.trim()}function G4(e,t){return(e=t.exec(e))?e[0]:e}function Re(e,t,n){return e.replace(t,n)}function ed(e,t){return e.indexOf(t)}function vt(e,t){return e.charCodeAt(t)|0}function vo(e,t,n){return e.slice(t,n)}function An(e){return e.length}function wf(e){return e.length}function sa(e,t){return t.push(e),e}function $4(e,t){return e.map(t).join("")}var gc=1,ns=1,tv=0,$t=0,ct=0,ms="";function pc(e,t,n,r,i,s,o){return{value:e,root:t,parent:n,type:r,props:i,children:s,line:gc,column:ns,length:o,return:""}}function _s(e,t){return B4(pc("",null,null,"",null,null,0),e,{length:-e.length},t)}function W4(){return ct}function H4(){return ct=$t>0?vt(ms,--$t):0,ns--,ct===10&&(ns=1,gc--),ct}function Xt(){return ct=$t<tv?vt(ms,$t++):0,ns++,ct===10&&(ns=1,gc++),ct}function Fn(){return vt(ms,$t)}function Ha(){return $t}function $o(e,t){return vo(ms,e,t)}function xo(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function nv(e){return gc=ns=1,tv=An(ms=e),$t=0,[]}function rv(e){return ms="",e}function za(e){return ev($o($t-1,td(e===91?e+2:e===40?e+1:e)))}function z4(e){for(;(ct=Fn())&&ct<33;)Xt();return xo(e)>2||xo(ct)>3?"":" "}function Y4(e,t){for(;--t&&Xt()&&!(ct<48||ct>102||ct>57&&ct<65||ct>70&&ct<97););return $o(e,Ha()+(t<6&&Fn()==32&&Xt()==32))}function td(e){for(;Xt();)switch(ct){case e:return $t;case 34:case 39:e!==34&&e!==39&&td(ct);break;case 40:e===41&&td(e);break;case 92:Xt();break}return $t}function X4(e,t){for(;Xt()&&e+ct!==57;)if(e+ct===84&&Fn()===47)break;return"/*"+$o(t,$t-1)+"*"+hc(e===47?e:Xt())}function Z4(e){for(;!xo(Fn());)Xt();return $o(e,$t)}function U4(e){return rv(Ya("",null,null,null,[""],e=nv(e),0,[0],e))}function Ya(e,t,n,r,i,s,o,a,l){for(var c=0,u=0,d=o,f=0,h=0,g=0,p=1,m=1,b=1,x=0,y="",_=i,w=s,E=r,M=y;m;)switch(g=x,x=Xt()){case 40:if(g!=108&&vt(M,d-1)==58){ed(M+=Re(za(x),"&","&\f"),"&\f")!=-1&&(b=-1);break}case 34:case 39:case 91:M+=za(x);break;case 9:case 10:case 13:case 32:M+=z4(g);break;case 92:M+=Y4(Ha()-1,7);continue;case 47:switch(Fn()){case 42:case 47:sa(J4(X4(Xt(),Ha()),t,n),l);break;default:M+="/"}break;case 123*p:a[c++]=An(M)*b;case 125*p:case 59:case 0:switch(x){case 0:case 125:m=0;case 59+u:b==-1&&(M=Re(M,/\f/g,"")),h>0&&An(M)-d&&sa(h>32?$g(M+";",r,n,d-1):$g(Re(M," ","")+";",r,n,d-2),l);break;case 59:M+=";";default:if(sa(E=Gg(M,t,n,c,u,i,a,y,_=[],w=[],d),s),x===123)if(u===0)Ya(M,t,E,E,_,s,d,a,w);else switch(f===99&&vt(M,3)===110?100:f){case 100:case 108:case 109:case 115:Ya(e,E,E,r&&sa(Gg(e,E,E,0,0,i,a,y,i,_=[],d),w),i,w,d,a,r?_:w);break;default:Ya(M,E,E,E,[""],w,0,a,w)}}c=u=h=0,p=b=1,y=M="",d=o;break;case 58:d=1+An(M),h=g;default:if(p<1){if(x==123)--p;else if(x==125&&p++==0&&H4()==125)continue}switch(M+=hc(x),x*p){case 38:b=u>0?1:(M+="\f",-1);break;case 44:a[c++]=(An(M)-1)*b,b=1;break;case 64:Fn()===45&&(M+=za(Xt())),f=Fn(),u=d=An(y=M+=Z4(Ha())),x++;break;case 45:g===45&&An(M)==2&&(p=0)}}return s}function Gg(e,t,n,r,i,s,o,a,l,c,u){for(var d=i-1,f=i===0?s:[""],h=wf(f),g=0,p=0,m=0;g<r;++g)for(var b=0,x=vo(e,d+1,d=V4(p=o[g])),y=e;b<h;++b)(y=ev(p>0?f[b]+" "+x:Re(x,/&\f/g,f[b])))&&(l[m++]=y);return pc(e,t,n,i===0?yf:a,l,c,u)}function J4(e,t,n){return pc(e,t,n,Kb,hc(W4()),vo(e,2,-2),0)}function $g(e,t,n,r){return pc(e,t,n,Cf,vo(e,0,r),vo(e,r+1,-1),r)}function Zi(e,t){for(var n="",r=wf(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function Q4(e,t,n,r){switch(e.type){case L4:if(e.children.length)break;case N4:case Cf:return e.return=e.return||e.value;case Kb:return"";case qb:return e.return=e.value+"{"+Zi(e.children,r)+"}";case yf:e.value=e.props.join(",")}return An(n=Zi(e.children,r))?e.return=e.value+"{"+n+"}":""}function K4(e){var t=wf(e);return function(n,r,i,s){for(var o="",a=0;a<t;a++)o+=e[a](n,r,i,s)||"";return o}}function q4(e){return function(t){t.root||(t=t.return)&&e(t)}}function eI(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var tI=function(t,n,r){for(var i=0,s=0;i=s,s=Fn(),i===38&&s===12&&(n[r]=1),!xo(s);)Xt();return $o(t,$t)},nI=function(t,n){var r=-1,i=44;do switch(xo(i)){case 0:i===38&&Fn()===12&&(n[r]=1),t[r]+=tI($t-1,n,r);break;case 2:t[r]+=za(i);break;case 4:if(i===44){t[++r]=Fn()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=hc(i)}while(i=Xt());return t},rI=function(t,n){return rv(nI(nv(t),n))},Wg=new WeakMap,iI=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,i=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!Wg.get(r))&&!i){Wg.set(t,!0);for(var s=[],o=rI(n,s),a=r.props,l=0,c=0;l<o.length;l++)for(var u=0;u<a.length;u++,c++)t.props[c]=s[l]?o[l].replace(/&\f/g,a[u]):a[u]+" "+o[l]}}},sI=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function iv(e,t){switch(j4(e,t)){case 5103:return ke+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return ke+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return ke+e+yl+e+_t+e+e;case 6828:case 4268:return ke+e+_t+e+e;case 6165:return ke+e+_t+"flex-"+e+e;case 5187:return ke+e+Re(e,/(\w+).+(:[^]+)/,ke+"box-$1$2"+_t+"flex-$1$2")+e;case 5443:return ke+e+_t+"flex-item-"+Re(e,/flex-|-self/,"")+e;case 4675:return ke+e+_t+"flex-line-pack"+Re(e,/align-content|flex-|-self/,"")+e;case 5548:return ke+e+_t+Re(e,"shrink","negative")+e;case 5292:return ke+e+_t+Re(e,"basis","preferred-size")+e;case 6060:return ke+"box-"+Re(e,"-grow","")+ke+e+_t+Re(e,"grow","positive")+e;case 4554:return ke+Re(e,/([^-])(transform)/g,"$1"+ke+"$2")+e;case 6187:return Re(Re(Re(e,/(zoom-|grab)/,ke+"$1"),/(image-set)/,ke+"$1"),e,"")+e;case 5495:case 3959:return Re(e,/(image-set\([^]*)/,ke+"$1$`$1");case 4968:return Re(Re(e,/(.+:)(flex-)?(.*)/,ke+"box-pack:$3"+_t+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ke+e+e;case 4095:case 3583:case 4068:case 2532:return Re(e,/(.+)-inline(.+)/,ke+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(An(e)-1-t>6)switch(vt(e,t+1)){case 109:if(vt(e,t+4)!==45)break;case 102:return Re(e,/(.+:)(.+)-([^]+)/,"$1"+ke+"$2-$3$1"+yl+(vt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~ed(e,"stretch")?iv(Re(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(vt(e,t+1)!==115)break;case 6444:switch(vt(e,An(e)-3-(~ed(e,"!important")&&10))){case 107:return Re(e,":",":"+ke)+e;case 101:return Re(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ke+(vt(e,14)===45?"inline-":"")+"box$3$1"+ke+"$2$3$1"+_t+"$2box$3")+e}break;case 5936:switch(vt(e,t+11)){case 114:return ke+e+_t+Re(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ke+e+_t+Re(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ke+e+_t+Re(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ke+e+_t+e+e}return e}var oI=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case Cf:t.return=iv(t.value,t.length);break;case qb:return Zi([_s(t,{value:Re(t.value,"@","@"+ke)})],i);case yf:if(t.length)return $4(t.props,function(s){switch(G4(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Zi([_s(t,{props:[Re(s,/:(read-\w+)/,":"+yl+"$1")]})],i);case"::placeholder":return Zi([_s(t,{props:[Re(s,/:(plac\w+)/,":"+ke+"input-$1")]}),_s(t,{props:[Re(s,/:(plac\w+)/,":"+yl+"$1")]}),_s(t,{props:[Re(s,/:(plac\w+)/,_t+"input-$1")]})],i)}return""})}},aI=[oI],lI=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(p){var m=p.getAttribute("data-emotion");m.indexOf(" ")!==-1&&(document.head.appendChild(p),p.setAttribute("data-s",""))})}var i=t.stylisPlugins||aI,s={},o,a=[];o=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(p){for(var m=p.getAttribute("data-emotion").split(" "),b=1;b<m.length;b++)s[m[b]]=!0;a.push(p)});var l,c=[iI,sI];{var u,d=[Q4,q4(function(p){u.insert(p)})],f=K4(c.concat(i,d)),h=function(m){return Zi(U4(m),f)};l=function(m,b,x,y){u=x,h(m?m+"{"+b.styles+"}":b.styles),y&&(g.inserted[b.name]=!0)}}var g={key:n,sheet:new T4({key:n,container:o,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:s,registered:{},insert:l};return g.sheet.hydrate(a),g},nd={exports:{}},Oe={};/** @license React v16.13.1
24
+ * react-is.production.min.js
25
+ *
26
+ * Copyright (c) Facebook, Inc. and its affiliates.
27
+ *
28
+ * This source code is licensed under the MIT license found in the
29
+ * LICENSE file in the root directory of this source tree.
30
+ */var Hg;function cI(){if(Hg)return Oe;Hg=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function y(w){if(typeof w=="object"&&w!==null){var E=w.$$typeof;switch(E){case t:switch(w=w.type,w){case l:case c:case r:case s:case i:case d:return w;default:switch(w=w&&w.$$typeof,w){case a:case u:case g:case h:case o:return w;default:return E}}case n:return E}}}function _(w){return y(w)===c}return Oe.AsyncMode=l,Oe.ConcurrentMode=c,Oe.ContextConsumer=a,Oe.ContextProvider=o,Oe.Element=t,Oe.ForwardRef=u,Oe.Fragment=r,Oe.Lazy=g,Oe.Memo=h,Oe.Portal=n,Oe.Profiler=s,Oe.StrictMode=i,Oe.Suspense=d,Oe.isAsyncMode=function(w){return _(w)||y(w)===l},Oe.isConcurrentMode=_,Oe.isContextConsumer=function(w){return y(w)===a},Oe.isContextProvider=function(w){return y(w)===o},Oe.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===t},Oe.isForwardRef=function(w){return y(w)===u},Oe.isFragment=function(w){return y(w)===r},Oe.isLazy=function(w){return y(w)===g},Oe.isMemo=function(w){return y(w)===h},Oe.isPortal=function(w){return y(w)===n},Oe.isProfiler=function(w){return y(w)===s},Oe.isStrictMode=function(w){return y(w)===i},Oe.isSuspense=function(w){return y(w)===d},Oe.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===r||w===c||w===s||w===i||w===d||w===f||typeof w=="object"&&w!==null&&(w.$$typeof===g||w.$$typeof===h||w.$$typeof===o||w.$$typeof===a||w.$$typeof===u||w.$$typeof===m||w.$$typeof===b||w.$$typeof===x||w.$$typeof===p)},Oe.typeOf=y,Oe}var De={};/** @license React v16.13.1
31
+ * react-is.development.js
32
+ *
33
+ * Copyright (c) Facebook, Inc. and its affiliates.
34
+ *
35
+ * This source code is licensed under the MIT license found in the
36
+ * LICENSE file in the root directory of this source tree.
37
+ */var zg;function uI(){return zg||(zg=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function y(H){return typeof H=="string"||typeof H=="function"||H===r||H===c||H===s||H===i||H===d||H===f||typeof H=="object"&&H!==null&&(H.$$typeof===g||H.$$typeof===h||H.$$typeof===o||H.$$typeof===a||H.$$typeof===u||H.$$typeof===m||H.$$typeof===b||H.$$typeof===x||H.$$typeof===p)}function _(H){if(typeof H=="object"&&H!==null){var $e=H.$$typeof;switch($e){case t:var J=H.type;switch(J){case l:case c:case r:case s:case i:case d:return J;default:var xe=J&&J.$$typeof;switch(xe){case a:case u:case g:case h:case o:return xe;default:return $e}}case n:return $e}}}var w=l,E=c,M=a,S=o,I=t,A=u,k=r,D=g,N=h,V=n,P=s,T=i,L=d,R=!1;function O(H){return R||(R=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),$(H)||_(H)===l}function $(H){return _(H)===c}function Y(H){return _(H)===a}function W(H){return _(H)===o}function G(H){return typeof H=="object"&&H!==null&&H.$$typeof===t}function se(H){return _(H)===u}function ce(H){return _(H)===r}function me(H){return _(H)===g}function Ye(H){return _(H)===h}function ne(H){return _(H)===n}function he(H){return _(H)===s}function Te(H){return _(H)===i}function Q(H){return _(H)===d}De.AsyncMode=w,De.ConcurrentMode=E,De.ContextConsumer=M,De.ContextProvider=S,De.Element=I,De.ForwardRef=A,De.Fragment=k,De.Lazy=D,De.Memo=N,De.Portal=V,De.Profiler=P,De.StrictMode=T,De.Suspense=L,De.isAsyncMode=O,De.isConcurrentMode=$,De.isContextConsumer=Y,De.isContextProvider=W,De.isElement=G,De.isForwardRef=se,De.isFragment=ce,De.isLazy=me,De.isMemo=Ye,De.isPortal=ne,De.isProfiler=he,De.isStrictMode=Te,De.isSuspense=Q,De.isValidElementType=y,De.typeOf=_}()),De}process.env.NODE_ENV==="production"?nd.exports=cI():nd.exports=uI();var dI=nd.exports,sv=dI,fI={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},hI={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},ov={};ov[sv.ForwardRef]=fI;ov[sv.Memo]=hI;var gI=!0;function pI(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):i&&(r+=i+" ")}),r}var av=function(t,n,r){var i=t.key+"-"+n.name;(r===!1||gI===!1)&&t.registered[i]===void 0&&(t.registered[i]=n.styles)},mI=function(t,n,r){av(t,n,r);var i=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var s=n;do t.insert(n===s?"."+i:"",s,t.sheet,!0),s=s.next;while(s!==void 0)}};function bI(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var vI={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},xI=/[A-Z]|^ms/g,yI=/_EMO_([^_]+?)_([^]*?)_EMO_/g,lv=function(t){return t.charCodeAt(1)===45},Yg=function(t){return t!=null&&typeof t!="boolean"},Qc=eI(function(e){return lv(e)?e:e.replace(xI,"-$&").toLowerCase()}),Xg=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(yI,function(r,i,s){return kn={name:i,styles:s,next:kn},i})}return vI[t]!==1&&!lv(t)&&typeof n=="number"&&n!==0?n+"px":n};function yo(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var i=n;if(i.anim===1)return kn={name:i.name,styles:i.styles,next:kn},i.name;var s=n;if(s.styles!==void 0){var o=s.next;if(o!==void 0)for(;o!==void 0;)kn={name:o.name,styles:o.styles,next:kn},o=o.next;var a=s.styles+";";return a}return CI(e,t,n)}case"function":{if(e!==void 0){var l=kn,c=n(e);return kn=l,yo(e,t,c)}break}}var u=n;return u}function CI(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=yo(e,t,n[i])+";";else for(var s in n){var o=n[s];if(typeof o!="object"){var a=o;Yg(a)&&(r+=Qc(s)+":"+Xg(s,a)+";")}else if(Array.isArray(o)&&typeof o[0]=="string"&&t==null)for(var l=0;l<o.length;l++)Yg(o[l])&&(r+=Qc(s)+":"+Xg(s,o[l])+";");else{var c=yo(e,t,o);switch(s){case"animation":case"animationName":{r+=Qc(s)+":"+c+";";break}default:r+=s+"{"+c+"}"}}}return r}var Zg=/label:\s*([^\s;{]+)\s*(;|$)/g,kn;function cv(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,i="";kn=void 0;var s=e[0];if(s==null||s.raw===void 0)r=!1,i+=yo(n,t,s);else{var o=s;i+=o[0]}for(var a=1;a<e.length;a++)if(i+=yo(n,t,e[a]),r){var l=s;i+=l[a]}Zg.lastIndex=0;for(var c="",u;(u=Zg.exec(i))!==null;)c+="-"+u[1];var d=bI(i)+c;return{name:d,styles:i,next:kn}}var wI=function(t){return t()},SI=B.useInsertionEffect?B.useInsertionEffect:!1,_I=SI||wI,uv=B.createContext(typeof HTMLElement<"u"?lI({key:"css"}):null);uv.Provider;var II=function(t){return C.forwardRef(function(n,r){var i=C.useContext(uv);return t(n,i,r)})},MI=B.createContext({}),Sf={}.hasOwnProperty,rd="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",EI=function(t,n){var r={};for(var i in n)Sf.call(n,i)&&(r[i]=n[i]);return r[rd]=t,r},AI=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return av(n,r,i),_I(function(){return mI(n,r,i)}),null},kI=II(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var i=e[rd],s=[r],o="";typeof e.className=="string"?o=pI(t.registered,s,e.className):e.className!=null&&(o=e.className+" ");var a=cv(s,void 0,B.useContext(MI));o+=t.key+"-"+a.name;var l={};for(var c in e)Sf.call(e,c)&&c!=="css"&&c!==rd&&(l[c]=e[c]);return l.className=o,n&&(l.ref=n),B.createElement(B.Fragment,null,B.createElement(AI,{cache:t,serialized:a,isStringTag:typeof i=="string"}),B.createElement(i,l))}),RI=kI,K=function(t,n){var r=arguments;if(n==null||!Sf.call(n,"css"))return B.createElement.apply(void 0,r);var i=r.length,s=new Array(i);s[0]=RI,s[1]=EI(t,n);for(var o=2;o<i;o++)s[o]=r[o];return B.createElement.apply(null,s)};(function(e){var t;t||(t=e.JSX||(e.JSX={}))})(K||(K={}));function _f(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return cv(t)}function PI(){var e=_f.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}function OI(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var id=C.useLayoutEffect,DI=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],Cl=function(){};function FI(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function TI(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];var s=[].concat(r);if(t&&e)for(var o in t)t.hasOwnProperty(o)&&t[o]&&s.push("".concat(FI(e,o)));return s.filter(function(a){return a}).map(function(a){return String(a).trim()}).join(" ")}var wl=function(t){return HI(t)?t.filter(Boolean):_i(t)==="object"&&t!==null?[t]:[]},dv=function(t){t.className,t.clearValue,t.cx,t.getStyles,t.getClassNames,t.getValue,t.hasValue,t.isMulti,t.isRtl,t.options,t.selectOption,t.selectProps,t.setValue,t.theme;var n=Hn(t,DI);return ee({},n)},it=function(t,n,r){var i=t.cx,s=t.getStyles,o=t.getClassNames,a=t.className;return{css:s(n,t),className:i(r??{},o(n,t),a)}};function mc(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function NI(e){return mc(e)?window.innerHeight:e.clientHeight}function fv(e){return mc(e)?window.pageYOffset:e.scrollTop}function Sl(e,t){if(mc(e)){window.scrollTo(0,t);return}e.scrollTop=t}function LI(e){var t=getComputedStyle(e),n=t.position==="absolute",r=/(auto|scroll)/;if(t.position==="fixed")return document.documentElement;for(var i=e;i=i.parentElement;)if(t=getComputedStyle(i),!(n&&t.position==="static")&&r.test(t.overflow+t.overflowY+t.overflowX))return i;return document.documentElement}function VI(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function oa(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Cl,i=fv(e),s=t-i,o=10,a=0;function l(){a+=o;var c=VI(a,i,s,n);Sl(e,c),a<n?window.requestAnimationFrame(l):r(e)}l()}function Ug(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=t.offsetHeight/3;r.bottom+i>n.bottom?Sl(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+i,e.scrollHeight)):r.top-i<n.top&&Sl(e,Math.max(t.offsetTop-i,0))}function BI(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}function Jg(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function jI(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var hv=!1,GI={get passive(){return hv=!0}},aa=typeof window<"u"?window:{};aa.addEventListener&&aa.removeEventListener&&(aa.addEventListener("p",Cl,GI),aa.removeEventListener("p",Cl,!1));var $I=hv;function WI(e){return e!=null}function HI(e){return Array.isArray(e)}function Vs(e,t,n){return e?t:n}var zI=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];var s=Object.entries(t).filter(function(o){var a=gr(o,1),l=a[0];return!r.includes(l)});return s.reduce(function(o,a){var l=gr(a,2),c=l[0],u=l[1];return o[c]=u,o},{})},YI=["children","innerProps"],XI=["children","innerProps"];function ZI(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,i=e.placement,s=e.shouldScroll,o=e.isFixedPosition,a=e.controlHeight,l=LI(n),c={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return c;var u=l.getBoundingClientRect(),d=u.height,f=n.getBoundingClientRect(),h=f.bottom,g=f.height,p=f.top,m=n.offsetParent.getBoundingClientRect(),b=m.top,x=o?window.innerHeight:NI(l),y=fv(l),_=parseInt(getComputedStyle(n).marginBottom,10),w=parseInt(getComputedStyle(n).marginTop,10),E=b-w,M=x-p,S=E+y,I=d-y-p,A=h-x+y+_,k=y+p-w,D=160;switch(i){case"auto":case"bottom":if(M>=g)return{placement:"bottom",maxHeight:t};if(I>=g&&!o)return s&&oa(l,A,D),{placement:"bottom",maxHeight:t};if(!o&&I>=r||o&&M>=r){s&&oa(l,A,D);var N=o?M-_:I-_;return{placement:"bottom",maxHeight:N}}if(i==="auto"||o){var V=t,P=o?E:S;return P>=r&&(V=Math.min(P-_-a,t)),{placement:"top",maxHeight:V}}if(i==="bottom")return s&&Sl(l,A),{placement:"bottom",maxHeight:t};break;case"top":if(E>=g)return{placement:"top",maxHeight:t};if(S>=g&&!o)return s&&oa(l,k,D),{placement:"top",maxHeight:t};if(!o&&S>=r||o&&E>=r){var T=t;return(!o&&S>=r||o&&E>=r)&&(T=o?E-w:S-w),s&&oa(l,k,D),{placement:"top",maxHeight:T}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(i,'".'))}return c}function UI(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var gv=function(t){return t==="auto"?"bottom":t},JI=function(t,n){var r,i=t.placement,s=t.theme,o=s.borderRadius,a=s.spacing,l=s.colors;return ee((r={label:"menu"},Ls(r,UI(i),"100%"),Ls(r,"position","absolute"),Ls(r,"width","100%"),Ls(r,"zIndex",1),r),n?{}:{backgroundColor:l.neutral0,borderRadius:o,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:a.menuGutter,marginTop:a.menuGutter})},pv=C.createContext(null),QI=function(t){var n=t.children,r=t.minMenuHeight,i=t.maxMenuHeight,s=t.menuPlacement,o=t.menuPosition,a=t.menuShouldScrollIntoView,l=t.theme,c=C.useContext(pv)||{},u=c.setPortalPlacement,d=C.useRef(null),f=C.useState(i),h=gr(f,2),g=h[0],p=h[1],m=C.useState(null),b=gr(m,2),x=b[0],y=b[1],_=l.spacing.controlHeight;return id(function(){var w=d.current;if(w){var E=o==="fixed",M=a&&!E,S=ZI({maxHeight:i,menuEl:w,minHeight:r,placement:s,shouldScroll:M,isFixedPosition:E,controlHeight:_});p(S.maxHeight),y(S.placement),u==null||u(S.placement)}},[i,s,o,a,r,u,_]),n({ref:d,placerProps:ee(ee({},t),{},{placement:x||gv(s),maxHeight:g})})},KI=function(t){var n=t.children,r=t.innerRef,i=t.innerProps;return K("div",te({},it(t,"menu",{menu:!0}),{ref:r},i),n)},qI=KI,e5=function(t,n){var r=t.maxHeight,i=t.theme.spacing.baseUnit;return ee({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:i,paddingTop:i})},t5=function(t){var n=t.children,r=t.innerProps,i=t.innerRef,s=t.isMulti;return K("div",te({},it(t,"menuList",{"menu-list":!0,"menu-list--is-multi":s}),{ref:i},r),n)},mv=function(t,n){var r=t.theme,i=r.spacing.baseUnit,s=r.colors;return ee({textAlign:"center"},n?{}:{color:s.neutral40,padding:"".concat(i*2,"px ").concat(i*3,"px")})},n5=mv,r5=mv,i5=function(t){var n=t.children,r=n===void 0?"No options":n,i=t.innerProps,s=Hn(t,YI);return K("div",te({},it(ee(ee({},s),{},{children:r,innerProps:i}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),i),r)},s5=function(t){var n=t.children,r=n===void 0?"Loading...":n,i=t.innerProps,s=Hn(t,XI);return K("div",te({},it(ee(ee({},s),{},{children:r,innerProps:i}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),i),r)},o5=function(t){var n=t.rect,r=t.offset,i=t.position;return{left:n.left,position:i,top:r,width:n.width,zIndex:1}},a5=function(t){var n=t.appendTo,r=t.children,i=t.controlElement,s=t.innerProps,o=t.menuPlacement,a=t.menuPosition,l=C.useRef(null),c=C.useRef(null),u=C.useState(gv(o)),d=gr(u,2),f=d[0],h=d[1],g=C.useMemo(function(){return{setPortalPlacement:h}},[]),p=C.useState(null),m=gr(p,2),b=m[0],x=m[1],y=C.useCallback(function(){if(i){var M=BI(i),S=a==="fixed"?0:window.pageYOffset,I=M[f]+S;(I!==(b==null?void 0:b.offset)||M.left!==(b==null?void 0:b.rect.left)||M.width!==(b==null?void 0:b.rect.width))&&x({offset:I,rect:M})}},[i,a,f,b==null?void 0:b.offset,b==null?void 0:b.rect.left,b==null?void 0:b.rect.width]);id(function(){y()},[y]);var _=C.useCallback(function(){typeof c.current=="function"&&(c.current(),c.current=null),i&&l.current&&(c.current=Db(i,l.current,y,{elementResize:"ResizeObserver"in window}))},[i,y]);id(function(){_()},[_]);var w=C.useCallback(function(M){l.current=M,_()},[_]);if(!n&&a!=="fixed"||!b)return null;var E=K("div",te({ref:w},it(ee(ee({},t),{},{offset:b.offset,position:a,rect:b.rect}),"menuPortal",{"menu-portal":!0}),s),r);return K(pv.Provider,{value:g},n?Vn.createPortal(E,n):E)},l5=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},c5=function(t){var n=t.children,r=t.innerProps,i=t.isDisabled,s=t.isRtl;return K("div",te({},it(t,"container",{"--is-disabled":i,"--is-rtl":s}),r),n)},u5=function(t,n){var r=t.theme.spacing,i=t.isMulti,s=t.hasValue,o=t.selectProps.controlShouldRenderValue;return ee({alignItems:"center",display:i&&s&&o?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},n?{}:{padding:"".concat(r.baseUnit/2,"px ").concat(r.baseUnit*2,"px")})},d5=function(t){var n=t.children,r=t.innerProps,i=t.isMulti,s=t.hasValue;return K("div",te({},it(t,"valueContainer",{"value-container":!0,"value-container--is-multi":i,"value-container--has-value":s}),r),n)},f5=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},h5=function(t){var n=t.children,r=t.innerProps;return K("div",te({},it(t,"indicatorsContainer",{indicators:!0}),r),n)},Qg,g5=["size"],p5=["innerProps","isRtl","size"];function m5(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var b5=process.env.NODE_ENV==="production"?{name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"}:{name:"tj5bde-Svg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0;label:Svg;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgSlNYLCBSZWFjdE5vZGUgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3gsIGtleWZyYW1lcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuaW1wb3J0IHtcbiAgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWUsXG4gIENTU09iamVjdFdpdGhMYWJlbCxcbiAgR3JvdXBCYXNlLFxufSBmcm9tICcuLi90eXBlcyc7XG5pbXBvcnQgeyBnZXRTdHlsZVByb3BzIH0gZnJvbSAnLi4vdXRpbHMnO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgSWNvbnNcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBTdmcgPSAoe1xuICBzaXplLFxuICAuLi5wcm9wc1xufTogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzdmcnXSAmIHsgc2l6ZTogbnVtYmVyIH0pID0+IChcbiAgPHN2Z1xuICAgIGhlaWdodD17c2l6ZX1cbiAgICB3aWR0aD17c2l6ZX1cbiAgICB2aWV3Qm94PVwiMCAwIDIwIDIwXCJcbiAgICBhcmlhLWhpZGRlbj1cInRydWVcIlxuICAgIGZvY3VzYWJsZT1cImZhbHNlXCJcbiAgICBjc3M9e3tcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgZmlsbDogJ2N1cnJlbnRDb2xvcicsXG4gICAgICBsaW5lSGVpZ2h0OiAxLFxuICAgICAgc3Ryb2tlOiAnY3VycmVudENvbG9yJyxcbiAgICAgIHN0cm9rZVdpZHRoOiAwLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IHR5cGUgQ3Jvc3NJY29uUHJvcHMgPSBKU1guSW50cmluc2ljRWxlbWVudHNbJ3N2ZyddICYgeyBzaXplPzogbnVtYmVyIH07XG5leHBvcnQgY29uc3QgQ3Jvc3NJY29uID0gKHByb3BzOiBDcm9zc0ljb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNMTQuMzQ4IDE0Ljg0OWMtMC40NjkgMC40NjktMS4yMjkgMC40NjktMS42OTcgMGwtMi42NTEtMy4wMzAtMi42NTEgMy4wMjljLTAuNDY5IDAuNDY5LTEuMjI5IDAuNDY5LTEuNjk3IDAtMC40NjktMC40NjktMC40NjktMS4yMjkgMC0xLjY5N2wyLjc1OC0zLjE1LTIuNzU5LTMuMTUyYy0wLjQ2OS0wLjQ2OS0wLjQ2OS0xLjIyOCAwLTEuNjk3czEuMjI4LTAuNDY5IDEuNjk3IDBsMi42NTIgMy4wMzEgMi42NTEtMy4wMzFjMC40NjktMC40NjkgMS4yMjgtMC40NjkgMS42OTcgMHMwLjQ2OSAxLjIyOSAwIDEuNjk3bC0yLjc1OCAzLjE1MiAyLjc1OCAzLjE1YzAuNDY5IDAuNDY5IDAuNDY5IDEuMjI5IDAgMS42OTh6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuZXhwb3J0IHR5cGUgRG93bkNoZXZyb25Qcm9wcyA9IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3ZnJ10gJiB7IHNpemU/OiBudW1iZXIgfTtcbmV4cG9ydCBjb25zdCBEb3duQ2hldnJvbiA9IChwcm9wczogRG93bkNoZXZyb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNNC41MTYgNy41NDhjMC40MzYtMC40NDYgMS4wNDMtMC40ODEgMS41NzYgMGwzLjkwOCAzLjc0NyAzLjkwOC0zLjc0N2MwLjUzMy0wLjQ4MSAxLjE0MS0wLjQ0NiAxLjU3NCAwIDAuNDM2IDAuNDQ1IDAuNDA4IDEuMTk3IDAgMS42MTUtMC40MDYgMC40MTgtNC42OTUgNC41MDItNC42OTUgNC41MDItMC4yMTcgMC4yMjMtMC41MDIgMC4zMzUtMC43ODcgMC4zMzVzLTAuNTctMC4xMTItMC43ODktMC4zMzVjMCAwLTQuMjg3LTQuMDg0LTQuNjk1LTQuNTAycy0wLjQzNi0xLjE3IDAtMS42MTV6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgQnV0dG9uc1xuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG5cbmV4cG9ydCBpbnRlcmZhY2UgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIC8qKiBUaGUgY2hpbGRyZW4gdG8gYmUgcmVuZGVyZWQgaW5zaWRlIHRoZSBpbmRpY2F0b3IuICovXG4gIGNoaWxkcmVuPzogUmVhY3ROb2RlO1xuICAvKiogUHJvcHMgdGhhdCB3aWxsIGJlIHBhc3NlZCBvbiB0byB0aGUgY2hpbGRyZW4uICovXG4gIGlubmVyUHJvcHM6IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snZGl2J107XG4gIC8qKiBUaGUgZm9jdXNlZCBzdGF0ZSBvZiB0aGUgc2VsZWN0LiAqL1xuICBpc0ZvY3VzZWQ6IGJvb2xlYW47XG4gIGlzRGlzYWJsZWQ6IGJvb2xlYW47XG59XG5cbmNvbnN0IGJhc2VDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0ZvY3VzZWQsXG4gICAgdGhlbWU6IHtcbiAgICAgIHNwYWNpbmc6IHsgYmFzZVVuaXQgfSxcbiAgICAgIGNvbG9ycyxcbiAgICB9LFxuICB9OlxuICAgIHwgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuICAgIHwgQ2xlYXJJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPixcbiAgdW5zdHlsZWQ6IGJvb2xlYW5cbik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2luZGljYXRvckNvbnRhaW5lcicsXG4gIGRpc3BsYXk6ICdmbGV4JyxcbiAgdHJhbnNpdGlvbjogJ2NvbG9yIDE1MG1zJyxcbiAgLi4uKHVuc3R5bGVkXG4gICAgPyB7fVxuICAgIDoge1xuICAgICAgICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw2MCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gICAgICAgIHBhZGRpbmc6IGJhc2VVbml0ICogMixcbiAgICAgICAgJzpob3Zlcic6IHtcbiAgICAgICAgICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw4MCA6IGNvbG9ycy5uZXV0cmFsNDAsXG4gICAgICAgIH0sXG4gICAgICB9KSxcbn0pO1xuXG5leHBvcnQgY29uc3QgZHJvcGRvd25JbmRpY2F0b3JDU1MgPSBiYXNlQ1NTO1xuZXhwb3J0IGNvbnN0IERyb3Bkb3duSW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgY2hpbGRyZW4sIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnZHJvcGRvd25JbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2Ryb3Bkb3duLWluZGljYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8RG93bkNoZXZyb24gLz59XG4gICAgPC9kaXY+XG4gICk7XG59O1xuXG5leHBvcnQgaW50ZXJmYWNlIENsZWFySW5kaWNhdG9yUHJvcHM8XG4gIE9wdGlvbiA9IHVua25vd24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuID0gYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPiA9IEdyb3VwQmFzZTxPcHRpb24+XG4+IGV4dGVuZHMgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWU8T3B0aW9uLCBJc011bHRpLCBHcm91cD4ge1xuICAvKiogVGhlIGNoaWxkcmVuIHRvIGJlIHJlbmRlcmVkIGluc2lkZSB0aGUgaW5kaWNhdG9yLiAqL1xuICBjaGlsZHJlbj86IFJlYWN0Tm9kZTtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xufVxuXG5leHBvcnQgY29uc3QgY2xlYXJJbmRpY2F0b3JDU1MgPSBiYXNlQ1NTO1xuZXhwb3J0IGNvbnN0IENsZWFySW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogQ2xlYXJJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgY2hpbGRyZW4sIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnY2xlYXJJbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2NsZWFyLWluZGljYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8Q3Jvc3NJY29uIC8+fVxuICAgIDwvZGl2PlxuICApO1xufTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBTZXBhcmF0b3Jcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5leHBvcnQgaW50ZXJmYWNlIEluZGljYXRvclNlcGFyYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgaXNEaXNhYmxlZDogYm9vbGVhbjtcbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpbm5lclByb3BzPzogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ107XG59XG5cbmV4cG9ydCBjb25zdCBpbmRpY2F0b3JTZXBhcmF0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0Rpc2FibGVkLFxuICAgIHRoZW1lOiB7XG4gICAgICBzcGFjaW5nOiB7IGJhc2VVbml0IH0sXG4gICAgICBjb2xvcnMsXG4gICAgfSxcbiAgfTogSW5kaWNhdG9yU2VwYXJhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdpbmRpY2F0b3JTZXBhcmF0b3InLFxuICBhbGlnblNlbGY6ICdzdHJldGNoJyxcbiAgd2lkdGg6IDEsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgYmFja2dyb3VuZENvbG9yOiBpc0Rpc2FibGVkID8gY29sb3JzLm5ldXRyYWwxMCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gICAgICAgIG1hcmdpbkJvdHRvbTogYmFzZVVuaXQgKiAyLFxuICAgICAgICBtYXJnaW5Ub3A6IGJhc2VVbml0ICogMixcbiAgICAgIH0pLFxufSk7XG5cbmV4cG9ydCBjb25zdCBJbmRpY2F0b3JTZXBhcmF0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHByb3BzOiBJbmRpY2F0b3JTZXBhcmF0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgaW5uZXJQcm9wcyB9ID0gcHJvcHM7XG4gIHJldHVybiAoXG4gICAgPHNwYW5cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgICAgey4uLmdldFN0eWxlUHJvcHMocHJvcHMsICdpbmRpY2F0b3JTZXBhcmF0b3InLCB7XG4gICAgICAgICdpbmRpY2F0b3Itc2VwYXJhdG9yJzogdHJ1ZSxcbiAgICAgIH0pfVxuICAgIC8+XG4gICk7XG59O1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIExvYWRpbmdcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBsb2FkaW5nRG90QW5pbWF0aW9ucyA9IGtleWZyYW1lc2BcbiAgMCUsIDgwJSwgMTAwJSB7IG9wYWNpdHk6IDA7IH1cbiAgNDAlIHsgb3BhY2l0eTogMTsgfVxuYDtcblxuZXhwb3J0IGNvbnN0IGxvYWRpbmdJbmRpY2F0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0ZvY3VzZWQsXG4gICAgc2l6ZSxcbiAgICB0aGVtZToge1xuICAgICAgY29sb3JzLFxuICAgICAgc3BhY2luZzogeyBiYXNlVW5pdCB9LFxuICAgIH0sXG4gIH06IExvYWRpbmdJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPixcbiAgdW5zdHlsZWQ6IGJvb2xlYW5cbik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2xvYWRpbmdJbmRpY2F0b3InLFxuICBkaXNwbGF5OiAnZmxleCcsXG4gIHRyYW5zaXRpb246ICdjb2xvciAxNTBtcycsXG4gIGFsaWduU2VsZjogJ2NlbnRlcicsXG4gIGZvbnRTaXplOiBzaXplLFxuICBsaW5lSGVpZ2h0OiAxLFxuICBtYXJnaW5SaWdodDogc2l6ZSxcbiAgdGV4dEFsaWduOiAnY2VudGVyJyxcbiAgdmVydGljYWxBbGlnbjogJ21pZGRsZScsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsNjAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBwYWRkaW5nOiBiYXNlVW5pdCAqIDIsXG4gICAgICB9KSxcbn0pO1xuXG5pbnRlcmZhY2UgTG9hZGluZ0RvdFByb3BzIHtcbiAgZGVsYXk6IG51bWJlcjtcbiAgb2Zmc2V0OiBib29sZWFuO1xufVxuY29uc3QgTG9hZGluZ0RvdCA9ICh7IGRlbGF5LCBvZmZzZXQgfTogTG9hZGluZ0RvdFByb3BzKSA9PiAoXG4gIDxzcGFuXG4gICAgY3NzPXt7XG4gICAgICBhbmltYXRpb246IGAke2xvYWRpbmdEb3RBbmltYXRpb25zfSAxcyBlYXNlLWluLW91dCAke2RlbGF5fW1zIGluZmluaXRlO2AsXG4gICAgICBiYWNrZ3JvdW5kQ29sb3I6ICdjdXJyZW50Q29sb3InLFxuICAgICAgYm9yZGVyUmFkaXVzOiAnMWVtJyxcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgbWFyZ2luTGVmdDogb2Zmc2V0ID8gJzFlbScgOiB1bmRlZmluZWQsXG4gICAgICBoZWlnaHQ6ICcxZW0nLFxuICAgICAgdmVydGljYWxBbGlnbjogJ3RvcCcsXG4gICAgICB3aWR0aDogJzFlbScsXG4gICAgfX1cbiAgLz5cbik7XG5cbmV4cG9ydCBpbnRlcmZhY2UgTG9hZGluZ0luZGljYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpc0Rpc2FibGVkOiBib29sZWFuO1xuICAvKiogU2V0IHNpemUgb2YgdGhlIGNvbnRhaW5lci4gKi9cbiAgc2l6ZTogbnVtYmVyO1xufVxuZXhwb3J0IGNvbnN0IExvYWRpbmdJbmRpY2F0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oe1xuICBpbm5lclByb3BzLFxuICBpc1J0bCxcbiAgc2l6ZSA9IDQsXG4gIC4uLnJlc3RQcm9wc1xufTogTG9hZGluZ0luZGljYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+KSA9PiB7XG4gIHJldHVybiAoXG4gICAgPGRpdlxuICAgICAgey4uLmdldFN0eWxlUHJvcHMoXG4gICAgICAgIHsgLi4ucmVzdFByb3BzLCBpbm5lclByb3BzLCBpc1J0bCwgc2l6ZSB9LFxuICAgICAgICAnbG9hZGluZ0luZGljYXRvcicsXG4gICAgICAgIHtcbiAgICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICAgJ2xvYWRpbmctaW5kaWNhdG9yJzogdHJ1ZSxcbiAgICAgICAgfVxuICAgICAgKX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXswfSBvZmZzZXQ9e2lzUnRsfSAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezE2MH0gb2Zmc2V0IC8+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MzIwfSBvZmZzZXQ9eyFpc1J0bH0gLz5cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG4iXX0= */",toString:m5},bv=function(t){var n=t.size,r=Hn(t,g5);return K("svg",te({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:b5},r))},If=function(t){return K(bv,te({size:20},t),K("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},vv=function(t){return K(bv,te({size:20},t),K("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},xv=function(t,n){var r=t.isFocused,i=t.theme,s=i.spacing.baseUnit,o=i.colors;return ee({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:r?o.neutral60:o.neutral20,padding:s*2,":hover":{color:r?o.neutral80:o.neutral40}})},v5=xv,x5=function(t){var n=t.children,r=t.innerProps;return K("div",te({},it(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||K(vv,null))},y5=xv,C5=function(t){var n=t.children,r=t.innerProps;return K("div",te({},it(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||K(If,null))},w5=function(t,n){var r=t.isDisabled,i=t.theme,s=i.spacing.baseUnit,o=i.colors;return ee({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:r?o.neutral10:o.neutral20,marginBottom:s*2,marginTop:s*2})},S5=function(t){var n=t.innerProps;return K("span",te({},n,it(t,"indicatorSeparator",{"indicator-separator":!0})))},_5=PI(Qg||(Qg=OI([`
38
+ 0%, 80%, 100% { opacity: 0; }
39
+ 40% { opacity: 1; }
40
+ `]))),I5=function(t,n){var r=t.isFocused,i=t.size,s=t.theme,o=s.colors,a=s.spacing.baseUnit;return ee({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:i,lineHeight:1,marginRight:i,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?o.neutral60:o.neutral20,padding:a*2})},Kc=function(t){var n=t.delay,r=t.offset;return K("span",{css:_f({animation:"".concat(_5," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},process.env.NODE_ENV==="production"?"":";label:LoadingDot;",process.env.NODE_ENV==="production"?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW1RSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgSlNYLCBSZWFjdE5vZGUgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3gsIGtleWZyYW1lcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuaW1wb3J0IHtcbiAgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWUsXG4gIENTU09iamVjdFdpdGhMYWJlbCxcbiAgR3JvdXBCYXNlLFxufSBmcm9tICcuLi90eXBlcyc7XG5pbXBvcnQgeyBnZXRTdHlsZVByb3BzIH0gZnJvbSAnLi4vdXRpbHMnO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgSWNvbnNcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBTdmcgPSAoe1xuICBzaXplLFxuICAuLi5wcm9wc1xufTogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzdmcnXSAmIHsgc2l6ZTogbnVtYmVyIH0pID0+IChcbiAgPHN2Z1xuICAgIGhlaWdodD17c2l6ZX1cbiAgICB3aWR0aD17c2l6ZX1cbiAgICB2aWV3Qm94PVwiMCAwIDIwIDIwXCJcbiAgICBhcmlhLWhpZGRlbj1cInRydWVcIlxuICAgIGZvY3VzYWJsZT1cImZhbHNlXCJcbiAgICBjc3M9e3tcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgZmlsbDogJ2N1cnJlbnRDb2xvcicsXG4gICAgICBsaW5lSGVpZ2h0OiAxLFxuICAgICAgc3Ryb2tlOiAnY3VycmVudENvbG9yJyxcbiAgICAgIHN0cm9rZVdpZHRoOiAwLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IHR5cGUgQ3Jvc3NJY29uUHJvcHMgPSBKU1guSW50cmluc2ljRWxlbWVudHNbJ3N2ZyddICYgeyBzaXplPzogbnVtYmVyIH07XG5leHBvcnQgY29uc3QgQ3Jvc3NJY29uID0gKHByb3BzOiBDcm9zc0ljb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNMTQuMzQ4IDE0Ljg0OWMtMC40NjkgMC40NjktMS4yMjkgMC40NjktMS42OTcgMGwtMi42NTEtMy4wMzAtMi42NTEgMy4wMjljLTAuNDY5IDAuNDY5LTEuMjI5IDAuNDY5LTEuNjk3IDAtMC40NjktMC40NjktMC40NjktMS4yMjkgMC0xLjY5N2wyLjc1OC0zLjE1LTIuNzU5LTMuMTUyYy0wLjQ2OS0wLjQ2OS0wLjQ2OS0xLjIyOCAwLTEuNjk3czEuMjI4LTAuNDY5IDEuNjk3IDBsMi42NTIgMy4wMzEgMi42NTEtMy4wMzFjMC40NjktMC40NjkgMS4yMjgtMC40NjkgMS42OTcgMHMwLjQ2OSAxLjIyOSAwIDEuNjk3bC0yLjc1OCAzLjE1MiAyLjc1OCAzLjE1YzAuNDY5IDAuNDY5IDAuNDY5IDEuMjI5IDAgMS42OTh6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuZXhwb3J0IHR5cGUgRG93bkNoZXZyb25Qcm9wcyA9IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3ZnJ10gJiB7IHNpemU/OiBudW1iZXIgfTtcbmV4cG9ydCBjb25zdCBEb3duQ2hldnJvbiA9IChwcm9wczogRG93bkNoZXZyb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNNC41MTYgNy41NDhjMC40MzYtMC40NDYgMS4wNDMtMC40ODEgMS41NzYgMGwzLjkwOCAzLjc0NyAzLjkwOC0zLjc0N2MwLjUzMy0wLjQ4MSAxLjE0MS0wLjQ0NiAxLjU3NCAwIDAuNDM2IDAuNDQ1IDAuNDA4IDEuMTk3IDAgMS42MTUtMC40MDYgMC40MTgtNC42OTUgNC41MDItNC42OTUgNC41MDItMC4yMTcgMC4yMjMtMC41MDIgMC4zMzUtMC43ODcgMC4zMzVzLTAuNTctMC4xMTItMC43ODktMC4zMzVjMCAwLTQuMjg3LTQuMDg0LTQuNjk1LTQuNTAycy0wLjQzNi0xLjE3IDAtMS42MTV6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgQnV0dG9uc1xuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG5cbmV4cG9ydCBpbnRlcmZhY2UgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIC8qKiBUaGUgY2hpbGRyZW4gdG8gYmUgcmVuZGVyZWQgaW5zaWRlIHRoZSBpbmRpY2F0b3IuICovXG4gIGNoaWxkcmVuPzogUmVhY3ROb2RlO1xuICAvKiogUHJvcHMgdGhhdCB3aWxsIGJlIHBhc3NlZCBvbiB0byB0aGUgY2hpbGRyZW4uICovXG4gIGlubmVyUHJvcHM6IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snZGl2J107XG4gIC8qKiBUaGUgZm9jdXNlZCBzdGF0ZSBvZiB0aGUgc2VsZWN0LiAqL1xuICBpc0ZvY3VzZWQ6IGJvb2xlYW47XG4gIGlzRGlzYWJsZWQ6IGJvb2xlYW47XG59XG5cbmNvbnN0IGJhc2VDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0ZvY3VzZWQsXG4gICAgdGhlbWU6IHtcbiAgICAgIHNwYWNpbmc6IHsgYmFzZVVuaXQgfSxcbiAgICAgIGNvbG9ycyxcbiAgICB9LFxuICB9OlxuICAgIHwgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuICAgIHwgQ2xlYXJJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPixcbiAgdW5zdHlsZWQ6IGJvb2xlYW5cbik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2luZGljYXRvckNvbnRhaW5lcicsXG4gIGRpc3BsYXk6ICdmbGV4JyxcbiAgdHJhbnNpdGlvbjogJ2NvbG9yIDE1MG1zJyxcbiAgLi4uKHVuc3R5bGVkXG4gICAgPyB7fVxuICAgIDoge1xuICAgICAgICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw2MCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gICAgICAgIHBhZGRpbmc6IGJhc2VVbml0ICogMixcbiAgICAgICAgJzpob3Zlcic6IHtcbiAgICAgICAgICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw4MCA6IGNvbG9ycy5uZXV0cmFsNDAsXG4gICAgICAgIH0sXG4gICAgICB9KSxcbn0pO1xuXG5leHBvcnQgY29uc3QgZHJvcGRvd25JbmRpY2F0b3JDU1MgPSBiYXNlQ1NTO1xuZXhwb3J0IGNvbnN0IERyb3Bkb3duSW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgY2hpbGRyZW4sIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnZHJvcGRvd25JbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2Ryb3Bkb3duLWluZGljYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8RG93bkNoZXZyb24gLz59XG4gICAgPC9kaXY+XG4gICk7XG59O1xuXG5leHBvcnQgaW50ZXJmYWNlIENsZWFySW5kaWNhdG9yUHJvcHM8XG4gIE9wdGlvbiA9IHVua25vd24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuID0gYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPiA9IEdyb3VwQmFzZTxPcHRpb24+XG4+IGV4dGVuZHMgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWU8T3B0aW9uLCBJc011bHRpLCBHcm91cD4ge1xuICAvKiogVGhlIGNoaWxkcmVuIHRvIGJlIHJlbmRlcmVkIGluc2lkZSB0aGUgaW5kaWNhdG9yLiAqL1xuICBjaGlsZHJlbj86IFJlYWN0Tm9kZTtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xufVxuXG5leHBvcnQgY29uc3QgY2xlYXJJbmRpY2F0b3JDU1MgPSBiYXNlQ1NTO1xuZXhwb3J0IGNvbnN0IENsZWFySW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogQ2xlYXJJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgY2hpbGRyZW4sIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnY2xlYXJJbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2NsZWFyLWluZGljYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8Q3Jvc3NJY29uIC8+fVxuICAgIDwvZGl2PlxuICApO1xufTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBTZXBhcmF0b3Jcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5leHBvcnQgaW50ZXJmYWNlIEluZGljYXRvclNlcGFyYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgaXNEaXNhYmxlZDogYm9vbGVhbjtcbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpbm5lclByb3BzPzogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ107XG59XG5cbmV4cG9ydCBjb25zdCBpbmRpY2F0b3JTZXBhcmF0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0Rpc2FibGVkLFxuICAgIHRoZW1lOiB7XG4gICAgICBzcGFjaW5nOiB7IGJhc2VVbml0IH0sXG4gICAgICBjb2xvcnMsXG4gICAgfSxcbiAgfTogSW5kaWNhdG9yU2VwYXJhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdpbmRpY2F0b3JTZXBhcmF0b3InLFxuICBhbGlnblNlbGY6ICdzdHJldGNoJyxcbiAgd2lkdGg6IDEsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgYmFja2dyb3VuZENvbG9yOiBpc0Rpc2FibGVkID8gY29sb3JzLm5ldXRyYWwxMCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gICAgICAgIG1hcmdpbkJvdHRvbTogYmFzZVVuaXQgKiAyLFxuICAgICAgICBtYXJnaW5Ub3A6IGJhc2VVbml0ICogMixcbiAgICAgIH0pLFxufSk7XG5cbmV4cG9ydCBjb25zdCBJbmRpY2F0b3JTZXBhcmF0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHByb3BzOiBJbmRpY2F0b3JTZXBhcmF0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgaW5uZXJQcm9wcyB9ID0gcHJvcHM7XG4gIHJldHVybiAoXG4gICAgPHNwYW5cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgICAgey4uLmdldFN0eWxlUHJvcHMocHJvcHMsICdpbmRpY2F0b3JTZXBhcmF0b3InLCB7XG4gICAgICAgICdpbmRpY2F0b3Itc2VwYXJhdG9yJzogdHJ1ZSxcbiAgICAgIH0pfVxuICAgIC8+XG4gICk7XG59O1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIExvYWRpbmdcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBsb2FkaW5nRG90QW5pbWF0aW9ucyA9IGtleWZyYW1lc2BcbiAgMCUsIDgwJSwgMTAwJSB7IG9wYWNpdHk6IDA7IH1cbiAgNDAlIHsgb3BhY2l0eTogMTsgfVxuYDtcblxuZXhwb3J0IGNvbnN0IGxvYWRpbmdJbmRpY2F0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0ZvY3VzZWQsXG4gICAgc2l6ZSxcbiAgICB0aGVtZToge1xuICAgICAgY29sb3JzLFxuICAgICAgc3BhY2luZzogeyBiYXNlVW5pdCB9LFxuICAgIH0sXG4gIH06IExvYWRpbmdJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPixcbiAgdW5zdHlsZWQ6IGJvb2xlYW5cbik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2xvYWRpbmdJbmRpY2F0b3InLFxuICBkaXNwbGF5OiAnZmxleCcsXG4gIHRyYW5zaXRpb246ICdjb2xvciAxNTBtcycsXG4gIGFsaWduU2VsZjogJ2NlbnRlcicsXG4gIGZvbnRTaXplOiBzaXplLFxuICBsaW5lSGVpZ2h0OiAxLFxuICBtYXJnaW5SaWdodDogc2l6ZSxcbiAgdGV4dEFsaWduOiAnY2VudGVyJyxcbiAgdmVydGljYWxBbGlnbjogJ21pZGRsZScsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsNjAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBwYWRkaW5nOiBiYXNlVW5pdCAqIDIsXG4gICAgICB9KSxcbn0pO1xuXG5pbnRlcmZhY2UgTG9hZGluZ0RvdFByb3BzIHtcbiAgZGVsYXk6IG51bWJlcjtcbiAgb2Zmc2V0OiBib29sZWFuO1xufVxuY29uc3QgTG9hZGluZ0RvdCA9ICh7IGRlbGF5LCBvZmZzZXQgfTogTG9hZGluZ0RvdFByb3BzKSA9PiAoXG4gIDxzcGFuXG4gICAgY3NzPXt7XG4gICAgICBhbmltYXRpb246IGAke2xvYWRpbmdEb3RBbmltYXRpb25zfSAxcyBlYXNlLWluLW91dCAke2RlbGF5fW1zIGluZmluaXRlO2AsXG4gICAgICBiYWNrZ3JvdW5kQ29sb3I6ICdjdXJyZW50Q29sb3InLFxuICAgICAgYm9yZGVyUmFkaXVzOiAnMWVtJyxcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgbWFyZ2luTGVmdDogb2Zmc2V0ID8gJzFlbScgOiB1bmRlZmluZWQsXG4gICAgICBoZWlnaHQ6ICcxZW0nLFxuICAgICAgdmVydGljYWxBbGlnbjogJ3RvcCcsXG4gICAgICB3aWR0aDogJzFlbScsXG4gICAgfX1cbiAgLz5cbik7XG5cbmV4cG9ydCBpbnRlcmZhY2UgTG9hZGluZ0luZGljYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpc0Rpc2FibGVkOiBib29sZWFuO1xuICAvKiogU2V0IHNpemUgb2YgdGhlIGNvbnRhaW5lci4gKi9cbiAgc2l6ZTogbnVtYmVyO1xufVxuZXhwb3J0IGNvbnN0IExvYWRpbmdJbmRpY2F0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oe1xuICBpbm5lclByb3BzLFxuICBpc1J0bCxcbiAgc2l6ZSA9IDQsXG4gIC4uLnJlc3RQcm9wc1xufTogTG9hZGluZ0luZGljYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+KSA9PiB7XG4gIHJldHVybiAoXG4gICAgPGRpdlxuICAgICAgey4uLmdldFN0eWxlUHJvcHMoXG4gICAgICAgIHsgLi4ucmVzdFByb3BzLCBpbm5lclByb3BzLCBpc1J0bCwgc2l6ZSB9LFxuICAgICAgICAnbG9hZGluZ0luZGljYXRvcicsXG4gICAgICAgIHtcbiAgICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICAgJ2xvYWRpbmctaW5kaWNhdG9yJzogdHJ1ZSxcbiAgICAgICAgfVxuICAgICAgKX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXswfSBvZmZzZXQ9e2lzUnRsfSAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezE2MH0gb2Zmc2V0IC8+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MzIwfSBvZmZzZXQ9eyFpc1J0bH0gLz5cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG4iXX0= */")})},M5=function(t){var n=t.innerProps,r=t.isRtl,i=t.size,s=i===void 0?4:i,o=Hn(t,p5);return K("div",te({},it(ee(ee({},o),{},{innerProps:n,isRtl:r,size:s}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),K(Kc,{delay:0,offset:r}),K(Kc,{delay:160,offset:!0}),K(Kc,{delay:320,offset:!r}))},E5=function(t,n){var r=t.isDisabled,i=t.isFocused,s=t.theme,o=s.colors,a=s.borderRadius,l=s.spacing;return ee({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:l.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?o.neutral5:o.neutral0,borderColor:r?o.neutral10:i?o.primary:o.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:i?"0 0 0 1px ".concat(o.primary):void 0,"&:hover":{borderColor:i?o.primary:o.neutral30}})},A5=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,s=t.innerRef,o=t.innerProps,a=t.menuIsOpen;return K("div",te({ref:s},it(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":i,"control--menu-is-open":a}),o,{"aria-disabled":r||void 0}),n)},k5=A5,R5=["data"],P5=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},O5=function(t){var n=t.children,r=t.cx,i=t.getStyles,s=t.getClassNames,o=t.Heading,a=t.headingProps,l=t.innerProps,c=t.label,u=t.theme,d=t.selectProps;return K("div",te({},it(t,"group",{group:!0}),l),K(o,te({},a,{selectProps:d,theme:u,getStyles:i,getClassNames:s,cx:r}),c),K("div",null,n))},D5=function(t,n){var r=t.theme,i=r.colors,s=r.spacing;return ee({label:"group",cursor:"default",display:"block"},n?{}:{color:i.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:s.baseUnit*3,paddingRight:s.baseUnit*3,textTransform:"uppercase"})},F5=function(t){var n=dv(t);n.data;var r=Hn(n,R5);return K("div",te({},it(t,"groupHeading",{"group-heading":!0}),r))},T5=O5,N5=["innerRef","isDisabled","isHidden","inputClassName"],L5=function(t,n){var r=t.isDisabled,i=t.value,s=t.theme,o=s.spacing,a=s.colors;return ee(ee({visibility:r?"hidden":"visible",transform:i?"translateZ(0)":""},V5),n?{}:{margin:o.baseUnit/2,paddingBottom:o.baseUnit/2,paddingTop:o.baseUnit/2,color:a.neutral80})},yv={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},V5={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":ee({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},yv)},B5=function(t){return ee({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},yv)},j5=function(t){var n=t.cx,r=t.value,i=dv(t),s=i.innerRef,o=i.isDisabled,a=i.isHidden,l=i.inputClassName,c=Hn(i,N5);return K("div",te({},it(t,"input",{"input-container":!0}),{"data-value":r||""}),K("input",te({className:n({input:!0},l),ref:s,style:B5(a),disabled:o},c)))},G5=j5,$5=function(t,n){var r=t.theme,i=r.spacing,s=r.borderRadius,o=r.colors;return ee({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:o.neutral10,borderRadius:s/2,margin:i.baseUnit/2})},W5=function(t,n){var r=t.theme,i=r.borderRadius,s=r.colors,o=t.cropWithEllipsis;return ee({overflow:"hidden",textOverflow:o||o===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:i/2,color:s.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},H5=function(t,n){var r=t.theme,i=r.spacing,s=r.borderRadius,o=r.colors,a=t.isFocused;return ee({alignItems:"center",display:"flex"},n?{}:{borderRadius:s/2,backgroundColor:a?o.dangerLight:void 0,paddingLeft:i.baseUnit,paddingRight:i.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}})},Cv=function(t){var n=t.children,r=t.innerProps;return K("div",r,n)},z5=Cv,Y5=Cv;function X5(e){var t=e.children,n=e.innerProps;return K("div",te({role:"button"},n),t||K(If,{size:14}))}var Z5=function(t){var n=t.children,r=t.components,i=t.data,s=t.innerProps,o=t.isDisabled,a=t.removeProps,l=t.selectProps,c=r.Container,u=r.Label,d=r.Remove;return K(c,{data:i,innerProps:ee(ee({},it(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":o})),s),selectProps:l},K(u,{data:i,innerProps:ee({},it(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},n),K(d,{data:i,innerProps:ee(ee({},it(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},a),selectProps:l}))},U5=Z5,J5=function(t,n){var r=t.isDisabled,i=t.isFocused,s=t.isSelected,o=t.theme,a=o.spacing,l=o.colors;return ee({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:s?l.primary:i?l.primary25:"transparent",color:r?l.neutral20:s?l.neutral0:"inherit",padding:"".concat(a.baseUnit*2,"px ").concat(a.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:s?l.primary:l.primary50}})},Q5=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,s=t.isSelected,o=t.innerRef,a=t.innerProps;return K("div",te({},it(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":i,"option--is-selected":s}),{ref:o,"aria-disabled":r},a),n)},K5=Q5,q5=function(t,n){var r=t.theme,i=r.spacing,s=r.colors;return ee({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:s.neutral50,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2})},eM=function(t){var n=t.children,r=t.innerProps;return K("div",te({},it(t,"placeholder",{placeholder:!0}),r),n)},tM=eM,nM=function(t,n){var r=t.isDisabled,i=t.theme,s=i.spacing,o=i.colors;return ee({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:r?o.neutral40:o.neutral80,marginLeft:s.baseUnit/2,marginRight:s.baseUnit/2})},rM=function(t){var n=t.children,r=t.isDisabled,i=t.innerProps;return K("div",te({},it(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),i),n)},iM=rM,pn={ClearIndicator:C5,Control:k5,DropdownIndicator:x5,DownChevron:vv,CrossIcon:If,Group:T5,GroupHeading:F5,IndicatorsContainer:h5,IndicatorSeparator:S5,Input:G5,LoadingIndicator:M5,Menu:qI,MenuList:t5,MenuPortal:a5,LoadingMessage:s5,NoOptionsMessage:i5,MultiValue:U5,MultiValueContainer:z5,MultiValueLabel:Y5,MultiValueRemove:X5,Option:K5,Placeholder:tM,SelectContainer:c5,SingleValue:iM,ValueContainer:d5},sM=function(t){return ee(ee({},pn),t.components)},Kg=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function oM(e,t){return!!(e===t||Kg(e)&&Kg(t))}function aM(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!oM(e[n],t[n]))return!1;return!0}function lM(e,t){t===void 0&&(t=aM);var n=null;function r(){for(var i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];if(n&&n.lastThis===this&&t(i,n.lastArgs))return n.lastResult;var o=e.apply(this,i);return n={lastResult:o,lastArgs:i,lastThis:this},o}return r.clear=function(){n=null},r}function cM(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var uM=process.env.NODE_ENV==="production"?{name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"}:{name:"1f43avz-a11yText-A11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap;label:A11yText;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkExMXlUZXh0LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFPSSIsImZpbGUiOiJBMTF5VGV4dC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKiogQGpzeCBqc3ggKi9cbmltcG9ydCB7IEpTWCB9IGZyb20gJ3JlYWN0JztcbmltcG9ydCB7IGpzeCB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLy8gQXNzaXN0aXZlIHRleHQgdG8gZGVzY3JpYmUgdmlzdWFsIGVsZW1lbnRzLiBIaWRkZW4gZm9yIHNpZ2h0ZWQgdXNlcnMuXG5jb25zdCBBMTF5VGV4dCA9IChwcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ10pID0+IChcbiAgPHNwYW5cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAnYTExeVRleHQnLFxuICAgICAgekluZGV4OiA5OTk5LFxuICAgICAgYm9yZGVyOiAwLFxuICAgICAgY2xpcDogJ3JlY3QoMXB4LCAxcHgsIDFweCwgMXB4KScsXG4gICAgICBoZWlnaHQ6IDEsXG4gICAgICB3aWR0aDogMSxcbiAgICAgIHBvc2l0aW9uOiAnYWJzb2x1dGUnLFxuICAgICAgb3ZlcmZsb3c6ICdoaWRkZW4nLFxuICAgICAgcGFkZGluZzogMCxcbiAgICAgIHdoaXRlU3BhY2U6ICdub3dyYXAnLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IGRlZmF1bHQgQTExeVRleHQ7XG4iXX0= */",toString:cM},dM=function(t){return K("span",te({css:uM},t))},qg=dM,fM={guidance:function(t){var n=t.isSearchable,r=t.isMulti,i=t.tabSelectsValue,s=t.context,o=t.isInitialFocus;switch(s){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(i?", press Tab to select the option and exit the menu":"",".");case"input":return o?"".concat(t["aria-label"]||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(t){var n=t.action,r=t.label,i=r===void 0?"":r,s=t.labels,o=t.isDisabled;switch(n){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(i,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(s.length>1?"s":""," ").concat(s.join(","),", selected.");case"select-option":return o?"option ".concat(i," is disabled. Select another option."):"option ".concat(i,", selected.");default:return""}},onFocus:function(t){var n=t.context,r=t.focused,i=t.options,s=t.label,o=s===void 0?"":s,a=t.selectValue,l=t.isDisabled,c=t.isSelected,u=t.isAppleDevice,d=function(p,m){return p&&p.length?"".concat(p.indexOf(m)+1," of ").concat(p.length):""};if(n==="value"&&a)return"value ".concat(o," focused, ").concat(d(a,r),".");if(n==="menu"&&u){var f=l?" disabled":"",h="".concat(c?" selected":"").concat(f);return"".concat(o).concat(h,", ").concat(d(i,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},hM=function(t){var n=t.ariaSelection,r=t.focusedOption,i=t.focusedValue,s=t.focusableOptions,o=t.isFocused,a=t.selectValue,l=t.selectProps,c=t.id,u=t.isAppleDevice,d=l.ariaLiveMessages,f=l.getOptionLabel,h=l.inputValue,g=l.isMulti,p=l.isOptionDisabled,m=l.isSearchable,b=l.menuIsOpen,x=l.options,y=l.screenReaderStatus,_=l.tabSelectsValue,w=l.isLoading,E=l["aria-label"],M=l["aria-live"],S=C.useMemo(function(){return ee(ee({},fM),d||{})},[d]),I=C.useMemo(function(){var P="";if(n&&S.onChange){var T=n.option,L=n.options,R=n.removedValue,O=n.removedValues,$=n.value,Y=function(ne){return Array.isArray(ne)?null:ne},W=R||T||Y($),G=W?f(W):"",se=L||O||void 0,ce=se?se.map(f):[],me=ee({isDisabled:W&&p(W,a),label:G,labels:ce},n);P=S.onChange(me)}return P},[n,S,p,a,f]),A=C.useMemo(function(){var P="",T=r||i,L=!!(r&&a&&a.includes(r));if(T&&S.onFocus){var R={focused:T,label:f(T),isDisabled:p(T,a),isSelected:L,options:s,context:T===r?"menu":"value",selectValue:a,isAppleDevice:u};P=S.onFocus(R)}return P},[r,i,f,p,S,s,a,u]),k=C.useMemo(function(){var P="";if(b&&x.length&&!w&&S.onFilter){var T=y({count:s.length});P=S.onFilter({inputValue:h,resultsMessage:T})}return P},[s,h,b,S,x,y,w]),D=(n==null?void 0:n.action)==="initial-input-focus",N=C.useMemo(function(){var P="";if(S.guidance){var T=i?"value":b?"menu":"input";P=S.guidance({"aria-label":E,context:T,isDisabled:r&&p(r,a),isMulti:g,isSearchable:m,tabSelectsValue:_,isInitialFocus:D})}return P},[E,r,i,g,p,m,b,S,a,_,D]),V=K(C.Fragment,null,K("span",{id:"aria-selection"},I),K("span",{id:"aria-focused"},A),K("span",{id:"aria-results"},k),K("span",{id:"aria-guidance"},N));return K(C.Fragment,null,K(qg,{id:c},D&&V),K(qg,{"aria-live":M,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},o&&!D&&V))},gM=hM,sd=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],pM=new RegExp("["+sd.map(function(e){return e.letters}).join("")+"]","g"),wv={};for(var qc=0;qc<sd.length;qc++)for(var eu=sd[qc],tu=0;tu<eu.letters.length;tu++)wv[eu.letters[tu]]=eu.base;var Sv=function(t){return t.replace(pM,function(n){return wv[n]})},mM=lM(Sv),ep=function(t){return t.replace(/^\s+|\s+$/g,"")},bM=function(t){return"".concat(t.label," ").concat(t.value)},vM=function(t){return function(n,r){if(n.data.__isNew__)return!0;var i=ee({ignoreCase:!0,ignoreAccents:!0,stringify:bM,trim:!0,matchFrom:"any"},t),s=i.ignoreCase,o=i.ignoreAccents,a=i.stringify,l=i.trim,c=i.matchFrom,u=l?ep(r):r,d=l?ep(a(n)):a(n);return s&&(u=u.toLowerCase(),d=d.toLowerCase()),o&&(u=mM(u),d=Sv(d)),c==="start"?d.substr(0,u.length)===u:d.indexOf(u)>-1}},xM=["innerRef"];function yM(e){var t=e.innerRef,n=Hn(e,xM),r=zI(n,"onExited","in","enter","exit","appear");return K("input",te({ref:t},r,{css:_f({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},process.env.NODE_ENV==="production"?"":";label:DummyInput;",process.env.NODE_ENV==="production"?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkR1bW15SW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCTSIsImZpbGUiOiJEdW1teUlucHV0LnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgSlNYLCBSZWYgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyByZW1vdmVQcm9wcyB9IGZyb20gJy4uL3V0aWxzJztcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gRHVtbXlJbnB1dCh7XG4gIGlubmVyUmVmLFxuICAuLi5wcm9wc1xufTogSlNYLkludHJpbnNpY0VsZW1lbnRzWydpbnB1dCddICYge1xuICByZWFkb25seSBpbm5lclJlZjogUmVmPEhUTUxJbnB1dEVsZW1lbnQ+O1xufSkge1xuICAvLyBSZW1vdmUgYW5pbWF0aW9uIHByb3BzIG5vdCBtZWFudCBmb3IgSFRNTCBlbGVtZW50c1xuICBjb25zdCBmaWx0ZXJlZFByb3BzID0gcmVtb3ZlUHJvcHMoXG4gICAgcHJvcHMsXG4gICAgJ29uRXhpdGVkJyxcbiAgICAnaW4nLFxuICAgICdlbnRlcicsXG4gICAgJ2V4aXQnLFxuICAgICdhcHBlYXInXG4gICk7XG5cbiAgcmV0dXJuIChcbiAgICA8aW5wdXRcbiAgICAgIHJlZj17aW5uZXJSZWZ9XG4gICAgICB7Li4uZmlsdGVyZWRQcm9wc31cbiAgICAgIGNzcz17e1xuICAgICAgICBsYWJlbDogJ2R1bW15SW5wdXQnLFxuICAgICAgICAvLyBnZXQgcmlkIG9mIGFueSBkZWZhdWx0IHN0eWxlc1xuICAgICAgICBiYWNrZ3JvdW5kOiAwLFxuICAgICAgICBib3JkZXI6IDAsXG4gICAgICAgIC8vIGltcG9ydGFudCEgdGhpcyBoaWRlcyB0aGUgZmxhc2hpbmcgY3Vyc29yXG4gICAgICAgIGNhcmV0Q29sb3I6ICd0cmFuc3BhcmVudCcsXG4gICAgICAgIGZvbnRTaXplOiAnaW5oZXJpdCcsXG4gICAgICAgIGdyaWRBcmVhOiAnMSAvIDEgLyAyIC8gMycsXG4gICAgICAgIG91dGxpbmU6IDAsXG4gICAgICAgIHBhZGRpbmc6IDAsXG4gICAgICAgIC8vIGltcG9ydGFudCEgd2l0aG91dCBgd2lkdGhgIGJyb3dzZXJzIHdvbid0IGFsbG93IGZvY3VzXG4gICAgICAgIHdpZHRoOiAxLFxuXG4gICAgICAgIC8vIHJlbW92ZSBjdXJzb3Igb24gZGVza3RvcFxuICAgICAgICBjb2xvcjogJ3RyYW5zcGFyZW50JyxcblxuICAgICAgICAvLyByZW1vdmUgY3Vyc29yIG9uIG1vYmlsZSB3aGlsc3QgbWFpbnRhaW5pbmcgXCJzY3JvbGwgaW50byB2aWV3XCIgYmVoYXZpb3VyXG4gICAgICAgIGxlZnQ6IC0xMDAsXG4gICAgICAgIG9wYWNpdHk6IDAsXG4gICAgICAgIHBvc2l0aW9uOiAncmVsYXRpdmUnLFxuICAgICAgICB0cmFuc2Zvcm06ICdzY2FsZSguMDEpJyxcbiAgICAgIH19XG4gICAgLz5cbiAgKTtcbn1cbiJdfQ== */")}))}var CM=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function wM(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,i=e.onTopArrive,s=e.onTopLeave,o=C.useRef(!1),a=C.useRef(!1),l=C.useRef(0),c=C.useRef(null),u=C.useCallback(function(m,b){if(c.current!==null){var x=c.current,y=x.scrollTop,_=x.scrollHeight,w=x.clientHeight,E=c.current,M=b>0,S=_-w-y,I=!1;S>b&&o.current&&(r&&r(m),o.current=!1),M&&a.current&&(s&&s(m),a.current=!1),M&&b>S?(n&&!o.current&&n(m),E.scrollTop=_,I=!0,o.current=!0):!M&&-b>y&&(i&&!a.current&&i(m),E.scrollTop=0,I=!0,a.current=!0),I&&CM(m)}},[n,r,i,s]),d=C.useCallback(function(m){u(m,m.deltaY)},[u]),f=C.useCallback(function(m){l.current=m.changedTouches[0].clientY},[]),h=C.useCallback(function(m){var b=l.current-m.changedTouches[0].clientY;u(m,b)},[u]),g=C.useCallback(function(m){if(m){var b=$I?{passive:!1}:!1;m.addEventListener("wheel",d,b),m.addEventListener("touchstart",f,b),m.addEventListener("touchmove",h,b)}},[h,f,d]),p=C.useCallback(function(m){m&&(m.removeEventListener("wheel",d,!1),m.removeEventListener("touchstart",f,!1),m.removeEventListener("touchmove",h,!1))},[h,f,d]);return C.useEffect(function(){if(t){var m=c.current;return g(m),function(){p(m)}}},[t,g,p]),function(m){c.current=m}}var tp=["boxSizing","height","overflow","paddingRight","position"],np={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function rp(e){e.cancelable&&e.preventDefault()}function ip(e){e.stopPropagation()}function sp(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function op(){return"ontouchstart"in window||navigator.maxTouchPoints}var ap=!!(typeof window<"u"&&window.document&&window.document.createElement),Is=0,Ni={capture:!1,passive:!1};function SM(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,i=C.useRef({}),s=C.useRef(null),o=C.useCallback(function(l){if(ap){var c=document.body,u=c&&c.style;if(r&&tp.forEach(function(g){var p=u&&u[g];i.current[g]=p}),r&&Is<1){var d=parseInt(i.current.paddingRight,10)||0,f=document.body?document.body.clientWidth:0,h=window.innerWidth-f+d||0;Object.keys(np).forEach(function(g){var p=np[g];u&&(u[g]=p)}),u&&(u.paddingRight="".concat(h,"px"))}c&&op()&&(c.addEventListener("touchmove",rp,Ni),l&&(l.addEventListener("touchstart",sp,Ni),l.addEventListener("touchmove",ip,Ni))),Is+=1}},[r]),a=C.useCallback(function(l){if(ap){var c=document.body,u=c&&c.style;Is=Math.max(Is-1,0),r&&Is<1&&tp.forEach(function(d){var f=i.current[d];u&&(u[d]=f)}),c&&op()&&(c.removeEventListener("touchmove",rp,Ni),l&&(l.removeEventListener("touchstart",sp,Ni),l.removeEventListener("touchmove",ip,Ni)))}},[r]);return C.useEffect(function(){if(t){var l=s.current;return o(l),function(){a(l)}}},[t,o,a]),function(l){s.current=l}}function _M(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var IM=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},MM=process.env.NODE_ENV==="production"?{name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"}:{name:"bp8cua-ScrollManager",styles:"position:fixed;left:0;bottom:0;right:0;top:0;label:ScrollManager;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlNjcm9sbE1hbmFnZXIudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW9EVSIsImZpbGUiOiJTY3JvbGxNYW5hZ2VyLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsganN4IH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgRnJhZ21lbnQsIFJlYWN0RWxlbWVudCwgUmVmQ2FsbGJhY2ssIE1vdXNlRXZlbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgdXNlU2Nyb2xsQ2FwdHVyZSBmcm9tICcuL3VzZVNjcm9sbENhcHR1cmUnO1xuaW1wb3J0IHVzZVNjcm9sbExvY2sgZnJvbSAnLi91c2VTY3JvbGxMb2NrJztcblxuaW50ZXJmYWNlIFByb3BzIHtcbiAgcmVhZG9ubHkgY2hpbGRyZW46IChyZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PikgPT4gUmVhY3RFbGVtZW50O1xuICByZWFkb25seSBsb2NrRW5hYmxlZDogYm9vbGVhbjtcbiAgcmVhZG9ubHkgY2FwdHVyZUVuYWJsZWQ6IGJvb2xlYW47XG4gIHJlYWRvbmx5IG9uQm90dG9tQXJyaXZlPzogKGV2ZW50OiBXaGVlbEV2ZW50IHwgVG91Y2hFdmVudCkgPT4gdm9pZDtcbiAgcmVhZG9ubHkgb25Cb3R0b21MZWF2ZT86IChldmVudDogV2hlZWxFdmVudCB8IFRvdWNoRXZlbnQpID0+IHZvaWQ7XG4gIHJlYWRvbmx5IG9uVG9wQXJyaXZlPzogKGV2ZW50OiBXaGVlbEV2ZW50IHwgVG91Y2hFdmVudCkgPT4gdm9pZDtcbiAgcmVhZG9ubHkgb25Ub3BMZWF2ZT86IChldmVudDogV2hlZWxFdmVudCB8IFRvdWNoRXZlbnQpID0+IHZvaWQ7XG59XG5cbmNvbnN0IGJsdXJTZWxlY3RJbnB1dCA9IChldmVudDogTW91c2VFdmVudDxIVE1MRGl2RWxlbWVudD4pID0+IHtcbiAgY29uc3QgZWxlbWVudCA9IGV2ZW50LnRhcmdldCBhcyBIVE1MRGl2RWxlbWVudDtcbiAgcmV0dXJuIChcbiAgICBlbGVtZW50Lm93bmVyRG9jdW1lbnQuYWN0aXZlRWxlbWVudCAmJlxuICAgIChlbGVtZW50Lm93bmVyRG9jdW1lbnQuYWN0aXZlRWxlbWVudCBhcyBIVE1MRWxlbWVudCkuYmx1cigpXG4gICk7XG59O1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBTY3JvbGxNYW5hZ2VyKHtcbiAgY2hpbGRyZW4sXG4gIGxvY2tFbmFibGVkLFxuICBjYXB0dXJlRW5hYmxlZCA9IHRydWUsXG4gIG9uQm90dG9tQXJyaXZlLFxuICBvbkJvdHRvbUxlYXZlLFxuICBvblRvcEFycml2ZSxcbiAgb25Ub3BMZWF2ZSxcbn06IFByb3BzKSB7XG4gIGNvbnN0IHNldFNjcm9sbENhcHR1cmVUYXJnZXQgPSB1c2VTY3JvbGxDYXB0dXJlKHtcbiAgICBpc0VuYWJsZWQ6IGNhcHR1cmVFbmFibGVkLFxuICAgIG9uQm90dG9tQXJyaXZlLFxuICAgIG9uQm90dG9tTGVhdmUsXG4gICAgb25Ub3BBcnJpdmUsXG4gICAgb25Ub3BMZWF2ZSxcbiAgfSk7XG4gIGNvbnN0IHNldFNjcm9sbExvY2tUYXJnZXQgPSB1c2VTY3JvbGxMb2NrKHsgaXNFbmFibGVkOiBsb2NrRW5hYmxlZCB9KTtcblxuICBjb25zdCB0YXJnZXRSZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PiA9IChlbGVtZW50KSA9PiB7XG4gICAgc2V0U2Nyb2xsQ2FwdHVyZVRhcmdldChlbGVtZW50KTtcbiAgICBzZXRTY3JvbGxMb2NrVGFyZ2V0KGVsZW1lbnQpO1xuICB9O1xuXG4gIHJldHVybiAoXG4gICAgPEZyYWdtZW50PlxuICAgICAge2xvY2tFbmFibGVkICYmIChcbiAgICAgICAgPGRpdlxuICAgICAgICAgIG9uQ2xpY2s9e2JsdXJTZWxlY3RJbnB1dH1cbiAgICAgICAgICBjc3M9e3sgcG9zaXRpb246ICdmaXhlZCcsIGxlZnQ6IDAsIGJvdHRvbTogMCwgcmlnaHQ6IDAsIHRvcDogMCB9fVxuICAgICAgICAvPlxuICAgICAgKX1cbiAgICAgIHtjaGlsZHJlbih0YXJnZXRSZWYpfVxuICAgIDwvRnJhZ21lbnQ+XG4gICk7XG59XG4iXX0= */",toString:_M};function EM(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,i=r===void 0?!0:r,s=e.onBottomArrive,o=e.onBottomLeave,a=e.onTopArrive,l=e.onTopLeave,c=wM({isEnabled:i,onBottomArrive:s,onBottomLeave:o,onTopArrive:a,onTopLeave:l}),u=SM({isEnabled:n}),d=function(h){c(h),u(h)};return K(C.Fragment,null,n&&K("div",{onClick:IM,css:MM}),t(d))}function AM(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var kM=process.env.NODE_ENV==="production"?{name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"}:{name:"5kkxb2-requiredInput-RequiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%;label:RequiredInput;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlJlcXVpcmVkSW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWNJIiwiZmlsZSI6IlJlcXVpcmVkSW5wdXQudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiLyoqIEBqc3gganN4ICovXG5pbXBvcnQgeyBGb2N1c0V2ZW50SGFuZGxlciwgRnVuY3Rpb25Db21wb25lbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmNvbnN0IFJlcXVpcmVkSW5wdXQ6IEZ1bmN0aW9uQ29tcG9uZW50PHtcbiAgcmVhZG9ubHkgbmFtZT86IHN0cmluZztcbiAgcmVhZG9ubHkgb25Gb2N1czogRm9jdXNFdmVudEhhbmRsZXI8SFRNTElucHV0RWxlbWVudD47XG59PiA9ICh7IG5hbWUsIG9uRm9jdXMgfSkgPT4gKFxuICA8aW5wdXRcbiAgICByZXF1aXJlZFxuICAgIG5hbWU9e25hbWV9XG4gICAgdGFiSW5kZXg9ey0xfVxuICAgIGFyaWEtaGlkZGVuPVwidHJ1ZVwiXG4gICAgb25Gb2N1cz17b25Gb2N1c31cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAncmVxdWlyZWRJbnB1dCcsXG4gICAgICBvcGFjaXR5OiAwLFxuICAgICAgcG9pbnRlckV2ZW50czogJ25vbmUnLFxuICAgICAgcG9zaXRpb246ICdhYnNvbHV0ZScsXG4gICAgICBib3R0b206IDAsXG4gICAgICBsZWZ0OiAwLFxuICAgICAgcmlnaHQ6IDAsXG4gICAgICB3aWR0aDogJzEwMCUnLFxuICAgIH19XG4gICAgLy8gUHJldmVudCBgU3dpdGNoaW5nIGZyb20gdW5jb250cm9sbGVkIHRvIGNvbnRyb2xsZWRgIGVycm9yXG4gICAgdmFsdWU9XCJcIlxuICAgIG9uQ2hhbmdlPXsoKSA9PiB7fX1cbiAgLz5cbik7XG5cbmV4cG9ydCBkZWZhdWx0IFJlcXVpcmVkSW5wdXQ7XG4iXX0= */",toString:AM},RM=function(t){var n=t.name,r=t.onFocus;return K("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:kM,value:"",onChange:function(){}})},PM=RM;function Mf(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function OM(){return Mf(/^iPhone/i)}function _v(){return Mf(/^Mac/i)}function DM(){return Mf(/^iPad/i)||_v()&&navigator.maxTouchPoints>1}function FM(){return OM()||DM()}function TM(){return _v()||FM()}var NM=function(t){return t.label},Iv=function(t){return t.label},Mv=function(t){return t.value},LM=function(t){return!!t.isDisabled},VM={clearIndicator:y5,container:l5,control:E5,dropdownIndicator:v5,group:P5,groupHeading:D5,indicatorsContainer:f5,indicatorSeparator:w5,input:L5,loadingIndicator:I5,loadingMessage:r5,menu:JI,menuList:e5,menuPortal:o5,multiValue:$5,multiValueLabel:W5,multiValueRemove:H5,noOptionsMessage:n5,option:J5,placeholder:q5,singleValue:nM,valueContainer:u5},BM={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},jM=4,Ev=4,GM=38,$M=Ev*2,WM={baseUnit:Ev,controlHeight:GM,menuGutter:$M},nu={borderRadius:jM,colors:BM,spacing:WM},HM={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Jg(),captureMenuScroll:!Jg(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:vM(),formatGroupLabel:NM,getOptionLabel:Iv,getOptionValue:Mv,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:LM,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!jI(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var n=t.count;return"".concat(n," result").concat(n!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function lp(e,t,n,r){var i=Rv(e,t,n),s=Pv(e,t,n),o=kv(e,t),a=_l(e,t);return{type:"option",data:t,isDisabled:i,isSelected:s,label:o,value:a,index:r}}function Xa(e,t){return e.options.map(function(n,r){if("options"in n){var i=n.options.map(function(o,a){return lp(e,o,t,a)}).filter(function(o){return up(e,o)});return i.length>0?{type:"group",data:n,options:i,index:r}:void 0}var s=lp(e,n,t,r);return up(e,s)?s:void 0}).filter(WI)}function Av(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,Xi(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function cp(e,t){return e.reduce(function(n,r){return r.type==="group"?n.push.apply(n,Xi(r.options.map(function(i){return{data:i.data,id:"".concat(t,"-").concat(r.index,"-").concat(i.index)}}))):n.push({data:r.data,id:"".concat(t,"-").concat(r.index)}),n},[])}function zM(e,t){return Av(Xa(e,t))}function up(e,t){var n=e.inputValue,r=n===void 0?"":n,i=t.data,s=t.isSelected,o=t.label,a=t.value;return(!Dv(e)||!s)&&Ov(e,{label:o,value:a,data:i},r)}function YM(e,t){var n=e.focusedValue,r=e.selectValue,i=r.indexOf(n);if(i>-1){var s=t.indexOf(n);if(s>-1)return n;if(i<t.length)return t[i]}return null}function XM(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var ru=function(t,n){var r,i=(r=t.find(function(s){return s.data===n}))===null||r===void 0?void 0:r.id;return i||null},kv=function(t,n){return t.getOptionLabel(n)},_l=function(t,n){return t.getOptionValue(n)};function Rv(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function Pv(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=_l(e,t);return n.some(function(i){return _l(e,i)===r})}function Ov(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var Dv=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},ZM=1,Ef=function(e){M4(n,e);var t=k4(n);function n(r){var i;if(_4(this,n),i=t.call(this,r),i.state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:"",isAppleDevice:!1},i.blockOptionHover=!1,i.isComposing=!1,i.commonProps=void 0,i.initialTouchX=0,i.initialTouchY=0,i.openAfterFocus=!1,i.scrollToFocusedOptionOnUpdate=!1,i.userIsDragging=void 0,i.controlRef=null,i.getControlRef=function(l){i.controlRef=l},i.focusedOptionRef=null,i.getFocusedOptionRef=function(l){i.focusedOptionRef=l},i.menuListRef=null,i.getMenuListRef=function(l){i.menuListRef=l},i.inputRef=null,i.getInputRef=function(l){i.inputRef=l},i.focus=i.focusInput,i.blur=i.blurInput,i.onChange=function(l,c){var u=i.props,d=u.onChange,f=u.name;c.name=f,i.ariaOnChange(l,c),d(l,c)},i.setValue=function(l,c,u){var d=i.props,f=d.closeMenuOnSelect,h=d.isMulti,g=d.inputValue;i.onInputChange("",{action:"set-value",prevInputValue:g}),f&&(i.setState({inputIsHiddenAfterUpdate:!h}),i.onMenuClose()),i.setState({clearFocusValueOnUpdate:!0}),i.onChange(l,{action:c,option:u})},i.selectOption=function(l){var c=i.props,u=c.blurInputOnSelect,d=c.isMulti,f=c.name,h=i.state.selectValue,g=d&&i.isOptionSelected(l,h),p=i.isOptionDisabled(l,h);if(g){var m=i.getOptionValue(l);i.setValue(h.filter(function(b){return i.getOptionValue(b)!==m}),"deselect-option",l)}else if(!p)d?i.setValue([].concat(Xi(h),[l]),"select-option",l):i.setValue(l,"select-option");else{i.ariaOnChange(l,{action:"select-option",option:l,name:f});return}u&&i.blurInput()},i.removeValue=function(l){var c=i.props.isMulti,u=i.state.selectValue,d=i.getOptionValue(l),f=u.filter(function(g){return i.getOptionValue(g)!==d}),h=Vs(c,f,f[0]||null);i.onChange(h,{action:"remove-value",removedValue:l}),i.focusInput()},i.clearValue=function(){var l=i.state.selectValue;i.onChange(Vs(i.props.isMulti,[],null),{action:"clear",removedValues:l})},i.popValue=function(){var l=i.props.isMulti,c=i.state.selectValue,u=c[c.length-1],d=c.slice(0,c.length-1),f=Vs(l,d,d[0]||null);u&&i.onChange(f,{action:"pop-value",removedValue:u})},i.getFocusedOptionId=function(l){return ru(i.state.focusableOptionsWithIds,l)},i.getFocusableOptionsWithIds=function(){return cp(Xa(i.props,i.state.selectValue),i.getElementId("option"))},i.getValue=function(){return i.state.selectValue},i.cx=function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];return TI.apply(void 0,[i.props.classNamePrefix].concat(c))},i.getOptionLabel=function(l){return kv(i.props,l)},i.getOptionValue=function(l){return _l(i.props,l)},i.getStyles=function(l,c){var u=i.props.unstyled,d=VM[l](c,u);d.boxSizing="border-box";var f=i.props.styles[l];return f?f(d,c):d},i.getClassNames=function(l,c){var u,d;return(u=(d=i.props.classNames)[l])===null||u===void 0?void 0:u.call(d,c)},i.getElementId=function(l){return"".concat(i.state.instancePrefix,"-").concat(l)},i.getComponents=function(){return sM(i.props)},i.buildCategorizedOptions=function(){return Xa(i.props,i.state.selectValue)},i.getCategorizedOptions=function(){return i.props.menuIsOpen?i.buildCategorizedOptions():[]},i.buildFocusableOptions=function(){return Av(i.buildCategorizedOptions())},i.getFocusableOptions=function(){return i.props.menuIsOpen?i.buildFocusableOptions():[]},i.ariaOnChange=function(l,c){i.setState({ariaSelection:ee({value:l},c)})},i.onMenuMouseDown=function(l){l.button===0&&(l.stopPropagation(),l.preventDefault(),i.focusInput())},i.onMenuMouseMove=function(l){i.blockOptionHover=!1},i.onControlMouseDown=function(l){if(!l.defaultPrevented){var c=i.props.openMenuOnClick;i.state.isFocused?i.props.menuIsOpen?l.target.tagName!=="INPUT"&&l.target.tagName!=="TEXTAREA"&&i.onMenuClose():c&&i.openMenu("first"):(c&&(i.openAfterFocus=!0),i.focusInput()),l.target.tagName!=="INPUT"&&l.target.tagName!=="TEXTAREA"&&l.preventDefault()}},i.onDropdownIndicatorMouseDown=function(l){if(!(l&&l.type==="mousedown"&&l.button!==0)&&!i.props.isDisabled){var c=i.props,u=c.isMulti,d=c.menuIsOpen;i.focusInput(),d?(i.setState({inputIsHiddenAfterUpdate:!u}),i.onMenuClose()):i.openMenu("first"),l.preventDefault()}},i.onClearIndicatorMouseDown=function(l){l&&l.type==="mousedown"&&l.button!==0||(i.clearValue(),l.preventDefault(),i.openAfterFocus=!1,l.type==="touchend"?i.focusInput():setTimeout(function(){return i.focusInput()}))},i.onScroll=function(l){typeof i.props.closeMenuOnScroll=="boolean"?l.target instanceof HTMLElement&&mc(l.target)&&i.props.onMenuClose():typeof i.props.closeMenuOnScroll=="function"&&i.props.closeMenuOnScroll(l)&&i.props.onMenuClose()},i.onCompositionStart=function(){i.isComposing=!0},i.onCompositionEnd=function(){i.isComposing=!1},i.onTouchStart=function(l){var c=l.touches,u=c&&c.item(0);u&&(i.initialTouchX=u.clientX,i.initialTouchY=u.clientY,i.userIsDragging=!1)},i.onTouchMove=function(l){var c=l.touches,u=c&&c.item(0);if(u){var d=Math.abs(u.clientX-i.initialTouchX),f=Math.abs(u.clientY-i.initialTouchY),h=5;i.userIsDragging=d>h||f>h}},i.onTouchEnd=function(l){i.userIsDragging||(i.controlRef&&!i.controlRef.contains(l.target)&&i.menuListRef&&!i.menuListRef.contains(l.target)&&i.blurInput(),i.initialTouchX=0,i.initialTouchY=0)},i.onControlTouchEnd=function(l){i.userIsDragging||i.onControlMouseDown(l)},i.onClearIndicatorTouchEnd=function(l){i.userIsDragging||i.onClearIndicatorMouseDown(l)},i.onDropdownIndicatorTouchEnd=function(l){i.userIsDragging||i.onDropdownIndicatorMouseDown(l)},i.handleInputChange=function(l){var c=i.props.inputValue,u=l.currentTarget.value;i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange(u,{action:"input-change",prevInputValue:c}),i.props.menuIsOpen||i.onMenuOpen()},i.onInputFocus=function(l){i.props.onFocus&&i.props.onFocus(l),i.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(i.openAfterFocus||i.props.openMenuOnFocus)&&i.openMenu("first"),i.openAfterFocus=!1},i.onInputBlur=function(l){var c=i.props.inputValue;if(i.menuListRef&&i.menuListRef.contains(document.activeElement)){i.inputRef.focus();return}i.props.onBlur&&i.props.onBlur(l),i.onInputChange("",{action:"input-blur",prevInputValue:c}),i.onMenuClose(),i.setState({focusedValue:null,isFocused:!1})},i.onOptionHover=function(l){if(!(i.blockOptionHover||i.state.focusedOption===l)){var c=i.getFocusableOptions(),u=c.indexOf(l);i.setState({focusedOption:l,focusedOptionId:u>-1?i.getFocusedOptionId(l):null})}},i.shouldHideSelectedOptions=function(){return Dv(i.props)},i.onValueInputFocus=function(l){l.preventDefault(),l.stopPropagation(),i.focus()},i.onKeyDown=function(l){var c=i.props,u=c.isMulti,d=c.backspaceRemovesValue,f=c.escapeClearsValue,h=c.inputValue,g=c.isClearable,p=c.isDisabled,m=c.menuIsOpen,b=c.onKeyDown,x=c.tabSelectsValue,y=c.openMenuOnFocus,_=i.state,w=_.focusedOption,E=_.focusedValue,M=_.selectValue;if(!p&&!(typeof b=="function"&&(b(l),l.defaultPrevented))){switch(i.blockOptionHover=!0,l.key){case"ArrowLeft":if(!u||h)return;i.focusValue("previous");break;case"ArrowRight":if(!u||h)return;i.focusValue("next");break;case"Delete":case"Backspace":if(h)return;if(E)i.removeValue(E);else{if(!d)return;u?i.popValue():g&&i.clearValue()}break;case"Tab":if(i.isComposing||l.shiftKey||!m||!x||!w||y&&i.isOptionSelected(w,M))return;i.selectOption(w);break;case"Enter":if(l.keyCode===229)break;if(m){if(!w||i.isComposing)return;i.selectOption(w);break}return;case"Escape":m?(i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange("",{action:"menu-close",prevInputValue:h}),i.onMenuClose()):g&&f&&i.clearValue();break;case" ":if(h)return;if(!m){i.openMenu("first");break}if(!w)return;i.selectOption(w);break;case"ArrowUp":m?i.focusOption("up"):i.openMenu("last");break;case"ArrowDown":m?i.focusOption("down"):i.openMenu("first");break;case"PageUp":if(!m)return;i.focusOption("pageup");break;case"PageDown":if(!m)return;i.focusOption("pagedown");break;case"Home":if(!m)return;i.focusOption("first");break;case"End":if(!m)return;i.focusOption("last");break;default:return}l.preventDefault()}},i.state.instancePrefix="react-select-"+(i.props.instanceId||++ZM),i.state.selectValue=wl(r.value),r.menuIsOpen&&i.state.selectValue.length){var s=i.getFocusableOptionsWithIds(),o=i.buildFocusableOptions(),a=o.indexOf(i.state.selectValue[0]);i.state.focusableOptionsWithIds=s,i.state.focusedOption=o[a],i.state.focusedOptionId=ru(s,o[a])}return i}return I4(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&Ug(this.menuListRef,this.focusedOptionRef),TM()&&this.setState({isAppleDevice:!0})}},{key:"componentDidUpdate",value:function(i){var s=this.props,o=s.isDisabled,a=s.menuIsOpen,l=this.state.isFocused;(l&&!o&&i.isDisabled||l&&a&&!i.menuIsOpen)&&this.focusInput(),l&&o&&!i.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!l&&!o&&i.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(Ug(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(i,s){this.props.onInputChange(i,s)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(i){var s=this,o=this.state,a=o.selectValue,l=o.isFocused,c=this.buildFocusableOptions(),u=i==="first"?0:c.length-1;if(!this.props.isMulti){var d=c.indexOf(a[0]);d>-1&&(u=d)}this.scrollToFocusedOptionOnUpdate=!(l&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:c[u],focusedOptionId:this.getFocusedOptionId(c[u])},function(){return s.onMenuOpen()})}},{key:"focusValue",value:function(i){var s=this.state,o=s.selectValue,a=s.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var l=o.indexOf(a);a||(l=-1);var c=o.length-1,u=-1;if(o.length){switch(i){case"previous":l===0?u=0:l===-1?u=c:u=l-1;break;case"next":l>-1&&l<c&&(u=l+1);break}this.setState({inputIsHidden:u!==-1,focusedValue:o[u]})}}}},{key:"focusOption",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",s=this.props.pageSize,o=this.state.focusedOption,a=this.getFocusableOptions();if(a.length){var l=0,c=a.indexOf(o);o||(c=-1),i==="up"?l=c>0?c-1:a.length-1:i==="down"?l=(c+1)%a.length:i==="pageup"?(l=c-s,l<0&&(l=0)):i==="pagedown"?(l=c+s,l>a.length-1&&(l=a.length-1)):i==="last"&&(l=a.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:a[l],focusedValue:null,focusedOptionId:this.getFocusedOptionId(a[l])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(nu):ee(ee({},nu),this.props.theme):nu}},{key:"getCommonProps",value:function(){var i=this.clearValue,s=this.cx,o=this.getStyles,a=this.getClassNames,l=this.getValue,c=this.selectOption,u=this.setValue,d=this.props,f=d.isMulti,h=d.isRtl,g=d.options,p=this.hasValue();return{clearValue:i,cx:s,getStyles:o,getClassNames:a,getValue:l,hasValue:p,isMulti:f,isRtl:h,options:g,selectOption:c,selectProps:d,setValue:u,theme:this.getTheme()}}},{key:"hasValue",value:function(){var i=this.state.selectValue;return i.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var i=this.props,s=i.isClearable,o=i.isMulti;return s===void 0?o:s}},{key:"isOptionDisabled",value:function(i,s){return Rv(this.props,i,s)}},{key:"isOptionSelected",value:function(i,s){return Pv(this.props,i,s)}},{key:"filterOption",value:function(i,s){return Ov(this.props,i,s)}},{key:"formatOptionLabel",value:function(i,s){if(typeof this.props.formatOptionLabel=="function"){var o=this.props.inputValue,a=this.state.selectValue;return this.props.formatOptionLabel(i,{context:s,inputValue:o,selectValue:a})}else return this.getOptionLabel(i)}},{key:"formatGroupLabel",value:function(i){return this.props.formatGroupLabel(i)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var i=this.props,s=i.isDisabled,o=i.isSearchable,a=i.inputId,l=i.inputValue,c=i.tabIndex,u=i.form,d=i.menuIsOpen,f=i.required,h=this.getComponents(),g=h.Input,p=this.state,m=p.inputIsHidden,b=p.ariaSelection,x=this.commonProps,y=a||this.getElementId("input"),_=ee(ee(ee({"aria-autocomplete":"list","aria-expanded":d,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":f,role:"combobox","aria-activedescendant":this.state.isAppleDevice?void 0:this.state.focusedOptionId||""},d&&{"aria-controls":this.getElementId("listbox")}),!o&&{"aria-readonly":!0}),this.hasValue()?(b==null?void 0:b.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return o?B.createElement(g,te({},x,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:y,innerRef:this.getInputRef,isDisabled:s,isHidden:m,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:c,form:u,type:"text",value:l},_)):B.createElement(yM,te({id:y,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Cl,onFocus:this.onInputFocus,disabled:s,tabIndex:c,inputMode:"none",form:u,value:""},_))}},{key:"renderPlaceholderOrValue",value:function(){var i=this,s=this.getComponents(),o=s.MultiValue,a=s.MultiValueContainer,l=s.MultiValueLabel,c=s.MultiValueRemove,u=s.SingleValue,d=s.Placeholder,f=this.commonProps,h=this.props,g=h.controlShouldRenderValue,p=h.isDisabled,m=h.isMulti,b=h.inputValue,x=h.placeholder,y=this.state,_=y.selectValue,w=y.focusedValue,E=y.isFocused;if(!this.hasValue()||!g)return b?null:B.createElement(d,te({},f,{key:"placeholder",isDisabled:p,isFocused:E,innerProps:{id:this.getElementId("placeholder")}}),x);if(m)return _.map(function(S,I){var A=S===w,k="".concat(i.getOptionLabel(S),"-").concat(i.getOptionValue(S));return B.createElement(o,te({},f,{components:{Container:a,Label:l,Remove:c},isFocused:A,isDisabled:p,key:k,index:I,removeProps:{onClick:function(){return i.removeValue(S)},onTouchEnd:function(){return i.removeValue(S)},onMouseDown:function(N){N.preventDefault()}},data:S}),i.formatOptionLabel(S,"value"))});if(b)return null;var M=_[0];return B.createElement(u,te({},f,{data:M,isDisabled:p}),this.formatOptionLabel(M,"value"))}},{key:"renderClearIndicator",value:function(){var i=this.getComponents(),s=i.ClearIndicator,o=this.commonProps,a=this.props,l=a.isDisabled,c=a.isLoading,u=this.state.isFocused;if(!this.isClearable()||!s||l||!this.hasValue()||c)return null;var d={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return B.createElement(s,te({},o,{innerProps:d,isFocused:u}))}},{key:"renderLoadingIndicator",value:function(){var i=this.getComponents(),s=i.LoadingIndicator,o=this.commonProps,a=this.props,l=a.isDisabled,c=a.isLoading,u=this.state.isFocused;if(!s||!c)return null;var d={"aria-hidden":"true"};return B.createElement(s,te({},o,{innerProps:d,isDisabled:l,isFocused:u}))}},{key:"renderIndicatorSeparator",value:function(){var i=this.getComponents(),s=i.DropdownIndicator,o=i.IndicatorSeparator;if(!s||!o)return null;var a=this.commonProps,l=this.props.isDisabled,c=this.state.isFocused;return B.createElement(o,te({},a,{isDisabled:l,isFocused:c}))}},{key:"renderDropdownIndicator",value:function(){var i=this.getComponents(),s=i.DropdownIndicator;if(!s)return null;var o=this.commonProps,a=this.props.isDisabled,l=this.state.isFocused,c={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return B.createElement(s,te({},o,{innerProps:c,isDisabled:a,isFocused:l}))}},{key:"renderMenu",value:function(){var i=this,s=this.getComponents(),o=s.Group,a=s.GroupHeading,l=s.Menu,c=s.MenuList,u=s.MenuPortal,d=s.LoadingMessage,f=s.NoOptionsMessage,h=s.Option,g=this.commonProps,p=this.state.focusedOption,m=this.props,b=m.captureMenuScroll,x=m.inputValue,y=m.isLoading,_=m.loadingMessage,w=m.minMenuHeight,E=m.maxMenuHeight,M=m.menuIsOpen,S=m.menuPlacement,I=m.menuPosition,A=m.menuPortalTarget,k=m.menuShouldBlockScroll,D=m.menuShouldScrollIntoView,N=m.noOptionsMessage,V=m.onMenuScrollToTop,P=m.onMenuScrollToBottom;if(!M)return null;var T=function(G,se){var ce=G.type,me=G.data,Ye=G.isDisabled,ne=G.isSelected,he=G.label,Te=G.value,Q=p===me,H=Ye?void 0:function(){return i.onOptionHover(me)},$e=Ye?void 0:function(){return i.selectOption(me)},J="".concat(i.getElementId("option"),"-").concat(se),xe={id:J,onClick:$e,onMouseMove:H,onMouseOver:H,tabIndex:-1,role:"option","aria-selected":i.state.isAppleDevice?void 0:ne};return B.createElement(h,te({},g,{innerProps:xe,data:me,isDisabled:Ye,isSelected:ne,key:J,label:he,type:ce,value:Te,isFocused:Q,innerRef:Q?i.getFocusedOptionRef:void 0}),i.formatOptionLabel(G.data,"menu"))},L;if(this.hasOptions())L=this.getCategorizedOptions().map(function(W){if(W.type==="group"){var G=W.data,se=W.options,ce=W.index,me="".concat(i.getElementId("group"),"-").concat(ce),Ye="".concat(me,"-heading");return B.createElement(o,te({},g,{key:me,data:G,options:se,Heading:a,headingProps:{id:Ye,data:W.data},label:i.formatGroupLabel(W.data)}),W.options.map(function(ne){return T(ne,"".concat(ce,"-").concat(ne.index))}))}else if(W.type==="option")return T(W,"".concat(W.index))});else if(y){var R=_({inputValue:x});if(R===null)return null;L=B.createElement(d,g,R)}else{var O=N({inputValue:x});if(O===null)return null;L=B.createElement(f,g,O)}var $={minMenuHeight:w,maxMenuHeight:E,menuPlacement:S,menuPosition:I,menuShouldScrollIntoView:D},Y=B.createElement(QI,te({},g,$),function(W){var G=W.ref,se=W.placerProps,ce=se.placement,me=se.maxHeight;return B.createElement(l,te({},g,$,{innerRef:G,innerProps:{onMouseDown:i.onMenuMouseDown,onMouseMove:i.onMenuMouseMove},isLoading:y,placement:ce}),B.createElement(EM,{captureEnabled:b,onTopArrive:V,onBottomArrive:P,lockEnabled:k},function(Ye){return B.createElement(c,te({},g,{innerRef:function(he){i.getMenuListRef(he),Ye(he)},innerProps:{role:"listbox","aria-multiselectable":g.isMulti,id:i.getElementId("listbox")},isLoading:y,maxHeight:me,focusedOption:p}),L)}))});return A||I==="fixed"?B.createElement(u,te({},g,{appendTo:A,controlElement:this.controlRef,menuPlacement:S,menuPosition:I}),Y):Y}},{key:"renderFormField",value:function(){var i=this,s=this.props,o=s.delimiter,a=s.isDisabled,l=s.isMulti,c=s.name,u=s.required,d=this.state.selectValue;if(u&&!this.hasValue()&&!a)return B.createElement(PM,{name:c,onFocus:this.onValueInputFocus});if(!(!c||a))if(l)if(o){var f=d.map(function(p){return i.getOptionValue(p)}).join(o);return B.createElement("input",{name:c,type:"hidden",value:f})}else{var h=d.length>0?d.map(function(p,m){return B.createElement("input",{key:"i-".concat(m),name:c,type:"hidden",value:i.getOptionValue(p)})}):B.createElement("input",{name:c,type:"hidden",value:""});return B.createElement("div",null,h)}else{var g=d[0]?this.getOptionValue(d[0]):"";return B.createElement("input",{name:c,type:"hidden",value:g})}}},{key:"renderLiveRegion",value:function(){var i=this.commonProps,s=this.state,o=s.ariaSelection,a=s.focusedOption,l=s.focusedValue,c=s.isFocused,u=s.selectValue,d=this.getFocusableOptions();return B.createElement(gM,te({},i,{id:this.getElementId("live-region"),ariaSelection:o,focusedOption:a,focusedValue:l,isFocused:c,selectValue:u,focusableOptions:d,isAppleDevice:this.state.isAppleDevice}))}},{key:"render",value:function(){var i=this.getComponents(),s=i.Control,o=i.IndicatorsContainer,a=i.SelectContainer,l=i.ValueContainer,c=this.props,u=c.className,d=c.id,f=c.isDisabled,h=c.menuIsOpen,g=this.state.isFocused,p=this.commonProps=this.getCommonProps();return B.createElement(a,te({},p,{className:u,innerProps:{id:d,onKeyDown:this.onKeyDown},isDisabled:f,isFocused:g}),this.renderLiveRegion(),B.createElement(s,te({},p,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:f,isFocused:g,menuIsOpen:h}),B.createElement(l,te({},p,{isDisabled:f}),this.renderPlaceholderOrValue(),this.renderInput()),B.createElement(o,te({},p,{isDisabled:f}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(i,s){var o=s.prevProps,a=s.clearFocusValueOnUpdate,l=s.inputIsHiddenAfterUpdate,c=s.ariaSelection,u=s.isFocused,d=s.prevWasFocused,f=s.instancePrefix,h=i.options,g=i.value,p=i.menuIsOpen,m=i.inputValue,b=i.isMulti,x=wl(g),y={};if(o&&(g!==o.value||h!==o.options||p!==o.menuIsOpen||m!==o.inputValue)){var _=p?zM(i,x):[],w=p?cp(Xa(i,x),"".concat(f,"-option")):[],E=a?YM(s,x):null,M=XM(s,_),S=ru(w,M);y={selectValue:x,focusedOption:M,focusedOptionId:S,focusableOptionsWithIds:w,focusedValue:E,clearFocusValueOnUpdate:!1}}var I=l!=null&&i!==o?{inputIsHidden:l,inputIsHiddenAfterUpdate:void 0}:{},A=c,k=u&&d;return u&&!k&&(A={value:Vs(b,x,x[0]||null),options:x,action:"initial-input-focus"},k=!d),(c==null?void 0:c.action)==="initial-input-focus"&&(A=null),ee(ee(ee({},y),I),{},{prevProps:i,ariaSelection:A,prevWasFocused:k})}}]),n}(C.Component);Ef.defaultProps=HM;var UM=C.forwardRef(function(e,t){var n=Jb(e);return B.createElement(Ef,te({ref:t},n))}),Fv=UM,JM=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],dp=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,i=String(t).toLowerCase(),s=String(r.getOptionValue(n)).toLowerCase(),o=String(r.getOptionLabel(n)).toLowerCase();return s===i||o===i},iu={formatCreateLabel:function(t){return'Create "'.concat(t,'"')},isValidNewOption:function(t,n,r,i){return!(!t||n.some(function(s){return dp(t,s,i)})||r.some(function(s){return dp(t,s,i)}))},getNewOptionData:function(t,n){return{label:n,value:t,__isNew__:!0}}};function QM(e){var t=e.allowCreateWhileLoading,n=t===void 0?!1:t,r=e.createOptionPosition,i=r===void 0?"last":r,s=e.formatCreateLabel,o=s===void 0?iu.formatCreateLabel:s,a=e.isValidNewOption,l=a===void 0?iu.isValidNewOption:a,c=e.getNewOptionData,u=c===void 0?iu.getNewOptionData:c,d=e.onCreateOption,f=e.options,h=f===void 0?[]:f,g=e.onChange,p=Hn(e,JM),m=p.getOptionValue,b=m===void 0?Mv:m,x=p.getOptionLabel,y=x===void 0?Iv:x,_=p.inputValue,w=p.isLoading,E=p.isMulti,M=p.value,S=p.name,I=C.useMemo(function(){return l(_,wl(M),h,{getOptionValue:b,getOptionLabel:y})?u(_,o(_)):void 0},[o,u,y,b,_,l,h,M]),A=C.useMemo(function(){return(n||!w)&&I?i==="first"?[I].concat(Xi(h)):[].concat(Xi(h),[I]):h},[n,i,w,I,h]),k=C.useCallback(function(D,N){if(N.action!=="select-option")return g(D,N);var V=Array.isArray(D)?D:[D];if(V[V.length-1]===I){if(d)d(_);else{var P=u(_,_),T={action:"create-option",name:S,option:P};g(Vs(E,[].concat(Xi(wl(M)),[P]),P),T)}return}g(D,N)},[u,_,E,S,I,d,g,M]);return ee(ee({},p),{},{options:A,onChange:k})}var KM=C.forwardRef(function(e,t){var n=Jb(e),r=QM(n);return B.createElement(Ef,te({ref:t},r))}),qM=KM;const Tv=({label:e,placeholder:t,options:n,selectedOptions:r,handleChange:i,className:s="",creatable:o=!1,disabled:a,isMulti:l=!0,customStyles:c,menuPosition:u="fixed",alwaysShowPlaceholder:d=!1,isClearable:f=!1,selectInputClassname:h="",closeMenuOnSelect:g=!0,customOptionRenderer:p,menuPortalTarget:m,onInputChange:b,isLoading:x=!1,noOptionsMessage:y,includeApply:_,onApply:w})=>{const E=o?qM:Fv,[M,S]=C.useState(!1),I=C.useRef(null);C.useEffect(()=>{if(g)return;const R=O=>{var $;($=I.current)!=null&&$.contains(O.target)?S(Y=>!Y):S(!1)};return document.addEventListener("mousedown",R),()=>document.removeEventListener("mousedown",R)},[g]);const A=[...r,...n.filter(R=>!r.some(O=>O.value===R.value))],k=R=>v.jsxs(pn.Control,{...R,children:[!R.getValue().length&&v.jsx(pn.Placeholder,{...R,children:R.selectProps.placeholder}),R.children]}),D=R=>{const{data:O,isSelected:$}=R;if(p){const Y=p;return v.jsx(pn.Option,{...R,children:v.jsx(Y,{data:O,isSelected:$})})}return _?v.jsx(pn.Option,{...R,children:v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("input",{type:"checkbox",checked:$,readOnly:!0,style:{accentColor:"var(--brand-orange)",marginRight:8}}),O.icon&&v.jsx("span",{className:"",children:O.icon}),v.jsx("span",{children:O.label})]})}):v.jsx(pn.Option,{...R,children:v.jsxs("div",{className:"flex items-center flex-1 gap-2",children:[O.icon&&v.jsx("span",{className:"option-icon",children:O.icon}),v.jsx("span",{children:O.label})]})})},N=R=>{const{data:O}=R;if(p){const $=p;return v.jsx(pn.SingleValue,{...R,children:v.jsx($,{data:O})})}return v.jsx(pn.SingleValue,{...R,children:v.jsx("div",{className:"flex items-center gap-2",children:v.jsx("span",{children:O.label})})})},V=R=>{const{data:O}=R;return v.jsx(pn.MultiValue,{...R,children:v.jsx("div",{className:"flex items-center gap-1",children:v.jsx("span",{children:O.label})})})},P=R=>{const{children:O}=R;return v.jsxs(pn.Menu,{...R,children:[O,_&&v.jsx("div",{style:{padding:"8px"},children:v.jsx("button",{onClick:$=>{$.stopPropagation(),w==null||w(),S(!1)},style:{width:"100%",padding:"8px",background:"var(--brand-orange)",color:"white",border:"none",cursor:"pointer",borderRadius:"4px"},onMouseEnter:$=>$.currentTarget.style.opacity="0.9",onMouseLeave:$=>$.currentTarget.style.opacity="1",children:"Apply"})})]})},T=R=>v.jsx(pn.DropdownIndicator,{...R}),L=()=>d?{Control:k,SingleValue:R=>R.selectProps.menuIsOpen?v.jsx(N,{...R}):v.jsx("div",{style:{position:"absolute",left:"10px"},children:t}),Option:D,MultiValue:V,DropdownIndicator:T,Menu:P}:{Option:D,SingleValue:N,MultiValue:V,DropdownIndicator:T,Menu:P};return v.jsxs("div",{ref:I,className:`${s} flex flex-col gap-1`,children:[e&&v.jsx("label",{className:"block text-sm font-medium",style:{color:"var(--text-color)"},children:e}),v.jsx(E,{isMulti:l,isClearable:f,value:r,onChange:i,options:A,placeholder:t,isDisabled:a,className:`${h} react-select-container w-full text-sm`,classNamePrefix:"react-select",menuPosition:u,menuPortalTarget:m,components:L(),...!g&&{menuIsOpen:M},onInputChange:b,isLoading:x,noOptionsMessage:y,styles:{control:(R,O)=>({...R,borderColor:O.isFocused?"var(--brand-orange)":"var(--border-color)",borderRadius:"0.25rem",cursor:"pointer",backgroundColor:"var(--bg-color)",color:"var(--text-color)",boxShadow:O.isFocused?"0 0 0 1px var(--brand-orange)":"none",":hover":{borderColor:"var(--brand-orange)"}}),input:R=>({...R,color:"var(--text-color)",boxShadow:"none",border:"none"}),singleValue:R=>({...R,color:"var(--text-color)"}),multiValue:R=>({...R,backgroundColor:"var(--brand-light)",borderRadius:"0.25rem"}),multiValueLabel:R=>({...R,color:"var(--brand-dark)"}),multiValueRemove:R=>({...R,color:"var(--brand-dark)",cursor:"pointer",":hover":{backgroundColor:"var(--brand-orange)",color:"white"}}),placeholder:R=>({...R,color:"var(--secondary-text-color)"}),option:(R,O)=>({...R,backgroundColor:O.isSelected?"var(--brand-orange)":O.isFocused?"var(--hover-bg-color)":"var(--bg-color)",color:O.isSelected?"white":"var(--text-color)",cursor:"pointer",":active":{backgroundColor:"var(--brand-orange)"}}),menu:R=>({...R,backgroundColor:"var(--bg-color)",color:"var(--text-color)",border:"1px solid var(--border-color)",zIndex:9999}),dropdownIndicator:R=>({...R,cursor:"pointer",color:"var(--secondary-text-color)",":hover":{color:"var(--brand-orange)"}}),clearIndicator:R=>({...R,cursor:"pointer",color:"var(--secondary-text-color)",":hover":{color:"var(--brand-orange)"}}),indicatorSeparator:R=>({...R,backgroundColor:"var(--border-color)"}),...c},...o&&{formatCreateLabel:R=>R.trim()?`Create "${R}"`:null,isValidNewOption:R=>R.trim().length>0,noOptionsMessage:()=>`Type to create a new ${e==null?void 0:e.toLowerCase()}`}})]})};/**
41
+ * table-core
42
+ *
43
+ * Copyright (c) TanStack
44
+ *
45
+ * This source code is licensed under the MIT license found in the
46
+ * LICENSE.md file in the root directory of this source tree.
47
+ *
48
+ * @license MIT
49
+ */function kr(e,t){return typeof e=="function"?e(t):e}function Ut(e,t){return n=>{t.setState(r=>({...r,[e]:kr(n,r[e])}))}}function bc(e){return e instanceof Function}function eE(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function tE(e,t){const n=[],r=i=>{i.forEach(s=>{n.push(s);const o=t(s);o!=null&&o.length&&r(o)})};return r(e),n}function oe(e,t,n){let r=[],i;return s=>{let o;n.key&&n.debug&&(o=Date.now());const a=e(s);if(!(a.length!==r.length||a.some((u,d)=>r[d]!==u)))return i;r=a;let c;if(n.key&&n.debug&&(c=Date.now()),i=t(...a),n==null||n.onChange==null||n.onChange(i),n.key&&n.debug&&n!=null&&n.debug()){const u=Math.round((Date.now()-o)*100)/100,d=Math.round((Date.now()-c)*100)/100,f=d/16,h=(g,p)=>{for(g=String(g);g.length<p;)g=" "+g;return g};console.info(`%c⏱ ${h(d,5)} /${h(u,5)} ms`,`
50
+ font-size: .6rem;
51
+ font-weight: bold;
52
+ color: hsl(${Math.max(0,Math.min(120-120*f,120))}deg 100% 31%);`,n==null?void 0:n.key)}return i}}function ae(e,t,n,r){return{debug:()=>{var i;return(i=e==null?void 0:e.debugAll)!=null?i:e[t]},key:process.env.NODE_ENV==="development"&&n,onChange:r}}function nE(e,t,n,r){const i=()=>{var o;return(o=s.getValue())!=null?o:e.options.renderFallbackValue},s={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:i,getContext:oe(()=>[e,n,t,s],(o,a,l,c)=>({table:o,column:a,row:l,cell:c,getValue:c.getValue,renderValue:c.renderValue}),ae(e.options,"debugCells","cell.getContext"))};return e._features.forEach(o=>{o.createCell==null||o.createCell(s,n,t,e)},{}),s}function rE(e,t,n,r){var i,s;const a={...e._getDefaultColumnDef(),...t},l=a.accessorKey;let c=(i=(s=a.id)!=null?s:l?typeof String.prototype.replaceAll=="function"?l.replaceAll(".","_"):l.replace(/\./g,"_"):void 0)!=null?i:typeof a.header=="string"?a.header:void 0,u;if(a.accessorFn?u=a.accessorFn:l&&(l.includes(".")?u=f=>{let h=f;for(const p of l.split(".")){var g;h=(g=h)==null?void 0:g[p],process.env.NODE_ENV!=="production"&&h===void 0&&console.warn(`"${p}" in deeply nested key "${l}" returned undefined.`)}return h}:u=f=>f[a.accessorKey]),!c)throw process.env.NODE_ENV!=="production"?new Error(a.accessorFn?"Columns require an id when using an accessorFn":"Columns require an id when using a non-string header"):new Error;let d={id:`${String(c)}`,accessorFn:u,parent:r,depth:n,columnDef:a,columns:[],getFlatColumns:oe(()=>[!0],()=>{var f;return[d,...(f=d.columns)==null?void 0:f.flatMap(h=>h.getFlatColumns())]},ae(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:oe(()=>[e._getOrderColumnsFn()],f=>{var h;if((h=d.columns)!=null&&h.length){let g=d.columns.flatMap(p=>p.getLeafColumns());return f(g)}return[d]},ae(e.options,"debugColumns","column.getLeafColumns"))};for(const f of e._features)f.createColumn==null||f.createColumn(d,e);return d}const St="debugHeaders";function fp(e,t,n){var r;let s={id:(r=n.id)!=null?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const o=[],a=l=>{l.subHeaders&&l.subHeaders.length&&l.subHeaders.map(a),o.push(l)};return a(s),o},getContext:()=>({table:e,header:s,column:t})};return e._features.forEach(o=>{o.createHeader==null||o.createHeader(s,e)}),s}const iE={createTable:e=>{e.getHeaderGroups=oe(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>{var s,o;const a=(s=r==null?void 0:r.map(d=>n.find(f=>f.id===d)).filter(Boolean))!=null?s:[],l=(o=i==null?void 0:i.map(d=>n.find(f=>f.id===d)).filter(Boolean))!=null?o:[],c=n.filter(d=>!(r!=null&&r.includes(d.id))&&!(i!=null&&i.includes(d.id)));return la(t,[...a,...c,...l],e)},ae(e.options,St,"getHeaderGroups")),e.getCenterHeaderGroups=oe(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>(n=n.filter(s=>!(r!=null&&r.includes(s.id))&&!(i!=null&&i.includes(s.id))),la(t,n,e,"center")),ae(e.options,St,"getCenterHeaderGroups")),e.getLeftHeaderGroups=oe(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var i;const s=(i=r==null?void 0:r.map(o=>n.find(a=>a.id===o)).filter(Boolean))!=null?i:[];return la(t,s,e,"left")},ae(e.options,St,"getLeftHeaderGroups")),e.getRightHeaderGroups=oe(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var i;const s=(i=r==null?void 0:r.map(o=>n.find(a=>a.id===o)).filter(Boolean))!=null?i:[];return la(t,s,e,"right")},ae(e.options,St,"getRightHeaderGroups")),e.getFooterGroups=oe(()=>[e.getHeaderGroups()],t=>[...t].reverse(),ae(e.options,St,"getFooterGroups")),e.getLeftFooterGroups=oe(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),ae(e.options,St,"getLeftFooterGroups")),e.getCenterFooterGroups=oe(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),ae(e.options,St,"getCenterFooterGroups")),e.getRightFooterGroups=oe(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),ae(e.options,St,"getRightFooterGroups")),e.getFlatHeaders=oe(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),ae(e.options,St,"getFlatHeaders")),e.getLeftFlatHeaders=oe(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),ae(e.options,St,"getLeftFlatHeaders")),e.getCenterFlatHeaders=oe(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),ae(e.options,St,"getCenterFlatHeaders")),e.getRightFlatHeaders=oe(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),ae(e.options,St,"getRightFlatHeaders")),e.getCenterLeafHeaders=oe(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),ae(e.options,St,"getCenterLeafHeaders")),e.getLeftLeafHeaders=oe(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),ae(e.options,St,"getLeftLeafHeaders")),e.getRightLeafHeaders=oe(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),ae(e.options,St,"getRightLeafHeaders")),e.getLeafHeaders=oe(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var i,s,o,a,l,c;return[...(i=(s=t[0])==null?void 0:s.headers)!=null?i:[],...(o=(a=n[0])==null?void 0:a.headers)!=null?o:[],...(l=(c=r[0])==null?void 0:c.headers)!=null?l:[]].map(u=>u.getLeafHeaders()).flat()},ae(e.options,St,"getLeafHeaders"))}};function la(e,t,n,r){var i,s;let o=0;const a=function(f,h){h===void 0&&(h=1),o=Math.max(o,h),f.filter(g=>g.getIsVisible()).forEach(g=>{var p;(p=g.columns)!=null&&p.length&&a(g.columns,h+1)},0)};a(e);let l=[];const c=(f,h)=>{const g={depth:h,id:[r,`${h}`].filter(Boolean).join("_"),headers:[]},p=[];f.forEach(m=>{const b=[...p].reverse()[0],x=m.column.depth===g.depth;let y,_=!1;if(x&&m.column.parent?y=m.column.parent:(y=m.column,_=!0),b&&(b==null?void 0:b.column)===y)b.subHeaders.push(m);else{const w=fp(n,y,{id:[r,h,y.id,m==null?void 0:m.id].filter(Boolean).join("_"),isPlaceholder:_,placeholderId:_?`${p.filter(E=>E.column===y).length}`:void 0,depth:h,index:p.length});w.subHeaders.push(m),p.push(w)}g.headers.push(m),m.headerGroup=g}),l.push(g),h>0&&c(p,h-1)},u=t.map((f,h)=>fp(n,f,{depth:o,index:h}));c(u,o-1),l.reverse();const d=f=>f.filter(g=>g.column.getIsVisible()).map(g=>{let p=0,m=0,b=[0];g.subHeaders&&g.subHeaders.length?(b=[],d(g.subHeaders).forEach(y=>{let{colSpan:_,rowSpan:w}=y;p+=_,b.push(w)})):p=1;const x=Math.min(...b);return m=m+x,g.colSpan=p,g.rowSpan=m,{colSpan:p,rowSpan:m}});return d((i=(s=l[0])==null?void 0:s.headers)!=null?i:[]),l}const sE=(e,t,n,r,i,s,o)=>{let a={id:t,index:r,original:n,depth:i,parentId:o,_valuesCache:{},_uniqueValuesCache:{},getValue:l=>{if(a._valuesCache.hasOwnProperty(l))return a._valuesCache[l];const c=e.getColumn(l);if(c!=null&&c.accessorFn)return a._valuesCache[l]=c.accessorFn(a.original,r),a._valuesCache[l]},getUniqueValues:l=>{if(a._uniqueValuesCache.hasOwnProperty(l))return a._uniqueValuesCache[l];const c=e.getColumn(l);if(c!=null&&c.accessorFn)return c.columnDef.getUniqueValues?(a._uniqueValuesCache[l]=c.columnDef.getUniqueValues(a.original,r),a._uniqueValuesCache[l]):(a._uniqueValuesCache[l]=[a.getValue(l)],a._uniqueValuesCache[l])},renderValue:l=>{var c;return(c=a.getValue(l))!=null?c:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>tE(a.subRows,l=>l.subRows),getParentRow:()=>a.parentId?e.getRow(a.parentId,!0):void 0,getParentRows:()=>{let l=[],c=a;for(;;){const u=c.getParentRow();if(!u)break;l.push(u),c=u}return l.reverse()},getAllCells:oe(()=>[e.getAllLeafColumns()],l=>l.map(c=>nE(e,a,c,c.id)),ae(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:oe(()=>[a.getAllCells()],l=>l.reduce((c,u)=>(c[u.column.id]=u,c),{}),ae(e.options,"debugRows","getAllCellsByColumnId"))};for(let l=0;l<e._features.length;l++){const c=e._features[l];c==null||c.createRow==null||c.createRow(a,e)}return a},oE={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},Nv=(e,t,n)=>{var r,i;const s=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return!!(!((i=e.getValue(t))==null||(i=i.toString())==null||(i=i.toLowerCase())==null)&&i.includes(s))};Nv.autoRemove=e=>yn(e);const Lv=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};Lv.autoRemove=e=>yn(e);const Vv=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===(n==null?void 0:n.toLowerCase())};Vv.autoRemove=e=>yn(e);const Bv=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};Bv.autoRemove=e=>yn(e);const jv=(e,t,n)=>!n.some(r=>{var i;return!((i=e.getValue(t))!=null&&i.includes(r))});jv.autoRemove=e=>yn(e)||!(e!=null&&e.length);const Gv=(e,t,n)=>n.some(r=>{var i;return(i=e.getValue(t))==null?void 0:i.includes(r)});Gv.autoRemove=e=>yn(e)||!(e!=null&&e.length);const $v=(e,t,n)=>e.getValue(t)===n;$v.autoRemove=e=>yn(e);const Wv=(e,t,n)=>e.getValue(t)==n;Wv.autoRemove=e=>yn(e);const Af=(e,t,n)=>{let[r,i]=n;const s=e.getValue(t);return s>=r&&s<=i};Af.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,i=typeof n!="number"?parseFloat(n):n,s=t===null||Number.isNaN(r)?-1/0:r,o=n===null||Number.isNaN(i)?1/0:i;if(s>o){const a=s;s=o,o=a}return[s,o]};Af.autoRemove=e=>yn(e)||yn(e[0])&&yn(e[1]);const er={includesString:Nv,includesStringSensitive:Lv,equalsString:Vv,arrIncludes:Bv,arrIncludesAll:jv,arrIncludesSome:Gv,equals:$v,weakEquals:Wv,inNumberRange:Af};function yn(e){return e==null||e===""}const aE={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Ut("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n==null?void 0:n.getValue(e.id);return typeof r=="string"?er.includesString:typeof r=="number"?er.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?er.equals:Array.isArray(r)?er.arrIncludes:er.weakEquals},e.getFilterFn=()=>{var n,r;return bc(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(r=t.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?n:er[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,i;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(r=>r.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,r;return(n=(r=t.getState().columnFilters)==null?void 0:r.findIndex(i=>i.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const i=e.getFilterFn(),s=r==null?void 0:r.find(u=>u.id===e.id),o=kr(n,s?s.value:void 0);if(hp(i,o,e)){var a;return(a=r==null?void 0:r.filter(u=>u.id!==e.id))!=null?a:[]}const l={id:e.id,value:o};if(s){var c;return(c=r==null?void 0:r.map(u=>u.id===e.id?l:u))!=null?c:[]}return r!=null&&r.length?[...r,l]:[l]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=i=>{var s;return(s=kr(t,i))==null?void 0:s.filter(o=>{const a=n.find(l=>l.id===o.id);if(a){const l=a.getFilterFn();if(hp(l,o.value,a))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:(n=(r=e.initialState)==null?void 0:r.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function hp(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const lE=(e,t,n)=>n.reduce((r,i)=>{const s=i.getValue(e);return r+(typeof s=="number"?s:0)},0),cE=(e,t,n)=>{let r;return n.forEach(i=>{const s=i.getValue(e);s!=null&&(r>s||r===void 0&&s>=s)&&(r=s)}),r},uE=(e,t,n)=>{let r;return n.forEach(i=>{const s=i.getValue(e);s!=null&&(r<s||r===void 0&&s>=s)&&(r=s)}),r},dE=(e,t,n)=>{let r,i;return n.forEach(s=>{const o=s.getValue(e);o!=null&&(r===void 0?o>=o&&(r=i=o):(r>o&&(r=o),i<o&&(i=o)))}),[r,i]},fE=(e,t)=>{let n=0,r=0;if(t.forEach(i=>{let s=i.getValue(e);s!=null&&(s=+s)>=s&&(++n,r+=s)}),n)return r/n},hE=(e,t)=>{if(!t.length)return;const n=t.map(s=>s.getValue(e));if(!eE(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),i=n.sort((s,o)=>s-o);return n.length%2!==0?i[r]:(i[r-1]+i[r])/2},gE=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),pE=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,mE=(e,t)=>t.length,su={sum:lE,min:cE,max:uE,extent:dE,mean:fE,median:hE,unique:gE,uniqueCount:pE,count:mE},bE={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:Ut("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(r=>r!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,r;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((r=t.options.enableGrouping)!=null?r:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n==null?void 0:n.getValue(e.id);if(typeof r=="number")return su.sum;if(Object.prototype.toString.call(r)==="[object Date]")return su.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return bc(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(r=t.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?n:su[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:(n=(r=e.initialState)==null?void 0:r.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var i;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((i=n.subRows)!=null&&i.length)}}};function vE(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(s=>!t.includes(s.id));return n==="remove"?r:[...t.map(s=>e.find(o=>o.id===s)).filter(Boolean),...r]}const xE={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Ut("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=oe(n=>[Js(t,n)],n=>n.findIndex(r=>r.id===e.id),ae(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=n=>{var r;return((r=Js(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const i=Js(t,n);return((r=i[i.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=oe(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>i=>{let s=[];if(!(t!=null&&t.length))s=i;else{const o=[...t],a=[...i];for(;a.length&&o.length;){const l=o.shift(),c=a.findIndex(u=>u.id===l);c>-1&&s.push(a.splice(c,1)[0])}s=[...s,...a]}return vE(s,n,r)},ae(e.options,"debugTable","_getOrderColumnsFn"))}},ou=()=>({left:[],right:[]}),yE={getInitialState:e=>({columnPinning:ou(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Ut("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(i=>i.id).filter(Boolean);t.setColumnPinning(i=>{var s,o;if(n==="right"){var a,l;return{left:((a=i==null?void 0:i.left)!=null?a:[]).filter(d=>!(r!=null&&r.includes(d))),right:[...((l=i==null?void 0:i.right)!=null?l:[]).filter(d=>!(r!=null&&r.includes(d))),...r]}}if(n==="left"){var c,u;return{left:[...((c=i==null?void 0:i.left)!=null?c:[]).filter(d=>!(r!=null&&r.includes(d))),...r],right:((u=i==null?void 0:i.right)!=null?u:[]).filter(d=>!(r!=null&&r.includes(d)))}}return{left:((s=i==null?void 0:i.left)!=null?s:[]).filter(d=>!(r!=null&&r.includes(d))),right:((o=i==null?void 0:i.right)!=null?o:[]).filter(d=>!(r!=null&&r.includes(d)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var i,s,o;return((i=r.columnDef.enablePinning)!=null?i:!0)&&((s=(o=t.options.enableColumnPinning)!=null?o:t.options.enablePinning)!=null?s:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(a=>a.id),{left:r,right:i}=t.getState().columnPinning,s=n.some(a=>r==null?void 0:r.includes(a)),o=n.some(a=>i==null?void 0:i.includes(a));return s?"left":o?"right":!1},e.getPinnedIndex=()=>{var n,r;const i=e.getIsPinned();return i?(n=(r=t.getState().columnPinning)==null||(r=r[i])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=oe(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,i)=>{const s=[...r??[],...i??[]];return n.filter(o=>!s.includes(o.column.id))},ae(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=oe(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(s=>n.find(o=>o.column.id===s)).filter(Boolean).map(s=>({...s,position:"left"})),ae(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=oe(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(s=>n.find(o=>o.column.id===s)).filter(Boolean).map(s=>({...s,position:"right"})),ae(t.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?ou():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:ou())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var i,s;return!!((i=r.left)!=null&&i.length||(s=r.right)!=null&&s.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=oe(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),ae(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=oe(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),ae(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=oe(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const i=[...n??[],...r??[]];return t.filter(s=>!i.includes(s.id))},ae(e.options,"debugColumns","getCenterLeafColumns"))}};function CE(e){return e||(typeof document<"u"?document:null)}const ca={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},au=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),wE={getDefaultColumnDef:()=>ca,getInitialState:e=>({columnSizing:{},columnSizingInfo:au(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Ut("columnSizing",e),onColumnSizingInfoChange:Ut("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,i;const s=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:ca.minSize,(r=s??e.columnDef.size)!=null?r:ca.size),(i=e.columnDef.maxSize)!=null?i:ca.maxSize)},e.getStart=oe(n=>[n,Js(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((i,s)=>i+s.getSize(),0),ae(t.options,"debugColumns","getStart")),e.getAfter=oe(n=>[n,Js(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((i,s)=>i+s.getSize(),0),ae(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...i}=n;return i})},e.getCanResize=()=>{var n,r;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((r=t.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const r=i=>{if(i.subHeaders.length)i.subHeaders.forEach(r);else{var s;n+=(s=i.column.getSize())!=null?s:0}};return r(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),i=r==null?void 0:r.getCanResize();return s=>{if(!r||!i||(s.persist==null||s.persist(),lu(s)&&s.touches&&s.touches.length>1))return;const o=e.getSize(),a=e?e.getLeafHeaders().map(b=>[b.column.id,b.column.getSize()]):[[r.id,r.getSize()]],l=lu(s)?Math.round(s.touches[0].clientX):s.clientX,c={},u=(b,x)=>{typeof x=="number"&&(t.setColumnSizingInfo(y=>{var _,w;const E=t.options.columnResizeDirection==="rtl"?-1:1,M=(x-((_=y==null?void 0:y.startOffset)!=null?_:0))*E,S=Math.max(M/((w=y==null?void 0:y.startSize)!=null?w:0),-.999999);return y.columnSizingStart.forEach(I=>{let[A,k]=I;c[A]=Math.round(Math.max(k+k*S,0)*100)/100}),{...y,deltaOffset:M,deltaPercentage:S}}),(t.options.columnResizeMode==="onChange"||b==="end")&&t.setColumnSizing(y=>({...y,...c})))},d=b=>u("move",b),f=b=>{u("end",b),t.setColumnSizingInfo(x=>({...x,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},h=CE(n),g={moveHandler:b=>d(b.clientX),upHandler:b=>{h==null||h.removeEventListener("mousemove",g.moveHandler),h==null||h.removeEventListener("mouseup",g.upHandler),f(b.clientX)}},p={moveHandler:b=>(b.cancelable&&(b.preventDefault(),b.stopPropagation()),d(b.touches[0].clientX),!1),upHandler:b=>{var x;h==null||h.removeEventListener("touchmove",p.moveHandler),h==null||h.removeEventListener("touchend",p.upHandler),b.cancelable&&(b.preventDefault(),b.stopPropagation()),f((x=b.touches[0])==null?void 0:x.clientX)}},m=SE()?{passive:!1}:!1;lu(s)?(h==null||h.addEventListener("touchmove",p.moveHandler,m),h==null||h.addEventListener("touchend",p.upHandler,m)):(h==null||h.addEventListener("mousemove",g.moveHandler,m),h==null||h.addEventListener("mouseup",g.upHandler,m)),t.setColumnSizingInfo(b=>({...b,startOffset:l,startSize:o,deltaOffset:0,deltaPercentage:0,columnSizingStart:a,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?au():(n=e.initialState.columnSizingInfo)!=null?n:au())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0}}};let ua=null;function SE(){if(typeof ua=="boolean")return ua;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return ua=e,ua}function lu(e){return e.type==="touchstart"}const _E={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Ut("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(r=>({...r,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;const i=e.columns;return(n=i.length?i.some(s=>s.getIsVisible()):(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?n:!0},e.getCanHide=()=>{var n,r;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((r=t.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=oe(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),ae(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=oe(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,i)=>[...n,...r,...i],ae(t.options,"debugRows","getVisibleCells"))},createTable:e=>{const t=(n,r)=>oe(()=>[r(),r().filter(i=>i.getIsVisible()).map(i=>i.id).join("_")],i=>i.filter(s=>s.getIsVisible==null?void 0:s.getIsVisible()),ae(e.options,"debugColumns",n));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var r;e.setColumnVisibility(n?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=n=>{var r;n=(r=n)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((i,s)=>({...i,[s.id]:n||!(s.getCanHide!=null&&s.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var r;e.toggleAllColumnsVisible((r=n.target)==null?void 0:r.checked)}}};function Js(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const IE={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},ME={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Ut("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,i,s;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&((s=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?s:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>er.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return bc(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:er[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},EE={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Ut("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if((r=(i=e.options.autoResetAll)!=null?i:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var i,s;e.setExpanded(r?{}:(i=(s=e.initialState)==null?void 0:s.expanded)!=null?i:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{const r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(i=>!i.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(s=>{const o=s.split(".");r=Math.max(r,o.length)}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{var i;const s=r===!0?!0:!!(r!=null&&r[e.id]);let o={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(a=>{o[a]=!0}):o=r,n=(i=n)!=null?i:!s,!s&&n)return{...o,[e.id]:!0};if(s&&!n){const{[e.id]:a,...l}=o;return l}return r})},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:r===!0||r!=null&&r[e.id])},e.getCanExpand=()=>{var n,r,i;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((i=e.subRows)!=null&&i.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},od=0,ad=10,cu=()=>({pageIndex:od,pageSize:ad}),AE={getInitialState:e=>({...e,pagination:{...cu(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:Ut("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if((r=(i=e.options.autoResetAll)!=null?i:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const i=s=>kr(r,s);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(i)},e.resetPagination=r=>{var i;e.setPagination(r?cu():(i=e.initialState.pagination)!=null?i:cu())},e.setPageIndex=r=>{e.setPagination(i=>{let s=kr(r,i.pageIndex);const o=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return s=Math.max(0,Math.min(s,o)),{...i,pageIndex:s}})},e.resetPageIndex=r=>{var i,s;e.setPageIndex(r?od:(i=(s=e.initialState)==null||(s=s.pagination)==null?void 0:s.pageIndex)!=null?i:od)},e.resetPageSize=r=>{var i,s;e.setPageSize(r?ad:(i=(s=e.initialState)==null||(s=s.pagination)==null?void 0:s.pageSize)!=null?i:ad)},e.setPageSize=r=>{e.setPagination(i=>{const s=Math.max(1,kr(r,i.pageSize)),o=i.pageSize*i.pageIndex,a=Math.floor(o/s);return{...i,pageIndex:a,pageSize:s}})},e.setPageCount=r=>e.setPagination(i=>{var s;let o=kr(r,(s=e.options.pageCount)!=null?s:-1);return typeof o=="number"&&(o=Math.max(-1,o)),{...i,pageCount:o}}),e.getPageOptions=oe(()=>[e.getPageCount()],r=>{let i=[];return r&&r>0&&(i=[...new Array(r)].fill(null).map((s,o)=>o)),i},ae(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,i=e.getPageCount();return i===-1?!0:i===0?!1:r<i-1},e.previousPage=()=>e.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return(r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length}}},uu=()=>({top:[],bottom:[]}),kE={getInitialState:e=>({rowPinning:uu(),...e}),getDefaultOptions:e=>({onRowPinningChange:Ut("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,i)=>{const s=r?e.getLeafRows().map(l=>{let{id:c}=l;return c}):[],o=i?e.getParentRows().map(l=>{let{id:c}=l;return c}):[],a=new Set([...o,e.id,...s]);t.setRowPinning(l=>{var c,u;if(n==="bottom"){var d,f;return{top:((d=l==null?void 0:l.top)!=null?d:[]).filter(p=>!(a!=null&&a.has(p))),bottom:[...((f=l==null?void 0:l.bottom)!=null?f:[]).filter(p=>!(a!=null&&a.has(p))),...Array.from(a)]}}if(n==="top"){var h,g;return{top:[...((h=l==null?void 0:l.top)!=null?h:[]).filter(p=>!(a!=null&&a.has(p))),...Array.from(a)],bottom:((g=l==null?void 0:l.bottom)!=null?g:[]).filter(p=>!(a!=null&&a.has(p)))}}return{top:((c=l==null?void 0:l.top)!=null?c:[]).filter(p=>!(a!=null&&a.has(p))),bottom:((u=l==null?void 0:l.bottom)!=null?u:[]).filter(p=>!(a!=null&&a.has(p)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:i}=t.options;return typeof r=="function"?r(e):(n=r??i)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:i}=t.getState().rowPinning,s=n.some(a=>r==null?void 0:r.includes(a)),o=n.some(a=>i==null?void 0:i.includes(a));return s?"top":o?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const i=e.getIsPinned();if(!i)return-1;const s=(n=i==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(o=>{let{id:a}=o;return a});return(r=s==null?void 0:s.indexOf(e.id))!=null?r:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?uu():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:uu())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var i,s;return!!((i=r.top)!=null&&i.length||(s=r.bottom)!=null&&s.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=(t,n,r)=>{var i;return((i=e.options.keepPinnedRows)==null||i?(n??[]).map(o=>{const a=e.getRow(o,!0);return a.getIsAllParentsExpanded()?a:null}):(n??[]).map(o=>t.find(a=>a.id===o))).filter(Boolean).map(o=>({...o,position:r}))},e.getTopRows=oe(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),ae(e.options,"debugRows","getTopRows")),e.getBottomRows=oe(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),ae(e.options,"debugRows","getBottomRows")),e.getCenterRows=oe(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const i=new Set([...n??[],...r??[]]);return t.filter(s=>!i.has(s.id))},ae(e.options,"debugRows","getCenterRows"))}},RE={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Ut("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const r={...n},i=e.getPreGroupedRowModel().flatRows;return t?i.forEach(s=>{s.getCanSelect()&&(r[s.id]=!0)}):i.forEach(s=>{delete r[s.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),i={...n};return e.getRowModel().rows.forEach(s=>{ld(i,s.id,r,!0,e)}),i}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=oe(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?du(e,n):{rows:[],flatRows:[],rowsById:{}},ae(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=oe(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?du(e,n):{rows:[],flatRows:[],rowsById:{}},ae(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=oe(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?du(e,n):{rows:[],flatRows:[],rowsById:{}},ae(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=!!(t.length&&Object.keys(n).length);return r&&t.some(i=>i.getCanSelect()&&!n[i.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(i=>i.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(i=>!n[i.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const i=e.getIsSelected();t.setRowSelection(s=>{var o;if(n=typeof n<"u"?n:!i,e.getCanSelect()&&i===n)return s;const a={...s};return ld(a,e.id,n,(o=r==null?void 0:r.selectChildren)!=null?o:!0,t),a})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return kf(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return cd(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return cd(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return r=>{var i;n&&e.toggleSelected((i=r.target)==null?void 0:i.checked)}}}},ld=(e,t,n,r,i)=>{var s;const o=i.getRow(t,!0);n?(o.getCanMultiSelect()||Object.keys(e).forEach(a=>delete e[a]),o.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(s=o.subRows)!=null&&s.length&&o.getCanSelectSubRows()&&o.subRows.forEach(a=>ld(e,a.id,n,r,i))};function du(e,t){const n=e.getState().rowSelection,r=[],i={},s=function(o,a){return o.map(l=>{var c;const u=kf(l,n);if(u&&(r.push(l),i[l.id]=l),(c=l.subRows)!=null&&c.length&&(l={...l,subRows:s(l.subRows)}),u)return l}).filter(Boolean)};return{rows:s(t.rows),flatRows:r,rowsById:i}}function kf(e,t){var n;return(n=t[e.id])!=null?n:!1}function cd(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let i=!0,s=!1;return e.subRows.forEach(o=>{if(!(s&&!i)&&(o.getCanSelect()&&(kf(o,t)?s=!0:i=!1),o.subRows&&o.subRows.length)){const a=cd(o,t);a==="all"?s=!0:(a==="some"&&(s=!0),i=!1)}}),i?"all":s?"some":!1}const ud=/([0-9]+)/gm,PE=(e,t,n)=>Hv(Gr(e.getValue(n)).toLowerCase(),Gr(t.getValue(n)).toLowerCase()),OE=(e,t,n)=>Hv(Gr(e.getValue(n)),Gr(t.getValue(n))),DE=(e,t,n)=>Rf(Gr(e.getValue(n)).toLowerCase(),Gr(t.getValue(n)).toLowerCase()),FE=(e,t,n)=>Rf(Gr(e.getValue(n)),Gr(t.getValue(n))),TE=(e,t,n)=>{const r=e.getValue(n),i=t.getValue(n);return r>i?1:r<i?-1:0},NE=(e,t,n)=>Rf(e.getValue(n),t.getValue(n));function Rf(e,t){return e===t?0:e>t?1:-1}function Gr(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function Hv(e,t){const n=e.split(ud).filter(Boolean),r=t.split(ud).filter(Boolean);for(;n.length&&r.length;){const i=n.shift(),s=r.shift(),o=parseInt(i,10),a=parseInt(s,10),l=[o,a].sort();if(isNaN(l[0])){if(i>s)return 1;if(s>i)return-1;continue}if(isNaN(l[1]))return isNaN(o)?-1:1;if(o>a)return 1;if(a>o)return-1}return n.length-r.length}const Ms={alphanumeric:PE,alphanumericCaseSensitive:OE,text:DE,textCaseSensitive:FE,datetime:TE,basic:NE},LE={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Ut("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const i of n){const s=i==null?void 0:i.getValue(e.id);if(Object.prototype.toString.call(s)==="[object Date]")return Ms.datetime;if(typeof s=="string"&&(r=!0,s.split(ud).length>1))return Ms.alphanumeric}return r?Ms.text:Ms.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof(n==null?void 0:n.getValue(e.id))=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return bc(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(r=t.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?n:Ms[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const i=e.getNextSortingOrder(),s=typeof n<"u"&&n!==null;t.setSorting(o=>{const a=o==null?void 0:o.find(h=>h.id===e.id),l=o==null?void 0:o.findIndex(h=>h.id===e.id);let c=[],u,d=s?n:i==="desc";if(o!=null&&o.length&&e.getCanMultiSort()&&r?a?u="toggle":u="add":o!=null&&o.length&&l!==o.length-1?u="replace":a?u="toggle":u="replace",u==="toggle"&&(s||i||(u="remove")),u==="add"){var f;c=[...o,{id:e.id,desc:d}],c.splice(0,c.length-((f=t.options.maxMultiSortColCount)!=null?f:Number.MAX_SAFE_INTEGER))}else u==="toggle"?c=o.map(h=>h.id===e.id?{...h,desc:d}:h):u==="remove"?c=o.filter(h=>h.id!==e.id):c=[{id:e.id,desc:d}];return c})},e.getFirstSortDir=()=>{var n,r;return((n=(r=e.columnDef.sortDescFirst)!=null?r:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var r,i;const s=e.getFirstSortDir(),o=e.getIsSorted();return o?o!==s&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(i=t.options.enableMultiRemove)!=null)||i)?!1:o==="desc"?"asc":"desc":s},e.getCanSort=()=>{var n,r;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((r=t.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return(n=(r=e.columnDef.enableMultiSort)!=null?r:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=(n=t.getState().sorting)==null?void 0:n.find(i=>i.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,r;return(n=(r=t.getState().sorting)==null?void 0:r.findIndex(i=>i.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:(n=(r=e.initialState)==null?void 0:r.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},VE=[iE,_E,xE,yE,oE,aE,IE,ME,LE,bE,EE,AE,kE,RE,wE];function BE(e){var t,n;process.env.NODE_ENV!=="production"&&(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");const r=[...VE,...(t=e._features)!=null?t:[]];let i={_features:r};const s=i._features.reduce((f,h)=>Object.assign(f,h.getDefaultOptions==null?void 0:h.getDefaultOptions(i)),{}),o=f=>i.options.mergeOptions?i.options.mergeOptions(s,f):{...s,...f};let l={...{},...(n=e.initialState)!=null?n:{}};i._features.forEach(f=>{var h;l=(h=f.getInitialState==null?void 0:f.getInitialState(l))!=null?h:l});const c=[];let u=!1;const d={_features:r,options:{...s,...e},initialState:l,_queue:f=>{c.push(f),u||(u=!0,Promise.resolve().then(()=>{for(;c.length;)c.shift()();u=!1}).catch(h=>setTimeout(()=>{throw h})))},reset:()=>{i.setState(i.initialState)},setOptions:f=>{const h=kr(f,i.options);i.options=o(h)},getState:()=>i.options.state,setState:f=>{i.options.onStateChange==null||i.options.onStateChange(f)},_getRowId:(f,h,g)=>{var p;return(p=i.options.getRowId==null?void 0:i.options.getRowId(f,h,g))!=null?p:`${g?[g.id,h].join("."):h}`},getCoreRowModel:()=>(i._getCoreRowModel||(i._getCoreRowModel=i.options.getCoreRowModel(i)),i._getCoreRowModel()),getRowModel:()=>i.getPaginationRowModel(),getRow:(f,h)=>{let g=(h?i.getPrePaginationRowModel():i.getRowModel()).rowsById[f];if(!g&&(g=i.getCoreRowModel().rowsById[f],!g))throw process.env.NODE_ENV!=="production"?new Error(`getRow could not find row with ID: ${f}`):new Error;return g},_getDefaultColumnDef:oe(()=>[i.options.defaultColumn],f=>{var h;return f=(h=f)!=null?h:{},{header:g=>{const p=g.header.column.columnDef;return p.accessorKey?p.accessorKey:p.accessorFn?p.id:null},cell:g=>{var p,m;return(p=(m=g.renderValue())==null||m.toString==null?void 0:m.toString())!=null?p:null},...i._features.reduce((g,p)=>Object.assign(g,p.getDefaultColumnDef==null?void 0:p.getDefaultColumnDef()),{}),...f}},ae(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>i.options.columns,getAllColumns:oe(()=>[i._getColumnDefs()],f=>{const h=function(g,p,m){return m===void 0&&(m=0),g.map(b=>{const x=rE(i,b,m,p),y=b;return x.columns=y.columns?h(y.columns,x,m+1):[],x})};return h(f)},ae(e,"debugColumns","getAllColumns")),getAllFlatColumns:oe(()=>[i.getAllColumns()],f=>f.flatMap(h=>h.getFlatColumns()),ae(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:oe(()=>[i.getAllFlatColumns()],f=>f.reduce((h,g)=>(h[g.id]=g,h),{}),ae(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:oe(()=>[i.getAllColumns(),i._getOrderColumnsFn()],(f,h)=>{let g=f.flatMap(p=>p.getLeafColumns());return h(g)},ae(e,"debugColumns","getAllLeafColumns")),getColumn:f=>{const h=i._getAllFlatColumnsById()[f];return process.env.NODE_ENV!=="production"&&!h&&console.error(`[Table] Column with id '${f}' does not exist.`),h}};Object.assign(i,d);for(let f=0;f<i._features.length;f++){const h=i._features[f];h==null||h.createTable==null||h.createTable(i)}return i}function jE(){return e=>oe(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(i,s,o){s===void 0&&(s=0);const a=[];for(let c=0;c<i.length;c++){const u=sE(e,e._getRowId(i[c],c,o),i[c],c,s,void 0,o==null?void 0:o.id);if(n.flatRows.push(u),n.rowsById[u.id]=u,a.push(u),e.options.getSubRows){var l;u.originalSubRows=e.options.getSubRows(i[c],c),(l=u.originalSubRows)!=null&&l.length&&(u.subRows=r(u.originalSubRows,s+1,u))}}return a};return n.rows=r(t),n},ae(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function GE(e){const t=[],n=r=>{var i;t.push(r),(i=r.subRows)!=null&&i.length&&r.getIsExpanded()&&r.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function $E(e){return t=>oe(()=>[t.getState().pagination,t.getPrePaginationRowModel(),t.options.paginateExpandedRows?void 0:t.getState().expanded],(n,r)=>{if(!r.rows.length)return r;const{pageSize:i,pageIndex:s}=n;let{rows:o,flatRows:a,rowsById:l}=r;const c=i*s,u=c+i;o=o.slice(c,u);let d;t.options.paginateExpandedRows?d={rows:o,flatRows:a,rowsById:l}:d=GE({rows:o,flatRows:a,rowsById:l}),d.flatRows=[];const f=h=>{d.flatRows.push(h),h.subRows.length&&h.subRows.forEach(f)};return d.rows.forEach(f),d},ae(t.options,"debugTable","getPaginationRowModel"))}/**
53
+ * react-table
54
+ *
55
+ * Copyright (c) TanStack
56
+ *
57
+ * This source code is licensed under the MIT license found in the
58
+ * LICENSE.md file in the root directory of this source tree.
59
+ *
60
+ * @license MIT
61
+ */function gp(e,t){return e?WE(e)?B.createElement(e,t):e:null}function WE(e){return HE(e)||typeof e=="function"||zE(e)}function HE(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function zE(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function YE(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=B.useState(()=>({current:BE(t)})),[r,i]=B.useState(()=>n.current.initialState);return n.current.setOptions(s=>({...s,...e,state:{...r,...e.state},onStateChange:o=>{i(o),e.onStateChange==null||e.onStateChange(o)}})),n.current}function XE(e){return fe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"},child:[]}]})(e)}function zv(e){return fe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"},child:[]}]})(e)}function ZE(e){return fe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"},child:[]}]})(e)}function Pf(e){return fe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"},child:[]}]})(e)}function UE(e){return fe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m6 18 8.5-6L6 6v12zM16 6v12h2V6h-2z"},child:[]}]})(e)}function JE(e){return fe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M6 6h2v12H6zm3.5 6 8.5 6V6z"},child:[]}]})(e)}function QE(e){return fe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m7 10 5 5 5-5z"},child:[]}]})(e)}function KE(e){return fe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m7 14 5-5 5 5z"},child:[]}]})(e)}function qE(e){return fe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"},child:[]}]})(e)}function eA(e){return fe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"},child:[]}]})(e)}function tA(e){return fe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"},child:[]}]})(e)}function nA(e){return fe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"},child:[]}]})(e)}function rA(e){return fe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"},child:[]}]})(e)}function iA(e){return fe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"line",attr:{x1:"12",y1:"8",x2:"12",y2:"12"},child:[]},{tag:"line",attr:{x1:"12",y1:"16",x2:"12.01",y2:"16"},child:[]}]})(e)}function sA(e){return fe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"18",y1:"20",x2:"18",y2:"10"},child:[]},{tag:"line",attr:{x1:"12",y1:"20",x2:"12",y2:"4"},child:[]},{tag:"line",attr:{x1:"6",y1:"20",x2:"6",y2:"14"},child:[]}]})(e)}function oA(e){return fe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"},child:[]},{tag:"polyline",attr:{points:"22 4 12 14.01 9 11.01"},child:[]}]})(e)}function aA(e){return fe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"6 9 12 15 18 9"},child:[]}]})(e)}function lA(e){return fe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"18 15 12 9 6 15"},child:[]}]})(e)}function cA(e){return fe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"ellipse",attr:{cx:"12",cy:"5",rx:"9",ry:"3"},child:[]},{tag:"path",attr:{d:"M21 12c0 1.66-4 3-9 3s-9-1.34-9-3"},child:[]},{tag:"path",attr:{d:"M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5"},child:[]}]})(e)}function Il(e){return fe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"},child:[]},{tag:"polyline",attr:{points:"7 10 12 15 17 10"},child:[]},{tag:"line",attr:{x1:"12",y1:"15",x2:"12",y2:"3"},child:[]}]})(e)}function uA(e){return fe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"},child:[]},{tag:"polyline",attr:{points:"14 2 14 8 20 8"},child:[]},{tag:"line",attr:{x1:"12",y1:"18",x2:"12",y2:"12"},child:[]},{tag:"line",attr:{x1:"9",y1:"15",x2:"15",y2:"15"},child:[]}]})(e)}function dA(e){return fe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"23 4 23 10 17 10"},child:[]},{tag:"polyline",attr:{points:"1 20 1 14 7 14"},child:[]},{tag:"path",attr:{d:"M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"},child:[]}]})(e)}function pp(e){return fe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"},child:[]}]})(e)}function fA(e){return fe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"18",y1:"6",x2:"6",y2:"18"},child:[]},{tag:"line",attr:{x1:"6",y1:"6",x2:"18",y2:"18"},child:[]}]})(e)}const Yv=C.createContext(void 0),Xv=({children:e,onToastShow:t})=>{const[n,r]=C.useState(!1),[i,s]=C.useState(zt.INFO),[o,a]=C.useState(""),l=C.useCallback((c,u,d)=>{if(t)try{t(c,u,d)}catch(f){console.warn("Toast external integration failed:",f)}s(c),a(u),r(!0)},[t]);return v.jsx(Yv.Provider,{value:{toast:n,toastMessage:o,toastType:i,setToast:r,setToastMessage:a,setToastType:s,showToast:l},children:e})},Zv=()=>{const e=C.useContext(Yv);if(!e)throw new Error("useToast must be used within a ToastProvider");return e};let Ml=null,El=null,mp=!1;function Of(){if(!mp){mp=!0;try{const e=require("react-redux");Ml=e.useDispatch,El=e.useSelector}catch{}}}const Uv=()=>(Of(),Ml?Ml():(console.warn("[useAppDispatch] Redux is not installed. Install @reduxjs/toolkit and react-redux to use this hook."),null)),Jv=(e,t)=>(Of(),El?El(e,t):(console.warn("[useAppSelector] Redux is not installed. Install @reduxjs/toolkit and react-redux to use this hook."),null)),Qv=()=>(Of(),Ml!==null&&El!==null),Kv=C.createContext(void 0),qv=({children:e})=>{const[t,n]=C.useState(!1),r=()=>n(!0),i=()=>n(!1);return v.jsx(Kv.Provider,{value:{isLoading:t,showLoader:r,hideLoader:i},children:e})},e1=()=>{const e=C.useContext(Kv);if(!e)throw new Error("useLoader must be used within a LoaderProvider");return e},t1=(e,t={})=>{const[n,r]=C.useState(t),[i,s]=C.useState(null),[o,a]=C.useState(!1),[l,c]=C.useState(null);return{filters:n,filteredData:i,loading:o,error:l,updateFilters:f=>{r(h=>({...h,...f}))},clearFilters:()=>{r(t),s(null)},setFilteredData:s,setLoading:a,setError:c}},Za=10,Ua=0,dd=8,fd=`w-4 h-4 appearance-none border
62
+ border-gray-500 rounded-sm checked:bg-brand-primary
63
+ checked:border-[#0b86cf] checked:relative
64
+ checked:after:content-['✔'] checked:after:absolute
65
+ checked:after:text-white checked:after:font-bold
66
+ checked:after:left-1/2 checked:after:top-1/2
67
+ checked:after:-translate-x-1/2 checked:after:-translate-y-1/2
68
+ checked:after:text-xs`,hA=({type:e,options:t,columns:n,data:r,fetchTableData:i,searchEnabled:s=!1,filtersEnabled:o,filterFields:a,setTableData:l,refreshTable:c,paginationEnabled:u=!0,exportEnabled:d=!0,bulkActions:f={},handleBulkAction:h,onRowClick:g,columnBorders:p,showConnectorsSummary:m=!1,connectorScanObject:b,connectorDetail:x,scanDetails:y,isDeletedItemsList:_=!1,onViewDeletedItemsClick:w,showViewDeleteButton:E=!1,refreshData:M,setRefreshData:S,tableWrapperClass:I,searchColumns:A=[],onExport:k,FilterModal:D,ConnectorSummaryAccordion:N})=>{var Gh,$h,Wh,Hh,zh;const V=Uv(),P=Qv(),T=Jv(F=>!P||!(F!=null&&F.tableData)?null:F.tableData[e]||null),[L,R]=C.useState(""),[O,$]=C.useState(()=>(T==null?void 0:T.sorting)??[]),[Y,W]=C.useState(new Set),[G,se]=C.useState(),[ce,me]=C.useState(!0),[Ye,ne]=C.useState(!1),[he,Te]=C.useState(0),{filters:Q}=t1(),[H,$e]=C.useState({}),[J,xe]=C.useState(()=>T!=null&&T.pagination?{...T.pagination}:{pageIndex:Ua,pageSize:Za}),{showToast:be}=Zv(),{showLoader:Ct,hideLoader:ue}=e1(),[We,In]=C.useState(),Zn=C.useRef(null),Dt=C.useRef(""),Mr=C.useRef(""),at=C.useRef(!1),Ve=YE({data:r,columns:n,state:{columnVisibility:{actions:ce},globalFilter:L,sorting:O,pagination:J},onColumnVisibilityChange:()=>me(!ce),onGlobalFilterChange:R,onSortingChange:$,getCoreRowModel:jE(),manualPagination:!0,manualSorting:!0,manualFiltering:!0,pageCount:Math.ceil(he/J.pageSize),onPaginationChange:xe,...u&&{getPaginationRowModel:$E()}}),tt=((Gh=Ve.getState().pagination)==null?void 0:Gh.pageIndex)+1||1,[dt,Kt]=C.useState(!1),[Ur,Qo]=C.useState(!1),[hn,Ft]=C.useState(tt),qt=C.useMemo(()=>Math.max(Math.ceil(he/J.pageSize),1),[he,J.pageSize,J.pageIndex,dt,_]);C.useEffect(()=>{M&&(Ko(),S&&S(!1))},[M]),C.useEffect(()=>{if(e&&P&&V)try{const{setPagination:F}=require("../../redux/slices/tableDataSlice");V(F({tableType:e,pagination:J}))}catch{}},[J.pageIndex,J.pageSize,e]),C.useEffect(()=>{Ft(tt)},[tt]),C.useEffect(()=>{if(P&&V)try{const{setGlobalSorting:F}=require("../../redux/slices/tableDataSlice");V(F({tableType:e,sorting:O}))}catch{}},[($h=O[0])==null?void 0:$h.desc,(Wh=O[0])==null?void 0:Wh.id]);const Jr=C.useMemo(()=>{var Ne,et,wt;const F={pageNumber:Ve.getState().pagination.pageIndex,pageSize:Ve.getState().pagination.pageSize},re={sortBy:O.length&&(Ne=O[0])!=null&&Ne.id?(et=O[0])==null?void 0:et.id:void 0,order:O.length&&(wt=O[0])!=null&&wt.desc?"desc":"asc"},Z={searchTerm:L,searchColumns:A.length>0?A:void 0};return{options:t,filters:Object.keys(Q).length>0?Q:H,...Z,...F,...re,fetchDeleted:_}},[L,Q,O,Ve.getState().pagination.pageIndex,Ve.getState().pagination.pageSize,(Hh=O[0])==null?void 0:Hh.id,(zh=O[0])==null?void 0:zh.desc,_,dt,t==null?void 0:t.arg,A]),u2=F=>{if(F){const re=r.filter(Z=>!Z.isDisabled).map(Z=>Z.id);W(new Set(re))}else W(new Set)};C.useEffect(()=>()=>{var F;We&&((F=window.api)!=null&&F.deleteExportedFile)&&window.api.deleteExportedFile((We??"").replace("download:\\",""))},[We]),C.useEffect(()=>{const F=async()=>{if(i){at.current=!0;try{Ct();let Ne=0;if(e===tf.SCANRESULT&&(t!=null&&t.usePermanentCache)){const wt=`scandetails_count_${JSON.stringify({...Jr,pageNumber:void 0,pageSize:void 0})}`,Er=localStorage.getItem(wt)||sessionStorage.getItem(wt);if(Er)try{const Un=JSON.parse(Er);Un&&typeof Un.totalRecords=="number"&&(Ne=Un.totalRecords)}catch{}Ne||(Ne=(await i({...Jr,usePermanentCache:(t==null?void 0:t.usePermanentCache)||!1})).totalRecords??0)}else Ne=(await i({...Jr,...t!=null&&t.usePermanentCache?{usePermanentCache:t.usePermanentCache}:{}})).totalRecords??0;const et=Math.max(Math.ceil(Ne/J.pageSize)-1,0);r.length===0&&J.pageIndex>0?xe(wt=>({...wt,pageIndex:Math.min(J.pageIndex,et)})):J.pageIndex>et&&xe(wt=>({...wt,pageIndex:et})),Ve.setPageCount(Math.ceil(Ne/J.pageSize))}catch(Ne){console.error("Failed to update total count",Ne)}finally{at.current=!1;const Ne=JSON.stringify({pagination:J,searchApplied:Ur,sorting:O,isDeletedItemsList:_});Ne!==Dt.current&&(Dt.current=Ne,Ko()),ue()}}},re=JSON.stringify({options:t,filters:Q,searchTerm:L,searchColumns:A,sorting:O,isDeletedItemsList:_,pageSize:J.pageSize});re!==Mr.current&&(F(),Mr.current=re)},[t,Q,L,e,O,_,J.pageSize,A]);const d2=F=>{var re;F.key==="Enter"&&((re=Zn.current)==null||re.click())},f2=(F,re)=>{W(Z=>{const Ne=new Set(Z);return re?Ne.add(F):Ne.delete(F),Ne})},h2=async()=>{var re;if(!e)return;let F="";try{if(Ct(),k)F=await k(e,H,t,_);else if((re=window.api)!=null&&re.exportTable)F=t?await window.api.exportTable(e,H,t,_):await window.api.exportTable(e,H,{},_);else{be(zt.ERROR,"Export functionality is not available. Please provide an onExport handler.");return}In(F);const Z=document.createElement("a");Z.href=F,Z.download=`export-${e}.csv`,document.body.appendChild(Z),Z.click(),document.body.removeChild(Z),be(zt.SUCCESS,"Export initiated successfully")}catch(Z){console.error("Export error",Z),be(zt.ERROR,"Export failed")}finally{ue(),F&&F.startsWith("blob:")&&URL.revokeObjectURL(F)}},Th=()=>{let F=0;return r.forEach(re=>{re.isDisabled||F++}),F},g2=async()=>{if(!(!i||!l)){Ct(),xe(F=>({...F,pageIndex:0}));try{Qo(L!==""),await Ko()}catch(F){console.error("Search error:",F),be(zt.ERROR,"Search operation failed.")}finally{ue()}}},Ko=async()=>{if(!(!i||!l)){Ct();try{const F=await i({...Jr,...t!=null&&t.usePermanentCache?{usePermanentCache:t.usePermanentCache}:{}}),re=F.totalRecords;if(Te(re),l(F.data),P&&V)try{const{setTotalCount:Z,setTableData:Ne}=require("../../redux/slices/tableDataSlice");V(Z({tableType:e,totalCount:re})),V(Ne({tableType:e,data:F.data}))}catch{}}catch(F){console.error("Failed to fetch data",F),be(zt.ERROR,"Failed to fetch data!")}finally{ue()}}};C.useEffect(()=>{const F=JSON.stringify({pagination:J,searchApplied:Ur,sorting:O,isDeletedItemsList:_});F!==Dt.current&&!at.current&&(Dt.current=F,Ko())},[J.pageIndex,J.pageSize,Ur,O,_]);const Nh=Object.entries(f).map(([F,re])=>({value:F,label:re})),p2=()=>W(new Set),m2=()=>se(""),Ss=C.useMemo(()=>!!h,[h]),Lh=Y.size>0,Vh=F=>{let re=0,Z=!1;return Ss&&(re+=57),Ve.getHeaderGroups().forEach(Ne=>{Ne.headers.forEach(et=>{if(!Z&&et.column.columnDef.fixedColumn){if(et.id===F){Z=!0;return}et.getSize()?re+=et.getSize()+16:re+=150}})}),`${re}px`},Bh=D,jh=N;return v.jsxs("div",{className:"py-0 px-0 flex flex-col gap-2 mt-2",children:[v.jsxs("div",{className:"main-action-wrapper flex gap-2 relative justify-end",children:[d&&!!e&&v.jsxs("button",{onClick:h2,className:"flex items-center shadow-sm gap-2 px-4 py-2 text-sm border border-transparent bg-brand-primary rounded-md transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-[var(--brand-orange)] focus:ring-offset-2",children:[v.jsx(Il,{className:"h-4 w-4"}),v.jsx("span",{children:"Export"})]}),o&&v.jsxs("button",{onClick:()=>ne(!0),className:"filters flex items-center shadow-sm gap-2 px-4 py-2 text-sm border border-1 border-[var(--border-color)] rounded-md hover:bg-brand-surface-subtle dark:text-gray-300 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-[var(--brand-orange)]",children:[dt&&v.jsx("span",{className:"h-2 w-2 bg-brand-primary rounded-full"}),v.jsx(F2,{className:"h-3 w-3 text-brand-primary"}),v.jsx("span",{children:"Filters"})]}),Ss&&Lh&&v.jsx("div",{className:"rounded-md text-gray-500 dark:text-gray-400 text-sm appearance-none absolute top-0 left-0 z-30",children:v.jsx(Fv,{placeholder:"Bulk Actions",className:"w-[10rem] bulk-actions-select",value:Nh.find(F=>F.value===G)||null,options:Nh,onChange:F=>{F&&(se(F.value),h&&(h(F.value,Y,p2,m2),se("")))},isClearable:!0,styles:{control:(F,re)=>({...F,borderColor:re.isFocused?"var(--brand-orange)":"var(--border-color)",borderRadius:"0.25rem",cursor:"pointer",backgroundColor:"var(--bg-color)",color:"var(--text-color)",boxShadow:re.isFocused?"0 0 0 1px var(--brand-orange)":"none",":hover":{borderColor:"var(--brand-orange)"}}),input:F=>({...F,color:"var(--text-color)"}),singleValue:F=>({...F,color:"var(--text-color)"}),placeholder:F=>({...F,color:"var(--secondary-text-color)"}),option:(F,re)=>({...F,backgroundColor:re.isSelected?"var(--brand-orange)":re.isFocused?"var(--hover-bg-color)":"var(--bg-color)",color:re.isSelected?"white":"var(--text-color)",cursor:"pointer",":active":{backgroundColor:"var(--brand-orange)"}}),menu:F=>({...F,backgroundColor:"var(--bg-color)",color:"var(--text-color)",border:"1px solid var(--border-color)",zIndex:9999}),dropdownIndicator:F=>({...F,cursor:"pointer",color:"var(--secondary-text-color)",":hover":{color:"var(--brand-orange)"}}),clearIndicator:F=>({...F,cursor:"pointer",color:"var(--secondary-text-color)",":hover":{color:"var(--brand-orange)"}}),indicatorSeparator:F=>({...F,backgroundColor:"var(--border-color)"})}})}),s&&v.jsxs("div",{className:"flex max-w-xs w-full border rounded-md overflow-hidden shadow-sm main-search-input",style:{borderColor:"var(--border-color)"},children:[v.jsx("input",{type:"text","data-testid":"table-search-input",placeholder:"Search...",value:L,onKeyDown:d2,onChange:F=>R(F.target.value),className:"flex-grow px-4 py-2 text-sm placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none",style:{backgroundColor:"var(--bg-color)",color:"var(--text-color)"}}),v.jsx("button",{ref:Zn,"data-testid":"table-search-button",className:"px-4 py-0 transition-colors",style:{backgroundColor:"var(--brand-light)",color:"var(--brand-dark)"},onMouseEnter:F=>F.currentTarget.style.backgroundColor="var(--hover-bg-color)",onMouseLeave:F=>F.currentTarget.style.backgroundColor="var(--brand-light)",onClick:g2,children:v.jsx(ZE,{size:22})})]})]}),m&&jh&&v.jsx(jh,{connectorDetail:x,scanDetails:y,scanObjects:b??[]}),v.jsx("div",{className:"main-table-wrapper flex-grow overflow-hidden rounded-md table-container",children:v.jsx("div",{className:`overflow-auto${I?` ${I}`:""}`,style:I?{}:{maxHeight:"calc(100vh - 21rem)"},children:v.jsxs("table",{className:"table-auto w-full text-left border-collapse border dark:border-gray-700 main-table",children:[v.jsx("thead",{className:"sticky -top-1 z-20 bg-brand-surface-subtle dark:bg-gray-800",children:Ve.getHeaderGroups().map((F,re)=>v.jsxs("tr",{children:[Ss&&v.jsx("th",{className:"sticky -left-1 z-20 table-header checkbox font-bold cursor-pointer",style:{width:"40px"},children:v.jsx("input",{type:"checkbox",className:`${fd} dark:border-gray-600`,checked:Ve.getRowModel().rows.length>0&&Y.size===Th()&&Th()>0,onChange:Z=>{Z.stopPropagation(),u2(Z.target.checked)}})}),F.headers.map((Z,Ne)=>{var Er,Un;let et="";const wt=["actions"].includes((Er=Z==null?void 0:Z.column)==null?void 0:Er.id);return Z.column.columnDef.fixedColumn&&(et+=" sticky z-10"),Z.column.columnDef.centerAlign&&(et+=" text-center"),wt&&(et+=" right-fixed"),["#","id"].includes((Un=Z==null?void 0:Z.column)==null?void 0:Un.id)&&(et+=" id-column"),v.jsxs("th",{className:`table-header ${p?"border dark:border-gray-600":""} font-bold whitespace-nowrap text-ellipsis cursor-pointer dark:text-gray-200 ${et}`,style:{minWidth:Z.column.columnDef.minSize||"auto",maxWidth:Z.column.columnDef.maxSize||"auto",left:Z.column.columnDef.fixedColumn?Vh(Z.id):void 0,right:wt?0:void 0},onClick:()=>{Z.column.getCanSort()&&Z.column.toggleSorting()},children:[Z.isPlaceholder?null:gp(Z.column.columnDef.header,Z.getContext()),v.jsxs("span",{className:"ml-0",children:[Z.column.getIsSorted()==="asc"&&v.jsx(KE,{size:24,className:"inline-block pb-1"}),Z.column.getIsSorted()==="desc"&&v.jsx(QE,{size:24,className:"inline-block pb-1"})]})]},`${Z.id}_${Ne}`)})]},`${F.id}_${re}`))}),v.jsx("tbody",{children:Ve.getRowModel().rows.length===0?v.jsx("tr",{children:v.jsx("td",{colSpan:n.length+(Ss?1:0),className:"text-center text-sm py-4 text-gray-600 dark:text-gray-400",children:"No data available"})}):Ve.getRowModel().rows.map((F,re)=>v.jsxs("tr",{className:`table-data${g?" cursor-pointer":""}`,onClick:Z=>{g&&!Z.target.closest('input[type="checkbox"]')&&g(F.original)},children:[Ss&&v.jsx("td",{className:"table-padding checkbox sticky -left-1 z-10",style:{width:"40px"},onClick:Z=>{Z.stopPropagation();const Ne=Z.currentTarget.querySelector('input[type="checkbox"]');Ne&&Ne.click()},children:v.jsx("input",{type:"checkbox",disabled:F.original.isDisabled,className:`${fd} dark:border-gray-600`,checked:Y.has(F.original.id)&&!F.original.isDisabled,onChange:Z=>{F.original.isDisabled||f2(F.original.id,Z.target.checked)},onClick:Z=>Z.stopPropagation()})}),F.getVisibleCells().map((Z,Ne)=>{var Er;let et="";const wt=["actions","startTime","endTime","created_at","updated_at","created","updated"].includes((Er=Z==null?void 0:Z.column)==null?void 0:Er.id);return Z.column.columnDef.preLine&&(et+=" pre-line"),Z.column.columnDef.fixedColumn&&(et+=" sticky z-10"),Z.column.columnDef.centerAlign&&(et+=" text-center"),wt&&(et+=" right-fixed"),v.jsx("td",{className:`table-padding ${et} ${p?"border":""} whitespace-nowrap text-ellipsis`,style:{minWidth:Z.column.columnDef.minSize||"auto",maxWidth:Z.column.columnDef.maxSize||"auto",left:Z.column.columnDef.fixedColumn?Vh(Z.column.id):void 0,right:wt?0:void 0,backgroundColor:Z.column.columnDef.fixedColumn?"var(--bg-color)":void 0,borderColor:p?"var(--border-color)":void 0,color:"var(--text-color)"},onClick:Un=>{Z.column.columnDef.disableClick&&Un.stopPropagation()},children:gp(Z.column.columnDef.cell,Z.getContext())},`${Z.id}_${Ne}`)})]},`${F.id}_${re}`))})]})})}),u&&v.jsxs("div",{className:"sticky bottom-0 z-10 bg-brand-surface py-2 flex justify-between items-center pagination-container dark:text-gray-300 main-table-footer",children:[v.jsxs("div",{className:"flex items-center space-x-1",children:[v.jsx("button",{onClick:()=>Ve.setPageIndex(0),disabled:J.pageIndex===0,className:"disabled:opacity-50 transition-colors",style:{color:"var(--secondary-text-color)"},onMouseEnter:F=>!F.currentTarget.disabled&&(F.currentTarget.style.color="var(--brand-orange)"),onMouseLeave:F=>F.currentTarget.style.color="var(--secondary-text-color)",children:v.jsx(JE,{size:20})}),v.jsx("button",{onClick:()=>Ve.previousPage(),disabled:J.pageIndex===0,className:"disabled:opacity-50 transition-colors",style:{color:"var(--secondary-text-color)"},onMouseEnter:F=>!F.currentTarget.disabled&&(F.currentTarget.style.color="var(--brand-orange)"),onMouseLeave:F=>F.currentTarget.style.color="var(--secondary-text-color)",children:v.jsx(qE,{size:20})}),v.jsxs("span",{className:"pagination-content",style:{color:"var(--text-color)"},children:["Page",v.jsx("input",{type:"number",value:hn,onChange:F=>{const re=F.target.value.replace(/^0+/,"");Ft(re===""?"":Number(re))},onBlur:()=>{const F=Math.min(Math.max(Number(hn),1),qt);Ft(F),Ve.setPageIndex(F-1)},onKeyDown:F=>{if(F.key==="Enter"){const re=Math.min(Math.max(Number(hn),1),qt);Ft(re),Ve.setPageIndex(re-1)}},className:"px-2 py-1 rounded text-center mx-2",style:{width:`${String(hn||dd).length+dd}ch`,backgroundColor:"var(--bg-color)",border:"1px solid var(--border-color)",color:"var(--text-color)"}}),"of ",v.jsx("span",{className:"mx-1",children:qt})]}),v.jsx("button",{onClick:()=>Ve.nextPage(),disabled:J.pageIndex+1===qt,className:"disabled:opacity-50 transition-colors",style:{color:"var(--secondary-text-color)"},onMouseEnter:F=>!F.currentTarget.disabled&&(F.currentTarget.style.color="var(--brand-orange)"),onMouseLeave:F=>F.currentTarget.style.color="var(--secondary-text-color)",children:v.jsx(eA,{size:20})}),v.jsx("button",{onClick:()=>Ve.setPageIndex(qt),disabled:J.pageIndex+1===qt,className:"disabled:opacity-50 transition-colors",style:{color:"var(--secondary-text-color)"},onMouseEnter:F=>!F.currentTarget.disabled&&(F.currentTarget.style.color="var(--brand-orange)"),onMouseLeave:F=>F.currentTarget.style.color="var(--secondary-text-color)",children:v.jsx(UE,{size:20})})]}),E&&v.jsx("button",{"data-testid":_?"view-active-items-button":"view-deleted-items-button",onClick:()=>{if(W(new Set),J.pageIndex=Ua,J.pageSize=Za,P&&V)try{const{setPagination:F}=require("../../redux/slices/tableDataSlice");V(F({tableType:e,pagination:{pageIndex:Ua,pageSize:Za}}));try{const{setFilters:re}=require("../../redux/slices/filterSlice");V(re({tableType:e,filters:{}}))}catch{}}catch{}Kt(!1),w==null||w()},className:`toggle-delete text-xs px-2 py-1 min-w-24 rounded flex items-center gap-1 font-semibold justify-center ${_?"bg-gray-600 text-white hover:bg-gray-700 dark:bg-gray-500 dark:text-gray-200 dark:hover:bg-gray-400":"bg-white text-gray-600 hover:bg-gray-100 dark:bg-gray-700 dark:text-gray-300 dark:hover:bg-gray-600"} border border-gray-300 text-gray-700 dark:border-gray-500 focus:outline-none`,children:_?"View Active Items":"View Deleted Items"}),v.jsxs("div",{className:"flex items-center space-x-2 pagination-content",style:{color:"var(--text-color)"},children:[v.jsx("span",{children:"Rows per page"}),v.jsx("div",{style:{width:"90px"},children:v.jsx(Tv,{placeholder:"",options:[10,25,50,100].map(F=>({label:F.toString(),value:F.toString()})),selectedOptions:[{label:J.pageSize.toString(),value:J.pageSize.toString()}],handleChange:F=>{F&&xe(re=>({...re,pageSize:+F.value}))},isMulti:!1,closeMenuOnSelect:!0,isClearable:!1,menuPosition:"fixed",customStyles:{control:(F,re)=>({...F,minHeight:"34px",height:"34px",backgroundColor:"var(--bg-color)",borderColor:re.isFocused?"var(--brand-orange)":"var(--border-color)",boxShadow:re.isFocused?"0 0 0 1px var(--brand-orange)":F.boxShadow})}})})]})]}),o&&a&&l&&c&&Bh&&v.jsx(Bh,{type:e,fields:a,inlineRowFields:a==null?void 0:a.filter(F=>F.inline===!0),visible:Ye,onClose:()=>ne(!1),title:"Filters",okText:"Apply Filters",cancelText:"Clear",data:r,setFilteredData:l,filtersApplied:dt,toggleFilterApply:Kt,fetchTableData:i,pageNumber:J.pageIndex,pageSize:J.pageSize,setTotalRowCount:Te,setPagination:xe,options:t,sorting:O,setSorting:$,showDeletedItems:_,setExportFilters:$e,searchTerm:L})]})},gA=({isOpen:e,onClose:t,onConfirm:n,title:r,message:i,confirmText:s="Confirm",cancelText:o="Cancel",type:a="warning",isLoading:l=!1})=>{if(!e)return null;const c=()=>{switch(a){case"danger":return"text-red-500";case"warning":return"text-yellow-500";case"info":return"text-brand-primary";default:return"text-yellow-500"}},u=()=>{switch(a){case"danger":return"bg-red-600 hover:bg-red-700 focus:ring-red-500";case"warning":return"bg-yellow-600 hover:bg-yellow-700 focus:ring-yellow-500";case"info":return"bg-brand-primary hover:bg-[var(--brand-orange)]/90 focus:ring-[var(--brand-orange)]";default:return"bg-yellow-600 hover:bg-yellow-700 focus:ring-yellow-500"}};return v.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[v.jsx("div",{className:"absolute inset-0 bg-gray-500 bg-opacity-75 transition-opacity",onClick:t}),v.jsxs("div",{className:"relative rounded-lg text-left overflow-hidden shadow-xl transform transition-all max-w-lg w-full mx-4",style:{backgroundColor:"var(--bg-color)",border:"1px solid var(--border-color)"},children:[v.jsx("div",{className:"px-4 pt-5 pb-4 sm:p-6 sm:pb-4",style:{backgroundColor:"var(--bg-color)"},children:v.jsxs("div",{className:"sm:flex sm:items-start",children:[v.jsx("div",{className:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full sm:mx-0 sm:h-10 sm:w-10",style:{backgroundColor:"var(--hover-bg-color)"},children:v.jsx(Vm,{className:`h-6 w-6 ${c()}`})}),v.jsxs("div",{className:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left",children:[v.jsx("h3",{className:"text-lg leading-6 font-medium",style:{color:"var(--text-color)"},children:r}),v.jsx("div",{className:"mt-2",children:v.jsx("p",{className:"text-sm whitespace-pre-line",style:{color:"var(--secondary-text-color)"},children:i})})]})]})}),v.jsxs("div",{className:"px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse",style:{backgroundColor:"var(--hover-bg-color)"},children:[v.jsx("button",{type:"button",className:`w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 text-base font-medium text-white ${u()} focus:outline-none focus:ring-2 focus:ring-offset-2 sm:ml-3 sm:w-auto sm:text-sm disabled:opacity-50 disabled:cursor-not-allowed`,onClick:n,disabled:l,children:l?"Processing...":s}),v.jsx("button",{type:"button",className:"mt-3 w-full inline-flex justify-center rounded-md shadow-sm px-4 py-2 text-base font-medium focus:outline-none focus:ring-2 focus:ring-offset-2 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm",style:{backgroundColor:"var(--bg-color)",color:"var(--text-color)",border:"1px solid var(--border-color)"},onMouseEnter:d=>d.currentTarget.style.backgroundColor="var(--hover-bg-color)",onMouseLeave:d=>d.currentTarget.style.backgroundColor="var(--bg-color)",onClick:t,disabled:l,children:o})]})]})]})};//! moment.js
69
+ //! version : 2.30.1
70
+ //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
71
+ //! license : MIT
72
+ //! momentjs.com
73
+ var n1;function X(){return n1.apply(null,arguments)}function pA(e){n1=e}function wn(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function hi(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function Ee(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Df(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(Ee(e,t))return!1;return!0}function Bt(e){return e===void 0}function br(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function Wo(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function r1(e,t){var n=[],r,i=e.length;for(r=0;r<i;++r)n.push(t(e[r],r));return n}function Rr(e,t){for(var n in t)Ee(t,n)&&(e[n]=t[n]);return Ee(t,"toString")&&(e.toString=t.toString),Ee(t,"valueOf")&&(e.valueOf=t.valueOf),e}function zn(e,t,n,r){return M1(e,t,n,r,!0).utc()}function mA(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function ve(e){return e._pf==null&&(e._pf=mA()),e._pf}var hd;Array.prototype.some?hd=Array.prototype.some:hd=function(e){var t=Object(this),n=t.length>>>0,r;for(r=0;r<n;r++)if(r in t&&e.call(this,t[r],r,t))return!0;return!1};function Ff(e){var t=null,n=!1,r=e._d&&!isNaN(e._d.getTime());if(r&&(t=ve(e),n=hd.call(t.parsedDateParts,function(i){return i!=null}),r=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n),e._strict&&(r=r&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=r;else return r;return e._isValid}function vc(e){var t=zn(NaN);return e!=null?Rr(ve(t),e):ve(t).userInvalidated=!0,t}var bp=X.momentProperties=[],fu=!1;function Tf(e,t){var n,r,i,s=bp.length;if(Bt(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),Bt(t._i)||(e._i=t._i),Bt(t._f)||(e._f=t._f),Bt(t._l)||(e._l=t._l),Bt(t._strict)||(e._strict=t._strict),Bt(t._tzm)||(e._tzm=t._tzm),Bt(t._isUTC)||(e._isUTC=t._isUTC),Bt(t._offset)||(e._offset=t._offset),Bt(t._pf)||(e._pf=ve(t)),Bt(t._locale)||(e._locale=t._locale),s>0)for(n=0;n<s;n++)r=bp[n],i=t[r],Bt(i)||(e[r]=i);return e}function Ho(e){Tf(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),fu===!1&&(fu=!0,X.updateOffset(this),fu=!1)}function Sn(e){return e instanceof Ho||e!=null&&e._isAMomentObject!=null}function i1(e){X.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function dn(e,t){var n=!0;return Rr(function(){if(X.deprecationHandler!=null&&X.deprecationHandler(null,e),n){var r=[],i,s,o,a=arguments.length;for(s=0;s<a;s++){if(i="",typeof arguments[s]=="object"){i+=`
74
+ [`+s+"] ";for(o in arguments[0])Ee(arguments[0],o)&&(i+=o+": "+arguments[0][o]+", ");i=i.slice(0,-2)}else i=arguments[s];r.push(i)}i1(e+`
75
+ Arguments: `+Array.prototype.slice.call(r).join("")+`
76
+ `+new Error().stack),n=!1}return t.apply(this,arguments)},t)}var vp={};function s1(e,t){X.deprecationHandler!=null&&X.deprecationHandler(e,t),vp[e]||(i1(t),vp[e]=!0)}X.suppressDeprecationWarnings=!1;X.deprecationHandler=null;function Yn(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function bA(e){var t,n;for(n in e)Ee(e,n)&&(t=e[n],Yn(t)?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function gd(e,t){var n=Rr({},e),r;for(r in t)Ee(t,r)&&(hi(e[r])&&hi(t[r])?(n[r]={},Rr(n[r],e[r]),Rr(n[r],t[r])):t[r]!=null?n[r]=t[r]:delete n[r]);for(r in e)Ee(e,r)&&!Ee(t,r)&&hi(e[r])&&(n[r]=Rr({},n[r]));return n}function Nf(e){e!=null&&this.set(e)}var pd;Object.keys?pd=Object.keys:pd=function(e){var t,n=[];for(t in e)Ee(e,t)&&n.push(t);return n};var vA={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function xA(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return Yn(r)?r.call(t,n):r}function jn(e,t,n){var r=""+Math.abs(e),i=t-r.length,s=e>=0;return(s?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var Lf=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,da=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,hu={},Ui={};function q(e,t,n,r){var i=r;typeof r=="string"&&(i=function(){return this[r]()}),e&&(Ui[e]=i),t&&(Ui[t[0]]=function(){return jn(i.apply(this,arguments),t[1],t[2])}),n&&(Ui[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function yA(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function CA(e){var t=e.match(Lf),n,r;for(n=0,r=t.length;n<r;n++)Ui[t[n]]?t[n]=Ui[t[n]]:t[n]=yA(t[n]);return function(i){var s="",o;for(o=0;o<r;o++)s+=Yn(t[o])?t[o].call(i,e):t[o];return s}}function Ja(e,t){return e.isValid()?(t=o1(t,e.localeData()),hu[t]=hu[t]||CA(t),hu[t](e)):e.localeData().invalidDate()}function o1(e,t){var n=5;function r(i){return t.longDateFormat(i)||i}for(da.lastIndex=0;n>=0&&da.test(e);)e=e.replace(da,r),da.lastIndex=0,n-=1;return e}var wA={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function SA(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(Lf).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var _A="Invalid date";function IA(){return this._invalidDate}var MA="%d",EA=/\d{1,2}/;function AA(e){return this._ordinal.replace("%d",e)}var kA={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function RA(e,t,n,r){var i=this._relativeTime[n];return Yn(i)?i(e,t,n,r):i.replace(/%d/i,e)}function PA(e,t){var n=this._relativeTime[e>0?"future":"past"];return Yn(n)?n(t):n.replace(/%s/i,t)}var xp={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function fn(e){return typeof e=="string"?xp[e]||xp[e.toLowerCase()]:void 0}function Vf(e){var t={},n,r;for(r in e)Ee(e,r)&&(n=fn(r),n&&(t[n]=e[r]));return t}var OA={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function DA(e){var t=[],n;for(n in e)Ee(e,n)&&t.push({unit:n,priority:OA[n]});return t.sort(function(r,i){return r.priority-i.priority}),t}var a1=/\d/,Qt=/\d\d/,l1=/\d{3}/,Bf=/\d{4}/,xc=/[+-]?\d{6}/,Ke=/\d\d?/,c1=/\d\d\d\d?/,u1=/\d\d\d\d\d\d?/,yc=/\d{1,3}/,jf=/\d{1,4}/,Cc=/[+-]?\d{1,6}/,bs=/\d+/,wc=/[+-]?\d+/,FA=/Z|[+-]\d\d:?\d\d/gi,Sc=/Z|[+-]\d\d(?::?\d\d)?/gi,TA=/[+-]?\d+(\.\d{1,3})?/,zo=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,vs=/^[1-9]\d?/,Gf=/^([1-9]\d|\d)/,Al;Al={};function U(e,t,n){Al[e]=Yn(t)?t:function(r,i){return r&&n?n:t}}function NA(e,t){return Ee(Al,e)?Al[e](t._strict,t._locale):new RegExp(LA(e))}function LA(e){return pr(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,n,r,i,s){return n||r||i||s}))}function pr(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function rn(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function we(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=rn(t)),n}var md={};function Ge(e,t){var n,r=t,i;for(typeof e=="string"&&(e=[e]),br(t)&&(r=function(s,o){o[t]=we(s)}),i=e.length,n=0;n<i;n++)md[e[n]]=r}function Yo(e,t){Ge(e,function(n,r,i,s){i._w=i._w||{},t(n,i._w,i,s)})}function VA(e,t,n){t!=null&&Ee(md,e)&&md[e](t,n._a,n,e)}function _c(e){return e%4===0&&e%100!==0||e%400===0}var Ot=0,or=1,Rn=2,ft=3,vn=4,ar=5,ci=6,BA=7,jA=8;q("Y",0,0,function(){var e=this.year();return e<=9999?jn(e,4):"+"+e});q(0,["YY",2],0,function(){return this.year()%100});q(0,["YYYY",4],0,"year");q(0,["YYYYY",5],0,"year");q(0,["YYYYYY",6,!0],0,"year");U("Y",wc);U("YY",Ke,Qt);U("YYYY",jf,Bf);U("YYYYY",Cc,xc);U("YYYYYY",Cc,xc);Ge(["YYYYY","YYYYYY"],Ot);Ge("YYYY",function(e,t){t[Ot]=e.length===2?X.parseTwoDigitYear(e):we(e)});Ge("YY",function(e,t){t[Ot]=X.parseTwoDigitYear(e)});Ge("Y",function(e,t){t[Ot]=parseInt(e,10)});function Qs(e){return _c(e)?366:365}X.parseTwoDigitYear=function(e){return we(e)+(we(e)>68?1900:2e3)};var d1=xs("FullYear",!0);function GA(){return _c(this.year())}function xs(e,t){return function(n){return n!=null?(f1(this,e,n),X.updateOffset(this,t),this):Co(this,e)}}function Co(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function f1(e,t,n){var r,i,s,o,a;if(!(!e.isValid()||isNaN(n))){switch(r=e._d,i=e._isUTC,t){case"Milliseconds":return void(i?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(i?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(i?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(i?r.setUTCHours(n):r.setHours(n));case"Date":return void(i?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}s=n,o=e.month(),a=e.date(),a=a===29&&o===1&&!_c(s)?28:a,i?r.setUTCFullYear(s,o,a):r.setFullYear(s,o,a)}}function $A(e){return e=fn(e),Yn(this[e])?this[e]():this}function WA(e,t){if(typeof e=="object"){e=Vf(e);var n=DA(e),r,i=n.length;for(r=0;r<i;r++)this[n[r].unit](e[n[r].unit])}else if(e=fn(e),Yn(this[e]))return this[e](t);return this}function HA(e,t){return(e%t+t)%t}var st;Array.prototype.indexOf?st=Array.prototype.indexOf:st=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function $f(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=HA(t,12);return e+=(t-n)/12,n===1?_c(e)?29:28:31-n%7%2}q("M",["MM",2],"Mo",function(){return this.month()+1});q("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)});q("MMMM",0,0,function(e){return this.localeData().months(this,e)});U("M",Ke,vs);U("MM",Ke,Qt);U("MMM",function(e,t){return t.monthsShortRegex(e)});U("MMMM",function(e,t){return t.monthsRegex(e)});Ge(["M","MM"],function(e,t){t[or]=we(e)-1});Ge(["MMM","MMMM"],function(e,t,n,r){var i=n._locale.monthsParse(e,r,n._strict);i!=null?t[or]=i:ve(n).invalidMonth=e});var zA="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),h1="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),g1=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,YA=zo,XA=zo;function ZA(e,t){return e?wn(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||g1).test(t)?"format":"standalone"][e.month()]:wn(this._months)?this._months:this._months.standalone}function UA(e,t){return e?wn(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[g1.test(t)?"format":"standalone"][e.month()]:wn(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function JA(e,t,n){var r,i,s,o=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)s=zn([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(s,"").toLocaleLowerCase();return n?t==="MMM"?(i=st.call(this._shortMonthsParse,o),i!==-1?i:null):(i=st.call(this._longMonthsParse,o),i!==-1?i:null):t==="MMM"?(i=st.call(this._shortMonthsParse,o),i!==-1?i:(i=st.call(this._longMonthsParse,o),i!==-1?i:null)):(i=st.call(this._longMonthsParse,o),i!==-1?i:(i=st.call(this._shortMonthsParse,o),i!==-1?i:null))}function QA(e,t,n){var r,i,s;if(this._monthsParseExact)return JA.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=zn([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),!n&&!this._monthsParse[r]&&(s="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(s.replace(".",""),"i")),n&&t==="MMMM"&&this._longMonthsParse[r].test(e))return r;if(n&&t==="MMM"&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}}function p1(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=we(t);else if(t=e.localeData().monthsParse(t),!br(t))return e}var n=t,r=e.date();return r=r<29?r:Math.min(r,$f(e.year(),n)),e._isUTC?e._d.setUTCMonth(n,r):e._d.setMonth(n,r),e}function m1(e){return e!=null?(p1(this,e),X.updateOffset(this,!0),this):Co(this,"Month")}function KA(){return $f(this.year(),this.month())}function qA(e){return this._monthsParseExact?(Ee(this,"_monthsRegex")||b1.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(Ee(this,"_monthsShortRegex")||(this._monthsShortRegex=YA),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function ek(e){return this._monthsParseExact?(Ee(this,"_monthsRegex")||b1.call(this),e?this._monthsStrictRegex:this._monthsRegex):(Ee(this,"_monthsRegex")||(this._monthsRegex=XA),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function b1(){function e(l,c){return c.length-l.length}var t=[],n=[],r=[],i,s,o,a;for(i=0;i<12;i++)s=zn([2e3,i]),o=pr(this.monthsShort(s,"")),a=pr(this.months(s,"")),t.push(o),n.push(a),r.push(a),r.push(o);t.sort(e),n.sort(e),r.sort(e),this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function tk(e,t,n,r,i,s,o){var a;return e<100&&e>=0?(a=new Date(e+400,t,n,r,i,s,o),isFinite(a.getFullYear())&&a.setFullYear(e)):a=new Date(e,t,n,r,i,s,o),a}function wo(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function kl(e,t,n){var r=7+t-n,i=(7+wo(e,0,r).getUTCDay()-t)%7;return-i+r-1}function v1(e,t,n,r,i){var s=(7+n-r)%7,o=kl(e,r,i),a=1+7*(t-1)+s+o,l,c;return a<=0?(l=e-1,c=Qs(l)+a):a>Qs(e)?(l=e+1,c=a-Qs(e)):(l=e,c=a),{year:l,dayOfYear:c}}function So(e,t,n){var r=kl(e.year(),t,n),i=Math.floor((e.dayOfYear()-r-1)/7)+1,s,o;return i<1?(o=e.year()-1,s=i+mr(o,t,n)):i>mr(e.year(),t,n)?(s=i-mr(e.year(),t,n),o=e.year()+1):(o=e.year(),s=i),{week:s,year:o}}function mr(e,t,n){var r=kl(e,t,n),i=kl(e+1,t,n);return(Qs(e)-r+i)/7}q("w",["ww",2],"wo","week");q("W",["WW",2],"Wo","isoWeek");U("w",Ke,vs);U("ww",Ke,Qt);U("W",Ke,vs);U("WW",Ke,Qt);Yo(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=we(e)});function nk(e){return So(e,this._week.dow,this._week.doy).week}var rk={dow:0,doy:6};function ik(){return this._week.dow}function sk(){return this._week.doy}function ok(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function ak(e){var t=So(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}q("d",0,"do","day");q("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});q("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});q("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});q("e",0,0,"weekday");q("E",0,0,"isoWeekday");U("d",Ke);U("e",Ke);U("E",Ke);U("dd",function(e,t){return t.weekdaysMinRegex(e)});U("ddd",function(e,t){return t.weekdaysShortRegex(e)});U("dddd",function(e,t){return t.weekdaysRegex(e)});Yo(["dd","ddd","dddd"],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);i!=null?t.d=i:ve(n).invalidWeekday=e});Yo(["d","e","E"],function(e,t,n,r){t[r]=we(e)});function lk(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function ck(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Wf(e,t){return e.slice(t,7).concat(e.slice(0,t))}var uk="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),x1="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),dk="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),fk=zo,hk=zo,gk=zo;function pk(e,t){var n=wn(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?Wf(n,this._week.dow):e?n[e.day()]:n}function mk(e){return e===!0?Wf(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function bk(e){return e===!0?Wf(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function vk(e,t,n){var r,i,s,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)s=zn([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(s,"").toLocaleLowerCase();return n?t==="dddd"?(i=st.call(this._weekdaysParse,o),i!==-1?i:null):t==="ddd"?(i=st.call(this._shortWeekdaysParse,o),i!==-1?i:null):(i=st.call(this._minWeekdaysParse,o),i!==-1?i:null):t==="dddd"?(i=st.call(this._weekdaysParse,o),i!==-1||(i=st.call(this._shortWeekdaysParse,o),i!==-1)?i:(i=st.call(this._minWeekdaysParse,o),i!==-1?i:null)):t==="ddd"?(i=st.call(this._shortWeekdaysParse,o),i!==-1||(i=st.call(this._weekdaysParse,o),i!==-1)?i:(i=st.call(this._minWeekdaysParse,o),i!==-1?i:null)):(i=st.call(this._minWeekdaysParse,o),i!==-1||(i=st.call(this._weekdaysParse,o),i!==-1)?i:(i=st.call(this._shortWeekdaysParse,o),i!==-1?i:null))}function xk(e,t,n){var r,i,s;if(this._weekdaysParseExact)return vk.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=zn([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(s="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(s.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(n&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(n&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function yk(e){if(!this.isValid())return e!=null?this:NaN;var t=Co(this,"Day");return e!=null?(e=lk(e,this.localeData()),this.add(e-t,"d")):t}function Ck(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function wk(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=ck(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function Sk(e){return this._weekdaysParseExact?(Ee(this,"_weekdaysRegex")||Hf.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(Ee(this,"_weekdaysRegex")||(this._weekdaysRegex=fk),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function _k(e){return this._weekdaysParseExact?(Ee(this,"_weekdaysRegex")||Hf.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(Ee(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=hk),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Ik(e){return this._weekdaysParseExact?(Ee(this,"_weekdaysRegex")||Hf.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(Ee(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=gk),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Hf(){function e(u,d){return d.length-u.length}var t=[],n=[],r=[],i=[],s,o,a,l,c;for(s=0;s<7;s++)o=zn([2e3,1]).day(s),a=pr(this.weekdaysMin(o,"")),l=pr(this.weekdaysShort(o,"")),c=pr(this.weekdays(o,"")),t.push(a),n.push(l),r.push(c),i.push(a),i.push(l),i.push(c);t.sort(e),n.sort(e),r.sort(e),i.sort(e),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function zf(){return this.hours()%12||12}function Mk(){return this.hours()||24}q("H",["HH",2],0,"hour");q("h",["hh",2],0,zf);q("k",["kk",2],0,Mk);q("hmm",0,0,function(){return""+zf.apply(this)+jn(this.minutes(),2)});q("hmmss",0,0,function(){return""+zf.apply(this)+jn(this.minutes(),2)+jn(this.seconds(),2)});q("Hmm",0,0,function(){return""+this.hours()+jn(this.minutes(),2)});q("Hmmss",0,0,function(){return""+this.hours()+jn(this.minutes(),2)+jn(this.seconds(),2)});function y1(e,t){q(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}y1("a",!0);y1("A",!1);function C1(e,t){return t._meridiemParse}U("a",C1);U("A",C1);U("H",Ke,Gf);U("h",Ke,vs);U("k",Ke,vs);U("HH",Ke,Qt);U("hh",Ke,Qt);U("kk",Ke,Qt);U("hmm",c1);U("hmmss",u1);U("Hmm",c1);U("Hmmss",u1);Ge(["H","HH"],ft);Ge(["k","kk"],function(e,t,n){var r=we(e);t[ft]=r===24?0:r});Ge(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e});Ge(["h","hh"],function(e,t,n){t[ft]=we(e),ve(n).bigHour=!0});Ge("hmm",function(e,t,n){var r=e.length-2;t[ft]=we(e.substr(0,r)),t[vn]=we(e.substr(r)),ve(n).bigHour=!0});Ge("hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[ft]=we(e.substr(0,r)),t[vn]=we(e.substr(r,2)),t[ar]=we(e.substr(i)),ve(n).bigHour=!0});Ge("Hmm",function(e,t,n){var r=e.length-2;t[ft]=we(e.substr(0,r)),t[vn]=we(e.substr(r))});Ge("Hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[ft]=we(e.substr(0,r)),t[vn]=we(e.substr(r,2)),t[ar]=we(e.substr(i))});function Ek(e){return(e+"").toLowerCase().charAt(0)==="p"}var Ak=/[ap]\.?m?\.?/i,kk=xs("Hours",!0);function Rk(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var w1={calendar:vA,longDateFormat:wA,invalidDate:_A,ordinal:MA,dayOfMonthOrdinalParse:EA,relativeTime:kA,months:zA,monthsShort:h1,week:rk,weekdays:uk,weekdaysMin:dk,weekdaysShort:x1,meridiemParse:Ak},qe={},Es={},_o;function Pk(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function yp(e){return e&&e.toLowerCase().replace("_","-")}function Ok(e){for(var t=0,n,r,i,s;t<e.length;){for(s=yp(e[t]).split("-"),n=s.length,r=yp(e[t+1]),r=r?r.split("-"):null;n>0;){if(i=Ic(s.slice(0,n).join("-")),i)return i;if(r&&r.length>=n&&Pk(s,r)>=n-1)break;n--}t++}return _o}function Dk(e){return!!(e&&e.match("^[^/\\\\]*$"))}function Ic(e){var t=null,n;if(qe[e]===void 0&&typeof module<"u"&&module&&module.exports&&Dk(e))try{t=_o._abbr,n=require,n("./locale/"+e),Lr(t)}catch{qe[e]=null}return qe[e]}function Lr(e,t){var n;return e&&(Bt(t)?n=Sr(e):n=Yf(e,t),n?_o=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),_o._abbr}function Yf(e,t){if(t!==null){var n,r=w1;if(t.abbr=e,qe[e]!=null)s1("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=qe[e]._config;else if(t.parentLocale!=null)if(qe[t.parentLocale]!=null)r=qe[t.parentLocale]._config;else if(n=Ic(t.parentLocale),n!=null)r=n._config;else return Es[t.parentLocale]||(Es[t.parentLocale]=[]),Es[t.parentLocale].push({name:e,config:t}),null;return qe[e]=new Nf(gd(r,t)),Es[e]&&Es[e].forEach(function(i){Yf(i.name,i.config)}),Lr(e),qe[e]}else return delete qe[e],null}function Fk(e,t){if(t!=null){var n,r,i=w1;qe[e]!=null&&qe[e].parentLocale!=null?qe[e].set(gd(qe[e]._config,t)):(r=Ic(e),r!=null&&(i=r._config),t=gd(i,t),r==null&&(t.abbr=e),n=new Nf(t),n.parentLocale=qe[e],qe[e]=n),Lr(e)}else qe[e]!=null&&(qe[e].parentLocale!=null?(qe[e]=qe[e].parentLocale,e===Lr()&&Lr(e)):qe[e]!=null&&delete qe[e]);return qe[e]}function Sr(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return _o;if(!wn(e)){if(t=Ic(e),t)return t;e=[e]}return Ok(e)}function Tk(){return pd(qe)}function Xf(e){var t,n=e._a;return n&&ve(e).overflow===-2&&(t=n[or]<0||n[or]>11?or:n[Rn]<1||n[Rn]>$f(n[Ot],n[or])?Rn:n[ft]<0||n[ft]>24||n[ft]===24&&(n[vn]!==0||n[ar]!==0||n[ci]!==0)?ft:n[vn]<0||n[vn]>59?vn:n[ar]<0||n[ar]>59?ar:n[ci]<0||n[ci]>999?ci:-1,ve(e)._overflowDayOfYear&&(t<Ot||t>Rn)&&(t=Rn),ve(e)._overflowWeeks&&t===-1&&(t=BA),ve(e)._overflowWeekday&&t===-1&&(t=jA),ve(e).overflow=t),e}var Nk=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Lk=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Vk=/Z|[+-]\d\d(?::?\d\d)?/,fa=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],gu=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Bk=/^\/?Date\((-?\d+)/i,jk=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Gk={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function S1(e){var t,n,r=e._i,i=Nk.exec(r)||Lk.exec(r),s,o,a,l,c=fa.length,u=gu.length;if(i){for(ve(e).iso=!0,t=0,n=c;t<n;t++)if(fa[t][1].exec(i[1])){o=fa[t][0],s=fa[t][2]!==!1;break}if(o==null){e._isValid=!1;return}if(i[3]){for(t=0,n=u;t<n;t++)if(gu[t][1].exec(i[3])){a=(i[2]||" ")+gu[t][0];break}if(a==null){e._isValid=!1;return}}if(!s&&a!=null){e._isValid=!1;return}if(i[4])if(Vk.exec(i[4]))l="Z";else{e._isValid=!1;return}e._f=o+(a||"")+(l||""),Uf(e)}else e._isValid=!1}function $k(e,t,n,r,i,s){var o=[Wk(e),h1.indexOf(t),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return s&&o.push(parseInt(s,10)),o}function Wk(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Hk(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function zk(e,t,n){if(e){var r=x1.indexOf(e),i=new Date(t[0],t[1],t[2]).getDay();if(r!==i)return ve(n).weekdayMismatch=!0,n._isValid=!1,!1}return!0}function Yk(e,t,n){if(e)return Gk[e];if(t)return 0;var r=parseInt(n,10),i=r%100,s=(r-i)/100;return s*60+i}function _1(e){var t=jk.exec(Hk(e._i)),n;if(t){if(n=$k(t[4],t[3],t[2],t[5],t[6],t[7]),!zk(t[1],n,e))return;e._a=n,e._tzm=Yk(t[8],t[9],t[10]),e._d=wo.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),ve(e).rfc2822=!0}else e._isValid=!1}function Xk(e){var t=Bk.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(S1(e),e._isValid===!1)delete e._isValid;else return;if(_1(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:X.createFromInputFallback(e)}X.createFromInputFallback=dn("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))});function ji(e,t,n){return e??t??n}function Zk(e){var t=new Date(X.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Zf(e){var t,n,r=[],i,s,o;if(!e._d){for(i=Zk(e),e._w&&e._a[Rn]==null&&e._a[or]==null&&Uk(e),e._dayOfYear!=null&&(o=ji(e._a[Ot],i[Ot]),(e._dayOfYear>Qs(o)||e._dayOfYear===0)&&(ve(e)._overflowDayOfYear=!0),n=wo(o,0,e._dayOfYear),e._a[or]=n.getUTCMonth(),e._a[Rn]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=i[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[ft]===24&&e._a[vn]===0&&e._a[ar]===0&&e._a[ci]===0&&(e._nextDay=!0,e._a[ft]=0),e._d=(e._useUTC?wo:tk).apply(null,r),s=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ft]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==s&&(ve(e).weekdayMismatch=!0)}}function Uk(e){var t,n,r,i,s,o,a,l,c;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(s=1,o=4,n=ji(t.GG,e._a[Ot],So(Qe(),1,4).year),r=ji(t.W,1),i=ji(t.E,1),(i<1||i>7)&&(l=!0)):(s=e._locale._week.dow,o=e._locale._week.doy,c=So(Qe(),s,o),n=ji(t.gg,e._a[Ot],c.year),r=ji(t.w,c.week),t.d!=null?(i=t.d,(i<0||i>6)&&(l=!0)):t.e!=null?(i=t.e+s,(t.e<0||t.e>6)&&(l=!0)):i=s),r<1||r>mr(n,s,o)?ve(e)._overflowWeeks=!0:l!=null?ve(e)._overflowWeekday=!0:(a=v1(n,r,i,s,o),e._a[Ot]=a.year,e._dayOfYear=a.dayOfYear)}X.ISO_8601=function(){};X.RFC_2822=function(){};function Uf(e){if(e._f===X.ISO_8601){S1(e);return}if(e._f===X.RFC_2822){_1(e);return}e._a=[],ve(e).empty=!0;var t=""+e._i,n,r,i,s,o,a=t.length,l=0,c,u;for(i=o1(e._f,e._locale).match(Lf)||[],u=i.length,n=0;n<u;n++)s=i[n],r=(t.match(NA(s,e))||[])[0],r&&(o=t.substr(0,t.indexOf(r)),o.length>0&&ve(e).unusedInput.push(o),t=t.slice(t.indexOf(r)+r.length),l+=r.length),Ui[s]?(r?ve(e).empty=!1:ve(e).unusedTokens.push(s),VA(s,r,e)):e._strict&&!r&&ve(e).unusedTokens.push(s);ve(e).charsLeftOver=a-l,t.length>0&&ve(e).unusedInput.push(t),e._a[ft]<=12&&ve(e).bigHour===!0&&e._a[ft]>0&&(ve(e).bigHour=void 0),ve(e).parsedDateParts=e._a.slice(0),ve(e).meridiem=e._meridiem,e._a[ft]=Jk(e._locale,e._a[ft],e._meridiem),c=ve(e).era,c!==null&&(e._a[Ot]=e._locale.erasConvertYear(c,e._a[Ot])),Zf(e),Xf(e)}function Jk(e,t,n){var r;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function Qk(e){var t,n,r,i,s,o,a=!1,l=e._f.length;if(l===0){ve(e).invalidFormat=!0,e._d=new Date(NaN);return}for(i=0;i<l;i++)s=0,o=!1,t=Tf({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[i],Uf(t),Ff(t)&&(o=!0),s+=ve(t).charsLeftOver,s+=ve(t).unusedTokens.length*10,ve(t).score=s,a?s<r&&(r=s,n=t):(r==null||s<r||o)&&(r=s,n=t,o&&(a=!0));Rr(e,n||t)}function Kk(e){if(!e._d){var t=Vf(e._i),n=t.day===void 0?t.date:t.day;e._a=r1([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],function(r){return r&&parseInt(r,10)}),Zf(e)}}function qk(e){var t=new Ho(Xf(I1(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function I1(e){var t=e._i,n=e._f;return e._locale=e._locale||Sr(e._l),t===null||n===void 0&&t===""?vc({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),Sn(t)?new Ho(Xf(t)):(Wo(t)?e._d=t:wn(n)?Qk(e):n?Uf(e):eR(e),Ff(e)||(e._d=null),e))}function eR(e){var t=e._i;Bt(t)?e._d=new Date(X.now()):Wo(t)?e._d=new Date(t.valueOf()):typeof t=="string"?Xk(e):wn(t)?(e._a=r1(t.slice(0),function(n){return parseInt(n,10)}),Zf(e)):hi(t)?Kk(e):br(t)?e._d=new Date(t):X.createFromInputFallback(e)}function M1(e,t,n,r,i){var s={};return(t===!0||t===!1)&&(r=t,t=void 0),(n===!0||n===!1)&&(r=n,n=void 0),(hi(e)&&Df(e)||wn(e)&&e.length===0)&&(e=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=i,s._l=n,s._i=e,s._f=t,s._strict=r,qk(s)}function Qe(e,t,n,r){return M1(e,t,n,r,!1)}var tR=dn("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Qe.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:vc()}),nR=dn("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Qe.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:vc()});function E1(e,t){var n,r;if(t.length===1&&wn(t[0])&&(t=t[0]),!t.length)return Qe();for(n=t[0],r=1;r<t.length;++r)(!t[r].isValid()||t[r][e](n))&&(n=t[r]);return n}function rR(){var e=[].slice.call(arguments,0);return E1("isBefore",e)}function iR(){var e=[].slice.call(arguments,0);return E1("isAfter",e)}var sR=function(){return Date.now?Date.now():+new Date},As=["year","quarter","month","week","day","hour","minute","second","millisecond"];function oR(e){var t,n=!1,r,i=As.length;for(t in e)if(Ee(e,t)&&!(st.call(As,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(r=0;r<i;++r)if(e[As[r]]){if(n)return!1;parseFloat(e[As[r]])!==we(e[As[r]])&&(n=!0)}return!0}function aR(){return this._isValid}function lR(){return _n(NaN)}function Mc(e){var t=Vf(e),n=t.year||0,r=t.quarter||0,i=t.month||0,s=t.week||t.isoWeek||0,o=t.day||0,a=t.hour||0,l=t.minute||0,c=t.second||0,u=t.millisecond||0;this._isValid=oR(t),this._milliseconds=+u+c*1e3+l*6e4+a*1e3*60*60,this._days=+o+s*7,this._months=+i+r*3+n*12,this._data={},this._locale=Sr(),this._bubble()}function Qa(e){return e instanceof Mc}function bd(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function cR(e,t,n){var r=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),s=0,o;for(o=0;o<r;o++)we(e[o])!==we(t[o])&&s++;return s+i}function A1(e,t){q(e,0,0,function(){var n=this.utcOffset(),r="+";return n<0&&(n=-n,r="-"),r+jn(~~(n/60),2)+t+jn(~~n%60,2)})}A1("Z",":");A1("ZZ","");U("Z",Sc);U("ZZ",Sc);Ge(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Jf(Sc,e)});var uR=/([\+\-]|\d\d)/gi;function Jf(e,t){var n=(t||"").match(e),r,i,s;return n===null?null:(r=n[n.length-1]||[],i=(r+"").match(uR)||["-",0,0],s=+(i[1]*60)+we(i[2]),s===0?0:i[0]==="+"?s:-s)}function Qf(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(Sn(e)||Wo(e)?e.valueOf():Qe(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),X.updateOffset(n,!1),n):Qe(e).local()}function vd(e){return-Math.round(e._d.getTimezoneOffset())}X.updateOffset=function(){};function dR(e,t,n){var r=this._offset||0,i;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=Jf(Sc,e),e===null)return this}else Math.abs(e)<16&&!n&&(e=e*60);return!this._isUTC&&t&&(i=vd(this)),this._offset=e,this._isUTC=!0,i!=null&&this.add(i,"m"),r!==e&&(!t||this._changeInProgress?P1(this,_n(e-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,X.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?r:vd(this)}function fR(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function hR(e){return this.utcOffset(0,e)}function gR(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(vd(this),"m")),this}function pR(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=Jf(FA,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function mR(e){return this.isValid()?(e=e?Qe(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function bR(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function vR(){if(!Bt(this._isDSTShifted))return this._isDSTShifted;var e={},t;return Tf(e,this),e=I1(e),e._a?(t=e._isUTC?zn(e._a):Qe(e._a),this._isDSTShifted=this.isValid()&&cR(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function xR(){return this.isValid()?!this._isUTC:!1}function yR(){return this.isValid()?this._isUTC:!1}function k1(){return this.isValid()?this._isUTC&&this._offset===0:!1}var CR=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,wR=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function _n(e,t){var n=e,r=null,i,s,o;return Qa(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:br(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=CR.exec(e))?(i=r[1]==="-"?-1:1,n={y:0,d:we(r[Rn])*i,h:we(r[ft])*i,m:we(r[vn])*i,s:we(r[ar])*i,ms:we(bd(r[ci]*1e3))*i}):(r=wR.exec(e))?(i=r[1]==="-"?-1:1,n={y:Qr(r[2],i),M:Qr(r[3],i),w:Qr(r[4],i),d:Qr(r[5],i),h:Qr(r[6],i),m:Qr(r[7],i),s:Qr(r[8],i)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(o=SR(Qe(n.from),Qe(n.to)),n={},n.ms=o.milliseconds,n.M=o.months),s=new Mc(n),Qa(e)&&Ee(e,"_locale")&&(s._locale=e._locale),Qa(e)&&Ee(e,"_isValid")&&(s._isValid=e._isValid),s}_n.fn=Mc.prototype;_n.invalid=lR;function Qr(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Cp(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function SR(e,t){var n;return e.isValid()&&t.isValid()?(t=Qf(t,e),e.isBefore(t)?n=Cp(e,t):(n=Cp(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function R1(e,t){return function(n,r){var i,s;return r!==null&&!isNaN(+r)&&(s1(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=n,n=r,r=s),i=_n(n,r),P1(this,i,e),this}}function P1(e,t,n,r){var i=t._milliseconds,s=bd(t._days),o=bd(t._months);e.isValid()&&(r=r??!0,o&&p1(e,Co(e,"Month")+o*n),s&&f1(e,"Date",Co(e,"Date")+s*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&X.updateOffset(e,s||o))}var _R=R1(1,"add"),IR=R1(-1,"subtract");function O1(e){return typeof e=="string"||e instanceof String}function MR(e){return Sn(e)||Wo(e)||O1(e)||br(e)||AR(e)||ER(e)||e===null||e===void 0}function ER(e){var t=hi(e)&&!Df(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,s,o=r.length;for(i=0;i<o;i+=1)s=r[i],n=n||Ee(e,s);return t&&n}function AR(e){var t=wn(e),n=!1;return t&&(n=e.filter(function(r){return!br(r)&&O1(e)}).length===0),t&&n}function kR(e){var t=hi(e)&&!Df(e),n=!1,r=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],i,s;for(i=0;i<r.length;i+=1)s=r[i],n=n||Ee(e,s);return t&&n}function RR(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function PR(e,t){arguments.length===1&&(arguments[0]?MR(arguments[0])?(e=arguments[0],t=void 0):kR(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||Qe(),r=Qf(n,this).startOf("day"),i=X.calendarFormat(this,r)||"sameElse",s=t&&(Yn(t[i])?t[i].call(this,n):t[i]);return this.format(s||this.localeData().calendar(i,this,Qe(n)))}function OR(){return new Ho(this)}function DR(e,t){var n=Sn(e)?e:Qe(e);return this.isValid()&&n.isValid()?(t=fn(t)||"millisecond",t==="millisecond"?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf()):!1}function FR(e,t){var n=Sn(e)?e:Qe(e);return this.isValid()&&n.isValid()?(t=fn(t)||"millisecond",t==="millisecond"?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf()):!1}function TR(e,t,n,r){var i=Sn(e)?e:Qe(e),s=Sn(t)?t:Qe(t);return this.isValid()&&i.isValid()&&s.isValid()?(r=r||"()",(r[0]==="("?this.isAfter(i,n):!this.isBefore(i,n))&&(r[1]===")"?this.isBefore(s,n):!this.isAfter(s,n))):!1}function NR(e,t){var n=Sn(e)?e:Qe(e),r;return this.isValid()&&n.isValid()?(t=fn(t)||"millisecond",t==="millisecond"?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(t).valueOf()<=r&&r<=this.clone().endOf(t).valueOf())):!1}function LR(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function VR(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function BR(e,t,n){var r,i,s;if(!this.isValid())return NaN;if(r=Qf(e,this),!r.isValid())return NaN;switch(i=(r.utcOffset()-this.utcOffset())*6e4,t=fn(t),t){case"year":s=Ka(this,r)/12;break;case"month":s=Ka(this,r);break;case"quarter":s=Ka(this,r)/3;break;case"second":s=(this-r)/1e3;break;case"minute":s=(this-r)/6e4;break;case"hour":s=(this-r)/36e5;break;case"day":s=(this-r-i)/864e5;break;case"week":s=(this-r-i)/6048e5;break;default:s=this-r}return n?s:rn(s)}function Ka(e,t){if(e.date()<t.date())return-Ka(t,e);var n=(t.year()-e.year())*12+(t.month()-e.month()),r=e.clone().add(n,"months"),i,s;return t-r<0?(i=e.clone().add(n-1,"months"),s=(t-r)/(r-i)):(i=e.clone().add(n+1,"months"),s=(t-r)/(i-r)),-(n+s)||0}X.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";X.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function jR(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function GR(e){if(!this.isValid())return null;var t=e!==!0,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?Ja(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Yn(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Ja(n,"Z")):Ja(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function $R(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,r,i,s;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",s=t+'[")]',this.format(n+r+i+s)}function WR(e){e||(e=this.isUtc()?X.defaultFormatUtc:X.defaultFormat);var t=Ja(this,e);return this.localeData().postformat(t)}function HR(e,t){return this.isValid()&&(Sn(e)&&e.isValid()||Qe(e).isValid())?_n({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function zR(e){return this.from(Qe(),e)}function YR(e,t){return this.isValid()&&(Sn(e)&&e.isValid()||Qe(e).isValid())?_n({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function XR(e){return this.to(Qe(),e)}function D1(e){var t;return e===void 0?this._locale._abbr:(t=Sr(e),t!=null&&(this._locale=t),this)}var F1=dn("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function T1(){return this._locale}var Rl=1e3,Ji=60*Rl,Pl=60*Ji,N1=(365*400+97)*24*Pl;function Qi(e,t){return(e%t+t)%t}function L1(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-N1:new Date(e,t,n).valueOf()}function V1(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-N1:Date.UTC(e,t,n)}function ZR(e){var t,n;if(e=fn(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?V1:L1,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=Qi(t+(this._isUTC?0:this.utcOffset()*Ji),Pl);break;case"minute":t=this._d.valueOf(),t-=Qi(t,Ji);break;case"second":t=this._d.valueOf(),t-=Qi(t,Rl);break}return this._d.setTime(t),X.updateOffset(this,!0),this}function UR(e){var t,n;if(e=fn(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?V1:L1,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=Pl-Qi(t+(this._isUTC?0:this.utcOffset()*Ji),Pl)-1;break;case"minute":t=this._d.valueOf(),t+=Ji-Qi(t,Ji)-1;break;case"second":t=this._d.valueOf(),t+=Rl-Qi(t,Rl)-1;break}return this._d.setTime(t),X.updateOffset(this,!0),this}function JR(){return this._d.valueOf()-(this._offset||0)*6e4}function QR(){return Math.floor(this.valueOf()/1e3)}function KR(){return new Date(this.valueOf())}function qR(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function e3(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function t3(){return this.isValid()?this.toISOString():null}function n3(){return Ff(this)}function r3(){return Rr({},ve(this))}function i3(){return ve(this).overflow}function s3(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}q("N",0,0,"eraAbbr");q("NN",0,0,"eraAbbr");q("NNN",0,0,"eraAbbr");q("NNNN",0,0,"eraName");q("NNNNN",0,0,"eraNarrow");q("y",["y",1],"yo","eraYear");q("y",["yy",2],0,"eraYear");q("y",["yyy",3],0,"eraYear");q("y",["yyyy",4],0,"eraYear");U("N",Kf);U("NN",Kf);U("NNN",Kf);U("NNNN",m3);U("NNNNN",b3);Ge(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?ve(n).era=i:ve(n).invalidEra=e});U("y",bs);U("yy",bs);U("yyy",bs);U("yyyy",bs);U("yo",v3);Ge(["y","yy","yyy","yyyy"],Ot);Ge(["yo"],function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Ot]=n._locale.eraYearOrdinalParse(e,i):t[Ot]=parseInt(e,10)});function o3(e,t){var n,r,i,s=this._eras||Sr("en")._eras;for(n=0,r=s.length;n<r;++n){switch(typeof s[n].since){case"string":i=X(s[n].since).startOf("day"),s[n].since=i.valueOf();break}switch(typeof s[n].until){case"undefined":s[n].until=1/0;break;case"string":i=X(s[n].until).startOf("day").valueOf(),s[n].until=i.valueOf();break}}return s}function a3(e,t,n){var r,i,s=this.eras(),o,a,l;for(e=e.toUpperCase(),r=0,i=s.length;r<i;++r)if(o=s[r].name.toUpperCase(),a=s[r].abbr.toUpperCase(),l=s[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(a===e)return s[r];break;case"NNNN":if(o===e)return s[r];break;case"NNNNN":if(l===e)return s[r];break}else if([o,a,l].indexOf(e)>=0)return s[r]}function l3(e,t){var n=e.since<=e.until?1:-1;return t===void 0?X(e.since).year():X(e.since).year()+(t-e.offset)*n}function c3(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].name;return""}function u3(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].narrow;return""}function d3(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].abbr;return""}function f3(){var e,t,n,r,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e)if(n=i[e].since<=i[e].until?1:-1,r=this.clone().startOf("day").valueOf(),i[e].since<=r&&r<=i[e].until||i[e].until<=r&&r<=i[e].since)return(this.year()-X(i[e].since).year())*n+i[e].offset;return this.year()}function h3(e){return Ee(this,"_erasNameRegex")||qf.call(this),e?this._erasNameRegex:this._erasRegex}function g3(e){return Ee(this,"_erasAbbrRegex")||qf.call(this),e?this._erasAbbrRegex:this._erasRegex}function p3(e){return Ee(this,"_erasNarrowRegex")||qf.call(this),e?this._erasNarrowRegex:this._erasRegex}function Kf(e,t){return t.erasAbbrRegex(e)}function m3(e,t){return t.erasNameRegex(e)}function b3(e,t){return t.erasNarrowRegex(e)}function v3(e,t){return t._eraYearOrdinalRegex||bs}function qf(){var e=[],t=[],n=[],r=[],i,s,o,a,l,c=this.eras();for(i=0,s=c.length;i<s;++i)o=pr(c[i].name),a=pr(c[i].abbr),l=pr(c[i].narrow),t.push(o),e.push(a),n.push(l),r.push(o),r.push(a),r.push(l);this._erasRegex=new RegExp("^("+r.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+n.join("|")+")","i")}q(0,["gg",2],0,function(){return this.weekYear()%100});q(0,["GG",2],0,function(){return this.isoWeekYear()%100});function Ec(e,t){q(0,[e,e.length],0,t)}Ec("gggg","weekYear");Ec("ggggg","weekYear");Ec("GGGG","isoWeekYear");Ec("GGGGG","isoWeekYear");U("G",wc);U("g",wc);U("GG",Ke,Qt);U("gg",Ke,Qt);U("GGGG",jf,Bf);U("gggg",jf,Bf);U("GGGGG",Cc,xc);U("ggggg",Cc,xc);Yo(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=we(e)});Yo(["gg","GG"],function(e,t,n,r){t[r]=X.parseTwoDigitYear(e)});function x3(e){return B1.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function y3(e){return B1.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function C3(){return mr(this.year(),1,4)}function w3(){return mr(this.isoWeekYear(),1,4)}function S3(){var e=this.localeData()._week;return mr(this.year(),e.dow,e.doy)}function _3(){var e=this.localeData()._week;return mr(this.weekYear(),e.dow,e.doy)}function B1(e,t,n,r,i){var s;return e==null?So(this,r,i).year:(s=mr(e,r,i),t>s&&(t=s),I3.call(this,e,t,n,r,i))}function I3(e,t,n,r,i){var s=v1(e,t,n,r,i),o=wo(s.year,0,s.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}q("Q",0,"Qo","quarter");U("Q",a1);Ge("Q",function(e,t){t[or]=(we(e)-1)*3});function M3(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}q("D",["DD",2],"Do","date");U("D",Ke,vs);U("DD",Ke,Qt);U("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});Ge(["D","DD"],Rn);Ge("Do",function(e,t){t[Rn]=we(e.match(Ke)[0])});var j1=xs("Date",!0);q("DDD",["DDDD",3],"DDDo","dayOfYear");U("DDD",yc);U("DDDD",l1);Ge(["DDD","DDDD"],function(e,t,n){n._dayOfYear=we(e)});function E3(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}q("m",["mm",2],0,"minute");U("m",Ke,Gf);U("mm",Ke,Qt);Ge(["m","mm"],vn);var A3=xs("Minutes",!1);q("s",["ss",2],0,"second");U("s",Ke,Gf);U("ss",Ke,Qt);Ge(["s","ss"],ar);var k3=xs("Seconds",!1);q("S",0,0,function(){return~~(this.millisecond()/100)});q(0,["SS",2],0,function(){return~~(this.millisecond()/10)});q(0,["SSS",3],0,"millisecond");q(0,["SSSS",4],0,function(){return this.millisecond()*10});q(0,["SSSSS",5],0,function(){return this.millisecond()*100});q(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});q(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});q(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});q(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});U("S",yc,a1);U("SS",yc,Qt);U("SSS",yc,l1);var Pr,G1;for(Pr="SSSS";Pr.length<=9;Pr+="S")U(Pr,bs);function R3(e,t){t[ci]=we(("0."+e)*1e3)}for(Pr="S";Pr.length<=9;Pr+="S")Ge(Pr,R3);G1=xs("Milliseconds",!1);q("z",0,0,"zoneAbbr");q("zz",0,0,"zoneName");function P3(){return this._isUTC?"UTC":""}function O3(){return this._isUTC?"Coordinated Universal Time":""}var j=Ho.prototype;j.add=_R;j.calendar=PR;j.clone=OR;j.diff=BR;j.endOf=UR;j.format=WR;j.from=HR;j.fromNow=zR;j.to=YR;j.toNow=XR;j.get=$A;j.invalidAt=i3;j.isAfter=DR;j.isBefore=FR;j.isBetween=TR;j.isSame=NR;j.isSameOrAfter=LR;j.isSameOrBefore=VR;j.isValid=n3;j.lang=F1;j.locale=D1;j.localeData=T1;j.max=nR;j.min=tR;j.parsingFlags=r3;j.set=WA;j.startOf=ZR;j.subtract=IR;j.toArray=qR;j.toObject=e3;j.toDate=KR;j.toISOString=GR;j.inspect=$R;typeof Symbol<"u"&&Symbol.for!=null&&(j[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});j.toJSON=t3;j.toString=jR;j.unix=QR;j.valueOf=JR;j.creationData=s3;j.eraName=c3;j.eraNarrow=u3;j.eraAbbr=d3;j.eraYear=f3;j.year=d1;j.isLeapYear=GA;j.weekYear=x3;j.isoWeekYear=y3;j.quarter=j.quarters=M3;j.month=m1;j.daysInMonth=KA;j.week=j.weeks=ok;j.isoWeek=j.isoWeeks=ak;j.weeksInYear=S3;j.weeksInWeekYear=_3;j.isoWeeksInYear=C3;j.isoWeeksInISOWeekYear=w3;j.date=j1;j.day=j.days=yk;j.weekday=Ck;j.isoWeekday=wk;j.dayOfYear=E3;j.hour=j.hours=kk;j.minute=j.minutes=A3;j.second=j.seconds=k3;j.millisecond=j.milliseconds=G1;j.utcOffset=dR;j.utc=hR;j.local=gR;j.parseZone=pR;j.hasAlignedHourOffset=mR;j.isDST=bR;j.isLocal=xR;j.isUtcOffset=yR;j.isUtc=k1;j.isUTC=k1;j.zoneAbbr=P3;j.zoneName=O3;j.dates=dn("dates accessor is deprecated. Use date instead.",j1);j.months=dn("months accessor is deprecated. Use month instead",m1);j.years=dn("years accessor is deprecated. Use year instead",d1);j.zone=dn("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",fR);j.isDSTShifted=dn("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",vR);function D3(e){return Qe(e*1e3)}function F3(){return Qe.apply(null,arguments).parseZone()}function $1(e){return e}var Ae=Nf.prototype;Ae.calendar=xA;Ae.longDateFormat=SA;Ae.invalidDate=IA;Ae.ordinal=AA;Ae.preparse=$1;Ae.postformat=$1;Ae.relativeTime=RA;Ae.pastFuture=PA;Ae.set=bA;Ae.eras=o3;Ae.erasParse=a3;Ae.erasConvertYear=l3;Ae.erasAbbrRegex=g3;Ae.erasNameRegex=h3;Ae.erasNarrowRegex=p3;Ae.months=ZA;Ae.monthsShort=UA;Ae.monthsParse=QA;Ae.monthsRegex=ek;Ae.monthsShortRegex=qA;Ae.week=nk;Ae.firstDayOfYear=sk;Ae.firstDayOfWeek=ik;Ae.weekdays=pk;Ae.weekdaysMin=bk;Ae.weekdaysShort=mk;Ae.weekdaysParse=xk;Ae.weekdaysRegex=Sk;Ae.weekdaysShortRegex=_k;Ae.weekdaysMinRegex=Ik;Ae.isPM=Ek;Ae.meridiem=Rk;function Ol(e,t,n,r){var i=Sr(),s=zn().set(r,t);return i[n](s,e)}function W1(e,t,n){if(br(e)&&(t=e,e=void 0),e=e||"",t!=null)return Ol(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=Ol(e,r,n,"month");return i}function eh(e,t,n,r){typeof e=="boolean"?(br(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,br(t)&&(n=t,t=void 0),t=t||"");var i=Sr(),s=e?i._week.dow:0,o,a=[];if(n!=null)return Ol(t,(n+s)%7,r,"day");for(o=0;o<7;o++)a[o]=Ol(t,(o+s)%7,r,"day");return a}function T3(e,t){return W1(e,t,"months")}function N3(e,t){return W1(e,t,"monthsShort")}function L3(e,t,n){return eh(e,t,n,"weekdays")}function V3(e,t,n){return eh(e,t,n,"weekdaysShort")}function B3(e,t,n){return eh(e,t,n,"weekdaysMin")}Lr("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=we(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}});X.lang=dn("moment.lang is deprecated. Use moment.locale instead.",Lr);X.langData=dn("moment.langData is deprecated. Use moment.localeData instead.",Sr);var Jn=Math.abs;function j3(){var e=this._data;return this._milliseconds=Jn(this._milliseconds),this._days=Jn(this._days),this._months=Jn(this._months),e.milliseconds=Jn(e.milliseconds),e.seconds=Jn(e.seconds),e.minutes=Jn(e.minutes),e.hours=Jn(e.hours),e.months=Jn(e.months),e.years=Jn(e.years),this}function H1(e,t,n,r){var i=_n(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function G3(e,t){return H1(this,e,t,1)}function $3(e,t){return H1(this,e,t,-1)}function wp(e){return e<0?Math.floor(e):Math.ceil(e)}function W3(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,i,s,o,a,l;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=wp(xd(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,i=rn(e/1e3),r.seconds=i%60,s=rn(i/60),r.minutes=s%60,o=rn(s/60),r.hours=o%24,t+=rn(o/24),l=rn(z1(t)),n+=l,t-=wp(xd(l)),a=rn(n/12),n%=12,r.days=t,r.months=n,r.years=a,this}function z1(e){return e*4800/146097}function xd(e){return e*146097/4800}function H3(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=fn(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+z1(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(xd(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function _r(e){return function(){return this.as(e)}}var Y1=_r("ms"),z3=_r("s"),Y3=_r("m"),X3=_r("h"),Z3=_r("d"),U3=_r("w"),J3=_r("M"),Q3=_r("Q"),K3=_r("y"),q3=Y1;function e6(){return _n(this)}function t6(e){return e=fn(e),this.isValid()?this[e+"s"]():NaN}function Pi(e){return function(){return this.isValid()?this._data[e]:NaN}}var n6=Pi("milliseconds"),r6=Pi("seconds"),i6=Pi("minutes"),s6=Pi("hours"),o6=Pi("days"),a6=Pi("months"),l6=Pi("years");function c6(){return rn(this.days()/7)}var tr=Math.round,$i={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function u6(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function d6(e,t,n,r){var i=_n(e).abs(),s=tr(i.as("s")),o=tr(i.as("m")),a=tr(i.as("h")),l=tr(i.as("d")),c=tr(i.as("M")),u=tr(i.as("w")),d=tr(i.as("y")),f=s<=n.ss&&["s",s]||s<n.s&&["ss",s]||o<=1&&["m"]||o<n.m&&["mm",o]||a<=1&&["h"]||a<n.h&&["hh",a]||l<=1&&["d"]||l<n.d&&["dd",l];return n.w!=null&&(f=f||u<=1&&["w"]||u<n.w&&["ww",u]),f=f||c<=1&&["M"]||c<n.M&&["MM",c]||d<=1&&["y"]||["yy",d],f[2]=t,f[3]=+e>0,f[4]=r,u6.apply(null,f)}function f6(e){return e===void 0?tr:typeof e=="function"?(tr=e,!0):!1}function h6(e,t){return $i[e]===void 0?!1:t===void 0?$i[e]:($i[e]=t,e==="s"&&($i.ss=t-1),!0)}function g6(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=$i,i,s;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},$i,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),i=this.localeData(),s=d6(this,!n,r,i),n&&(s=i.pastFuture(+this,s)),i.postformat(s)}var pu=Math.abs;function Li(e){return(e>0)-(e<0)||+e}function Ac(){if(!this.isValid())return this.localeData().invalidDate();var e=pu(this._milliseconds)/1e3,t=pu(this._days),n=pu(this._months),r,i,s,o,a=this.asSeconds(),l,c,u,d;return a?(r=rn(e/60),i=rn(r/60),e%=60,r%=60,s=rn(n/12),n%=12,o=e?e.toFixed(3).replace(/\.?0+$/,""):"",l=a<0?"-":"",c=Li(this._months)!==Li(a)?"-":"",u=Li(this._days)!==Li(a)?"-":"",d=Li(this._milliseconds)!==Li(a)?"-":"",l+"P"+(s?c+s+"Y":"")+(n?c+n+"M":"")+(t?u+t+"D":"")+(i||r||e?"T":"")+(i?d+i+"H":"")+(r?d+r+"M":"")+(e?d+o+"S":"")):"P0D"}var Se=Mc.prototype;Se.isValid=aR;Se.abs=j3;Se.add=G3;Se.subtract=$3;Se.as=H3;Se.asMilliseconds=Y1;Se.asSeconds=z3;Se.asMinutes=Y3;Se.asHours=X3;Se.asDays=Z3;Se.asWeeks=U3;Se.asMonths=J3;Se.asQuarters=Q3;Se.asYears=K3;Se.valueOf=q3;Se._bubble=W3;Se.clone=e6;Se.get=t6;Se.milliseconds=n6;Se.seconds=r6;Se.minutes=i6;Se.hours=s6;Se.days=o6;Se.weeks=c6;Se.months=a6;Se.years=l6;Se.humanize=g6;Se.toISOString=Ac;Se.toString=Ac;Se.toJSON=Ac;Se.locale=D1;Se.localeData=T1;Se.toIsoString=dn("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Ac);Se.lang=F1;q("X",0,0,"unix");q("x",0,0,"valueOf");U("x",wc);U("X",TA);Ge("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)});Ge("x",function(e,t,n){n._d=new Date(we(e))});//! moment.js
77
+ X.version="2.30.1";pA(Qe);X.fn=j;X.min=rR;X.max=iR;X.now=sR;X.utc=zn;X.unix=D3;X.months=T3;X.isDate=Wo;X.locale=Lr;X.invalid=vc;X.duration=_n;X.isMoment=Sn;X.weekdays=L3;X.parseZone=F3;X.localeData=Sr;X.isDuration=Qa;X.monthsShort=N3;X.weekdaysMin=B3;X.defineLocale=Yf;X.updateLocale=Fk;X.locales=Tk;X.weekdaysShort=V3;X.normalizeUnits=fn;X.relativeTimeRounding=f6;X.relativeTimeThreshold=h6;X.calendarFormat=RR;X.prototype=j;X.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const p6=({seconds:e,pauseOnMount:t=!1,startDateTime:n,runningTime:r=!0})=>{const[i,s]=C.useState(e),[o,a]=C.useState(0);C.useEffect(()=>{!n&&typeof e=="number"&&!isNaN(e)&&s(e)},[e,n]),C.useEffect(()=>{let d;if(n){const f=X.utc(n,"YYYY-MM-DD HH:mm:ss");d=setInterval(()=>{const g=X.utc().diff(f,"seconds");a(g)},1e3)}else!t&&typeof i=="number"&&(d=setInterval(()=>{s(f=>typeof f=="number"?f-1:f)},1e3));return()=>{d&&clearInterval(d)}},[n,t,i]);const l=d=>{const f=Math.abs(d),h=Math.floor(f/3600),g=Math.floor(f%3600/60),p=f%60,m=[];return h>0&&m.push(`${h}h`),m.push(`${g}m`),m.push(`${p}s`),m.join(" ")},c=d=>n?"text-green-500 dark:text-green-400 text-[11px]":t?r?"text-[11px] dark:text-gray-300":"text-[12px] dark:text-gray-300":d<0?"text-[10px] text-red-500 dark:text-red-400":d<=60?"text-[10px] text-yellow-500 dark:text-yellow-400":"text-[10px] text-green-500 dark:text-green-400",u=n?o:i;return typeof u!="number"||isNaN(u)?v.jsx("span",{className:"text-gray-400 dark:text-gray-500 text-sm font-mono",children:"-- --"}):v.jsx("span",{className:`font-mono ${c(u)}`,children:l(u)})},m6=({error:e,onRetry:t,fallbackPath:n})=>{const[r,i]=C.useState(!1),[s,o]=C.useState(!1),a=async()=>{o(!0);try{n?window.location.href=n:window.location.reload()}finally{o(!1)}},l=()=>{t()};return C.useEffect(()=>{typeof window<"u"&&window.Sentry&&window.Sentry.captureException(e)},[e]),v.jsx("div",{className:"fixed inset-0 z-[9999] overflow-auto",style:{backgroundColor:"var(--app-bg-color, #ffffff)"},children:v.jsx("div",{className:"flex items-center justify-center min-h-screen w-full p-4 sm:p-8 font-sans",children:v.jsxs("div",{className:"shadow-md dark:shadow-lg rounded-lg p-6 sm:p-10 max-w-xl w-full text-center focus:outline-none my-8",style:{backgroundColor:"var(--bg-color)",border:"1px solid var(--border-color)"},children:[v.jsxs("div",{className:"mb-8",children:[v.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full mb-5",style:{backgroundColor:"rgba(255, 101, 3, 0.1)",color:"var(--brand-orange)"},children:v.jsx(Pf,{size:32})}),v.jsx("h2",{className:"text-xl font-semibold mb-3 leading-snug",style:{color:"var(--text-color)"},children:"Something went wrong"}),v.jsx("p",{className:"text-base leading-relaxed max-w-md mx-auto",style:{color:"var(--secondary-text-color)"},children:"An unexpected error occurred. Please try refreshing the page"})]}),v.jsxs("div",{className:"flex flex-wrap justify-center gap-3 mb-8",children:[v.jsxs("button",{className:"bg-brand-primary inline-flex items-center justify-center gap-2 px-5 py-3 rounded-md font-medium text-sm transition-all duration-150 min-w-[120px] focus:outline-none disabled:opacity-65 disabled:cursor-not-allowed disabled:pointer-events-none",onClick:l,disabled:s,children:[v.jsx(rA,{size:16,className:s?"animate-spin ":""}),"Try Again"]}),v.jsxs("button",{className:"inline-flex items-center justify-center gap-2 px-5 py-3 rounded-md font-medium text-sm transition-all duration-150 min-w-[120px] focus:outline-none disabled:opacity-65 disabled:cursor-not-allowed disabled:pointer-events-none",style:{backgroundColor:"var(--hover-bg-color)",color:"var(--text-color)"},onMouseEnter:c=>{c.currentTarget.style.backgroundColor="var(--border-color)"},onMouseLeave:c=>{c.currentTarget.style.backgroundColor="var(--hover-bg-color)"},onClick:a,disabled:s,children:[v.jsx(XE,{size:16}),n?"Go to Home":"Refresh Page"]})]}),process.env.NODE_ENV!=="production"&&v.jsxs("div",{className:"pt-6",style:{borderTop:"1px solid var(--border-color)"},children:[v.jsxs("button",{className:"inline-flex items-center gap-2 text-sm font-medium py-2 px-3 rounded transition-colors",style:{color:"var(--brand-orange)"},onMouseEnter:c=>{c.currentTarget.style.backgroundColor="var(--hover-bg-color)"},onMouseLeave:c=>{c.currentTarget.style.backgroundColor="transparent"},onClick:()=>i(!r),children:[r?v.jsx(tA,{size:16}):v.jsx(nA,{size:16}),r?"Hide":"Show"," Error Details"]}),r&&v.jsxs("div",{className:"mt-5 text-left p-5 rounded-md max-h-[400px] overflow-auto",style:{backgroundColor:"var(--hover-bg-color)",border:"1px solid var(--border-color)"},children:[v.jsxs("div",{className:"mb-4 flex flex-col gap-2",children:[v.jsx("span",{className:"font-semibold text-sm",style:{color:"var(--text-color)"},children:"Error Message:"}),v.jsx("code",{className:"text-sm leading-snug break-words p-2 rounded font-mono",style:{backgroundColor:"rgba(239, 68, 68, 0.1)",color:"#dc2626",border:"1px solid rgba(239, 68, 68, 0.3)"},children:e.message})]}),v.jsxs("div",{className:"mb-4 flex flex-col gap-2",children:[v.jsx("span",{className:"font-semibold text-sm",style:{color:"var(--text-color)"},children:"Timestamp:"}),v.jsx("span",{className:"text-sm leading-snug break-words",style:{color:"var(--text-color)"},children:new Date().toLocaleString()})]}),e.stack&&v.jsxs("div",{className:"mb-0 flex flex-col gap-2",children:[v.jsx("span",{className:"font-semibold text-sm",style:{color:"var(--text-color)"},children:"Stack Trace:"}),v.jsx("pre",{className:"text-sm leading-snug break-words p-4 rounded font-mono text-xs leading-relaxed overflow-auto whitespace-pre-wrap max-h-[300px]",style:{backgroundColor:"var(--brand-dark)",color:"#f9fafb",border:"1px solid var(--border-color)"},children:e.stack})]})]})]})]})})})};class X1 extends C.Component{constructor(t){super(t),this.handleReset=()=>{this.setState({hasError:!1,error:null,errorInfo:null}),this.props.onReset&&this.props.onReset()},this.state={hasError:!1,error:null,errorInfo:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){typeof window<"u"&&window.Sentry&&window.Sentry.captureException(t),this.setState({errorInfo:{componentStack:n.componentStack||""}}),this.props.onError&&this.props.onError(t,{componentStack:n.componentStack||""})}render(){return this.state.hasError&&this.state.error?v.jsx(m6,{error:this.state.error,onRetry:this.handleReset,fallbackPath:this.props.fallbackPath}):this.props.children}}class b6 extends C.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){var r,i;console.error("Component error:",t,n),(i=(r=this.props).onError)==null||i.call(r,t,n),typeof window<"u"&&window.Sentry&&window.Sentry.captureException(t,{contexts:{react:{componentStack:n.componentStack}}})}render(){var t;return this.state.hasError?this.props.fallback?this.props.fallback:v.jsxs("div",{className:"p-4 rounded",style:{backgroundColor:"rgba(239, 68, 68, 0.1)",border:"1px solid rgba(239, 68, 68, 0.3)"},children:[v.jsx("p",{className:"text-sm",style:{color:"#dc2626"},children:"Something went wrong displaying this component."}),process.env.NODE_ENV==="development"&&v.jsxs("details",{className:"mt-2",children:[v.jsx("summary",{className:"cursor-pointer text-xs",style:{color:"var(--text-color)"},children:"Error details"}),v.jsx("pre",{className:"mt-1 text-xs overflow-auto",style:{color:"var(--text-color)"},children:(t=this.state.error)==null?void 0:t.toString()})]})]}):this.props.children}}const v6=({used:e,max:t,resourceName:n,warningThreshold:r=5,className:i=""})=>{const s=t-e;if(!t)return null;const a=s<=0?"exhausted":s<=r?"warning":"available",l=()=>{switch(a){case"exhausted":return{backgroundColor:"var(--status-error-bg)",color:"var(--status-error-text)",border:"1px solid var(--status-error-border)"};case"warning":return{backgroundColor:"var(--status-warning-bg)",color:"var(--status-warning-text)",border:"1px solid var(--status-warning-border)"};case"available":default:return{backgroundColor:"var(--status-success-bg)",color:"var(--status-success-text)",border:"1px solid var(--status-success-border)"}}};return v.jsxs("div",{className:`ml-2 px-2 py-1 rounded flex items-center gap-1 text-xs font-semibold ${i}`,style:l(),children:[v.jsxs("span",{children:[e," / ",t," (",s," available)"]}),a==="exhausted"&&v.jsxs("span",{className:"ml-2 font-semibold",children:["No more ",n," can be added."]})]})},x6=({displayText:e,hasMoreData:t,restDataLength:n,onClick:r,isTruncatedData:i,tooltipText:s="",customButtonEl:o})=>v.jsxs("div",{className:"flex gap-2 items-center",children:[v.jsx("div",{children:v.jsx("span",{children:v.jsx(ic,{text:s,isVisible:i,children:e})})}),t&&v.jsx("button",{className:"rounded px-[3px] flex items-center justify-center cursor-pointer transition border-brand-primary text-brand-primary hover:bg-brand-surface-subtle",style:{border:"1px solid var(--brand-orange)",color:"var(--brand-orange)"},onMouseEnter:a=>a.currentTarget.style.backgroundColor="var(--brand-light)",onMouseLeave:a=>a.currentTarget.style.backgroundColor="transparent",onClick:a=>{a.stopPropagation(),r()},children:o||v.jsx(v.Fragment,{children:v.jsxs("span",{className:"text-xs",children:["+",n&&Number(n)>0?n:""]})})})]}),ui={low:{label:"Low"},medium:{min:40,label:"Medium"},high:{min:70,label:"High"},critical:{min:90,label:"Critical"}},y6={low:{level:"low",label:ui.low.label,color:"text-white",backgroundColor:"bg-green-500"},medium:{level:"medium",label:ui.medium.label,color:"text-white",backgroundColor:"bg-yellow-500"},high:{level:"high",label:ui.high.label,color:"text-white",backgroundColor:"bg-orange-500"},critical:{level:"critical",label:ui.critical.label,color:"text-white",backgroundColor:"bg-red-500"}},th=e=>e>=ui.critical.min?"critical":e>=ui.high.min?"high":e>=ui.medium.min?"medium":"low",Z1=e=>{const t=th(e);return y6[t]},C6=e=>{const t=th(e);return t==="high"||t==="critical"},w6=({score:e,customStyles:t})=>{const{label:n,backgroundColor:r,color:i}=Z1(e);return v.jsx("span",{className:Zt("px-2 py-1 rounded text-xs font-semibold",r,i,t),children:n})},U1=(e={})=>{const{fallbackPath:t="/assets",basePath:n=e.basePath||t}=e;return{getAssetPath:C.useMemo(()=>i=>{if(!i)return n;const s=i.startsWith("/")?i.slice(1):i;return`${n.endsWith("/")?n.slice(0,-1):n}/${s}`},[n]),basePath:n}},J1=e=>{const{getAssetPath:t}=U1(),n=C.useMemo(()=>!e||e.trim()===""?t("files/unknown_file.svg"):t(`files/${e.toLowerCase()}.svg`),[e,t]),r=C.useMemo(()=>t("files/unknown_file.svg"),[t]);return{iconPath:n,fallbackPath:r}},S6=({category:e,className:t="w-3 h-4 object-cover"})=>{const{iconPath:n,fallbackPath:r}=J1(e),[i,s]=C.useState(!1),o=C.useCallback(()=>{s(!0)},[]),a=i?r:n;return v.jsx("img",{src:a,alt:e||"unknown file",className:t,onError:o})},_6=({message:e="No Active Attributes Present!"})=>v.jsxs("div",{className:"flex gap-2 align-center p-2 text-xs font-medium rounded-sm bg-yellow-200 text-yellow-700 w-full",children:[v.jsx(Pf,{role:"img",size:14}),v.jsx("span",{children:e})]}),I6=({icon:e,title:t="Select Country"})=>{const n=C.useRef(null),[r,i]=C.useState(!1);C.useEffect(()=>{const o=n.current;o&&i(o.scrollWidth>o.clientWidth)},[t]);const s=v.jsx("p",{ref:n,className:"overflow-hidden text-ellipsis whitespace-nowrap max-w-36",children:t});return v.jsxs("div",{className:"px-2 border border-gray-300 dark:border-gray-600 rounded bg-white dark:bg-gray-800 text-gray-400 dark:text-gray-300 text-sm text-center h-[30px] flex items-center justify-center",children:[v.jsx("img",{src:e,alt:t,className:"w-4 h-4 mr-2 rounded-full object-cover"}),r?v.jsx(ic,{text:t,children:s}):s]})},M6=({isOpen:e,onDismiss:t,summaryData:n,errors:r=[],onDownload:i,onRetry:s,title:o,dataType:a})=>{if(C.useEffect(()=>{if(!e)return;const d=f=>{f.key==="Escape"&&t()};return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[e,t]),!e)return null;const l=n.total>0?n.success/n.total*100:0,[c,u]=C.useState(!0);return v.jsx("div",{role:"dialog",className:"fixed inset-0 z-[1000] flex items-center justify-center bg-black/40",onClick:t,children:v.jsxs("div",{className:"relative w-full min-w-[320px] max-w-[600px] rounded-lg shadow-2xl",style:{backgroundColor:"var(--bg-color)",border:"1px solid var(--border-color)"},onClick:d=>d.stopPropagation(),children:[v.jsx("button",{onClick:t,"aria-label":"Close",className:"absolute right-4 top-4 text-xl",style:{color:"var(--secondary-text-color)"},onMouseEnter:d=>d.currentTarget.style.color="var(--text-color)",onMouseLeave:d=>d.currentTarget.style.color="var(--secondary-text-color)",children:"×"}),v.jsxs("div",{className:"p-4 border-b",style:{borderColor:"var(--border-color)"},children:[v.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[v.jsx(uA,{className:"text-blue-500",size:20}),v.jsx("h3",{className:"text-lg font-semibold",style:{color:"var(--text-color)"},children:o??"Result"})]}),v.jsxs("div",{className:"grid grid-cols-3 gap-4 mb-4",children:[v.jsxs("div",{className:"text-center",children:[v.jsx("div",{className:"text-2xl font-bold",style:{color:"var(--text-color)"},children:n.total}),v.jsx("div",{className:"text-sm",style:{color:"var(--secondary-text-color)"},children:"Total"})]}),v.jsxs("div",{className:"text-center",children:[v.jsx("div",{className:"text-2xl font-bold text-green-600 dark:text-green-400",children:n.success}),v.jsx("div",{className:"text-sm",style:{color:"var(--secondary-text-color)"},children:"Success"})]}),v.jsxs("div",{className:"text-center",children:[v.jsx("div",{className:"text-2xl font-bold text-red-600 dark:text-red-400",children:n.failed}),v.jsx("div",{className:"text-sm",style:{color:"var(--secondary-text-color)"},children:"Failed"})]})]}),v.jsx("div",{className:"w-full rounded-full h-2",style:{backgroundColor:"var(--brand-light)"},children:v.jsx("div",{className:"bg-green-600 dark:bg-green-400 h-2 rounded-full transition-all duration-500",style:{width:`${l}%`}})}),v.jsxs("div",{className:"text-sm font-bold mt-2",style:{color:"var(--secondary-text-color)"},children:[l.toFixed(0),"% successful"]})]}),r.length>0&&v.jsxs("div",{className:"p-4 border-b",style:{borderColor:"var(--border-color)"},children:[v.jsxs("button",{onClick:()=>u(!c),className:"flex items-center justify-between w-full text-left hover:bg-opacity-50 rounded p-2 -m-2 transition-colors",style:{backgroundColor:"transparent"},onMouseEnter:d=>d.currentTarget.style.backgroundColor="var(--hover-bg-color)",onMouseLeave:d=>d.currentTarget.style.backgroundColor="transparent",children:[v.jsxs("h4",{className:"text-md font-medium flex items-center gap-2",style:{color:"var(--text-color)"},children:[v.jsx(iA,{className:"text-amber-500"}),"Error Details (",r.length," issues)"]}),c?v.jsx(lA,{style:{color:"var(--secondary-text-color)"}}):v.jsx(aA,{style:{color:"var(--secondary-text-color)"}})]}),c&&v.jsx("div",{className:"mt-4 space-y-2 max-h-60 overflow-y-auto",children:r.map(d=>v.jsxs("div",{className:"p-3 rounded text-sm",style:{backgroundColor:"rgba(239, 68, 68, 0.1)",border:"1px solid rgba(239, 68, 68, 0.3)"},children:[v.jsxs("div",{className:"font-medium",style:{color:"#dc2626"},children:[d.field?`${d.field}: `:"",d.error]}),d.value&&v.jsxs("div",{className:"mt-1 text-xs",style:{color:"var(--secondary-text-color)"},children:["Value: ",d.value]})]},d.id))})]}),v.jsxs("div",{className:"p-4 flex flex-wrap justify-end gap-2",children:[i&&v.jsxs("button",{onClick:i,className:"px-4 py-2 rounded-md flex items-center gap-2 transition-colors",style:{backgroundColor:"var(--hover-bg-color)",color:"var(--text-color)",border:"1px solid var(--border-color)"},onMouseEnter:d=>d.currentTarget.style.backgroundColor="var(--brand-light)",onMouseLeave:d=>d.currentTarget.style.backgroundColor="var(--hover-bg-color)",children:[v.jsx(Il,{}),"Download Errors"]}),s&&v.jsxs("button",{onClick:s,className:"px-4 py-2 rounded-md flex items-center gap-2 bg-brand-primary text-white hover:bg-opacity-90 transition-colors",children:[v.jsx(dA,{}),"Retry"]}),v.jsx("button",{onClick:t,className:"px-4 py-2 rounded-md transition-colors",style:{backgroundColor:"var(--hover-bg-color)",color:"var(--text-color)",border:"1px solid var(--border-color)"},onMouseEnter:d=>d.currentTarget.style.backgroundColor="var(--brand-light)",onMouseLeave:d=>d.currentTarget.style.backgroundColor="var(--hover-bg-color)",children:"Close"})]})]})})},E6=({isVisible:e,currentStep:t,error:n,onDismiss:r})=>{if(!e)return null;const i=(s,o)=>o?v.jsx(oA,{className:"w-6 h-6 text-green-600 dark:text-green-400"}):s?v.jsx("div",{className:"animate-spin rounded-full h-6 w-6",style:{borderWidth:"2px",borderStyle:"solid",borderColor:"var(--brand-light)",borderTopColor:"var(--brand-orange)"}}):v.jsx("div",{className:"w-6 h-6 border-2 rounded-full",style:{borderColor:"var(--border-color)"}});return v.jsx("div",{className:"fixed inset-0 bg-black/80 backdrop-blur-sm flex items-center justify-center z-50",children:v.jsxs("div",{className:"rounded-lg shadow-2xl p-8 max-w-md w-full mx-4 relative",style:{backgroundColor:"var(--bg-color)",border:"1px solid var(--border-color)"},children:[n&&r&&v.jsx("button",{onClick:r,className:"absolute top-4 right-4 p-2 transition-colors",style:{color:"var(--secondary-text-color)"},onMouseEnter:s=>s.currentTarget.style.color="var(--text-color)",onMouseLeave:s=>s.currentTarget.style.color="var(--secondary-text-color)",children:v.jsx(fA,{className:"w-5 h-5"})}),v.jsxs("div",{className:"text-center mb-8",children:[v.jsx("div",{className:"flex items-center justify-center mb-4",children:v.jsx(Il,{className:"w-12 h-12 text-brand-primary"})}),v.jsx("h2",{className:"text-2xl font-bold mb-2",style:{color:"var(--text-color)"},children:"Installing Update"}),v.jsx("p",{style:{color:"var(--secondary-text-color)"},children:"Please wait while we install the update safely"})]}),n&&v.jsxs("div",{className:"mb-6 p-4 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg",children:[v.jsxs("div",{className:"flex items-center space-x-2",children:[v.jsx(pp,{className:"w-5 h-5 text-red-600 dark:text-red-400"}),v.jsx("p",{className:"text-sm text-red-700 dark:text-red-300 font-medium",children:"Installation Failed"})]}),v.jsx("p",{className:"text-sm text-red-600 dark:text-red-400 mt-1",children:n}),v.jsx("div",{className:"mt-3 flex space-x-2",children:v.jsx("button",{onClick:r,className:"px-3 py-1.5 bg-red-600 text-white text-sm rounded hover:bg-red-700 transition-colors",children:"Close"})})]}),v.jsxs("div",{className:"space-y-4",children:[v.jsxs("div",{className:"flex items-center space-x-3",children:[i(t==="backup",t==="install"||t==="complete"),v.jsxs("div",{className:"flex-1",children:[v.jsxs("div",{className:"flex items-center space-x-2",children:[v.jsx(cA,{className:"w-4 h-4",style:{color:"var(--secondary-text-color)"}}),v.jsx("span",{className:"text-sm font-medium",style:{color:"var(--text-color)"},children:"Database Backup"})]}),v.jsx("p",{className:"text-xs",style:{color:"var(--secondary-text-color)"},children:t==="backup"?"Creating secure backup...":t==="install"||t==="complete"?"Backup completed":"Pending"})]})]}),v.jsxs("div",{className:"flex items-center space-x-3",children:[i(t==="install",t==="complete"),v.jsxs("div",{className:"flex-1",children:[v.jsxs("div",{className:"flex items-center space-x-2",children:[v.jsx(Il,{className:"w-4 h-4",style:{color:"var(--secondary-text-color)"}}),v.jsx("span",{className:"text-sm font-medium",style:{color:"var(--text-color)"},children:"Update Installation"})]}),v.jsx("p",{className:"text-xs",style:{color:"var(--secondary-text-color)"},children:t==="install"?"Installing update...":t==="complete"?"Installation completed":"Pending"})]})]})]}),v.jsx("div",{className:"mt-6",children:v.jsx("div",{className:"w-full rounded-full h-2",style:{backgroundColor:"var(--brand-light)"},children:v.jsx("div",{className:"h-2 rounded-full transition-all duration-500",style:{width:t==="backup"?"50%":"100%",backgroundColor:"var(--brand-orange)"}})})}),v.jsx("div",{className:"mt-6 p-3 bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg",children:v.jsxs("div",{className:"flex items-start space-x-2",children:[v.jsx(pp,{className:"w-4 h-4 text-yellow-600 dark:text-yellow-400 mt-0.5 flex-shrink-0"}),v.jsxs("p",{className:"text-xs text-yellow-700 dark:text-yellow-300",children:[v.jsx("strong",{children:"Important:"})," Do not close the application during this process. The app will restart automatically after installation."]})]})})]})})},A6=({confidenceData:e,children:t,position:n="top"})=>{const[r,i]=C.useState(!1),[s,o]=C.useState({}),[a,l]=C.useState({}),c=C.useRef(null),u=C.useRef(null);C.useEffect(()=>{if(!r||!c.current)return;const p=c.current.getBoundingClientRect(),m=u.current;if(!m)return;const b=m.getBoundingClientRect(),x=window.innerWidth,y=window.innerHeight;let _=n,w=0,E=0,M=0,S=0;switch(n==="top"&&p.top-b.height<10?_="bottom":n==="bottom"&&p.bottom+b.height>y-10?_="top":n==="left"&&p.left-b.width<10?_="right":n==="right"&&p.right+b.width>x-10&&(_="left"),_){case"top":w=p.top-b.height-8,E=p.left+p.width/2-b.width/2,M=b.height-4,S=b.width/2-5;break;case"bottom":w=p.bottom+8,E=p.left+p.width/2-b.width/2,M=-5,S=b.width/2-5;break;case"left":w=p.top+p.height/2-b.height/2,E=p.left-b.width-8,M=b.height/2-5,S=b.width-4;break;case"right":w=p.top+p.height/2-b.height/2,E=p.right+8,M=b.height/2-5,S=-5;break}o({top:`${w}px`,left:`${E}px`,opacity:1,visibility:"visible"}),l({top:`${M}px`,left:`${S}px`,transform:"rotate(45deg)"})},[r,n]);const d=p=>p>=.8?"text-green-600":p>=.6?"text-yellow-600":"text-red-600",f=p=>p>=.8?"High":p>=.6?"Medium":"Low",h=p=>{switch(p){case"column_name":return"Based on column name analysis";case"sample_data":return"Based on sample data analysis";default:return"Confidence score available"}},g=()=>{const{confidence_score:p,classification_reason:m,sample_data_preview:b,confidence_reason:x}=e;return v.jsxs("div",{className:"confidence-tooltip-content",children:[v.jsx("div",{className:"confidence-tooltip-header",children:v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx(zv,{className:"h-4 w-4 text-blue-500"}),v.jsx("span",{className:"font-semibold",style:{color:"var(--text-color)"},children:"Classification Details"})]})}),v.jsxs("div",{className:"confidence-tooltip-body",children:[p!==void 0&&v.jsx("div",{className:"confidence-score-section",children:v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsx("span",{className:"text-sm font-medium",style:{color:"var(--secondary-text-color)"},children:"Confidence Score:"}),v.jsxs("span",{className:`text-sm font-bold ${d(p)}`,children:[f(p)," (",(p*100).toFixed(0),"%)"]})]})}),v.jsx("div",{className:"classification-reason-section",children:v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsx("span",{className:"text-sm font-medium",style:{color:"var(--secondary-text-color)"},children:"Classification Method:"}),v.jsx("span",{className:"text-sm",style:{color:"var(--text-color)"},children:h(m)})]})}),m==="sample_data"&&b&&v.jsxs("div",{className:"sample-data-section",children:[v.jsx("div",{className:"text-sm font-medium mb-1",style:{color:"var(--text-color)"},children:"Sample Data Preview:"}),v.jsx("div",{className:"text-xs p-2 rounded border max-w-xs",style:{color:"var(--text-color)",backgroundColor:"var(--hover-bg-color)",borderColor:"var(--border-color)"},children:v.jsx("div",{className:"truncate",title:b,children:b})})]}),x&&v.jsxs("div",{className:"confidence-reason-section",children:[v.jsx("div",{className:"text-sm font-medium mb-1",style:{color:"var(--text-color)"},children:"Additional Details:"}),v.jsx("div",{className:"text-xs",style:{color:"var(--secondary-text-color)"},children:x})]})]})]})};return v.jsxs("div",{className:"confidence-tooltip-wrapper",ref:c,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),children:[t,r&&Vn.createPortal(v.jsxs("div",{ref:u,className:"confidence-tooltip",style:s,children:[g(),v.jsx("span",{className:"confidence-tooltip-arrow",style:a})]}),document.body)]})},k6=({isOpen:e,imagePath:t,imageSrc:n,loadImageFromPath:r,onClose:i})=>{const[s,o]=C.useState(""),[a,l]=C.useState(!1),[c,u]=C.useState("");if(qd(e),C.useEffect(()=>{if(!e){o(""),u(""),l(!1);return}if(n){o(n),u(""),l(!1);return}t?(async()=>{l(!0),u(""),o("");try{if(r){const h=await r(t);o(h)}else o(t)}catch(h){const g=h instanceof Error?h.message:"Failed to load image";u(g),console.error("[ImagePreviewModal] Failed to load image:",h)}finally{l(!1)}})():u("No image source provided")},[e,t,n,r]),C.useEffect(()=>{if(!e)return;const f=h=>{h.key==="Escape"&&i()};return window.addEventListener("keydown",f),()=>window.removeEventListener("keydown",f)},[e,i]),!e)return null;const d=v.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex justify-center items-center z-[40] p-4 overflow-y-auto",onClick:i,children:v.jsxs("div",{className:"relative py-4 rounded-lg shadow-lg w-[95%] sm:w-[90%] md:w-[85%] lg:w-auto max-w-screen-2xl min-w-[320px] sm:min-w-[400px]",style:{backgroundColor:"var(--bg-color)",border:"1px solid var(--border-color)"},onClick:f=>f.stopPropagation(),children:[v.jsx("div",{className:"px-4",children:v.jsxs("div",{className:"flex justify-between items-center",children:[v.jsx("h2",{className:"text-lg font-semibold",style:{color:"var(--text-color)"},children:"Image Preview"}),v.jsx("button",{onClick:i,className:"text-brand-primary hover:opacity-80 transition-opacity","aria-label":"Close",children:v.jsx(Bm,{size:16})})]})}),v.jsxs("div",{className:"px-4 mt-4 pb-4",children:[a&&v.jsx("div",{className:"flex justify-center items-center py-8",style:{color:"var(--text-color)"},children:v.jsx("span",{children:"Loading image..."})}),c&&v.jsx("div",{className:"flex justify-center items-center py-8",style:{color:"var(--text-color)"},children:v.jsxs("div",{className:"text-center",children:[v.jsx("p",{className:"text-red-500 mb-2",children:"Error loading image"}),v.jsx("p",{className:"text-sm",style:{color:"var(--secondary-text-color)"},children:c})]})}),!a&&!c&&s&&v.jsx("div",{className:"flex justify-center items-center max-h-[70vh] overflow-auto",children:v.jsx("img",{src:s,alt:"Preview",className:"max-w-full max-h-[70vh] object-contain rounded",style:{border:"1px solid var(--border-color)"},onError:()=>u("Failed to load image")})})]})]})});return Vn.createPortal(d,document.getElementById("modal-root")||document.body)};var Q1={exports:{}};/* @license
78
+ Papa Parse
79
+ v5.5.3
80
+ https://github.com/mholt/PapaParse
81
+ License: MIT
82
+ */(function(e,t){((n,r)=>{e.exports=r()})(pw,function n(){var r=typeof self<"u"?self:typeof window<"u"?window:r!==void 0?r:{},i,s=!r.document&&!!r.postMessage,o=r.IS_PAPA_WORKER||!1,a={},l=0,c={};function u(S){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},(function(I){var A=w(I);A.chunkSize=parseInt(A.chunkSize),I.step||I.chunk||(A.chunkSize=null),this._handle=new p(A),(this._handle.streamer=this)._config=A}).call(this,S),this.parseChunk=function(I,A){var k=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<k){let N=this._config.newline;N||(D=this._config.quoteChar||'"',N=this._handle.guessLineEndings(I,D)),I=[...I.split(N).slice(k)].join(N)}this.isFirstChunk&&M(this._config.beforeFirstChunk)&&(D=this._config.beforeFirstChunk(I))!==void 0&&(I=D),this.isFirstChunk=!1,this._halted=!1;var k=this._partialLine+I,D=(this._partialLine="",this._handle.parse(k,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(I=D.meta.cursor,k=(this._finished||(this._partialLine=k.substring(I-this._baseIndex),this._baseIndex=I),D&&D.data&&(this._rowCount+=D.data.length),this._finished||this._config.preview&&this._rowCount>=this._config.preview),o)r.postMessage({results:D,workerId:c.WORKER_ID,finished:k});else if(M(this._config.chunk)&&!A){if(this._config.chunk(D,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=D=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(D.data),this._completeResults.errors=this._completeResults.errors.concat(D.errors),this._completeResults.meta=D.meta),this._completed||!k||!M(this._config.complete)||D&&D.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),k||D&&D.meta.paused||this._nextChunk(),D}this._halted=!0},this._sendError=function(I){M(this._config.error)?this._config.error(I):o&&this._config.error&&r.postMessage({workerId:c.WORKER_ID,error:I,finished:!1})}}function d(S){var I;(S=S||{}).chunkSize||(S.chunkSize=c.RemoteChunkSize),u.call(this,S),this._nextChunk=s?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(A){this._input=A,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(I=new XMLHttpRequest,this._config.withCredentials&&(I.withCredentials=this._config.withCredentials),s||(I.onload=E(this._chunkLoaded,this),I.onerror=E(this._chunkError,this)),I.open(this._config.downloadRequestBody?"POST":"GET",this._input,!s),this._config.downloadRequestHeaders){var A,k=this._config.downloadRequestHeaders;for(A in k)I.setRequestHeader(A,k[A])}var D;this._config.chunkSize&&(D=this._start+this._config.chunkSize-1,I.setRequestHeader("Range","bytes="+this._start+"-"+D));try{I.send(this._config.downloadRequestBody)}catch(N){this._chunkError(N.message)}s&&I.status===0&&this._chunkError()}},this._chunkLoaded=function(){I.readyState===4&&(I.status<200||400<=I.status?this._chunkError():(this._start+=this._config.chunkSize||I.responseText.length,this._finished=!this._config.chunkSize||this._start>=(A=>(A=A.getResponseHeader("Content-Range"))!==null?parseInt(A.substring(A.lastIndexOf("/")+1)):-1)(I),this.parseChunk(I.responseText)))},this._chunkError=function(A){A=I.statusText||A,this._sendError(new Error(A))}}function f(S){(S=S||{}).chunkSize||(S.chunkSize=c.LocalChunkSize),u.call(this,S);var I,A,k=typeof FileReader<"u";this.stream=function(D){this._input=D,A=D.slice||D.webkitSlice||D.mozSlice,k?((I=new FileReader).onload=E(this._chunkLoaded,this),I.onerror=E(this._chunkError,this)):I=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var D=this._input,N=(this._config.chunkSize&&(N=Math.min(this._start+this._config.chunkSize,this._input.size),D=A.call(D,this._start,N)),I.readAsText(D,this._config.encoding));k||this._chunkLoaded({target:{result:N}})},this._chunkLoaded=function(D){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(D.target.result)},this._chunkError=function(){this._sendError(I.error)}}function h(S){var I;u.call(this,S=S||{}),this.stream=function(A){return I=A,this._nextChunk()},this._nextChunk=function(){var A,k;if(!this._finished)return A=this._config.chunkSize,I=A?(k=I.substring(0,A),I.substring(A)):(k=I,""),this._finished=!I,this.parseChunk(k)}}function g(S){u.call(this,S=S||{});var I=[],A=!0,k=!1;this.pause=function(){u.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){u.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(D){this._input=D,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){k&&I.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),I.length?this.parseChunk(I.shift()):A=!0},this._streamData=E(function(D){try{I.push(typeof D=="string"?D:D.toString(this._config.encoding)),A&&(A=!1,this._checkIsFinished(),this.parseChunk(I.shift()))}catch(N){this._streamError(N)}},this),this._streamError=E(function(D){this._streamCleanUp(),this._sendError(D)},this),this._streamEnd=E(function(){this._streamCleanUp(),k=!0,this._streamData("")},this),this._streamCleanUp=E(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function p(S){var I,A,k,D,N=Math.pow(2,53),V=-N,P=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,T=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,L=this,R=0,O=0,$=!1,Y=!1,W=[],G={data:[],errors:[],meta:{}};function se(ne){return S.skipEmptyLines==="greedy"?ne.join("").trim()==="":ne.length===1&&ne[0].length===0}function ce(){if(G&&k&&(Ye("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+c.DefaultDelimiter+"'"),k=!1),S.skipEmptyLines&&(G.data=G.data.filter(function(Q){return!se(Q)})),me()){let Q=function(H,$e){M(S.transformHeader)&&(H=S.transformHeader(H,$e)),W.push(H)};if(G)if(Array.isArray(G.data[0])){for(var ne=0;me()&&ne<G.data.length;ne++)G.data[ne].forEach(Q);G.data.splice(0,1)}else G.data.forEach(Q)}function he(Q,H){for(var $e=S.header?{}:[],J=0;J<Q.length;J++){var xe=J,be=Q[J],be=((Ct,ue)=>(We=>(S.dynamicTypingFunction&&S.dynamicTyping[We]===void 0&&(S.dynamicTyping[We]=S.dynamicTypingFunction(We)),(S.dynamicTyping[We]||S.dynamicTyping)===!0))(Ct)?ue==="true"||ue==="TRUE"||ue!=="false"&&ue!=="FALSE"&&((We=>{if(P.test(We)&&(We=parseFloat(We),V<We&&We<N))return 1})(ue)?parseFloat(ue):T.test(ue)?new Date(ue):ue===""?null:ue):ue)(xe=S.header?J>=W.length?"__parsed_extra":W[J]:xe,be=S.transform?S.transform(be,xe):be);xe==="__parsed_extra"?($e[xe]=$e[xe]||[],$e[xe].push(be)):$e[xe]=be}return S.header&&(J>W.length?Ye("FieldMismatch","TooManyFields","Too many fields: expected "+W.length+" fields but parsed "+J,O+H):J<W.length&&Ye("FieldMismatch","TooFewFields","Too few fields: expected "+W.length+" fields but parsed "+J,O+H)),$e}var Te;G&&(S.header||S.dynamicTyping||S.transform)&&(Te=1,!G.data.length||Array.isArray(G.data[0])?(G.data=G.data.map(he),Te=G.data.length):G.data=he(G.data,0),S.header&&G.meta&&(G.meta.fields=W),O+=Te)}function me(){return S.header&&W.length===0}function Ye(ne,he,Te,Q){ne={type:ne,code:he,message:Te},Q!==void 0&&(ne.row=Q),G.errors.push(ne)}M(S.step)&&(D=S.step,S.step=function(ne){G=ne,me()?ce():(ce(),G.data.length!==0&&(R+=ne.data.length,S.preview&&R>S.preview?A.abort():(G.data=G.data[0],D(G,L))))}),this.parse=function(ne,he,Te){var Q=S.quoteChar||'"',Q=(S.newline||(S.newline=this.guessLineEndings(ne,Q)),k=!1,S.delimiter?M(S.delimiter)&&(S.delimiter=S.delimiter(ne),G.meta.delimiter=S.delimiter):((Q=((H,$e,J,xe,be)=>{var Ct,ue,We,In;be=be||[","," ","|",";",c.RECORD_SEP,c.UNIT_SEP];for(var Zn=0;Zn<be.length;Zn++){for(var Dt,Mr=be[Zn],at=0,Ve=0,tt=0,dt=(We=void 0,new b({comments:xe,delimiter:Mr,newline:$e,preview:10}).parse(H)),Kt=0;Kt<dt.data.length;Kt++)J&&se(dt.data[Kt])?tt++:(Dt=dt.data[Kt].length,Ve+=Dt,We===void 0?We=Dt:0<Dt&&(at+=Math.abs(Dt-We),We=Dt));0<dt.data.length&&(Ve/=dt.data.length-tt),(ue===void 0||at<=ue)&&(In===void 0||In<Ve)&&1.99<Ve&&(ue=at,Ct=Mr,In=Ve)}return{successful:!!(S.delimiter=Ct),bestDelimiter:Ct}})(ne,S.newline,S.skipEmptyLines,S.comments,S.delimitersToGuess)).successful?S.delimiter=Q.bestDelimiter:(k=!0,S.delimiter=c.DefaultDelimiter),G.meta.delimiter=S.delimiter),w(S));return S.preview&&S.header&&Q.preview++,I=ne,A=new b(Q),G=A.parse(I,he,Te),ce(),$?{meta:{paused:!0}}:G||{meta:{paused:!1}}},this.paused=function(){return $},this.pause=function(){$=!0,A.abort(),I=M(S.chunk)?"":I.substring(A.getCharIndex())},this.resume=function(){L.streamer._halted?($=!1,L.streamer.parseChunk(I,!0)):setTimeout(L.resume,3)},this.aborted=function(){return Y},this.abort=function(){Y=!0,A.abort(),G.meta.aborted=!0,M(S.complete)&&S.complete(G),I=""},this.guessLineEndings=function(H,Q){H=H.substring(0,1048576);var Q=new RegExp(m(Q)+"([^]*?)"+m(Q),"gm"),Te=(H=H.replace(Q,"")).split("\r"),Q=H.split(`
83
+ `),H=1<Q.length&&Q[0].length<Te[0].length;if(Te.length===1||H)return`
84
+ `;for(var $e=0,J=0;J<Te.length;J++)Te[J][0]===`
85
+ `&&$e++;return $e>=Te.length/2?`\r
86
+ `:"\r"}}function m(S){return S.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function b(S){var I=(S=S||{}).delimiter,A=S.newline,k=S.comments,D=S.step,N=S.preview,V=S.fastMode,P=null,T=!1,L=S.quoteChar==null?'"':S.quoteChar,R=L;if(S.escapeChar!==void 0&&(R=S.escapeChar),(typeof I!="string"||-1<c.BAD_DELIMITERS.indexOf(I))&&(I=","),k===I)throw new Error("Comment character same as delimiter");k===!0?k="#":(typeof k!="string"||-1<c.BAD_DELIMITERS.indexOf(k))&&(k=!1),A!==`
87
+ `&&A!=="\r"&&A!==`\r
88
+ `&&(A=`
89
+ `);var O=0,$=!1;this.parse=function(Y,W,G){if(typeof Y!="string")throw new Error("Input must be a string");var se=Y.length,ce=I.length,me=A.length,Ye=k.length,ne=M(D),he=[],Te=[],Q=[],H=O=0;if(!Y)return at();if(V||V!==!1&&Y.indexOf(L)===-1){for(var $e=Y.split(A),J=0;J<$e.length;J++){if(Q=$e[J],O+=Q.length,J!==$e.length-1)O+=A.length;else if(G)return at();if(!k||Q.substring(0,Ye)!==k){if(ne){if(he=[],In(Q.split(I)),Ve(),$)return at()}else In(Q.split(I));if(N&&N<=J)return he=he.slice(0,N),at(!0)}}return at()}for(var xe=Y.indexOf(I,O),be=Y.indexOf(A,O),Ct=new RegExp(m(R)+m(L),"g"),ue=Y.indexOf(L,O);;)if(Y[O]===L)for(ue=O,O++;;){if((ue=Y.indexOf(L,ue+1))===-1)return G||Te.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:he.length,index:O}),Dt();if(ue===se-1)return Dt(Y.substring(O,ue).replace(Ct,L));if(L===R&&Y[ue+1]===R)ue++;else if(L===R||ue===0||Y[ue-1]!==R){xe!==-1&&xe<ue+1&&(xe=Y.indexOf(I,ue+1));var We=Zn((be=be!==-1&&be<ue+1?Y.indexOf(A,ue+1):be)===-1?xe:Math.min(xe,be));if(Y.substr(ue+1+We,ce)===I){Q.push(Y.substring(O,ue).replace(Ct,L)),Y[O=ue+1+We+ce]!==L&&(ue=Y.indexOf(L,O)),xe=Y.indexOf(I,O),be=Y.indexOf(A,O);break}if(We=Zn(be),Y.substring(ue+1+We,ue+1+We+me)===A){if(Q.push(Y.substring(O,ue).replace(Ct,L)),Mr(ue+1+We+me),xe=Y.indexOf(I,O),ue=Y.indexOf(L,O),ne&&(Ve(),$))return at();if(N&&he.length>=N)return at(!0);break}Te.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:he.length,index:O}),ue++}}else if(k&&Q.length===0&&Y.substring(O,O+Ye)===k){if(be===-1)return at();O=be+me,be=Y.indexOf(A,O),xe=Y.indexOf(I,O)}else if(xe!==-1&&(xe<be||be===-1))Q.push(Y.substring(O,xe)),O=xe+ce,xe=Y.indexOf(I,O);else{if(be===-1)break;if(Q.push(Y.substring(O,be)),Mr(be+me),ne&&(Ve(),$))return at();if(N&&he.length>=N)return at(!0)}return Dt();function In(tt){he.push(tt),H=O}function Zn(tt){var dt=0;return dt=tt!==-1&&(tt=Y.substring(ue+1,tt))&&tt.trim()===""?tt.length:dt}function Dt(tt){return G||(tt===void 0&&(tt=Y.substring(O)),Q.push(tt),O=se,In(Q),ne&&Ve()),at()}function Mr(tt){O=tt,In(Q),Q=[],be=Y.indexOf(A,O)}function at(tt){if(S.header&&!W&&he.length&&!T){var dt=he[0],Kt=Object.create(null),Ur=new Set(dt);let Qo=!1;for(let hn=0;hn<dt.length;hn++){let Ft=dt[hn];if(Kt[Ft=M(S.transformHeader)?S.transformHeader(Ft,hn):Ft]){let qt,Jr=Kt[Ft];for(;qt=Ft+"_"+Jr,Jr++,Ur.has(qt););Ur.add(qt),dt[hn]=qt,Kt[Ft]++,Qo=!0,(P=P===null?{}:P)[qt]=Ft}else Kt[Ft]=1,dt[hn]=Ft;Ur.add(Ft)}Qo&&console.warn("Duplicate headers found and renamed."),T=!0}return{data:he,errors:Te,meta:{delimiter:I,linebreak:A,aborted:$,truncated:!!tt,cursor:H+(W||0),renamedHeaders:P}}}function Ve(){D(at()),he=[],Te=[]}},this.abort=function(){$=!0},this.getCharIndex=function(){return O}}function x(S){var I=S.data,A=a[I.workerId],k=!1;if(I.error)A.userError(I.error,I.file);else if(I.results&&I.results.data){var D={abort:function(){k=!0,y(I.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:_,resume:_};if(M(A.userStep)){for(var N=0;N<I.results.data.length&&(A.userStep({data:I.results.data[N],errors:I.results.errors,meta:I.results.meta},D),!k);N++);delete I.results}else M(A.userChunk)&&(A.userChunk(I.results,D,I.file),delete I.results)}I.finished&&!k&&y(I.workerId,I.results)}function y(S,I){var A=a[S];M(A.userComplete)&&A.userComplete(I),A.terminate(),delete a[S]}function _(){throw new Error("Not implemented.")}function w(S){if(typeof S!="object"||S===null)return S;var I,A=Array.isArray(S)?[]:{};for(I in S)A[I]=w(S[I]);return A}function E(S,I){return function(){S.apply(I,arguments)}}function M(S){return typeof S=="function"}return c.parse=function(S,I){var A=(I=I||{}).dynamicTyping||!1;if(M(A)&&(I.dynamicTypingFunction=A,A={}),I.dynamicTyping=A,I.transform=!!M(I.transform)&&I.transform,!I.worker||!c.WORKERS_SUPPORTED)return A=null,c.NODE_STREAM_INPUT,typeof S=="string"?(S=(k=>k.charCodeAt(0)!==65279?k:k.slice(1))(S),A=new(I.download?d:h)(I)):S.readable===!0&&M(S.read)&&M(S.on)?A=new g(I):(r.File&&S instanceof File||S instanceof Object)&&(A=new f(I)),A.stream(S);(A=(()=>{var k;return!!c.WORKERS_SUPPORTED&&(k=(()=>{var D=r.URL||r.webkitURL||null,N=n.toString();return c.BLOB_URL||(c.BLOB_URL=D.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",N,")();"],{type:"text/javascript"})))})(),(k=new r.Worker(k)).onmessage=x,k.id=l++,a[k.id]=k)})()).userStep=I.step,A.userChunk=I.chunk,A.userComplete=I.complete,A.userError=I.error,I.step=M(I.step),I.chunk=M(I.chunk),I.complete=M(I.complete),I.error=M(I.error),delete I.worker,A.postMessage({input:S,config:I,workerId:A.id})},c.unparse=function(S,I){var A=!1,k=!0,D=",",N=`\r
90
+ `,V='"',P=V+V,T=!1,L=null,R=!1,O=((()=>{if(typeof I=="object"){if(typeof I.delimiter!="string"||c.BAD_DELIMITERS.filter(function(W){return I.delimiter.indexOf(W)!==-1}).length||(D=I.delimiter),typeof I.quotes!="boolean"&&typeof I.quotes!="function"&&!Array.isArray(I.quotes)||(A=I.quotes),typeof I.skipEmptyLines!="boolean"&&typeof I.skipEmptyLines!="string"||(T=I.skipEmptyLines),typeof I.newline=="string"&&(N=I.newline),typeof I.quoteChar=="string"&&(V=I.quoteChar),typeof I.header=="boolean"&&(k=I.header),Array.isArray(I.columns)){if(I.columns.length===0)throw new Error("Option columns is empty");L=I.columns}I.escapeChar!==void 0&&(P=I.escapeChar+V),I.escapeFormulae instanceof RegExp?R=I.escapeFormulae:typeof I.escapeFormulae=="boolean"&&I.escapeFormulae&&(R=/^[=+\-@\t\r].*$/)}})(),new RegExp(m(V),"g"));if(typeof S=="string"&&(S=JSON.parse(S)),Array.isArray(S)){if(!S.length||Array.isArray(S[0]))return $(null,S,T);if(typeof S[0]=="object")return $(L||Object.keys(S[0]),S,T)}else if(typeof S=="object")return typeof S.data=="string"&&(S.data=JSON.parse(S.data)),Array.isArray(S.data)&&(S.fields||(S.fields=S.meta&&S.meta.fields||L),S.fields||(S.fields=Array.isArray(S.data[0])?S.fields:typeof S.data[0]=="object"?Object.keys(S.data[0]):[]),Array.isArray(S.data[0])||typeof S.data[0]=="object"||(S.data=[S.data])),$(S.fields||[],S.data||[],T);throw new Error("Unable to serialize unrecognized input");function $(W,G,se){var ce="",me=(typeof W=="string"&&(W=JSON.parse(W)),typeof G=="string"&&(G=JSON.parse(G)),Array.isArray(W)&&0<W.length),Ye=!Array.isArray(G[0]);if(me&&k){for(var ne=0;ne<W.length;ne++)0<ne&&(ce+=D),ce+=Y(W[ne],ne);0<G.length&&(ce+=N)}for(var he=0;he<G.length;he++){var Te=(me?W:G[he]).length,Q=!1,H=me?Object.keys(G[he]).length===0:G[he].length===0;if(se&&!me&&(Q=se==="greedy"?G[he].join("").trim()==="":G[he].length===1&&G[he][0].length===0),se==="greedy"&&me){for(var $e=[],J=0;J<Te;J++){var xe=Ye?W[J]:J;$e.push(G[he][xe])}Q=$e.join("").trim()===""}if(!Q){for(var be=0;be<Te;be++){0<be&&!H&&(ce+=D);var Ct=me&&Ye?W[be]:be;ce+=Y(G[he][Ct],be)}he<G.length-1&&(!se||0<Te&&!H)&&(ce+=N)}}return ce}function Y(W,G){var se,ce;return W==null?"":W.constructor===Date?JSON.stringify(W).slice(1,25):(ce=!1,R&&typeof W=="string"&&R.test(W)&&(W="'"+W,ce=!0),se=W.toString().replace(O,P),(ce=ce||A===!0||typeof A=="function"&&A(W,G)||Array.isArray(A)&&A[G]||((me,Ye)=>{for(var ne=0;ne<Ye.length;ne++)if(-1<me.indexOf(Ye[ne]))return!0;return!1})(se,c.BAD_DELIMITERS)||-1<se.indexOf(D)||se.charAt(0)===" "||se.charAt(se.length-1)===" ")?V+se+V:se)}},c.RECORD_SEP="",c.UNIT_SEP="",c.BYTE_ORDER_MARK="\uFEFF",c.BAD_DELIMITERS=["\r",`
91
+ `,'"',c.BYTE_ORDER_MARK],c.WORKERS_SUPPORTED=!s&&!!r.Worker,c.NODE_STREAM_INPUT=1,c.LocalChunkSize=10485760,c.RemoteChunkSize=5242880,c.DefaultDelimiter=",",c.Parser=b,c.ParserHandle=p,c.NetworkStreamer=d,c.FileStreamer=f,c.StringStreamer=h,c.ReadableStreamStreamer=g,r.jQuery&&((i=r.jQuery).fn.parse=function(S){var I=S.config||{},A=[];return this.each(function(N){if(!(i(this).prop("tagName").toUpperCase()==="INPUT"&&i(this).attr("type").toLowerCase()==="file"&&r.FileReader)||!this.files||this.files.length===0)return!0;for(var V=0;V<this.files.length;V++)A.push({file:this.files[V],inputElem:this,instanceConfig:i.extend({},I)})}),k(),this;function k(){if(A.length===0)M(S.complete)&&S.complete();else{var N,V,P,T,L=A[0];if(M(S.before)){var R=S.before(L.file,L.inputElem);if(typeof R=="object"){if(R.action==="abort")return N="AbortError",V=L.file,P=L.inputElem,T=R.reason,void(M(S.error)&&S.error({name:N},V,P,T));if(R.action==="skip")return void D();typeof R.config=="object"&&(L.instanceConfig=i.extend(L.instanceConfig,R.config))}else if(R==="skip")return void D()}var O=L.instanceConfig.complete;L.instanceConfig.complete=function($){M(O)&&O($,L.file,L.inputElem),D()},c.parse(L.file,L.instanceConfig)}}function D(){A.splice(0,1),k()}}),o&&(r.onmessage=function(S){S=S.data,c.WORKER_ID===void 0&&S&&(c.WORKER_ID=S.workerId),typeof S.input=="string"?r.postMessage({workerId:c.WORKER_ID,results:c.parse(S.input,S.config),finished:!0}):(r.File&&S.input instanceof File||S.input instanceof Object)&&(S=c.parse(S.input,S.config))&&r.postMessage({workerId:c.WORKER_ID,results:S,finished:!0})}),(d.prototype=Object.create(u.prototype)).constructor=d,(f.prototype=Object.create(u.prototype)).constructor=f,(h.prototype=Object.create(h.prototype)).constructor=h,(g.prototype=Object.create(u.prototype)).constructor=g,c})})(Q1);var R6=Q1.exports;const P6=mw(R6),O6=(e="database")=>{let t=[],n=[];e==="database"?(t=["Connection Name","Port","Username","Password","Database Name","Server URL","Scan Order","Scan Scope","Scan Scope Value","Department","Country ISO2"],n=[["ExampleConnection1","3306","admin","pass123","server1","http://server1.com","Sequential","Number","200","Finance","CL"],["ExampleConnection2","5432","root","securePass","example_db","http://server2.com","Random","Number","100","Accounting","US"],["ExampleConnection3","1521","oracle_admin","oraclePass","oracle_db","http://server3.com","Random","Percentage","50","Information Technology (IT)","IN"]]):e==="shared_drive"&&(t=["Connection Name","IP Address","Username","Password","Host Name","Mount Path","Department","Country ISO2"],n=[["SharedDriveConn1","192.168.1.10","shared_admin","fin@123","finance-server-01","/mnt/finance","Finance","CL"],["SharedDriveConn2","10.0.0.25","acc_user","acc@secure","accounting-host","/mnt/accounting","Accounting","US"],["SharedDriveConn3","172.16.0.5","it_admin","it!pass2024","it-nfs-01","/mnt/it_shared","Information Technology (IT)","IN"]]);const r=[t.join(","),...n.map(a=>a.join(","))].join(`
92
+ `),i=new Blob([r],{type:"text/csv"}),s=window.URL.createObjectURL(i),o=document.createElement("a");o.href=s,o.setAttribute("download","sample.csv"),document.body.appendChild(o),o.click(),document.body.removeChild(o)},D6=(e,t="database")=>t==="database"?e.map(n=>{var r,i,s,o,a,l,c,u,d,f,h;return{"Connection Name":((r=n["Connection Name"])==null?void 0:r.trim())||"",Port:((i=n.Port)==null?void 0:i.trim())||"",Username:((s=n.Username)==null?void 0:s.trim())||"",Password:((o=n.Password)==null?void 0:o.trim())||"","Database Name":((a=n["Database Name"])==null?void 0:a.trim())||"","Server URL":((l=n["Server URL"])==null?void 0:l.trim())||"","Scan Order":((c=n["Scan Order"])==null?void 0:c.trim())||"","Scan Scope":((u=n["Scan Scope"])==null?void 0:u.trim())||"","Scan Scope Value":((d=n["Scan Scope Value"])==null?void 0:d.trim())||"",Department:((f=n.Department)==null?void 0:f.trim())||"","Country ISO2":((h=n["Country ISO2"])==null?void 0:h.trim())||""}}):t==="shared_drive"?e.map(n=>{var r,i,s,o,a,l,c,u;return{"Connection Name":((r=n["Connection Name"])==null?void 0:r.trim())||"","IP Address":((i=n["IP Address"])==null?void 0:i.trim())||"",Department:((s=n.Department)==null?void 0:s.trim())||"","Country ISO2":((o=n["Country ISO2"])==null?void 0:o.trim())||"",Username:((a=n.Username)==null?void 0:a.trim())||"",Password:((l=n.Password)==null?void 0:l.trim())||"","Host Name":((c=n["Host Name"])==null?void 0:c.trim())||"","Mount Path":((u=n["Mount Path"])==null?void 0:u.trim())||""}}):[],F6="••••••••••",T6=({csvType:e="database",connectionType:t,onClose:n,onConfirm:r,TestConnection:i})=>{const[s,o]=C.useState(null),[a,l]=C.useState([]),[c,u]=C.useState(new Set),d=h=>{if(h.target.files){const g=h.target.files[0];o(g),f(g)}},f=h=>{const g=new FileReader;g.onload=({target:p})=>{p!=null&&p.result&&P6.parse(p.result,{header:!0,skipEmptyLines:!0,complete:m=>{l(D6(m.data,e))}})},g.readAsText(h)};return v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"fixed inset-0 z-40 bg-gray-900 bg-opacity-50 backdrop-blur-sm"}),v.jsx("div",{className:"fixed inset-0 flex items-center justify-center z-40",children:v.jsxs("div",{className:`p-8 rounded-lg shadow-2xl w-full ${a.length>0?"max-w-[78vw]":"w-full max-w-3xl"} relative`,style:{backgroundColor:"var(--bg-color)"},children:[v.jsxs("div",{className:"flex justify-between items-center",children:[v.jsx("h3",{className:"text-xl font-semibold",style:{color:"var(--text-color)",fontFamily:"'Afacad', 'Rubik', sans-serif"},children:"Import Connectors"}),v.jsx("button",{className:"text-2xl transition-colors text-brand-primary hover:opacity-80",onClick:n,children:"×"})]}),e==="database"?v.jsx("div",{className:"w-full max-w-2xl bg-yellow-100 dark:bg-yellow-900/30 border border-yellow-400 dark:border-yellow-700 text-yellow-800 dark:text-yellow-200 px-4 py-2 rounded relative mt-2",role:"alert",children:v.jsxs("strong",{className:"font-bold flex gap-2 text-sm items-center",children:[v.jsx(Pf,{}),"Import connectors works only for connection without SSH Configuration"]})}):v.jsx("div",{className:"w-full max-w-2xl px-4 py-2 rounded relative mt-2",style:{backgroundColor:"var(--brand-light)",border:"1px solid var(--brand-orange)",color:"var(--brand-dark)"},role:"alert",children:v.jsxs("strong",{className:"font-normal flex gap-2 text-sm items-center",children:[v.jsx(zv,{style:{color:"var(--brand-orange)"}}),"Please refer to the sample CSV before uploading"]})}),a.length>0&&v.jsx("div",{className:"max-h-[60vh] overflow-auto border rounded-md shadow-sm mt-4",children:v.jsxs("table",{className:"min-w-full max-h-[60vh] border-collapse",children:[v.jsx("thead",{children:v.jsxs("tr",{className:"sticky top-0 z-10",style:{backgroundColor:"var(--brand-light)"},children:[Object.keys(a[0]).map((h,g)=>v.jsx("th",{className:"p-3 text-left",style:{border:"1px solid var(--border-color)",color:"var(--brand-dark)"},children:h},g)),t&&i&&v.jsx("th",{style:{border:"1px solid var(--border-color)",color:"var(--brand-dark)"},children:"Test Status"})]})}),v.jsx("tbody",{children:a.map((h,g)=>v.jsxs("tr",{className:`${c.has(g)?"bg-red-50 dark:bg-red-900/20":g%2===0?"bg-white dark:bg-[#23272f]":"bg-gray-50 dark:bg-[#1e293b]"}`,children:[Object.entries(h).map(([p,m],b)=>v.jsx("td",{className:"border p-3 text-gray-600 dark:text-gray-200",children:p.toLowerCase().includes("password")?F6:m},b)),t&&i&&v.jsx("td",{className:"border p-3 text-gray-600 dark:text-gray-200",children:v.jsx("div",{className:"flex justify-center",children:v.jsx(i,{type:t,host:h["Server URL"],port:parseInt(h.PORT?h.PORT:"3306",10),ipAddress:h["IP Address"],username:h.Username,password:h.Password,database:h["Database Name"],mountPath:h["Mount Path"],hostName:h["Host Name"],onTestResult:p=>{p.success?u(m=>{const b=new Set(m);return b.delete(g),b}):u(m=>new Set([...m,g]))},enableCopy:!1,enableTechnicalDetails:!1,customStyles:"mb-0"})})})]},g))})]})}),v.jsxs("div",{className:"flex flex-col items-center mt-6",children:[v.jsx("label",{htmlFor:"file-upload",className:"px-4 py-2 bg-brand-primary text-sm text-white rounded-md cursor-pointer hover:bg-[var(--brand-orange)]/90 transition-all shadow",children:s?s.name:"Add File"}),v.jsx("input",{type:"file",id:"file-upload",className:"hidden",accept:".csv",onChange:d})]}),v.jsxs("div",{className:"flex justify-between items-center mt-6",children:[v.jsx("button",{onClick:()=>O6(e),className:"text-sm text-brand-primary hover:opacity-80 underline transition-colors",children:"Download Sample CSV"}),a.length>0&&v.jsx("button",{className:"px-4 py-2 bg-brand-primary text-sm text-white rounded-md shadow hover:bg-[var(--brand-orange)]/90 transition-all",onClick:()=>{r(a),n()},children:"Confirm Import"})]})]})})]})},N6=({title:e})=>v.jsxs("div",{className:"nochartdata-container w-full h-full flex flex-col items-center justify-center text-center select-none",children:[v.jsx("div",{className:"items-center top-0 left-0 p-[1.25rem] absolute justify-center select-none text-[18px] font-[600] p-3",style:{color:"var(--chart-text-color)",fontFamily:"'Afacad', 'Rubik', sans-serif"},children:e}),v.jsxs("div",{className:"flex flex-col items-center justify-center w-full h-full",children:[v.jsx(sA,{size:80,style:{color:"var(--brand-color-orange)",opacity:.2}}),v.jsx("span",{className:"mt-4 text-[1rem]",style:{color:"var(--secondary-text-color)"},children:"No data to display"})]})]}),L6=({title:e,mainClassname:t,rightContent:n})=>v.jsxs("div",{className:`${t} flex items-center justify-between`,children:[v.jsx("span",{className:"flex flex-1 select-none md:text-xl 2xl:text-2xl font-[600]",style:{color:"var(--chart-text-color)",fontFamily:"'Afacad', 'Rubik', sans-serif"},children:e}),v.jsx("div",{children:n})]}),nh=({legends:e,maxDisplayLegends:t=8,dataValues:n,colors:r,showAllLegends:i=!1,onClick:s})=>{const o=Math.min(e.length,t),a=(n==null?void 0:n.reduce((l,c)=>l+c,0))??0;return v.jsxs("div",{className:"flex flex-col",style:{minWidth:"150px",maxWidth:"100%"},children:[v.jsx("div",{className:"flex-1 overflow-y-auto",children:e.slice(0,o).map((l,c)=>v.jsxs("div",{className:"flex items-center mb-2 min-w-0",children:[v.jsx("div",{className:"mr-2 flex-shrink-0",style:{width:"12px",height:"12px",borderRadius:"50%",backgroundColor:r[c%r.length]}}),v.jsx("span",{className:"text-sm font-medium flex-1 min-w-0",style:{color:"var(--chart-text-color)",wordBreak:"break-word",overflowWrap:"break-word"},children:l}),n&&v.jsxs("span",{className:"text-xs ml-2 flex-shrink-0",style:{color:"var(--secondary-text-color)"},children:["(",(n[c]/a*100).toFixed(2),"%)"]})]},c))}),e.length>t&&v.jsx("div",{className:"mt-1 text-right",children:i?v.jsx("button",{className:"px-2 py-1 text-xs text-white rounded transition-colors",style:{backgroundColor:"var(--secondary-text-color)"},onMouseEnter:l=>l.currentTarget.style.opacity="0.9",onMouseLeave:l=>l.currentTarget.style.opacity="1",onClick:s,children:"Show Less"}):v.jsxs("button",{className:"px-2 py-1 text-xs text-white rounded transition-colors",style:{backgroundColor:"var(--brand-orange)"},onMouseEnter:l=>l.currentTarget.style.opacity="0.9",onMouseLeave:l=>l.currentTarget.style.opacity="1",onClick:s,children:["View All (",e.length-t," more)"]})})]})};/*!
93
+ * @kurkle/color v0.3.4
94
+ * https://github.com/kurkle/color#readme
95
+ * (c) 2024 Jukka Kurkela
96
+ * Released under the MIT License
97
+ */function Xo(e){return e+.5|0}const Or=(e,t,n)=>Math.max(Math.min(e,n),t);function Bs(e){return Or(Xo(e*2.55),0,255)}function Vr(e){return Or(Xo(e*255),0,255)}function nr(e){return Or(Xo(e/2.55)/100,0,1)}function Sp(e){return Or(Xo(e*100),0,100)}const tn={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},yd=[..."0123456789ABCDEF"],V6=e=>yd[e&15],B6=e=>yd[(e&240)>>4]+yd[e&15],ha=e=>(e&240)>>4===(e&15),j6=e=>ha(e.r)&&ha(e.g)&&ha(e.b)&&ha(e.a);function G6(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&tn[e[1]]*17,g:255&tn[e[2]]*17,b:255&tn[e[3]]*17,a:t===5?tn[e[4]]*17:255}:(t===7||t===9)&&(n={r:tn[e[1]]<<4|tn[e[2]],g:tn[e[3]]<<4|tn[e[4]],b:tn[e[5]]<<4|tn[e[6]],a:t===9?tn[e[7]]<<4|tn[e[8]]:255})),n}const $6=(e,t)=>e<255?t(e):"";function W6(e){var t=j6(e)?V6:B6;return e?"#"+t(e.r)+t(e.g)+t(e.b)+$6(e.a,t):void 0}const H6=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function K1(e,t,n){const r=t*Math.min(n,1-n),i=(s,o=(s+e/30)%12)=>n-r*Math.max(Math.min(o-3,9-o,1),-1);return[i(0),i(8),i(4)]}function z6(e,t,n){const r=(i,s=(i+e/60)%6)=>n-n*t*Math.max(Math.min(s,4-s,1),0);return[r(5),r(3),r(1)]}function Y6(e,t,n){const r=K1(e,1,.5);let i;for(t+n>1&&(i=1/(t+n),t*=i,n*=i),i=0;i<3;i++)r[i]*=1-t-n,r[i]+=t;return r}function X6(e,t,n,r,i){return e===i?(t-n)/r+(t<n?6:0):t===i?(n-e)/r+2:(e-t)/r+4}function rh(e){const n=e.r/255,r=e.g/255,i=e.b/255,s=Math.max(n,r,i),o=Math.min(n,r,i),a=(s+o)/2;let l,c,u;return s!==o&&(u=s-o,c=a>.5?u/(2-s-o):u/(s+o),l=X6(n,r,i,u,s),l=l*60+.5),[l|0,c||0,a]}function ih(e,t,n,r){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,r)).map(Vr)}function sh(e,t,n){return ih(K1,e,t,n)}function Z6(e,t,n){return ih(Y6,e,t,n)}function U6(e,t,n){return ih(z6,e,t,n)}function q1(e){return(e%360+360)%360}function J6(e){const t=H6.exec(e);let n=255,r;if(!t)return;t[5]!==r&&(n=t[6]?Bs(+t[5]):Vr(+t[5]));const i=q1(+t[2]),s=+t[3]/100,o=+t[4]/100;return t[1]==="hwb"?r=Z6(i,s,o):t[1]==="hsv"?r=U6(i,s,o):r=sh(i,s,o),{r:r[0],g:r[1],b:r[2],a:n}}function Q6(e,t){var n=rh(e);n[0]=q1(n[0]+t),n=sh(n),e.r=n[0],e.g=n[1],e.b=n[2]}function K6(e){if(!e)return;const t=rh(e),n=t[0],r=Sp(t[1]),i=Sp(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${i}%, ${nr(e.a)})`:`hsl(${n}, ${r}%, ${i}%)`}const _p={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Ip={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function q6(){const e={},t=Object.keys(Ip),n=Object.keys(_p);let r,i,s,o,a;for(r=0;r<t.length;r++){for(o=a=t[r],i=0;i<n.length;i++)s=n[i],a=a.replace(s,_p[s]);s=parseInt(Ip[o],16),e[a]=[s>>16&255,s>>8&255,s&255]}return e}let ga;function e9(e){ga||(ga=q6(),ga.transparent=[0,0,0,0]);const t=ga[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const t9=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function n9(e){const t=t9.exec(e);let n=255,r,i,s;if(t){if(t[7]!==r){const o=+t[7];n=t[8]?Bs(o):Or(o*255,0,255)}return r=+t[1],i=+t[3],s=+t[5],r=255&(t[2]?Bs(r):Or(r,0,255)),i=255&(t[4]?Bs(i):Or(i,0,255)),s=255&(t[6]?Bs(s):Or(s,0,255)),{r,g:i,b:s,a:n}}}function r9(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${nr(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const mu=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,Vi=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function i9(e,t,n){const r=Vi(nr(e.r)),i=Vi(nr(e.g)),s=Vi(nr(e.b));return{r:Vr(mu(r+n*(Vi(nr(t.r))-r))),g:Vr(mu(i+n*(Vi(nr(t.g))-i))),b:Vr(mu(s+n*(Vi(nr(t.b))-s))),a:e.a+n*(t.a-e.a)}}function pa(e,t,n){if(e){let r=rh(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,t===0?360:1)),r=sh(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function ex(e,t){return e&&Object.assign(t||{},e)}function Mp(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=Vr(e[3]))):(t=ex(e,{r:0,g:0,b:0,a:1}),t.a=Vr(t.a)),t}function s9(e){return e.charAt(0)==="r"?n9(e):J6(e)}let tx=class Cd{constructor(t){if(t instanceof Cd)return t;const n=typeof t;let r;n==="object"?r=Mp(t):n==="string"&&(r=G6(t)||e9(t)||s9(t)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var t=ex(this._rgb);return t&&(t.a=nr(t.a)),t}set rgb(t){this._rgb=Mp(t)}rgbString(){return this._valid?r9(this._rgb):void 0}hexString(){return this._valid?W6(this._rgb):void 0}hslString(){return this._valid?K6(this._rgb):void 0}mix(t,n){if(t){const r=this.rgb,i=t.rgb;let s;const o=n===s?.5:n,a=2*o-1,l=r.a-i.a,c=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;s=1-c,r.r=255&c*r.r+s*i.r+.5,r.g=255&c*r.g+s*i.g+.5,r.b=255&c*r.b+s*i.b+.5,r.a=o*r.a+(1-o)*i.a,this.rgb=r}return this}interpolate(t,n){return t&&(this._rgb=i9(this._rgb,t._rgb,n)),this}clone(){return new Cd(this.rgb)}alpha(t){return this._rgb.a=Vr(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=Xo(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=n,this}opaquer(t){const n=this._rgb;return n.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return pa(this._rgb,2,t),this}darken(t){return pa(this._rgb,2,-t),this}saturate(t){return pa(this._rgb,1,t),this}desaturate(t){return pa(this._rgb,1,-t),this}rotate(t){return Q6(this._rgb,t),this}};/*!
98
+ * Chart.js v4.5.1
99
+ * https://www.chartjs.org
100
+ * (c) 2025 Chart.js Contributors
101
+ * Released under the MIT License
102
+ */function Qn(){}const o9=(()=>{let e=0;return()=>e++})();function pe(e){return e==null}function Ze(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function Ce(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function rt(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function Ht(e,t){return rt(e)?e:t}function le(e,t){return typeof e>"u"?t:e}const a9=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,nx=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function Be(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function Fe(e,t,n,r){let i,s,o;if(Ze(e))for(s=e.length,i=0;i<s;i++)t.call(n,e[i],i);else if(Ce(e))for(o=Object.keys(e),s=o.length,i=0;i<s;i++)t.call(n,e[o[i]],o[i])}function Dl(e,t){let n,r,i,s;if(!e||!t||e.length!==t.length)return!1;for(n=0,r=e.length;n<r;++n)if(i=e[n],s=t[n],i.datasetIndex!==s.datasetIndex||i.index!==s.index)return!1;return!0}function Fl(e){if(Ze(e))return e.map(Fl);if(Ce(e)){const t=Object.create(null),n=Object.keys(e),r=n.length;let i=0;for(;i<r;++i)t[n[i]]=Fl(e[n[i]]);return t}return e}function rx(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function l9(e,t,n,r){if(!rx(e))return;const i=t[e],s=n[e];Ce(i)&&Ce(s)?pt(i,s,r):t[e]=Fl(s)}function pt(e,t,n){const r=Ze(t)?t:[t],i=r.length;if(!Ce(e))return e;n=n||{};const s=n.merger||l9;let o;for(let a=0;a<i;++a){if(o=r[a],!Ce(o))continue;const l=Object.keys(o);for(let c=0,u=l.length;c<u;++c)s(l[c],e,o,n)}return e}function Ks(e,t){return pt(e,t,{merger:c9})}function c9(e,t,n){if(!rx(e))return;const r=t[e],i=n[e];Ce(r)&&Ce(i)?Ks(r,i):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=Fl(i))}const Ep={"":e=>e,x:e=>e.x,y:e=>e.y};function u9(e){const t=e.split("."),n=[];let r="";for(const i of t)r+=i,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}function d9(e){const t=u9(e);return n=>{for(const r of t){if(r==="")break;n=n&&n[r]}return n}}function $r(e,t){return(Ep[t]||(Ep[t]=d9(t)))(e)}function oh(e){return e.charAt(0).toUpperCase()+e.slice(1)}const Io=e=>typeof e<"u",Wr=e=>typeof e=="function",Ap=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function f9(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const Me=Math.PI,Ue=2*Me,h9=Ue+Me,Tl=Number.POSITIVE_INFINITY,g9=Me/180,ot=Me/2,Kr=Me/4,kp=Me*2/3,Dr=Math.log10,Tn=Math.sign;function qs(e,t,n){return Math.abs(e-t)<n}function Rp(e){const t=Math.round(e);e=qs(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(Dr(e))),r=e/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function p9(e){const t=[],n=Math.sqrt(e);let r;for(r=1;r<n;r++)e%r===0&&(t.push(r),t.push(e/r));return n===(n|0)&&t.push(n),t.sort((i,s)=>i-s).pop(),t}function m9(e){return typeof e=="symbol"||typeof e=="object"&&e!==null&&!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e)}function rs(e){return!m9(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function b9(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function ix(e,t,n){let r,i,s;for(r=0,i=e.length;r<i;r++)s=e[r][n],isNaN(s)||(t.min=Math.min(t.min,s),t.max=Math.max(t.max,s))}function xn(e){return e*(Me/180)}function ah(e){return e*(180/Me)}function Pp(e){if(!rt(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function sx(e,t){const n=t.x-e.x,r=t.y-e.y,i=Math.sqrt(n*n+r*r);let s=Math.atan2(r,n);return s<-.5*Me&&(s+=Ue),{angle:s,distance:i}}function wd(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function v9(e,t){return(e-t+h9)%Ue-Me}function Et(e){return(e%Ue+Ue)%Ue}function Mo(e,t,n,r){const i=Et(e),s=Et(t),o=Et(n),a=Et(s-i),l=Et(o-i),c=Et(i-s),u=Et(i-o);return i===s||i===o||r&&s===o||a>l&&c<u}function gt(e,t,n){return Math.max(t,Math.min(n,e))}function x9(e){return gt(e,-32768,32767)}function lr(e,t,n,r=1e-6){return e>=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function lh(e,t,n){n=n||(o=>e[o]<t);let r=e.length-1,i=0,s;for(;r-i>1;)s=i+r>>1,n(s)?i=s:r=s;return{lo:i,hi:r}}const cr=(e,t,n,r)=>lh(e,n,r?i=>{const s=e[i][t];return s<n||s===n&&e[i+1][t]===n}:i=>e[i][t]<n),y9=(e,t,n)=>lh(e,n,r=>e[r][t]>=n);function C9(e,t,n){let r=0,i=e.length;for(;r<i&&e[r]<t;)r++;for(;i>r&&e[i-1]>n;)i--;return r>0||i<e.length?e.slice(r,i):e}const ox=["push","pop","shift","splice","unshift"];function w9(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),ox.forEach(n=>{const r="_onData"+oh(n),i=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...s){const o=i.apply(this,s);return e._chartjs.listeners.forEach(a=>{typeof a[r]=="function"&&a[r](...s)}),o}})})}function Op(e,t){const n=e._chartjs;if(!n)return;const r=n.listeners,i=r.indexOf(t);i!==-1&&r.splice(i,1),!(r.length>0)&&(ox.forEach(s=>{delete e[s]}),delete e._chartjs)}function ax(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const lx=function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame}();function cx(e,t){let n=[],r=!1;return function(...i){n=i,r||(r=!0,lx.call(window,()=>{r=!1,e.apply(t,n)}))}}function S9(e,t){let n;return function(...r){return t?(clearTimeout(n),n=setTimeout(e,t,r)):e.apply(this,r),t}}const ch=e=>e==="start"?"left":e==="end"?"right":"center",It=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,_9=(e,t,n,r)=>e===(r?"left":"right")?n:e==="center"?(t+n)/2:t;function ux(e,t,n){const r=t.length;let i=0,s=r;if(e._sorted){const{iScale:o,vScale:a,_parsed:l}=e,c=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null,u=o.axis,{min:d,max:f,minDefined:h,maxDefined:g}=o.getUserBounds();if(h){if(i=Math.min(cr(l,u,d).lo,n?r:cr(t,u,o.getPixelForValue(d)).lo),c){const p=l.slice(0,i+1).reverse().findIndex(m=>!pe(m[a.axis]));i-=Math.max(0,p)}i=gt(i,0,r-1)}if(g){let p=Math.max(cr(l,o.axis,f,!0).hi+1,n?0:cr(t,u,o.getPixelForValue(f),!0).hi+1);if(c){const m=l.slice(p-1).findIndex(b=>!pe(b[a.axis]));p+=Math.max(0,m)}s=gt(p,i,r)-i}else s=r-i}return{start:i,count:s}}function dx(e){const{xScale:t,yScale:n,_scaleRanges:r}=e,i={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!r)return e._scaleRanges=i,!0;const s=r.xmin!==t.min||r.xmax!==t.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,i),s}const ma=e=>e===0||e===1,Dp=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*Ue/n)),Fp=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*Ue/n)+1,eo={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*ot)+1,easeOutSine:e=>Math.sin(e*ot),easeInOutSine:e=>-.5*(Math.cos(Me*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>ma(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>ma(e)?e:Dp(e,.075,.3),easeOutElastic:e=>ma(e)?e:Fp(e,.075,.3),easeInOutElastic(e){return ma(e)?e:e<.5?.5*Dp(e*2,.1125,.45):.5+.5*Fp(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-eo.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?eo.easeInBounce(e*2)*.5:eo.easeOutBounce(e*2-1)*.5+.5};function uh(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function Tp(e){return uh(e)?e:new tx(e)}function bu(e){return uh(e)?e:new tx(e).saturate(.5).darken(.1).hexString()}const I9=["x","y","borderWidth","radius","tension"],M9=["color","borderColor","backgroundColor"];function E9(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),e.set("animations",{colors:{type:"color",properties:M9},numbers:{type:"number",properties:I9}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function A9(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Np=new Map;function k9(e,t){t=t||{};const n=e+JSON.stringify(t);let r=Np.get(n);return r||(r=new Intl.NumberFormat(e,t),Np.set(n,r)),r}function Zo(e,t,n){return k9(t,n).format(e)}const fx={values(e){return Ze(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const r=this.chart.options.locale;let i,s=e;if(n.length>1){const c=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(c<1e-4||c>1e15)&&(i="scientific"),s=R9(e,n)}const o=Dr(Math.abs(s)),a=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),l={notation:i,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),Zo(e,r,l)},logarithmic(e,t,n){if(e===0)return"0";const r=n[t].significand||e/Math.pow(10,Math.floor(Dr(e)));return[1,2,3,5,10,15].includes(r)||t>.8*n.length?fx.numeric.call(this,e,t,n):""}};function R9(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var kc={formatters:fx};function P9(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,n)=>n.lineWidth,tickColor:(t,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:kc.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const Ii=Object.create(null),Sd=Object.create(null);function to(e,t){if(!t)return e;const n=t.split(".");for(let r=0,i=n.length;r<i;++r){const s=n[r];e=e[s]||(e[s]=Object.create(null))}return e}function vu(e,t,n){return typeof t=="string"?pt(to(e,t),n):pt(to(e,""),t)}class O9{constructor(t,n){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=r=>r.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(r,i)=>bu(i.backgroundColor),this.hoverBorderColor=(r,i)=>bu(i.borderColor),this.hoverColor=(r,i)=>bu(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(n)}set(t,n){return vu(this,t,n)}get(t){return to(this,t)}describe(t,n){return vu(Sd,t,n)}override(t,n){return vu(Ii,t,n)}route(t,n,r,i){const s=to(this,t),o=to(this,r),a="_"+n;Object.defineProperties(s,{[a]:{value:s[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[a],c=o[i];return Ce(l)?Object.assign({},c,l):le(l,c)},set(l){this[a]=l}}})}apply(t){t.forEach(n=>n(this))}}var Je=new O9({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[E9,A9,P9]);function D9(e){return!e||pe(e.size)||pe(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function Nl(e,t,n,r,i){let s=t[i];return s||(s=t[i]=e.measureText(i).width,n.push(i)),s>r&&(r=s),r}function F9(e,t,n,r){r=r||{};let i=r.data=r.data||{},s=r.garbageCollect=r.garbageCollect||[];r.font!==t&&(i=r.data={},s=r.garbageCollect=[],r.font=t),e.save(),e.font=t;let o=0;const a=n.length;let l,c,u,d,f;for(l=0;l<a;l++)if(d=n[l],d!=null&&!Ze(d))o=Nl(e,i,s,o,d);else if(Ze(d))for(c=0,u=d.length;c<u;c++)f=d[c],f!=null&&!Ze(f)&&(o=Nl(e,i,s,o,f));e.restore();const h=s.length/2;if(h>n.length){for(l=0;l<h;l++)delete i[s[l]];s.splice(0,h)}return o}function qr(e,t,n){const r=e.currentDevicePixelRatio,i=n!==0?Math.max(n/2,.5):0;return Math.round((t-i)*r)/r+i}function Lp(e,t){!t&&!e||(t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function Ll(e,t,n,r){hx(e,t,n,r,null)}function hx(e,t,n,r,i){let s,o,a,l,c,u,d,f;const h=t.pointStyle,g=t.rotation,p=t.radius;let m=(g||0)*g9;if(h&&typeof h=="object"&&(s=h.toString(),s==="[object HTMLImageElement]"||s==="[object HTMLCanvasElement]")){e.save(),e.translate(n,r),e.rotate(m),e.drawImage(h,-h.width/2,-h.height/2,h.width,h.height),e.restore();return}if(!(isNaN(p)||p<=0)){switch(e.beginPath(),h){default:i?e.ellipse(n,r,i/2,p,0,0,Ue):e.arc(n,r,p,0,Ue),e.closePath();break;case"triangle":u=i?i/2:p,e.moveTo(n+Math.sin(m)*u,r-Math.cos(m)*p),m+=kp,e.lineTo(n+Math.sin(m)*u,r-Math.cos(m)*p),m+=kp,e.lineTo(n+Math.sin(m)*u,r-Math.cos(m)*p),e.closePath();break;case"rectRounded":c=p*.516,l=p-c,o=Math.cos(m+Kr)*l,d=Math.cos(m+Kr)*(i?i/2-c:l),a=Math.sin(m+Kr)*l,f=Math.sin(m+Kr)*(i?i/2-c:l),e.arc(n-d,r-a,c,m-Me,m-ot),e.arc(n+f,r-o,c,m-ot,m),e.arc(n+d,r+a,c,m,m+ot),e.arc(n-f,r+o,c,m+ot,m+Me),e.closePath();break;case"rect":if(!g){l=Math.SQRT1_2*p,u=i?i/2:l,e.rect(n-u,r-l,2*u,2*l);break}m+=Kr;case"rectRot":d=Math.cos(m)*(i?i/2:p),o=Math.cos(m)*p,a=Math.sin(m)*p,f=Math.sin(m)*(i?i/2:p),e.moveTo(n-d,r-a),e.lineTo(n+f,r-o),e.lineTo(n+d,r+a),e.lineTo(n-f,r+o),e.closePath();break;case"crossRot":m+=Kr;case"cross":d=Math.cos(m)*(i?i/2:p),o=Math.cos(m)*p,a=Math.sin(m)*p,f=Math.sin(m)*(i?i/2:p),e.moveTo(n-d,r-a),e.lineTo(n+d,r+a),e.moveTo(n+f,r-o),e.lineTo(n-f,r+o);break;case"star":d=Math.cos(m)*(i?i/2:p),o=Math.cos(m)*p,a=Math.sin(m)*p,f=Math.sin(m)*(i?i/2:p),e.moveTo(n-d,r-a),e.lineTo(n+d,r+a),e.moveTo(n+f,r-o),e.lineTo(n-f,r+o),m+=Kr,d=Math.cos(m)*(i?i/2:p),o=Math.cos(m)*p,a=Math.sin(m)*p,f=Math.sin(m)*(i?i/2:p),e.moveTo(n-d,r-a),e.lineTo(n+d,r+a),e.moveTo(n+f,r-o),e.lineTo(n-f,r+o);break;case"line":o=i?i/2:Math.cos(m)*p,a=Math.sin(m)*p,e.moveTo(n-o,r-a),e.lineTo(n+o,r+a);break;case"dash":e.moveTo(n,r),e.lineTo(n+Math.cos(m)*(i?i/2:p),r+Math.sin(m)*p);break;case!1:e.closePath();break}e.fill(),t.borderWidth>0&&e.stroke()}}function ur(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.x<t.right+n&&e.y>t.top-n&&e.y<t.bottom+n}function gi(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function pi(e){e.restore()}function T9(e,t,n,r,i){if(!t)return e.lineTo(n.x,n.y);if(i==="middle"){const s=(t.x+n.x)/2;e.lineTo(s,t.y),e.lineTo(s,n.y)}else i==="after"!=!!r?e.lineTo(t.x,n.y):e.lineTo(n.x,t.y);e.lineTo(n.x,n.y)}function N9(e,t,n,r){if(!t)return e.lineTo(n.x,n.y);e.bezierCurveTo(r?t.cp1x:t.cp2x,r?t.cp1y:t.cp2y,r?n.cp2x:n.cp1x,r?n.cp2y:n.cp1y,n.x,n.y)}function L9(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),pe(t.rotation)||e.rotate(t.rotation),t.color&&(e.fillStyle=t.color),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline)}function V9(e,t,n,r,i){if(i.strikethrough||i.underline){const s=e.measureText(r),o=t-s.actualBoundingBoxLeft,a=t+s.actualBoundingBoxRight,l=n-s.actualBoundingBoxAscent,c=n+s.actualBoundingBoxDescent,u=i.strikethrough?(l+c)/2:c;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=i.decorationWidth||2,e.moveTo(o,u),e.lineTo(a,u),e.stroke()}}function B9(e,t){const n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function Mi(e,t,n,r,i,s={}){const o=Ze(t)?t:[t],a=s.strokeWidth>0&&s.strokeColor!=="";let l,c;for(e.save(),e.font=i.string,L9(e,s),l=0;l<o.length;++l)c=o[l],s.backdrop&&B9(e,s.backdrop),a&&(s.strokeColor&&(e.strokeStyle=s.strokeColor),pe(s.strokeWidth)||(e.lineWidth=s.strokeWidth),e.strokeText(c,n,r,s.maxWidth)),e.fillText(c,n,r,s.maxWidth),V9(e,n,r,c,s),r+=Number(i.lineHeight);e.restore()}function Eo(e,t){const{x:n,y:r,w:i,h:s,radius:o}=t;e.arc(n+o.topLeft,r+o.topLeft,o.topLeft,1.5*Me,Me,!0),e.lineTo(n,r+s-o.bottomLeft),e.arc(n+o.bottomLeft,r+s-o.bottomLeft,o.bottomLeft,Me,ot,!0),e.lineTo(n+i-o.bottomRight,r+s),e.arc(n+i-o.bottomRight,r+s-o.bottomRight,o.bottomRight,ot,0,!0),e.lineTo(n+i,r+o.topRight),e.arc(n+i-o.topRight,r+o.topRight,o.topRight,0,-ot,!0),e.lineTo(n+o.topLeft,r)}const j9=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,G9=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function $9(e,t){const n=(""+e).match(j9);if(!n||n[1]==="normal")return t*1.2;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100;break}return t*e}const W9=e=>+e||0;function dh(e,t){const n={},r=Ce(t),i=r?Object.keys(t):t,s=Ce(e)?r?o=>le(e[o],e[t[o]]):o=>e[o]:()=>e;for(const o of i)n[o]=W9(s(o));return n}function gx(e){return dh(e,{top:"y",right:"x",bottom:"y",left:"x"})}function mi(e){return dh(e,["topLeft","topRight","bottomLeft","bottomRight"])}function yt(e){const t=gx(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function ut(e,t){e=e||{},t=t||Je.font;let n=le(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let r=le(e.style,t.style);r&&!(""+r).match(G9)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const i={family:le(e.family,t.family),lineHeight:$9(le(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:le(e.weight,t.weight),string:""};return i.string=D9(i),i}function Xe(e,t,n,r){let i,s,o;for(i=0,s=e.length;i<s;++i)if(o=e[i],o!==void 0&&(t!==void 0&&typeof o=="function"&&(o=o(t)),n!==void 0&&Ze(o)&&(o=o[n%o.length]),o!==void 0))return o}function H9(e,t,n){const{min:r,max:i}=e,s=nx(t,(i-r)/2),o=(a,l)=>n&&a===0?0:a+l;return{min:o(r,-Math.abs(s)),max:o(i,s)}}function Xr(e,t){return Object.assign(Object.create(e),t)}function fh(e,t=[""],n,r,i=()=>e[0]){const s=n||e;typeof r>"u"&&(r=vx("_fallback",e));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:s,_fallback:r,_getTarget:i,override:a=>fh([a,...e],t,s,r)};return new Proxy(o,{deleteProperty(a,l){return delete a[l],delete a._keys,delete e[0][l],!0},get(a,l){return mx(a,l,()=>K9(l,t,e,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(a,l){return Bp(a).includes(l)},ownKeys(a){return Bp(a)},set(a,l,c){const u=a._storage||(a._storage=i());return a[l]=u[l]=c,delete a._keys,!0}})}function is(e,t,n,r){const i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:px(e,r),setContext:s=>is(e,s,n,r),override:s=>is(e.override(s),t,n,r)};return new Proxy(i,{deleteProperty(s,o){return delete s[o],delete e[o],!0},get(s,o,a){return mx(s,o,()=>Y9(s,o,a))},getOwnPropertyDescriptor(s,o){return s._descriptors.allKeys?Reflect.has(e,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,o)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(s,o){return Reflect.has(e,o)},ownKeys(){return Reflect.ownKeys(e)},set(s,o,a){return e[o]=a,delete s[o],!0}})}function px(e,t={scriptable:!0,indexable:!0}){const{_scriptable:n=t.scriptable,_indexable:r=t.indexable,_allKeys:i=t.allKeys}=e;return{allKeys:i,scriptable:n,indexable:r,isScriptable:Wr(n)?n:()=>n,isIndexable:Wr(r)?r:()=>r}}const z9=(e,t)=>e?e+oh(t):t,hh=(e,t)=>Ce(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function mx(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||t==="constructor")return e[t];const r=n();return e[t]=r,r}function Y9(e,t,n){const{_proxy:r,_context:i,_subProxy:s,_descriptors:o}=e;let a=r[t];return Wr(a)&&o.isScriptable(t)&&(a=X9(t,a,e,n)),Ze(a)&&a.length&&(a=Z9(t,a,e,o.isIndexable)),hh(t,a)&&(a=is(a,i,s&&s[t],o)),a}function X9(e,t,n,r){const{_proxy:i,_context:s,_subProxy:o,_stack:a}=n;if(a.has(e))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+e);a.add(e);let l=t(s,o||r);return a.delete(e),hh(e,l)&&(l=gh(i._scopes,i,e,l)),l}function Z9(e,t,n,r){const{_proxy:i,_context:s,_subProxy:o,_descriptors:a}=n;if(typeof s.index<"u"&&r(e))return t[s.index%t.length];if(Ce(t[0])){const l=t,c=i._scopes.filter(u=>u!==l);t=[];for(const u of l){const d=gh(c,i,e,u);t.push(is(d,s,o&&o[e],a))}}return t}function bx(e,t,n){return Wr(e)?e(t,n):e}const U9=(e,t)=>e===!0?t:typeof e=="string"?$r(t,e):void 0;function J9(e,t,n,r,i){for(const s of t){const o=U9(n,s);if(o){e.add(o);const a=bx(o._fallback,n,i);if(typeof a<"u"&&a!==n&&a!==r)return a}else if(o===!1&&typeof r<"u"&&n!==r)return null}return!1}function gh(e,t,n,r){const i=t._rootScopes,s=bx(t._fallback,n,r),o=[...e,...i],a=new Set;a.add(r);let l=Vp(a,o,n,s||n,r);return l===null||typeof s<"u"&&s!==n&&(l=Vp(a,o,s,l,r),l===null)?!1:fh(Array.from(a),[""],i,s,()=>Q9(t,n,r))}function Vp(e,t,n,r,i){for(;n;)n=J9(e,t,n,r,i);return n}function Q9(e,t,n){const r=e._getTarget();t in r||(r[t]={});const i=r[t];return Ze(i)&&Ce(n)?n:i||{}}function K9(e,t,n,r){let i;for(const s of t)if(i=vx(z9(s,e),n),typeof i<"u")return hh(e,i)?gh(n,r,e,i):i}function vx(e,t){for(const n of t){if(!n)continue;const r=n[e];if(typeof r<"u")return r}}function Bp(e){let t=e._keys;return t||(t=e._keys=q9(e._scopes)),t}function q9(e){const t=new Set;for(const n of e)for(const r of Object.keys(n).filter(i=>!i.startsWith("_")))t.add(r);return Array.from(t)}function xx(e,t,n,r){const{iScale:i}=e,{key:s="r"}=this._parsing,o=new Array(r);let a,l,c,u;for(a=0,l=r;a<l;++a)c=a+n,u=t[c],o[a]={r:i.parse($r(u,s),c)};return o}const eP=Number.EPSILON||1e-14,ss=(e,t)=>t<e.length&&!e[t].skip&&e[t],yx=e=>e==="x"?"y":"x";function tP(e,t,n,r){const i=e.skip?t:e,s=t,o=n.skip?t:n,a=wd(s,i),l=wd(o,s);let c=a/(a+l),u=l/(a+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const d=r*c,f=r*u;return{previous:{x:s.x-d*(o.x-i.x),y:s.y-d*(o.y-i.y)},next:{x:s.x+f*(o.x-i.x),y:s.y+f*(o.y-i.y)}}}function nP(e,t,n){const r=e.length;let i,s,o,a,l,c=ss(e,0);for(let u=0;u<r-1;++u)if(l=c,c=ss(e,u+1),!(!l||!c)){if(qs(t[u],0,eP)){n[u]=n[u+1]=0;continue}i=n[u]/t[u],s=n[u+1]/t[u],a=Math.pow(i,2)+Math.pow(s,2),!(a<=9)&&(o=3/Math.sqrt(a),n[u]=i*o*t[u],n[u+1]=s*o*t[u])}}function rP(e,t,n="x"){const r=yx(n),i=e.length;let s,o,a,l=ss(e,0);for(let c=0;c<i;++c){if(o=a,a=l,l=ss(e,c+1),!a)continue;const u=a[n],d=a[r];o&&(s=(u-o[n])/3,a[`cp1${n}`]=u-s,a[`cp1${r}`]=d-s*t[c]),l&&(s=(l[n]-u)/3,a[`cp2${n}`]=u+s,a[`cp2${r}`]=d+s*t[c])}}function iP(e,t="x"){const n=yx(t),r=e.length,i=Array(r).fill(0),s=Array(r);let o,a,l,c=ss(e,0);for(o=0;o<r;++o)if(a=l,l=c,c=ss(e,o+1),!!l){if(c){const u=c[t]-l[t];i[o]=u!==0?(c[n]-l[n])/u:0}s[o]=a?c?Tn(i[o-1])!==Tn(i[o])?0:(i[o-1]+i[o])/2:i[o-1]:i[o]}nP(e,i,s),rP(e,s,t)}function ba(e,t,n){return Math.max(Math.min(e,n),t)}function sP(e,t){let n,r,i,s,o,a=ur(e[0],t);for(n=0,r=e.length;n<r;++n)o=s,s=a,a=n<r-1&&ur(e[n+1],t),s&&(i=e[n],o&&(i.cp1x=ba(i.cp1x,t.left,t.right),i.cp1y=ba(i.cp1y,t.top,t.bottom)),a&&(i.cp2x=ba(i.cp2x,t.left,t.right),i.cp2y=ba(i.cp2y,t.top,t.bottom)))}function oP(e,t,n,r,i){let s,o,a,l;if(t.spanGaps&&(e=e.filter(c=>!c.skip)),t.cubicInterpolationMode==="monotone")iP(e,i);else{let c=r?e[e.length-1]:e[0];for(s=0,o=e.length;s<o;++s)a=e[s],l=tP(c,a,e[Math.min(s+1,o-(r?0:1))%o],t.tension),a.cp1x=l.previous.x,a.cp1y=l.previous.y,a.cp2x=l.next.x,a.cp2y=l.next.y,c=a}t.capBezierPoints&&sP(e,n)}function ph(){return typeof window<"u"&&typeof document<"u"}function mh(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function Vl(e,t,n){let r;return typeof e=="string"?(r=parseInt(e,10),e.indexOf("%")!==-1&&(r=r/100*t.parentNode[n])):r=e,r}const Rc=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function aP(e,t){return Rc(e).getPropertyValue(t)}const lP=["top","right","bottom","left"];function bi(e,t,n){const r={};n=n?"-"+n:"";for(let i=0;i<4;i++){const s=lP[i];r[s]=parseFloat(e[t+"-"+s+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const cP=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function uP(e,t){const n=e.touches,r=n&&n.length?n[0]:e,{offsetX:i,offsetY:s}=r;let o=!1,a,l;if(cP(i,s,e.target))a=i,l=s;else{const c=t.getBoundingClientRect();a=r.clientX-c.left,l=r.clientY-c.top,o=!0}return{x:a,y:l,box:o}}function ni(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:r}=t,i=Rc(n),s=i.boxSizing==="border-box",o=bi(i,"padding"),a=bi(i,"border","width"),{x:l,y:c,box:u}=uP(e,n),d=o.left+(u&&a.left),f=o.top+(u&&a.top);let{width:h,height:g}=t;return s&&(h-=o.width+a.width,g-=o.height+a.height),{x:Math.round((l-d)/h*n.width/r),y:Math.round((c-f)/g*n.height/r)}}function dP(e,t,n){let r,i;if(t===void 0||n===void 0){const s=e&&mh(e);if(!s)t=e.clientWidth,n=e.clientHeight;else{const o=s.getBoundingClientRect(),a=Rc(s),l=bi(a,"border","width"),c=bi(a,"padding");t=o.width-c.width-l.width,n=o.height-c.height-l.height,r=Vl(a.maxWidth,s,"clientWidth"),i=Vl(a.maxHeight,s,"clientHeight")}}return{width:t,height:n,maxWidth:r||Tl,maxHeight:i||Tl}}const Fr=e=>Math.round(e*10)/10;function fP(e,t,n,r){const i=Rc(e),s=bi(i,"margin"),o=Vl(i.maxWidth,e,"clientWidth")||Tl,a=Vl(i.maxHeight,e,"clientHeight")||Tl,l=dP(e,t,n);let{width:c,height:u}=l;if(i.boxSizing==="content-box"){const f=bi(i,"border","width"),h=bi(i,"padding");c-=h.width+f.width,u-=h.height+f.height}return c=Math.max(0,c-s.width),u=Math.max(0,r?c/r:u-s.height),c=Fr(Math.min(c,o,l.maxWidth)),u=Fr(Math.min(u,a,l.maxHeight)),c&&!u&&(u=Fr(c/2)),(t!==void 0||n!==void 0)&&r&&l.height&&u>l.height&&(u=l.height,c=Fr(Math.floor(u*r))),{width:c,height:u}}function jp(e,t,n){const r=t||1,i=Fr(e.height*r),s=Fr(e.width*r);e.height=Fr(e.height),e.width=Fr(e.width);const o=e.canvas;return o.style&&(n||!o.style.height&&!o.style.width)&&(o.style.height=`${e.height}px`,o.style.width=`${e.width}px`),e.currentDevicePixelRatio!==r||o.height!==i||o.width!==s?(e.currentDevicePixelRatio=r,o.height=i,o.width=s,e.ctx.setTransform(r,0,0,r,0,0),!0):!1}const hP=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};ph()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return e}();function Gp(e,t){const n=aP(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function ri(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function gP(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:r==="middle"?n<.5?e.y:t.y:r==="after"?n<1?e.y:t.y:n>0?t.y:e.y}}function pP(e,t,n,r){const i={x:e.cp2x,y:e.cp2y},s={x:t.cp1x,y:t.cp1y},o=ri(e,i,n),a=ri(i,s,n),l=ri(s,t,n),c=ri(o,a,n),u=ri(a,l,n);return ri(c,u,n)}const mP=function(e,t){return{x(n){return e+e+t-n},setWidth(n){t=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,r){return n-r},leftForLtr(n,r){return n-r}}},bP=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function Ki(e,t,n){return e?mP(t,n):bP()}function Cx(e,t){let n,r;(t==="ltr"||t==="rtl")&&(n=e.canvas.style,r=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=r)}function wx(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function Sx(e){return e==="angle"?{between:Mo,compare:v9,normalize:Et}:{between:lr,compare:(t,n)=>t-n,normalize:t=>t}}function $p({start:e,end:t,count:n,loop:r,style:i}){return{start:e%n,end:t%n,loop:r&&(t-e+1)%n===0,style:i}}function vP(e,t,n){const{property:r,start:i,end:s}=n,{between:o,normalize:a}=Sx(r),l=t.length;let{start:c,end:u,loop:d}=e,f,h;if(d){for(c+=l,u+=l,f=0,h=l;f<h&&o(a(t[c%l][r]),i,s);++f)c--,u--;c%=l,u%=l}return u<c&&(u+=l),{start:c,end:u,loop:d,style:e.style}}function _x(e,t,n){if(!n)return[e];const{property:r,start:i,end:s}=n,o=t.length,{compare:a,between:l,normalize:c}=Sx(r),{start:u,end:d,loop:f,style:h}=vP(e,t,n),g=[];let p=!1,m=null,b,x,y;const _=()=>l(i,y,b)&&a(i,y)!==0,w=()=>a(s,b)===0||l(s,y,b),E=()=>p||_(),M=()=>!p||w();for(let S=u,I=u;S<=d;++S)x=t[S%o],!x.skip&&(b=c(x[r]),b!==y&&(p=l(b,i,s),m===null&&E()&&(m=a(b,i)===0?S:I),m!==null&&M()&&(g.push($p({start:m,end:S,loop:f,count:o,style:h})),m=null),I=S,y=b));return m!==null&&g.push($p({start:m,end:d,loop:f,count:o,style:h})),g}function Ix(e,t){const n=[],r=e.segments;for(let i=0;i<r.length;i++){const s=_x(r[i],e.points,t);s.length&&n.push(...s)}return n}function xP(e,t,n,r){let i=0,s=t-1;if(n&&!r)for(;i<t&&!e[i].skip;)i++;for(;i<t&&e[i].skip;)i++;for(i%=t,n&&(s+=i);s>i&&e[s%t].skip;)s--;return s%=t,{start:i,end:s}}function yP(e,t,n,r){const i=e.length,s=[];let o=t,a=e[t],l;for(l=t+1;l<=n;++l){const c=e[l%i];c.skip||c.stop?a.skip||(r=!1,s.push({start:t%i,end:(l-1)%i,loop:r}),t=o=c.stop?l:null):(o=l,a.skip&&(t=l)),a=c}return o!==null&&s.push({start:t%i,end:o%i,loop:r}),s}function CP(e,t){const n=e.points,r=e.options.spanGaps,i=n.length;if(!i)return[];const s=!!e._loop,{start:o,end:a}=xP(n,i,s,r);if(r===!0)return Wp(e,[{start:o,end:a,loop:s}],n,t);const l=a<o?a+i:a,c=!!e._fullLoop&&o===0&&a===i-1;return Wp(e,yP(n,o,l,c),n,t)}function Wp(e,t,n,r){return!r||!r.setContext||!n?t:wP(e,t,n,r)}function wP(e,t,n,r){const i=e._chart.getContext(),s=Hp(e.options),{_datasetIndex:o,options:{spanGaps:a}}=e,l=n.length,c=[];let u=s,d=t[0].start,f=d;function h(g,p,m,b){const x=a?-1:1;if(g!==p){for(g+=l;n[g%l].skip;)g-=x;for(;n[p%l].skip;)p+=x;g%l!==p%l&&(c.push({start:g%l,end:p%l,loop:m,style:b}),u=b,d=p%l)}}for(const g of t){d=a?d:g.start;let p=n[d%l],m;for(f=d+1;f<=g.end;f++){const b=n[f%l];m=Hp(r.setContext(Xr(i,{type:"segment",p0:p,p1:b,p0DataIndex:(f-1)%l,p1DataIndex:f%l,datasetIndex:o}))),SP(m,u)&&h(d,f-1,g.loop,u),p=b,u=m}d<f-1&&h(d,f-1,g.loop,u)}return c}function Hp(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function SP(e,t){if(!t)return!1;const n=[],r=function(i,s){return uh(s)?(n.includes(s)||n.push(s),n.indexOf(s)):s};return JSON.stringify(e,r)!==JSON.stringify(t,r)}function va(e,t,n){return e.options.clip?e[n]:t[n]}function _P(e,t){const{xScale:n,yScale:r}=e;return n&&r?{left:va(n,t,"left"),right:va(n,t,"right"),top:va(r,t,"top"),bottom:va(r,t,"bottom")}:t}function Mx(e,t){const n=t._clip;if(n.disabled)return!1;const r=_P(t,e.chartArea);return{left:n.left===!1?0:r.left-(n.left===!0?0:n.left),right:n.right===!1?e.width:r.right+(n.right===!0?0:n.right),top:n.top===!1?0:r.top-(n.top===!0?0:n.top),bottom:n.bottom===!1?e.height:r.bottom+(n.bottom===!0?0:n.bottom)}}/*!
103
+ * Chart.js v4.5.1
104
+ * https://www.chartjs.org
105
+ * (c) 2025 Chart.js Contributors
106
+ * Released under the MIT License
107
+ */class IP{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,r,i){const s=n.listeners[i],o=n.duration;s.forEach(a=>a({chart:t,initial:n.initial,numSteps:o,currentStep:Math.min(r-n.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=lx.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((r,i)=>{if(!r.running||!r.items.length)return;const s=r.items;let o=s.length-1,a=!1,l;for(;o>=0;--o)l=s[o],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(t),a=!0):(s[o]=s[s.length-1],s.pop());a&&(i.draw(),this._notify(i,r,t,"progress")),s.length||(r.running=!1,this._notify(i,r,t,"complete"),r.initial=!1),n+=s.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let r=n.get(t);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,r)),r}listen(t,n,r){this._getAnims(t).listeners[n].push(r)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,i)=>Math.max(r,i._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const r=n.items;let i=r.length-1;for(;i>=0;--i)r[i].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Kn=new IP;const zp="transparent",MP={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const r=Tp(e||zp),i=r.valid&&Tp(t||zp);return i&&i.valid?i.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class EP{constructor(t,n,r,i){const s=n[r];i=Xe([t.to,i,s,t.from]);const o=Xe([t.from,s,i]);this._active=!0,this._fn=t.fn||MP[t.type||typeof o],this._easing=eo[t.easing]||eo.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=r,this._from=o,this._to=i,this._promises=void 0}active(){return this._active}update(t,n,r){if(this._active){this._notify(!1);const i=this._target[this._prop],s=r-this._start,o=this._duration-s;this._start=r,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=s,this._loop=!!t.loop,this._to=Xe([t.to,n,i,t.from]),this._from=Xe([t.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,r=this._duration,i=this._prop,s=this._from,o=this._loop,a=this._to;let l;if(this._active=s!==a&&(o||n<r),!this._active){this._target[i]=a,this._notify(!0);return}if(n<0){this._target[i]=s;return}l=n/r%2,l=o&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(s,a,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,r)=>{t.push({res:n,rej:r})})}_notify(t){const n=t?"res":"rej",r=this._promises||[];for(let i=0;i<r.length;i++)r[i][n]()}}class Ex{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!Ce(t))return;const n=Object.keys(Je.animation),r=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const s=t[i];if(!Ce(s))return;const o={};for(const a of n)o[a]=s[a];(Ze(s.properties)&&s.properties||[i]).forEach(a=>{(a===i||!r.has(a))&&r.set(a,o)})})}_animateOptions(t,n){const r=n.options,i=kP(t,r);if(!i)return[];const s=this._createAnimations(i,r);return r.$shared&&AP(t.options.$animations,r).then(()=>{t.options=r},()=>{}),s}_createAnimations(t,n){const r=this._properties,i=[],s=t.$animations||(t.$animations={}),o=Object.keys(n),a=Date.now();let l;for(l=o.length-1;l>=0;--l){const c=o[l];if(c.charAt(0)==="$")continue;if(c==="options"){i.push(...this._animateOptions(t,n));continue}const u=n[c];let d=s[c];const f=r.get(c);if(d)if(f&&d.active()){d.update(f,u,a);continue}else d.cancel();if(!f||!f.duration){t[c]=u;continue}s[c]=d=new EP(f,t,c,u),i.push(d)}return i}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const r=this._createAnimations(t,n);if(r.length)return Kn.add(this._chart,r),!0}}function AP(e,t){const n=[],r=Object.keys(t);for(let i=0;i<r.length;i++){const s=e[r[i]];s&&s.active()&&n.push(s.wait())}return Promise.all(n)}function kP(e,t){if(!t)return;let n=e.options;if(!n){e.options=t;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function Yp(e,t){const n=e&&e.options||{},r=n.reverse,i=n.min===void 0?t:0,s=n.max===void 0?t:0;return{start:r?s:i,end:r?i:s}}function RP(e,t,n){if(n===!1)return!1;const r=Yp(e,n),i=Yp(t,n);return{top:i.end,right:r.end,bottom:i.start,left:r.start}}function PP(e){let t,n,r,i;return Ce(e)?(t=e.top,n=e.right,r=e.bottom,i=e.left):t=n=r=i=e,{top:t,right:n,bottom:r,left:i,disabled:e===!1}}function Ax(e,t){const n=[],r=e._getSortedDatasetMetas(t);let i,s;for(i=0,s=r.length;i<s;++i)n.push(r[i].index);return n}function Xp(e,t,n,r={}){const i=e.keys,s=r.mode==="single";let o,a,l,c;if(t===null)return;let u=!1;for(o=0,a=i.length;o<a;++o){if(l=+i[o],l===n){if(u=!0,r.all)continue;break}c=e.values[l],rt(c)&&(s||t===0||Tn(t)===Tn(c))&&(t+=c)}return!u&&!r.all?0:t}function OP(e,t){const{iScale:n,vScale:r}=t,i=n.axis==="x"?"x":"y",s=r.axis==="x"?"x":"y",o=Object.keys(e),a=new Array(o.length);let l,c,u;for(l=0,c=o.length;l<c;++l)u=o[l],a[l]={[i]:u,[s]:e[u]};return a}function xu(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function DP(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function FP(e){const{min:t,max:n,minDefined:r,maxDefined:i}=e.getUserBounds();return{min:r?t:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}function TP(e,t,n){const r=e[t]||(e[t]={});return r[n]||(r[n]={})}function Zp(e,t,n,r){for(const i of t.getMatchingVisibleMetas(r).reverse()){const s=e[i.index];if(n&&s>0||!n&&s<0)return i.index}return null}function Up(e,t){const{chart:n,_cachedMeta:r}=e,i=n._stacks||(n._stacks={}),{iScale:s,vScale:o,index:a}=r,l=s.axis,c=o.axis,u=DP(s,o,r),d=t.length;let f;for(let h=0;h<d;++h){const g=t[h],{[l]:p,[c]:m}=g,b=g._stacks||(g._stacks={});f=b[c]=TP(i,u,p),f[a]=m,f._top=Zp(f,o,!0,r.type),f._bottom=Zp(f,o,!1,r.type);const x=f._visualValues||(f._visualValues={});x[a]=m}}function yu(e,t){const n=e.scales;return Object.keys(n).filter(r=>n[r].axis===t).shift()}function NP(e,t){return Xr(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function LP(e,t,n){return Xr(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function ks(e,t){const n=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){t=t||e._parsed;for(const i of t){const s=i._stacks;if(!s||s[r]===void 0||s[r][n]===void 0)return;delete s[r][n],s[r]._visualValues!==void 0&&s[r]._visualValues[n]!==void 0&&delete s[r]._visualValues[n]}}}const Cu=e=>e==="reset"||e==="none",Jp=(e,t)=>t?e:Object.assign({},e),VP=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:Ax(n,!0),values:null};class an{constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=xu(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&ks(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,r=this.getDataset(),i=(d,f,h,g)=>d==="x"?f:d==="r"?g:h,s=n.xAxisID=le(r.xAxisID,yu(t,"x")),o=n.yAxisID=le(r.yAxisID,yu(t,"y")),a=n.rAxisID=le(r.rAxisID,yu(t,"r")),l=n.indexAxis,c=n.iAxisID=i(l,s,o,a),u=n.vAxisID=i(l,o,s,a);n.xScale=this.getScaleForId(s),n.yScale=this.getScaleForId(o),n.rScale=this.getScaleForId(a),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Op(this._data,this),t._stacked&&ks(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(Ce(n)){const i=this._cachedMeta;this._data=OP(n,i)}else if(r!==n){if(r){Op(r,this);const i=this._cachedMeta;ks(i),i._parsed=[]}n&&Object.isExtensible(n)&&w9(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,r=this.getDataset();let i=!1;this._dataCheck();const s=n._stacked;n._stacked=xu(n.vScale,n),n.stack!==r.stack&&(i=!0,ks(n),n.stack=r.stack),this._resyncElements(t),(i||s!==n._stacked)&&(Up(this,n._parsed),n._stacked=xu(n.vScale,n))}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:r,_data:i}=this,{iScale:s,_stacked:o}=r,a=s.axis;let l=t===0&&n===i.length?!0:r._sorted,c=t>0&&r._parsed[t-1],u,d,f;if(this._parsing===!1)r._parsed=i,r._sorted=!0,f=i;else{Ze(i[t])?f=this.parseArrayData(r,i,t,n):Ce(i[t])?f=this.parseObjectData(r,i,t,n):f=this.parsePrimitiveData(r,i,t,n);const h=()=>d[a]===null||c&&d[a]<c[a];for(u=0;u<n;++u)r._parsed[u+t]=d=f[u],l&&(h()&&(l=!1),c=d);r._sorted=l}o&&Up(this,f)}parsePrimitiveData(t,n,r,i){const{iScale:s,vScale:o}=t,a=s.axis,l=o.axis,c=s.getLabels(),u=s===o,d=new Array(i);let f,h,g;for(f=0,h=i;f<h;++f)g=f+r,d[f]={[a]:u||s.parse(c[g],g),[l]:o.parse(n[g],g)};return d}parseArrayData(t,n,r,i){const{xScale:s,yScale:o}=t,a=new Array(i);let l,c,u,d;for(l=0,c=i;l<c;++l)u=l+r,d=n[u],a[l]={x:s.parse(d[0],u),y:o.parse(d[1],u)};return a}parseObjectData(t,n,r,i){const{xScale:s,yScale:o}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=new Array(i);let u,d,f,h;for(u=0,d=i;u<d;++u)f=u+r,h=n[f],c[u]={x:s.parse($r(h,a),f),y:o.parse($r(h,l),f)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,r){const i=this.chart,s=this._cachedMeta,o=n[t.axis],a={keys:Ax(i,!0),values:n._stacks[t.axis]._visualValues};return Xp(a,o,s.index,{mode:r})}updateRangeFromParsed(t,n,r,i){const s=r[n.axis];let o=s===null?NaN:s;const a=i&&r._stacks[n.axis];i&&a&&(i.values=a,o=Xp(i,s,this._cachedMeta.index)),t.min=Math.min(t.min,o),t.max=Math.max(t.max,o)}getMinMax(t,n){const r=this._cachedMeta,i=r._parsed,s=r._sorted&&t===r.iScale,o=i.length,a=this._getOtherScale(t),l=VP(n,r,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:d}=FP(a);let f,h;function g(){h=i[f];const p=h[a.axis];return!rt(h[t.axis])||u>p||d<p}for(f=0;f<o&&!(!g()&&(this.updateRangeFromParsed(c,t,h,l),s));++f);if(s){for(f=o-1;f>=0;--f)if(!g()){this.updateRangeFromParsed(c,t,h,l);break}}return c}getAllParsedValues(t){const n=this._cachedMeta._parsed,r=[];let i,s,o;for(i=0,s=n.length;i<s;++i)o=n[i][t.axis],rt(o)&&r.push(o);return r}getMaxOverflow(){return!1}getLabelAndValue(t){const n=this._cachedMeta,r=n.iScale,i=n.vScale,s=this.getParsed(t);return{label:r?""+r.getLabelForValue(s[r.axis]):"",value:i?""+i.getLabelForValue(s[i.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default"),n._clip=PP(le(this.options.clip,RP(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,n=this.chart,r=this._cachedMeta,i=r.data||[],s=n.chartArea,o=[],a=this._drawStart||0,l=this._drawCount||i.length-a,c=this.options.drawActiveElementsOnTop;let u;for(r.dataset&&r.dataset.draw(t,s,a,l),u=a;u<a+l;++u){const d=i[u];d.hidden||(d.active&&c?o.push(d):d.draw(t,s))}for(u=0;u<o.length;++u)o[u].draw(t,s)}getStyle(t,n){const r=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(t||0,r)}getContext(t,n,r){const i=this.getDataset();let s;if(t>=0&&t<this._cachedMeta.data.length){const o=this._cachedMeta.data[t];s=o.$context||(o.$context=LP(this.getContext(),t,o)),s.parsed=this.getParsed(t),s.raw=i.data[t],s.index=s.dataIndex=t}else s=this.$context||(this.$context=NP(this.chart.getContext(),this.index)),s.dataset=i,s.index=s.datasetIndex=this.index;return s.active=!!n,s.mode=r,s}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",r){const i=n==="active",s=this._cachedDataOpts,o=t+"-"+n,a=s[o],l=this.enableOptionSharing&&Io(r);if(a)return Jp(a,l);const c=this.chart.config,u=c.datasetElementScopeKeys(this._type,t),d=i?[`${t}Hover`,"hover",t,""]:[t,""],f=c.getOptionScopes(this.getDataset(),u),h=Object.keys(Je.elements[t]),g=()=>this.getContext(r,i,n),p=c.resolveNamedOptions(f,h,g,d);return p.$shared&&(p.$shared=l,s[o]=Object.freeze(Jp(p,l))),p}_resolveAnimations(t,n,r){const i=this.chart,s=this._cachedDataOpts,o=`animation-${n}`,a=s[o];if(a)return a;let l;if(i.options.animation!==!1){const u=this.chart.config,d=u.datasetAnimationScopeKeys(this._type,n),f=u.getOptionScopes(this.getDataset(),d);l=u.createResolver(f,this.getContext(t,r,n))}const c=new Ex(i,l&&l.animations);return l&&l._cacheable&&(s[o]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||Cu(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const r=this.resolveDataElementOptions(t,n),i=this._sharedOptions,s=this.getSharedOptions(r),o=this.includeOptions(n,s)||s!==i;return this.updateSharedOptions(s,n,r),{sharedOptions:s,includeOptions:o}}updateElement(t,n,r,i){Cu(i)?Object.assign(t,r):this._resolveAnimations(n,i).update(t,r)}updateSharedOptions(t,n,r){t&&!Cu(n)&&this._resolveAnimations(void 0,n).update(t,r)}_setStyle(t,n,r,i){t.active=i;const s=this.getStyle(n,i);this._resolveAnimations(n,r,i).update(t,{options:!i&&this.getSharedOptions(s)||s})}removeHoverStyle(t,n,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,n,r){this._setStyle(t,r,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const n=this._data,r=this._cachedMeta.data;for(const[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];const i=r.length,s=n.length,o=Math.min(s,i);o&&this.parse(0,o),s>i?this._insertElements(i,s-i,t):s<i&&this._removeElements(s,i-s)}_insertElements(t,n,r=!0){const i=this._cachedMeta,s=i.data,o=t+n;let a;const l=c=>{for(c.length+=n,a=c.length-1;a>=o;a--)c[a]=c[a-n]};for(l(s),a=t;a<o;++a)s[a]=new this.dataElementType;this._parsing&&l(i._parsed),this.parse(t,n),r&&this.updateElements(s,t,n,"reset")}updateElements(t,n,r,i){}_removeElements(t,n){const r=this._cachedMeta;if(this._parsing){const i=r._parsed.splice(t,n);r._stacked&&ks(r,i)}r.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[n,r,i]=t;this[n](r,i)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,n){n&&this._sync(["_removeElements",t,n]);const r=arguments.length-2;r&&this._sync(["_insertElements",t,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}z(an,"defaults",{}),z(an,"datasetElementType",null),z(an,"dataElementType",null);function BP(e,t){if(!e._cache.$bar){const n=e.getMatchingVisibleMetas(t);let r=[];for(let i=0,s=n.length;i<s;i++)r=r.concat(n[i].controller.getAllParsedValues(e));e._cache.$bar=ax(r.sort((i,s)=>i-s))}return e._cache.$bar}function jP(e){const t=e.iScale,n=BP(t,e.type);let r=t._length,i,s,o,a;const l=()=>{o===32767||o===-32768||(Io(a)&&(r=Math.min(r,Math.abs(o-a)||r)),a=o)};for(i=0,s=n.length;i<s;++i)o=t.getPixelForValue(n[i]),l();for(a=void 0,i=0,s=t.ticks.length;i<s;++i)o=t.getPixelForTick(i),l();return r}function GP(e,t,n,r){const i=n.barThickness;let s,o;return pe(i)?(s=t.min*n.categoryPercentage,o=n.barPercentage):(s=i*r,o=1),{chunk:s/r,ratio:o,start:t.pixels[e]-s/2}}function $P(e,t,n,r){const i=t.pixels,s=i[e];let o=e>0?i[e-1]:null,a=e<i.length-1?i[e+1]:null;const l=n.categoryPercentage;o===null&&(o=s-(a===null?t.end-t.start:a-s)),a===null&&(a=s+s-o);const c=s-(s-Math.min(o,a))/2*l;return{chunk:Math.abs(a-o)/2*l/r,ratio:n.barPercentage,start:c}}function WP(e,t,n,r){const i=n.parse(e[0],r),s=n.parse(e[1],r),o=Math.min(i,s),a=Math.max(i,s);let l=o,c=a;Math.abs(o)>Math.abs(a)&&(l=a,c=o),t[n.axis]=c,t._custom={barStart:l,barEnd:c,start:i,end:s,min:o,max:a}}function kx(e,t,n,r){return Ze(e)?WP(e,t,n,r):t[n.axis]=n.parse(e,r),t}function Qp(e,t,n,r){const i=e.iScale,s=e.vScale,o=i.getLabels(),a=i===s,l=[];let c,u,d,f;for(c=n,u=n+r;c<u;++c)f=t[c],d={},d[i.axis]=a||i.parse(o[c],c),l.push(kx(f,d,s,c));return l}function wu(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function HP(e,t,n){return e!==0?Tn(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}function zP(e){let t,n,r,i,s;return e.horizontal?(t=e.base>e.x,n="left",r="right"):(t=e.base<e.y,n="bottom",r="top"),t?(i="end",s="start"):(i="start",s="end"),{start:n,end:r,reverse:t,top:i,bottom:s}}function YP(e,t,n,r){let i=t.borderSkipped;const s={};if(!i){e.borderSkipped=s;return}if(i===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:o,end:a,reverse:l,top:c,bottom:u}=zP(e);i==="middle"&&n&&(e.enableBorderRadius=!0,(n._top||0)===r?i=c:(n._bottom||0)===r?i=u:(s[Kp(u,o,a,l)]=!0,i=c)),s[Kp(i,o,a,l)]=!0,e.borderSkipped=s}function Kp(e,t,n,r){return r?(e=XP(e,t,n),e=qp(e,n,t)):e=qp(e,t,n),e}function XP(e,t,n){return e===t?n:e===n?t:e}function qp(e,t,n){return e==="start"?t:e==="end"?n:e}function ZP(e,{inflateAmount:t},n){e.inflateAmount=t==="auto"?n===1?.33:0:t}class no extends an{parsePrimitiveData(t,n,r,i){return Qp(t,n,r,i)}parseArrayData(t,n,r,i){return Qp(t,n,r,i)}parseObjectData(t,n,r,i){const{iScale:s,vScale:o}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=s.axis==="x"?a:l,u=o.axis==="x"?a:l,d=[];let f,h,g,p;for(f=r,h=r+i;f<h;++f)p=n[f],g={},g[s.axis]=s.parse($r(p,c),f),d.push(kx($r(p,u),g,o,f));return d}updateRangeFromParsed(t,n,r,i){super.updateRangeFromParsed(t,n,r,i);const s=r._custom;s&&n===this._cachedMeta.vScale&&(t.min=Math.min(t.min,s.min),t.max=Math.max(t.max,s.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const n=this._cachedMeta,{iScale:r,vScale:i}=n,s=this.getParsed(t),o=s._custom,a=wu(o)?"["+o.start+", "+o.end+"]":""+i.getLabelForValue(s[i.axis]);return{label:""+r.getLabelForValue(s[r.axis]),value:a}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,t)}updateElements(t,n,r,i){const s=i==="reset",{index:o,_cachedMeta:{vScale:a}}=this,l=a.getBasePixel(),c=a.isHorizontal(),u=this._getRuler(),{sharedOptions:d,includeOptions:f}=this._getSharedOptions(n,i);for(let h=n;h<n+r;h++){const g=this.getParsed(h),p=s||pe(g[a.axis])?{base:l,head:l}:this._calculateBarValuePixels(h),m=this._calculateBarIndexPixels(h,u),b=(g._stacks||{})[a.axis],x={horizontal:c,base:p.base,enableBorderRadius:!b||wu(g._custom)||o===b._top||o===b._bottom,x:c?p.head:m.center,y:c?m.center:p.head,height:c?m.size:Math.abs(p.size),width:c?Math.abs(p.size):m.size};f&&(x.options=d||this.resolveDataElementOptions(h,t[h].active?"active":i));const y=x.options||t[h].options;YP(x,y,b,o),ZP(x,y,u.ratio),this.updateElement(t[h],h,x,i)}}_getStacks(t,n){const{iScale:r}=this._cachedMeta,i=r.getMatchingVisibleMetas(this._type).filter(u=>u.controller.options.grouped),s=r.options.stacked,o=[],a=this._cachedMeta.controller.getParsed(n),l=a&&a[r.axis],c=u=>{const d=u._parsed.find(h=>h[r.axis]===l),f=d&&d[u.vScale.axis];if(pe(f)||isNaN(f))return!0};for(const u of i)if(!(n!==void 0&&c(u))&&((s===!1||o.indexOf(u.stack)===-1||s===void 0&&u.stack===void 0)&&o.push(u.stack),u.index===t))break;return o.length||o.push(void 0),o}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const t=this.chart.scales,n=this.chart.options.indexAxis;return Object.keys(t).filter(r=>t[r].axis===n).shift()}_getAxis(){const t={},n=this.getFirstScaleIdForIndexAxis();for(const r of this.chart.data.datasets)t[le(this.chart.options.indexAxis==="x"?r.xAxisID:r.yAxisID,n)]=!0;return Object.keys(t)}_getStackIndex(t,n,r){const i=this._getStacks(t,r),s=n!==void 0?i.indexOf(n):-1;return s===-1?i.length-1:s}_getRuler(){const t=this.options,n=this._cachedMeta,r=n.iScale,i=[];let s,o;for(s=0,o=n.data.length;s<o;++s)i.push(r.getPixelForValue(this.getParsed(s)[r.axis],s));const a=t.barThickness;return{min:a||jP(n),pixels:i,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:t.grouped,ratio:a?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:n,_stacked:r,index:i},options:{base:s,minBarLength:o}}=this,a=s||0,l=this.getParsed(t),c=l._custom,u=wu(c);let d=l[n.axis],f=0,h=r?this.applyStack(n,l,r):d,g,p;h!==d&&(f=h-d,h=d),u&&(d=c.barStart,h=c.barEnd-c.barStart,d!==0&&Tn(d)!==Tn(c.barEnd)&&(f=0),f+=d);const m=!pe(s)&&!u?s:f;let b=n.getPixelForValue(m);if(this.chart.getDataVisibility(t)?g=n.getPixelForValue(f+h):g=b,p=g-b,Math.abs(p)<o){p=HP(p,n,a)*o,d===a&&(b-=p/2);const x=n.getPixelForDecimal(0),y=n.getPixelForDecimal(1),_=Math.min(x,y),w=Math.max(x,y);b=Math.max(Math.min(b,w),_),g=b+p,r&&!u&&(l._stacks[n.axis]._visualValues[i]=n.getValueForPixel(g)-n.getValueForPixel(b))}if(b===n.getPixelForValue(a)){const x=Tn(p)*n.getLineWidthForValue(a)/2;b+=x,p-=x}return{size:p,base:b,head:g,center:g+p/2}}_calculateBarIndexPixels(t,n){const r=n.scale,i=this.options,s=i.skipNull,o=le(i.maxBarThickness,1/0);let a,l;const c=this._getAxisCount();if(n.grouped){const u=s?this._getStackCount(t):n.stackCount,d=i.barThickness==="flex"?$P(t,n,i,u*c):GP(t,n,i,u*c),f=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,h=this._getAxis().indexOf(le(f,this.getFirstScaleIdForIndexAxis())),g=this._getStackIndex(this.index,this._cachedMeta.stack,s?t:void 0)+h;a=d.start+d.chunk*g+d.chunk/2,l=Math.min(o,d.chunk*d.ratio)}else a=r.getPixelForValue(this.getParsed(t)[r.axis],t),l=Math.min(o,n.min*n.ratio);return{base:a-l/2,head:a+l/2,center:a,size:l}}draw(){const t=this._cachedMeta,n=t.vScale,r=t.data,i=r.length;let s=0;for(;s<i;++s)this.getParsed(s)[n.axis]!==null&&!r[s].hidden&&r[s].draw(this._ctx)}}z(no,"id","bar"),z(no,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),z(no,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class qa extends an{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,n,r,i){const s=super.parsePrimitiveData(t,n,r,i);for(let o=0;o<s.length;o++)s[o]._custom=this.resolveDataElementOptions(o+r).radius;return s}parseArrayData(t,n,r,i){const s=super.parseArrayData(t,n,r,i);for(let o=0;o<s.length;o++){const a=n[r+o];s[o]._custom=le(a[2],this.resolveDataElementOptions(o+r).radius)}return s}parseObjectData(t,n,r,i){const s=super.parseObjectData(t,n,r,i);for(let o=0;o<s.length;o++){const a=n[r+o];s[o]._custom=le(a&&a.r&&+a.r,this.resolveDataElementOptions(o+r).radius)}return s}getMaxOverflow(){const t=this._cachedMeta.data;let n=0;for(let r=t.length-1;r>=0;--r)n=Math.max(n,t[r].size(this.resolveDataElementOptions(r))/2);return n>0&&n}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart.data.labels||[],{xScale:i,yScale:s}=n,o=this.getParsed(t),a=i.getLabelForValue(o.x),l=s.getLabelForValue(o.y),c=o._custom;return{label:r[t]||"",value:"("+a+", "+l+(c?", "+c:"")+")"}}update(t){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,t)}updateElements(t,n,r,i){const s=i==="reset",{iScale:o,vScale:a}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(n,i),u=o.axis,d=a.axis;for(let f=n;f<n+r;f++){const h=t[f],g=!s&&this.getParsed(f),p={},m=p[u]=s?o.getPixelForDecimal(.5):o.getPixelForValue(g[u]),b=p[d]=s?a.getBasePixel():a.getPixelForValue(g[d]);p.skip=isNaN(m)||isNaN(b),c&&(p.options=l||this.resolveDataElementOptions(f,h.active?"active":i),s&&(p.options.radius=0)),this.updateElement(h,f,p,i)}}resolveDataElementOptions(t,n){const r=this.getParsed(t);let i=super.resolveDataElementOptions(t,n);i.$shared&&(i=Object.assign({},i,{$shared:!1}));const s=i.radius;return n!=="active"&&(i.radius=0),i.radius+=le(r&&r._custom,s),i}}z(qa,"id","bubble"),z(qa,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),z(qa,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function UP(e,t,n){let r=1,i=1,s=0,o=0;if(t<Ue){const a=e,l=a+t,c=Math.cos(a),u=Math.sin(a),d=Math.cos(l),f=Math.sin(l),h=(y,_,w)=>Mo(y,a,l,!0)?1:Math.max(_,_*n,w,w*n),g=(y,_,w)=>Mo(y,a,l,!0)?-1:Math.min(_,_*n,w,w*n),p=h(0,c,d),m=h(ot,u,f),b=g(Me,c,d),x=g(Me+ot,u,f);r=(p-b)/2,i=(m-x)/2,s=-(p+b)/2,o=-(m+x)/2}return{ratioX:r,ratioY:i,offsetX:s,offsetY:o}}class Tr extends an{constructor(t,n){super(t,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,n){const r=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=r;else{let s=l=>+r[l];if(Ce(r[t])){const{key:l="value"}=this._parsing;s=c=>+$r(r[c],l)}let o,a;for(o=t,a=t+n;o<a;++o)i._parsed[o]=s(o)}}_getRotation(){return xn(this.options.rotation-90)}_getCircumference(){return xn(this.options.circumference)}_getRotationExtents(){let t=Ue,n=-Ue;for(let r=0;r<this.chart.data.datasets.length;++r)if(this.chart.isDatasetVisible(r)&&this.chart.getDatasetMeta(r).type===this._type){const i=this.chart.getDatasetMeta(r).controller,s=i._getRotation(),o=i._getCircumference();t=Math.min(t,s),n=Math.max(n,s+o)}return{rotation:t,circumference:n-t}}update(t){const n=this.chart,{chartArea:r}=n,i=this._cachedMeta,s=i.data,o=this.getMaxBorderWidth()+this.getMaxOffset(s)+this.options.spacing,a=Math.max((Math.min(r.width,r.height)-o)/2,0),l=Math.min(a9(this.options.cutout,a),1),c=this._getRingWeight(this.index),{circumference:u,rotation:d}=this._getRotationExtents(),{ratioX:f,ratioY:h,offsetX:g,offsetY:p}=UP(d,u,l),m=(r.width-o)/f,b=(r.height-o)/h,x=Math.max(Math.min(m,b)/2,0),y=nx(this.options.radius,x),_=Math.max(y*l,0),w=(y-_)/this._getVisibleDatasetWeightTotal();this.offsetX=g*y,this.offsetY=p*y,i.total=this.calculateTotal(),this.outerRadius=y-w*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-w*c,0),this.updateElements(s,0,s.length,t)}_circumference(t,n){const r=this.options,i=this._cachedMeta,s=this._getCircumference();return n&&r.animation.animateRotate||!this.chart.getDataVisibility(t)||i._parsed[t]===null||i.data[t].hidden?0:this.calculateCircumference(i._parsed[t]*s/Ue)}updateElements(t,n,r,i){const s=i==="reset",o=this.chart,a=o.chartArea,c=o.options.animation,u=(a.left+a.right)/2,d=(a.top+a.bottom)/2,f=s&&c.animateScale,h=f?0:this.innerRadius,g=f?0:this.outerRadius,{sharedOptions:p,includeOptions:m}=this._getSharedOptions(n,i);let b=this._getRotation(),x;for(x=0;x<n;++x)b+=this._circumference(x,s);for(x=n;x<n+r;++x){const y=this._circumference(x,s),_=t[x],w={x:u+this.offsetX,y:d+this.offsetY,startAngle:b,endAngle:b+y,circumference:y,outerRadius:g,innerRadius:h};m&&(w.options=p||this.resolveDataElementOptions(x,_.active?"active":i)),b+=y,this.updateElement(_,x,w,i)}}calculateTotal(){const t=this._cachedMeta,n=t.data;let r=0,i;for(i=0;i<n.length;i++){const s=t._parsed[i];s!==null&&!isNaN(s)&&this.chart.getDataVisibility(i)&&!n[i].hidden&&(r+=Math.abs(s))}return r}calculateCircumference(t){const n=this._cachedMeta.total;return n>0&&!isNaN(t)?Ue*(Math.abs(t)/n):0}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],s=Zo(n._parsed[t],r.options.locale);return{label:i[t]||"",value:s}}getMaxBorderWidth(t){let n=0;const r=this.chart;let i,s,o,a,l;if(!t){for(i=0,s=r.data.datasets.length;i<s;++i)if(r.isDatasetVisible(i)){o=r.getDatasetMeta(i),t=o.data,a=o.controller;break}}if(!t)return 0;for(i=0,s=t.length;i<s;++i)l=a.resolveDataElementOptions(i),l.borderAlign!=="inner"&&(n=Math.max(n,l.borderWidth||0,l.hoverBorderWidth||0));return n}getMaxOffset(t){let n=0;for(let r=0,i=t.length;r<i;++r){const s=this.resolveDataElementOptions(r);n=Math.max(n,s.offset||0,s.hoverOffset||0)}return n}_getRingWeightOffset(t){let n=0;for(let r=0;r<t;++r)this.chart.isDatasetVisible(r)&&(n+=this._getRingWeight(r));return n}_getRingWeight(t){return Math.max(le(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}z(Tr,"id","doughnut"),z(Tr,"defaults",{datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"}),z(Tr,"descriptors",{_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),z(Tr,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data,{labels:{pointStyle:r,textAlign:i,color:s,useBorderRadius:o,borderRadius:a}}=t.legend.options;return n.labels.length&&n.datasets.length?n.labels.map((l,c)=>{const d=t.getDatasetMeta(0).controller.getStyle(c);return{text:l,fillStyle:d.backgroundColor,fontColor:s,hidden:!t.getDataVisibility(c),lineDash:d.borderDash,lineDashOffset:d.borderDashOffset,lineJoin:d.borderJoinStyle,lineWidth:d.borderWidth,strokeStyle:d.borderColor,textAlign:i,pointStyle:r,borderRadius:o&&(a||d.borderRadius),index:c}}):[]}},onClick(t,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}}});class el extends an{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:r,data:i=[],_dataset:s}=n,o=this.chart._animationsDisabled;let{start:a,count:l}=ux(n,i,o);this._drawStart=a,this._drawCount=l,dx(n)&&(a=0,l=i.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!s._decimated,r.points=i;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(r,void 0,{animated:!o,options:c},t),this.updateElements(i,a,l,t)}updateElements(t,n,r,i){const s=i==="reset",{iScale:o,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:u,includeOptions:d}=this._getSharedOptions(n,i),f=o.axis,h=a.axis,{spanGaps:g,segment:p}=this.options,m=rs(g)?g:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||s||i==="none",x=n+r,y=t.length;let _=n>0&&this.getParsed(n-1);for(let w=0;w<y;++w){const E=t[w],M=b?E:{};if(w<n||w>=x){M.skip=!0;continue}const S=this.getParsed(w),I=pe(S[h]),A=M[f]=o.getPixelForValue(S[f],w),k=M[h]=s||I?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,S,l):S[h],w);M.skip=isNaN(A)||isNaN(k)||I,M.stop=w>0&&Math.abs(S[f]-_[f])>m,p&&(M.parsed=S,M.raw=c.data[w]),d&&(M.options=u||this.resolveDataElementOptions(w,E.active?"active":i)),b||this.updateElement(E,w,M,i),_=S}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,r=n.options&&n.options.borderWidth||0,i=t.data||[];if(!i.length)return r;const s=i[0].size(this.resolveDataElementOptions(0)),o=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(r,s,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}z(el,"id","line"),z(el,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),z(el,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class ro extends an{constructor(t,n){super(t,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],s=Zo(n._parsed[t].r,r.options.locale);return{label:i[t]||"",value:s}}parseObjectData(t,n,r,i){return xx.bind(this)(t,n,r,i)}update(t){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,t)}getMinMax(){const t=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((r,i)=>{const s=this.getParsed(i).r;!isNaN(s)&&this.chart.getDataVisibility(i)&&(s<n.min&&(n.min=s),s>n.max&&(n.max=s))}),n}_updateRadius(){const t=this.chart,n=t.chartArea,r=t.options,i=Math.min(n.right-n.left,n.bottom-n.top),s=Math.max(i/2,0),o=Math.max(r.cutoutPercentage?s/100*r.cutoutPercentage:1,0),a=(s-o)/t.getVisibleDatasetCount();this.outerRadius=s-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(t,n,r,i){const s=i==="reset",o=this.chart,l=o.options.animation,c=this._cachedMeta.rScale,u=c.xCenter,d=c.yCenter,f=c.getIndexAngle(0)-.5*Me;let h=f,g;const p=360/this.countVisibleElements();for(g=0;g<n;++g)h+=this._computeAngle(g,i,p);for(g=n;g<n+r;g++){const m=t[g];let b=h,x=h+this._computeAngle(g,i,p),y=o.getDataVisibility(g)?c.getDistanceFromCenterForValue(this.getParsed(g).r):0;h=x,s&&(l.animateScale&&(y=0),l.animateRotate&&(b=x=f));const _={x:u,y:d,innerRadius:0,outerRadius:y,startAngle:b,endAngle:x,options:this.resolveDataElementOptions(g,m.active?"active":i)};this.updateElement(m,g,_,i)}}countVisibleElements(){const t=this._cachedMeta;let n=0;return t.data.forEach((r,i)=>{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&n++}),n}_computeAngle(t,n,r){return this.chart.getDataVisibility(t)?xn(this.resolveDataElementOptions(t,n).angle||r):0}}z(ro,"id","polarArea"),z(ro,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),z(ro,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:r,color:i}}=t.legend.options;return n.labels.map((s,o)=>{const l=t.getDatasetMeta(0).controller.getStyle(o);return{text:s,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:i,lineWidth:l.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(o),index:o}})}return[]}},onClick(t,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class Bl extends Tr{}z(Bl,"id","pie"),z(Bl,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class tl extends an{getLabelAndValue(t){const n=this._cachedMeta.vScale,r=this.getParsed(t);return{label:n.getLabels()[t],value:""+n.getLabelForValue(r[n.axis])}}parseObjectData(t,n,r,i){return xx.bind(this)(t,n,r,i)}update(t){const n=this._cachedMeta,r=n.dataset,i=n.data||[],s=n.iScale.getLabels();if(r.points=i,t!=="resize"){const o=this.resolveDatasetElementOptions(t);this.options.showLine||(o.borderWidth=0);const a={_loop:!0,_fullLoop:s.length===i.length,options:o};this.updateElement(r,void 0,a,t)}this.updateElements(i,0,i.length,t)}updateElements(t,n,r,i){const s=this._cachedMeta.rScale,o=i==="reset";for(let a=n;a<n+r;a++){const l=t[a],c=this.resolveDataElementOptions(a,l.active?"active":i),u=s.getPointPositionForValue(a,this.getParsed(a).r),d=o?s.xCenter:u.x,f=o?s.yCenter:u.y,h={x:d,y:f,angle:u.angle,skip:isNaN(d)||isNaN(f),options:c};this.updateElement(l,a,h,i)}}}z(tl,"id","radar"),z(tl,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),z(tl,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class nl extends an{getLabelAndValue(t){const n=this._cachedMeta,r=this.chart.data.labels||[],{xScale:i,yScale:s}=n,o=this.getParsed(t),a=i.getLabelForValue(o.x),l=s.getLabelForValue(o.y);return{label:r[t]||"",value:"("+a+", "+l+")"}}update(t){const n=this._cachedMeta,{data:r=[]}=n,i=this.chart._animationsDisabled;let{start:s,count:o}=ux(n,r,i);if(this._drawStart=s,this._drawCount=o,dx(n)&&(s=0,o=r.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:a,_dataset:l}=n;a._chart=this.chart,a._datasetIndex=this.index,a._decimated=!!l._decimated,a.points=r;const c=this.resolveDatasetElementOptions(t);c.segment=this.options.segment,this.updateElement(a,void 0,{animated:!i,options:c},t)}else this.datasetElementType&&(delete n.dataset,this.datasetElementType=!1);this.updateElements(r,s,o,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,n,r,i){const s=i==="reset",{iScale:o,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,u=this.resolveDataElementOptions(n,i),d=this.getSharedOptions(u),f=this.includeOptions(i,d),h=o.axis,g=a.axis,{spanGaps:p,segment:m}=this.options,b=rs(p)?p:Number.POSITIVE_INFINITY,x=this.chart._animationsDisabled||s||i==="none";let y=n>0&&this.getParsed(n-1);for(let _=n;_<n+r;++_){const w=t[_],E=this.getParsed(_),M=x?w:{},S=pe(E[g]),I=M[h]=o.getPixelForValue(E[h],_),A=M[g]=s||S?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,E,l):E[g],_);M.skip=isNaN(I)||isNaN(A)||S,M.stop=_>0&&Math.abs(E[h]-y[h])>b,m&&(M.parsed=E,M.raw=c.data[_]),f&&(M.options=d||this.resolveDataElementOptions(_,w.active?"active":i)),x||this.updateElement(w,_,M,i),y=E}this.updateSharedOptions(d,i,u)}getMaxOverflow(){const t=this._cachedMeta,n=t.data||[];if(!this.options.showLine){let a=0;for(let l=n.length-1;l>=0;--l)a=Math.max(a,n[l].size(this.resolveDataElementOptions(l))/2);return a>0&&a}const r=t.dataset,i=r.options&&r.options.borderWidth||0;if(!n.length)return i;const s=n[0].size(this.resolveDataElementOptions(0)),o=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,s,o)/2}}z(nl,"id","scatter"),z(nl,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),z(nl,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var JP=Object.freeze({__proto__:null,BarController:no,BubbleController:qa,DoughnutController:Tr,LineController:el,PieController:Bl,PolarAreaController:ro,RadarController:tl,ScatterController:nl});function ei(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class bh{constructor(t){z(this,"options");this.options=t||{}}static override(t){Object.assign(bh.prototype,t)}init(){}formats(){return ei()}parse(){return ei()}format(){return ei()}add(){return ei()}diff(){return ei()}startOf(){return ei()}endOf(){return ei()}}var QP={_date:bh};function KP(e,t,n,r){const{controller:i,data:s,_sorted:o}=e,a=i._cachedMeta.iScale,l=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(a&&t===a.axis&&t!=="r"&&o&&s.length){const c=a._reversePixels?y9:cr;if(r){if(i._sharedOptions){const u=s[0],d=typeof u.getRange=="function"&&u.getRange(t);if(d){const f=c(s,t,n-d),h=c(s,t,n+d);return{lo:f.lo,hi:h.hi}}}}else{const u=c(s,t,n);if(l){const{vScale:d}=i._cachedMeta,{_parsed:f}=e,h=f.slice(0,u.lo+1).reverse().findIndex(p=>!pe(p[d.axis]));u.lo-=Math.max(0,h);const g=f.slice(u.hi).findIndex(p=>!pe(p[d.axis]));u.hi+=Math.max(0,g)}return u}}return{lo:0,hi:s.length-1}}function Pc(e,t,n,r,i){const s=e.getSortedVisibleDatasetMetas(),o=n[t];for(let a=0,l=s.length;a<l;++a){const{index:c,data:u}=s[a],{lo:d,hi:f}=KP(s[a],t,o,i);for(let h=d;h<=f;++h){const g=u[h];g.skip||r(g,c,h)}}}function qP(e){const t=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(r,i){const s=t?Math.abs(r.x-i.x):0,o=n?Math.abs(r.y-i.y):0;return Math.sqrt(Math.pow(s,2)+Math.pow(o,2))}}function Su(e,t,n,r,i){const s=[];return!i&&!e.isPointInArea(t)||Pc(e,n,t,function(a,l,c){!i&&!ur(a,e.chartArea,0)||a.inRange(t.x,t.y,r)&&s.push({element:a,datasetIndex:l,index:c})},!0),s}function e8(e,t,n,r){let i=[];function s(o,a,l){const{startAngle:c,endAngle:u}=o.getProps(["startAngle","endAngle"],r),{angle:d}=sx(o,{x:t.x,y:t.y});Mo(d,c,u)&&i.push({element:o,datasetIndex:a,index:l})}return Pc(e,n,t,s),i}function t8(e,t,n,r,i,s){let o=[];const a=qP(n);let l=Number.POSITIVE_INFINITY;function c(u,d,f){const h=u.inRange(t.x,t.y,i);if(r&&!h)return;const g=u.getCenterPoint(i);if(!(!!s||e.isPointInArea(g))&&!h)return;const m=a(t,g);m<l?(o=[{element:u,datasetIndex:d,index:f}],l=m):m===l&&o.push({element:u,datasetIndex:d,index:f})}return Pc(e,n,t,c),o}function _u(e,t,n,r,i,s){return!s&&!e.isPointInArea(t)?[]:n==="r"&&!r?e8(e,t,n,i):t8(e,t,n,r,i,s)}function e0(e,t,n,r,i){const s=[],o=n==="x"?"inXRange":"inYRange";let a=!1;return Pc(e,n,t,(l,c,u)=>{l[o]&&l[o](t[n],i)&&(s.push({element:l,datasetIndex:c,index:u}),a=a||l.inRange(t.x,t.y,i))}),r&&!a?[]:s}var n8={modes:{index(e,t,n,r){const i=ni(t,e),s=n.axis||"x",o=n.includeInvisible||!1,a=n.intersect?Su(e,i,s,r,o):_u(e,i,s,!1,r,o),l=[];return a.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{const u=a[0].index,d=c.data[u];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:u})}),l):[]},dataset(e,t,n,r){const i=ni(t,e),s=n.axis||"xy",o=n.includeInvisible||!1;let a=n.intersect?Su(e,i,s,r,o):_u(e,i,s,!1,r,o);if(a.length>0){const l=a[0].datasetIndex,c=e.getDatasetMeta(l).data;a=[];for(let u=0;u<c.length;++u)a.push({element:c[u],datasetIndex:l,index:u})}return a},point(e,t,n,r){const i=ni(t,e),s=n.axis||"xy",o=n.includeInvisible||!1;return Su(e,i,s,r,o)},nearest(e,t,n,r){const i=ni(t,e),s=n.axis||"xy",o=n.includeInvisible||!1;return _u(e,i,s,n.intersect,r,o)},x(e,t,n,r){const i=ni(t,e);return e0(e,i,"x",n.intersect,r)},y(e,t,n,r){const i=ni(t,e);return e0(e,i,"y",n.intersect,r)}}};const Rx=["left","top","right","bottom"];function Rs(e,t){return e.filter(n=>n.pos===t)}function t0(e,t){return e.filter(n=>Rx.indexOf(n.pos)===-1&&n.box.axis===t)}function Ps(e,t){return e.sort((n,r)=>{const i=t?r:n,s=t?n:r;return i.weight===s.weight?i.index-s.index:i.weight-s.weight})}function r8(e){const t=[];let n,r,i,s,o,a;for(n=0,r=(e||[]).length;n<r;++n)i=e[n],{position:s,options:{stack:o,stackWeight:a=1}}=i,t.push({index:n,box:i,pos:s,horizontal:i.isHorizontal(),weight:i.weight,stack:o&&s+o,stackWeight:a});return t}function i8(e){const t={};for(const n of e){const{stack:r,pos:i,stackWeight:s}=n;if(!r||!Rx.includes(i))continue;const o=t[r]||(t[r]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=s}return t}function s8(e,t){const n=i8(e),{vBoxMaxWidth:r,hBoxMaxHeight:i}=t;let s,o,a;for(s=0,o=e.length;s<o;++s){a=e[s];const{fullSize:l}=a.box,c=n[a.stack],u=c&&a.stackWeight/c.weight;a.horizontal?(a.width=u?u*r:l&&t.availableWidth,a.height=i):(a.width=r,a.height=u?u*i:l&&t.availableHeight)}return n}function o8(e){const t=r8(e),n=Ps(t.filter(c=>c.box.fullSize),!0),r=Ps(Rs(t,"left"),!0),i=Ps(Rs(t,"right")),s=Ps(Rs(t,"top"),!0),o=Ps(Rs(t,"bottom")),a=t0(t,"x"),l=t0(t,"y");return{fullSize:n,leftAndTop:r.concat(s),rightAndBottom:i.concat(l).concat(o).concat(a),chartArea:Rs(t,"chartArea"),vertical:r.concat(i).concat(l),horizontal:s.concat(o).concat(a)}}function n0(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function Px(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function a8(e,t,n,r){const{pos:i,box:s}=n,o=e.maxPadding;if(!Ce(i)){n.size&&(e[i]-=n.size);const d=r[n.stack]||{size:0,count:1};d.size=Math.max(d.size,n.horizontal?s.height:s.width),n.size=d.size/d.count,e[i]+=n.size}s.getPadding&&Px(o,s.getPadding());const a=Math.max(0,t.outerWidth-n0(o,e,"left","right")),l=Math.max(0,t.outerHeight-n0(o,e,"top","bottom")),c=a!==e.w,u=l!==e.h;return e.w=a,e.h=l,n.horizontal?{same:c,other:u}:{same:u,other:c}}function l8(e){const t=e.maxPadding;function n(r){const i=Math.max(t[r]-e[r],0);return e[r]+=i,i}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function c8(e,t){const n=t.maxPadding;function r(i){const s={left:0,top:0,right:0,bottom:0};return i.forEach(o=>{s[o]=Math.max(t[o],n[o])}),s}return r(e?["left","right"]:["top","bottom"])}function js(e,t,n,r){const i=[];let s,o,a,l,c,u;for(s=0,o=e.length,c=0;s<o;++s){a=e[s],l=a.box,l.update(a.width||t.w,a.height||t.h,c8(a.horizontal,t));const{same:d,other:f}=a8(t,n,a,r);c|=d&&i.length,u=u||f,l.fullSize||i.push(a)}return c&&js(i,t,n,r)||u}function xa(e,t,n,r,i){e.top=n,e.left=t,e.right=t+r,e.bottom=n+i,e.width=r,e.height=i}function r0(e,t,n,r){const i=n.padding;let{x:s,y:o}=t;for(const a of e){const l=a.box,c=r[a.stack]||{placed:0,weight:1},u=a.stackWeight/c.weight||1;if(a.horizontal){const d=t.w*u,f=c.size||l.height;Io(c.start)&&(o=c.start),l.fullSize?xa(l,i.left,o,n.outerWidth-i.right-i.left,f):xa(l,t.left+c.placed,o,d,f),c.start=o,c.placed+=d,o=l.bottom}else{const d=t.h*u,f=c.size||l.width;Io(c.start)&&(s=c.start),l.fullSize?xa(l,s,i.top,f,n.outerHeight-i.bottom-i.top):xa(l,s,t.top+c.placed,f,d),c.start=s,c.placed+=d,s=l.right}}t.x=s,t.y=o}var Rt={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(n){t.draw(n)}}]},e.boxes.push(t)},removeBox(e,t){const n=e.boxes?e.boxes.indexOf(t):-1;n!==-1&&e.boxes.splice(n,1)},configure(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},update(e,t,n,r){if(!e)return;const i=yt(e.options.layout.padding),s=Math.max(t-i.width,0),o=Math.max(n-i.height,0),a=o8(e.boxes),l=a.vertical,c=a.horizontal;Fe(e.boxes,p=>{typeof p.beforeLayout=="function"&&p.beforeLayout()});const u=l.reduce((p,m)=>m.box.options&&m.box.options.display===!1?p:p+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:s,availableHeight:o,vBoxMaxWidth:s/2/u,hBoxMaxHeight:o/2}),f=Object.assign({},i);Px(f,yt(r));const h=Object.assign({maxPadding:f,w:s,h:o,x:i.left,y:i.top},i),g=s8(l.concat(c),d);js(a.fullSize,h,d,g),js(l,h,d,g),js(c,h,d,g)&&js(l,h,d,g),l8(h),r0(a.leftAndTop,h,d,g),h.x+=h.w,h.y+=h.h,r0(a.rightAndBottom,h,d,g),e.chartArea={left:h.left,top:h.top,right:h.left+h.w,bottom:h.top+h.h,height:h.h,width:h.w},Fe(a.chartArea,p=>{const m=p.box;Object.assign(m,e.chartArea),m.update(h.w,h.h,{left:0,top:0,right:0,bottom:0})})}};class Ox{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,r){}removeEventListener(t,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,r,i){return n=Math.max(0,n||t.width),r=r||t.height,{width:n,height:Math.max(0,i?Math.floor(n/i):r)}}isAttached(t){return!0}updateConfig(t){}}class u8 extends Ox{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const rl="$chartjs",d8={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},i0=e=>e===null||e==="";function f8(e,t){const n=e.style,r=e.getAttribute("height"),i=e.getAttribute("width");if(e[rl]={initial:{height:r,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",i0(i)){const s=Gp(e,"width");s!==void 0&&(e.width=s)}if(i0(r))if(e.style.height==="")e.height=e.width/(t||2);else{const s=Gp(e,"height");s!==void 0&&(e.height=s)}return e}const Dx=hP?{passive:!0}:!1;function h8(e,t,n){e&&e.addEventListener(t,n,Dx)}function g8(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,Dx)}function p8(e,t){const n=d8[e.type]||e.type,{x:r,y:i}=ni(e,t);return{type:n,chart:t,native:e,x:r!==void 0?r:null,y:i!==void 0?i:null}}function jl(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function m8(e,t,n){const r=e.canvas,i=new MutationObserver(s=>{let o=!1;for(const a of s)o=o||jl(a.addedNodes,r),o=o&&!jl(a.removedNodes,r);o&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function b8(e,t,n){const r=e.canvas,i=new MutationObserver(s=>{let o=!1;for(const a of s)o=o||jl(a.removedNodes,r),o=o&&!jl(a.addedNodes,r);o&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const Ao=new Map;let s0=0;function Fx(){const e=window.devicePixelRatio;e!==s0&&(s0=e,Ao.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function v8(e,t){Ao.size||window.addEventListener("resize",Fx),Ao.set(e,t)}function x8(e){Ao.delete(e),Ao.size||window.removeEventListener("resize",Fx)}function y8(e,t,n){const r=e.canvas,i=r&&mh(r);if(!i)return;const s=cx((a,l)=>{const c=i.clientWidth;n(a,l),c<i.clientWidth&&n()},window),o=new ResizeObserver(a=>{const l=a[0],c=l.contentRect.width,u=l.contentRect.height;c===0&&u===0||s(c,u)});return o.observe(i),v8(e,s),o}function Iu(e,t,n){n&&n.disconnect(),t==="resize"&&x8(e)}function C8(e,t,n){const r=e.canvas,i=cx(s=>{e.ctx!==null&&n(p8(s,e))},e);return h8(r,t,i),i}class w8 extends Ox{acquireContext(t,n){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(f8(t,n),r):null}releaseContext(t){const n=t.canvas;if(!n[rl])return!1;const r=n[rl].initial;["height","width"].forEach(s=>{const o=r[s];pe(o)?n.removeAttribute(s):n.setAttribute(s,o)});const i=r.style||{};return Object.keys(i).forEach(s=>{n.style[s]=i[s]}),n.width=n.width,delete n[rl],!0}addEventListener(t,n,r){this.removeEventListener(t,n);const i=t.$proxies||(t.$proxies={}),o={attach:m8,detach:b8,resize:y8}[n]||C8;i[n]=o(t,n,r)}removeEventListener(t,n){const r=t.$proxies||(t.$proxies={}),i=r[n];if(!i)return;({attach:Iu,detach:Iu,resize:Iu}[n]||g8)(t,n,i),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,r,i){return fP(t,n,r,i)}isAttached(t){const n=t&&mh(t);return!!(n&&n.isConnected)}}function S8(e){return!ph()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?u8:w8}var ja;let Xn=(ja=class{constructor(){z(this,"x");z(this,"y");z(this,"active",!1);z(this,"options");z(this,"$animations")}tooltipPosition(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}hasValue(){return rs(this.x)&&rs(this.y)}getProps(t,n){const r=this.$animations;if(!n||!r)return this;const i={};return t.forEach(s=>{i[s]=r[s]&&r[s].active()?r[s]._to:this[s]}),i}},z(ja,"defaults",{}),z(ja,"defaultRoutes"),ja);function _8(e,t){const n=e.options.ticks,r=I8(e),i=Math.min(n.maxTicksLimit||r,r),s=n.major.enabled?E8(t):[],o=s.length,a=s[0],l=s[o-1],c=[];if(o>i)return A8(t,c,s,o/i),c;const u=M8(s,t,i);if(o>0){let d,f;const h=o>1?Math.round((l-a)/(o-1)):null;for(ya(t,c,u,pe(h)?0:a-h,a),d=0,f=o-1;d<f;d++)ya(t,c,u,s[d],s[d+1]);return ya(t,c,u,l,pe(h)?t.length:l+h),c}return ya(t,c,u),c}function I8(e){const t=e.options.offset,n=e._tickSize(),r=e._length/n+(t?0:1),i=e._maxLength/n;return Math.floor(Math.min(r,i))}function M8(e,t,n){const r=k8(e),i=t.length/n;if(!r)return Math.max(i,1);const s=p9(r);for(let o=0,a=s.length-1;o<a;o++){const l=s[o];if(l>i)return l}return Math.max(i,1)}function E8(e){const t=[];let n,r;for(n=0,r=e.length;n<r;n++)e[n].major&&t.push(n);return t}function A8(e,t,n,r){let i=0,s=n[0],o;for(r=Math.ceil(r),o=0;o<e.length;o++)o===s&&(t.push(e[o]),i++,s=n[i*r])}function ya(e,t,n,r,i){const s=le(r,0),o=Math.min(le(i,e.length),e.length);let a=0,l,c,u;for(n=Math.ceil(n),i&&(l=i-r,n=l/Math.floor(l/n)),u=s;u<0;)a++,u=Math.round(s+a*n);for(c=Math.max(s,0);c<o;c++)c===u&&(t.push(e[c]),a++,u=Math.round(s+a*n))}function k8(e){const t=e.length;let n,r;if(t<2)return!1;for(r=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==r)return!1;return r}const R8=e=>e==="left"?"right":e==="right"?"left":e,o0=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,a0=(e,t)=>Math.min(t||e,e);function l0(e,t){const n=[],r=e.length/t,i=e.length;let s=0;for(;s<i;s+=r)n.push(e[Math.floor(s)]);return n}function P8(e,t,n){const r=e.ticks.length,i=Math.min(t,r-1),s=e._startPixel,o=e._endPixel,a=1e-6;let l=e.getPixelForTick(i),c;if(!(n&&(r===1?c=Math.max(l-s,o-l):t===0?c=(e.getPixelForTick(1)-l)/2:c=(l-e.getPixelForTick(i-1))/2,l+=i<t?c:-c,l<s-a||l>o+a)))return l}function O8(e,t){Fe(e,n=>{const r=n.gc,i=r.length/2;let s;if(i>t){for(s=0;s<i;++s)delete n.data[r[s]];r.splice(0,i)}})}function Os(e){return e.drawTicks?e.tickLength:0}function c0(e,t){if(!e.display)return 0;const n=ut(e.font,t),r=yt(e.padding);return(Ze(e.text)?e.text.length:1)*n.lineHeight+r.height}function D8(e,t){return Xr(e,{scale:t,type:"scale"})}function F8(e,t,n){return Xr(e,{tick:n,index:t,type:"tick"})}function T8(e,t,n){let r=ch(e);return(n&&t!=="right"||!n&&t==="right")&&(r=R8(r)),r}function N8(e,t,n,r){const{top:i,left:s,bottom:o,right:a,chart:l}=e,{chartArea:c,scales:u}=l;let d=0,f,h,g;const p=o-i,m=a-s;if(e.isHorizontal()){if(h=It(r,s,a),Ce(n)){const b=Object.keys(n)[0],x=n[b];g=u[b].getPixelForValue(x)+p-t}else n==="center"?g=(c.bottom+c.top)/2+p-t:g=o0(e,n,t);f=a-s}else{if(Ce(n)){const b=Object.keys(n)[0],x=n[b];h=u[b].getPixelForValue(x)-m+t}else n==="center"?h=(c.left+c.right)/2-m+t:h=o0(e,n,t);g=It(r,o,i),d=n==="left"?-ot:ot}return{titleX:h,titleY:g,maxWidth:f,rotation:d}}class Zr extends Xn{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,n){return t}getUserBounds(){let{_userMin:t,_userMax:n,_suggestedMin:r,_suggestedMax:i}=this;return t=Ht(t,Number.POSITIVE_INFINITY),n=Ht(n,Number.NEGATIVE_INFINITY),r=Ht(r,Number.POSITIVE_INFINITY),i=Ht(i,Number.NEGATIVE_INFINITY),{min:Ht(t,r),max:Ht(n,i),minDefined:rt(t),maxDefined:rt(n)}}getMinMax(t){let{min:n,max:r,minDefined:i,maxDefined:s}=this.getUserBounds(),o;if(i&&s)return{min:n,max:r};const a=this.getMatchingVisibleMetas();for(let l=0,c=a.length;l<c;++l)o=a[l].controller.getMinMax(this,t),i||(n=Math.min(n,o.min)),s||(r=Math.max(r,o.max));return n=s&&n>r?r:n,r=i&&n>r?n:r,{min:Ht(n,Ht(r,n)),max:Ht(r,Ht(n,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Be(this.options.beforeUpdate,[this])}update(t,n,r){const{beginAtZero:i,grace:s,ticks:o}=this.options,a=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=H9(this,s,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a<this.ticks.length;this._convertTicksToLabels(l?l0(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||o.source==="auto")&&(this.ticks=_8(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,n,r;this.isHorizontal()?(n=this.left,r=this.right):(n=this.top,r=this.bottom,t=!t),this._startPixel=n,this._endPixel=r,this._reversePixels=t,this._length=r-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){Be(this.options.afterUpdate,[this])}beforeSetDimensions(){Be(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){Be(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),Be(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Be(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const n=this.options.ticks;let r,i,s;for(r=0,i=t.length;r<i;r++)s=t[r],s.label=Be(n.callback,[s.value,r,t],this)}afterTickToLabelConversion(){Be(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Be(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,r=a0(this.ticks.length,t.ticks.maxTicksLimit),i=n.minRotation||0,s=n.maxRotation;let o=i,a,l,c;if(!this._isVisible()||!n.display||i>=s||r<=1||!this.isHorizontal()){this.labelRotation=i;return}const u=this._getLabelSizes(),d=u.widest.width,f=u.highest.height,h=gt(this.chart.width-d,0,this.maxWidth);a=t.offset?this.maxWidth/r:h/(r-1),d+6>a&&(a=h/(r-(t.offset?.5:1)),l=this.maxHeight-Os(t.grid)-n.padding-c0(t.title,this.chart.options.font),c=Math.sqrt(d*d+f*f),o=ah(Math.min(Math.asin(gt((u.highest.height+6)/a,-1,1)),Math.asin(gt(l/c,-1,1))-Math.asin(gt(f/c,-1,1)))),o=Math.max(i,Math.min(s,o))),this.labelRotation=o}afterCalculateLabelRotation(){Be(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Be(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:r,title:i,grid:s}}=this,o=this._isVisible(),a=this.isHorizontal();if(o){const l=c0(i,n.options.font);if(a?(t.width=this.maxWidth,t.height=Os(s)+l):(t.height=this.maxHeight,t.width=Os(s)+l),r.display&&this.ticks.length){const{first:c,last:u,widest:d,highest:f}=this._getLabelSizes(),h=r.padding*2,g=xn(this.labelRotation),p=Math.cos(g),m=Math.sin(g);if(a){const b=r.mirror?0:m*d.width+p*f.height;t.height=Math.min(this.maxHeight,t.height+b+h)}else{const b=r.mirror?0:p*d.width+m*f.height;t.width=Math.min(this.maxWidth,t.width+b+h)}this._calculatePadding(c,u,m,p)}}this._handleMargins(),a?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,r,i){const{ticks:{align:s,padding:o},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let f=0,h=0;l?c?(f=i*t.width,h=r*n.height):(f=r*t.height,h=i*n.width):s==="start"?h=n.width:s==="end"?f=t.width:s!=="inner"&&(f=t.width/2,h=n.width/2),this.paddingLeft=Math.max((f-u+o)*this.width/(this.width-u),0),this.paddingRight=Math.max((h-d+o)*this.width/(this.width-d),0)}else{let u=n.height/2,d=t.height/2;s==="start"?(u=0,d=t.height):s==="end"&&(u=n.height,d=0),this.paddingTop=u+o,this.paddingBottom=d+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Be(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,r;for(n=0,r=t.length;n<r;n++)pe(t[n].label)&&(t.splice(n,1),r--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const n=this.options.ticks.sampleSize;let r=this.ticks;n<r.length&&(r=l0(r,n)),this._labelSizes=t=this._computeLabelSizes(r,r.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,n,r){const{ctx:i,_longestTextCache:s}=this,o=[],a=[],l=Math.floor(n/a0(n,r));let c=0,u=0,d,f,h,g,p,m,b,x,y,_,w;for(d=0;d<n;d+=l){if(g=t[d].label,p=this._resolveTickFontOptions(d),i.font=m=p.string,b=s[m]=s[m]||{data:{},gc:[]},x=p.lineHeight,y=_=0,!pe(g)&&!Ze(g))y=Nl(i,b.data,b.gc,y,g),_=x;else if(Ze(g))for(f=0,h=g.length;f<h;++f)w=g[f],!pe(w)&&!Ze(w)&&(y=Nl(i,b.data,b.gc,y,w),_+=x);o.push(y),a.push(_),c=Math.max(y,c),u=Math.max(_,u)}O8(s,n);const E=o.indexOf(c),M=a.indexOf(u),S=I=>({width:o[I]||0,height:a[I]||0});return{first:S(0),last:S(n-1),widest:S(E),highest:S(M),widths:o,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return x9(this._alignToPixels?qr(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&t<n.length){const r=n[t];return r.$context||(r.$context=F8(this.getContext(),t,r))}return this.$context||(this.$context=D8(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=xn(this.labelRotation),r=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),s=this._getLabelSizes(),o=t.autoSkipPadding||0,a=s?s.widest.width+o:0,l=s?s.highest.height+o:0;return this.isHorizontal()?l*r>a*i?a/r:l/i:l*i<a*r?l/r:a/i}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const n=this.axis,r=this.chart,i=this.options,{grid:s,position:o,border:a}=i,l=s.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),f=Os(s),h=[],g=a.setContext(this.getContext()),p=g.display?g.width:0,m=p/2,b=function(T){return qr(r,T,p)};let x,y,_,w,E,M,S,I,A,k,D,N;if(o==="top")x=b(this.bottom),M=this.bottom-f,I=x-m,k=b(t.top)+m,N=t.bottom;else if(o==="bottom")x=b(this.top),k=t.top,N=b(t.bottom)-m,M=x+m,I=this.top+f;else if(o==="left")x=b(this.right),E=this.right-f,S=x-m,A=b(t.left)+m,D=t.right;else if(o==="right")x=b(this.left),A=t.left,D=b(t.right)-m,E=x+m,S=this.left+f;else if(n==="x"){if(o==="center")x=b((t.top+t.bottom)/2+.5);else if(Ce(o)){const T=Object.keys(o)[0],L=o[T];x=b(this.chart.scales[T].getPixelForValue(L))}k=t.top,N=t.bottom,M=x+m,I=M+f}else if(n==="y"){if(o==="center")x=b((t.left+t.right)/2);else if(Ce(o)){const T=Object.keys(o)[0],L=o[T];x=b(this.chart.scales[T].getPixelForValue(L))}E=x-m,S=E-f,A=t.left,D=t.right}const V=le(i.ticks.maxTicksLimit,d),P=Math.max(1,Math.ceil(d/V));for(y=0;y<d;y+=P){const T=this.getContext(y),L=s.setContext(T),R=a.setContext(T),O=L.lineWidth,$=L.color,Y=R.dash||[],W=R.dashOffset,G=L.tickWidth,se=L.tickColor,ce=L.tickBorderDash||[],me=L.tickBorderDashOffset;_=P8(this,y,l),_!==void 0&&(w=qr(r,_,O),c?E=S=A=D=w:M=I=k=N=w,h.push({tx1:E,ty1:M,tx2:S,ty2:I,x1:A,y1:k,x2:D,y2:N,width:O,color:$,borderDash:Y,borderDashOffset:W,tickWidth:G,tickColor:se,tickBorderDash:ce,tickBorderDashOffset:me}))}return this._ticksLength=d,this._borderValue=x,h}_computeLabelItems(t){const n=this.axis,r=this.options,{position:i,ticks:s}=r,o=this.isHorizontal(),a=this.ticks,{align:l,crossAlign:c,padding:u,mirror:d}=s,f=Os(r.grid),h=f+u,g=d?-u:h,p=-xn(this.labelRotation),m=[];let b,x,y,_,w,E,M,S,I,A,k,D,N="middle";if(i==="top")E=this.bottom-g,M=this._getXAxisLabelAlignment();else if(i==="bottom")E=this.top+g,M=this._getXAxisLabelAlignment();else if(i==="left"){const P=this._getYAxisLabelAlignment(f);M=P.textAlign,w=P.x}else if(i==="right"){const P=this._getYAxisLabelAlignment(f);M=P.textAlign,w=P.x}else if(n==="x"){if(i==="center")E=(t.top+t.bottom)/2+h;else if(Ce(i)){const P=Object.keys(i)[0],T=i[P];E=this.chart.scales[P].getPixelForValue(T)+h}M=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")w=(t.left+t.right)/2-h;else if(Ce(i)){const P=Object.keys(i)[0],T=i[P];w=this.chart.scales[P].getPixelForValue(T)}M=this._getYAxisLabelAlignment(f).textAlign}n==="y"&&(l==="start"?N="top":l==="end"&&(N="bottom"));const V=this._getLabelSizes();for(b=0,x=a.length;b<x;++b){y=a[b],_=y.label;const P=s.setContext(this.getContext(b));S=this.getPixelForTick(b)+s.labelOffset,I=this._resolveTickFontOptions(b),A=I.lineHeight,k=Ze(_)?_.length:1;const T=k/2,L=P.color,R=P.textStrokeColor,O=P.textStrokeWidth;let $=M;o?(w=S,M==="inner"&&(b===x-1?$=this.options.reverse?"left":"right":b===0?$=this.options.reverse?"right":"left":$="center"),i==="top"?c==="near"||p!==0?D=-k*A+A/2:c==="center"?D=-V.highest.height/2-T*A+A:D=-V.highest.height+A/2:c==="near"||p!==0?D=A/2:c==="center"?D=V.highest.height/2-T*A:D=V.highest.height-k*A,d&&(D*=-1),p!==0&&!P.showLabelBackdrop&&(w+=A/2*Math.sin(p))):(E=S,D=(1-k)*A/2);let Y;if(P.showLabelBackdrop){const W=yt(P.backdropPadding),G=V.heights[b],se=V.widths[b];let ce=D-W.top,me=0-W.left;switch(N){case"middle":ce-=G/2;break;case"bottom":ce-=G;break}switch(M){case"center":me-=se/2;break;case"right":me-=se;break;case"inner":b===x-1?me-=se:b>0&&(me-=se/2);break}Y={left:me,top:ce,width:se+W.width,height:G+W.height,color:P.backdropColor}}m.push({label:_,font:I,textOffset:D,options:{rotation:p,color:L,strokeColor:R,strokeWidth:O,textAlign:$,textBaseline:N,translation:[w,E],backdrop:Y}})}return m}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-xn(this.labelRotation))return t==="top"?"left":"right";let i="center";return n.align==="start"?i="left":n.align==="end"?i="right":n.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:r,mirror:i,padding:s}}=this.options,o=this._getLabelSizes(),a=t+s,l=o.widest.width;let c,u;return n==="left"?i?(u=this.right+s,r==="near"?c="left":r==="center"?(c="center",u+=l/2):(c="right",u+=l)):(u=this.right-a,r==="near"?c="right":r==="center"?(c="center",u-=l/2):(c="left",u=this.left)):n==="right"?i?(u=this.left+s,r==="near"?c="right":r==="center"?(c="center",u-=l/2):(c="left",u-=l)):(u=this.left+a,r==="near"?c="left":r==="center"?(c="center",u+=l/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:n},left:r,top:i,width:s,height:o}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(r,i,s,o),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const i=this.ticks.findIndex(s=>s.value===t);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const n=this.options.grid,r=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let s,o;const a=(l,c,u)=>{!u.width||!u.color||(r.save(),r.lineWidth=u.width,r.strokeStyle=u.color,r.setLineDash(u.borderDash||[]),r.lineDashOffset=u.borderDashOffset,r.beginPath(),r.moveTo(l.x,l.y),r.lineTo(c.x,c.y),r.stroke(),r.restore())};if(n.display)for(s=0,o=i.length;s<o;++s){const l=i[s];n.drawOnChartArea&&a({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),n.drawTicks&&a({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:n,options:{border:r,grid:i}}=this,s=r.setContext(this.getContext()),o=r.display?s.width:0;if(!o)return;const a=i.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,u,d,f;this.isHorizontal()?(c=qr(t,this.left,o)-o/2,u=qr(t,this.right,a)+a/2,d=f=l):(d=qr(t,this.top,o)-o/2,f=qr(t,this.bottom,a)+a/2,c=u=l),n.save(),n.lineWidth=s.width,n.strokeStyle=s.color,n.beginPath(),n.moveTo(c,d),n.lineTo(u,f),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;const r=this.ctx,i=this._computeLabelArea();i&&gi(r,i);const s=this.getLabelItems(t);for(const o of s){const a=o.options,l=o.font,c=o.label,u=o.textOffset;Mi(r,c,0,u,l,a)}i&&pi(r)}drawTitle(){const{ctx:t,options:{position:n,title:r,reverse:i}}=this;if(!r.display)return;const s=ut(r.font),o=yt(r.padding),a=r.align;let l=s.lineHeight/2;n==="bottom"||n==="center"||Ce(n)?(l+=o.bottom,Ze(r.text)&&(l+=s.lineHeight*(r.text.length-1))):l+=o.top;const{titleX:c,titleY:u,maxWidth:d,rotation:f}=N8(this,l,n,a);Mi(t,r.text,0,0,s,{color:r.color,maxWidth:d,rotation:f,textAlign:T8(a,n,i),textBaseline:"middle",translation:[c,u]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,n=t.ticks&&t.ticks.z||0,r=le(t.grid&&t.grid.z,-1),i=le(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==Zr.prototype.draw?[{z:n,draw:s=>{this.draw(s)}}]:[{z:r,draw:s=>{this.drawBackground(),this.drawGrid(s),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:s=>{this.drawLabels(s)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",i=[];let s,o;for(s=0,o=n.length;s<o;++s){const a=n[s];a[r]===this.id&&(!t||a.type===t)&&i.push(a)}return i}_resolveTickFontOptions(t){const n=this.options.ticks.setContext(this.getContext(t));return ut(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Ca{constructor(t,n,r){this.type=t,this.scope=n,this.override=r,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const n=Object.getPrototypeOf(t);let r;B8(n)&&(r=this.register(n));const i=this.items,s=t.id,o=this.scope+"."+s;if(!s)throw new Error("class does not have id: "+t);return s in i||(i[s]=t,L8(t,o,r),this.override&&Je.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const n=this.items,r=t.id,i=this.scope;r in n&&delete n[r],i&&r in Je[i]&&(delete Je[i][r],this.override&&delete Ii[r])}}function L8(e,t,n){const r=pt(Object.create(null),[n?Je.get(n):{},Je.get(t),e.defaults]);Je.set(t,r),e.defaultRoutes&&V8(t,e.defaultRoutes),e.descriptors&&Je.describe(t,e.descriptors)}function V8(e,t){Object.keys(t).forEach(n=>{const r=n.split("."),i=r.pop(),s=[e].concat(r).join("."),o=t[n].split("."),a=o.pop(),l=o.join(".");Je.route(s,i,l,a)})}function B8(e){return"id"in e&&"defaults"in e}class j8{constructor(){this.controllers=new Ca(an,"datasets",!0),this.elements=new Ca(Xn,"elements"),this.plugins=new Ca(Object,"plugins"),this.scales=new Ca(Zr,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,n,r){[...n].forEach(i=>{const s=r||this._getRegistryForType(i);r||s.isForType(i)||s===this.plugins&&i.id?this._exec(t,s,i):Fe(i,o=>{const a=r||this._getRegistryForType(o);this._exec(t,a,o)})})}_exec(t,n,r){const i=oh(t);Be(r["before"+i],[],r),n[t](r),Be(r["after"+i],[],r)}_getRegistryForType(t){for(let n=0;n<this._typedRegistries.length;n++){const r=this._typedRegistries[n];if(r.isForType(t))return r}return this.plugins}_get(t,n,r){const i=n.get(t);if(i===void 0)throw new Error('"'+t+'" is not a registered '+r+".");return i}}var Nt=new j8;class G8{constructor(){this._init=void 0}notify(t,n,r,i){if(n==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install")),this._init===void 0)return;const s=i?this._descriptors(t).filter(i):this._descriptors(t),o=this._notify(s,t,n,r);return n==="afterDestroy"&&(this._notify(s,t,"stop"),this._notify(this._init,t,"uninstall"),this._init=void 0),o}_notify(t,n,r,i){i=i||{};for(const s of t){const o=s.plugin,a=o[r],l=[n,i,s.options];if(Be(a,l,o)===!1&&i.cancelable)return!1}return!0}invalidate(){pe(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),n}_createDescriptors(t,n){const r=t&&t.config,i=le(r.options&&r.options.plugins,{}),s=$8(r);return i===!1&&!n?[]:H8(t,s,i,n)}_notifyStateChanges(t){const n=this._oldCache||[],r=this._cache,i=(s,o)=>s.filter(a=>!o.some(l=>a.plugin.id===l.plugin.id));this._notify(i(n,r),t,"stop"),this._notify(i(r,n),t,"start")}}function $8(e){const t={},n=[],r=Object.keys(Nt.plugins.items);for(let s=0;s<r.length;s++)n.push(Nt.getPlugin(r[s]));const i=e.plugins||[];for(let s=0;s<i.length;s++){const o=i[s];n.indexOf(o)===-1&&(n.push(o),t[o.id]=!0)}return{plugins:n,localIds:t}}function W8(e,t){return!t&&e===!1?null:e===!0?{}:e}function H8(e,{plugins:t,localIds:n},r,i){const s=[],o=e.getContext();for(const a of t){const l=a.id,c=W8(r[l],i);c!==null&&s.push({plugin:a,options:z8(e.config,{plugin:a,local:n[l]},c,o)})}return s}function z8(e,{plugin:t,local:n},r,i){const s=e.pluginScopeKeys(t),o=e.getOptionScopes(r,s);return n&&t.defaults&&o.push(t.defaults),e.createResolver(o,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function _d(e,t){const n=Je.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function Y8(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function X8(e,t){return e===t?"_index_":"_value_"}function u0(e){if(e==="x"||e==="y"||e==="r")return e}function Z8(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function Id(e,...t){if(u0(e))return e;for(const n of t){const r=n.axis||Z8(n.position)||e.length>1&&u0(e[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function d0(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function U8(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(r=>r.xAxisID===e||r.yAxisID===e);if(n.length)return d0(e,"x",n[0])||d0(e,"y",n[0])}return{}}function J8(e,t){const n=Ii[e.type]||{scales:{}},r=t.scales||{},i=_d(e.type,t),s=Object.create(null);return Object.keys(r).forEach(o=>{const a=r[o];if(!Ce(a))return console.error(`Invalid scale configuration for scale: ${o}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${o}`);const l=Id(o,a,U8(o,e),Je.scales[a.type]),c=X8(l,i),u=n.scales||{};s[o]=Ks(Object.create(null),[{axis:l},a,u[l],u[c]])}),e.data.datasets.forEach(o=>{const a=o.type||e.type,l=o.indexAxis||_d(a,t),u=(Ii[a]||{}).scales||{};Object.keys(u).forEach(d=>{const f=Y8(d,l),h=o[f+"AxisID"]||f;s[h]=s[h]||Object.create(null),Ks(s[h],[{axis:f},r[h],u[d]])})}),Object.keys(s).forEach(o=>{const a=s[o];Ks(a,[Je.scales[a.type],Je.scale])}),s}function Tx(e){const t=e.options||(e.options={});t.plugins=le(t.plugins,{}),t.scales=J8(e,t)}function Nx(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function Q8(e){return e=e||{},e.data=Nx(e.data),Tx(e),e}const f0=new Map,Lx=new Set;function wa(e,t){let n=f0.get(e);return n||(n=t(),f0.set(e,n),Lx.add(n)),n}const Ds=(e,t,n)=>{const r=$r(t,n);r!==void 0&&e.add(r)};class K8{constructor(t){this._config=Q8(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Nx(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),Tx(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return wa(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return wa(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return wa(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,r=this.type;return wa(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const r=this._scopeCache;let i=r.get(t);return(!i||n)&&(i=new Map,r.set(t,i)),i}getOptionScopes(t,n,r){const{options:i,type:s}=this,o=this._cachedScopes(t,r),a=o.get(n);if(a)return a;const l=new Set;n.forEach(u=>{t&&(l.add(t),u.forEach(d=>Ds(l,t,d))),u.forEach(d=>Ds(l,i,d)),u.forEach(d=>Ds(l,Ii[s]||{},d)),u.forEach(d=>Ds(l,Je,d)),u.forEach(d=>Ds(l,Sd,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),Lx.has(n)&&o.set(n,c),c}chartOptionScopes(){const{options:t,type:n}=this;return[t,Ii[n]||{},Je.datasets[n]||{},{type:n},Je,Sd]}resolveNamedOptions(t,n,r,i=[""]){const s={$shared:!0},{resolver:o,subPrefixes:a}=h0(this._resolverCache,t,i);let l=o;if(eO(o,n)){s.$shared=!1,r=Wr(r)?r():r;const c=this.createResolver(t,r,a);l=is(o,r,c)}for(const c of n)s[c]=l[c];return s}createResolver(t,n,r=[""],i){const{resolver:s}=h0(this._resolverCache,t,r);return Ce(n)?is(s,n,void 0,i):s}}function h0(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));const i=n.join();let s=r.get(i);return s||(s={resolver:fh(t,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},r.set(i,s)),s}const q8=e=>Ce(e)&&Object.getOwnPropertyNames(e).some(t=>Wr(e[t]));function eO(e,t){const{isScriptable:n,isIndexable:r}=px(e);for(const i of t){const s=n(i),o=r(i),a=(o||s)&&e[i];if(s&&(Wr(a)||q8(a))||o&&Ze(a))return!0}return!1}var tO="4.5.1";const nO=["top","bottom","left","right","chartArea"];function g0(e,t){return e==="top"||e==="bottom"||nO.indexOf(e)===-1&&t==="x"}function p0(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function m0(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),Be(n&&n.onComplete,[e],t)}function rO(e){const t=e.chart,n=t.options.animation;Be(n&&n.onProgress,[e],t)}function Vx(e){return ph()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const il={},b0=e=>{const t=Vx(e);return Object.values(il).filter(n=>n.canvas===t).pop()};function iO(e,t,n){const r=Object.keys(e);for(const i of r){const s=+i;if(s>=t){const o=e[i];delete e[i],(n>0||s>t)&&(e[s+n]=o)}}}function sO(e,t,n,r){return!n||e.type==="mouseout"?null:r?t:e}var Ar;let mt=(Ar=class{static register(...t){Nt.add(...t),v0()}static unregister(...t){Nt.remove(...t),v0()}constructor(t,n){const r=this.config=new K8(n),i=Vx(t),s=b0(i);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.");const o=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||S8(i)),this.platform.updateConfig(r);const a=this.platform.acquireContext(i,o.aspectRatio),l=a&&a.canvas,c=l&&l.height,u=l&&l.width;if(this.id=o9(),this.ctx=a,this.canvas=l,this.width=u,this.height=c,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new G8,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=S9(d=>this.update(d),o.resizeDelay||0),this._dataChanges=[],il[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Kn.listen(this,"complete",m0),Kn.listen(this,"progress",rO),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:r,height:i,_aspectRatio:s}=this;return pe(t)?n&&s?s:i?r/i:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return Nt}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():jp(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Lp(this.canvas,this.ctx),this}stop(){return Kn.stop(this),this}resize(t,n){Kn.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const r=this.options,i=this.canvas,s=r.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(i,t,n,s),a=r.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,jp(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),Be(r.onResize,[this,o],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};Fe(n,(r,i)=>{r.id=i})}buildOrUpdateScales(){const t=this.options,n=t.scales,r=this.scales,i=Object.keys(r).reduce((o,a)=>(o[a]=!1,o),{});let s=[];n&&(s=s.concat(Object.keys(n).map(o=>{const a=n[o],l=Id(o,a),c=l==="r",u=l==="x";return{options:a,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),Fe(s,o=>{const a=o.options,l=a.id,c=Id(l,a),u=le(a.type,o.dtype);(a.position===void 0||g0(a.position,c)!==g0(o.dposition))&&(a.position=o.dposition),i[l]=!0;let d=null;if(l in r&&r[l].type===u)d=r[l];else{const f=Nt.getScale(u);d=new f({id:l,type:u,ctx:this.ctx,chart:this}),r[d.id]=d}d.init(a,t)}),Fe(i,(o,a)=>{o||delete r[a]}),Fe(r,o=>{Rt.configure(this,o,o.options),Rt.addBox(this,o)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,r=t.length;if(t.sort((i,s)=>i.index-s.index),r>n){for(let i=n;i<r;++i)this._destroyDatasetMeta(i);t.splice(n,r-n)}this._sortedMetasets=t.slice(0).sort(p0("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((r,i)=>{n.filter(s=>s===r._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let r,i;for(this._removeUnreferencedMetasets(),r=0,i=n.length;r<i;r++){const s=n[r];let o=this.getDatasetMeta(r);const a=s.type||this.config.type;if(o.type&&o.type!==a&&(this._destroyDatasetMeta(r),o=this.getDatasetMeta(r)),o.type=a,o.indexAxis=s.indexAxis||_d(a,this.options),o.order=s.order||0,o.index=r,o.label=""+s.label,o.visible=this.isDatasetVisible(r),o.controller)o.controller.updateIndex(r),o.controller.linkScales();else{const l=Nt.getController(a),{datasetElementType:c,dataElementType:u}=Je.datasets[a];Object.assign(l,{dataElementType:Nt.getElement(u),datasetElementType:c&&Nt.getElement(c)}),o.controller=new l(this,r),t.push(o.controller)}}return this._updateMetasets(),t}_resetElements(){Fe(this.data.datasets,(t,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const s=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let c=0,u=this.data.datasets.length;c<u;c++){const{controller:d}=this.getDatasetMeta(c),f=!i&&s.indexOf(d)===-1;d.buildOrUpdateElements(f),o=Math.max(+d.getMaxOverflow(),o)}o=this._minPadding=r.layout.autoPadding?o:0,this._updateLayout(o),i||Fe(s,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(p0("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){Fe(this.scales,t=>{Rt.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!Ap(n,r)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:i,count:s}of n){const o=r==="_removeElements"?-s:s;iO(t,i,o)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=s=>new Set(t.filter(o=>o[0]===s).map((o,a)=>a+","+o.splice(1).join(","))),i=r(0);for(let s=1;s<n;s++)if(!Ap(i,r(s)))return;return Array.from(i).map(s=>s.split(",")).map(s=>({method:s[1],start:+s[2],count:+s[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Rt.update(this,this.width,this.height,t);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],Fe(this.boxes,i=>{r&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,s)=>{i._idx=s}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n<r;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,r=this.data.datasets.length;n<r;++n)this._updateDataset(n,Wr(t)?t({datasetIndex:n}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,n){const r=this.getDatasetMeta(t),i={meta:r,index:t,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(r.controller._update(n),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Kn.has(this)?this.attached&&!Kn.running(this)&&Kn.start(this):(this.draw(),m0({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:r,height:i}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(r,i)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(this.chartArea);for(this._drawDatasets();t<n.length;++t)n[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const n=this._sortedMetasets,r=[];let i,s;for(i=0,s=n.length;i<s;++i){const o=n[i];(!t||o.visible)&&r.push(o)}return r}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let n=t.length-1;n>=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,r={meta:t,index:t.index,cancelable:!0},i=Mx(this,t);this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(i&&gi(n,i),t.controller.draw(),i&&pi(n),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(t){return ur(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,r,i){const s=n8.modes[n];return typeof s=="function"?s(this,t,r,i):[]}getDatasetMeta(t){const n=this.data.datasets[t],r=this._metasets;let i=r.filter(s=>s&&s._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},r.push(i)),i}getContext(){return this.$context||(this.$context=Xr(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const r=this.getDatasetMeta(t);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(t,n){const r=this.getDatasetMeta(t);r.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,r){const i=r?"show":"hide",s=this.getDatasetMeta(t),o=s.controller._resolveAnimations(void 0,i);Io(n)?(s.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),o.update(s,{visible:r}),this.update(a=>a.datasetIndex===t?i:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),Kn.remove(this),t=0,n=this.data.datasets.length;t<n;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:n}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),Lp(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete il[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,n=this.platform,r=(s,o)=>{n.addEventListener(this,s,o),t[s]=o},i=(s,o,a)=>{s.offsetX=o,s.offsetY=a,this._eventHandler(s)};Fe(this.options.events,s=>r(s,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,r=(l,c)=>{n.addEventListener(this,l,c),t[l]=c},i=(l,c)=>{t[l]&&(n.removeEventListener(this,l,c),delete t[l])},s=(l,c)=>{this.canvas&&this.resize(l,c)};let o;const a=()=>{i("attach",a),this.attached=!0,this.resize(),r("resize",s),r("detach",o)};o=()=>{this.attached=!1,i("resize",s),this._stop(),this._resize(0,0),r("attach",a)},n.isAttached(this.canvas)?a():o()}unbindEvents(){Fe(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},Fe(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,r){const i=r?"set":"remove";let s,o,a,l;for(n==="dataset"&&(s=this.getDatasetMeta(t[0].datasetIndex),s.controller["_"+i+"DatasetHoverStyle"]()),a=0,l=t.length;a<l;++a){o=t[a];const c=o&&this.getDatasetMeta(o.datasetIndex).controller;c&&c[i+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const n=this._active||[],r=t.map(({datasetIndex:s,index:o})=>{const a=this.getDatasetMeta(s);if(!a)throw new Error("No dataset found at index "+s);return{datasetIndex:s,element:a.data[o],index:o}});!Dl(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(t,n,r){return this._plugins.notify(this,t,n,r)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,r){const i=this.options.hover,s=(l,c)=>l.filter(u=>!c.some(d=>u.datasetIndex===d.datasetIndex&&u.index===d.index)),o=s(n,t),a=r?t:s(t,n);o.length&&this.updateHoverStyle(o,i.mode,!1),a.length&&i.mode&&this.updateHoverStyle(a,i.mode,!0)}_eventHandler(t,n){const r={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},i=o=>(o.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",r,i)===!1)return;const s=this._handleEvent(t,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,i),(s||r.changed)&&this.render(),this}_handleEvent(t,n,r){const{_active:i=[],options:s}=this,o=n,a=this._getActiveElements(t,i,r,o),l=f9(t),c=sO(t,this._lastEvent,r,l);r&&(this._lastEvent=null,Be(s.onHover,[t,a,this],this),l&&Be(s.onClick,[t,a,this],this));const u=!Dl(a,i);return(u||n)&&(this._active=a,this._updateHoverStyles(a,i,n)),this._lastEvent=c,u}_getActiveElements(t,n,r,i){if(t.type==="mouseout")return[];if(!r)return n;const s=this.options.hover;return this.getElementsAtEventForMode(t,s.mode,s,i)}},z(Ar,"defaults",Je),z(Ar,"instances",il),z(Ar,"overrides",Ii),z(Ar,"registry",Nt),z(Ar,"version",tO),z(Ar,"getChart",b0),Ar);function v0(){return Fe(mt.instances,e=>e._plugins.invalidate())}function oO(e,t,n){const{startAngle:r,x:i,y:s,outerRadius:o,innerRadius:a,options:l}=t,{borderWidth:c,borderJoinStyle:u}=l,d=Math.min(c/o,Et(r-n));if(e.beginPath(),e.arc(i,s,o-c/2,r+d/2,n-d/2),a>0){const f=Math.min(c/a,Et(r-n));e.arc(i,s,a+c/2,n-f/2,r+f/2,!0)}else{const f=Math.min(c/2,o*Et(r-n));if(u==="round")e.arc(i,s,f,n-Me/2,r+Me/2,!0);else if(u==="bevel"){const h=2*f*f,g=-h*Math.cos(n+Me/2)+i,p=-h*Math.sin(n+Me/2)+s,m=h*Math.cos(r+Me/2)+i,b=h*Math.sin(r+Me/2)+s;e.lineTo(g,p),e.lineTo(m,b)}}e.closePath(),e.moveTo(0,0),e.rect(0,0,e.canvas.width,e.canvas.height),e.clip("evenodd")}function aO(e,t,n){const{startAngle:r,pixelMargin:i,x:s,y:o,outerRadius:a,innerRadius:l}=t;let c=i/a;e.beginPath(),e.arc(s,o,a,r-c,n+c),l>i?(c=i/l,e.arc(s,o,l,n+c,r-c,!0)):e.arc(s,o,i,n+ot,r-ot),e.closePath(),e.clip()}function lO(e){return dh(e,["outerStart","outerEnd","innerStart","innerEnd"])}function cO(e,t,n,r){const i=lO(e.options.borderRadius),s=(n-t)/2,o=Math.min(s,r*t/2),a=l=>{const c=(n-Math.min(s,l))*r/2;return gt(l,0,Math.min(s,c))};return{outerStart:a(i.outerStart),outerEnd:a(i.outerEnd),innerStart:gt(i.innerStart,0,o),innerEnd:gt(i.innerEnd,0,o)}}function Bi(e,t,n,r){return{x:n+e*Math.cos(t),y:r+e*Math.sin(t)}}function Gl(e,t,n,r,i,s){const{x:o,y:a,startAngle:l,pixelMargin:c,innerRadius:u}=t,d=Math.max(t.outerRadius+r+n-c,0),f=u>0?u+r+n+c:0;let h=0;const g=i-l;if(r){const P=u>0?u-r:0,T=d>0?d-r:0,L=(P+T)/2,R=L!==0?g*L/(L+r):g;h=(g-R)/2}const p=Math.max(.001,g*d-n/Me)/d,m=(g-p)/2,b=l+m+h,x=i-m-h,{outerStart:y,outerEnd:_,innerStart:w,innerEnd:E}=cO(t,f,d,x-b),M=d-y,S=d-_,I=b+y/M,A=x-_/S,k=f+w,D=f+E,N=b+w/k,V=x-E/D;if(e.beginPath(),s){const P=(I+A)/2;if(e.arc(o,a,d,I,P),e.arc(o,a,d,P,A),_>0){const O=Bi(S,A,o,a);e.arc(O.x,O.y,_,A,x+ot)}const T=Bi(D,x,o,a);if(e.lineTo(T.x,T.y),E>0){const O=Bi(D,V,o,a);e.arc(O.x,O.y,E,x+ot,V+Math.PI)}const L=(x-E/f+(b+w/f))/2;if(e.arc(o,a,f,x-E/f,L,!0),e.arc(o,a,f,L,b+w/f,!0),w>0){const O=Bi(k,N,o,a);e.arc(O.x,O.y,w,N+Math.PI,b-ot)}const R=Bi(M,b,o,a);if(e.lineTo(R.x,R.y),y>0){const O=Bi(M,I,o,a);e.arc(O.x,O.y,y,b-ot,I)}}else{e.moveTo(o,a);const P=Math.cos(I)*d+o,T=Math.sin(I)*d+a;e.lineTo(P,T);const L=Math.cos(A)*d+o,R=Math.sin(A)*d+a;e.lineTo(L,R)}e.closePath()}function uO(e,t,n,r,i){const{fullCircles:s,startAngle:o,circumference:a}=t;let l=t.endAngle;if(s){Gl(e,t,n,r,l,i);for(let c=0;c<s;++c)e.fill();isNaN(a)||(l=o+(a%Ue||Ue))}return Gl(e,t,n,r,l,i),e.fill(),l}function dO(e,t,n,r,i){const{fullCircles:s,startAngle:o,circumference:a,options:l}=t,{borderWidth:c,borderJoinStyle:u,borderDash:d,borderDashOffset:f,borderRadius:h}=l,g=l.borderAlign==="inner";if(!c)return;e.setLineDash(d||[]),e.lineDashOffset=f,g?(e.lineWidth=c*2,e.lineJoin=u||"round"):(e.lineWidth=c,e.lineJoin=u||"bevel");let p=t.endAngle;if(s){Gl(e,t,n,r,p,i);for(let m=0;m<s;++m)e.stroke();isNaN(a)||(p=o+(a%Ue||Ue))}g&&aO(e,t,p),l.selfJoin&&p-o>=Me&&h===0&&u!=="miter"&&oO(e,t,p),s||(Gl(e,t,n,r,p,i),e.stroke())}class dr extends Xn{constructor(n){super();z(this,"circumference");z(this,"endAngle");z(this,"fullCircles");z(this,"innerRadius");z(this,"outerRadius");z(this,"pixelMargin");z(this,"startAngle");this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,n&&Object.assign(this,n)}inRange(n,r,i){const s=this.getProps(["x","y"],i),{angle:o,distance:a}=sx(s,{x:n,y:r}),{startAngle:l,endAngle:c,innerRadius:u,outerRadius:d,circumference:f}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),h=(this.options.spacing+this.options.borderWidth)/2,g=le(f,c-l),p=Mo(o,l,c)&&l!==c,m=g>=Ue||p,b=lr(a,u+h,d+h);return m&&b}getCenterPoint(n){const{x:r,y:i,startAngle:s,endAngle:o,innerRadius:a,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:c,spacing:u}=this.options,d=(s+o)/2,f=(a+l+u+c)/2;return{x:r+Math.cos(d)*f,y:i+Math.sin(d)*f}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:r,circumference:i}=this,s=(r.offset||0)/4,o=(r.spacing||0)/2,a=r.circular;if(this.pixelMargin=r.borderAlign==="inner"?.33:0,this.fullCircles=i>Ue?Math.floor(i/Ue):0,i===0||this.innerRadius<0||this.outerRadius<0)return;n.save();const l=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(l)*s,Math.sin(l)*s);const c=1-Math.sin(Math.min(Me,i||0)),u=s*c;n.fillStyle=r.backgroundColor,n.strokeStyle=r.borderColor,uO(n,this,u,o,a),dO(n,this,u,o,a),n.restore()}}z(dr,"id","arc"),z(dr,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1}),z(dr,"defaultRoutes",{backgroundColor:"backgroundColor"}),z(dr,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function Bx(e,t,n=t){e.lineCap=le(n.borderCapStyle,t.borderCapStyle),e.setLineDash(le(n.borderDash,t.borderDash)),e.lineDashOffset=le(n.borderDashOffset,t.borderDashOffset),e.lineJoin=le(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=le(n.borderWidth,t.borderWidth),e.strokeStyle=le(n.borderColor,t.borderColor)}function fO(e,t,n){e.lineTo(n.x,n.y)}function hO(e){return e.stepped?T9:e.tension||e.cubicInterpolationMode==="monotone"?N9:fO}function jx(e,t,n={}){const r=e.length,{start:i=0,end:s=r-1}=n,{start:o,end:a}=t,l=Math.max(i,o),c=Math.min(s,a),u=i<o&&s<o||i>a&&s>a;return{count:r,start:l,loop:t.loop,ilen:c<l&&!u?r+c-l:c-l}}function gO(e,t,n,r){const{points:i,options:s}=t,{count:o,start:a,loop:l,ilen:c}=jx(i,n,r),u=hO(s);let{move:d=!0,reverse:f}=r||{},h,g,p;for(h=0;h<=c;++h)g=i[(a+(f?c-h:h))%o],!g.skip&&(d?(e.moveTo(g.x,g.y),d=!1):u(e,p,g,f,s.stepped),p=g);return l&&(g=i[(a+(f?c:0))%o],u(e,p,g,f,s.stepped)),!!l}function pO(e,t,n,r){const i=t.points,{count:s,start:o,ilen:a}=jx(i,n,r),{move:l=!0,reverse:c}=r||{};let u=0,d=0,f,h,g,p,m,b;const x=_=>(o+(c?a-_:_))%s,y=()=>{p!==m&&(e.lineTo(u,m),e.lineTo(u,p),e.lineTo(u,b))};for(l&&(h=i[x(0)],e.moveTo(h.x,h.y)),f=0;f<=a;++f){if(h=i[x(f)],h.skip)continue;const _=h.x,w=h.y,E=_|0;E===g?(w<p?p=w:w>m&&(m=w),u=(d*u+_)/++d):(y(),e.lineTo(_,w),g=E,d=0,p=m=w),b=w}y()}function Md(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?pO:gO}function mO(e){return e.stepped?gP:e.tension||e.cubicInterpolationMode==="monotone"?pP:ri}function bO(e,t,n,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,r)&&i.closePath()),Bx(e,t.options),e.stroke(i)}function vO(e,t,n,r){const{segments:i,options:s}=t,o=Md(t);for(const a of i)Bx(e,s,a.style),e.beginPath(),o(e,t,a,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}const xO=typeof Path2D=="function";function yO(e,t,n,r){xO&&!t.options.segment?bO(e,t,n,r):vO(e,t,n,r)}class fr extends Xn{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,n){const r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const i=r.spanGaps?this._loop:this._fullLoop;oP(this._points,r,t,i,n),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=CP(this,this.options.segment))}first(){const t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments,n=this.points,r=t.length;return r&&n[t[r-1].end]}interpolate(t,n){const r=this.options,i=t[n],s=this.points,o=Ix(this,{property:n,start:i,end:i});if(!o.length)return;const a=[],l=mO(r);let c,u;for(c=0,u=o.length;c<u;++c){const{start:d,end:f}=o[c],h=s[d],g=s[f];if(h===g){a.push(h);continue}const p=Math.abs((i-h[n])/(g[n]-h[n])),m=l(h,g,p,r.stepped);m[n]=t[n],a.push(m)}return a.length===1?a[0]:a}pathSegment(t,n,r){return Md(this)(t,this,n,r)}path(t,n,r){const i=this.segments,s=Md(this);let o=this._loop;n=n||0,r=r||this.points.length-n;for(const a of i)o&=s(t,this,a,{start:n,end:n+r-1});return!!o}draw(t,n,r,i){const s=this.options||{};(this.points||[]).length&&s.borderWidth&&(t.save(),yO(t,this,r,i),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}z(fr,"id","line"),z(fr,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),z(fr,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),z(fr,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function x0(e,t,n,r){const i=e.options,{[n]:s}=e.getProps([n],r);return Math.abs(t-s)<i.radius+i.hitRadius}class vi extends Xn{constructor(n){super();z(this,"parsed");z(this,"skip");z(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,n&&Object.assign(this,n)}inRange(n,r,i){const s=this.options,{x:o,y:a}=this.getProps(["x","y"],i);return Math.pow(n-o,2)+Math.pow(r-a,2)<Math.pow(s.hitRadius+s.radius,2)}inXRange(n,r){return x0(this,n,"x",r)}inYRange(n,r){return x0(this,n,"y",r)}getCenterPoint(n){const{x:r,y:i}=this.getProps(["x","y"],n);return{x:r,y:i}}size(n){n=n||this.options||{};let r=n.radius||0;r=Math.max(r,r&&n.hoverRadius||0);const i=r&&n.borderWidth||0;return(r+i)*2}draw(n,r){const i=this.options;this.skip||i.radius<.1||!ur(this,r,this.size(i)/2)||(n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.fillStyle=i.backgroundColor,Ll(n,i,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}z(vi,"id","point"),z(vi,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),z(vi,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function Gx(e,t){const{x:n,y:r,base:i,width:s,height:o}=e.getProps(["x","y","base","width","height"],t);let a,l,c,u,d;return e.horizontal?(d=o/2,a=Math.min(n,i),l=Math.max(n,i),c=r-d,u=r+d):(d=s/2,a=n-d,l=n+d,c=Math.min(r,i),u=Math.max(r,i)),{left:a,top:c,right:l,bottom:u}}function Nr(e,t,n,r){return e?0:gt(t,n,r)}function CO(e,t,n){const r=e.options.borderWidth,i=e.borderSkipped,s=gx(r);return{t:Nr(i.top,s.top,0,n),r:Nr(i.right,s.right,0,t),b:Nr(i.bottom,s.bottom,0,n),l:Nr(i.left,s.left,0,t)}}function wO(e,t,n){const{enableBorderRadius:r}=e.getProps(["enableBorderRadius"]),i=e.options.borderRadius,s=mi(i),o=Math.min(t,n),a=e.borderSkipped,l=r||Ce(i);return{topLeft:Nr(!l||a.top||a.left,s.topLeft,0,o),topRight:Nr(!l||a.top||a.right,s.topRight,0,o),bottomLeft:Nr(!l||a.bottom||a.left,s.bottomLeft,0,o),bottomRight:Nr(!l||a.bottom||a.right,s.bottomRight,0,o)}}function SO(e){const t=Gx(e),n=t.right-t.left,r=t.bottom-t.top,i=CO(e,n/2,r/2),s=wO(e,n/2,r/2);return{outer:{x:t.left,y:t.top,w:n,h:r,radius:s},inner:{x:t.left+i.l,y:t.top+i.t,w:n-i.l-i.r,h:r-i.t-i.b,radius:{topLeft:Math.max(0,s.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,s.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,s.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,s.bottomRight-Math.max(i.b,i.r))}}}}function Mu(e,t,n,r){const i=t===null,s=n===null,a=e&&!(i&&s)&&Gx(e,r);return a&&(i||lr(t,a.left,a.right))&&(s||lr(n,a.top,a.bottom))}function _O(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function IO(e,t){e.rect(t.x,t.y,t.w,t.h)}function Eu(e,t,n={}){const r=e.x!==n.x?-t:0,i=e.y!==n.y?-t:0,s=(e.x+e.w!==n.x+n.w?t:0)-r,o=(e.y+e.h!==n.y+n.h?t:0)-i;return{x:e.x+r,y:e.y+i,w:e.w+s,h:e.h+o,radius:e.radius}}class Nn extends Xn{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:n,options:{borderColor:r,backgroundColor:i}}=this,{inner:s,outer:o}=SO(this),a=_O(o.radius)?Eo:IO;t.save(),(o.w!==s.w||o.h!==s.h)&&(t.beginPath(),a(t,Eu(o,n,s)),t.clip(),a(t,Eu(s,-n,o)),t.fillStyle=r,t.fill("evenodd")),t.beginPath(),a(t,Eu(s,n)),t.fillStyle=i,t.fill(),t.restore()}inRange(t,n,r){return Mu(this,t,n,r)}inXRange(t,n){return Mu(this,t,null,n)}inYRange(t,n){return Mu(this,null,t,n)}getCenterPoint(t){const{x:n,y:r,base:i,horizontal:s}=this.getProps(["x","y","base","horizontal"],t);return{x:s?(n+i)/2:n,y:s?r:(r+i)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}z(Nn,"id","bar"),z(Nn,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),z(Nn,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var MO=Object.freeze({__proto__:null,ArcElement:dr,BarElement:Nn,LineElement:fr,PointElement:vi});const Ed=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],y0=Ed.map(e=>e.replace("rgb(","rgba(").replace(")",", 0.5)"));function $x(e){return Ed[e%Ed.length]}function Wx(e){return y0[e%y0.length]}function EO(e,t){return e.borderColor=$x(t),e.backgroundColor=Wx(t),++t}function AO(e,t){return e.backgroundColor=e.data.map(()=>$x(t++)),t}function kO(e,t){return e.backgroundColor=e.data.map(()=>Wx(t++)),t}function RO(e){let t=0;return(n,r)=>{const i=e.getDatasetMeta(r).controller;i instanceof Tr?t=AO(n,t):i instanceof ro?t=kO(n,t):i&&(t=EO(n,t))}}function C0(e){let t;for(t in e)if(e[t].borderColor||e[t].backgroundColor)return!0;return!1}function PO(e){return e&&(e.borderColor||e.backgroundColor)}function OO(){return Je.borderColor!=="rgba(0,0,0,0.1)"||Je.backgroundColor!=="rgba(0,0,0,0.1)"}var DO={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,t,n){if(!n.enabled)return;const{data:{datasets:r},options:i}=e.config,{elements:s}=i,o=C0(r)||PO(i)||s&&C0(s)||OO();if(!n.forceOverride&&o)return;const a=RO(e);r.forEach(a)}};function FO(e,t,n,r,i){const s=i.samples||r;if(s>=n)return e.slice(t,t+n);const o=[],a=(n-2)/(s-2);let l=0;const c=t+n-1;let u=t,d,f,h,g,p;for(o[l++]=e[u],d=0;d<s-2;d++){let m=0,b=0,x;const y=Math.floor((d+1)*a)+1+t,_=Math.min(Math.floor((d+2)*a)+1,n)+t,w=_-y;for(x=y;x<_;x++)m+=e[x].x,b+=e[x].y;m/=w,b/=w;const E=Math.floor(d*a)+1+t,M=Math.min(Math.floor((d+1)*a)+1,n)+t,{x:S,y:I}=e[u];for(h=g=-1,x=E;x<M;x++)g=.5*Math.abs((S-m)*(e[x].y-I)-(S-e[x].x)*(b-I)),g>h&&(h=g,f=e[x],p=x);o[l++]=f,u=p}return o[l++]=e[c],o}function TO(e,t,n,r){let i=0,s=0,o,a,l,c,u,d,f,h,g,p;const m=[],b=t+n-1,x=e[t].x,_=e[b].x-x;for(o=t;o<t+n;++o){a=e[o],l=(a.x-x)/_*r,c=a.y;const w=l|0;if(w===u)c<g?(g=c,d=o):c>p&&(p=c,f=o),i=(s*i+a.x)/++s;else{const E=o-1;if(!pe(d)&&!pe(f)){const M=Math.min(d,f),S=Math.max(d,f);M!==h&&M!==E&&m.push({...e[M],x:i}),S!==h&&S!==E&&m.push({...e[S],x:i})}o>0&&E!==h&&m.push(e[E]),m.push(a),u=w,s=0,g=p=c,d=f=h=o}}return m}function Hx(e){if(e._decimated){const t=e._data;delete e._decimated,delete e._data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function w0(e){e.data.datasets.forEach(t=>{Hx(t)})}function NO(e,t){const n=t.length;let r=0,i;const{iScale:s}=e,{min:o,max:a,minDefined:l,maxDefined:c}=s.getUserBounds();return l&&(r=gt(cr(t,s.axis,o).lo,0,n-1)),c?i=gt(cr(t,s.axis,a).hi+1,r,n)-r:i=n-r,{start:r,count:i}}var LO={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(e,t,n)=>{if(!n.enabled){w0(e);return}const r=e.width;e.data.datasets.forEach((i,s)=>{const{_data:o,indexAxis:a}=i,l=e.getDatasetMeta(s),c=o||i.data;if(Xe([a,e.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const u=e.scales[l.xAxisID];if(u.type!=="linear"&&u.type!=="time"||e.options.parsing)return;let{start:d,count:f}=NO(l,c);const h=n.threshold||4*r;if(f<=h){Hx(i);return}pe(o)&&(i._data=c,delete i.data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(p){this._data=p}}));let g;switch(n.algorithm){case"lttb":g=FO(c,d,f,r,n);break;case"min-max":g=TO(c,d,f,r);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}i._decimated=g})},destroy(e){w0(e)}};function VO(e,t,n){const r=e.segments,i=e.points,s=t.points,o=[];for(const a of r){let{start:l,end:c}=a;c=Oc(l,c,i);const u=Ad(n,i[l],i[c],a.loop);if(!t.segments){o.push({source:a,target:u,start:i[l],end:i[c]});continue}const d=Ix(t,u);for(const f of d){const h=Ad(n,s[f.start],s[f.end],f.loop),g=_x(a,i,h);for(const p of g)o.push({source:p,target:f,start:{[n]:S0(u,h,"start",Math.max)},end:{[n]:S0(u,h,"end",Math.min)}})}}return o}function Ad(e,t,n,r){if(r)return;let i=t[e],s=n[e];return e==="angle"&&(i=Et(i),s=Et(s)),{property:e,start:i,end:s}}function BO(e,t){const{x:n=null,y:r=null}=e||{},i=t.points,s=[];return t.segments.forEach(({start:o,end:a})=>{a=Oc(o,a,i);const l=i[o],c=i[a];r!==null?(s.push({x:l.x,y:r}),s.push({x:c.x,y:r})):n!==null&&(s.push({x:n,y:l.y}),s.push({x:n,y:c.y}))}),s}function Oc(e,t,n){for(;t>e;t--){const r=n[t];if(!isNaN(r.x)&&!isNaN(r.y))break}return t}function S0(e,t,n,r){return e&&t?r(e[n],t[n]):e?e[n]:t?t[n]:0}function zx(e,t){let n=[],r=!1;return Ze(e)?(r=!0,n=e):n=BO(e,t),n.length?new fr({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function _0(e){return e&&e.fill!==!1}function jO(e,t,n){let i=e[t].fill;const s=[t];let o;if(!n)return i;for(;i!==!1&&s.indexOf(i)===-1;){if(!rt(i))return i;if(o=e[i],!o)return!1;if(o.visible)return i;s.push(i),i=o.fill}return!1}function GO(e,t,n){const r=zO(e);if(Ce(r))return isNaN(r.value)?!1:r;let i=parseFloat(r);return rt(i)&&Math.floor(i)===i?$O(r[0],t,i,n):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function $O(e,t,n,r){return(e==="-"||e==="+")&&(n=t+n),n===t||n<0||n>=r?!1:n}function WO(e,t){let n=null;return e==="start"?n=t.bottom:e==="end"?n=t.top:Ce(e)?n=t.getPixelForValue(e.value):t.getBasePixel&&(n=t.getBasePixel()),n}function HO(e,t,n){let r;return e==="start"?r=n:e==="end"?r=t.options.reverse?t.min:t.max:Ce(e)?r=e.value:r=t.getBaseValue(),r}function zO(e){const t=e.options,n=t.fill;let r=le(n&&n.target,n);return r===void 0&&(r=!!t.backgroundColor),r===!1||r===null?!1:r===!0?"origin":r}function YO(e){const{scale:t,index:n,line:r}=e,i=[],s=r.segments,o=r.points,a=XO(t,n);a.push(zx({x:null,y:t.bottom},r));for(let l=0;l<s.length;l++){const c=s[l];for(let u=c.start;u<=c.end;u++)ZO(i,o[u],a)}return new fr({points:i,options:{}})}function XO(e,t){const n=[],r=e.getMatchingVisibleMetas("line");for(let i=0;i<r.length;i++){const s=r[i];if(s.index===t)break;s.hidden||n.unshift(s.dataset)}return n}function ZO(e,t,n){const r=[];for(let i=0;i<n.length;i++){const s=n[i],{first:o,last:a,point:l}=UO(s,t,"x");if(!(!l||o&&a)){if(o)r.unshift(l);else if(e.push(l),!a)break}}e.push(...r)}function UO(e,t,n){const r=e.interpolate(t,n);if(!r)return{};const i=r[n],s=e.segments,o=e.points;let a=!1,l=!1;for(let c=0;c<s.length;c++){const u=s[c],d=o[u.start][n],f=o[u.end][n];if(lr(i,d,f)){a=i===d,l=i===f;break}}return{first:a,last:l,point:r}}class Yx{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,n,r){const{x:i,y:s,radius:o}=this;return n=n||{start:0,end:Ue},t.arc(i,s,o,n.end,n.start,!0),!r.bounds}interpolate(t){const{x:n,y:r,radius:i}=this,s=t.angle;return{x:n+Math.cos(s)*i,y:r+Math.sin(s)*i,angle:s}}}function JO(e){const{chart:t,fill:n,line:r}=e;if(rt(n))return QO(t,n);if(n==="stack")return YO(e);if(n==="shape")return!0;const i=KO(e);return i instanceof Yx?i:zx(i,r)}function QO(e,t){const n=e.getDatasetMeta(t);return n&&e.isDatasetVisible(t)?n.dataset:null}function KO(e){return(e.scale||{}).getPointPositionForValue?eD(e):qO(e)}function qO(e){const{scale:t={},fill:n}=e,r=WO(n,t);if(rt(r)){const i=t.isHorizontal();return{x:i?r:null,y:i?null:r}}return null}function eD(e){const{scale:t,fill:n}=e,r=t.options,i=t.getLabels().length,s=r.reverse?t.max:t.min,o=HO(n,t,s),a=[];if(r.grid.circular){const l=t.getPointPositionForValue(0,s);return new Yx({x:l.x,y:l.y,radius:t.getDistanceFromCenterForValue(o)})}for(let l=0;l<i;++l)a.push(t.getPointPositionForValue(l,o));return a}function Au(e,t,n){const r=JO(t),{chart:i,index:s,line:o,scale:a,axis:l}=t,c=o.options,u=c.fill,d=c.backgroundColor,{above:f=d,below:h=d}=u||{},g=i.getDatasetMeta(s),p=Mx(i,g);r&&o.points.length&&(gi(e,n),tD(e,{line:o,target:r,above:f,below:h,area:n,scale:a,axis:l,clip:p}),pi(e))}function tD(e,t){const{line:n,target:r,above:i,below:s,area:o,scale:a,clip:l}=t,c=n._loop?"angle":t.axis;e.save();let u=s;s!==i&&(c==="x"?(I0(e,r,o.top),ku(e,{line:n,target:r,color:i,scale:a,property:c,clip:l}),e.restore(),e.save(),I0(e,r,o.bottom)):c==="y"&&(M0(e,r,o.left),ku(e,{line:n,target:r,color:s,scale:a,property:c,clip:l}),e.restore(),e.save(),M0(e,r,o.right),u=i)),ku(e,{line:n,target:r,color:u,scale:a,property:c,clip:l}),e.restore()}function I0(e,t,n){const{segments:r,points:i}=t;let s=!0,o=!1;e.beginPath();for(const a of r){const{start:l,end:c}=a,u=i[l],d=i[Oc(l,c,i)];s?(e.moveTo(u.x,u.y),s=!1):(e.lineTo(u.x,n),e.lineTo(u.x,u.y)),o=!!t.pathSegment(e,a,{move:o}),o?e.closePath():e.lineTo(d.x,n)}e.lineTo(t.first().x,n),e.closePath(),e.clip()}function M0(e,t,n){const{segments:r,points:i}=t;let s=!0,o=!1;e.beginPath();for(const a of r){const{start:l,end:c}=a,u=i[l],d=i[Oc(l,c,i)];s?(e.moveTo(u.x,u.y),s=!1):(e.lineTo(n,u.y),e.lineTo(u.x,u.y)),o=!!t.pathSegment(e,a,{move:o}),o?e.closePath():e.lineTo(n,d.y)}e.lineTo(n,t.first().y),e.closePath(),e.clip()}function ku(e,t){const{line:n,target:r,property:i,color:s,scale:o,clip:a}=t,l=VO(n,r,i);for(const{source:c,target:u,start:d,end:f}of l){const{style:{backgroundColor:h=s}={}}=c,g=r!==!0;e.save(),e.fillStyle=h,nD(e,o,a,g&&Ad(i,d,f)),e.beginPath();const p=!!n.pathSegment(e,c);let m;if(g){p?e.closePath():E0(e,r,f,i);const b=!!r.pathSegment(e,u,{move:p,reverse:!0});m=p&&b,m||E0(e,r,d,i)}e.closePath(),e.fill(m?"evenodd":"nonzero"),e.restore()}}function nD(e,t,n,r){const i=t.chart.chartArea,{property:s,start:o,end:a}=r||{};if(s==="x"||s==="y"){let l,c,u,d;s==="x"?(l=o,c=i.top,u=a,d=i.bottom):(l=i.left,c=o,u=i.right,d=a),e.beginPath(),n&&(l=Math.max(l,n.left),u=Math.min(u,n.right),c=Math.max(c,n.top),d=Math.min(d,n.bottom)),e.rect(l,c,u-l,d-c),e.clip()}}function E0(e,t,n,r){const i=t.interpolate(n,r);i&&e.lineTo(i.x,i.y)}var rD={id:"filler",afterDatasetsUpdate(e,t,n){const r=(e.data.datasets||[]).length,i=[];let s,o,a,l;for(o=0;o<r;++o)s=e.getDatasetMeta(o),a=s.dataset,l=null,a&&a.options&&a instanceof fr&&(l={visible:e.isDatasetVisible(o),index:o,fill:GO(a,o,r),chart:e,axis:s.controller.options.indexAxis,scale:s.vScale,line:a}),s.$filler=l,i.push(l);for(o=0;o<r;++o)l=i[o],!(!l||l.fill===!1)&&(l.fill=jO(i,o,n.propagate))},beforeDraw(e,t,n){const r=n.drawTime==="beforeDraw",i=e.getSortedVisibleDatasetMetas(),s=e.chartArea;for(let o=i.length-1;o>=0;--o){const a=i[o].$filler;a&&(a.line.updateControlPoints(s,a.axis),r&&a.fill&&Au(e.ctx,a,s))}},beforeDatasetsDraw(e,t,n){if(n.drawTime!=="beforeDatasetsDraw")return;const r=e.getSortedVisibleDatasetMetas();for(let i=r.length-1;i>=0;--i){const s=r[i].$filler;_0(s)&&Au(e.ctx,s,e.chartArea)}},beforeDatasetDraw(e,t,n){const r=t.meta.$filler;!_0(r)||n.drawTime!=="beforeDatasetDraw"||Au(e.ctx,r,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const A0=(e,t)=>{let{boxHeight:n=t,boxWidth:r=t}=e;return e.usePointStyle&&(n=Math.min(n,t),r=e.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(t,n)}},iD=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class k0 extends Xn{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n,r){this.maxWidth=t,this.maxHeight=n,this._margins=r,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let n=Be(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(r=>t.filter(r,this.chart.data))),t.sort&&(n=n.sort((r,i)=>t.sort(r,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}const r=t.labels,i=ut(r.font),s=i.size,o=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=A0(r,s);let c,u;n.font=i.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(o,s,a,l)+10):(u=this.maxHeight,c=this._fitCols(o,i,a,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(u,t.maxHeight||this.maxHeight)}_fitRows(t,n,r,i){const{ctx:s,maxWidth:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],u=i+a;let d=t;s.textAlign="left",s.textBaseline="middle";let f=-1,h=-u;return this.legendItems.forEach((g,p)=>{const m=r+n/2+s.measureText(g.text).width;(p===0||c[c.length-1]+m+2*a>o)&&(d+=u,c[c.length-(p>0?0:1)]=0,h+=u,f++),l[p]={left:0,top:h,row:f,width:m,height:i},c[c.length-1]+=m+a}),d}_fitCols(t,n,r,i){const{ctx:s,maxHeight:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],u=o-t;let d=a,f=0,h=0,g=0,p=0;return this.legendItems.forEach((m,b)=>{const{itemWidth:x,itemHeight:y}=sD(r,n,s,m,i);b>0&&h+y+2*a>u&&(d+=f+a,c.push({width:f,height:h}),g+=f+a,p++,f=h=0),l[b]={left:g,top:h,col:p,width:x,height:y},f=Math.max(f,x),h+=y+a}),d+=f,c.push({width:f,height:h}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:i},rtl:s}}=this,o=Ki(s,this.left,this.width);if(this.isHorizontal()){let a=0,l=It(r,this.left+i,this.right-this.lineWidths[a]);for(const c of n)a!==c.row&&(a=c.row,l=It(r,this.left+i,this.right-this.lineWidths[a])),c.top+=this.top+t+i,c.left=o.leftForLtr(o.x(l),c.width),l+=c.width+i}else{let a=0,l=It(r,this.top+t+i,this.bottom-this.columnSizes[a].height);for(const c of n)c.col!==a&&(a=c.col,l=It(r,this.top+t+i,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+i,c.left=o.leftForLtr(o.x(c.left),c.width),l+=c.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;gi(t,this),this._draw(),pi(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:r,ctx:i}=this,{align:s,labels:o}=t,a=Je.color,l=Ki(t.rtl,this.left,this.width),c=ut(o.font),{padding:u}=o,d=c.size,f=d/2;let h;this.drawTitle(),i.textAlign=l.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=c.string;const{boxWidth:g,boxHeight:p,itemHeight:m}=A0(o,d),b=function(E,M,S){if(isNaN(g)||g<=0||isNaN(p)||p<0)return;i.save();const I=le(S.lineWidth,1);if(i.fillStyle=le(S.fillStyle,a),i.lineCap=le(S.lineCap,"butt"),i.lineDashOffset=le(S.lineDashOffset,0),i.lineJoin=le(S.lineJoin,"miter"),i.lineWidth=I,i.strokeStyle=le(S.strokeStyle,a),i.setLineDash(le(S.lineDash,[])),o.usePointStyle){const A={radius:p*Math.SQRT2/2,pointStyle:S.pointStyle,rotation:S.rotation,borderWidth:I},k=l.xPlus(E,g/2),D=M+f;hx(i,A,k,D,o.pointStyleWidth&&g)}else{const A=M+Math.max((d-p)/2,0),k=l.leftForLtr(E,g),D=mi(S.borderRadius);i.beginPath(),Object.values(D).some(N=>N!==0)?Eo(i,{x:k,y:A,w:g,h:p,radius:D}):i.rect(k,A,g,p),i.fill(),I!==0&&i.stroke()}i.restore()},x=function(E,M,S){Mi(i,S.text,E,M+m/2,c,{strikethrough:S.hidden,textAlign:l.textAlign(S.textAlign)})},y=this.isHorizontal(),_=this._computeTitleHeight();y?h={x:It(s,this.left+u,this.right-r[0]),y:this.top+u+_,line:0}:h={x:this.left+u,y:It(s,this.top+_+u,this.bottom-n[0].height),line:0},Cx(this.ctx,t.textDirection);const w=m+u;this.legendItems.forEach((E,M)=>{i.strokeStyle=E.fontColor,i.fillStyle=E.fontColor;const S=i.measureText(E.text).width,I=l.textAlign(E.textAlign||(E.textAlign=o.textAlign)),A=g+f+S;let k=h.x,D=h.y;l.setWidth(this.width),y?M>0&&k+A+u>this.right&&(D=h.y+=w,h.line++,k=h.x=It(s,this.left+u,this.right-r[h.line])):M>0&&D+w>this.bottom&&(k=h.x=k+n[h.line].width+u,h.line++,D=h.y=It(s,this.top+_+u,this.bottom-n[h.line].height));const N=l.x(k);if(b(N,D,E),k=_9(I,k+g+f,y?k+A:this.right,t.rtl),x(l.x(k),D,E),y)h.x+=A+u;else if(typeof E.text!="string"){const V=c.lineHeight;h.y+=Xx(E,V)+u}else h.y+=w}),wx(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,r=ut(n.font),i=yt(n.padding);if(!n.display)return;const s=Ki(t.rtl,this.left,this.width),o=this.ctx,a=n.position,l=r.size/2,c=i.top+l;let u,d=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),u=this.top+c,d=It(t.align,d,this.right-f);else{const g=this.columnSizes.reduce((p,m)=>Math.max(p,m.height),0);u=c+It(t.align,this.top,this.bottom-g-t.labels.padding-this._computeTitleHeight())}const h=It(a,d,d+f);o.textAlign=s.textAlign(ch(a)),o.textBaseline="middle",o.strokeStyle=n.color,o.fillStyle=n.color,o.font=r.string,Mi(o,n.text,h,u,r)}_computeTitleHeight(){const t=this.options.title,n=ut(t.font),r=yt(t.padding);return t.display?n.lineHeight+r.height:0}_getLegendItemAt(t,n){let r,i,s;if(lr(t,this.left,this.right)&&lr(n,this.top,this.bottom)){for(s=this.legendHitBoxes,r=0;r<s.length;++r)if(i=s[r],lr(t,i.left,i.left+i.width)&&lr(n,i.top,i.top+i.height))return this.legendItems[r]}return null}handleEvent(t){const n=this.options;if(!lD(t.type,n))return;const r=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const i=this._hoveredItem,s=iD(i,r);i&&!s&&Be(n.onLeave,[t,i,this],this),this._hoveredItem=r,r&&!s&&Be(n.onHover,[t,r,this],this)}else r&&Be(n.onClick,[t,r,this],this)}}function sD(e,t,n,r,i){const s=oD(r,e,t,n),o=aD(i,r,t.lineHeight);return{itemWidth:s,itemHeight:o}}function oD(e,t,n,r){let i=e.text;return i&&typeof i!="string"&&(i=i.reduce((s,o)=>s.length>o.length?s:o)),t+n.size/2+r.measureText(i).width}function aD(e,t,n){let r=e;return typeof t.text!="string"&&(r=Xx(t,n)),r}function Xx(e,t){const n=e.text?e.text.length:0;return t*n}function lD(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var Oi={id:"legend",_element:k0,start(e,t,n){const r=e.legend=new k0({ctx:e.ctx,options:n,chart:e});Rt.configure(e,r,n),Rt.addBox(e,r)},stop(e){Rt.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const r=e.legend;Rt.configure(e,r,n),r.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const r=t.datasetIndex,i=n.chart;i.isDatasetVisible(r)?(i.hide(r),t.hidden=!0):(i.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:i,color:s,useBorderRadius:o,borderRadius:a}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(n?0:void 0),u=yt(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:s,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:c.borderColor,pointStyle:r||c.pointStyle,rotation:c.rotation,textAlign:i||c.textAlign,borderRadius:o&&(a||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class vh extends Xn{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n){const r=this.options;if(this.left=0,this.top=0,!r.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=n;const i=Ze(r.text)?r.text.length:1;this._padding=yt(r.padding);const s=i*ut(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=s:this.width=s}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:n,left:r,bottom:i,right:s,options:o}=this,a=o.align;let l=0,c,u,d;return this.isHorizontal()?(u=It(a,r,s),d=n+t,c=s-r):(o.position==="left"?(u=r+t,d=It(a,i,n),l=Me*-.5):(u=s-t,d=It(a,n,i),l=Me*.5),c=i-n),{titleX:u,titleY:d,maxWidth:c,rotation:l}}draw(){const t=this.ctx,n=this.options;if(!n.display)return;const r=ut(n.font),s=r.lineHeight/2+this._padding.top,{titleX:o,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(s);Mi(t,n.text,0,0,r,{color:n.color,maxWidth:l,rotation:c,textAlign:ch(n.align),textBaseline:"middle",translation:[o,a]})}}function cD(e,t){const n=new vh({ctx:e.ctx,options:t,chart:e});Rt.configure(e,n,t),Rt.addBox(e,n),e.titleBlock=n}var xh={id:"title",_element:vh,start(e,t,n){cD(e,n)},stop(e){const t=e.titleBlock;Rt.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const r=e.titleBlock;Rt.configure(e,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Sa=new WeakMap;var uD={id:"subtitle",start(e,t,n){const r=new vh({ctx:e.ctx,options:n,chart:e});Rt.configure(e,r,n),Rt.addBox(e,r),Sa.set(e,r)},stop(e){Rt.removeBox(e,Sa.get(e)),Sa.delete(e)},beforeUpdate(e,t,n){const r=Sa.get(e);Rt.configure(e,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Gs={average(e){if(!e.length)return!1;let t,n,r=new Set,i=0,s=0;for(t=0,n=e.length;t<n;++t){const a=e[t].element;if(a&&a.hasValue()){const l=a.tooltipPosition();r.add(l.x),i+=l.y,++s}}return s===0||r.size===0?!1:{x:[...r].reduce((a,l)=>a+l)/r.size,y:i/s}},nearest(e,t){if(!e.length)return!1;let n=t.x,r=t.y,i=Number.POSITIVE_INFINITY,s,o,a;for(s=0,o=e.length;s<o;++s){const l=e[s].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),u=wd(t,c);u<i&&(i=u,a=l)}}if(a){const l=a.tooltipPosition();n=l.x,r=l.y}return{x:n,y:r}}};function En(e,t){return t&&(Ze(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function qn(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
108
+ `)>-1?e.split(`
109
+ `):e}function dD(e,t){const{element:n,datasetIndex:r,index:i}=t,s=e.getDatasetMeta(r).controller,{label:o,value:a}=s.getLabelAndValue(i);return{chart:e,label:o,parsed:s.getParsed(i),raw:e.data.datasets[r].data[i],formattedValue:a,dataset:s.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function R0(e,t){const n=e.chart.ctx,{body:r,footer:i,title:s}=e,{boxWidth:o,boxHeight:a}=t,l=ut(t.bodyFont),c=ut(t.titleFont),u=ut(t.footerFont),d=s.length,f=i.length,h=r.length,g=yt(t.padding);let p=g.height,m=0,b=r.reduce((_,w)=>_+w.before.length+w.lines.length+w.after.length,0);if(b+=e.beforeBody.length+e.afterBody.length,d&&(p+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),b){const _=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;p+=h*_+(b-h)*l.lineHeight+(b-1)*t.bodySpacing}f&&(p+=t.footerMarginTop+f*u.lineHeight+(f-1)*t.footerSpacing);let x=0;const y=function(_){m=Math.max(m,n.measureText(_).width+x)};return n.save(),n.font=c.string,Fe(e.title,y),n.font=l.string,Fe(e.beforeBody.concat(e.afterBody),y),x=t.displayColors?o+2+t.boxPadding:0,Fe(r,_=>{Fe(_.before,y),Fe(_.lines,y),Fe(_.after,y)}),x=0,n.font=u.string,Fe(e.footer,y),n.restore(),m+=g.width,{width:m,height:p}}function fD(e,t){const{y:n,height:r}=t;return n<r/2?"top":n>e.height-r/2?"bottom":"center"}function hD(e,t,n,r){const{x:i,width:s}=r,o=n.caretSize+n.caretPadding;if(e==="left"&&i+s+o>t.width||e==="right"&&i-s-o<0)return!0}function gD(e,t,n,r){const{x:i,width:s}=n,{width:o,chartArea:{left:a,right:l}}=e;let c="center";return r==="center"?c=i<=(a+l)/2?"left":"right":i<=s/2?c="left":i>=o-s/2&&(c="right"),hD(c,e,t,n)&&(c="center"),c}function P0(e,t,n){const r=n.yAlign||t.yAlign||fD(e,n);return{xAlign:n.xAlign||t.xAlign||gD(e,t,n,r),yAlign:r}}function pD(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function mD(e,t,n){let{y:r,height:i}=e;return t==="top"?r+=n:t==="bottom"?r-=i+n:r-=i/2,r}function O0(e,t,n,r){const{caretSize:i,caretPadding:s,cornerRadius:o}=e,{xAlign:a,yAlign:l}=n,c=i+s,{topLeft:u,topRight:d,bottomLeft:f,bottomRight:h}=mi(o);let g=pD(t,a);const p=mD(t,l,c);return l==="center"?a==="left"?g+=c:a==="right"&&(g-=c):a==="left"?g-=Math.max(u,f)+i:a==="right"&&(g+=Math.max(d,h)+i),{x:gt(g,0,r.width-t.width),y:gt(p,0,r.height-t.height)}}function _a(e,t,n){const r=yt(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function D0(e){return En([],qn(e))}function bD(e,t,n){return Xr(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function F0(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const Zx={beforeTitle:Qn,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex<r)return n[t.dataIndex]}return""},afterTitle:Qn,beforeBody:Qn,beforeLabel:Qn,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return pe(n)||(t+=n),t},labelColor(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:Qn,afterBody:Qn,beforeFooter:Qn,footer:Qn,afterFooter:Qn};function Vt(e,t,n,r){const i=e[t].call(n,r);return typeof i>"u"?Zx[t].call(n,r):i}class kd extends Xn{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,r=this.options.setContext(this.getContext()),i=r.enabled&&n.options.animation&&r.animations,s=new Ex(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(s)),s}getContext(){return this.$context||(this.$context=bD(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,i=Vt(r,"beforeTitle",this,t),s=Vt(r,"title",this,t),o=Vt(r,"afterTitle",this,t);let a=[];return a=En(a,qn(i)),a=En(a,qn(s)),a=En(a,qn(o)),a}getBeforeBody(t,n){return D0(Vt(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:r}=n,i=[];return Fe(t,s=>{const o={before:[],lines:[],after:[]},a=F0(r,s);En(o.before,qn(Vt(a,"beforeLabel",this,s))),En(o.lines,Vt(a,"label",this,s)),En(o.after,qn(Vt(a,"afterLabel",this,s))),i.push(o)}),i}getAfterBody(t,n){return D0(Vt(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:r}=n,i=Vt(r,"beforeFooter",this,t),s=Vt(r,"footer",this,t),o=Vt(r,"afterFooter",this,t);let a=[];return a=En(a,qn(i)),a=En(a,qn(s)),a=En(a,qn(o)),a}_createItems(t){const n=this._active,r=this.chart.data,i=[],s=[],o=[];let a=[],l,c;for(l=0,c=n.length;l<c;++l)a.push(dD(this.chart,n[l]));return t.filter&&(a=a.filter((u,d,f)=>t.filter(u,d,f,r))),t.itemSort&&(a=a.sort((u,d)=>t.itemSort(u,d,r))),Fe(a,u=>{const d=F0(t.callbacks,u);i.push(Vt(d,"labelColor",this,u)),s.push(Vt(d,"labelPointStyle",this,u)),o.push(Vt(d,"labelTextColor",this,u))}),this.labelColors=i,this.labelPointStyles=s,this.labelTextColors=o,this.dataPoints=a,a}update(t,n){const r=this.options.setContext(this.getContext()),i=this._active;let s,o=[];if(!i.length)this.opacity!==0&&(s={opacity:0});else{const a=Gs[r.position].call(this,i,this._eventPosition);o=this._createItems(r),this.title=this.getTitle(o,r),this.beforeBody=this.getBeforeBody(o,r),this.body=this.getBody(o,r),this.afterBody=this.getAfterBody(o,r),this.footer=this.getFooter(o,r);const l=this._size=R0(this,r),c=Object.assign({},a,l),u=P0(this.chart,r,c),d=O0(r,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,s={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=o,this.$context=void 0,s&&this._resolveAnimations().update(this,s),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,r,i){const s=this.getCaretPosition(t,r,i);n.lineTo(s.x1,s.y1),n.lineTo(s.x2,s.y2),n.lineTo(s.x3,s.y3)}getCaretPosition(t,n,r){const{xAlign:i,yAlign:s}=this,{caretSize:o,cornerRadius:a}=r,{topLeft:l,topRight:c,bottomLeft:u,bottomRight:d}=mi(a),{x:f,y:h}=t,{width:g,height:p}=n;let m,b,x,y,_,w;return s==="center"?(_=h+p/2,i==="left"?(m=f,b=m-o,y=_+o,w=_-o):(m=f+g,b=m+o,y=_-o,w=_+o),x=m):(i==="left"?b=f+Math.max(l,u)+o:i==="right"?b=f+g-Math.max(c,d)-o:b=this.caretX,s==="top"?(y=h,_=y-o,m=b-o,x=b+o):(y=h+p,_=y+o,m=b+o,x=b-o),w=y),{x1:m,x2:b,x3:x,y1:y,y2:_,y3:w}}drawTitle(t,n,r){const i=this.title,s=i.length;let o,a,l;if(s){const c=Ki(r.rtl,this.x,this.width);for(t.x=_a(this,r.titleAlign,r),n.textAlign=c.textAlign(r.titleAlign),n.textBaseline="middle",o=ut(r.titleFont),a=r.titleSpacing,n.fillStyle=r.titleColor,n.font=o.string,l=0;l<s;++l)n.fillText(i[l],c.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+a,l+1===s&&(t.y+=r.titleMarginBottom-a)}}_drawColorBox(t,n,r,i,s){const o=this.labelColors[r],a=this.labelPointStyles[r],{boxHeight:l,boxWidth:c}=s,u=ut(s.bodyFont),d=_a(this,"left",s),f=i.x(d),h=l<u.lineHeight?(u.lineHeight-l)/2:0,g=n.y+h;if(s.usePointStyle){const p={radius:Math.min(c,l)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},m=i.leftForLtr(f,c)+c/2,b=g+l/2;t.strokeStyle=s.multiKeyBackground,t.fillStyle=s.multiKeyBackground,Ll(t,p,m,b),t.strokeStyle=o.borderColor,t.fillStyle=o.backgroundColor,Ll(t,p,m,b)}else{t.lineWidth=Ce(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1,t.strokeStyle=o.borderColor,t.setLineDash(o.borderDash||[]),t.lineDashOffset=o.borderDashOffset||0;const p=i.leftForLtr(f,c),m=i.leftForLtr(i.xPlus(f,1),c-2),b=mi(o.borderRadius);Object.values(b).some(x=>x!==0)?(t.beginPath(),t.fillStyle=s.multiKeyBackground,Eo(t,{x:p,y:g,w:c,h:l,radius:b}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),Eo(t,{x:m,y:g+1,w:c-2,h:l-2,radius:b}),t.fill()):(t.fillStyle=s.multiKeyBackground,t.fillRect(p,g,c,l),t.strokeRect(p,g,c,l),t.fillStyle=o.backgroundColor,t.fillRect(m,g+1,c-2,l-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,n,r){const{body:i}=this,{bodySpacing:s,bodyAlign:o,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:u}=r,d=ut(r.bodyFont);let f=d.lineHeight,h=0;const g=Ki(r.rtl,this.x,this.width),p=function(S){n.fillText(S,g.x(t.x+h),t.y+f/2),t.y+=f+s},m=g.textAlign(o);let b,x,y,_,w,E,M;for(n.textAlign=o,n.textBaseline="middle",n.font=d.string,t.x=_a(this,m,r),n.fillStyle=r.bodyColor,Fe(this.beforeBody,p),h=a&&m!=="right"?o==="center"?c/2+u:c+2+u:0,_=0,E=i.length;_<E;++_){for(b=i[_],x=this.labelTextColors[_],n.fillStyle=x,Fe(b.before,p),y=b.lines,a&&y.length&&(this._drawColorBox(n,t,_,g,r),f=Math.max(d.lineHeight,l)),w=0,M=y.length;w<M;++w)p(y[w]),f=d.lineHeight;Fe(b.after,p)}h=0,f=d.lineHeight,Fe(this.afterBody,p),t.y-=s}drawFooter(t,n,r){const i=this.footer,s=i.length;let o,a;if(s){const l=Ki(r.rtl,this.x,this.width);for(t.x=_a(this,r.footerAlign,r),t.y+=r.footerMarginTop,n.textAlign=l.textAlign(r.footerAlign),n.textBaseline="middle",o=ut(r.footerFont),n.fillStyle=r.footerColor,n.font=o.string,a=0;a<s;++a)n.fillText(i[a],l.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+r.footerSpacing}}drawBackground(t,n,r,i){const{xAlign:s,yAlign:o}=this,{x:a,y:l}=t,{width:c,height:u}=r,{topLeft:d,topRight:f,bottomLeft:h,bottomRight:g}=mi(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(a+d,l),o==="top"&&this.drawCaret(t,n,r,i),n.lineTo(a+c-f,l),n.quadraticCurveTo(a+c,l,a+c,l+f),o==="center"&&s==="right"&&this.drawCaret(t,n,r,i),n.lineTo(a+c,l+u-g),n.quadraticCurveTo(a+c,l+u,a+c-g,l+u),o==="bottom"&&this.drawCaret(t,n,r,i),n.lineTo(a+h,l+u),n.quadraticCurveTo(a,l+u,a,l+u-h),o==="center"&&s==="left"&&this.drawCaret(t,n,r,i),n.lineTo(a,l+d),n.quadraticCurveTo(a,l,a+d,l),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,r=this.$animations,i=r&&r.x,s=r&&r.y;if(i||s){const o=Gs[t.position].call(this,this._active,this._eventPosition);if(!o)return;const a=this._size=R0(this,t),l=Object.assign({},o,this._size),c=P0(n,t,l),u=O0(t,l,c,n);(i._to!==u.x||s._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=a.width,this.height=a.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},s={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const o=yt(n.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&a&&(t.save(),t.globalAlpha=r,this.drawBackground(s,t,i,n),Cx(t,n.textDirection),s.y+=o.top,this.drawTitle(s,t,n),this.drawBody(s,t,n),this.drawFooter(s,t,n),wx(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const r=this._active,i=t.map(({datasetIndex:a,index:l})=>{const c=this.chart.getDatasetMeta(a);if(!c)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:c.data[l],index:l}}),s=!Dl(r,i),o=this._positionChanged(i,n);(s||o)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,s=this._active||[],o=this._getActiveElements(t,s,n,r),a=this._positionChanged(o,t),l=n||!Dl(o,s)||a;return l&&(this._active=o,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,r,i){const s=this.options;if(t.type==="mouseout")return[];if(!i)return n.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);const o=this.chart.getElementsAtEventForMode(t,s.mode,s,r);return s.reverse&&o.reverse(),o}_positionChanged(t,n){const{caretX:r,caretY:i,options:s}=this,o=Gs[s.position].call(this,t,n);return o!==!1&&(r!==o.x||i!==o.y)}}z(kd,"positioners",Gs);var Di={id:"tooltip",_element:kd,positioners:Gs,afterInit(e,t,n){n&&(e.tooltip=new kd({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Zx},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},vD=Object.freeze({__proto__:null,Colors:DO,Decimation:LO,Filler:rD,Legend:Oi,SubTitle:uD,Title:xh,Tooltip:Di});const xD=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function yD(e,t,n,r){const i=e.indexOf(t);if(i===-1)return xD(e,t,n,r);const s=e.lastIndexOf(t);return i!==s?n:i}const CD=(e,t)=>e===null?null:gt(Math.round(e),0,t);function T0(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class os extends Zr{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const r=this.getLabels();for(const{index:i,label:s}of n)r[i]===s&&r.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(pe(t))return null;const r=this.getLabels();return n=isFinite(n)&&r[n]===t?n:yD(r,t,le(n,t),this._addedLabels),CD(n,r.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:r,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(r=0),n||(i=this.getLabels().length-1)),this.min=r,this.max=i}buildTicks(){const t=this.min,n=this.max,r=this.options.offset,i=[];let s=this.getLabels();s=t===0&&n===s.length-1?s:s.slice(t,n+1),this._valueRange=Math.max(s.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let o=t;o<=n;o++)i.push({value:o});return i}getLabelForValue(t){return T0.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}z(os,"id","category"),z(os,"defaults",{ticks:{callback:T0}});function wD(e,t){const n=[],{bounds:i,step:s,min:o,max:a,precision:l,count:c,maxTicks:u,maxDigits:d,includeBounds:f}=e,h=s||1,g=u-1,{min:p,max:m}=t,b=!pe(o),x=!pe(a),y=!pe(c),_=(m-p)/(d+1);let w=Rp((m-p)/g/h)*h,E,M,S,I;if(w<1e-14&&!b&&!x)return[{value:p},{value:m}];I=Math.ceil(m/w)-Math.floor(p/w),I>g&&(w=Rp(I*w/g/h)*h),pe(l)||(E=Math.pow(10,l),w=Math.ceil(w*E)/E),i==="ticks"?(M=Math.floor(p/w)*w,S=Math.ceil(m/w)*w):(M=p,S=m),b&&x&&s&&b9((a-o)/s,w/1e3)?(I=Math.round(Math.min((a-o)/w,u)),w=(a-o)/I,M=o,S=a):y?(M=b?o:M,S=x?a:S,I=c-1,w=(S-M)/I):(I=(S-M)/w,qs(I,Math.round(I),w/1e3)?I=Math.round(I):I=Math.ceil(I));const A=Math.max(Pp(w),Pp(M));E=Math.pow(10,pe(l)?A:l),M=Math.round(M*E)/E,S=Math.round(S*E)/E;let k=0;for(b&&(f&&M!==o?(n.push({value:o}),M<o&&k++,qs(Math.round((M+k*w)*E)/E,o,N0(o,_,e))&&k++):M<o&&k++);k<I;++k){const D=Math.round((M+k*w)*E)/E;if(x&&D>a)break;n.push({value:D})}return x&&f&&S!==a?n.length&&qs(n[n.length-1].value,a,N0(a,_,e))?n[n.length-1].value=a:n.push({value:a}):(!x||S===a)&&n.push({value:S}),n}function N0(e,t,{horizontal:n,minRotation:r}){const i=xn(r),s=(n?Math.sin(i):Math.cos(i))||.001,o=.75*t*(""+e).length;return Math.min(t/s,o)}class $l extends Zr{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,n){return pe(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:i,max:s}=this;const o=l=>i=n?i:l,a=l=>s=r?s:l;if(t){const l=Tn(i),c=Tn(s);l<0&&c<0?a(0):l>0&&c>0&&o(0)}if(i===s){let l=s===0?1:Math.abs(s*.05);a(s+l),t||o(i-l)}this.min=i,this.max=s}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=t,i;return r?(i=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const i={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},s=this._range||this,o=wD(i,s);return t.bounds==="ticks"&&ix(o,this,"value"),t.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const t=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const i=(r-n)/Math.max(t.length-1,1)/2;n-=i,r+=i}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(t){return Zo(t,this.chart.options.locale,this.options.ticks.format)}}class vr extends $l{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=rt(t)?t:0,this.max=rt(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,r=xn(this.options.ticks.minRotation),i=(t?Math.sin(r):Math.cos(r))||.001,s=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,s.lineHeight/i))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}z(vr,"id","linear"),z(vr,"defaults",{ticks:{callback:kc.formatters.numeric}});const ko=e=>Math.floor(Dr(e)),ti=(e,t)=>Math.pow(10,ko(e)+t);function L0(e){return e/Math.pow(10,ko(e))===1}function V0(e,t,n){const r=Math.pow(10,n),i=Math.floor(e/r);return Math.ceil(t/r)-i}function SD(e,t){const n=t-e;let r=ko(n);for(;V0(e,t,r)>10;)r++;for(;V0(e,t,r)<10;)r--;return Math.min(r,ko(e))}function _D(e,{min:t,max:n}){t=Ht(e.min,t);const r=[],i=ko(t);let s=SD(t,n),o=s<0?Math.pow(10,Math.abs(s)):1;const a=Math.pow(10,s),l=i>s?Math.pow(10,i):0,c=Math.round((t-l)*o)/o,u=Math.floor((t-l)/a/10)*a*10;let d=Math.floor((c-u)/Math.pow(10,s)),f=Ht(e.min,Math.round((l+u+d*Math.pow(10,s))*o)/o);for(;f<n;)r.push({value:f,major:L0(f),significand:d}),d>=10?d=d<15?15:20:d++,d>=20&&(s++,d=2,o=s>=0?1:o),f=Math.round((l+u+d*Math.pow(10,s))*o)/o;const h=Ht(e.max,f);return r.push({value:h,major:L0(h),significand:d}),r}class Ei extends Zr{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,n){const r=$l.prototype.parse.apply(this,[t,n]);if(r===0){this._zero=!0;return}return rt(r)&&r>0?r:null}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=rt(t)?Math.max(0,t):null,this.max=rt(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!rt(this._userMin)&&(this.min=t===ti(this.min,0)?ti(this.min,-1):ti(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let r=this.min,i=this.max;const s=a=>r=t?r:a,o=a=>i=n?i:a;r===i&&(r<=0?(s(1),o(10)):(s(ti(r,-1)),o(ti(i,1)))),r<=0&&s(ti(i,-1)),i<=0&&o(ti(r,1)),this.min=r,this.max=i}buildTicks(){const t=this.options,n={min:this._userMin,max:this._userMax},r=_D(n,this);return t.bounds==="ticks"&&ix(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}getLabelForValue(t){return t===void 0?"0":Zo(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=Dr(t),this._valueRange=Dr(this.max)-Dr(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(Dr(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const n=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+n*this._valueRange)}}z(Ei,"id","logarithmic"),z(Ei,"defaults",{ticks:{callback:kc.formatters.logarithmic,major:{enabled:!0}}});function Rd(e){const t=e.ticks;if(t.display&&e.display){const n=yt(t.backdropPadding);return le(t.font&&t.font.size,Je.font.size)+n.height}return 0}function ID(e,t,n){return n=Ze(n)?n:[n],{w:F9(e,t.string,n),h:n.length*t.lineHeight}}function B0(e,t,n,r,i){return e===r||e===i?{start:t-n/2,end:t+n/2}:e<r||e>i?{start:t-n,end:t}:{start:t,end:t+n}}function MD(e){const t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},n=Object.assign({},t),r=[],i=[],s=e._pointLabels.length,o=e.options.pointLabels,a=o.centerPointLabels?Me/s:0;for(let l=0;l<s;l++){const c=o.setContext(e.getPointLabelContext(l));i[l]=c.padding;const u=e.getPointPosition(l,e.drawingArea+i[l],a),d=ut(c.font),f=ID(e.ctx,d,e._pointLabels[l]);r[l]=f;const h=Et(e.getIndexAngle(l)+a),g=Math.round(ah(h)),p=B0(g,u.x,f.w,0,180),m=B0(g,u.y,f.h,90,270);ED(n,t,h,p,m)}e.setCenterPoint(t.l-n.l,n.r-t.r,t.t-n.t,n.b-t.b),e._pointLabelItems=RD(e,r,i)}function ED(e,t,n,r,i){const s=Math.abs(Math.sin(n)),o=Math.abs(Math.cos(n));let a=0,l=0;r.start<t.l?(a=(t.l-r.start)/s,e.l=Math.min(e.l,t.l-a)):r.end>t.r&&(a=(r.end-t.r)/s,e.r=Math.max(e.r,t.r+a)),i.start<t.t?(l=(t.t-i.start)/o,e.t=Math.min(e.t,t.t-l)):i.end>t.b&&(l=(i.end-t.b)/o,e.b=Math.max(e.b,t.b+l))}function AD(e,t,n){const r=e.drawingArea,{extra:i,additionalAngle:s,padding:o,size:a}=n,l=e.getPointPosition(t,r+i+o,s),c=Math.round(ah(Et(l.angle+ot))),u=DD(l.y,a.h,c),d=PD(c),f=OD(l.x,a.w,d);return{visible:!0,x:l.x,y:u,textAlign:d,left:f,top:u,right:f+a.w,bottom:u+a.h}}function kD(e,t){if(!t)return!0;const{left:n,top:r,right:i,bottom:s}=e;return!(ur({x:n,y:r},t)||ur({x:n,y:s},t)||ur({x:i,y:r},t)||ur({x:i,y:s},t))}function RD(e,t,n){const r=[],i=e._pointLabels.length,s=e.options,{centerPointLabels:o,display:a}=s.pointLabels,l={extra:Rd(s)/2,additionalAngle:o?Me/i:0};let c;for(let u=0;u<i;u++){l.padding=n[u],l.size=t[u];const d=AD(e,u,l);r.push(d),a==="auto"&&(d.visible=kD(d,c),d.visible&&(c=d))}return r}function PD(e){return e===0||e===180?"center":e<180?"left":"right"}function OD(e,t,n){return n==="right"?e-=t:n==="center"&&(e-=t/2),e}function DD(e,t,n){return n===90||n===270?e-=t/2:(n>270||n<90)&&(e-=t),e}function FD(e,t,n){const{left:r,top:i,right:s,bottom:o}=n,{backdropColor:a}=t;if(!pe(a)){const l=mi(t.borderRadius),c=yt(t.backdropPadding);e.fillStyle=a;const u=r-c.left,d=i-c.top,f=s-r+c.width,h=o-i+c.height;Object.values(l).some(g=>g!==0)?(e.beginPath(),Eo(e,{x:u,y:d,w:f,h,radius:l}),e.fill()):e.fillRect(u,d,f,h)}}function TD(e,t){const{ctx:n,options:{pointLabels:r}}=e;for(let i=t-1;i>=0;i--){const s=e._pointLabelItems[i];if(!s.visible)continue;const o=r.setContext(e.getPointLabelContext(i));FD(n,o,s);const a=ut(o.font),{x:l,y:c,textAlign:u}=s;Mi(n,e._pointLabels[i],l,c+a.lineHeight/2,a,{color:o.color,textAlign:u,textBaseline:"middle"})}}function Ux(e,t,n,r){const{ctx:i}=e;if(n)i.arc(e.xCenter,e.yCenter,t,0,Ue);else{let s=e.getPointPosition(0,t);i.moveTo(s.x,s.y);for(let o=1;o<r;o++)s=e.getPointPosition(o,t),i.lineTo(s.x,s.y)}}function ND(e,t,n,r,i){const s=e.ctx,o=t.circular,{color:a,lineWidth:l}=t;!o&&!r||!a||!l||n<0||(s.save(),s.strokeStyle=a,s.lineWidth=l,s.setLineDash(i.dash||[]),s.lineDashOffset=i.dashOffset,s.beginPath(),Ux(e,n,o,r),s.closePath(),s.stroke(),s.restore())}function LD(e,t,n){return Xr(e,{label:n,index:t,type:"pointLabel"})}class $s extends $l{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=yt(Rd(this.options)/2),n=this.width=this.maxWidth-t.width,r=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+n/2+t.left),this.yCenter=Math.floor(this.top+r/2+t.top),this.drawingArea=Math.floor(Math.min(n,r)/2)}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!1);this.min=rt(t)&&!isNaN(t)?t:0,this.max=rt(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Rd(this.options))}generateTickLabels(t){$l.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((n,r)=>{const i=Be(this.options.pointLabels.callback,[n,r],this);return i||i===0?i:""}).filter((n,r)=>this.chart.getDataVisibility(r))}fit(){const t=this.options;t.display&&t.pointLabels.display?MD(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,n,r,i){this.xCenter+=Math.floor((t-n)/2),this.yCenter+=Math.floor((r-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,n,r,i))}getIndexAngle(t){const n=Ue/(this._pointLabels.length||1),r=this.options.startAngle||0;return Et(t*n+xn(r))}getDistanceFromCenterForValue(t){if(pe(t))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*n:(t-this.min)*n}getValueForDistanceFromCenter(t){if(pe(t))return NaN;const n=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(t){const n=this._pointLabels||[];if(t>=0&&t<n.length){const r=n[t];return LD(this.getContext(),t,r)}}getPointPosition(t,n,r=0){const i=this.getIndexAngle(t)-ot+r;return{x:Math.cos(i)*n+this.xCenter,y:Math.sin(i)*n+this.yCenter,angle:i}}getPointPositionForValue(t,n){return this.getPointPosition(t,this.getDistanceFromCenterForValue(n))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:n,top:r,right:i,bottom:s}=this._pointLabelItems[t];return{left:n,top:r,right:i,bottom:s}}drawBackground(){const{backgroundColor:t,grid:{circular:n}}=this.options;if(t){const r=this.ctx;r.save(),r.beginPath(),Ux(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),r.closePath(),r.fillStyle=t,r.fill(),r.restore()}}drawGrid(){const t=this.ctx,n=this.options,{angleLines:r,grid:i,border:s}=n,o=this._pointLabels.length;let a,l,c;if(n.pointLabels.display&&TD(this,o),i.display&&this.ticks.forEach((u,d)=>{if(d!==0||d===0&&this.min<0){l=this.getDistanceFromCenterForValue(u.value);const f=this.getContext(d),h=i.setContext(f),g=s.setContext(f);ND(this,h,l,o,g)}}),r.display){for(t.save(),a=o-1;a>=0;a--){const u=r.setContext(this.getPointLabelContext(a)),{color:d,lineWidth:f}=u;!f||!d||(t.lineWidth=f,t.strokeStyle=d,t.setLineDash(u.borderDash),t.lineDashOffset=u.borderDashOffset,l=this.getDistanceFromCenterForValue(n.reverse?this.min:this.max),c=this.getPointPosition(a,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(c.x,c.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,n=this.options,r=n.ticks;if(!r.display)return;const i=this.getIndexAngle(0);let s,o;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(i),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((a,l)=>{if(l===0&&this.min>=0&&!n.reverse)return;const c=r.setContext(this.getContext(l)),u=ut(c.font);if(s=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=u.string,o=t.measureText(a.label).width,t.fillStyle=c.backdropColor;const d=yt(c.backdropPadding);t.fillRect(-o/2-d.left,-s-u.size/2-d.top,o+d.width,u.size+d.height)}Mi(t,a.label,0,-s,u,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),t.restore()}drawTitle(){}}z($s,"id","radialLinear"),z($s,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:kc.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),z($s,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),z($s,"descriptors",{angleLines:{_fallback:"grid"}});const Dc={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Gt=Object.keys(Dc);function j0(e,t){return e-t}function G0(e,t){if(pe(t))return null;const n=e._adapter,{parser:r,round:i,isoWeekday:s}=e._parseOpts;let o=t;return typeof r=="function"&&(o=r(o)),rt(o)||(o=typeof r=="string"?n.parse(o,r):n.parse(o)),o===null?null:(i&&(o=i==="week"&&(rs(s)||s===!0)?n.startOf(o,"isoWeek",s):n.startOf(o,i)),+o)}function $0(e,t,n,r){const i=Gt.length;for(let s=Gt.indexOf(e);s<i-1;++s){const o=Dc[Gt[s]],a=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((n-t)/(a*o.size))<=r)return Gt[s]}return Gt[i-1]}function VD(e,t,n,r,i){for(let s=Gt.length-1;s>=Gt.indexOf(n);s--){const o=Gt[s];if(Dc[o].common&&e._adapter.diff(i,r,o)>=t-1)return o}return Gt[n?Gt.indexOf(n):0]}function BD(e){for(let t=Gt.indexOf(e)+1,n=Gt.length;t<n;++t)if(Dc[Gt[t]].common)return Gt[t]}function W0(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:r,hi:i}=lh(n,t),s=n[r]>=t?n[r]:n[i];e[s]=!0}}function jD(e,t,n,r){const i=e._adapter,s=+i.startOf(t[0].value,r),o=t[t.length-1].value;let a,l;for(a=s;a<=o;a=+i.add(a,1,r))l=n[a],l>=0&&(t[l].major=!0);return t}function H0(e,t,n){const r=[],i={},s=t.length;let o,a;for(o=0;o<s;++o)a=t[o],i[a]=o,r.push({value:a,major:!1});return s===0||!n?r:jD(e,r,i,n)}class Ro extends Zr{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,n={}){const r=t.time||(t.time={}),i=this._adapter=new QP._date(t.adapters.date);i.init(n),Ks(r.displayFormats,i.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:G0(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=this._adapter,r=t.time.unit||"day";let{min:i,max:s,minDefined:o,maxDefined:a}=this.getUserBounds();function l(c){!o&&!isNaN(c.min)&&(i=Math.min(i,c.min)),!a&&!isNaN(c.max)&&(s=Math.max(s,c.max))}(!o||!a)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),i=rt(i)&&!isNaN(i)?i:+n.startOf(Date.now(),r),s=rt(s)&&!isNaN(s)?s:+n.endOf(Date.now(),r)+1,this.min=Math.min(i,s-1),this.max=Math.max(i+1,s)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],r=t[t.length-1]),{min:n,max:r}}buildTicks(){const t=this.options,n=t.time,r=t.ticks,i=r.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const s=this.min,o=this.max,a=C9(i,s,o);return this._unit=n.unit||(r.autoSkip?$0(n.minUnit,this.min,this.max,this._getLabelCapacity(s)):VD(this,a.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:BD(this._unit),this.initOffsets(i),t.reverse&&a.reverse(),H0(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,r=0,i,s;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?n=1-i:n=(this.getDecimalForValue(t[1])-i)/2,s=this.getDecimalForValue(t[t.length-1]),t.length===1?r=s:r=(s-this.getDecimalForValue(t[t.length-2]))/2);const o=t.length<3?.5:.25;n=gt(n,0,o),r=gt(r,0,o),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const t=this._adapter,n=this.min,r=this.max,i=this.options,s=i.time,o=s.unit||$0(s.minUnit,n,r,this._getLabelCapacity(n)),a=le(i.ticks.stepSize,1),l=o==="week"?s.isoWeekday:!1,c=rs(l)||l===!0,u={};let d=n,f,h;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":o),t.diff(r,n,o)>1e5*a)throw new Error(n+" and "+r+" are too far apart with stepSize of "+a+" "+o);const g=i.ticks.source==="data"&&this.getDataTimestamps();for(f=d,h=0;f<r;f=+t.add(f,a,o),h++)W0(u,f,g);return(f===r||i.bounds==="ticks"||h===1)&&W0(u,f,g),Object.keys(u).sort(j0).map(p=>+p)}getLabelForValue(t){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(t,r.tooltipFormat):n.format(t,r.displayFormats.datetime)}format(t,n){const i=this.options.time.displayFormats,s=this._unit,o=n||i[s];return this._adapter.format(t,o)}_tickFormatFunction(t,n,r,i){const s=this.options,o=s.ticks.callback;if(o)return Be(o,[t,n,r],this);const a=s.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&a[l],d=c&&a[c],f=r[n],h=c&&d&&f&&f.major;return this._adapter.format(t,i||(h?d:u))}generateTickLabels(t){let n,r,i;for(n=0,r=t.length;n<r;++n)i=t[n],i.label=this._tickFormatFunction(i.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const n=this._offsets,r=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+r)*n.factor)}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+r*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks,r=this.ctx.measureText(t).width,i=xn(this.isHorizontal()?n.maxRotation:n.minRotation),s=Math.cos(i),o=Math.sin(i),a=this._resolveTickFontOptions(0).size;return{w:r*s+a*o,h:r*o+a*s}}_getLabelCapacity(t){const n=this.options.time,r=n.displayFormats,i=r[n.unit]||r.millisecond,s=this._tickFormatFunction(t,0,H0(this,[t],this._majorUnit),i),o=this._getLabelSize(s),a=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return a>0?a:1}getDataTimestamps(){let t=this._cache.data||[],n,r;if(t.length)return t;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,r=i.length;n<r;++n)t=t.concat(i[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,r;if(t.length)return t;const i=this.getLabels();for(n=0,r=i.length;n<r;++n)t.push(G0(this,i[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return ax(t.sort(j0))}}z(Ro,"id","time"),z(Ro,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function Ia(e,t,n){let r=0,i=e.length-1,s,o,a,l;n?(t>=e[r].pos&&t<=e[i].pos&&({lo:r,hi:i}=cr(e,"pos",t)),{pos:s,time:a}=e[r],{pos:o,time:l}=e[i]):(t>=e[r].time&&t<=e[i].time&&({lo:r,hi:i}=cr(e,"time",t)),{time:s,pos:a}=e[r],{time:o,pos:l}=e[i]);const c=o-s;return c?a+(l-a)*(t-s)/c:a}class Pd extends Ro{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=Ia(n,this.min),this._tableRange=Ia(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:r}=this,i=[],s=[];let o,a,l,c,u;for(o=0,a=t.length;o<a;++o)c=t[o],c>=n&&c<=r&&i.push(c);if(i.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(o=0,a=i.length;o<a;++o)u=i[o+1],l=i[o-1],c=i[o],Math.round((u+l)/2)!==c&&s.push({time:c,pos:o/(a-1)});return s}_generate(){const t=this.min,n=this.max;let r=super.getDataTimestamps();return(!r.includes(t)||!r.length)&&r.splice(0,0,t),(!r.includes(n)||r.length===1)&&r.push(n),r.sort((i,s)=>i-s)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?t=this.normalize(n.concat(r)):t=n.length?n:r,t=this._cache.all=t,t}getDecimalForValue(t){return(Ia(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return Ia(this._table,r*this._tableRange+this._minPos,!0)}}z(Pd,"id","timeseries"),z(Pd,"defaults",Ro.defaults);var GD=Object.freeze({__proto__:null,CategoryScale:os,LinearScale:vr,LogarithmicScale:Ei,RadialLinearScale:$s,TimeScale:Ro,TimeSeriesScale:Pd});const $D=[JP,MO,vD,GD],Jx="label";function z0(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function WD(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function Qx(e,t){e.labels=t}function Kx(e,t,n=Jx){const r=[];e.datasets=t.map(i=>{const s=e.datasets.find(o=>o[n]===i[n]);return!s||!i.data||r.includes(s)?{...i}:(r.push(s),Object.assign(s,i),s)})}function HD(e,t=Jx){const n={labels:[],datasets:[]};return Qx(n,e.labels),Kx(n,e.datasets,t),n}function zD(e,t){const{height:n=150,width:r=300,redraw:i=!1,datasetIdKey:s,type:o,data:a,options:l,plugins:c=[],fallbackContent:u,updateMode:d,...f}=e,h=C.useRef(null),g=C.useRef(null),p=()=>{h.current&&(g.current=new mt(h.current,{type:o,data:HD(a,s),options:l&&{...l},plugins:c}),z0(t,g.current))},m=()=>{z0(t,null),g.current&&(g.current.destroy(),g.current=null)};return C.useEffect(()=>{!i&&g.current&&l&&WD(g.current,l)},[i,l]),C.useEffect(()=>{!i&&g.current&&Qx(g.current.config.data,a.labels)},[i,a.labels]),C.useEffect(()=>{!i&&g.current&&a.datasets&&Kx(g.current.config.data,a.datasets,s)},[i,a.datasets]),C.useEffect(()=>{g.current&&(i?(m(),setTimeout(p)):g.current.update(d))},[i,l,a.labels,a.datasets,d]),C.useEffect(()=>{g.current&&(m(),setTimeout(p))},[o]),C.useEffect(()=>(p(),()=>m()),[]),v.jsx("canvas",{ref:h,role:"img",height:n,width:r,...f,children:u})}const yh=C.forwardRef(zD);function Ch(e,t){return mt.register(t),C.forwardRef((n,r)=>v.jsx(yh,{...n,ref:r,type:e}))}const YD=Ch("bar",no),qx=Ch("doughnut",Tr),XD=Ch("pie",Bl);/*!
110
+ * chartjs-plugin-datalabels v2.2.0
111
+ * https://chartjs-plugin-datalabels.netlify.app
112
+ * (c) 2017-2022 chartjs-plugin-datalabels contributors
113
+ * Released under the MIT license
114
+ */var Y0=function(){if(typeof window<"u"){if(window.devicePixelRatio)return window.devicePixelRatio;var e=window.screen;if(e)return(e.deviceXDPI||1)/(e.logicalXDPI||1)}return 1}(),io={toTextLines:function(e){var t=[],n;for(e=[].concat(e);e.length;)n=e.pop(),typeof n=="string"?t.unshift.apply(t,n.split(`
115
+ `)):Array.isArray(n)?e.push.apply(e,n):pe(e)||t.unshift(""+n);return t},textSize:function(e,t,n){var r=[].concat(t),i=r.length,s=e.font,o=0,a;for(e.font=n.string,a=0;a<i;++a)o=Math.max(e.measureText(r[a]).width,o);return e.font=s,{height:i*n.lineHeight,width:o}},bound:function(e,t,n){return Math.max(e,Math.min(t,n))},arrayDiff:function(e,t){var n=e.slice(),r=[],i,s,o,a;for(i=0,o=t.length;i<o;++i)a=t[i],s=n.indexOf(a),s===-1?r.push([a,1]):n.splice(s,1);for(i=0,o=n.length;i<o;++i)r.push([n[i],-1]);return r},rasterize:function(e){return Math.round(e*Y0)/Y0}};function Ru(e,t){var n=t.x,r=t.y;if(n===null)return{x:0,y:-1};if(r===null)return{x:1,y:0};var i=e.x-n,s=e.y-r,o=Math.sqrt(i*i+s*s);return{x:o?i/o:0,y:o?s/o:-1}}function ZD(e,t,n,r,i){switch(i){case"center":n=r=0;break;case"bottom":n=0,r=1;break;case"right":n=1,r=0;break;case"left":n=-1,r=0;break;case"top":n=0,r=-1;break;case"start":n=-n,r=-r;break;case"end":break;default:i*=Math.PI/180,n=Math.cos(i),r=Math.sin(i);break}return{x:e,y:t,vx:n,vy:r}}var UD=0,ey=1,ty=2,ny=4,ry=8;function Ma(e,t,n){var r=UD;return e<n.left?r|=ey:e>n.right&&(r|=ty),t<n.top?r|=ry:t>n.bottom&&(r|=ny),r}function JD(e,t){for(var n=e.x0,r=e.y0,i=e.x1,s=e.y1,o=Ma(n,r,t),a=Ma(i,s,t),l,c,u;!(!(o|a)||o&a);)l=o||a,l&ry?(c=n+(i-n)*(t.top-r)/(s-r),u=t.top):l&ny?(c=n+(i-n)*(t.bottom-r)/(s-r),u=t.bottom):l&ty?(u=r+(s-r)*(t.right-n)/(i-n),c=t.right):l&ey&&(u=r+(s-r)*(t.left-n)/(i-n),c=t.left),l===o?(n=c,r=u,o=Ma(n,r,t)):(i=c,s=u,a=Ma(i,s,t));return{x0:n,x1:i,y0:r,y1:s}}function Ea(e,t){var n=t.anchor,r=e,i,s;return t.clamp&&(r=JD(r,t.area)),n==="start"?(i=r.x0,s=r.y0):n==="end"?(i=r.x1,s=r.y1):(i=(r.x0+r.x1)/2,s=(r.y0+r.y1)/2),ZD(i,s,e.vx,e.vy,t.align)}var Aa={arc:function(e,t){var n=(e.startAngle+e.endAngle)/2,r=Math.cos(n),i=Math.sin(n),s=e.innerRadius,o=e.outerRadius;return Ea({x0:e.x+r*s,y0:e.y+i*s,x1:e.x+r*o,y1:e.y+i*o,vx:r,vy:i},t)},point:function(e,t){var n=Ru(e,t.origin),r=n.x*e.options.radius,i=n.y*e.options.radius;return Ea({x0:e.x-r,y0:e.y-i,x1:e.x+r,y1:e.y+i,vx:n.x,vy:n.y},t)},bar:function(e,t){var n=Ru(e,t.origin),r=e.x,i=e.y,s=0,o=0;return e.horizontal?(r=Math.min(e.x,e.base),s=Math.abs(e.base-e.x)):(i=Math.min(e.y,e.base),o=Math.abs(e.base-e.y)),Ea({x0:r,y0:i+o,x1:r+s,y1:i,vx:n.x,vy:n.y},t)},fallback:function(e,t){var n=Ru(e,t.origin);return Ea({x0:e.x,y0:e.y,x1:e.x+(e.width||0),y1:e.y+(e.height||0),vx:n.x,vy:n.y},t)}},hr=io.rasterize;function QD(e){var t=e.borderWidth||0,n=e.padding,r=e.size.height,i=e.size.width,s=-i/2,o=-r/2;return{frame:{x:s-n.left-t,y:o-n.top-t,w:i+n.width+t*2,h:r+n.height+t*2},text:{x:s,y:o,w:i,h:r}}}function KD(e,t){var n=t.chart.getDatasetMeta(t.datasetIndex).vScale;if(!n)return null;if(n.xCenter!==void 0&&n.yCenter!==void 0)return{x:n.xCenter,y:n.yCenter};var r=n.getBasePixel();return e.horizontal?{x:r,y:null}:{x:null,y:r}}function qD(e){return e instanceof dr?Aa.arc:e instanceof vi?Aa.point:e instanceof Nn?Aa.bar:Aa.fallback}function eF(e,t,n,r,i,s){var o=Math.PI/2;if(s){var a=Math.min(s,i/2,r/2),l=t+a,c=n+a,u=t+r-a,d=n+i-a;e.moveTo(t,c),l<u&&c<d?(e.arc(l,c,a,-Math.PI,-o),e.arc(u,c,a,-o,0),e.arc(u,d,a,0,o),e.arc(l,d,a,o,Math.PI)):l<u?(e.moveTo(l,n),e.arc(u,c,a,-o,o),e.arc(l,c,a,o,Math.PI+o)):c<d?(e.arc(l,c,a,-Math.PI,0),e.arc(l,d,a,0,Math.PI)):e.arc(l,c,a,-Math.PI,Math.PI),e.closePath(),e.moveTo(t,n)}else e.rect(t,n,r,i)}function tF(e,t,n){var r=n.backgroundColor,i=n.borderColor,s=n.borderWidth;!r&&(!i||!s)||(e.beginPath(),eF(e,hr(t.x)+s/2,hr(t.y)+s/2,hr(t.w)-s,hr(t.h)-s,n.borderRadius),e.closePath(),r&&(e.fillStyle=r,e.fill()),i&&s&&(e.strokeStyle=i,e.lineWidth=s,e.lineJoin="miter",e.stroke()))}function nF(e,t,n){var r=n.lineHeight,i=e.w,s=e.x,o=e.y+r/2;return t==="center"?s+=i/2:(t==="end"||t==="right")&&(s+=i),{h:r,w:i,x:s,y:o}}function rF(e,t,n){var r=e.shadowBlur,i=n.stroked,s=hr(n.x),o=hr(n.y),a=hr(n.w);i&&e.strokeText(t,s,o,a),n.filled&&(r&&i&&(e.shadowBlur=0),e.fillText(t,s,o,a),r&&i&&(e.shadowBlur=r))}function iF(e,t,n,r){var i=r.textAlign,s=r.color,o=!!s,a=r.font,l=t.length,c=r.textStrokeColor,u=r.textStrokeWidth,d=c&&u,f;if(!(!l||!o&&!d))for(n=nF(n,i,a),e.font=a.string,e.textAlign=i,e.textBaseline="middle",e.shadowBlur=r.textShadowBlur,e.shadowColor=r.textShadowColor,o&&(e.fillStyle=s),d&&(e.lineJoin="round",e.lineWidth=u,e.strokeStyle=c),f=0,l=t.length;f<l;++f)rF(e,t[f],{stroked:d,filled:o,w:n.w,x:n.x,y:n.y+n.h*f})}var iy=function(e,t,n,r){var i=this;i._config=e,i._index=r,i._model=null,i._rects=null,i._ctx=t,i._el=n};pt(iy.prototype,{_modelize:function(e,t,n,r){var i=this,s=i._index,o=ut(Xe([n.font,{}],r,s)),a=Xe([n.color,Je.color],r,s);return{align:Xe([n.align,"center"],r,s),anchor:Xe([n.anchor,"center"],r,s),area:r.chart.chartArea,backgroundColor:Xe([n.backgroundColor,null],r,s),borderColor:Xe([n.borderColor,null],r,s),borderRadius:Xe([n.borderRadius,0],r,s),borderWidth:Xe([n.borderWidth,0],r,s),clamp:Xe([n.clamp,!1],r,s),clip:Xe([n.clip,!1],r,s),color:a,display:e,font:o,lines:t,offset:Xe([n.offset,4],r,s),opacity:Xe([n.opacity,1],r,s),origin:KD(i._el,r),padding:yt(Xe([n.padding,4],r,s)),positioner:qD(i._el),rotation:Xe([n.rotation,0],r,s)*(Math.PI/180),size:io.textSize(i._ctx,t,o),textAlign:Xe([n.textAlign,"start"],r,s),textShadowBlur:Xe([n.textShadowBlur,0],r,s),textShadowColor:Xe([n.textShadowColor,a],r,s),textStrokeColor:Xe([n.textStrokeColor,a],r,s),textStrokeWidth:Xe([n.textStrokeWidth,0],r,s)}},update:function(e){var t=this,n=null,r=null,i=t._index,s=t._config,o,a,l,c=Xe([s.display,!0],e,i);c&&(o=e.dataset.data[i],a=le(Be(s.formatter,[o,e]),o),l=pe(a)?[]:io.toTextLines(a),l.length&&(n=t._modelize(c,l,s,e),r=QD(n))),t._model=n,t._rects=r},geometry:function(){return this._rects?this._rects.frame:{}},rotation:function(){return this._model?this._model.rotation:0},visible:function(){return this._model&&this._model.opacity},model:function(){return this._model},draw:function(e,t){var n=this,r=e.ctx,i=n._model,s=n._rects,o;this.visible()&&(r.save(),i.clip&&(o=i.area,r.beginPath(),r.rect(o.left,o.top,o.right-o.left,o.bottom-o.top),r.clip()),r.globalAlpha=io.bound(0,i.opacity,1),r.translate(hr(t.x),hr(t.y)),r.rotate(i.rotation),tF(r,s.frame,i),iF(r,i.lines,s.text,i),r.restore())}});var sF=Number.MIN_SAFE_INTEGER||-9007199254740991,oF=Number.MAX_SAFE_INTEGER||9007199254740991;function Fs(e,t,n){var r=Math.cos(n),i=Math.sin(n),s=t.x,o=t.y;return{x:s+r*(e.x-s)-i*(e.y-o),y:o+i*(e.x-s)+r*(e.y-o)}}function X0(e,t){var n=oF,r=sF,i=t.origin,s,o,a,l,c;for(s=0;s<e.length;++s)o=e[s],a=o.x-i.x,l=o.y-i.y,c=t.vx*a+t.vy*l,n=Math.min(n,c),r=Math.max(r,c);return{min:n,max:r}}function ka(e,t){var n=t.x-e.x,r=t.y-e.y,i=Math.sqrt(n*n+r*r);return{vx:(t.x-e.x)/i,vy:(t.y-e.y)/i,origin:e,ln:i}}var sy=function(){this._rotation=0,this._rect={x:0,y:0,w:0,h:0}};pt(sy.prototype,{center:function(){var e=this._rect;return{x:e.x+e.w/2,y:e.y+e.h/2}},update:function(e,t,n){this._rotation=n,this._rect={x:t.x+e.x,y:t.y+e.y,w:t.w,h:t.h}},contains:function(e){var t=this,n=1,r=t._rect;return e=Fs(e,t.center(),-t._rotation),!(e.x<r.x-n||e.y<r.y-n||e.x>r.x+r.w+n*2||e.y>r.y+r.h+n*2)},intersects:function(e){var t=this._points(),n=e._points(),r=[ka(t[0],t[1]),ka(t[0],t[3])],i,s,o;for(this._rotation!==e._rotation&&r.push(ka(n[0],n[1]),ka(n[0],n[3])),i=0;i<r.length;++i)if(s=X0(t,r[i]),o=X0(n,r[i]),s.max<o.min||o.max<s.min)return!1;return!0},_points:function(){var e=this,t=e._rect,n=e._rotation,r=e.center();return[Fs({x:t.x,y:t.y},r,n),Fs({x:t.x+t.w,y:t.y},r,n),Fs({x:t.x+t.w,y:t.y+t.h},r,n),Fs({x:t.x,y:t.y+t.h},r,n)]}});function oy(e,t,n){var r=t.positioner(e,t),i=r.vx,s=r.vy;if(!i&&!s)return{x:r.x,y:r.y};var o=n.w,a=n.h,l=t.rotation,c=Math.abs(o/2*Math.cos(l))+Math.abs(a/2*Math.sin(l)),u=Math.abs(o/2*Math.sin(l))+Math.abs(a/2*Math.cos(l)),d=1/Math.max(Math.abs(i),Math.abs(s));return c*=i*d,u*=s*d,c+=t.offset*i,u+=t.offset*s,{x:r.x+c,y:r.y+u}}function aF(e,t){var n,r,i,s;for(n=e.length-1;n>=0;--n)for(i=e[n].$layout,r=n-1;r>=0&&i._visible;--r)s=e[r].$layout,s._visible&&i._box.intersects(s._box)&&t(i,s);return e}function lF(e){var t,n,r,i,s,o,a;for(t=0,n=e.length;t<n;++t)r=e[t],i=r.$layout,i._visible&&(a=new Proxy(r._el,{get:(l,c)=>l.getProps([c],!0)[c]}),s=r.geometry(),o=oy(a,r.model(),s),i._box.update(o,s,r.rotation()));return aF(e,function(l,c){var u=l._hidable,d=c._hidable;u&&d||d?c._visible=!1:u&&(l._visible=!1)})}var so={prepare:function(e){var t=[],n,r,i,s,o;for(n=0,i=e.length;n<i;++n)for(r=0,s=e[n].length;r<s;++r)o=e[n][r],t.push(o),o.$layout={_box:new sy,_hidable:!1,_visible:!0,_set:n,_idx:o._index};return t.sort(function(a,l){var c=a.$layout,u=l.$layout;return c._idx===u._idx?u._set-c._set:u._idx-c._idx}),this.update(t),t},update:function(e){var t=!1,n,r,i,s,o;for(n=0,r=e.length;n<r;++n)i=e[n],s=i.model(),o=i.$layout,o._hidable=s&&s.display==="auto",o._visible=i.visible(),t|=o._hidable;t&&lF(e)},lookup:function(e,t){var n,r;for(n=e.length-1;n>=0;--n)if(r=e[n].$layout,r&&r._visible&&r._box.contains(t))return e[n];return null},draw:function(e,t){var n,r,i,s,o,a;for(n=0,r=t.length;n<r;++n)i=t[n],s=i.$layout,s._visible&&(o=i.geometry(),a=oy(i._el,i.model(),o),s._box.update(a,o,i.rotation()),i.draw(e,a))}},cF=function(e){if(pe(e))return null;var t=e,n,r,i;if(Ce(e))if(!pe(e.label))t=e.label;else if(!pe(e.r))t=e.r;else for(t="",n=Object.keys(e),i=0,r=n.length;i<r;++i)t+=(i!==0?", ":"")+n[i]+": "+e[n[i]];return""+t},uF={align:"center",anchor:"center",backgroundColor:null,borderColor:null,borderRadius:0,borderWidth:0,clamp:!1,clip:!1,color:void 0,display:!0,font:{family:void 0,lineHeight:1.2,size:void 0,style:void 0,weight:null},formatter:cF,labels:void 0,listeners:{},offset:4,opacity:1,padding:{top:4,right:4,bottom:4,left:4},rotation:0,textAlign:"start",textStrokeColor:void 0,textStrokeWidth:0,textShadowBlur:0,textShadowColor:void 0},jt="$datalabels",ay="$default";function dF(e,t){var n=e.datalabels,r={},i=[],s,o;return n===!1?null:(n===!0&&(n={}),t=pt({},[t,n]),s=t.labels||{},o=Object.keys(s),delete t.labels,o.length?o.forEach(function(a){s[a]&&i.push(pt({},[t,s[a],{_key:a}]))}):i.push(t),r=i.reduce(function(a,l){return Fe(l.listeners||{},function(c,u){a[u]=a[u]||{},a[u][l._key||ay]=c}),delete l.listeners,a},{}),{labels:i,listeners:r})}function Od(e,t,n,r){if(t){var i=n.$context,s=n.$groups,o;t[s._set]&&(o=t[s._set][s._key],o&&Be(o,[i,r])===!0&&(e[jt]._dirty=!0,n.update(i)))}}function fF(e,t,n,r,i){var s,o;!n&&!r||(n?r?n!==r&&(o=s=!0):o=!0:s=!0,o&&Od(e,t.leave,n,i),s&&Od(e,t.enter,r,i))}function hF(e,t){var n=e[jt],r=n._listeners,i,s;if(!(!r.enter&&!r.leave)){if(t.type==="mousemove")s=so.lookup(n._labels,t);else if(t.type!=="mouseout")return;i=n._hovered,n._hovered=s,fF(e,r,i,s,t)}}function gF(e,t){var n=e[jt],r=n._listeners.click,i=r&&so.lookup(n._labels,t);i&&Od(e,r,i,t)}var ly={id:"datalabels",defaults:uF,beforeInit:function(e){e[jt]={_actives:[]}},beforeUpdate:function(e){var t=e[jt];t._listened=!1,t._listeners={},t._datasets=[],t._labels=[]},afterDatasetUpdate:function(e,t,n){var r=t.index,i=e[jt],s=i._datasets[r]=[],o=e.isDatasetVisible(r),a=e.data.datasets[r],l=dF(a,n),c=t.meta.data||[],u=e.ctx,d,f,h,g,p,m,b,x;for(u.save(),d=0,h=c.length;d<h;++d)if(b=c[d],b[jt]=[],o&&b&&e.getDataVisibility(d)&&!b.skip)for(f=0,g=l.labels.length;f<g;++f)p=l.labels[f],m=p._key,x=new iy(p,u,b,d),x.$groups={_set:r,_key:m||ay},x.$context={active:!1,chart:e,dataIndex:d,dataset:a,datasetIndex:r},x.update(x.$context),b[jt].push(x),s.push(x);u.restore(),pt(i._listeners,l.listeners,{merger:function(y,_,w){_[y]=_[y]||{},_[y][t.index]=w[y],i._listened=!0}})},afterUpdate:function(e){e[jt]._labels=so.prepare(e[jt]._datasets)},afterDatasetsDraw:function(e){so.draw(e,e[jt]._labels)},beforeEvent:function(e,t){if(e[jt]._listened){var n=t.event;switch(n.type){case"mousemove":case"mouseout":hF(e,n);break;case"click":gF(e,n);break}}},afterEvent:function(e){var t=e[jt],n=t._actives,r=t._actives=e.getActiveElements(),i=io.arrayDiff(n,r),s,o,a,l,c,u,d;for(s=0,o=i.length;s<o;++s)if(c=i[s],c[1])for(d=c[0].element[jt]||[],a=0,l=d.length;a<l;++a)u=d[a],u.$context.active=c[1]===1,u.update(u.$context);(t._dirty||i.length)&&(so.update(t._labels),e.render()),delete t._dirty}};mt.register(dr,Di,Oi,ly);mt.defaults.font.family="'Rubik', 'Inter', sans-serif";const pF=({labels:e,dataValues:t,colors:n,title:r,tableHeader:i="",renderLegendTable:s})=>{const[o,a]=C.useState(!1),l=["#ff6503","#ff8533","#ffa366","#3a3a3a","#4a4a4a","#5a5a5a","#dae0e8","#c5cdd7","#b0b8c6","#9ba5b5"],c=n||l.slice(0,e.length>l.length?l.length:e.length),u={labels:e,datasets:[{data:t,backgroundColor:c,hoverBackgroundColor:c.map(p=>p+"CC"),borderWidth:2}]},d=t.reduce((p,m)=>p+m,0),f={responsive:!0,cutout:"70%",maintainAspectRatio:!1,plugins:{title:{display:!1},legend:{display:!1},datalabels:{color:"var(--chart-text-color)",formatter:(p,m)=>{const b=m.chart.data.datasets[0].data.reduce((y,_)=>y+_,0);return`${(p/b*100).toFixed(2)+"%"}
116
+ (${p})`},font:function(p){const m=p.chart.width,b=Math.round(m/32);return{weight:"bold",size:b>12?12:b}},backgroundColor:"var(--brand-light)",borderRadius:24,padding:{top:8,bottom:8,left:10,right:10},anchor:"end",display:!1},tooltip:{callbacks:{label:p=>{const m=p.raw;return`${(m/d*100).toFixed(2)}% (${m})`}}}}},h=e.map((p,m)=>({id:m+1,label:p,percentage:(t[m]/d*100).toFixed(2)+"%",value:t[m]})),g=v.jsx("div",{className:"space-y-2",children:h.map(p=>v.jsxs("div",{className:"flex items-center justify-between p-2 border-b",style:{borderColor:"var(--border-color)"},children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("div",{style:{width:"12px",height:"12px",borderRadius:"50%",backgroundColor:c[p.id-1]}}),v.jsx("span",{style:{color:"var(--text-color)"},children:p.label})]}),v.jsxs("div",{className:"flex gap-4",children:[v.jsx("span",{style:{color:"var(--secondary-text-color)"},children:p.percentage}),v.jsxs("span",{style:{color:"var(--secondary-text-color)"},children:["(",p.value,")"]})]})]},p.id))});return v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"flex flex-row flex-1 items-end",children:[v.jsx("div",{className:"w-2/3 h-64",children:v.jsx(qx,{data:u,options:f})}),v.jsx(nh,{legends:e,colors:c,dataValues:t,showAllLegends:o,onClick:()=>a(!o)})]}),v.jsx(ef,{isOpen:o,onClose:()=>{a(!1)},title:`${r||"Chart"} Legends:`,showFooter:!1,body:s?s(h):g})]})},Ie={brandOrange:"#ff6503",brandDark:"#3a3a3a",brandDarkSecondary:"#2c2c2c",brandLight:"#dae0e8",brandOrange10:"rgba(255, 101, 3, 0.1)",appBgColor:"#ffffff",appBgColorDark:"#111111",bgColor:"#ffffff",textColor:"#3a3a3a",hoverBgColor:"#f3f4f6",sidebarHoverBg:"#dae0e8",gridColor:"rgba(0, 0, 0, 0.08)",chartTextColor:"#3a3a3a",chartGridColor:"rgba(0, 0, 0, 0.08)",chartLabelColor:"#4b5563",borderColor:"#e5e7eb",secondaryTextColor:"#6b7280",disabledTextColor:"#9ca3af",statusErrorBg:"#fee2e2",statusErrorText:"#b91c1c",statusErrorBorder:"#fca5a5",statusWarningBg:"#fef3c7",statusWarningText:"#92400e",statusWarningBorder:"#fcd34d",statusSuccessBg:"#f0fdf4",statusSuccessText:"#166534",statusSuccessBorder:"#bbf7d0",fontFamily:"'Rubik', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",fontFamilyHeading:"'Afacad', 'Rubik', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"},mF={bgColor:"#3a3a3a",textColor:"#f9fafb",hoverBgColor:"#4b4b4b",sidebarHoverBg:"#2c2c2c",gridColor:"rgba(255, 255, 255, 0.1)",chartTextColor:"#f9fafb",chartGridColor:"rgba(255, 255, 255, 0.1)",chartLabelColor:"#d1d5db",borderColor:"#4b5563",secondaryTextColor:"#9ca3af",disabledTextColor:"#6b7280",statusErrorBg:"#450a0a",statusErrorText:"#fca5a5",statusErrorBorder:"#991b1b",statusWarningBg:"#451a03",statusWarningText:"#fcd34d",statusWarningBorder:"#b45309",statusSuccessBg:"rgba(20, 83, 45, 0.2)",statusSuccessText:"#bbf7d0",statusSuccessBorder:"#166534"},cy=C.createContext(void 0),uy=({children:e,defaultTheme:t,config:n={},storageKey:r="theme"})=>{const i=()=>{if(typeof window<"u"){const g=localStorage.getItem(r);if(g==="light"||g==="dark")return g}return t||(typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light")},[s,o]=C.useState(i),[a,l]=C.useState(()=>({...Ie,...n})),c=C.useMemo(()=>s==="dark"?{...a,...mF,...n}:{...a,...n},[s,a,n]);C.useEffect(()=>{if(typeof window>"u")return;const g=window.document.documentElement;g.classList.remove(s==="light"?"dark":"light"),g.classList.add(s),localStorage.setItem(r,s);const p={"--brand-orange":c.brandOrange||Ie.brandOrange,"--brand-dark":c.brandDark||Ie.brandDark,"--brand-dark-secondary":c.brandDarkSecondary||Ie.brandDarkSecondary,"--brand-light":c.brandLight||Ie.brandLight,"--brand-orange-10":c.brandOrange10||Ie.brandOrange10,"--app-bg-color":c.appBgColor||Ie.appBgColor,"--app-bg-color-dark":c.appBgColorDark||Ie.appBgColorDark,"--bg-color":c.bgColor||Ie.bgColor,"--text-color":c.textColor||Ie.textColor,"--hover-bg-color":c.hoverBgColor||Ie.hoverBgColor,"--sidebar-hover-bg":c.sidebarHoverBg||Ie.sidebarHoverBg,"--grid-color":c.gridColor||Ie.gridColor,"--chart-text-color":c.chartTextColor||Ie.chartTextColor,"--chart-grid-color":c.chartGridColor||Ie.chartGridColor,"--chart-label-color":c.chartLabelColor||Ie.chartLabelColor,"--border-color":c.borderColor||Ie.borderColor,"--secondary-text-color":c.secondaryTextColor||Ie.secondaryTextColor,"--disabled-text-color":c.disabledTextColor||Ie.disabledTextColor,"--status-error-bg":c.statusErrorBg||Ie.statusErrorBg,"--status-error-text":c.statusErrorText||Ie.statusErrorText,"--status-error-border":c.statusErrorBorder||Ie.statusErrorBorder,"--status-warning-bg":c.statusWarningBg||Ie.statusWarningBg,"--status-warning-text":c.statusWarningText||Ie.statusWarningText,"--status-warning-border":c.statusWarningBorder||Ie.statusWarningBorder,"--status-success-bg":c.statusSuccessBg||Ie.statusSuccessBg,"--status-success-text":c.statusSuccessText||Ie.statusSuccessText,"--status-success-border":c.statusSuccessBorder||Ie.statusSuccessBorder,"--font-family":c.fontFamily||Ie.fontFamily,"--font-family-heading":c.fontFamilyHeading||Ie.fontFamilyHeading,...c.customVariables||{}};Object.entries(p).forEach(([m,b])=>{g.style.setProperty(m,b)}),c.fontFamily&&(document.body.style.fontFamily=c.fontFamily),document.body.style.backgroundColor=s==="dark"?c.appBgColorDark||Ie.appBgColorDark:c.appBgColor||Ie.appBgColor},[s,c,r]);const h={theme:s,toggleTheme:()=>{o(g=>g==="light"?"dark":"light")},setTheme:g=>{o(g)},config:c,updateConfig:g=>{l(p=>({...p,...g}))}};return v.jsx(cy.Provider,{value:h,children:e})},Fc=()=>{const e=C.useContext(cy);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e};mt.register(dr,Di,Oi,ly);mt.defaults.font.family="'Rubik', 'Inter', sans-serif";const bF=({labels:e,dataValues:t,colors:n,title:r="",tableHeader:i="",renderLegendTable:s})=>{const[o,a]=C.useState(!1),{theme:l}=Fc(),c=["#ff6503","#ff8533","#ffa366","#3a3a3a","#4a4a4a"],u=n||c.slice(0,e.length>c.length?c.length:e.length),d={labels:e,datasets:[{data:t,backgroundColor:u,hoverBackgroundColor:u.map(m=>m+"CC"),borderColor:"var(--border-color)",borderWidth:1}]},f=t.reduce((m,b)=>m+b,0),h={responsive:!0,maintainAspectRatio:!1,plugins:{title:{display:!1},legend:{display:!1},datalabels:{color:"#fff",anchor:"center",align:"center",formatter:(m,b)=>{const x=b.chart.data.datasets[0].data.reduce((w,E)=>{const M=Number(E);return isNaN(M)?w:w+M},0);return`${Math.round(m/x*100)+"%"}`},font:function(m){const b=m.chart.width,x=Math.round(b/24);return{weight:"bold",size:x>14?14:x}}},tooltip:{callbacks:{label:m=>{const b=m.raw,x=t.reduce((_,w)=>_+w,0);return` ${(b/x*100).toFixed(2)}% (${b})`}}}}},g=e.map((m,b)=>({id:b+1,label:m,percentage:(t[b]/f*100).toFixed(2)+"%",value:t[b]})),p=v.jsx("div",{className:"space-y-2",children:g.map(m=>v.jsxs("div",{className:"flex items-center justify-between p-2 border-b",style:{borderColor:"var(--border-color)"},children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("div",{style:{width:"12px",height:"12px",borderRadius:"50%",backgroundColor:u[m.id-1]}}),v.jsx("span",{style:{color:"var(--text-color)"},children:m.label})]}),v.jsxs("div",{className:"flex gap-4",children:[v.jsx("span",{style:{color:"var(--secondary-text-color)"},children:m.percentage}),v.jsxs("span",{style:{color:"var(--secondary-text-color)"},children:["(",m.value,")"]})]})]},m.id))});return v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"pie-chart-container flex flex-row flex-1 items-end",children:[v.jsx("div",{className:"w-2/3 h-64",children:v.jsx(XD,{data:d,options:h})}),v.jsx(nh,{legends:e,colors:u,dataValues:t,showAllLegends:o,onClick:()=>a(!o)})]}),v.jsx(ef,{isOpen:o,onClose:()=>{a(!1)},title:`${r||"Chart"} Legends:`,showFooter:!1,body:s?s(g):p})]})};mt.register(...$D);mt.register(os,vr,Nn,vi,fr,xh,Di,Oi);mt.defaults.font.family="'Rubik', 'Inter', sans-serif";const vF=({chartData:e,title:t})=>{const{theme:n}=Fc(),r=getComputedStyle(document.documentElement).getPropertyValue("--chart-text-color").trim()||(n==="dark"?"#fff":"#333333"),i=C.useMemo(()=>({responsive:!0,maintainAspectRatio:!1,interaction:{mode:"nearest",intersect:!1},scales:{y:{beginAtZero:!0,grid:{color:getComputedStyle(document.documentElement).getPropertyValue("--chart-grid-color").trim()},ticks:{maxTicksLimit:8,font:{size:12,weight:"bold"},color:r},border:{color:getComputedStyle(document.documentElement).getPropertyValue("--border-color").trim()}},x:{grid:{display:!1,color:getComputedStyle(document.documentElement).getPropertyValue("--chart-grid-color").trim()},ticks:{font:{size:12,weight:"bold"},color:r},border:{color:getComputedStyle(document.documentElement).getPropertyValue("--border-color").trim()}}},plugins:{datalabels:{color:r,font:{weight:"bold",size:14},anchor:"end",align:"left",formatter:(o,a)=>a.dataset.label==="Blue Bar"?o.toLocaleString():""},legend:{display:!1,labels:{color:r}},title:{display:!0,text:t||"",color:r,font:{weight:"600",size:20},position:"top",align:"start"},tooltip:{backgroundColor:getComputedStyle(document.documentElement).getPropertyValue("--bg-color").trim(),titleColor:r,bodyColor:r,borderColor:getComputedStyle(document.documentElement).getPropertyValue("--border-color").trim(),borderWidth:1,callbacks:{label:function(o){return`${o.dataset.type==="line"?"Trend":"Value"}: ${o.raw}`}}}}}),[t,n,r]),s=C.useMemo(()=>{var o;return e!=null&&e.monthlyData?{labels:(o=e.monthlyData)==null?void 0:o.map(a=>a.month),datasets:[{label:`${t}`,type:"line",data:e.monthlyData.map(a=>a.value),borderColor:getComputedStyle(document.documentElement).getPropertyValue("--brand-orange").trim(),borderWidth:3,pointRadius:4,pointBackgroundColor:getComputedStyle(document.documentElement).getPropertyValue("--bg-color").trim(),pointBorderColor:getComputedStyle(document.documentElement).getPropertyValue("--brand-orange").trim(),pointBorderWidth:3,tension:0,fill:!1,yAxisID:"y",stack:"stack 1"},{label:`${t}`,type:"bar",data:e.monthlyData.map(a=>a.value),backgroundColor:getComputedStyle(document.documentElement).getPropertyValue("--brand-light").trim(),borderSkipped:!1,maxBarThickness:30,stack:"Stack 0",borderRadius:{topLeft:20,topRight:20,bottomLeft:0,bottomRight:0}}]}:{labels:[],datasets:[]}},[e,t]);return v.jsx("div",{className:"vertical-bar-chart",style:{height:"400px"},children:v.jsx(yh,{type:"bar",options:i,data:s})})};mt.register(os,Ei,vr,Nn,xh,Di,Oi);mt.defaults.font.family="'Rubik', 'Inter', sans-serif";const xF=({data:e,maxValue:t=5e4,scaleType:n=ii.LINEAR})=>{const{theme:r}=Fc(),i=getComputedStyle(document.documentElement).getPropertyValue("--chart-text-color").trim()||(r==="dark"?"#fff":"#333333"),{processedData:s,computedMaxValue:o}=C.useMemo(()=>{const d=Object.values(e);let f=[...d],h=t;if(n===ii.NORMALISED){const g=Math.min(...d),m=Math.max(...d)-g;f=d.map(b=>(b-g)/m*100),h=100}else n===ii.LOG?(f=d.map(g=>Math.max(g,.1)),h=t||Math.max(...f)*1.1):h=t||Math.max(...d)*1.1;return{processedData:Object.keys(e).reduce((g,p,m)=>(g[p]=f[m],g),{}),computedMaxValue:h}},[e,n,t]),a=Math.max(300,Object.keys(e).length*50),l=d=>n===ii.NORMALISED?`Value: ${e[Object.keys(e)[d.dataIndex]].toLocaleString()} (${d.raw.toFixed(2)}%)`:`Value: ${d.raw.toLocaleString()}`,c={indexAxis:"y",responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1,labels:{color:i}},title:{display:!1},datalabels:{color:"#ffff",font:{weight:"bold",size:14},anchor:"end",align:"left",formatter:(d,f)=>f.dataset.label==="Blue Bar"?d.toLocaleString():""},tooltip:{backgroundColor:getComputedStyle(document.documentElement).getPropertyValue("--bg-color").trim(),titleColor:i,bodyColor:i,borderColor:getComputedStyle(document.documentElement).getPropertyValue("--border-color").trim(),borderWidth:1,callbacks:{label:d=>l(d)}}},scales:{x:{type:n===ii.LOG?"logarithmic":"linear",max:o,grid:{display:!1,offset:!1,color:getComputedStyle(document.documentElement).getPropertyValue("--chart-grid-color").trim()},ticks:{font:{size:11.19,weight:"400"},color:i},border:{color:getComputedStyle(document.documentElement).getPropertyValue("--border-color").trim()}},y:{grid:{display:!1,color:getComputedStyle(document.documentElement).getPropertyValue("--chart-grid-color").trim()},ticks:{font:{size:10.33,weight:"500"},color:i,align:"center",callback:function(d){const f=this.getLabelForValue(d),h=25;return f.length>h?f.slice(0,h)+"...":f}},border:{color:getComputedStyle(document.documentElement).getPropertyValue("--border-color").trim()}}}},u={labels:Object.keys(e),datasets:[{label:"Bar Chart",data:Object.values(s),backgroundColor:getComputedStyle(document.documentElement).getPropertyValue("--brand-orange").trim(),borderRadius:{topLeft:0,topRight:20,bottomLeft:0,bottomRight:20},barThickness:25,borderSkipped:!1,grouped:!1,maxBarThickness:30,stack:"foreground"}]};return v.jsx("div",{className:"horizontal-bar-chart-container",style:{height:`${a}px`},children:v.jsx(YD,{options:c,data:u})})};function dy(e,t=2){if(e===0)return"0 bytes";const n=["bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],r=Math.floor(Math.log(e)/Math.log(1024));return`${(e/Math.pow(1024,r)).toFixed(t)} ${n[r]}`}const yF=({icon:e,value:t,isSize:n=!1,label:r})=>{const i=C.useMemo(()=>{if(!n)return t;const s=typeof t=="number"?t:parseInt(t,10),o=dy(s).split(" ");return{size:o[0],unit:o[1]}},[t,n]);return v.jsxs("div",{className:"flex flex-col select-none items-center justify-center rounded-lg relative w-full shadow-sm !p-0",style:{border:"1px solid var(--border-color)"},children:[v.jsxs("div",{className:"flex flex-col flex-1 items-center justify-center p-0",children:[v.jsx("div",{className:"p-2",style:{color:"var(--brand-orange)"},children:typeof e=="string"?v.jsx("img",{src:e,alt:r,className:"h-10 w-10 md:h-16 md:w-16 lg:h-20 lg:w-20 object-contain"}):v.jsx("div",{className:"text-4xl md:text-5xl lg:text-6xl",children:e})}),v.jsxs("div",{className:"font-bold text-center text-xl md:text-2xl lg:text-3xl mt-2",style:{color:"var(--chart-text-color)"},children:[n?i.size:i,n&&v.jsx("span",{className:"ml-1 text-sm md:text-base",style:{color:"var(--secondary-text-color)"},children:i.unit})]})]}),v.jsx("div",{className:"flex items-center justify-center font-bold p-2 w-full text-center text-sm md:text-base border-t",style:{backgroundColor:"var(--brand-light)",color:"var(--brand-dark)",borderTopColor:"var(--border-color)"},children:r})]})};mt.register(dr,Di,Oi);mt.defaults.font.family="'Rubik', 'Inter', sans-serif";const CF=e=>`
117
+ input[type=range] {
118
+ height: 4px;
119
+ -webkit-appearance: none;
120
+ width: 100%;
121
+ position: absolute;
122
+ top: 0;
123
+ margin: 0;
124
+ padding: 0;
125
+ background: none;
126
+ pointer-events: none;
127
+ }
128
+
129
+ /* Center thumbs vertically on the track */
130
+ input[type=range]::-webkit-slider-runnable-track {
131
+ height: 1px;
132
+ -webkit-appearance: none;
133
+ color: #13bba4;
134
+ }
135
+
136
+ input[type=range]::-webkit-slider-thumb {
137
+ -webkit-appearance: none;
138
+ width: ${e}px;
139
+ height: ${e}px;
140
+ border-radius: 50%;
141
+ background: #ffffff;
142
+ cursor: pointer;
143
+ box-shadow: 0 1px 3px rgba(0,0,0,0.3);
144
+ border: 2px solid gray;
145
+ margin-top: -0.8rem;
146
+ pointer-events: all;
147
+ z-index: 3;
148
+ }
149
+
150
+ input[type=range]::-moz-range-track {
151
+ height: 1px;
152
+ -moz-appearance: none;
153
+ color: #13bba4;
154
+ }
155
+
156
+ input[type=range]::-moz-range-thumb {
157
+ width: ${e}px;
158
+ height: ${e}px;
159
+ border-radius: 50%;
160
+ background: #ffffff;
161
+ cursor: pointer;
162
+ box-shadow: 0 1px 3px rgba(0,0,0,0.3);
163
+ border: 2px solid gray;
164
+ margin-top: -0.8rem;
165
+ pointer-events: all;
166
+ }
167
+ `,wF=({title:e,data:t,maxValue:n,minRange:r=0,maxRange:i=10,onMinRangeChange:s,onMaxRangeChange:o,showRangeSlider:a=!1,sliderMin:l=0,sliderMax:c=10,sliderStep:u=.1,formatSliderLabel:d=h=>`${h.toFixed(1)}Y`,hasData:f=!0})=>{const[h,g]=C.useState(0),p=C.useRef(null),[m,b]=C.useState(r),[x,y]=C.useState(i),_=t,w=n>0?_/n*100:0,E=25;C.useEffect(()=>{const O=()=>{if(p.current){const $=p.current.offsetWidth;g(Y=>Y!==$?$:Y)}};return window.addEventListener("resize",O),O(),()=>window.removeEventListener("resize",O)},[]),C.useEffect(()=>{b(r)},[r]),C.useEffect(()=>{y(i)},[i]);const M=C.useMemo(()=>({responsive:!0,maintainAspectRatio:!1,plugins:{title:{display:!1,text:e||"Gauge Chart",color:"#302d2eff",font:{weight:"bold",size:24},position:"top",align:"start",padding:{top:0}},legend:{display:!1},tooltip:{enabled:!1},datalabels:{display:!1}}}),[e]),S=C.useMemo(()=>({datasets:[{data:f?[w,100-w]:[0,100],backgroundColor:f?[getComputedStyle(document.documentElement).getPropertyValue("--brand-orange").trim()||"#ff6503",getComputedStyle(document.documentElement).getPropertyValue("--brand-light").trim()||"#dae0e8"]:[getComputedStyle(document.documentElement).getPropertyValue("--brand-light").trim()||"#dae0e8",getComputedStyle(document.documentElement).getPropertyValue("--brand-light").trim()||"#dae0e8"],borderWidth:0,cutout:"75%",circumference:300,rotation:-150}]}),[w,f]),I=C.useCallback(O=>{const $=parseFloat(O.target.value);b($)},[]),A=C.useCallback(O=>{const $=parseFloat(O.target.value);y($)},[]),k=C.useCallback(()=>{s==null||s(m)},[m,s]),D=C.useCallback(()=>{o==null||o(x)},[x,o]),N=c-l,V=N>0?(m-l)/N*100:0,P=N>0?(x-l)/N*100:0,T=`${V}%`,L=`${P}%`,R=C.useMemo(()=>{const O=getComputedStyle(document.documentElement).getPropertyValue("--brand-light").trim()||"#dae0e8",$=getComputedStyle(document.documentElement).getPropertyValue("--brand-orange").trim()||"#ff6503";return{background:`linear-gradient(to right, ${O} 0%, ${O} ${V}%,
168
+ ${$} ${V}%, ${$} ${P}%, ${O} ${P}%, ${O} 100%)`}},[V,P]);return v.jsxs("div",{className:"retention flex flex-col items-center rounded-xl select-none p-3",children:[v.jsx("div",{className:"w-full flex flex-col items-center justify-center p-2 mb-4",children:v.jsxs("div",{className:"relative w-11/12 h-64 flex items-center justify-center",children:[v.jsx(qx,{data:S,options:M}),v.jsx("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:f?v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"text-xl font-bold",style:{color:"var(--chart-text-color)"},children:_.toLocaleString()}),v.jsx("span",{className:"text-xs",style:{color:"var(--secondary-text-color)"},children:e})]}):v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"text-lg font-medium",style:{color:"var(--secondary-text-color)"},children:"No Data"}),v.jsx("span",{className:"text-xs",style:{color:"var(--secondary-text-color)"},children:"Available"})]})})]})}),a&&v.jsx("div",{className:"w-full px-6",children:v.jsxs("div",{className:"relative w-full",ref:p,children:[v.jsx("style",{children:CF(E)}),v.jsx("div",{className:"absolute top-0 w-full h-1 rounded-full",style:R}),v.jsx("input",{type:"range",min:l,max:c,step:u,value:m,onChange:I,onMouseUp:k,onTouchEnd:k,className:"w-full"}),v.jsx("input",{type:"range",min:l,max:c,step:u,value:x,onChange:A,onMouseUp:D,onTouchEnd:D,className:"w-full"}),v.jsx("div",{className:"absolute flex items-center justify-center w-8 h-8 text-white text-xs font-bold rounded",style:{left:T,top:"-40px",transform:"translateX(-50%)",clipPath:"polygon(0% 0%, 100% 0%, 100% 80%, 60% 80%, 50% 100%, 40% 80%, 0% 80%)",backgroundColor:"var(--brand-orange)"},children:d(m)}),v.jsx("div",{className:"absolute flex items-center justify-center w-8 h-8 text-white text-xs font-bold rounded",style:{left:L,top:"-40px",transform:"translateX(-50%)",clipPath:"polygon(0% 0%, 100% 0%, 100% 80%, 60% 80%, 50% 100%, 40% 80%, 0% 80%)",backgroundColor:"var(--brand-dark)"},children:d(x)})]})})]})};class Hr{constructor(){this._partials=new Float64Array(32),this._n=0}add(t){const n=this._partials;let r=0;for(let i=0;i<this._n&&i<32;i++){const s=n[i],o=t+s,a=Math.abs(t)<Math.abs(s)?t-(o-s):s-(o-t);a&&(n[r++]=a),t=o}return n[r]=t,this._n=r+1,this}valueOf(){const t=this._partials;let n=this._n,r,i,s,o=0;if(n>0){for(o=t[--n];n>0&&(r=o,i=t[--n],o=r+i,s=i-(o-r),!s););n>0&&(s<0&&t[n-1]<0||s>0&&t[n-1]>0)&&(i=s*2,r=o+i,i==r-o&&(o=r))}return o}}function*SF(e){for(const t of e)yield*t}function fy(e){return Array.from(SF(e))}function Wi(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=Math.max(0,Math.ceil((t-e)/n))|0,s=new Array(i);++r<i;)s[r]=e+r*n;return s}var ie=1e-6,wh=1e-12,ye=Math.PI,nt=ye/2,Z0=ye/4,Jt=ye*2,Tt=180/ye,je=ye/180,_e=Math.abs,ys=Math.atan,Gn=Math.atan2,ge=Math.cos,Ra=Math.ceil,hy=Math.exp,Wl=Math.log,Pu=Math.pow,de=Math.sin,on=Math.sign||function(e){return e>0?1:e<0?-1:0},Lt=Math.sqrt,Sh=Math.tan;function gy(e){return e>1?0:e<-1?ye:Math.acos(e)}function ln(e){return e>1?nt:e<-1?-nt:Math.asin(e)}function ht(){}function Hl(e,t){e&&J0.hasOwnProperty(e.type)&&J0[e.type](e,t)}var U0={Feature:function(e,t){Hl(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)Hl(n[r].geometry,t)}},J0={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)e=n[r],t.point(e[0],e[1],e[2])},LineString:function(e,t){Dd(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)Dd(n[r],t,0)},Polygon:function(e,t){Q0(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)Q0(n[r],t)},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)Hl(n[r],t)}};function Dd(e,t,n){var r=-1,i=e.length-n,s;for(t.lineStart();++r<i;)s=e[r],t.point(s[0],s[1],s[2]);t.lineEnd()}function Q0(e,t){var n=-1,r=e.length;for(t.polygonStart();++n<r;)Dd(e[n],t,1);t.polygonEnd()}function si(e,t){e&&U0.hasOwnProperty(e.type)?U0[e.type](e,t):Hl(e,t)}function Fd(e){return[Gn(e[1],e[0]),ln(e[2])]}function as(e){var t=e[0],n=e[1],r=ge(n);return[r*ge(t),r*de(t),de(n)]}function Pa(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function zl(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function Ou(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function Oa(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function Td(e){var t=Lt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}function Nd(e,t){function n(r,i){return r=e(r,i),t(r[0],r[1])}return e.invert&&t.invert&&(n.invert=function(r,i){return r=t.invert(r,i),r&&e.invert(r[0],r[1])}),n}function Ld(e,t){return _e(e)>ye&&(e-=Math.round(e/Jt)*Jt),[e,t]}Ld.invert=Ld;function py(e,t,n){return(e%=Jt)?t||n?Nd(q0(e),em(t,n)):q0(e):t||n?em(t,n):Ld}function K0(e){return function(t,n){return t+=e,_e(t)>ye&&(t-=Math.round(t/Jt)*Jt),[t,n]}}function q0(e){var t=K0(e);return t.invert=K0(-e),t}function em(e,t){var n=ge(e),r=de(e),i=ge(t),s=de(t);function o(a,l){var c=ge(l),u=ge(a)*c,d=de(a)*c,f=de(l),h=f*n+u*r;return[Gn(d*i-h*s,u*n-f*r),ln(h*i+d*s)]}return o.invert=function(a,l){var c=ge(l),u=ge(a)*c,d=de(a)*c,f=de(l),h=f*i-d*s;return[Gn(d*i+f*s,u*n+h*r),ln(h*n-u*r)]},o}function _F(e){e=py(e[0]*je,e[1]*je,e.length>2?e[2]*je:0);function t(n){return n=e(n[0]*je,n[1]*je),n[0]*=Tt,n[1]*=Tt,n}return t.invert=function(n){return n=e.invert(n[0]*je,n[1]*je),n[0]*=Tt,n[1]*=Tt,n},t}function IF(e,t,n,r,i,s){if(n){var o=ge(t),a=de(t),l=r*n;i==null?(i=t+r*Jt,s=t-l/2):(i=tm(o,i),s=tm(o,s),(r>0?i<s:i>s)&&(i+=r*Jt));for(var c,u=i;r>0?u>s:u<s;u-=l)c=Fd([o,-a*ge(u),-a*de(u)]),e.point(c[0],c[1])}}function tm(e,t){t=as(t),t[0]-=e,Td(t);var n=gy(-t[1]);return((-t[2]<0?-n:n)+Jt-ie)%Jt}function my(){var e=[],t;return{point:function(n,r,i){t.push([n,r,i])},lineStart:function(){e.push(t=[])},lineEnd:ht,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function sl(e,t){return _e(e[0]-t[0])<ie&&_e(e[1]-t[1])<ie}function Da(e,t,n,r){this.x=e,this.z=t,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function by(e,t,n,r,i){var s=[],o=[],a,l;if(e.forEach(function(g){if(!((p=g.length-1)<=0)){var p,m=g[0],b=g[p],x;if(sl(m,b)){if(!m[2]&&!b[2]){for(i.lineStart(),a=0;a<p;++a)i.point((m=g[a])[0],m[1]);i.lineEnd();return}b[0]+=2*ie}s.push(x=new Da(m,g,null,!0)),o.push(x.o=new Da(m,null,x,!1)),s.push(x=new Da(b,g,null,!1)),o.push(x.o=new Da(b,null,x,!0))}}),!!s.length){for(o.sort(t),nm(s),nm(o),a=0,l=o.length;a<l;++a)o[a].e=n=!n;for(var c=s[0],u,d;;){for(var f=c,h=!0;f.v;)if((f=f.n)===c)return;u=f.z,i.lineStart();do{if(f.v=f.o.v=!0,f.e){if(h)for(a=0,l=u.length;a<l;++a)i.point((d=u[a])[0],d[1]);else r(f.x,f.n.x,1,i);f=f.n}else{if(h)for(u=f.p.z,a=u.length-1;a>=0;--a)i.point((d=u[a])[0],d[1]);else r(f.x,f.p.x,-1,i);f=f.p}f=f.o,u=f.z,h=!h}while(!f.v);i.lineEnd()}}}function nm(e){if(t=e.length){for(var t,n=0,r=e[0],i;++n<t;)r.n=i=e[n],i.p=r,r=i;r.n=i=e[0],i.p=r}}function Du(e){return _e(e[0])<=ye?e[0]:on(e[0])*((_e(e[0])+ye)%Jt-ye)}function vy(e,t){var n=Du(t),r=t[1],i=de(r),s=[de(n),-ge(n),0],o=0,a=0,l=new Hr;i===1?r=nt+ie:i===-1&&(r=-nt-ie);for(var c=0,u=e.length;c<u;++c)if(f=(d=e[c]).length)for(var d,f,h=d[f-1],g=Du(h),p=h[1]/2+Z0,m=de(p),b=ge(p),x=0;x<f;++x,g=_,m=E,b=M,h=y){var y=d[x],_=Du(y),w=y[1]/2+Z0,E=de(w),M=ge(w),S=_-g,I=S>=0?1:-1,A=I*S,k=A>ye,D=m*E;if(l.add(Gn(D*I*de(A),b*M+D*ge(A))),o+=k?S+I*Jt:S,k^g>=n^_>=n){var N=zl(as(h),as(y));Td(N);var V=zl(s,N);Td(V);var P=(k^S>=0?-1:1)*ln(V[2]);(r>P||r===P&&(N[0]||N[1]))&&(a+=k^S>=0?1:-1)}}return(o<-ie||o<ie&&l<-wh)^a&1}function xy(e,t,n,r){return function(i){var s=t(i),o=my(),a=t(o),l=!1,c,u,d,f={point:h,lineStart:p,lineEnd:m,polygonStart:function(){f.point=b,f.lineStart=x,f.lineEnd=y,u=[],c=[]},polygonEnd:function(){f.point=h,f.lineStart=p,f.lineEnd=m,u=fy(u);var _=vy(c,r);u.length?(l||(i.polygonStart(),l=!0),by(u,EF,_,n,i)):_&&(l||(i.polygonStart(),l=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),l&&(i.polygonEnd(),l=!1),u=c=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function h(_,w){e(_,w)&&i.point(_,w)}function g(_,w){s.point(_,w)}function p(){f.point=g,s.lineStart()}function m(){f.point=h,s.lineEnd()}function b(_,w){d.push([_,w]),a.point(_,w)}function x(){a.lineStart(),d=[]}function y(){b(d[0][0],d[0][1]),a.lineEnd();var _=a.clean(),w=o.result(),E,M=w.length,S,I,A;if(d.pop(),c.push(d),d=null,!!M){if(_&1){if(I=w[0],(S=I.length-1)>0){for(l||(i.polygonStart(),l=!0),i.lineStart(),E=0;E<S;++E)i.point((A=I[E])[0],A[1]);i.lineEnd()}return}M>1&&_&2&&w.push(w.pop().concat(w.shift())),u.push(w.filter(MF))}}return f}}function MF(e){return e.length>1}function EF(e,t){return((e=e.x)[0]<0?e[1]-nt-ie:nt-e[1])-((t=t.x)[0]<0?t[1]-nt-ie:nt-t[1])}const rm=xy(function(){return!0},AF,RF,[-ye,-nt]);function AF(e){var t=NaN,n=NaN,r=NaN,i;return{lineStart:function(){e.lineStart(),i=1},point:function(s,o){var a=s>0?ye:-ye,l=_e(s-t);_e(l-ye)<ie?(e.point(t,n=(n+o)/2>0?nt:-nt),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(a,n),e.point(s,n),i=0):r!==a&&l>=ye&&(_e(t-r)<ie&&(t-=r*ie),_e(s-a)<ie&&(s-=a*ie),n=kF(t,n,s,o),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(a,n),i=0),e.point(t=s,n=o),r=a},lineEnd:function(){e.lineEnd(),t=n=NaN},clean:function(){return 2-i}}}function kF(e,t,n,r){var i,s,o=de(e-n);return _e(o)>ie?ys((de(t)*(s=ge(r))*de(n)-de(r)*(i=ge(t))*de(e))/(i*s*o)):(t+r)/2}function RF(e,t,n,r){var i;if(e==null)i=n*nt,r.point(-ye,i),r.point(0,i),r.point(ye,i),r.point(ye,0),r.point(ye,-i),r.point(0,-i),r.point(-ye,-i),r.point(-ye,0),r.point(-ye,i);else if(_e(e[0]-t[0])>ie){var s=e[0]<t[0]?ye:-ye;i=n*s/2,r.point(-s,i),r.point(0,i),r.point(s,i)}else r.point(t[0],t[1])}function PF(e){var t=ge(e),n=2*je,r=t>0,i=_e(t)>ie;function s(u,d,f,h){IF(h,e,n,f,u,d)}function o(u,d){return ge(u)*ge(d)>t}function a(u){var d,f,h,g,p;return{lineStart:function(){g=h=!1,p=1},point:function(m,b){var x=[m,b],y,_=o(m,b),w=r?_?0:c(m,b):_?c(m+(m<0?ye:-ye),b):0;if(!d&&(g=h=_)&&u.lineStart(),_!==h&&(y=l(d,x),(!y||sl(d,y)||sl(x,y))&&(x[2]=1)),_!==h)p=0,_?(u.lineStart(),y=l(x,d),u.point(y[0],y[1])):(y=l(d,x),u.point(y[0],y[1],2),u.lineEnd()),d=y;else if(i&&d&&r^_){var E;!(w&f)&&(E=l(x,d,!0))&&(p=0,r?(u.lineStart(),u.point(E[0][0],E[0][1]),u.point(E[1][0],E[1][1]),u.lineEnd()):(u.point(E[1][0],E[1][1]),u.lineEnd(),u.lineStart(),u.point(E[0][0],E[0][1],3)))}_&&(!d||!sl(d,x))&&u.point(x[0],x[1]),d=x,h=_,f=w},lineEnd:function(){h&&u.lineEnd(),d=null},clean:function(){return p|(g&&h)<<1}}}function l(u,d,f){var h=as(u),g=as(d),p=[1,0,0],m=zl(h,g),b=Pa(m,m),x=m[0],y=b-x*x;if(!y)return!f&&u;var _=t*b/y,w=-t*x/y,E=zl(p,m),M=Oa(p,_),S=Oa(m,w);Ou(M,S);var I=E,A=Pa(M,I),k=Pa(I,I),D=A*A-k*(Pa(M,M)-1);if(!(D<0)){var N=Lt(D),V=Oa(I,(-A-N)/k);if(Ou(V,M),V=Fd(V),!f)return V;var P=u[0],T=d[0],L=u[1],R=d[1],O;T<P&&(O=P,P=T,T=O);var $=T-P,Y=_e($-ye)<ie,W=Y||$<ie;if(!Y&&R<L&&(O=L,L=R,R=O),W?Y?L+R>0^V[1]<(_e(V[0]-P)<ie?L:R):L<=V[1]&&V[1]<=R:$>ye^(P<=V[0]&&V[0]<=T)){var G=Oa(I,(-A+N)/k);return Ou(G,M),[V,Fd(G)]}}}function c(u,d){var f=r?e:ye-e,h=0;return u<-f?h|=1:u>f&&(h|=2),d<-f?h|=4:d>f&&(h|=8),h}return xy(o,a,s,r?[0,-e]:[-ye,e-ye])}function OF(e,t,n,r,i,s){var o=e[0],a=e[1],l=t[0],c=t[1],u=0,d=1,f=l-o,h=c-a,g;if(g=n-o,!(!f&&g>0)){if(g/=f,f<0){if(g<u)return;g<d&&(d=g)}else if(f>0){if(g>d)return;g>u&&(u=g)}if(g=i-o,!(!f&&g<0)){if(g/=f,f<0){if(g>d)return;g>u&&(u=g)}else if(f>0){if(g<u)return;g<d&&(d=g)}if(g=r-a,!(!h&&g>0)){if(g/=h,h<0){if(g<u)return;g<d&&(d=g)}else if(h>0){if(g>d)return;g>u&&(u=g)}if(g=s-a,!(!h&&g<0)){if(g/=h,h<0){if(g>d)return;g>u&&(u=g)}else if(h>0){if(g<u)return;g<d&&(d=g)}return u>0&&(e[0]=o+u*f,e[1]=a+u*h),d<1&&(t[0]=o+d*f,t[1]=a+d*h),!0}}}}}var Ws=1e9,Fa=-Ws;function DF(e,t,n,r){function i(c,u){return e<=c&&c<=n&&t<=u&&u<=r}function s(c,u,d,f){var h=0,g=0;if(c==null||(h=o(c,d))!==(g=o(u,d))||l(c,u)<0^d>0)do f.point(h===0||h===3?e:n,h>1?r:t);while((h=(h+d+4)%4)!==g);else f.point(u[0],u[1])}function o(c,u){return _e(c[0]-e)<ie?u>0?0:3:_e(c[0]-n)<ie?u>0?2:1:_e(c[1]-t)<ie?u>0?1:0:u>0?3:2}function a(c,u){return l(c.x,u.x)}function l(c,u){var d=o(c,1),f=o(u,1);return d!==f?d-f:d===0?u[1]-c[1]:d===1?c[0]-u[0]:d===2?c[1]-u[1]:u[0]-c[0]}return function(c){var u=c,d=my(),f,h,g,p,m,b,x,y,_,w,E,M={point:S,lineStart:D,lineEnd:N,polygonStart:A,polygonEnd:k};function S(P,T){i(P,T)&&u.point(P,T)}function I(){for(var P=0,T=0,L=h.length;T<L;++T)for(var R=h[T],O=1,$=R.length,Y=R[0],W,G,se=Y[0],ce=Y[1];O<$;++O)W=se,G=ce,Y=R[O],se=Y[0],ce=Y[1],G<=r?ce>r&&(se-W)*(r-G)>(ce-G)*(e-W)&&++P:ce<=r&&(se-W)*(r-G)<(ce-G)*(e-W)&&--P;return P}function A(){u=d,f=[],h=[],E=!0}function k(){var P=I(),T=E&&P,L=(f=fy(f)).length;(T||L)&&(c.polygonStart(),T&&(c.lineStart(),s(null,null,1,c),c.lineEnd()),L&&by(f,a,P,s,c),c.polygonEnd()),u=c,f=h=g=null}function D(){M.point=V,h&&h.push(g=[]),w=!0,_=!1,x=y=NaN}function N(){f&&(V(p,m),b&&_&&d.rejoin(),f.push(d.result())),M.point=S,_&&u.lineEnd()}function V(P,T){var L=i(P,T);if(h&&g.push([P,T]),w)p=P,m=T,b=L,w=!1,L&&(u.lineStart(),u.point(P,T));else if(L&&_)u.point(P,T);else{var R=[x=Math.max(Fa,Math.min(Ws,x)),y=Math.max(Fa,Math.min(Ws,y))],O=[P=Math.max(Fa,Math.min(Ws,P)),T=Math.max(Fa,Math.min(Ws,T))];OF(R,O,e,t,n,r)?(_||(u.lineStart(),u.point(R[0],R[1])),u.point(O[0],O[1]),L||u.lineEnd(),E=!1):L&&(u.lineStart(),u.point(P,T),E=!1)}x=P,y=T,_=L}return M}}var Vd,Bd,ol,al,ls={sphere:ht,point:ht,lineStart:FF,lineEnd:ht,polygonStart:ht,polygonEnd:ht};function FF(){ls.point=NF,ls.lineEnd=TF}function TF(){ls.point=ls.lineEnd=ht}function NF(e,t){e*=je,t*=je,Bd=e,ol=de(t),al=ge(t),ls.point=LF}function LF(e,t){e*=je,t*=je;var n=de(t),r=ge(t),i=_e(e-Bd),s=ge(i),o=de(i),a=r*o,l=al*n-ol*r*s,c=ol*n+al*r*s;Vd.add(Gn(Lt(a*a+l*l),c)),Bd=e,ol=n,al=r}function VF(e){return Vd=new Hr,si(e,ls),+Vd}var jd=[null,null],BF={type:"LineString",coordinates:jd};function Gd(e,t){return jd[0]=e,jd[1]=t,VF(BF)}var im={Feature:function(e,t){return Yl(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)if(Yl(n[r].geometry,t))return!0;return!1}},sm={Sphere:function(){return!0},Point:function(e,t){return om(e.coordinates,t)},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)if(om(n[r],t))return!0;return!1},LineString:function(e,t){return am(e.coordinates,t)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)if(am(n[r],t))return!0;return!1},Polygon:function(e,t){return lm(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)if(lm(n[r],t))return!0;return!1},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)if(Yl(n[r],t))return!0;return!1}};function Yl(e,t){return e&&sm.hasOwnProperty(e.type)?sm[e.type](e,t):!1}function om(e,t){return Gd(e,t)===0}function am(e,t){for(var n,r,i,s=0,o=e.length;s<o;s++){if(r=Gd(e[s],t),r===0||s>0&&(i=Gd(e[s],e[s-1]),i>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))<wh*i))return!0;n=r}return!1}function lm(e,t){return!!vy(e.map(jF),yy(t))}function jF(e){return e=e.map(yy),e.pop(),e}function yy(e){return[e[0]*je,e[1]*je]}function GF(e,t){return(e&&im.hasOwnProperty(e.type)?im[e.type]:Yl)(e,t)}function cm(e,t,n){var r=Wi(e,t-ie,n).concat(t);return function(i){return r.map(function(s){return[i,s]})}}function um(e,t,n){var r=Wi(e,t-ie,n).concat(t);return function(i){return r.map(function(s){return[s,i]})}}function Cy(){var e,t,n,r,i,s,o,a,l=10,c=l,u=90,d=360,f,h,g,p,m=2.5;function b(){return{type:"MultiLineString",coordinates:x()}}function x(){return Wi(Ra(r/u)*u,n,u).map(g).concat(Wi(Ra(a/d)*d,o,d).map(p)).concat(Wi(Ra(t/l)*l,e,l).filter(function(y){return _e(y%u)>ie}).map(f)).concat(Wi(Ra(s/c)*c,i,c).filter(function(y){return _e(y%d)>ie}).map(h))}return b.lines=function(){return x().map(function(y){return{type:"LineString",coordinates:y}})},b.outline=function(){return{type:"Polygon",coordinates:[g(r).concat(p(o).slice(1),g(n).reverse().slice(1),p(a).reverse().slice(1))]}},b.extent=function(y){return arguments.length?b.extentMajor(y).extentMinor(y):b.extentMinor()},b.extentMajor=function(y){return arguments.length?(r=+y[0][0],n=+y[1][0],a=+y[0][1],o=+y[1][1],r>n&&(y=r,r=n,n=y),a>o&&(y=a,a=o,o=y),b.precision(m)):[[r,a],[n,o]]},b.extentMinor=function(y){return arguments.length?(t=+y[0][0],e=+y[1][0],s=+y[0][1],i=+y[1][1],t>e&&(y=t,t=e,e=y),s>i&&(y=s,s=i,i=y),b.precision(m)):[[t,s],[e,i]]},b.step=function(y){return arguments.length?b.stepMajor(y).stepMinor(y):b.stepMinor()},b.stepMajor=function(y){return arguments.length?(u=+y[0],d=+y[1],b):[u,d]},b.stepMinor=function(y){return arguments.length?(l=+y[0],c=+y[1],b):[l,c]},b.precision=function(y){return arguments.length?(m=+y,f=cm(s,i,90),h=um(t,e,m),g=cm(a,o,90),p=um(r,n,m),b):m},b.extentMajor([[-180,-90+ie],[180,90-ie]]).extentMinor([[-180,-80-ie],[180,80+ie]])}function $F(){return Cy()()}const $d=e=>e;var Fu=new Hr,Wd=new Hr,wy,Sy,Hd,zd,rr={point:ht,lineStart:ht,lineEnd:ht,polygonStart:function(){rr.lineStart=WF,rr.lineEnd=zF},polygonEnd:function(){rr.lineStart=rr.lineEnd=rr.point=ht,Fu.add(_e(Wd)),Wd=new Hr},result:function(){var e=Fu/2;return Fu=new Hr,e}};function WF(){rr.point=HF}function HF(e,t){rr.point=_y,wy=Hd=e,Sy=zd=t}function _y(e,t){Wd.add(zd*e-Hd*t),Hd=e,zd=t}function zF(){_y(wy,Sy)}var cs=1/0,Xl=cs,Po=-cs,Zl=Po,Ul={point:YF,lineStart:ht,lineEnd:ht,polygonStart:ht,polygonEnd:ht,result:function(){var e=[[cs,Xl],[Po,Zl]];return Po=Zl=-(Xl=cs=1/0),e}};function YF(e,t){e<cs&&(cs=e),e>Po&&(Po=e),t<Xl&&(Xl=t),t>Zl&&(Zl=t)}var Yd=0,Xd=0,Hs=0,Jl=0,Ql=0,Hi=0,Zd=0,Ud=0,zs=0,Iy,My,Pn,On,sn={point:Ai,lineStart:dm,lineEnd:fm,polygonStart:function(){sn.lineStart=UF,sn.lineEnd=JF},polygonEnd:function(){sn.point=Ai,sn.lineStart=dm,sn.lineEnd=fm},result:function(){var e=zs?[Zd/zs,Ud/zs]:Hi?[Jl/Hi,Ql/Hi]:Hs?[Yd/Hs,Xd/Hs]:[NaN,NaN];return Yd=Xd=Hs=Jl=Ql=Hi=Zd=Ud=zs=0,e}};function Ai(e,t){Yd+=e,Xd+=t,++Hs}function dm(){sn.point=XF}function XF(e,t){sn.point=ZF,Ai(Pn=e,On=t)}function ZF(e,t){var n=e-Pn,r=t-On,i=Lt(n*n+r*r);Jl+=i*(Pn+e)/2,Ql+=i*(On+t)/2,Hi+=i,Ai(Pn=e,On=t)}function fm(){sn.point=Ai}function UF(){sn.point=QF}function JF(){Ey(Iy,My)}function QF(e,t){sn.point=Ey,Ai(Iy=Pn=e,My=On=t)}function Ey(e,t){var n=e-Pn,r=t-On,i=Lt(n*n+r*r);Jl+=i*(Pn+e)/2,Ql+=i*(On+t)/2,Hi+=i,i=On*e-Pn*t,Zd+=i*(Pn+e),Ud+=i*(On+t),zs+=i*3,Ai(Pn=e,On=t)}function Ay(e){this._context=e}Ay.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:{this._context.moveTo(e,t),this._point=1;break}case 1:{this._context.lineTo(e,t);break}default:{this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,Jt);break}}},result:ht};var Jd=new Hr,Tu,ky,Ry,Ys,Xs,Oo={point:ht,lineStart:function(){Oo.point=KF},lineEnd:function(){Tu&&Py(ky,Ry),Oo.point=ht},polygonStart:function(){Tu=!0},polygonEnd:function(){Tu=null},result:function(){var e=+Jd;return Jd=new Hr,e}};function KF(e,t){Oo.point=Py,ky=Ys=e,Ry=Xs=t}function Py(e,t){Ys-=e,Xs-=t,Jd.add(Lt(Ys*Ys+Xs*Xs)),Ys=e,Xs=t}let hm,Kl,gm,pm;class mm{constructor(t){this._append=t==null?Oy:qF(t),this._radius=4.5,this._=""}pointRadius(t){return this._radius=+t,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){this._line===0&&(this._+="Z"),this._point=NaN}point(t,n){switch(this._point){case 0:{this._append`M${t},${n}`,this._point=1;break}case 1:{this._append`L${t},${n}`;break}default:{if(this._append`M${t},${n}`,this._radius!==gm||this._append!==Kl){const r=this._radius,i=this._;this._="",this._append`m0,${r}a${r},${r} 0 1,1 0,${-2*r}a${r},${r} 0 1,1 0,${2*r}z`,gm=r,Kl=this._append,pm=this._,this._=i}this._+=pm;break}}}result(){const t=this._;return this._="",t.length?t:null}}function Oy(e){let t=1;this._+=e[0];for(const n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function qF(e){const t=Math.floor(e);if(!(t>=0))throw new RangeError(`invalid digits: ${e}`);if(t>15)return Oy;if(t!==hm){const n=10**t;hm=t,Kl=function(i){let s=1;this._+=i[0];for(const o=i.length;s<o;++s)this._+=Math.round(arguments[s]*n)/n+i[s]}}return Kl}function bm(e,t){let n=3,r=4.5,i,s;function o(a){return a&&(typeof r=="function"&&s.pointRadius(+r.apply(this,arguments)),si(a,i(s))),s.result()}return o.area=function(a){return si(a,i(rr)),rr.result()},o.measure=function(a){return si(a,i(Oo)),Oo.result()},o.bounds=function(a){return si(a,i(Ul)),Ul.result()},o.centroid=function(a){return si(a,i(sn)),sn.result()},o.projection=function(a){return arguments.length?(i=a==null?(e=null,$d):(e=a).stream,o):e},o.context=function(a){return arguments.length?(s=a==null?(t=null,new mm(n)):new Ay(t=a),typeof r!="function"&&s.pointRadius(r),o):t},o.pointRadius=function(a){return arguments.length?(r=typeof a=="function"?a:(s.pointRadius(+a),+a),o):r},o.digits=function(a){if(!arguments.length)return n;if(a==null)n=null;else{const l=Math.floor(a);if(!(l>=0))throw new RangeError(`invalid digits: ${a}`);n=l}return t===null&&(s=new mm(n)),o},o.projection(e).digits(n).context(t)}function _h(e){return function(t){var n=new Qd;for(var r in e)n[r]=e[r];return n.stream=t,n}}function Qd(){}Qd.prototype={constructor:Qd,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()}};function Ih(e,t,n){var r=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),r!=null&&e.clipExtent(null),si(n,e.stream(Ul)),t(Ul.result()),r!=null&&e.clipExtent(r),e}function Mh(e,t,n){return Ih(e,function(r){var i=t[1][0]-t[0][0],s=t[1][1]-t[0][1],o=Math.min(i/(r[1][0]-r[0][0]),s/(r[1][1]-r[0][1])),a=+t[0][0]+(i-o*(r[1][0]+r[0][0]))/2,l=+t[0][1]+(s-o*(r[1][1]+r[0][1]))/2;e.scale(150*o).translate([a,l])},n)}function Dy(e,t,n){return Mh(e,[[0,0],t],n)}function Fy(e,t,n){return Ih(e,function(r){var i=+t,s=i/(r[1][0]-r[0][0]),o=(i-s*(r[1][0]+r[0][0]))/2,a=-s*r[0][1];e.scale(150*s).translate([o,a])},n)}function Ty(e,t,n){return Ih(e,function(r){var i=+t,s=i/(r[1][1]-r[0][1]),o=-s*r[0][0],a=(i-s*(r[1][1]+r[0][1]))/2;e.scale(150*s).translate([o,a])},n)}var vm=16,eT=ge(30*je);function xm(e,t){return+t?nT(e,t):tT(e)}function tT(e){return _h({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}})}function nT(e,t){function n(r,i,s,o,a,l,c,u,d,f,h,g,p,m){var b=c-r,x=u-i,y=b*b+x*x;if(y>4*t&&p--){var _=o+f,w=a+h,E=l+g,M=Lt(_*_+w*w+E*E),S=ln(E/=M),I=_e(_e(E)-1)<ie||_e(s-d)<ie?(s+d)/2:Gn(w,_),A=e(I,S),k=A[0],D=A[1],N=k-r,V=D-i,P=x*N-b*V;(P*P/y>t||_e((b*N+x*V)/y-.5)>.3||o*f+a*h+l*g<eT)&&(n(r,i,s,o,a,l,k,D,I,_/=M,w/=M,E,p,m),m.point(k,D),n(k,D,I,_,w,E,c,u,d,f,h,g,p,m))}}return function(r){var i,s,o,a,l,c,u,d,f,h,g,p,m={point:b,lineStart:x,lineEnd:_,polygonStart:function(){r.polygonStart(),m.lineStart=w},polygonEnd:function(){r.polygonEnd(),m.lineStart=x}};function b(S,I){S=e(S,I),r.point(S[0],S[1])}function x(){d=NaN,m.point=y,r.lineStart()}function y(S,I){var A=as([S,I]),k=e(S,I);n(d,f,u,h,g,p,d=k[0],f=k[1],u=S,h=A[0],g=A[1],p=A[2],vm,r),r.point(d,f)}function _(){m.point=b,r.lineEnd()}function w(){x(),m.point=E,m.lineEnd=M}function E(S,I){y(i=S,I),s=d,o=f,a=h,l=g,c=p,m.point=y}function M(){n(d,f,u,h,g,p,s,o,i,a,l,c,vm,r),m.lineEnd=_,_()}return m}}var rT=_h({point:function(e,t){this.stream.point(e*je,t*je)}});function iT(e){return _h({point:function(t,n){var r=e(t,n);return this.stream.point(r[0],r[1])}})}function sT(e,t,n,r,i){function s(o,a){return o*=r,a*=i,[t+e*o,n-e*a]}return s.invert=function(o,a){return[(o-t)/e*r,(n-a)/e*i]},s}function ym(e,t,n,r,i,s){if(!s)return sT(e,t,n,r,i);var o=ge(s),a=de(s),l=o*e,c=a*e,u=o/e,d=a/e,f=(a*n-o*t)/e,h=(a*t+o*n)/e;function g(p,m){return p*=r,m*=i,[l*p-c*m+t,n-c*p-l*m]}return g.invert=function(p,m){return[r*(u*p-d*m+f),i*(h-d*p-u*m)]},g}function Ir(e){return Ny(function(){return e})()}function Ny(e){var t,n=150,r=480,i=250,s=0,o=0,a=0,l=0,c=0,u,d=0,f=1,h=1,g=null,p=rm,m=null,b,x,y,_=$d,w=.5,E,M,S,I,A;function k(P){return S(P[0]*je,P[1]*je)}function D(P){return P=S.invert(P[0],P[1]),P&&[P[0]*Tt,P[1]*Tt]}k.stream=function(P){return I&&A===P?I:I=rT(iT(u)(p(E(_(A=P)))))},k.preclip=function(P){return arguments.length?(p=P,g=void 0,V()):p},k.postclip=function(P){return arguments.length?(_=P,m=b=x=y=null,V()):_},k.clipAngle=function(P){return arguments.length?(p=+P?PF(g=P*je):(g=null,rm),V()):g*Tt},k.clipExtent=function(P){return arguments.length?(_=P==null?(m=b=x=y=null,$d):DF(m=+P[0][0],b=+P[0][1],x=+P[1][0],y=+P[1][1]),V()):m==null?null:[[m,b],[x,y]]},k.scale=function(P){return arguments.length?(n=+P,N()):n},k.translate=function(P){return arguments.length?(r=+P[0],i=+P[1],N()):[r,i]},k.center=function(P){return arguments.length?(s=P[0]%360*je,o=P[1]%360*je,N()):[s*Tt,o*Tt]},k.rotate=function(P){return arguments.length?(a=P[0]%360*je,l=P[1]%360*je,c=P.length>2?P[2]%360*je:0,N()):[a*Tt,l*Tt,c*Tt]},k.angle=function(P){return arguments.length?(d=P%360*je,N()):d*Tt},k.reflectX=function(P){return arguments.length?(f=P?-1:1,N()):f<0},k.reflectY=function(P){return arguments.length?(h=P?-1:1,N()):h<0},k.precision=function(P){return arguments.length?(E=xm(M,w=P*P),V()):Lt(w)},k.fitExtent=function(P,T){return Mh(k,P,T)},k.fitSize=function(P,T){return Dy(k,P,T)},k.fitWidth=function(P,T){return Fy(k,P,T)},k.fitHeight=function(P,T){return Ty(k,P,T)};function N(){var P=ym(n,0,0,f,h,d).apply(null,t(s,o)),T=ym(n,r-P[0],i-P[1],f,h,d);return u=py(a,l,c),M=Nd(t,T),S=Nd(u,M),E=xm(M,w),V()}function V(){return I=A=null,k}return function(){return t=e.apply(this,arguments),k.invert=t.invert&&D,N()}}function Eh(e){var t=0,n=ye/3,r=Ny(e),i=r(t,n);return i.parallels=function(s){return arguments.length?r(t=s[0]*je,n=s[1]*je):[t*Tt,n*Tt]},i}function oT(e){var t=ge(e);function n(r,i){return[r*t,de(i)/t]}return n.invert=function(r,i){return[r/t,ln(i*t)]},n}function aT(e,t){var n=de(e),r=(n+de(t))/2;if(_e(r)<ie)return oT(e);var i=1+n*(2*r-n),s=Lt(i)/r;function o(a,l){var c=Lt(i-2*r*de(l))/r;return[c*de(a*=r),s-c*ge(a)]}return o.invert=function(a,l){var c=s-l,u=Gn(a,_e(c))*on(c);return c*r<0&&(u-=ye*on(a)*on(c)),[u/r,ln((i-(a*a+c*c)*r*r)/(2*r))]},o}function ql(){return Eh(aT).scale(155.424).center([0,33.6442])}function Ly(){return ql().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function lT(e){var t=e.length;return{point:function(n,r){for(var i=-1;++i<t;)e[i].point(n,r)},sphere:function(){for(var n=-1;++n<t;)e[n].sphere()},lineStart:function(){for(var n=-1;++n<t;)e[n].lineStart()},lineEnd:function(){for(var n=-1;++n<t;)e[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<t;)e[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<t;)e[n].polygonEnd()}}}function cT(){var e,t,n=Ly(),r,i=ql().rotate([154,0]).center([-2,58.5]).parallels([55,65]),s,o=ql().rotate([157,0]).center([-3,19.9]).parallels([8,18]),a,l,c={point:function(f,h){l=[f,h]}};function u(f){var h=f[0],g=f[1];return l=null,r.point(h,g),l||(s.point(h,g),l)||(a.point(h,g),l)}u.invert=function(f){var h=n.scale(),g=n.translate(),p=(f[0]-g[0])/h,m=(f[1]-g[1])/h;return(m>=.12&&m<.234&&p>=-.425&&p<-.214?i:m>=.166&&m<.234&&p>=-.214&&p<-.115?o:n).invert(f)},u.stream=function(f){return e&&t===f?e:e=lT([n.stream(t=f),i.stream(f),o.stream(f)])},u.precision=function(f){return arguments.length?(n.precision(f),i.precision(f),o.precision(f),d()):n.precision()},u.scale=function(f){return arguments.length?(n.scale(f),i.scale(f*.35),o.scale(f),u.translate(n.translate())):n.scale()},u.translate=function(f){if(!arguments.length)return n.translate();var h=n.scale(),g=+f[0],p=+f[1];return r=n.translate(f).clipExtent([[g-.455*h,p-.238*h],[g+.455*h,p+.238*h]]).stream(c),s=i.translate([g-.307*h,p+.201*h]).clipExtent([[g-.425*h+ie,p+.12*h+ie],[g-.214*h-ie,p+.234*h-ie]]).stream(c),a=o.translate([g-.205*h,p+.212*h]).clipExtent([[g-.214*h+ie,p+.166*h+ie],[g-.115*h-ie,p+.234*h-ie]]).stream(c),d()},u.fitExtent=function(f,h){return Mh(u,f,h)},u.fitSize=function(f,h){return Dy(u,f,h)},u.fitWidth=function(f,h){return Fy(u,f,h)},u.fitHeight=function(f,h){return Ty(u,f,h)};function d(){return e=t=null,u}return u.scale(1070)}function Vy(e){return function(t,n){var r=ge(t),i=ge(n),s=e(r*i);return s===1/0?[2,0]:[s*i*de(t),s*de(n)]}}function Uo(e){return function(t,n){var r=Lt(t*t+n*n),i=e(r),s=de(i),o=ge(i);return[Gn(t*s,r*o),ln(r&&n*s/r)]}}var By=Vy(function(e){return Lt(2/(1+e))});By.invert=Uo(function(e){return 2*ln(e/2)});function uT(){return Ir(By).scale(124.75).clipAngle(180-.001)}var jy=Vy(function(e){return(e=gy(e))&&e/de(e)});jy.invert=Uo(function(e){return e});function dT(){return Ir(jy).scale(79.4188).clipAngle(180-.001)}function Tc(e,t){return[e,Wl(Sh((nt+t)/2))]}Tc.invert=function(e,t){return[e,2*ys(hy(t))-nt]};function fT(){return Gy(Tc).scale(961/Jt)}function Gy(e){var t=Ir(e),n=t.center,r=t.scale,i=t.translate,s=t.clipExtent,o=null,a,l,c;t.scale=function(d){return arguments.length?(r(d),u()):r()},t.translate=function(d){return arguments.length?(i(d),u()):i()},t.center=function(d){return arguments.length?(n(d),u()):n()},t.clipExtent=function(d){return arguments.length?(d==null?o=a=l=c=null:(o=+d[0][0],a=+d[0][1],l=+d[1][0],c=+d[1][1]),u()):o==null?null:[[o,a],[l,c]]};function u(){var d=ye*r(),f=t(_F(t.rotate()).invert([0,0]));return s(o==null?[[f[0]-d,f[1]-d],[f[0]+d,f[1]+d]]:e===Tc?[[Math.max(f[0]-d,o),a],[Math.min(f[0]+d,l),c]]:[[o,Math.max(f[1]-d,a)],[l,Math.min(f[1]+d,c)]])}return u()}function Ta(e){return Sh((nt+e)/2)}function hT(e,t){var n=ge(e),r=e===t?de(e):Wl(n/ge(t))/Wl(Ta(t)/Ta(e)),i=n*Pu(Ta(e),r)/r;if(!r)return Tc;function s(o,a){i>0?a<-nt+ie&&(a=-nt+ie):a>nt-ie&&(a=nt-ie);var l=i/Pu(Ta(a),r);return[l*de(r*o),i-l*ge(r*o)]}return s.invert=function(o,a){var l=i-a,c=on(r)*Lt(o*o+l*l),u=Gn(o,_e(l))*on(l);return l*r<0&&(u-=ye*on(o)*on(l)),[u/r,2*ys(Pu(i/c,1/r))-nt]},s}function gT(){return Eh(hT).scale(109.5).parallels([30,30])}function ec(e,t){return[e,t]}ec.invert=ec;function pT(){return Ir(ec).scale(152.63)}function mT(e,t){var n=ge(e),r=e===t?de(e):(n-ge(t))/(t-e),i=n/r+e;if(_e(r)<ie)return ec;function s(o,a){var l=i-a,c=r*o;return[l*de(c),i-l*ge(c)]}return s.invert=function(o,a){var l=i-a,c=Gn(o,_e(l))*on(l);return l*r<0&&(c-=ye*on(o)*on(l)),[c/r,i-on(r)*Lt(o*o+l*l)]},s}function bT(){return Eh(mT).scale(131.154).center([0,13.9389])}var oo=1.340264,ao=-.081106,lo=893e-6,co=.003796,tc=Lt(3)/2,vT=12;function $y(e,t){var n=ln(tc*de(t)),r=n*n,i=r*r*r;return[e*ge(n)/(tc*(oo+3*ao*r+i*(7*lo+9*co*r))),n*(oo+ao*r+i*(lo+co*r))]}$y.invert=function(e,t){for(var n=t,r=n*n,i=r*r*r,s=0,o,a,l;s<vT&&(a=n*(oo+ao*r+i*(lo+co*r))-t,l=oo+3*ao*r+i*(7*lo+9*co*r),n-=o=a/l,r=n*n,i=r*r*r,!(_e(o)<wh));++s);return[tc*e*(oo+3*ao*r+i*(7*lo+9*co*r))/ge(n),ln(de(n)/tc)]};function xT(){return Ir($y).scale(177.158)}function Wy(e,t){var n=ge(t),r=ge(e)*n;return[n*de(e)/r,de(t)/r]}Wy.invert=Uo(ys);function yT(){return Ir(Wy).scale(144.049).clipAngle(60)}function Hy(e,t){var n=t*t,r=n*n;return[e*(.8707-.131979*n+r*(-.013791+r*(.003971*n-.001529*r))),t*(1.007226+n*(.015085+r*(-.044475+.028874*n-.005916*r)))]}Hy.invert=function(e,t){var n=t,r=25,i;do{var s=n*n,o=s*s;n-=i=(n*(1.007226+s*(.015085+o*(-.044475+.028874*s-.005916*o)))-t)/(1.007226+s*(.015085*3+o*(-.044475*7+.028874*9*s-.005916*11*o)))}while(_e(i)>ie&&--r>0);return[e/(.8707+(s=n*n)*(-.131979+s*(-.013791+s*s*s*(.003971-.001529*s)))),n]};function CT(){return Ir(Hy).scale(175.295)}function zy(e,t){return[ge(t)*de(e),de(t)]}zy.invert=Uo(ln);function wT(){return Ir(zy).scale(249.5).clipAngle(90+ie)}function Yy(e,t){var n=ge(t),r=1+ge(e)*n;return[n*de(e)/r,de(t)/r]}Yy.invert=Uo(function(e){return 2*ys(e)});function ST(){return Ir(Yy).scale(250).clipAngle(142)}function Xy(e,t){return[Wl(Sh((nt+t)/2)),-e]}Xy.invert=function(e,t){return[-t,2*ys(hy(e))-nt]};function _T(){var e=Gy(Xy),t=e.center,n=e.rotate;return e.center=function(r){return arguments.length?t([-r[1],r[0]]):(r=t(),[r[1],-r[0]])},e.rotate=function(r){return arguments.length?n([r[0],r[1],r.length>2?r[2]+90:90]):(r=n(),[r[0],r[1],r[2]-90])},n([0,0,90]).scale(159.155)}function Pe(e){for(var t=e.length/6|0,n=new Array(t),r=0;r<t;)n[r]="#"+e.slice(r*6,++r*6);return n}function Nc(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Ah(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Cs(){}var ki=.7,us=1/ki,qi="\\s*([+-]?\\d+)\\s*",Do="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ln="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",IT=/^#([0-9a-f]{3,8})$/,MT=new RegExp(`^rgb\\(${qi},${qi},${qi}\\)$`),ET=new RegExp(`^rgb\\(${Ln},${Ln},${Ln}\\)$`),AT=new RegExp(`^rgba\\(${qi},${qi},${qi},${Do}\\)$`),kT=new RegExp(`^rgba\\(${Ln},${Ln},${Ln},${Do}\\)$`),RT=new RegExp(`^hsl\\(${Do},${Ln},${Ln}\\)$`),PT=new RegExp(`^hsla\\(${Do},${Ln},${Ln},${Do}\\)$`),Cm={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};Nc(Cs,kh,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:wm,formatHex:wm,formatHex8:OT,formatHsl:DT,formatRgb:Sm,toString:Sm});function wm(){return this.rgb().formatHex()}function OT(){return this.rgb().formatHex8()}function DT(){return Uy(this).formatHsl()}function Sm(){return this.rgb().formatRgb()}function kh(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=IT.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?_m(t):n===3?new Pt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Na(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Na(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=MT.exec(e))?new Pt(t[1],t[2],t[3],1):(t=ET.exec(e))?new Pt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=AT.exec(e))?Na(t[1],t[2],t[3],t[4]):(t=kT.exec(e))?Na(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=RT.exec(e))?Em(t[1],t[2]/100,t[3]/100,1):(t=PT.exec(e))?Em(t[1],t[2]/100,t[3]/100,t[4]):Cm.hasOwnProperty(e)?_m(Cm[e]):e==="transparent"?new Pt(NaN,NaN,NaN,0):null}function _m(e){return new Pt(e>>16&255,e>>8&255,e&255,1)}function Na(e,t,n,r){return r<=0&&(e=t=n=NaN),new Pt(e,t,n,r)}function Zy(e){return e instanceof Cs||(e=kh(e)),e?(e=e.rgb(),new Pt(e.r,e.g,e.b,e.opacity)):new Pt}function Fo(e,t,n,r){return arguments.length===1?Zy(e):new Pt(e,t,n,r??1)}function Pt(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Nc(Pt,Fo,Ah(Cs,{brighter(e){return e=e==null?us:Math.pow(us,e),new Pt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ki:Math.pow(ki,e),new Pt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Pt(xi(this.r),xi(this.g),xi(this.b),nc(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:Im,formatHex:Im,formatHex8:FT,formatRgb:Mm,toString:Mm}));function Im(){return`#${di(this.r)}${di(this.g)}${di(this.b)}`}function FT(){return`#${di(this.r)}${di(this.g)}${di(this.b)}${di((isNaN(this.opacity)?1:this.opacity)*255)}`}function Mm(){const e=nc(this.opacity);return`${e===1?"rgb(":"rgba("}${xi(this.r)}, ${xi(this.g)}, ${xi(this.b)}${e===1?")":`, ${e})`}`}function nc(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function xi(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function di(e){return e=xi(e),(e<16?"0":"")+e.toString(16)}function Em(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new bn(e,t,n,r)}function Uy(e){if(e instanceof bn)return new bn(e.h,e.s,e.l,e.opacity);if(e instanceof Cs||(e=kh(e)),!e)return new bn;if(e instanceof bn)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),s=Math.max(t,n,r),o=NaN,a=s-i,l=(s+i)/2;return a?(t===s?o=(n-r)/a+(n<r)*6:n===s?o=(r-t)/a+2:o=(t-n)/a+4,a/=l<.5?s+i:2-s-i,o*=60):a=l>0&&l<1?0:o,new bn(o,a,l,e.opacity)}function TT(e,t,n,r){return arguments.length===1?Uy(e):new bn(e,t,n,r??1)}function bn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Nc(bn,TT,Ah(Cs,{brighter(e){return e=e==null?us:Math.pow(us,e),new bn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ki:Math.pow(ki,e),new bn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,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 Pt(Nu(e>=240?e-240:e+120,i,r),Nu(e,i,r),Nu(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new bn(Am(this.h),La(this.s),La(this.l),nc(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=nc(this.opacity);return`${e===1?"hsl(":"hsla("}${Am(this.h)}, ${La(this.s)*100}%, ${La(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Am(e){return e=(e||0)%360,e<0?e+360:e}function La(e){return Math.max(0,Math.min(1,e||0))}function Nu(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const NT=Math.PI/180,LT=180/Math.PI;var Jy=-.14861,Rh=1.78277,Ph=-.29227,Lc=-.90649,To=1.97294,km=To*Lc,Rm=To*Rh,Pm=Rh*Ph-Lc*Jy;function VT(e){if(e instanceof yi)return new yi(e.h,e.s,e.l,e.opacity);e instanceof Pt||(e=Zy(e));var t=e.r/255,n=e.g/255,r=e.b/255,i=(Pm*r+km*t-Rm*n)/(Pm+km-Rm),s=r-i,o=(To*(n-i)-Ph*s)/Lc,a=Math.sqrt(o*o+s*s)/(To*i*(1-i)),l=a?Math.atan2(o,s)*LT-120:NaN;return new yi(l<0?l+360:l,a,i,e.opacity)}function $n(e,t,n,r){return arguments.length===1?VT(e):new yi(e,t,n,r??1)}function yi(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Nc(yi,$n,Ah(Cs,{brighter(e){return e=e==null?us:Math.pow(us,e),new yi(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ki:Math.pow(ki,e),new yi(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*NT,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),i=Math.sin(e);return new Pt(255*(t+n*(Jy*r+Rh*i)),255*(t+n*(Ph*r+Lc*i)),255*(t+n*(To*r)),this.opacity)}}));function BT(e,t,n,r,i){var s=e*e,o=s*e;return((1-3*e+3*s-o)*t+(4-6*s+3*o)*n+(1+3*e+3*s-3*o)*r+o*i)/6}function jT(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[r],s=e[r+1],o=r>0?e[r-1]:2*i-s,a=r<t-1?e[r+2]:2*s-i;return BT((n-r/t)*t,o,i,s,a)}}const Oh=e=>()=>e;function Qy(e,t){return function(n){return e+n*t}}function GT(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)}}function $T(e,t){var n=t-e;return n?Qy(e,n>180||n<-180?n-360*Math.round(n/360):n):Oh(isNaN(e)?t:e)}function WT(e){return(e=+e)==1?es:function(t,n){return n-t?GT(t,n,e):Oh(isNaN(t)?n:t)}}function es(e,t){var n=t-e;return n?Qy(e,n):Oh(isNaN(e)?t:e)}(function e(t){var n=WT(t);function r(i,s){var o=n((i=Fo(i)).r,(s=Fo(s)).r),a=n(i.g,s.g),l=n(i.b,s.b),c=es(i.opacity,s.opacity);return function(u){return i.r=o(u),i.g=a(u),i.b=l(u),i.opacity=c(u),i+""}}return r.gamma=e,r})(1);function HT(e){return function(t){var n=t.length,r=new Array(n),i=new Array(n),s=new Array(n),o,a;for(o=0;o<n;++o)a=Fo(t[o]),r[o]=a.r||0,i[o]=a.g||0,s[o]=a.b||0;return r=e(r),i=e(i),s=e(s),a.opacity=1,function(l){return a.r=r(l),a.g=i(l),a.b=s(l),a+""}}}var zT=HT(jT);function Ky(e){return function t(n){n=+n;function r(i,s){var o=e((i=$n(i)).h,(s=$n(s)).h),a=es(i.s,s.s),l=es(i.l,s.l),c=es(i.opacity,s.opacity);return function(u){return i.h=o(u),i.s=a(u),i.l=l(Math.pow(u,n)),i.opacity=c(u),i+""}}return r.gamma=t,r}(1)}Ky($T);var Dh=Ky(es);const ze=e=>zT(e[e.length-1]);var YT=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(Pe);const XT=ze(YT);var ZT=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(Pe);const UT=ze(ZT);var JT=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(Pe);const QT=ze(JT);var KT=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(Pe);const qT=ze(KT);var e7=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(Pe);const t7=ze(e7);var n7=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(Pe);const r7=ze(n7);var i7=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(Pe);const s7=ze(i7);var o7=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(Pe);const a7=ze(o7);var l7=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(Pe);const c7=ze(l7);var u7=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(Pe);const d7=ze(u7);var f7=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(Pe);const h7=ze(f7);var g7=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(Pe);const p7=ze(g7);var m7=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(Pe);const b7=ze(m7);var v7=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(Pe);const x7=ze(v7);var y7=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(Pe);const C7=ze(y7);var w7=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(Pe);const S7=ze(w7);var _7=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(Pe);const I7=ze(_7);var M7=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(Pe);const E7=ze(M7);var A7=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(Pe);const k7=ze(A7);var R7=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(Pe);const P7=ze(R7);var O7=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(Pe);const D7=ze(O7);var F7=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(Pe);const T7=ze(F7);var N7=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(Pe);const L7=ze(N7);var V7=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(Pe);const B7=ze(V7);var j7=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(Pe);const G7=ze(j7);var $7=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(Pe);const W7=ze($7);var H7=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(Pe);const z7=ze(H7);function Y7(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-e*(35.34-e*(2381.73-e*(6402.7-e*(7024.72-e*2710.57)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+e*(170.73+e*(52.82-e*(131.46-e*(176.58-e*67.37)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+e*(442.36-e*(2482.43-e*(6167.24-e*(6614.94-e*2475.67)))))))+")"}const X7=Dh($n(300,.5,0),$n(-240,.5,1));var Z7=Dh($n(-100,.75,.35),$n(80,1.5,.8)),U7=Dh($n(260,.75,.35),$n(80,1.5,.8)),Va=$n();function J7(e){(e<0||e>1)&&(e-=Math.floor(e));var t=Math.abs(e-.5);return Va.h=360*e-100,Va.s=1.5-1.5*t,Va.l=.8-.9*t,Va+""}var Ba=Fo(),Q7=Math.PI/3,K7=Math.PI*2/3;function q7(e){var t;return e=(.5-e)*Math.PI,Ba.r=255*(t=Math.sin(e))*t,Ba.g=255*(t=Math.sin(e+Q7))*t,Ba.b=255*(t=Math.sin(e+K7))*t,Ba+""}function eN(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+e*(1172.33-e*(10793.56-e*(33300.12-e*(38394.49-e*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+e*(557.33+e*(1225.33-e*(3574.96-e*(1073.77+e*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+e*(3211.1-e*(15327.97-e*(27814-e*(22569.18-e*6838.66)))))))+")"}function Vc(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}const tN=Vc(Pe("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var nN=Vc(Pe("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),rN=Vc(Pe("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),iN=Vc(Pe("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));const uo={geoAzimuthalEqualArea:uT,geoAzimuthalEquidistant:dT,geoGnomonic:yT,geoOrthographic:wT,geoStereographic:ST,geoEqualEarth:xT,geoAlbers:Ly,geoAlbersUsa:cT,geoConicConformal:gT,geoConicEqualArea:ql,geoConicEquidistant:bT,geoEquirectangular:pT,geoMercator:fT,geoTransverseMercator:_T,geoNaturalEarth1:CT};Object.keys(uo).forEach(e=>{uo[`${e.charAt(3).toLowerCase()}${e.slice(4)}`]=uo[e]});class Fi extends Zr{constructor(t){super(t),this.outlineBounds=null,this.oldChartBounds=null,this.geoPath=bm()}init(t){t.position="chartArea",super.init(t),typeof t.projection=="function"?this.projection=t.projection:this.projection=(uo[t.projection]||uo.albersUsa)(),this.geoPath.projection(this.projection),this.outlineBounds=null,this.oldChartBounds=null}computeBounds(t){const n=bm(this.projection.fitWidth(1e3,t)).bounds(t),r=Math.ceil(n[1][1]-n[0][1]),i=Math.ceil(n[1][0]-n[0][0]),s=this.projection.translate();this.outlineBounds={width:i,height:r,aspectRatio:i/r,refScale:this.projection.scale(),refX:s[0],refY:s[1]}}updateBounds(){const t=this.chart.chartArea,n=this.outlineBounds;if(!n)return!1;const r=this.options.padding,i=typeof r=="number"?r:r.top,s=typeof r=="number"?r:r.left,o=typeof r=="number"?r:r.bottom,a=typeof r=="number"?r:r.right,l=t.right-t.left-s-a,c=t.bottom-t.top-i-o,u=this.oldChartBounds;this.oldChartBounds={chartWidth:l,chartHeight:c};const d=Math.min(l/n.width,c/n.height),f=n.width*d,h=n.height*d,g=(l-f)*.5+t.left+s,p=(c-h)*.5+t.top+i,m=this.options;return this.projection.scale(n.refScale*d*m.projectionScale).translate([d*n.refX+g+m.projectionOffset[0],d*n.refY+p+m.projectionOffset[1]]),!u||u.chartWidth!==this.oldChartBounds.chartWidth||u.chartHeight!==this.oldChartBounds.chartHeight}}Fi.id="projection";Fi.defaults={projection:"albersUsa",projectionScale:1,projectionOffset:[0,0],padding:0};Fi.descriptors={_scriptable:e=>e!=="projection",_indexable:e=>e!=="projectionOffset"};const Bc={position:"chartArea",property:"value",grid:{z:1,drawOnChartArea:!1},ticks:{z:1},legend:{align:"right",position:"bottom-right",length:100,width:50,margin:8,indicatorWidth:10}};function sN(e){const{indicatorWidth:t,align:n,margin:r}=e,i=(typeof r=="number"?r:r.left)+(n==="right"?t:0),s=(typeof r=="number"?r:r.top)+(n==="bottom"?t:0),o=(typeof r=="number"?r:r.right)+(n==="left"?t:0),a=(typeof r=="number"?r:r.bottom)+(n==="top"?t:0);return{left:i,top:s,right:o,bottom:a}}function oN(e,t,n,r,i){const{indicatorWidth:s,align:o,position:a}=t,l=o==="top"||o==="bottom",c=(o==="left"?i.w:n)+(l?s:0),u=(o==="top"?i.h:r)+(l?0:s),d=sN(t);if(typeof a=="string")switch(a){case"top-left":return[d.left,d.top];case"top":return[(e.right-c)/2,d.top];case"left":return[d.left,(e.bottom-u)/2];case"top-right":return[e.right-c-d.right,d.top];case"bottom-right":return[e.right-c-d.right,e.bottom-u-d.bottom];case"bottom":return[(e.right-c)/2,e.bottom-u-d.bottom];case"bottom-left":return[d.left,e.bottom-u-d.bottom];default:return[e.right-c-d.right,(e.bottom-u)/2]}return[a.x,a.y]}class zi extends vr{constructor(){super(...arguments),this.legendSize={w:0,h:0}}init(t){t.position="chartArea",super.init(t),this.axis="r"}parse(t,n){return t&&typeof t[this.options.property]=="number"?t[this.options.property]:super.parse(t,n)}isHorizontal(){return this.options.legend.align==="top"||this.options.legend.align==="bottom"}_getNormalizedValue(t){return t==null||Number.isNaN(t)?null:(t-this._startValue)/this._valueRange}update(t,n,r){const i=Math.min(n,this.bottom==null?Number.POSITIVE_INFINITY:this.bottom),s=Math.min(t,this.right==null?Number.POSITIVE_INFINITY:this.right),o=this.options.legend,a=this.isHorizontal(),l=(h,g)=>h<1?g*h:h,c=Math.min(s,l(a?o.length:o.width,s))-(a?0:o.indicatorWidth),u=Math.min(i,l(a?o.width:o.length,i))-(a?o.indicatorWidth:0);this.legendSize={w:c,h:u},this.bottom=u,this.height=u,this.right=c,this.width=c;const d=this.options.position;this.options.position=this.options.legend.align;const f=super.update(c,u,r);return this.options.position=d,this.height=Math.min(u,this.height),this.width=Math.min(c,this.width),f}_computeLabelArea(){}draw(t){if(!this._isVisible())return;const n=oN(t,this.options.legend,this.width,this.height,this.legendSize),{ctx:r}=this;r.save(),r.translate(n[0],n[1]);const i=this.options.position;this.options.position=this.options.legend.align,super.draw({...t,bottom:this.height+10,right:this.width}),this.options.position=i;const{indicatorWidth:s}=this.options.legend;switch(this.options.legend.align){case"left":r.translate(this.legendSize.w,0);break;case"top":r.translate(0,this.legendSize.h);break;case"bottom":r.translate(0,-s);break;default:r.translate(-s,0);break}this._drawIndicator(),r.restore()}_drawIndicator(){}}class qy extends Ei{constructor(){super(...arguments),this.legendSize={w:0,h:0}}init(t){zi.prototype.init.call(this,t)}parse(t,n){return zi.prototype.parse.call(this,t,n)}isHorizontal(){return this.options.legend.align==="top"||this.options.legend.align==="bottom"}_getNormalizedValue(t){return t==null||Number.isNaN(t)?null:(Math.log10(t)-this._startValue)/this._valueRange}update(t,n,r){return zi.prototype.update.call(this,t,n,r)}_computeLabelArea(){}draw(t){return zi.prototype.draw.call(this,t)}_drawIndicator(){}}const ir={interpolateBlues:T7,interpolateBrBG:XT,interpolateBuGn:d7,interpolateBuPu:h7,interpolateCividis:Y7,interpolateCool:U7,interpolateCubehelixDefault:X7,interpolateGnBu:p7,interpolateGreens:L7,interpolateGreys:B7,interpolateInferno:rN,interpolateMagma:nN,interpolateOrRd:b7,interpolateOranges:z7,interpolatePRGn:UT,interpolatePiYG:QT,interpolatePlasma:iN,interpolatePuBu:C7,interpolatePuBuGn:x7,interpolatePuOr:qT,interpolatePuRd:S7,interpolatePurples:G7,interpolateRainbow:J7,interpolateRdBu:t7,interpolateRdGy:r7,interpolateRdPu:I7,interpolateRdYlBu:s7,interpolateRdYlGn:a7,interpolateReds:W7,interpolateSinebow:q7,interpolateSpectral:c7,interpolateTurbo:eN,interpolateViridis:tN,interpolateWarm:Z7,interpolateYlGn:k7,interpolateYlGnBu:E7,interpolateYlOrBr:P7,interpolateYlOrRd:D7};Object.keys(ir).forEach(e=>{ir[`${e.charAt(11).toLowerCase()}${e.slice(12)}`]=ir[e],ir[e.slice(11)]=ir[e]});function e2(e,t){const n=1/t;if(e<=n)return 0;if(e>=1-n)return 1;for(let r=0;r<1;r+=n)if(e<r)return r-n/2;return e}const t2={interpolate:"blues",missing:"transparent",quantize:0};class zr extends zi{get interpolate(){const t=this.options;return t?typeof t.interpolate=="function"?t.interpolate:ir[t.interpolate]||ir.blues:n=>`rgb(${n},${n},${n})`}getColorForValue(t){const n=this._getNormalizedValue(t);return n==null||Number.isNaN(n)?this.options.missing:this.getColor(n)}getColor(t){let n=t;return this.options.quantize>0&&(n=e2(n,this.options.quantize)),this.interpolate(n)}_drawIndicator(){const{indicatorWidth:t}=this.options.legend,n=this._reversePixels;if(this.isHorizontal()){const r=this.width;if(this.options.quantize>0){const i=r/this.options.quantize,s=n?o=>r-i-o:o=>o;for(let o=0;o<r;o+=i){const a=(o+i/2)/r;this.ctx.fillStyle=this.getColor(a),this.ctx.fillRect(s(o),0,i,t)}}else{const i=n?s=>r-1-s:s=>s;for(let s=0;s<r;s+=1)this.ctx.fillStyle=this.getColor((s+.5)/r),this.ctx.fillRect(i(s),0,1,t)}}else{const r=this.height;if(this.options.quantize>0){const i=r/this.options.quantize,s=n?o=>r-i-o:o=>o;for(let o=0;o<r;o+=i){const a=(o+i/2)/r;this.ctx.fillStyle=this.getColor(a),this.ctx.fillRect(0,s(o),t,i)}}else{const i=n?s=>r-1-s:s=>s;for(let s=0;s<r;s+=1)this.ctx.fillStyle=this.getColor((s+.5)/r),this.ctx.fillRect(0,i(s),t,1)}}}}zr.id="color";zr.defaults=pt({},[vr.defaults,Bc,t2]);zr.descriptors={_scriptable:e=>e!=="interpolate",_indexable:!1};class Fh extends qy{constructor(){super(...arguments),this.interpolate=t=>`rgb(${t},${t},${t})`}init(t){super.init(t),typeof t.interpolate=="function"?this.interpolate=t.interpolate:this.interpolate=ir[t.interpolate]||ir.blues}getColorForValue(t){return zr.prototype.getColorForValue.call(this,t)}getColor(t){let n=t;return this.options.quantize>0&&(n=e2(n,this.options.quantize)),this.interpolate(n)}_drawIndicator(){return zr.prototype._drawIndicator.call(this)}}Fh.id="colorLogarithmic";Fh.defaults=pt({},[Ei.defaults,Bc,t2]);Fh.descriptors={_scriptable:e=>e!=="interpolate",_indexable:!1};const n2={missing:1,mode:"area",range:[2,20],legend:{align:"bottom",length:90,width:70,indicatorWidth:42}};class Ri extends zi{constructor(){super(...arguments),this._model=null}getSizeForValue(t){const n=this._getNormalizedValue(t);return n==null||Number.isNaN(n)?this.options.missing:this.getSizeImpl(n)}getSizeImpl(t){const[n,r]=this.options.range;if(this.options.mode==="area"){const s=r*r*Math.PI,o=n*n*Math.PI,a=s-o,l=t*a+o;return Math.sqrt(l/Math.PI)}const i=r-n;return t*i+n}_drawIndicator(){const{ctx:t}=this,n=this.options.legend.indicatorWidth/2,r=this.isHorizontal(),i=this.ticks,s=this.getLabelItems(),o=s?s.map(a=>({[r?"x":"y"]:a.options.translation[r?0:1]})):i.map((a,l)=>({[r?"x":"y"]:this.getPixelForTick(l)}));if((this._gridLineItems||[]).forEach(a=>{if(t.save(),t.strokeStyle=a.color,t.lineWidth=a.width,t.setLineDash&&(t.setLineDash(a.borderDash),t.lineDashOffset=a.borderDashOffset),t.beginPath(),this.options.grid.drawTicks)switch(this.options.legend.align){case"left":t.moveTo(0,a.ty1),t.lineTo(n,a.ty2);break;case"top":t.moveTo(a.tx1,0),t.lineTo(a.tx2,n);break;case"bottom":t.moveTo(a.tx1,n),t.lineTo(a.tx2,n*2);break;default:t.moveTo(n,a.ty1),t.lineTo(n*2,a.ty2);break}t.stroke(),t.restore()}),this._model){const a=this._model;t.strokeStyle=a.borderColor,t.lineWidth=a.borderWidth||0,t.fillStyle=a.backgroundColor}else t.fillStyle="blue";i.forEach((a,l)=>{const c=o[l],u=this.getSizeForValue(a.value),d=r?c.x:n,f=r?n:c.y,h={pointStyle:"circle",borderWidth:0,...this._model||{},radius:u};Ll(t,h,d,f)})}}Ri.id="size";Ri.defaults=pt({},[vr.defaults,Bc,n2]);Ri.descriptors={_scriptable:!0,_indexable:e=>e!=="range"};class r2 extends qy{constructor(){super(...arguments),this._model=null}getSizeForValue(t){const n=this._getNormalizedValue(t);return n==null||Number.isNaN(n)?this.options.missing:this.getSizeImpl(n)}getSizeImpl(t){return Ri.prototype.getSizeImpl.call(this,t)}_drawIndicator(){Ri.prototype._drawIndicator.call(this)}}r2.id="sizeLogarithmic";r2.defaults=pt({},[Ei.defaults,Bc,n2]);function aN(e,t){return[[e[0][0]-t,e[0][1]-t],[e[1][0]+t,e[1][1]+t]]}class xr extends Xn{constructor(){super(...arguments),this.cache=void 0}updateExtras({scale:t,feature:n,center:r,pixelRatio:i,mode:s}){var o,a;const l=s==="resize"||s==="reset"||this.projectionScale!==t||this.feature!==n||((o=this.center)===null||o===void 0?void 0:o.longitude)!==(r==null?void 0:r.longitude)||((a=this.center)===null||a===void 0?void 0:a.latitude)!==(r==null?void 0:r.latitude)||this.pixelRatio!==i;return this.projectionScale=t,this.feature=n,this.center=r,this.pixelRatio=i,l&&(this.cache=void 0),this.getCenterPoint()}inRange(t,n){const r=this.getBounds(),i=(Number.isNaN(t)||t>=r.x&&t<=r.x2)&&(Number.isNaN(n)||n>=r.y&&n<=r.y2),s=this.projectionScale.geoPath.projection();if(i&&!Number.isNaN(t)&&!Number.isNaN(n)&&typeof s.invert=="function"){const o=s.invert([t,n]);return o!=null&&GF(this.feature,o)}return i}inXRange(t){return this.inRange(t,Number.NaN)}inYRange(t){return this.inRange(Number.NaN,t)}getCenterPoint(){if(this.cache&&this.cache.center)return this.cache.center;let t;if(this.center){const n=this.projectionScale.projection([this.center.longitude,this.center.latitude]);t={x:n[0],y:n[1]}}else{const n=this.projectionScale.geoPath.centroid(this.feature);t={x:n[0],y:n[1]}}return this.cache={...this.cache||{},center:t},t}getBounds(){if(this.cache&&this.cache.bounds)return this.cache.bounds;const t=aN(this.projectionScale.geoPath.bounds(this.feature),this.options.borderWidth/2),n={x:t[0][0],x2:t[1][0],y:t[0][1],y2:t[1][1],width:t[1][0]-t[0][0],height:t[1][1]-t[0][1]};return this.cache={...this.cache||{},bounds:n},n}_drawInCache(t){const n=this.getBounds();if(!Number.isFinite(n.x))return;const r=this.cache&&this.cache.canvas?this.cache.canvas:t.createElement("canvas"),i=Math.floor(n.x),s=Math.floor(n.y),o=Math.ceil(n.x+n.width),a=Math.ceil(n.y+n.height),l=this.pixelRatio||1,c=Math.ceil(Math.max(o-i,1)*l),u=Math.ceil(Math.max(a-s,1)*l);if(c<=0||u<=0)return;r.width=c,r.height=u;const d=r.getContext("2d");d&&(d.clearRect(0,0,r.width,r.height),d.save(),d.scale(l,l),d.translate(-i,-s),this._drawImpl(d),d.restore(),this.cache={...this.cache||{},canvas:r,canvasKey:this._optionsToKey()})}_optionsToKey(){const{options:t}=this;return`${t.backgroundColor};${t.borderColor};${t.borderWidth};${this.pixelRatio}`}_drawImpl(t){const{feature:n}=this,{options:r}=this;t.beginPath(),this.projectionScale.geoPath.context(t)(n),r.backgroundColor&&(t.fillStyle=r.backgroundColor,t.fill()),r.borderColor&&(t.strokeStyle=r.borderColor,t.lineWidth=r.borderWidth,t.stroke())}draw(t){const{feature:n}=this;if(!n)return;(!this.cache||this.cache.canvasKey!==this._optionsToKey())&&t.canvas.ownerDocument!=null&&this._drawInCache(t.canvas.ownerDocument);const r=this.getBounds();if(this.cache&&this.cache.canvas&&this.cache.canvas.width>0&&this.cache.canvas.height>0){const i=Math.floor(r.x),s=Math.floor(r.y),o=Math.ceil(r.x+r.width),a=Math.ceil(r.y+r.height),l=o-i,c=a-s;l>0&&c>0&&t.drawImage(this.cache.canvas,i,s,o-i,a-s)}else Number.isFinite(r.x)&&(t.save(),this._drawImpl(t),t.restore())}}xr.id="geoFeature";xr.defaults={...Nn.defaults,outlineBackgroundColor:null,outlineBorderWidth:0,graticuleBorderColor:"#CCCCCC",graticuleBorderWidth:0};xr.defaultRoutes={outlineBorderColor:"borderColor",...Nn.defaultRoutes||{}};const i2={showOutline:!1,showGraticule:!1,clipMap:!0},s2={scales:{projection:{axis:"x",type:Fi.id,position:"chartArea",display:!1}}};function Om(e){const t={...e};return Object.keys(e).forEach(n=>{let r=n;if(n.startsWith("outline")){const i=n.slice(7);r=i[0].toLowerCase()+i.slice(1)}else if(n.startsWith("hoverOutline"))r=`hover${n.slice(12)}`;else return;delete t[n],t[r]=e[n]}),t}class o2 extends an{getGeoDataset(){return super.getDataset()}getGeoOptions(){return this.chart.options}getProjectionScale(){return this.getScaleForId("projection")}linkScales(){const t=this.getGeoDataset(),n=this.getMeta();n.xAxisID="projection",t.xAxisID="projection",n.yAxisID="projection",t.yAxisID="projection",n.xScale=this.getScaleForId("projection"),n.yScale=this.getScaleForId("projection"),this.getProjectionScale().computeBounds(this.resolveOutline())}showOutline(){return le(this.getGeoDataset().showOutline,this.getGeoOptions().showOutline)}clipMap(){return le(this.getGeoDataset().clipMap,this.getGeoOptions().clipMap)}getGraticule(){return le(this.getGeoDataset().showGraticule,this.getGeoOptions().showGraticule)}update(t){super.update(t);const n=this.getMeta(),r=this.getProjectionScale(),i=r.updateBounds()||t==="resize"||t==="reset";if(this.showOutline()){const s=n.dataset;if(i&&delete s.cache,s.projectionScale=r,s.pixelRatio=this.chart.currentDevicePixelRatio,t!=="resize"){const o=Om(this.resolveDatasetElementOptions(t)),a={feature:this.resolveOutline(),options:o};this.updateElement(s,void 0,a,t),this.getGraticule()&&(n.graticule=o)}}else this.getGraticule()&&t!=="resize"&&(n.graticule=Om(this.resolveDatasetElementOptions(t)));i&&n.data.forEach(s=>delete s.cache),this.updateElements(n.data,0,n.data.length,t)}resolveOutline(){const n=this.getGeoDataset().outline||{type:"Sphere"};return Array.isArray(n)?{type:"FeatureCollection",features:n}:n}showGraticule(){const t=this.getGraticule(),n=this.getMeta().graticule;if(!t||!n)return;const{ctx:r}=this.chart,s=this.getProjectionScale().geoPath.context(r);if(r.save(),r.beginPath(),typeof t=="boolean")t&&s($F());else{const o=Cy();t.stepMajor&&o.stepMajor(t.stepMajor),t.stepMinor&&o.stepMinor(t.stepMinor),s(o())}r.strokeStyle=n.graticuleBorderColor,r.lineWidth=n.graticuleBorderWidth,r.stroke(),r.restore()}draw(){const{chart:t}=this,n=this.clipMap();let r=!1;(n===!0||n==="outline"||n==="outline+graticule")&&(r=!0,gi(t.ctx,t.chartArea)),this.showOutline()&&this.getMeta().dataset&&this.getMeta().dataset.draw.call(this.getMeta().dataset,t.ctx,t.chartArea),n===!0||n==="graticule"||n==="outline+graticule"?r||gi(t.ctx,t.chartArea):r&&(r=!1,pi(t.ctx)),this.showGraticule(),n===!0||n==="items"?r||gi(t.ctx,t.chartArea):r&&(r=!1,pi(t.ctx)),this.getMeta().data.forEach(i=>i.draw.call(i,t.ctx,t.chartArea)),r&&(r=!1,pi(t.ctx))}}function a2(e,t,n,r=[],i=[]){Nt.addControllers(n),Array.isArray(r)?Nt.addElements(...r):Nt.addElements(r),Array.isArray(i)?Nt.addScales(...i):Nt.addScales(i);const s=t;return s.type=e,s}class ws extends o2{initialize(){super.initialize(),this.enableOptionSharing=!0}linkScales(){super.linkScales();const t=this.getGeoDataset(),n=this.getMeta();n.vAxisID="color",n.rAxisID="color",t.vAxisID="color",t.rAxisID="color",n.rScale=this.getScaleForId("color"),n.vScale=n.rScale,n.iScale=n.xScale,n.iAxisID=n.xAxisID,t.iAxisID=n.xAxisID}_getOtherScale(t){return t}parse(t,n){const r=this.getMeta().rScale,{data:i}=this.getDataset(),s=this._cachedMeta;for(let o=t;o<t+n;o+=1)s._parsed[o]={[r.axis]:r.parse(i[o],o)}}updateElements(t,n,r,i){const s=this.resolveDataElementOptions(n,i),o=this.getSharedOptions(s),a=this.includeOptions(i,o),l=this.getProjectionScale();this.updateSharedOptions(o,i,s);for(let c=n;c<n+r;c+=1){const u=t[c];u.projectionScale=l;const d=u.updateExtras({scale:l,feature:this._data[c].feature,center:this._data[c].center,pixelRatio:this.chart.currentDevicePixelRatio,mode:i}),f={x:d.x,y:d.y};a&&(f.options=o||this.resolveDataElementOptions(c,i)),this.updateElement(u,c,f,i)}}indexToColor(t){const n=this.getMeta().rScale;return n.getColorForValue(this.getParsed(t)[n.axis])}}ws.id="choropleth";ws.defaults=pt({},[i2,{datasetElementType:xr.id,dataElementType:xr.id}]);ws.overrides=pt({},[s2,{plugins:{tooltip:{callbacks:{title(){return""},label(e){var t,n,r,i;return e.formattedValue==null?(n=(t=e.chart.data)===null||t===void 0?void 0:t.labels)===null||n===void 0?void 0:n[e.dataIndex]:`${(i=(r=e.chart.data)===null||r===void 0?void 0:r.labels)===null||i===void 0?void 0:i[e.dataIndex]}: ${e.formattedValue}`}}},colors:{enabled:!1}},scales:{color:{type:zr.id,axis:"x"}},elements:{geoFeature:{backgroundColor(e){return e.dataIndex==null?null:e.chart.getDatasetMeta(e.datasetIndex).controller.indexToColor(e.dataIndex)}}}}]);class lN extends mt{constructor(t,n){super(t,a2("choropleth",n,ws,xr,[zr,Fi]))}}lN.id=ws.id;class Jo extends o2{initialize(){super.initialize(),this.enableOptionSharing=!0}linkScales(){super.linkScales();const t=this.getGeoDataset(),n=this.getMeta();n.vAxisID="size",n.rAxisID="size",t.vAxisID="size",t.rAxisID="size",n.rScale=this.getScaleForId("size"),n.vScale=n.rScale,n.iScale=n.xScale,n.iAxisID=n.xAxisID,t.iAxisID=n.xAxisID}_getOtherScale(t){return t}parse(t,n){const r=this.getMeta().rScale,i=this.getDataset().data,s=this._cachedMeta;for(let o=t;o<t+n;o+=1){const a=i[o];s._parsed[o]={x:a.longitude==null?a.x:a.longitude,y:a.latitude==null?a.y:a.latitude,[r.axis]:r.parse(a,o)}}}updateElements(t,n,r,i){const s=i==="reset",o=this.resolveDataElementOptions(n,i),a=this.getSharedOptions(o),l=this.includeOptions(i,a),c=this.getProjectionScale();this.getMeta().rScale._model=o,this.updateSharedOptions(a,i,o);for(let u=n;u<n+r;u+=1){const d=t[u],f=this.getParsed(u),h=c.projection([f.x,f.y]),g={x:h?h[0]:0,y:h?h[1]:0,skip:Number.isNaN(f.x)||Number.isNaN(f.y)};l&&(g.options=a||this.resolveDataElementOptions(u,i),s&&(g.options.radius=0)),this.updateElement(d,u,g,i)}}indexToRadius(t){const n=this.getMeta().rScale;return n.getSizeForValue(this.getParsed(t)[n.axis])}}Jo.id="bubbleMap";Jo.defaults=pt({},[i2,{dataElementType:vi.id,datasetElementType:xr.id,showOutline:!0,clipMap:"outline+graticule"}]);Jo.overrides=pt({},[s2,{plugins:{tooltip:{callbacks:{title(){return""},label(e){var t,n,r,i;return e.formattedValue==null?(n=(t=e.chart.data)===null||t===void 0?void 0:t.labels)===null||n===void 0?void 0:n[e.dataIndex]:`${(i=(r=e.chart.data)===null||r===void 0?void 0:r.labels)===null||i===void 0?void 0:i[e.dataIndex]}: ${e.formattedValue}`}}}},scales:{size:{axis:"x",type:Ri.id}},elements:{point:{radius(e){return e.dataIndex==null?null:e.chart.getDatasetMeta(e.datasetIndex).controller.indexToRadius(e.dataIndex)},hoverRadius(e){return e.dataIndex==null?null:e.chart.getDatasetMeta(e.datasetIndex).controller.indexToRadius(e.dataIndex)+1}}}}]);class cN extends mt{constructor(t,n){super(t,a2("bubbleMap",n,Jo,xr,[Ri,Fi]))}}cN.id=Jo.id;mt.register(ws,xr,Fi,zr,Di,Oi,os,vr,Nn);mt.defaults.font.family="'Rubik', 'Inter', sans-serif";const uN=({data:e=new Map,defaultCountry:t="India",geoData:n,dataLabel:r="Data Points Found"})=>{const[i,s]=C.useState(null),[o,a]=C.useState(0),l=n?n.features.filter(d=>d.properties.name!=="Antarctica"):[];if(C.useEffect(()=>{if(e!=null&&e.size){let d=0;e.forEach((f,h)=>{i===h&&(d=f)}),a(d)}},[i,e]),!n||l.length===0)return v.jsx("div",{className:"geochart-container flex flex-col items-center justify-center p-8",style:{minHeight:"400px"},children:v.jsx("p",{style:{color:"var(--secondary-text-color)"},children:"Geo data not provided. Please provide geoData prop."})});const c={datasets:[{label:"Data Distribution",data:l.map(d=>({feature:d,value:e.get(d.properties.name)||0})),borderColor:"#fff",borderWidth:1,backgroundColor:d=>{var p;if(!((p=d==null?void 0:d.raw)!=null&&p.feature))return getComputedStyle(document.documentElement).getPropertyValue("--brand-light").trim()||"#dae0e8";const f=d.raw.feature.properties.name,h=getComputedStyle(document.documentElement).getPropertyValue("--brand-orange").trim()||"#ff6503",g=getComputedStyle(document.documentElement).getPropertyValue("--brand-light").trim()||"#dae0e8";return f===t?h:i===f?h+"99":g}}]},u={responsive:!0,maintainAspectRatio:!1,scales:{projection:{axis:"x",projection:"equirectangular"},color:{axis:"x",display:!1}},plugins:{legend:{display:!1},tooltip:{backgroundColor:getComputedStyle(document.documentElement).getPropertyValue("--bg-color").trim()||"#fff",titleColor:getComputedStyle(document.documentElement).getPropertyValue("--chart-text-color").trim()||"#333",bodyColor:getComputedStyle(document.documentElement).getPropertyValue("--chart-text-color").trim()||"#333",borderColor:getComputedStyle(document.documentElement).getPropertyValue("--border-color").trim()||"#e5e7eb",borderWidth:1,callbacks:{title:d=>{var f,h,g;return d.length?((g=(h=(f=d[0].raw)==null?void 0:f.feature)==null?void 0:h.properties)==null?void 0:g.name)??"Unknown":""},label:()=>`${r}: ${o}`}},datalabels:{display:!1}},onHover:(d,f)=>{var h,g;if(f.length>0){const p=f[0].index;s(((g=(h=l[p])==null?void 0:h.properties)==null?void 0:g.name)||null)}}};return v.jsx("div",{className:"geochart-container flex flex-col items-center",onMouseLeave:()=>s(null),style:{minHeight:"400px"},children:v.jsx(yh,{type:"choropleth",data:c,options:u,className:"w-full h-full"})})},dN=({children:e,customProviders:t=[],onToastShow:n,themeConfig:r,defaultTheme:i})=>[...[({children:a})=>v.jsx(uy,{defaultTheme:i,config:r,children:a}),qv,({children:a})=>v.jsx(Xv,{onToastShow:n,children:a})],...t].reduceRight((a,l)=>v.jsx(l,{children:a}),v.jsx(v.Fragment,{children:e}));function fN(e,t){const[n,r]=C.useState(e);return C.useEffect(()=>{const i=setTimeout(()=>{r(e)},t);return()=>{clearTimeout(i)}},[e,t]),n}const hN=({callback:e,onScroll:t=!0,onResize:n=!0,onEscape:r=!0})=>{const i=C.useRef(null);return C.useEffect(()=>{const s=l=>{var c;i.current&&((c=l.target)!=null&&c.closest("[data-dropdown-ref]")||i.current.contains(l.target)||e())},o=()=>{e()},a=l=>{l.key==="Escape"&&r&&e()};return document.addEventListener("mousedown",s),t&&window.addEventListener("scroll",o),n&&window.addEventListener("resize",o),r&&document.addEventListener("keydown",a),()=>{document.removeEventListener("mousedown",s),t&&window.removeEventListener("scroll",o),n&&window.removeEventListener("resize",o),r&&document.removeEventListener("keydown",a)}},[e,t,n,r]),i};let Kd=null,l2=null,c2=null,Dm=!1;function gN(){if(!Dm){Dm=!0;try{const e=require("react-redux"),t=require("@reduxjs/toolkit");Kd=e.useDispatch,l2=e.useSelector,c2=t.createSelector}catch{}}}const pN=e=>{const{metric:t,fetchFunction:n,cacheKey:r,...i}=e,[s,o]=C.useState({}),[a,l]=C.useState(!1),[c,u]=C.useState(null),d=C.useMemo(()=>r||`${t}_${JSON.stringify(i)}`,[r,t,JSON.stringify(i)]);return gN(),Kd&&l2&&c2&&!Kd()?Fm({metric:t,fetchFunction:n,cacheKey:d,...i}):Fm({metric:t,fetchFunction:n,cacheKey:d,...i})};function Fm(e){const{fetchFunction:t,cacheKey:n}=e,[r,i]=C.useState({}),[s,o]=C.useState(!1),[a,l]=C.useState(null),c=r[n||""]||{data:null,loading:!1,error:null};C.useEffect(()=>{!c.data&&!c.loading&&t&&(o(!0),t(e).then(d=>{i(f=>({...f,[n||""]:{data:d,loading:!1,error:null}})),o(!1)}).catch(d=>{l(d),o(!1)}))},[n,t]);const u=()=>{i(d=>{const f={...d};return delete f[n||""],f})};return{data:c.data,loading:c.loading||s,error:c.error||a,clearCache:u}}const rc=(e,t)=>{if(e===t)return!0;if(e==null||t==null)return e===t;if(typeof e!=typeof t)return!1;if(typeof e!="object")return e===t;if(Array.isArray(e)!==Array.isArray(t))return!1;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(!rc(e[i],t[i]))return!1;return!0}const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n)if(!Object.prototype.hasOwnProperty.call(t,i)||!rc(e[i],t[i]))return!1;return!0},mN=(e,t)=>{const n=["country_iso2","department_name"];for(const r of n)if(!rc(e[r],t[r]))return!1;return!0};exports.Alert=O2;exports.ApiMetric=jm;exports.CHECKBOX_STYLE=fd;exports.CSVImporter=T6;exports.CSVType=Gm;exports.ChartHeader=L6;exports.ComponentErrorBoundary=b6;exports.ConfidenceScoreTooltip=A6;exports.ConfirmationModal=gA;exports.ContextProvider=dN;exports.CountryBox=I6;exports.CustomLegends=nh;exports.DonutChart=pF;exports.Dropdown=b4;exports.ErrorBoundary=X1;exports.ErrorBoundaryDefault=X1;exports.FileTypeIcon=S6;exports.GaugeChart=wF;exports.GeoChart=uN;exports.HorizontalBarChart=xF;exports.ImagePreviewModal=k6;exports.InstallUpdateLoader=E6;exports.Loader=D2;exports.LoaderProvider=qv;exports.Modal=ef;exports.MultiSelect=Tv;exports.NoActiveAttributeWarning=_6;exports.NoDataChart=N6;exports.NotificationType=$m;exports.PAGE_INDEX=Ua;exports.PAGE_SIZE=Za;exports.PAGINATION_INPUT_BUFFER_CH=dd;exports.PieChart=bF;exports.ResourceUsageBadge=v6;exports.RiskScoreLabel=w6;exports.STATUS_BADGE_CLASSES=gn;exports.STATUS_CONFIGURATIONS=Lu;exports.ScaleType=ii;exports.ShowMultiData=x6;exports.StatusBadge=eC;exports.StatusIcon=dl;exports.StorageChart=yF;exports.Table=hA;exports.TableType=tf;exports.TaskResult=M6;exports.ThemeProvider=uy;exports.Timer=p6;exports.Toast=J2;exports.ToastProvider=Xv;exports.ToastType=zt;exports.ToggleSwitch=tC;exports.ToolTip=ic;exports.VerticalBarChart=vF;exports.cn=Zt;exports.conditionalClass=B2;exports.deepEqual=rc;exports.formatBytes=dy;exports.getRiskLevel=th;exports.getRiskScoreInfo=Z1;exports.getStatusConfig=nf;exports.globalFiltersEqual=mN;exports.isFailedStatus=K2;exports.isHighRisk=C6;exports.isReduxAvailable=Qv;exports.isRunningStatus=Q2;exports.isSuccessStatus=q2;exports.switchClass=j2;exports.useApiCache=pN;exports.useAppDispatch=Uv;exports.useAppSelector=Jv;exports.useAssetPath=U1;exports.useBodyScrollLock=qd;exports.useClickOutside=hN;exports.useDebounce=fN;exports.useFileIconPath=J1;exports.useFilterCache=t1;exports.useLoader=e1;exports.useTheme=Fc;exports.useToast=Zv;