@iqworksai/common-components 0.1.6 → 0.1.8

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.
@@ -1,159 +0,0 @@
1
- "use strict";var Ov=Object.defineProperty;var Nv=(e,t,n)=>t in e?Ov(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var U=(e,t,n)=>Nv(e,typeof t!="symbol"?t+"":t,n);const b=require("react/jsx-runtime"),x=require("react"),In=require("react-dom");function Gp(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 W=Gp(x),da=Gp(In);var zp={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},of=x.createContext&&x.createContext(zp),Tv=["attr","size","title"];function Dv(e,t){if(e==null)return{};var n=Lv(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Lv(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 fa(){return fa=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},fa.apply(this,arguments)}function sf(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 ha(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?sf(Object(n),!0).forEach(function(r){jv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sf(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jv(e,t,n){return t=Bv(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bv(e){var t=$v(e,"string");return typeof t=="symbol"?t:t+""}function $v(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 Hp(e){return e&&e.map((t,n)=>x.createElement(t.tag,ha({key:n},t.attr),Hp(t.child)))}function Ie(e){return t=>x.createElement(Vv,fa({attr:ha({},e.attr)},t),Hp(e.child))}function Vv(e){var t=n=>{var{attr:r,size:i,title:o}=e,s=Dv(e,Tv),a=i||n.size||"1em",l;return n.className&&(l=n.className),e.className&&(l=(l?l+" ":"")+e.className),x.createElement("svg",fa({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,s,{className:l,style:ha(ha({color:e.color||n.color},n.style),e.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),o&&x.createElement("title",null,o),e.children)};return of!==void 0?x.createElement(of.Consumer,null,n=>t(n)):t(zp)}function Gv(e){return Ie({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 zv(e){return Ie({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 Hv(e){return Ie({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 Wv(e){return Ie({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 Xv={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"},Yv={info:Hv,warning:Wv,success:Gv,error:zv},Zv=({variant:e="info",title:t,children:n,compact:r=!1,className:i="",borderStyle:o="left",icon:s=!0})=>{const a=Yv[e],l=r?"p-3":"p-4",c=o==="left"?"border-l-4":"border rounded-lg";return b.jsx("div",{className:`${Xv[e]} ${c} ${l} ${i}`,children:b.jsxs("div",{className:s?"flex items-start":"",children:[s&&b.jsx(a,{className:`${r?"text-lg":"text-xl"} mr-3 flex-shrink-0 mt-0.5`}),b.jsxs("div",{className:"flex-1",children:[t&&b.jsx("p",{className:`font-semibold ${r?"text-sm":""} ${typeof n=="string"?"":"mb-1"}`,children:t}),typeof n=="string"?b.jsx("p",{className:r?"text-sm":"",children:n}):b.jsx("div",{className:r?"text-sm":"",children:n})]})]})})},Jv=({isLoading:e,isRelative:t})=>e?b.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:[b.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)"}}),b.jsx("span",{className:"sr-only",children:"Loading..."})]}):null;function af(e){return Ie({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 lf(e){return Ie({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 cf(e){return Ie({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 Wp(e){return Ie({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 Uv(e){return Ie({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 Qv(e){return Ie({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256.12 245.96c-13.25 0-24 10.74-24 24 1.14 72.25-8.14 141.9-27.7 211.55-2.73 9.72 2.15 30.49 23.12 30.49 10.48 0 20.11-6.92 23.09-17.52 13.53-47.91 31.04-125.41 29.48-224.52.01-13.25-10.73-24-23.99-24zm-.86-81.73C194 164.16 151.25 211.3 152.1 265.32c.75 47.94-3.75 95.91-13.37 142.55-2.69 12.98 5.67 25.69 18.64 28.36 13.05 2.67 25.67-5.66 28.36-18.64 10.34-50.09 15.17-101.58 14.37-153.02-.41-25.95 19.92-52.49 54.45-52.34 31.31.47 57.15 25.34 57.62 55.47.77 48.05-2.81 96.33-10.61 143.55-2.17 13.06 6.69 25.42 19.76 27.58 19.97 3.33 26.81-15.1 27.58-19.77 8.28-50.03 12.06-101.21 11.27-152.11-.88-55.8-47.94-101.88-104.91-102.72zm-110.69-19.78c-10.3-8.34-25.37-6.8-33.76 3.48-25.62 31.5-39.39 71.28-38.75 112 .59 37.58-2.47 75.27-9.11 112.05-2.34 13.05 6.31 25.53 19.36 27.89 20.11 3.5 27.07-14.81 27.89-19.36 7.19-39.84 10.5-80.66 9.86-121.33-.47-29.88 9.2-57.88 28-80.97 8.35-10.28 6.79-25.39-3.49-33.76zm109.47-62.33c-15.41-.41-30.87 1.44-45.78 4.97-12.89 3.06-20.87 15.98-17.83 28.89 3.06 12.89 16 20.83 28.89 17.83 11.05-2.61 22.47-3.77 34-3.69 75.43 1.13 137.73 61.5 138.88 134.58.59 37.88-1.28 76.11-5.58 113.63-1.5 13.17 7.95 25.08 21.11 26.58 16.72 1.95 25.51-11.88 26.58-21.11a929.06 929.06 0 0 0 5.89-119.85c-1.56-98.75-85.07-180.33-186.16-181.83zm252.07 121.45c-2.86-12.92-15.51-21.2-28.61-18.27-12.94 2.86-21.12 15.66-18.26 28.61 4.71 21.41 4.91 37.41 4.7 61.6-.11 13.27 10.55 24.09 23.8 24.2h.2c13.17 0 23.89-10.61 24-23.8.18-22.18.4-44.11-5.83-72.34zm-40.12-90.72C417.29 43.46 337.6 1.29 252.81.02 183.02-.82 118.47 24.91 70.46 72.94 24.09 119.37-.9 181.04.14 246.65l-.12 21.47c-.39 13.25 10.03 24.31 23.28 24.69.23.02.48.02.72.02 12.92 0 23.59-10.3 23.97-23.3l.16-23.64c-.83-52.5 19.16-101.86 56.28-139 38.76-38.8 91.34-59.67 147.68-58.86 69.45 1.03 134.73 35.56 174.62 92.39 7.61 10.86 22.56 13.45 33.42 5.86 10.84-7.62 13.46-22.59 5.84-33.43z"},child:[]}]})(e)}function Kv(e){return Ie({attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M336.5 160C322 70.7 287.8 8 248 8s-74 62.7-88.5 152h177zM152 256c0 22.2 1.2 43.5 3.3 64h185.3c2.1-20.5 3.3-41.8 3.3-64s-1.2-43.5-3.3-64H155.3c-2.1 20.5-3.3 41.8-3.3 64zm324.7-96c-28.6-67.9-86.5-120.4-158-141.6 24.4 33.8 41.2 84.7 50 141.6h108zM177.2 18.4C105.8 39.6 47.8 92.1 19.3 160h108c8.7-56.9 25.5-107.8 49.9-141.6zM487.4 192H372.7c2.1 21 3.3 42.5 3.3 64s-1.2 43-3.3 64h114.6c5.5-20.5 8.6-41.8 8.6-64s-3.1-43.5-8.5-64zM120 256c0-21.5 1.2-43 3.3-64H8.6C3.2 212.5 0 233.8 0 256s3.2 43.5 8.6 64h114.6c-2-21-3.2-42.5-3.2-64zm39.5 96c14.5 89.3 48.7 152 88.5 152s74-62.7 88.5-152h-177zm159.3 141.6c71.4-21.2 129.4-73.7 158-141.6h-108c-8.8 56.9-25.6 107.8-50 141.6zM19.3 352c28.6 67.9 86.5 120.4 158 141.6-24.4-33.8-41.2-84.7-50-141.6h-108z"},child:[]}]})(e)}function uf(e){return Ie({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 qv(e){return Ie({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 ex(e){return Ie({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M512 176.001C512 273.203 433.202 352 336 352c-11.22 0-22.19-1.062-32.827-3.069l-24.012 27.014A23.999 23.999 0 0 1 261.223 384H224v40c0 13.255-10.745 24-24 24h-40v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24v-78.059c0-6.365 2.529-12.47 7.029-16.971l161.802-161.802C163.108 213.814 160 195.271 160 176 160 78.798 238.797.001 335.999 0 433.488-.001 512 78.511 512 176.001zM336 128c0 26.51 21.49 48 48 48s48-21.49 48-48-21.49-48-48-48-48 21.49-48 48z"},child:[]}]})(e)}function tx(e){return Ie({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M400 224h-24v-72C376 68.2 307.8 0 224 0S72 68.2 72 152v72H48c-26.5 0-48 21.5-48 48v192c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48zm-104 0H152v-72c0-39.7 32.3-72 72-72s72 32.3 72 72v72z"},child:[]}]})(e)}function nx(e){return Ie({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 rx(e){return Ie({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 ix(e){return Ie({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 Xp(e){return Ie({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 Ht(...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=Ht(...n);r&&t.push(r)}}return t.join(" ")}function ox(e,t,n=""){return e?t:n}function sx(e,t,n=""){return t[e]||n}const Hu=e=>{x.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])},ai=({title:e,subtitle:t,isUuidSubtitle:n=!0,body:r,onClose:i,onConfirm:o,onDelete:s,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(Hu(c),!c)return null;const m=b.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex justify-center items-center z-[40] p-4 overflow-y-auto",children:b.jsxs("div",{className:Ht("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:[b.jsx(ax,{title:e,onClose:i}),t&&b.jsx(lx,{subtitle:t,isUuidSubtitle:n}),r&&b.jsx(cx,{body:r}),a&&b.jsx(ux,{customFooter:l,onClose:i,onConfirm:o,onDelete:s,cancelButtonText:h,confirmButtonText:u,deleteButtonText:f,disableConfirm:d})]})});return In.createPortal(m,document.getElementById("modal-root")||document.body)},ax=({title:e,onClose:t})=>b.jsx("div",{className:"px-4 flex-shrink-0",children:b.jsxs("div",{className:"flex justify-between items-center",children:[b.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"?b.jsx("span",{children:e}):e}),b.jsx("button",{onClick:t,className:"text-brand-primary hover:opacity-80","aria-label":"Close",children:b.jsx(Xp,{size:16})})]})}),lx=({subtitle:e,isUuidSubtitle:t})=>b.jsx("div",{className:"px-4 flex-shrink-0",children:b.jsxs("div",{className:Ht("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&&b.jsx("b",{style:{color:"var(--text-color)"},children:"UUID:"}),typeof e=="string"?b.jsx("span",{className:"break-all",children:e}):e]})}),cx=({body:e})=>b.jsx("div",{className:Ht("px-4 text-sm modal-body flex-1",typeof e=="string"?"pb-4 mt-2":"pb-1 mt-1"),children:typeof e=="string"?b.jsx("p",{className:"break-words",style:{color:"var(--text-color)"},children:e}):e}),ux=({customFooter:e,onClose:t,onConfirm:n,onDelete:r,cancelButtonText:i,confirmButtonText:o,deleteButtonText:s,disableConfirm:a})=>b.jsx("div",{className:"px-4 mt-1 flex-shrink-0",children:e||b.jsxs("div",{className:"flex flex-wrap justify-between gap-2 sm:space-x-2",children:[t&&i&&b.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&&b.jsx("button",{"data-testid":"modal-delete-button",onClick:r,className:Ht("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:s}),n&&b.jsx("button",{"data-testid":"modal-save-button",onClick:n,disabled:a,className:Ht("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:o})]})});function dx(e){return Ie({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 fx(e){return Ie({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 hx(e){return Ie({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 gx(e){return Ie({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 ga(e){return Ie({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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"},child:[]},{tag:"path",attr:{d:"M464 336a48 48 0 1 0 96 0 48 48 0 1 0-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"},child:[]}]})(e)}function px(e){return Ie({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 pt=(e=>(e.SUCCESS="success",e.ERROR="error",e.INFO="info",e.WARNING="warning",e))(pt||{}),Co=(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))(Co||{}),Ir=(e=>(e.LINEAR="Linear",e.LOG="logarithmic",e.NORMALISED="normalised",e))(Ir||{}),Yp=(e=>(e.DEPARTMENTS="departments",e.GEOLOCATIONS="geolocations",e))(Yp||{}),Zp=(e=>(e.DATABASE="database",e.SHARED_DRIVE="shared_drive",e.ONE_DRIVE="one_drive",e.AWS_S3="aws_s3",e.SALESFORCE="salesforce",e))(Zp||{}),Jp=(e=>(e.SCAN_STATUS="scan_status",e))(Jp||{});const df={[pt.SUCCESS]:b.jsx(fx,{size:"1.5rem"}),[pt.INFO]:b.jsx(gx,{size:"1.5rem"}),[pt.ERROR]:b.jsx(hx,{size:"1.5rem"}),[pt.WARNING]:b.jsx(px,{size:"1.5rem"})},mx=({message:e,type:t=pt.INFO,duration:n=5e3,onClose:r})=>{x.useEffect(()=>{const o=setTimeout(()=>{r()},n);return()=>clearTimeout(o)},[n,r]);const i=o=>{o.stopPropagation(),r()};return b.jsxs("div",{className:`toast toast-${t}`,role:"alert","aria-live":"assertive",onClick:o=>o.stopPropagation(),children:[df[t]&&b.jsx("span",{className:"toast-icon",children:df[t]}),b.jsx("div",{className:"toast-message",children:e}),b.jsx("button",{onClick:i,"aria-label":"Close notification",className:"toast-close-button",children:b.jsx(dx,{size:"1.2rem"})})]})},gi=({text:e,children:t,position:n="bottom",fixedWidth:r=!1,isVisible:i=!0})=>{const[o,s]=x.useState(!1),[a,l]=x.useState({}),[c,u]=x.useState({}),d=x.useRef(null),f=x.useRef(null);return x.useEffect(()=>{if(!i){s(!1);return}if(!o||!d.current)return;const h=d.current.getBoundingClientRect(),g=f.current;if(!g)return;const p=g.getBoundingClientRect(),m=window.innerWidth,v=window.innerHeight;let C=n,y=0,I=0,w=0,R=0;switch(n==="top"&&h.top-p.height<10?C="bottom":n==="bottom"&&h.bottom+p.height>v-10?C="top":n==="left"&&h.left-p.width<10?C="right":n==="right"&&h.right+p.width>m-10&&(C="left"),C){case"top":y=h.top-p.height-8,I=h.left+h.width/2-p.width/2,w=p.height-4,R=p.width/2-5;break;case"bottom":y=h.bottom+8,I=h.left+h.width/2-p.width/2,w=-5,R=p.width/2-5;break;case"left":y=h.top+h.height/2-p.height/2,I=h.left-p.width-8,w=p.height/2-5,R=p.width-4;break;case"right":y=h.top+h.height/2-p.height/2,I=h.right+8,w=p.height/2-5,R=-5;break}l({top:`${y}px`,left:`${I}px`,opacity:1,visibility:"visible"}),u({top:`${w}px`,left:`${R}px`,transform:"rotate(45deg)"})},[i,o,n]),b.jsxs("div",{className:"tooltip-wrapper",ref:d,onMouseEnter:()=>i&&s(!0),onMouseLeave:()=>i&&s(!1),children:[t,i&&o&&In.createPortal(b.jsxs("div",{ref:f,className:`tooltip ${r?"fixed-width":""}`,style:a,children:[e,b.jsx("span",{className:"tooltip-arrow",style:c})]}),document.body)]})},on={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"},kc={scheduled:{icon:cf,label:"Scheduled",colorClass:on.scheduled||"bg-blue-100 text-blue-700"},completed:{icon:lf,label:"Completed",colorClass:on.completed||"bg-green-100 text-green-700"},successful:{icon:lf,label:"Successful",colorClass:on.successful||"bg-green-100 text-green-700"},failed:{icon:ix,label:"Failed",colorClass:on.failed||"bg-red-100 text-red-700"},partial_successful:{icon:Wp,label:"Partially Successful",colorClass:on.partial_successful||"bg-blue-100 text-blue-700"},running:{icon:rx,animation:"animate-spin",label:"Running",colorClass:on.running||"bg-yellow-200 text-yellow-700"},not_started:{icon:cf,label:"Not Started",colorClass:on.not_started||"bg-gray-100 text-gray-700"},request_received:{icon:uf,label:"Request Received",colorClass:on.request_received||"bg-blue-100 text-blue-700"},queue:{icon:uf,label:"In Queue",colorClass:"bg-blue-100 text-blue-700"},suspended:{icon:af,label:"Suspended",colorClass:on.suspended||"bg-orange-100 text-orange-700"},cancelled:{icon:af,label:"Cancelled",colorClass:on.cancelled||"bg-purple-100 text-purple-700"},unknown:{icon:nx,label:"Unknown",colorClass:"bg-gray-100 text-gray-700"}},Wu=e=>kc[e]||kc.unknown,bx=e=>["running","not_started","request_received"].includes(e),vx=e=>["failed","cancelled","suspended","unknown"].includes(e),xx=e=>["completed","successful"].includes(e),pa=x.memo(({statusKey:e})=>{const{icon:t,animation:n}=Wu(e);return b.jsx(t,{className:Ht("mr-1",n)})});pa.displayName="StatusIcon";const yx=({statusKey:e,statusLabel:t,scheduledTime:n,recurrenceDetails:r,showScheduledInfo:i=!1,adjustWidth:o=!0})=>{const{colorClass:s}=Wu(e);return i&&n?b.jsxs("div",{className:`flex flex-col items-center ${o?"w-max":""}`,children:[b.jsxs("span",{className:Ht("inline-flex items-center px-2 py-1 text-xs font-medium rounded w-max",s),children:[b.jsx(pa,{statusKey:e}),t]}),b.jsxs("div",{className:"flex items-center gap-1 mt-1",children:[b.jsx("span",{className:"text-[10px] text-gray-500",children:n}),r&&b.jsx(gi,{text:r,position:"top",children:b.jsx(qv,{className:"text-xs cursor-pointer",style:{color:"var(--secondary-text-color)"}})})]})]}):b.jsxs("span",{className:Ht("inline-flex items-center px-2 py-1 text-xs font-medium rounded",s),children:[b.jsx(pa,{statusKey:e}),t]})},Cx=({enabled:e,setEnabled:t,id:n="toggle-switch",disabled:r=!1,ariaLabel:i})=>{const o=x.useCallback(()=>{r||t(!e)},[e,t,r]);return b.jsx("button",{id:n,type:"button",role:"switch","aria-checked":e,"aria-label":i,disabled:r,onClick:o,className:Ht("toggle-switch",e?"toggle-on":"toggle-off",r&&"opacity-50 cursor-not-allowed"),children:b.jsx("span",{className:Ht("toggle-knob",e?"knob-on":"knob-off")})})},wx=typeof document<"u"?x.useLayoutEffect:()=>{},hr=e=>{var t;return(t=e==null?void 0:e.ownerDocument)!==null&&t!==void 0?t:document},Er=e=>e&&"window"in e&&e.window===e?e:hr(e).defaultView||window;function Sx(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"}function Ix(e){return Sx(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}let _x=!1;function Xu(){return _x}function Up(e,t){if(!Xu())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:Ix(n)?n=n.host:n=n.parentNode}return!1}const Pc=(e=document)=>{var t;if(!Xu())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 Qp(e){return Xu()&&e.target.shadowRoot&&e.composedPath?e.composedPath()[0]:e.target}function Ex(e){if(Mx())e.focus({preventScroll:!0});else{let t=Ax(e);e.focus(),Rx(t)}}let as=null;function Mx(){if(as==null){as=!1;try{document.createElement("div").focus({get preventScroll(){return as=!0,!0}})}catch{}}return as}function Ax(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 Rx(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}function il(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 Yu(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 Zn(e){if(process.env.NODE_ENV==="test")return e;let t=null;return()=>(t==null&&(t=e()),t)}const wo=Zn(function(){return Yu(/^Mac/i)}),kx=Zn(function(){return Yu(/^iPhone/i)}),Kp=Zn(function(){return Yu(/^iPad/i)||wo()&&navigator.maxTouchPoints>1}),Px=Zn(function(){return kx()||Kp()});Zn(function(){return wo()||Px()});const Fx=Zn(function(){return il(/AppleWebKit/i)&&!Ox()}),Ox=Zn(function(){return il(/Chrome/i)}),Nx=Zn(function(){return il(/Android/i)}),Tx=Zn(function(){return il(/Firefox/i)});function So(e,t,n=!0){var r,i;let{metaKey:o,ctrlKey:s,altKey:a,shiftKey:l}=t;Tx()&&(!((i=window.event)===null||i===void 0||(r=i.type)===null||r===void 0)&&r.startsWith("key"))&&e.target==="_blank"&&(wo()?o=!0:s=!0);let c=Fx()&&wo()&&!Kp()&&process.env.NODE_ENV!=="test"?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:o,ctrlKey:s,altKey:a,shiftKey:l}):new MouseEvent("click",{metaKey:o,ctrlKey:s,altKey:a,shiftKey:l,detail:1,bubbles:!0,cancelable:!0});So.isOpening=n,Ex(e),e.dispatchEvent(c),So.isOpening=!1}So.isOpening=!1;function qp(){let e=x.useRef(new Map),t=x.useCallback((i,o,s,a)=>{let l=a!=null&&a.once?(...c)=>{e.current.delete(s),s(...c)}:s;e.current.set(s,{type:o,eventTarget:i,fn:l,options:a}),i.addEventListener(o,l,a)},[]),n=x.useCallback((i,o,s,a)=>{var l;let c=((l=e.current.get(s))===null||l===void 0?void 0:l.fn)||s;i.removeEventListener(o,c,a),e.current.delete(s)},[]),r=x.useCallback(()=>{e.current.forEach((i,o)=>{n(i.eventTarget,i.type,o,i.options)})},[n]);return x.useEffect(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function Dx(e){return e.pointerType===""&&e.isTrusted?!0:Nx()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function e0(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function Lx(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function t0(e){let t=x.useRef({isFocused:!1,observer:null});return wx(()=>{const n=t.current;return()=>{n.observer&&(n.observer.disconnect(),n.observer=null)}},[]),x.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=o=>{if(t.current.isFocused=!1,r.disabled){let s=e0(o);e==null||e(s)}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 o;(o=t.current.observer)===null||o===void 0||o.disconnect();let s=r===document.activeElement?null:document.activeElement;r.dispatchEvent(new FocusEvent("blur",{relatedTarget:s})),r.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:s}))}}),t.current.observer.observe(r,{attributes:!0,attributeFilter:["disabled"]})}},[e])}let jx=!1,zo=null,Fc=new Set,io=new Map,Br=!1,Oc=!1;const Bx={Tab:!0,Escape:!0};function Zu(e,t){for(let n of Fc)n(e,t)}function $x(e){return!(e.metaKey||!wo()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function ma(e){Br=!0,!So.isOpening&&$x(e)&&(zo="keyboard",Zu("keyboard",e))}function Ut(e){zo="pointer","pointerType"in e&&e.pointerType,(e.type==="mousedown"||e.type==="pointerdown")&&(Br=!0,Zu("pointer",e))}function n0(e){!So.isOpening&&Dx(e)&&(Br=!0,zo="virtual")}function r0(e){e.target===window||e.target===document||jx||!e.isTrusted||(!Br&&!Oc&&(zo="virtual",Zu("virtual",e)),Br=!1,Oc=!1)}function i0(){Br=!1,Oc=!0}function Nc(e){if(typeof window>"u"||typeof document>"u"||io.get(Er(e)))return;const t=Er(e),n=hr(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){Br=!0,r.apply(this,arguments)},n.addEventListener("keydown",ma,!0),n.addEventListener("keyup",ma,!0),n.addEventListener("click",n0,!0),t.addEventListener("focus",r0,!0),t.addEventListener("blur",i0,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",Ut,!0),n.addEventListener("pointermove",Ut,!0),n.addEventListener("pointerup",Ut,!0)):process.env.NODE_ENV==="test"&&(n.addEventListener("mousedown",Ut,!0),n.addEventListener("mousemove",Ut,!0),n.addEventListener("mouseup",Ut,!0)),t.addEventListener("beforeunload",()=>{o0(e)},{once:!0}),io.set(t,{focus:r})}const o0=(e,t)=>{const n=Er(e),r=hr(e);t&&r.removeEventListener("DOMContentLoaded",t),io.has(n)&&(n.HTMLElement.prototype.focus=io.get(n).focus,r.removeEventListener("keydown",ma,!0),r.removeEventListener("keyup",ma,!0),r.removeEventListener("click",n0,!0),n.removeEventListener("focus",r0,!0),n.removeEventListener("blur",i0,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",Ut,!0),r.removeEventListener("pointermove",Ut,!0),r.removeEventListener("pointerup",Ut,!0)):process.env.NODE_ENV==="test"&&(r.removeEventListener("mousedown",Ut,!0),r.removeEventListener("mousemove",Ut,!0),r.removeEventListener("mouseup",Ut,!0)),io.delete(n))};function Vx(e){const t=hr(e);let n;return t.readyState!=="loading"?Nc(e):(n=()=>{Nc(e)},t.addEventListener("DOMContentLoaded",n)),()=>o0(e,n)}typeof document<"u"&&Vx();function s0(){return zo!=="pointer"}const Gx=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function zx(e,t,n){let r=hr(n==null?void 0:n.target);const i=typeof window<"u"?Er(n==null?void 0:n.target).HTMLInputElement:HTMLInputElement,o=typeof window<"u"?Er(n==null?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,s=typeof window<"u"?Er(n==null?void 0:n.target).HTMLElement:HTMLElement,a=typeof window<"u"?Er(n==null?void 0:n.target).KeyboardEvent:KeyboardEvent;return e=e||r.activeElement instanceof i&&!Gx.has(r.activeElement.type)||r.activeElement instanceof o||r.activeElement instanceof s&&r.activeElement.isContentEditable,!(e&&t==="keyboard"&&n instanceof a&&!Bx[n.key])}function Hx(e,t,n){Nc(),x.useEffect(()=>{let r=(i,o)=>{zx(!!(n!=null&&n.isTextInput),i,o)&&e(s0())};return Fc.add(r),()=>{Fc.delete(r)}},t)}function Wx(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:i}=e;const o=x.useCallback(l=>{if(l.target===l.currentTarget)return r&&r(l),i&&i(!1),!0},[r,i]),s=t0(o),a=x.useCallback(l=>{const c=hr(l.target),u=c?Pc(c):Pc();l.target===l.currentTarget&&u===Qp(l.nativeEvent)&&(n&&n(l),i&&i(!0),s(l))},[i,n,s]);return{focusProps:{onFocus:!t&&(n||i||r)?a:void 0,onBlur:!t&&(r||i)?o:void 0}}}function Xx(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=e,o=x.useRef({isFocusWithin:!1}),{addGlobalListener:s,removeAllGlobalListeners:a}=qp(),l=x.useCallback(d=>{d.currentTarget.contains(d.target)&&o.current.isFocusWithin&&!d.currentTarget.contains(d.relatedTarget)&&(o.current.isFocusWithin=!1,a(),n&&n(d),i&&i(!1))},[n,i,o,a]),c=t0(l),u=x.useCallback(d=>{if(!d.currentTarget.contains(d.target))return;const f=hr(d.target),h=Pc(f);if(!o.current.isFocusWithin&&h===Qp(d.nativeEvent)){r&&r(d),i&&i(!0),o.current.isFocusWithin=!0,c(d);let g=d.currentTarget;s(f,"focus",p=>{if(o.current.isFocusWithin&&!Up(g,p.target)){let m=new f.defaultView.FocusEvent("blur",{relatedTarget:p.target});Lx(m,g);let v=e0(m);l(v)}},{capture:!0})}},[r,i,c,s,l]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:u,onBlur:l}}}let ba=!1,ls=0;function Tc(){ba=!0,setTimeout(()=>{ba=!1},50)}function ff(e){e.pointerType==="touch"&&Tc()}function Yx(){if(!(typeof document>"u"))return ls===0&&(typeof PointerEvent<"u"?document.addEventListener("pointerup",ff):process.env.NODE_ENV==="test"&&document.addEventListener("touchend",Tc)),ls++,()=>{ls--,!(ls>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",ff):process.env.NODE_ENV==="test"&&document.removeEventListener("touchend",Tc))}}function Zx(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:i}=e,[o,s]=x.useState(!1),a=x.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;x.useEffect(Yx,[]);let{addGlobalListener:l,removeAllGlobalListeners:c}=qp(),{hoverProps:u,triggerHoverEnd:d}=x.useMemo(()=>{let f=(p,m)=>{if(a.pointerType=m,i||m==="touch"||a.isHovered||!p.currentTarget.contains(p.target))return;a.isHovered=!0;let v=p.currentTarget;a.target=v,l(hr(p.target),"pointerover",C=>{a.isHovered&&a.target&&!Up(a.target,C.target)&&h(C,C.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:v,pointerType:m}),n&&n(!0),s(!0)},h=(p,m)=>{let v=a.target;a.pointerType="",a.target=null,!(m==="touch"||!a.isHovered||!v)&&(a.isHovered=!1,c(),r&&r({type:"hoverend",target:v,pointerType:m}),n&&n(!1),s(!1))},g={};return typeof PointerEvent<"u"?(g.onPointerEnter=p=>{ba&&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&&!ba&&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 x.useEffect(()=>{i&&d({currentTarget:a.target},a.pointerType)},[i]),{hoverProps:u,isHovered:o}}function Jx(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,i=x.useRef({isFocused:!1,isFocusVisible:t||s0()}),[o,s]=x.useState(!1),[a,l]=x.useState(()=>i.current.isFocused&&i.current.isFocusVisible),c=x.useCallback(()=>l(i.current.isFocused&&i.current.isFocusVisible),[]),u=x.useCallback(h=>{i.current.isFocused=h,s(h),c()},[c]);Hx(h=>{i.current.isFocusVisible=h,c()},[],{isTextInput:n});let{focusProps:d}=Wx({isDisabled:r,onFocusChange:u}),{focusWithinProps:f}=Xx({isDisabled:!r,onFocusWithinChange:u});return{isFocused:o,isFocusVisible:a,focusProps:r?f:d}}var Ux=Object.defineProperty,Qx=(e,t,n)=>t in e?Ux(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Dl=(e,t,n)=>(Qx(e,typeof t!="symbol"?t+"":t,n),n);let Kx=class{constructor(){Dl(this,"current",this.detect()),Dl(this,"handoffState","pending"),Dl(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"}},Pr=new Kx;function Ho(e){var t;return Pr.isServer?null:e==null?document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function va(e){var t,n;return Pr.isServer?null:e==null?document:(n=(t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))!=null?n:document}function Ju(e){var t,n;return(n=(t=va(e))==null?void 0:t.activeElement)!=null?n:null}function qx(e){return Ju(e)===e}function a0(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function $t(){let e=[],t={addEventListener(n,r,i,o){return n.addEventListener(r,i,o),t.add(()=>n.removeEventListener(r,i,o))},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 a0(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,i){let o=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:i}),this.add(()=>{Object.assign(n.style,{[r]:o})})},group(n){let r=$t();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 Wo(){let[e]=x.useState($t);return x.useEffect(()=>()=>e.dispose(),[e]),e}let wt=(e,t)=>{Pr.isServer?x.useEffect(e,t):x.useLayoutEffect(e,t)};function Xo(e){let t=x.useRef(e);return wt(()=>{t.current=e},[e]),t}let Je=function(e){let t=Xo(e);return x.useCallback((...n)=>t.current(...n),[t])};function ey(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 ty(e,t){return!(!e||!t||e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)}function ny({disabled:e=!1}={}){let t=x.useRef(null),[n,r]=x.useState(!1),i=Wo(),o=Je(()=>{t.current=null,r(!1),i.dispose()}),s=Je(a=>{if(i.dispose(),t.current===null){t.current=a.currentTarget,r(!0);{let l=Ho(a.currentTarget);i.addEventListener(l,"pointerup",o,!1),i.addEventListener(l,"pointermove",c=>{if(t.current){let u=ey(c);r(ty(u,t.current.getBoundingClientRect()))}},!1),i.addEventListener(l,"pointercancel",o,!1)}}});return{pressed:n,pressProps:e?{}:{onPointerDown:s,onPointerUp:o,onClick:o}}}function _i(e){return x.useMemo(()=>e,Object.values(e))}let ry=x.createContext(void 0);function l0(){return x.useContext(ry)}function hf(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function Ei(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,Ei),r}var Dc=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Dc||{}),iy=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(iy||{});function tn(){let e=sy();return x.useCallback(t=>oy({mergeRefs:e,...t}),[e])}function oy({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:o=!0,name:s,mergeRefs:a}){a=a??ay;let l=c0(t,e);if(o)return cs(l,n,r,s,a);let c=i??0;if(c&2){let{static:u=!1,...d}=l;if(u)return cs(d,n,r,s,a)}if(c&1){let{unmount:u=!0,...d}=l;return Ei(u?0:1,{0(){return null},1(){return cs({...d,hidden:!0,style:{display:"none"}},n,r,s,a)}})}return cs(l,n,r,s,a)}function cs(e,t={},n,r,i){let{as:o=n,children:s,refName:a="ref",...l}=Ll(e,["unmount","static"]),c=e.ref!==void 0?{[a]:e.ref}:{},u=typeof s=="function"?s(t):s;"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(Ys(o)&&(Object.keys(qr(l)).length>0||Object.keys(qr(d)).length>0))if(!x.isValidElement(u)||Array.isArray(u)&&u.length>1||cy(u)){if(Object.keys(qr(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(qr(l)).concat(Object.keys(qr(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"?(...v)=>hf(h(...v),l.className):hf(h,l.className),p=g?{className:g}:{},m=c0(u.props,qr(Ll(l,["ref"])));for(let v in d)v in m&&delete d[v];return x.cloneElement(u,Object.assign({},m,d,c,{ref:i(ly(u),c.ref)},p))}return x.createElement(o,Object.assign({},Ll(l,["ref"]),!Ys(o)&&c,!Ys(o)&&d),u)}function sy(){let e=x.useRef([]),t=x.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 ay(...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 c0(...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 o;return(o=i==null?void 0:i.preventDefault)==null?void 0:o.call(i)}]);for(let r in n)Object.assign(t,{[r](i,...o){let s=n[r];for(let a of s){if((i instanceof Event||(i==null?void 0:i.nativeEvent)instanceof Event)&&i.defaultPrevented)return;a(i,...o)}}});return t}function u0(...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 o=n[r];for(let s of o)s==null||s(...i)}});return t}function nn(e){var t;return Object.assign(x.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function qr(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function Ll(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function ly(e){return x.version.split(".")[0]>="19"?e.props.ref:e.ref}function Ys(e){return e===x.Fragment||e===Symbol.for("react.fragment")}function cy(e){return Ys(e.type)}let uy=x.createContext(void 0);function dy(){return x.useContext(uy)}function d0(e){return typeof e!="object"||e===null?!1:"nodeType"in e}function ol(e){return d0(e)&&"tagName"in e}function Jn(e){return ol(e)&&"accessKey"in e}function Mr(e){return ol(e)&&"tabIndex"in e}function fy(e){return ol(e)&&"style"in e}function hy(e){return Jn(e)&&e.nodeName==="IFRAME"}function f0(e){return Jn(e)&&e.nodeName==="INPUT"}function gf(e){return Jn(e)&&e.nodeName==="LABEL"}function gy(e){return Jn(e)&&e.nodeName==="FIELDSET"}function h0(e){return Jn(e)&&e.nodeName==="LEGEND"}function py(e){return ol(e)?e.matches('a[href],audio[controls],button,details,embed,iframe,img[usemap],input:not([type="hidden"]),label,select,textarea,video[controls]'):!1}function pf(e){let t=e.parentElement,n=null;for(;t&&!gy(t);)h0(t)&&(n=t),t=t.parentElement;let r=(t==null?void 0:t.getAttribute("disabled"))==="";return r&&my(n)?!1:r}function my(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(h0(t))return!1;t=t.previousElementSibling}return!0}let g0=Symbol();function by(e,t=!0){return Object.assign(e,{[g0]:t})}function Un(...e){let t=x.useRef(e);x.useEffect(()=>{t.current=e},[e]);let n=Je(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[g0]))?void 0:n}let Uu=x.createContext(null);Uu.displayName="DescriptionContext";function p0(){let e=x.useContext(Uu);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,p0),t}return e}function vy(){let[e,t]=x.useState([]);return[e.length>0?e.join(" "):void 0,x.useMemo(()=>function(n){let r=Je(o=>(t(s=>[...s,o]),()=>t(s=>{let a=s.slice(),l=a.indexOf(o);return l!==-1&&a.splice(l,1),a}))),i=x.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 x.createElement(Uu.Provider,{value:i},n.children)},[t])]}let xy="p";function yy(e,t){let n=x.useId(),r=l0(),{id:i=`headlessui-description-${n}`,...o}=e,s=p0(),a=Un(t);wt(()=>s.register(i),[i,s.register]);let l=_i({...s.slot,disabled:r||!1}),c={ref:a,...s.props,id:i};return tn()({ourProps:c,theirProps:o,slot:l,defaultTag:xy,name:s.name||"Description"})}let Cy=nn(yy);Object.assign(Cy,{});var yt=(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))(yt||{});let sl=x.createContext(null);sl.displayName="LabelContext";function Qu(){let e=x.useContext(sl);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,Qu),t}return e}function wy(e){var t,n,r;let i=(n=(t=x.useContext(sl))==null?void 0:t.value)!=null?n:void 0;return((r=void 0)!=null?r:0)>0?[i,...e].filter(Boolean).join(" "):i}function m0({inherit:e=!1}={}){let t=wy(),[n,r]=x.useState([]),i=e?[t,...n].filter(Boolean):n;return[i.length>0?i.join(" "):void 0,x.useMemo(()=>function(o){let s=Je(l=>(r(c=>[...c,l]),()=>r(c=>{let u=c.slice(),d=u.indexOf(l);return d!==-1&&u.splice(d,1),u}))),a=x.useMemo(()=>({register:s,slot:o.slot,name:o.name,props:o.props,value:o.value}),[s,o.slot,o.name,o.props,o.value]);return x.createElement(sl.Provider,{value:a},o.children)},[r])]}let Sy="label";function Iy(e,t){var n;let r=x.useId(),i=Qu(),o=dy(),s=l0(),{id:a=`headlessui-label-${r}`,htmlFor:l=o??((n=i.props)==null?void 0:n.htmlFor),passive:c=!1,...u}=e,d=Un(t);wt(()=>i.register(a),[a,i.register]);let f=Je(p=>{let m=p.currentTarget;if(!(p.target!==p.currentTarget&&py(p.target))&&(gf(m)&&p.preventDefault(),i.props&&"onClick"in i.props&&typeof i.props.onClick=="function"&&i.props.onClick(p),gf(m))){let v=document.getElementById(m.htmlFor);if(v){let C=v.getAttribute("disabled");if(C==="true"||C==="")return;let y=v.getAttribute("aria-disabled");if(y==="true"||y==="")return;(f0(v)&&(v.type==="file"||v.type==="radio"||v.type==="checkbox")||v.role==="radio"||v.role==="checkbox"||v.role==="switch")&&v.click(),v.focus({preventScroll:!0})}}}),h=_i({...i.slot,disabled:s||!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),tn()({ourProps:g,theirProps:u,slot:h,defaultTag:l?Sy:"div",name:i.name||"Label"})}let _y=nn(Iy);Object.assign(_y,{});function mf(e){if(e===null)return{width:0,height:0};let{width:t,height:n}=e.getBoundingClientRect();return{width:t,height:n}}function Ey(e,t,n=!1){let[r,i]=x.useState(()=>mf(t));return wt(()=>{if(!t||!e)return;let o=$t();return o.requestAnimationFrame(function s(){o.requestAnimationFrame(s),i(a=>{let l=mf(t);return l.width===a.width&&l.height===a.height?a:l})}),()=>{o.dispose()}},[t,e]),n?{width:`${r.width}px`,height:`${r.height}px`}:r}var b0=(e=>(e[e.Left=0]="Left",e[e.Right=2]="Right",e))(b0||{});function My(e){let t=x.useRef(null),n=Je(i=>{t.current=i.pointerType,!pf(i.currentTarget)&&i.pointerType==="mouse"&&i.button===b0.Left&&(i.preventDefault(),e(i))}),r=Je(i=>{t.current!=="mouse"&&(pf(i.currentTarget)||e(i))});return{onPointerDown:n,onClick:r}}let v0=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 Ay=Object.defineProperty,Ry=(e,t,n)=>t in e?Ay(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ky=(e,t,n)=>(Ry(e,t+"",n),n),x0=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Zt=(e,t,n)=>(x0(e,t,"read from private field"),n?n.call(e):t.get(e)),jl=(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)},bf=(e,t,n,r)=>(x0(e,t,"write to private field"),t.set(e,n),n),hn,Wi,Xi;let y0=class{constructor(t){jl(this,hn,{}),jl(this,Wi,new v0(()=>new Set)),jl(this,Xi,new Set),ky(this,"disposables",$t()),bf(this,hn,t),Pr.isServer&&this.disposables.microTask(()=>{this.dispose()})}dispose(){this.disposables.dispose()}get state(){return Zt(this,hn)}subscribe(t,n){if(Pr.isServer)return()=>{};let r={selector:t,callback:n,current:t(Zt(this,hn))};return Zt(this,Xi).add(r),this.disposables.add(()=>{Zt(this,Xi).delete(r)})}on(t,n){return Pr.isServer?()=>{}:(Zt(this,Wi).get(t).add(n),this.disposables.add(()=>{Zt(this,Wi).get(t).delete(n)}))}send(t){let n=this.reduce(Zt(this,hn),t);if(n!==Zt(this,hn)){bf(this,hn,n);for(let r of Zt(this,Xi)){let i=r.selector(Zt(this,hn));C0(r.current,i)||(r.current=i,r.callback(i))}for(let r of Zt(this,Wi).get(t.type))r(Zt(this,hn),t)}}};hn=new WeakMap,Wi=new WeakMap,Xi=new WeakMap;function C0(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:Bl(e[Symbol.iterator](),t[Symbol.iterator]()):e instanceof Map&&t instanceof Map||e instanceof Set&&t instanceof Set?e.size!==t.size?!1:Bl(e.entries(),t.entries()):vf(e)&&vf(t)?Bl(Object.entries(e)[Symbol.iterator](),Object.entries(t)[Symbol.iterator]()):!1}function Bl(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 vf(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;let t=Object.getPrototypeOf(e);return t===null||Object.getPrototypeOf(t)===null}function xf(e){let[t,n]=e(),r=$t();return(...i)=>{t(...i),r.dispose(),r.microTask(n)}}var Py=Object.defineProperty,Fy=(e,t,n)=>t in e?Py(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yf=(e,t,n)=>(Fy(e,typeof t!="symbol"?t+"":t,n),n),w0=(e=>(e[e.Push=0]="Push",e[e.Pop=1]="Pop",e))(w0||{});let Oy={0(e,t){let n=t.id,r=e.stack,i=e.stack.indexOf(n);if(i!==-1){let o=e.stack.slice();return o.splice(i,1),o.push(n),r=o,{...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}}},Ny=class S0 extends y0{constructor(){super(...arguments),yf(this,"actions",{push:t=>this.send({type:0,id:t}),pop:t=>this.send({type:1,id:t})}),yf(this,"selectors",{isTop:(t,n)=>t.stack[t.stack.length-1]===n,inStack:(t,n)=>t.stack.includes(n)})}static new(){return new S0({stack:[]})}reduce(t,n){return Ei(n.type,Oy,t,n)}};const Ku=new v0(()=>Ny.new());var al=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ll(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Lc={exports:{}},$l={};/**
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 Cf;function Ty(){if(Cf)return $l;Cf=1;var e=x;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,o=e.useEffect,s=e.useMemo,a=e.useDebugValue;return $l.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=s(function(){function m(w){if(!v){if(v=!0,C=w,w=d(w),f!==void 0&&g.hasValue){var R=g.value;if(f(R,w))return y=R}return y=w}if(R=y,n(C,w))return R;var A=d(w);return f!==void 0&&f(R,A)?(C=w,R):(C=w,y=A)}var v=!1,C,y,I=u===void 0?null:u;return[function(){return m(c())},I===null?void 0:function(){return m(I())}]},[c,u,d,f]);var p=r(l,h[0],h[1]);return o(function(){g.hasValue=!0,g.value=p},[p]),a(p),p},$l}var Vl={};/**
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 wf;function Dy(){return wf||(wf=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=x,n=typeof Object.is=="function"?Object.is:e,r=t.useSyncExternalStore,i=t.useRef,o=t.useEffect,s=t.useMemo,a=t.useDebugValue;Vl.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=s(function(){function m(w){if(!v){if(v=!0,C=w,w=d(w),f!==void 0&&g.hasValue){var R=g.value;if(f(R,w))return y=R}return y=w}if(R=y,n(C,w))return R;var A=d(w);return f!==void 0&&f(R,A)?(C=w,R):(C=w,y=A)}var v=!1,C,y,I=u===void 0?null:u;return[function(){return m(c())},I===null?void 0:function(){return m(I())}]},[c,u,d,f]);var p=r(l,h[0],h[1]);return o(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())}()),Vl}process.env.NODE_ENV==="production"?Lc.exports=Ty():Lc.exports=Dy();var Ly=Lc.exports;function an(e,t,n=C0){return Ly.useSyncExternalStoreWithSelector(Je(r=>e.subscribe(jy,r)),Je(()=>e.state),Je(()=>e.state),Je(t),n)}function jy(e){return e}function I0(e,t){let n=x.useId(),r=Ku.get(t),[i,o]=an(r,x.useCallback(s=>[r.selectors.isTop(s,n),r.selectors.inStack(s,n)],[r,n]));return wt(()=>{if(e)return r.actions.push(n),()=>r.actions.pop(n)},[r,e,n]),e?o?i:!0:!1}let jc=new Map,oo=new Map;function Sf(e){var t;let n=(t=oo.get(e))!=null?t:0;return oo.set(e,n+1),n!==0?()=>If(e):(jc.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0,()=>If(e))}function If(e){var t;let n=(t=oo.get(e))!=null?t:1;if(n===1?oo.delete(e):oo.set(e,n-1),n!==1)return;let r=jc.get(e);r&&(r["aria-hidden"]===null?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r["aria-hidden"]),e.inert=r.inert,jc.delete(e))}function By(e,{allowed:t,disallowed:n}={}){let r=I0(e,"inert-others");wt(()=>{var i,o;if(!r)return;let s=$t();for(let l of(i=n==null?void 0:n())!=null?i:[])l&&s.add(Sf(l));let a=(o=t==null?void 0:t())!=null?o:[];for(let l of a){if(!l)continue;let c=Ho(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))||s.add(Sf(d));u=u.parentElement}}return s.dispose},[r,t,n])}function $y(e,t,n){let r=Xo(i=>{let o=i.getBoundingClientRect();o.x===0&&o.y===0&&o.width===0&&o.height===0&&n()});x.useEffect(()=>{if(!e)return;let i=t===null?null:Jn(t)?t:t.current;if(!i)return;let o=$t();if(typeof ResizeObserver<"u"){let s=new ResizeObserver(()=>r.current(i));s.observe(i),o.add(()=>s.disconnect())}if(typeof IntersectionObserver<"u"){let s=new IntersectionObserver(()=>r.current(i));s.observe(i),o.add(()=>s.disconnect())}return()=>o.dispose()},[t,r,e])}let Bc=["[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(","),Vy=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var $c=(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))($c||{}),Gy=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(Gy||{}),zy=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(zy||{});function _0(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Bc)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}function Hy(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Vy)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var qu=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(qu||{});function ed(e,t=0){var n;return e===((n=Ho(e))==null?void 0:n.body)?!1:Ei(t,{0(){return e.matches(Bc)},1(){let r=e;for(;r!==null;){if(r.matches(Bc))return!0;r=r.parentElement}return!1}})}function E0(e){$t().nextFrame(()=>{let t=Ju(e);t&&Mr(t)&&!ed(t,0)&&Xy(e)})}var Wy=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Wy||{});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 Xy(e){e==null||e.focus({preventScroll:!0})}let Yy=["textarea","input"].join(",");function Zy(e){var t,n;return(n=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,Yy))!=null?n:!1}function M0(e,t=n=>n){return e.slice().sort((n,r)=>{let i=t(n),o=t(r);if(i===null||o===null)return 0;let s=i.compareDocumentPosition(o);return s&Node.DOCUMENT_POSITION_FOLLOWING?-1:s&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Jy(e,t,n=e===null?document.body:va(e)){return Uy(_0(n),t,{relativeTo:e})}function Uy(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:i=[]}={}){let o=Array.isArray(e)?e.length>0?va(e[0]):document:va(e),s=Array.isArray(e)?n?M0(e):e:t&64?Hy(e):_0(e);i.length>0&&s.length>1&&(s=s.filter(h=>!i.some(g=>g!=null&&"current"in g?(g==null?void 0:g.current)===h:g===h))),r=r??(o==null?void 0:o.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,s.indexOf(r))-1;if(t&4)return Math.max(0,s.indexOf(r))+1;if(t&8)return s.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=t&32?{preventScroll:!0}:{},u=0,d=s.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=s[h],f==null||f.focus(c),u+=a}while(f!==Ju(f));return t&6&&Zy(f)&&f.select(),2}function A0(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function Qy(){return/Android/gi.test(window.navigator.userAgent)}function _f(){return A0()||Qy()}function ri(e,t,n,r){let i=Xo(n);x.useEffect(()=>{if(!e)return;function o(s){i.current(s)}return document.addEventListener(t,o,r),()=>document.removeEventListener(t,o,r)},[e,t,r])}function Ky(e,t,n,r){let i=Xo(n);x.useEffect(()=>{if(!e)return;function o(s){i.current(s)}return window.addEventListener(t,o,r),()=>window.removeEventListener(t,o,r)},[e,t,r])}const Ef=30;function qy(e,t,n){let r=Xo(n),i=x.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!ed(c,qu.Loose)&&c.tabIndex!==-1&&a.preventDefault(),r.current(a,c)},[r,t]),o=x.useRef(null);ri(e,"pointerdown",a=>{var l,c;_f()||(o.current=((c=(l=a.composedPath)==null?void 0:l.call(a))==null?void 0:c[0])||a.target)},!0),ri(e,"pointerup",a=>{if(_f()||!o.current)return;let l=o.current;return o.current=null,i(a,()=>l)},!0);let s=x.useRef({x:0,y:0});ri(e,"touchstart",a=>{s.current.x=a.touches[0].clientX,s.current.y=a.touches[0].clientY},!0),ri(e,"touchend",a=>{let l={x:a.changedTouches[0].clientX,y:a.changedTouches[0].clientY};if(!(Math.abs(l.x-s.current.x)>=Ef||Math.abs(l.y-s.current.y)>=Ef))return i(a,()=>Mr(a.target)?a.target:null)},!0),Ky(e,"blur",a=>i(a,()=>hy(window.document.activeElement)?window.document.activeElement:null),!0)}function Vc(...e){return x.useMemo(()=>Ho(...e),[...e])}var e2=(e=>(e[e.Ignore=0]="Ignore",e[e.Select=1]="Select",e[e.Close=2]="Close",e))(e2||{});const us={Ignore:{kind:0},Select:e=>({kind:1,target:e}),Close:{kind:2}},t2=200,Mf=5;function n2(e,{trigger:t,action:n,close:r,select:i}){let o=x.useRef(null),s=x.useRef(null),a=x.useRef(null);ri(e&&t!==null,"pointerdown",l=>{d0(l==null?void 0:l.target)&&t!=null&&t.contains(l.target)&&(s.current=l.x,a.current=l.y,o.current=l.timeStamp)}),ri(e&&t!==null,"pointerup",l=>{var c,u;let d=o.current;if(d===null||(o.current=null,!Mr(l.target))||Math.abs(l.x-((c=s.current)!=null?c:l.x))<Mf&&Math.abs(l.y-((u=a.current)!=null?u:l.y))<Mf)return;let f=n(l);switch(f.kind){case 0:return;case 1:{l.timeStamp-d>t2&&(i(f.target),r());break}case 2:{r();break}}},{capture:!0})}function r2(e,t){return x.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 i2(e){return x.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot)}function o2(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(i){return r.add(i),()=>r.delete(i)},dispatch(i,...o){let s=t[i].call(n,...o);s&&(n=s,r.forEach(a=>a()))}}}function s2(){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),o=Math.max(0,e-i);n.style(r,"paddingRight",`${o}px`)}}}function a2(){return A0()?{before({doc:e,d:t,meta:n}){function r(i){for(let o of n().containers)for(let s of o())if(s.contains(i))return!0;return!1}t.microTask(()=>{var i;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let a=$t();a.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>a.dispose()))}let o=(i=window.scrollY)!=null?i:window.pageYOffset,s=null;t.addEventListener(e,"click",a=>{if(Mr(a.target))try{let l=a.target.closest("a");if(!l)return;let{hash:c}=new URL(l.href),u=e.querySelector(c);Mr(u)&&!r(u)&&(s=u)}catch{}},!0),t.group(a=>{t.addEventListener(e,"touchstart",l=>{if(a.dispose(),Mr(l.target)&&fy(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(Mr(a.target)){if(f0(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;o!==l&&window.scrollTo(0,o),s&&s.isConnected&&(s.scrollIntoView({block:"nearest"}),s=null)})})}}:{}}function l2(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function Af(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let Ar=o2(()=>new Map,{PUSH(e,t){var n;let r=(n=this.get(e))!=null?n:{doc:e,count:0,d:$t(),meta:new Set,computedMeta:{}};return r.count++,r.meta.add(t),r.computedMeta=Af(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=Af(n.meta)),this},SCROLL_PREVENT(e){let t={doc:e.doc,d:e.d,meta(){return e.computedMeta}},n=[a2(),s2(),l2()];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)}});Ar.subscribe(()=>{let e=Ar.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)&&Ar.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&Ar.dispatch("TEARDOWN",n)}});function c2(e,t,n=()=>({containers:[]})){let r=i2(Ar),i=t?r.get(t):void 0,o=i?i.count>0:!1;return wt(()=>{if(!(!t||!e))return Ar.dispatch("PUSH",t,n),()=>Ar.dispatch("POP",t,n)},[e,t]),o}function u2(e,t,n=()=>[document.body]){let r=I0(e,"scroll-lock");c2(r,t,i=>{var o;return{containers:[...(o=i.containers)!=null?o:[],n]}})}function Rf(e){return[e.screenX,e.screenY]}function d2(){let e=x.useRef([-1,-1]);return{wasMoved(t){let n=Rf(t);return e.current[0]===n[0]&&e.current[1]===n[1]?!1:(e.current=n,!0)},update(t){e.current=Rf(t)}}}function f2(e=0){let[t,n]=x.useState(e),r=x.useCallback(l=>n(l),[]),i=x.useCallback(l=>n(c=>c|l),[]),o=x.useCallback(l=>(t&l)===l,[t]),s=x.useCallback(l=>n(c=>c&~l),[]),a=x.useCallback(l=>n(c=>c^l),[]);return{flags:t,setFlag:r,addFlag:i,hasFlag:o,removeFlag:s,toggleFlag:a}}var kf,Pf;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((kf=process==null?void 0:process.env)==null?void 0:kf.NODE_ENV)==="test"&&typeof((Pf=Element==null?void 0:Element.prototype)==null?void 0:Pf.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 h2=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(h2||{});function g2(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function p2(e,t,n,r){let[i,o]=x.useState(n),{hasFlag:s,addFlag:a,removeFlag:l}=f2(e&&i?3:0),c=x.useRef(!1),u=x.useRef(!1),d=Wo();return wt(()=>{var f;if(e){if(n&&o(!0),!t){n&&a(3);return}return(f=void 0)==null||f.call(r,n),m2(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&&x2(t)||(c.current=!1,l(7),n||o(!1),(h=void 0)==null||h.call(r,n))}})}},[e,n,t,d]),e?[i,{closed:s(1),enter:s(2),leave:s(4),transition:s(2)||s(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function m2(e,{prepare:t,run:n,done:r,inFlight:i}){let o=$t();return v2(e,{prepare:t,inFlight:i}),o.nextFrame(()=>{n(),o.requestAnimationFrame(()=>{o.add(b2(e,r))})}),o.dispose}function b2(e,t){var n,r;let i=$t();if(!e)return i.dispose;let o=!1;i.add(()=>{o=!0});let s=(r=(n=e.getAnimations)==null?void 0:n.call(e).filter(a=>a instanceof CSSTransition))!=null?r:[];return s.length===0?(t(),i.dispose):(Promise.allSettled(s.map(a=>a.finished)).then(()=>{o||t()}),i.dispose)}function v2(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 x2(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 y2(e,{container:t,accept:n,walk:r}){let i=x.useRef(n),o=x.useRef(r);x.useEffect(()=>{i.current=n,o.current=r},[n,r]),wt(()=>{if(!t||!e)return;let s=Ho(t);if(!s)return;let a=i.current,l=o.current,c=Object.assign(d=>a(d),{acceptNode:a}),u=s.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,c,!1);for(;u.nextNode();)l(u.currentNode)},[t,e,i,o])}function cl(){return typeof window<"u"}function Mi(e){return R0(e)?(e.nodeName||"").toLowerCase():"#document"}function Gt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function An(e){var t;return(t=(R0(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function R0(e){return cl()?e instanceof Node||e instanceof Gt(e).Node:!1}function kt(e){return cl()?e instanceof Element||e instanceof Gt(e).Element:!1}function _n(e){return cl()?e instanceof HTMLElement||e instanceof Gt(e).HTMLElement:!1}function Ff(e){return!cl()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Gt(e).ShadowRoot}const C2=new Set(["inline","contents"]);function Yo(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=dn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!C2.has(i)}const w2=new Set(["table","td","th"]);function S2(e){return w2.has(Mi(e))}const I2=[":popover-open",":modal"];function ul(e){return I2.some(t=>{try{return e.matches(t)}catch{return!1}})}const _2=["transform","translate","scale","rotate","perspective"],E2=["transform","translate","scale","rotate","perspective","filter"],M2=["paint","layout","strict","content"];function td(e){const t=nd(),n=kt(e)?dn(e):e;return _2.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)||E2.some(r=>(n.willChange||"").includes(r))||M2.some(r=>(n.contain||"").includes(r))}function A2(e){let t=sr(e);for(;_n(t)&&!pi(t);){if(td(t))return t;if(ul(t))return null;t=sr(t)}return null}function nd(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const R2=new Set(["html","body","#document"]);function pi(e){return R2.has(Mi(e))}function dn(e){return Gt(e).getComputedStyle(e)}function dl(e){return kt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function sr(e){if(Mi(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ff(e)&&e.host||An(e);return Ff(t)?t.host:t}function k0(e){const t=sr(e);return pi(t)?e.ownerDocument?e.ownerDocument.body:e.body:_n(t)&&Yo(t)?t:k0(t)}function Io(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=k0(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),s=Gt(i);if(o){const a=Gc(s);return t.concat(s,s.visualViewport||[],Yo(i)?i:[],a&&n?Io(a):[])}return t.concat(i,Io(i,[],n))}function Gc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function k2(){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 $r=Math.min,Rt=Math.max,_o=Math.round,ds=Math.floor,xn=e=>({x:e,y:e}),P2={left:"right",right:"left",bottom:"top",top:"bottom"},F2={start:"end",end:"start"};function Of(e,t,n){return Rt(e,$r(t,n))}function Ai(e,t){return typeof e=="function"?e(t):e}function ar(e){return e.split("-")[0]}function Zo(e){return e.split("-")[1]}function P0(e){return e==="x"?"y":"x"}function F0(e){return e==="y"?"height":"width"}const O2=new Set(["top","bottom"]);function jn(e){return O2.has(ar(e))?"y":"x"}function O0(e){return P0(jn(e))}function N2(e,t,n){n===void 0&&(n=!1);const r=Zo(e),i=O0(e),o=F0(i);let s=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=xa(s)),[s,xa(s)]}function T2(e){const t=xa(e);return[zc(e),t,zc(t)]}function zc(e){return e.replace(/start|end/g,t=>F2[t])}const Nf=["left","right"],Tf=["right","left"],D2=["top","bottom"],L2=["bottom","top"];function j2(e,t,n){switch(e){case"top":case"bottom":return n?t?Tf:Nf:t?Nf:Tf;case"left":case"right":return t?D2:L2;default:return[]}}function B2(e,t,n,r){const i=Zo(e);let o=j2(ar(e),n==="start",r);return i&&(o=o.map(s=>s+"-"+i),t&&(o=o.concat(o.map(zc)))),o}function xa(e){return e.replace(/left|right|bottom|top/g,t=>P2[t])}function $2(e){return{top:0,right:0,bottom:0,left:0,...e}}function V2(e){return typeof e!="number"?$2(e):{top:e,right:e,bottom:e,left:e}}function ya(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 Df(e,t,n){let{reference:r,floating:i}=e;const o=jn(t),s=O0(t),a=F0(s),l=ar(t),c=o==="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(Zo(t)){case"start":h[s]-=f*(n&&c?-1:1);break;case"end":h[s]+=f*(n&&c?-1:1);break}return h}const G2=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:s}=n,a=o.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Df(c,r,l),f=r,h={},g=0;for(let p=0;p<a.length;p++){const{name:m,fn:v}=a[p],{x:C,y,data:I,reset:w}=await v({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:h,rects:c,platform:s,elements:{reference:e,floating:t}});u=C??u,d=y??d,h={...h,[m]:{...h[m],...I}},w&&g<=50&&(g++,typeof w=="object"&&(w.placement&&(f=w.placement),w.rects&&(c=w.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:i}):w.rects),{x:u,y:d}=Df(c,f,l)),p=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:h}};async function fl(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=Ai(t,e),g=V2(h),m=a[f?d==="floating"?"reference":"floating":d],v=ya(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(m)))==null||n?m:m.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),C=d==="floating"?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,y=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),I=await(o.isElement==null?void 0:o.isElement(y))?await(o.getScale==null?void 0:o.getScale(y))||{x:1,y:1}:{x:1,y:1},w=ya(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:C,offsetParent:y,strategy:l}):C);return{top:(v.top-w.top+g.top)/I.y,bottom:(w.bottom-v.bottom+g.bottom)/I.y,left:(v.left-w.left+g.left)/I.x,right:(w.right-v.right+g.right)/I.x}}const z2=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:s,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}=Ai(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const v=ar(i),C=jn(a),y=ar(a)===a,I=await(l.isRTL==null?void 0:l.isRTL(c.floating)),w=f||(y||!p?[xa(a)]:T2(a)),R=g!=="none";!f&&R&&w.push(...B2(a,p,g,I));const A=[a,...w],S=await fl(t,m),_=[];let E=((r=o.flip)==null?void 0:r.overflows)||[];if(u&&_.push(S[v]),d){const D=N2(i,s,I);_.push(S[D[0]],S[D[1]])}if(E=[...E,{placement:i,overflows:_}],!_.every(D=>D<=0)){var P,T;const D=(((P=o.flip)==null?void 0:P.index)||0)+1,k=A[D];if(k&&(!(d==="alignment"?C!==jn(k):!1)||E.every(M=>jn(M.placement)===C?M.overflows[0]>0:!0)))return{data:{index:D,overflows:E},reset:{placement:k}};let O=(T=E.filter(N=>N.overflows[0]<=0).sort((N,M)=>N.overflows[1]-M.overflows[1])[0])==null?void 0:T.placement;if(!O)switch(h){case"bestFit":{var $;const N=($=E.filter(M=>{if(R){const F=jn(M.placement);return F===C||F==="y"}return!0}).map(M=>[M.placement,M.overflows.filter(F=>F>0).reduce((F,B)=>F+B,0)]).sort((M,F)=>M[1]-F[1])[0])==null?void 0:$[0];N&&(O=N);break}case"initialPlacement":O=a;break}if(i!==O)return{reset:{placement:O}}}return{}}}},H2=new Set(["left","top"]);async function W2(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),s=ar(n),a=Zo(n),l=jn(n)==="y",c=H2.has(s)?-1:1,u=o&&l?-1:1,d=Ai(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 X2=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:s,middlewareData:a}=t,l=await W2(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:s}}}}},Y2=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:a={fn:m=>{let{x:v,y:C}=m;return{x:v,y:C}}},...l}=Ai(e,t),c={x:n,y:r},u=await fl(t,l),d=jn(ar(i)),f=P0(d);let h=c[f],g=c[d];if(o){const m=f==="y"?"top":"left",v=f==="y"?"bottom":"right",C=h+u[m],y=h-u[v];h=Of(C,h,y)}if(s){const m=d==="y"?"top":"left",v=d==="y"?"bottom":"right",C=g+u[m],y=g-u[v];g=Of(C,g,y)}const p=a.fn({...t,[f]:h,[d]:g});return{...p,data:{x:p.x-n,y:p.y-r,enabled:{[f]:o,[d]:s}}}}}},Z2=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:s,elements:a}=t,{apply:l=()=>{},...c}=Ai(e,t),u=await fl(t,c),d=ar(i),f=Zo(i),h=jn(i)==="y",{width:g,height:p}=o.floating;let m,v;d==="top"||d==="bottom"?(m=d,v=f===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(v=d,m=f==="end"?"top":"bottom");const C=p-u.top-u.bottom,y=g-u.left-u.right,I=$r(p-u[m],C),w=$r(g-u[v],y),R=!t.middlewareData.shift;let A=I,S=w;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(S=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(A=C),R&&!f){const E=Rt(u.left,0),P=Rt(u.right,0),T=Rt(u.top,0),$=Rt(u.bottom,0);h?S=g-2*(E!==0||P!==0?E+P:Rt(u.left,u.right)):A=p-2*(T!==0||$!==0?T+$:Rt(u.top,u.bottom))}await l({...t,availableWidth:S,availableHeight:A});const _=await s.getDimensions(a.floating);return g!==_.width||p!==_.height?{reset:{rects:!0}}:{}}}};function N0(e){const t=dn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=_n(e),o=i?e.offsetWidth:n,s=i?e.offsetHeight:r,a=_o(n)!==o||_o(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function rd(e){return kt(e)?e:e.contextElement}function li(e){const t=rd(e);if(!_n(t))return xn(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=N0(t);let s=(o?_o(n.width):n.width)/r,a=(o?_o(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const J2=xn(0);function T0(e){const t=Gt(e);return!nd()||!t.visualViewport?J2:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function U2(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Gt(e)?!1:t}function Vr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=rd(e);let s=xn(1);t&&(r?kt(r)&&(s=li(r)):s=li(e));const a=U2(o,n,r)?T0(o):xn(0);let l=(i.left+a.x)/s.x,c=(i.top+a.y)/s.y,u=i.width/s.x,d=i.height/s.y;if(o){const f=Gt(o),h=r&&kt(r)?Gt(r):r;let g=f,p=Gc(g);for(;p&&r&&h!==g;){const m=li(p),v=p.getBoundingClientRect(),C=dn(p),y=v.left+(p.clientLeft+parseFloat(C.paddingLeft))*m.x,I=v.top+(p.clientTop+parseFloat(C.paddingTop))*m.y;l*=m.x,c*=m.y,u*=m.x,d*=m.y,l+=y,c+=I,g=Gt(p),p=Gc(g)}}return ya({width:u,height:d,x:l,y:c})}function hl(e,t){const n=dl(e).scrollLeft;return t?t.left+n:Vr(An(e)).left+n}function D0(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-hl(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function Q2(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",s=An(r),a=t?ul(t.floating):!1;if(r===s||a&&o)return n;let l={scrollLeft:0,scrollTop:0},c=xn(1);const u=xn(0),d=_n(r);if((d||!d&&!o)&&((Mi(r)!=="body"||Yo(s))&&(l=dl(r)),_n(r))){const h=Vr(r);c=li(r),u.x=h.x+r.clientLeft,u.y=h.y+r.clientTop}const f=s&&!d&&!o?D0(s,l):xn(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 K2(e){return Array.from(e.getClientRects())}function q2(e){const t=An(e),n=dl(e),r=e.ownerDocument.body,i=Rt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Rt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+hl(e);const a=-n.scrollTop;return dn(r).direction==="rtl"&&(s+=Rt(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:s,y:a}}const Lf=25;function eC(e,t){const n=Gt(e),r=An(e),i=n.visualViewport;let o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;const u=nd();(!u||u&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}const c=hl(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<=Lf&&(o-=g)}else c<=Lf&&(o+=c);return{width:o,height:s,x:a,y:l}}const tC=new Set(["absolute","fixed"]);function nC(e,t){const n=Vr(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=_n(e)?li(e):xn(1),s=e.clientWidth*o.x,a=e.clientHeight*o.y,l=i*o.x,c=r*o.y;return{width:s,height:a,x:l,y:c}}function jf(e,t,n){let r;if(t==="viewport")r=eC(e,n);else if(t==="document")r=q2(An(e));else if(kt(t))r=nC(t,n);else{const i=T0(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return ya(r)}function L0(e,t){const n=sr(e);return n===t||!kt(n)||pi(n)?!1:dn(n).position==="fixed"||L0(n,t)}function rC(e,t){const n=t.get(e);if(n)return n;let r=Io(e,[],!1).filter(a=>kt(a)&&Mi(a)!=="body"),i=null;const o=dn(e).position==="fixed";let s=o?sr(e):e;for(;kt(s)&&!pi(s);){const a=dn(s),l=td(s);!l&&a.position==="fixed"&&(i=null),(o?!l&&!i:!l&&a.position==="static"&&!!i&&tC.has(i.position)||Yo(s)&&!l&&L0(e,s))?r=r.filter(u=>u!==s):i=a,s=sr(s)}return t.set(e,r),r}function iC(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const s=[...n==="clippingAncestors"?ul(t)?[]:rC(t,this._c):[].concat(n),r],a=s[0],l=s.reduce((c,u)=>{const d=jf(t,u,i);return c.top=Rt(d.top,c.top),c.right=$r(d.right,c.right),c.bottom=$r(d.bottom,c.bottom),c.left=Rt(d.left,c.left),c},jf(t,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function oC(e){const{width:t,height:n}=N0(e);return{width:t,height:n}}function sC(e,t,n){const r=_n(t),i=An(t),o=n==="fixed",s=Vr(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const l=xn(0);function c(){l.x=hl(i)}if(r||!r&&!o)if((Mi(t)!=="body"||Yo(i))&&(a=dl(t)),r){const h=Vr(t,!0,o,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else i&&c();o&&!r&&i&&c();const u=i&&!r&&!o?D0(i,a):xn(0),d=s.left+a.scrollLeft-l.x-u.x,f=s.top+a.scrollTop-l.y-u.y;return{x:d,y:f,width:s.width,height:s.height}}function Gl(e){return dn(e).position==="static"}function Bf(e,t){if(!_n(e)||dn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return An(e)===n&&(n=n.ownerDocument.body),n}function j0(e,t){const n=Gt(e);if(ul(e))return n;if(!_n(e)){let i=sr(e);for(;i&&!pi(i);){if(kt(i)&&!Gl(i))return i;i=sr(i)}return n}let r=Bf(e,t);for(;r&&S2(r)&&Gl(r);)r=Bf(r,t);return r&&pi(r)&&Gl(r)&&!td(r)?n:r||A2(e)||n}const aC=async function(e){const t=this.getOffsetParent||j0,n=this.getDimensions,r=await n(e.floating);return{reference:sC(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function lC(e){return dn(e).direction==="rtl"}const cC={convertOffsetParentRelativeRectToViewportRelativeRect:Q2,getDocumentElement:An,getClippingRect:iC,getOffsetParent:j0,getElementRects:aC,getClientRects:K2,getDimensions:oC,getScale:li,isElement:kt,isRTL:lC};function B0(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function uC(e,t){let n=null,r;const i=An(e);function o(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),o();const c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:h}=c;if(a||t(),!f||!h)return;const g=ds(d),p=ds(i.clientWidth-(u+f)),m=ds(i.clientHeight-(d+h)),v=ds(u),y={rootMargin:-g+"px "+-p+"px "+-m+"px "+-v+"px",threshold:Rt(0,$r(1,l))||1};let I=!0;function w(R){const A=R[0].intersectionRatio;if(A!==l){if(!I)return s();A?s(!1,A):r=setTimeout(()=>{s(!1,1e-7)},1e3)}A===1&&!B0(c,e.getBoundingClientRect())&&s(),I=!1}try{n=new IntersectionObserver(w,{...y,root:i.ownerDocument})}catch{n=new IntersectionObserver(w,y)}n.observe(e)}return s(!0),o}function $0(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=rd(e),u=i||o?[...c?Io(c):[],...Io(t)]:[];u.forEach(v=>{i&&v.addEventListener("scroll",n,{passive:!0}),o&&v.addEventListener("resize",n)});const d=c&&a?uC(c,n):null;let f=-1,h=null;s&&(h=new ResizeObserver(v=>{let[C]=v;C&&C.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?Vr(e):null;l&&m();function m(){const v=Vr(e);p&&!B0(p,v)&&n(),p=v,g=requestAnimationFrame(m)}return n(),()=>{var v;u.forEach(C=>{i&&C.removeEventListener("scroll",n),o&&C.removeEventListener("resize",n)}),d==null||d(),(v=h)==null||v.disconnect(),h=null,l&&cancelAnimationFrame(g)}}const zl=fl,dC=X2,fC=Y2,hC=z2,gC=Z2,pC=(e,t,n)=>{const r=new Map,i={platform:cC,...n},o={...i.platform,_c:r};return G2(e,t,{...i,platform:o})};var mC=typeof document<"u",bC=function(){},Zs=mC?x.useLayoutEffect:bC;function Ca(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(!Ca(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 o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!Ca(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function V0(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function $f(e,t){const n=V0(e);return Math.round(t*n)/n}function Hl(e){const t=W.useRef(e);return Zs(()=>{t.current=e}),t}function vC(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,d]=W.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=W.useState(r);Ca(f,r)||h(r);const[g,p]=W.useState(null),[m,v]=W.useState(null),C=W.useCallback(M=>{M!==R.current&&(R.current=M,p(M))},[]),y=W.useCallback(M=>{M!==A.current&&(A.current=M,v(M))},[]),I=o||g,w=s||m,R=W.useRef(null),A=W.useRef(null),S=W.useRef(u),_=l!=null,E=Hl(l),P=Hl(i),T=Hl(c),$=W.useCallback(()=>{if(!R.current||!A.current)return;const M={placement:t,strategy:n,middleware:f};P.current&&(M.platform=P.current),pC(R.current,A.current,M).then(F=>{const B={...F,isPositioned:T.current!==!1};D.current&&!Ca(S.current,B)&&(S.current=B,da.flushSync(()=>{d(B)}))})},[f,t,n,P,T]);Zs(()=>{c===!1&&S.current.isPositioned&&(S.current.isPositioned=!1,d(M=>({...M,isPositioned:!1})))},[c]);const D=W.useRef(!1);Zs(()=>(D.current=!0,()=>{D.current=!1}),[]),Zs(()=>{if(I&&(R.current=I),w&&(A.current=w),I&&w){if(E.current)return E.current(I,w,$);$()}},[I,w,$,E,_]);const k=W.useMemo(()=>({reference:R,floating:A,setReference:C,setFloating:y}),[C,y]),O=W.useMemo(()=>({reference:I,floating:w}),[I,w]),N=W.useMemo(()=>{const M={position:n,left:0,top:0};if(!O.floating)return M;const F=$f(O.floating,u.x),B=$f(O.floating,u.y);return a?{...M,transform:"translate("+F+"px, "+B+"px)",...V0(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:F,top:B}},[n,a,O.floating,u.x,u.y]);return W.useMemo(()=>({...u,update:$,refs:k,elements:O,floatingStyles:N}),[u,$,k,O,N])}const G0=(e,t)=>({...dC(e),options:[e,t]}),xC=(e,t)=>({...fC(e),options:[e,t]}),yC=(e,t)=>({...hC(e),options:[e,t]}),CC=(e,t)=>({...gC(e),options:[e,t]}),z0={...W},wC=z0.useInsertionEffect,SC=wC||(e=>e());function H0(e){const t=W.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return SC(()=>{t.current=e}),W.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 Hc=typeof document<"u"?x.useLayoutEffect:x.useEffect;let Vf=!1,IC=0;const Gf=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+IC++;function _C(){const[e,t]=W.useState(()=>Vf?Gf():void 0);return Hc(()=>{e==null&&t(Gf())},[]),W.useEffect(()=>{Vf=!0},[]),e}const EC=z0.useId,MC=EC||_C;let Eo;process.env.NODE_ENV!=="production"&&(Eo=new Set);function AC(){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=Eo)!=null&&e.has(i))){var o;(o=Eo)==null||o.add(i),console.warn(i)}}function RC(){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=Eo)!=null&&e.has(i))){var o;(o=Eo)==null||o.add(i),console.error(i)}}function kC(){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 PC=W.createContext(null),FC=W.createContext(null),OC=()=>{var e;return((e=W.useContext(PC))==null?void 0:e.id)||null},NC=()=>W.useContext(FC),TC="data-floating-ui-focusable";function DC(e){const{open:t=!1,onOpenChange:n,elements:r}=e,i=MC(),o=W.useRef({}),[s]=W.useState(()=>kC()),a=OC()!=null;if(process.env.NODE_ENV!=="production"){const h=r.reference;h&&!kt(h)&&RC("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]=W.useState(r.reference),u=H0((h,g,p)=>{o.current.openEvent=h?g:void 0,s.emit("openchange",{open:h,event:g,reason:p,nested:a}),n==null||n(h,g,p)}),d=W.useMemo(()=>({setPositionReference:c}),[]),f=W.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return W.useMemo(()=>({dataRef:o,open:t,onOpenChange:u,elements:f,events:s,floatingId:i,refs:d}),[t,u,f,s,i,d])}function LC(e){e===void 0&&(e={});const{nodeId:t}=e,n=DC({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,i=r.elements,[o,s]=W.useState(null),[a,l]=W.useState(null),u=(i==null?void 0:i.domReference)||o,d=W.useRef(null),f=NC();Hc(()=>{u&&(d.current=u)},[u]);const h=vC({...e,elements:{...i,...a&&{reference:a}}}),g=W.useCallback(y=>{const I=kt(y)?{getBoundingClientRect:()=>y.getBoundingClientRect(),contextElement:y}:y;l(I),h.refs.setReference(I)},[h.refs]),p=W.useCallback(y=>{(kt(y)||y===null)&&(d.current=y,s(y)),(kt(h.refs.reference.current)||h.refs.reference.current===null||y!==null&&!kt(y))&&h.refs.setReference(y)},[h.refs]),m=W.useMemo(()=>({...h.refs,setReference:p,setPositionReference:g,domReference:d}),[h.refs,p,g]),v=W.useMemo(()=>({...h.elements,domReference:u}),[h.elements,u]),C=W.useMemo(()=>({...h,...r,refs:m,elements:v,nodeId:t}),[h,m,v,t,r]);return Hc(()=>{r.dataRef.current.floatingContext=C;const y=f==null?void 0:f.nodesRef.current.find(I=>I.id===t);y&&(y.context=C)}),W.useMemo(()=>({...h,context:C,refs:m,elements:v}),[h,m,v,C])}const zf="active",Hf="selected";function Wl(e,t,n){const r=new Map,i=n==="item";let o=e;if(i&&e){const{[zf]:s,[Hf]:a,...l}=e;o=l}return{...n==="floating"&&{tabIndex:-1,[TC]:""},...o,...t.map(s=>{const a=s?s[n]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((s,a)=>(a&&Object.entries(a).forEach(l=>{let[c,u]=l;if(!(i&&[zf,Hf].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),s[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 s[c]=u}),s),{})}}function jC(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=W.useCallback(a=>Wl(a,e,"reference"),t),o=W.useCallback(a=>Wl(a,e,"floating"),n),s=W.useCallback(a=>Wl(a,e,"item"),r);return W.useMemo(()=>({getReferenceProps:i,getFloatingProps:o,getItemProps:s}),[i,o,s])}function Wf(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}const BC=e=>({name:"inner",options:e,async fn(t){const{listRef:n,overflowRef:r,onFallbackChange:i,offset:o=0,index:s=0,minItemsVisible:a=4,referenceOverflowThreshold:l=0,scrollRef:c,...u}=Ai(e,t),{rects:d,elements:{floating:f}}=t,h=n.current[s],g=(c==null?void 0:c.current)||f,p=f.clientTop||g.clientTop,m=f.clientTop!==0,v=g.clientTop!==0,C=f===g;if(process.env.NODE_ENV!=="production"&&(t.placement.startsWith("bottom")||AC('`placement` side must be "bottom" when using the `inner`',"middleware.")),!h)return{};const y={...t,...await G0(-h.offsetTop-f.clientTop-d.reference.height/2-h.offsetHeight/2-o).fn(t)},I=await zl(Wf(y,g.scrollHeight+p+f.clientTop),u),w=await zl(y,{...u,elementContext:"reference"}),R=Rt(0,I.top),A=y.y+R,E=(g.scrollHeight>g.clientHeight?P=>P:_o)(Rt(0,g.scrollHeight+(m&&C||v?p*2:0)-R-Rt(0,I.bottom)));if(g.style.maxHeight=E+"px",g.scrollTop=R,i){const P=g.offsetHeight<h.offsetHeight*$r(a,n.current.length)-1||w.top>=-l||w.bottom>=-l;da.flushSync(()=>i(P))}return r&&(r.current=await zl(Wf({...y,y:A},g.offsetHeight+p+f.clientTop),u)),{y:A}}});function $C(e,t){const{open:n,elements:r}=e,{enabled:i=!0,overflowRef:o,scrollRef:s,onChange:a}=t,l=H0(a),c=W.useRef(!1),u=W.useRef(null),d=W.useRef(null);W.useEffect(()=>{if(!i)return;function h(p){if(p.ctrlKey||!g||o.current==null)return;const m=p.deltaY,v=o.current.top>=-.5,C=o.current.bottom>=-.5,y=g.scrollHeight-g.clientHeight,I=m<0?-1:1,w=m<0?"max":"min";g.scrollHeight<=g.clientHeight||(!v&&m>0||!C&&m<0?(p.preventDefault(),da.flushSync(()=>{l(R=>R+Math[w](m,y*I))})):/firefox/i.test(k2())&&(g.scrollTop+=m))}const g=(s==null?void 0:s.current)||r.floating;if(n&&g)return g.addEventListener("wheel",h),requestAnimationFrame(()=>{u.current=g.scrollTop,o.current!=null&&(d.current={...o.current})}),()=>{u.current=null,d.current=null,g.removeEventListener("wheel",h)}},[i,n,r.floating,o,s,l]);const f=W.useMemo(()=>({onKeyDown(){c.current=!0},onWheel(){c.current=!1},onPointerMove(){c.current=!1},onScroll(){const h=(s==null?void 0:s.current)||r.floating;if(!(!o.current||!h||!c.current)){if(u.current!==null){const g=h.scrollTop-u.current;(o.current.bottom<-.5&&g<-1||o.current.top<-.5&&g>1)&&da.flushSync(()=>l(p=>p+g))}requestAnimationFrame(()=>{u.current=h.scrollTop})}}}),[r.floating,l,o,s]);return W.useMemo(()=>i?{floating:f}:{},[i,f])}let Ri=x.createContext({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});Ri.displayName="FloatingContext";let id=x.createContext(null);id.displayName="PlacementContext";function VC(e){return x.useMemo(()=>e?typeof e=="string"?{to:e}:e:null,[e])}function GC(){return x.useContext(Ri).setReference}function zC(){return x.useContext(Ri).getReferenceProps}function HC(){let{getFloatingProps:e,slot:t}=x.useContext(Ri);return x.useCallback((...n)=>Object.assign({},e(...n),{"data-anchor":t.anchor}),[e,t])}function WC(e=null){e===!1&&(e=null),typeof e=="string"&&(e={to:e});let t=x.useContext(id),n=x.useMemo(()=>e,[JSON.stringify(e,(i,o)=>{var s;return(s=o==null?void 0:o.outerHTML)!=null?s:o})]);wt(()=>{t==null||t(n??null)},[t,n]);let r=x.useContext(Ri);return x.useMemo(()=>[r.setFloating,e?r.styles:{}],[r.setFloating,e,r.styles])}let Xf=4;function XC({children:e,enabled:t=!0}){let[n,r]=x.useState(null),[i,o]=x.useState(0),s=x.useRef(null),[a,l]=x.useState(null);YC(a);let c=t&&n!==null&&a!==null,{to:u="bottom",gap:d=0,offset:f=0,padding:h=0,inner:g}=ZC(n,a),[p,m="center"]=u.split(" ");wt(()=>{c&&o(0)},[c]);let{refs:v,floatingStyles:C,context:y}=LC({open:c,placement:p==="selection"?m==="center"?"bottom":`bottom-${m}`:m==="center"?`${p}`:`${p}-${m}`,strategy:"absolute",transform:!1,middleware:[G0({mainAxis:p==="selection"?0:d,crossAxis:f}),xC({padding:h}),p!=="selection"&&yC({padding:h}),p==="selection"&&g?BC({...g,padding:h,overflowRef:s,offset:i,minItemsVisible:Xf,referenceOverflowThreshold:h,onFallbackChange(P){var T,$;if(!P)return;let D=y.elements.floating;if(!D)return;let k=parseFloat(getComputedStyle(D).scrollPaddingBottom)||0,O=Math.min(Xf,D.childElementCount),N=0,M=0;for(let F of($=(T=y.elements.floating)==null?void 0:T.childNodes)!=null?$:[])if(Jn(F)){let B=F.offsetTop,z=B+F.clientHeight+k,G=D.scrollTop,V=G+D.clientHeight;if(B>=G&&z<=V)O--;else{M=Math.max(0,Math.min(z,V)-Math.max(B,G)),N=F.clientHeight;break}}O>=1&&o(F=>{let B=N*O-M+k;return F>=B?F:B})}}):null,CC({padding:h,apply({availableWidth:P,availableHeight:T,elements:$}){Object.assign($.floating.style,{overflow:"auto",maxWidth:`${P}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${T}px)`})}})].filter(Boolean),whileElementsMounted:$0}),[I=p,w=m]=y.placement.split("-");p==="selection"&&(I="selection");let R=x.useMemo(()=>({anchor:[I,w].filter(Boolean).join(" ")}),[I,w]),A=$C(y,{overflowRef:s,onChange:o}),{getReferenceProps:S,getFloatingProps:_}=jC([A]),E=Je(P=>{l(P),v.setFloating(P)});return W.createElement(id.Provider,{value:r},W.createElement(Ri.Provider,{value:{setFloating:E,setReference:v.setReference,styles:C,getReferenceProps:S,getFloatingProps:_,slot:R}},e))}function YC(e){wt(()=>{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 ZC(e,t){var n,r,i;let o=Xl((n=e==null?void 0:e.gap)!=null?n:"var(--anchor-gap, 0)",t),s=Xl((r=e==null?void 0:e.offset)!=null?r:"var(--anchor-offset, 0)",t),a=Xl((i=e==null?void 0:e.padding)!=null?i:"var(--anchor-padding, 0)",t);return{...e,gap:o,offset:s,padding:a}}function Xl(e,t,n=void 0){let r=Wo(),i=Je((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=Yf(l,c);return[u,d=>{let f=W0(l);{let h=f.map(g=>window.getComputedStyle(c).getPropertyValue(g));r.requestAnimationFrame(function g(){r.nextFrame(g);let p=!1;for(let[v,C]of f.entries()){let y=window.getComputedStyle(c).getPropertyValue(C);if(h[v]!==y){h[v]=y,p=!0;break}}if(!p)return;let m=Yf(l,c);u!==m&&(d(m),u=m)})}return r.dispose}]}return[n,null]}),o=x.useMemo(()=>i(e,t)[0],[e,t]),[s=o,a]=x.useState();return wt(()=>{let[l,c]=i(e,t);if(a(l),!!c)return c(a)},[e,t]),s}function W0(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,...W0(i)]:[r]}return[]}function Yf(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 od=x.createContext(null);od.displayName="OpenClosedContext";var Mo=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Mo||{});function JC(){return x.useContext(od)}function UC({value:e,children:t}){return x.createElement(od.Provider,{value:e},t)}function QC(e){throw new Error("Unexpected object: "+e)}var ft=(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))(ft||{});function fs(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 o=0;o<n.length;++o)if(!t.resolveDisabled(n[o],o,n))return o;return r}case 1:{i===-1&&(i=n.length);for(let o=i-1;o>=0;--o)if(!t.resolveDisabled(n[o],o,n))return o;return r}case 2:{for(let o=i+1;o<n.length;++o)if(!t.resolveDisabled(n[o],o,n))return o;return r}case 3:{for(let o=n.length-1;o>=0;--o)if(!t.resolveDisabled(n[o],o,n))return o;return r}case 4:{for(let o=0;o<n.length;++o)if(t.resolveId(n[o],o,n)===e.id)return o;return r}case 5:return null;default:QC(e)}}function X0(e){let t=Je(e),n=x.useRef(!1);x.useEffect(()=>(n.current=!1,()=>{n.current=!0,a0(()=>{n.current&&t()})}),[t])}let KC=x.createContext(!1);function qC(){return x.useContext(KC)}function ew(e){let t=qC(),n=x.useContext(Z0),[r,i]=x.useState(()=>{var o;if(!t&&n!==null)return(o=n.current)!=null?o:null;if(Pr.isServer)return null;let s=e==null?void 0:e.getElementById("headlessui-portal-root");if(s)return s;if(e===null)return null;let a=e.createElement("div");return a.setAttribute("id","headlessui-portal-root"),e.body.appendChild(a)});return x.useEffect(()=>{r!==null&&(e!=null&&e.body.contains(r)||e==null||e.body.appendChild(r))},[r,e]),x.useEffect(()=>{t||n!==null&&i(n.current)},[n,i,t]),r}let Y0=x.Fragment,tw=nn(function(e,t){let{ownerDocument:n=null,...r}=e,i=x.useRef(null),o=Un(by(f=>{i.current=f}),t),s=Vc(i.current),a=n??s,l=ew(a),c=x.useContext(ow),u=Wo(),d=tn();return X0(()=>{var f;l&&l.childNodes.length<=0&&((f=l.parentElement)==null||f.removeChild(l))}),l?In.createPortal(x.createElement("div",{"data-headlessui-portal":"",ref:f=>{u.dispose(),c&&f&&u.add(c.register(f))}},d({ourProps:{ref:o},theirProps:r,slot:{},defaultTag:Y0,name:"Portal"})),l):null});function nw(e,t){let n=Un(t),{enabled:r=!0,ownerDocument:i,...o}=e,s=tn();return r?x.createElement(tw,{...o,ownerDocument:i,ref:n}):s({ourProps:{ref:n},theirProps:o,slot:{},defaultTag:Y0,name:"Portal"})}let rw=x.Fragment,Z0=x.createContext(null);function iw(e,t){let{target:n,...r}=e,i={ref:Un(t)},o=tn();return x.createElement(Z0.Provider,{value:n},o({ourProps:i,theirProps:r,defaultTag:rw,name:"Popover.Group"}))}let ow=x.createContext(null),sw=nn(nw),aw=nn(iw),lw=Object.assign(sw,{Group:aw});const Js={Idle:{kind:"Idle"},Tracked:e=>({kind:"Tracked",position:e}),Moved:{kind:"Moved"}};function J0(e){let t=e.getBoundingClientRect();return`${t.x},${t.y}`}function cw(e,t,n){let r=$t();if(t.kind==="Tracked"){let i=function(){o!==J0(e)&&(r.dispose(),n())},{position:o}=t,s=new ResizeObserver(i);s.observe(e),r.add(()=>s.disconnect()),r.addEventListener(window,"scroll",i,{passive:!0}),r.addEventListener(window,"resize",i)}return()=>r.dispose()}let Zf=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Jf(e){var t,n;let r=(t=e.innerText)!=null?t:"",i=e.cloneNode(!0);if(!Jn(i))return r;let o=!1;for(let a of i.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))a.remove(),o=!0;let s=o?(n=i.innerText)!=null?n:"":r;return Zf.test(s)&&(s=s.replace(Zf,"")),s}function uw(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 o=document.getElementById(i);if(o){let s=o.getAttribute("aria-label");return typeof s=="string"?s.trim():Jf(o).trim()}return null}).filter(Boolean);if(r.length>0)return r.join(", ")}return Jf(e).trim()}function dw(e){let t=x.useRef(""),n=x.useRef("");return Je(()=>{let r=e.current;if(!r)return"";let i=r.innerText;if(t.current===i)return n.current;let o=uw(r).trim().toLowerCase();return t.current=i,n.current=o,o})}var fw=Object.defineProperty,hw=(e,t,n)=>t in e?fw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Uf=(e,t,n)=>(hw(e,typeof t!="symbol"?t+"":t,n),n),Mt=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Mt||{}),wa=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(wa||{}),Ke=(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))(Ke||{});function Qf(e,t=n=>n){let n=e.activeItemIndex!==null?e.items[e.activeItemIndex]:null,r=M0(t(e.items.slice()),o=>o.dataRef.current.domRef.current),i=n?r.indexOf(n):null;return i===-1&&(i=null),{items:r,activeItemIndex:i}}let gw={1(e){if(e.menuState===1)return e;let t=e.buttonElement?Js.Tracked(J0(e.buttonElement)):e.buttonPositionState;return{...e,activeItemIndex:null,pendingFocus:{focus:ft.Nothing},menuState:1,buttonPositionState:t}},0(e,t){return e.menuState===0?e:{...e,__demoMode:!1,pendingFocus:t.focus,menuState:0,buttonPositionState:Js.Idle}},2:(e,t)=>{var n,r,i,o,s;if(e.menuState===1)return e;let a={...e,searchQuery:"",activationTrigger:(n=t.trigger)!=null?n:1,__demoMode:!1};if(t.focus===ft.Nothing)return{...a,activeItemIndex:null};if(t.focus===ft.Specific)return{...a,activeItemIndex:e.items.findIndex(u=>u.id===t.id)};if(t.focus===ft.Previous){let u=e.activeItemIndex;if(u!==null){let d=e.items[u].dataRef.current.domRef,f=fs(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===ft.Next){let u=e.activeItemIndex;if(u!==null){let d=e.items[u].dataRef.current.domRef,f=fs(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(((o=d.current)==null?void 0:o.nextElementSibling)===h.current||((s=h.current)==null?void 0:s.nextElementSibling)===null)return{...a,activeItemIndex:f}}}}let l=Qf(e),c=fs(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(s=>{var a;return((a=s.dataRef.current.textValue)==null?void 0:a.startsWith(r))&&!s.dataRef.current.disabled}),o=i?e.items.indexOf(i):-1;return o===-1||o===e.activeItemIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeItemIndex:o,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!==ft.Nothing&&(r=fs(e.pendingFocus,{resolveItems:()=>n,resolveActiveIndex:()=>e.activeItemIndex,resolveId:i=>i.id,resolveDisabled:i=>i.dataRef.current.disabled})),{...e,items:n,activeItemIndex:r,pendingFocus:{focus:ft.Nothing},pendingShouldSort:!0}},6:(e,t)=>{let n=e.items,r=[],i=new Set(t.items);for(let[o,s]of n.entries())if(i.has(s.id)&&(r.push(o),i.delete(s.id),i.size===0))break;if(r.length>0){n=n.slice();for(let o of r.reverse())n.splice(o,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,...Qf(e),pendingShouldSort:!1}:e,10(e){return e.buttonPositionState.kind!=="Tracked"?e:{...e,buttonPositionState:Js.Moved}}};class sd extends y0{constructor(t){super(t),Uf(this,"actions",{registerItem:xf(()=>{let n=[],r=new Set;return[(i,o)=>{r.has(o)||(r.add(o),n.push({id:i,dataRef:o}))},()=>(r.clear(),this.send({type:5,items:n.splice(0)}))]}),unregisterItem:xf(()=>{let n=[];return[r=>n.push(r),()=>this.send({type:6,items:n.splice(0)})]})}),Uf(this,"selectors",{activeDescendantId(n){var r;let i=n.activeItemIndex,o=n.items;return i===null||(r=o[i])==null?void 0:r.id},isActive(n,r){var i;let o=n.activeItemIndex,s=n.items;return o!==null?((i=s[o])==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=Ku.get(null);this.disposables.add(r.on(w0.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(cw(r.buttonElement,r.buttonPositionState,()=>{this.send({type:10})})))})})}static new({id:t,__demoMode:n=!1}){return new sd({id:t,__demoMode:n,menuState:n?0:1,buttonElement:null,itemsElement:null,items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1,pendingShouldSort:!1,pendingFocus:{focus:ft.Nothing},buttonPositionState:Js.Idle})}reduce(t,n){return Ei(n.type,gw,t,n)}}const U0=x.createContext(null);function ad(e){let t=x.useContext(U0);if(t===null){let n=new Error(`<${e} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Q0),n}return t}function Q0({id:e,__demoMode:t=!1}){let n=x.useMemo(()=>sd.new({id:e,__demoMode:t}),[]);return X0(()=>n.dispose()),n}let pw=x.Fragment;function mw(e,t){let n=x.useId(),{__demoMode:r=!1,...i}=e,o=Q0({id:n,__demoMode:r}),[s,a,l]=an(o,m=>[m.menuState,m.itemsElement,m.buttonElement]),c=Un(t),u=Ku.get(null),d=an(u,x.useCallback(m=>u.selectors.isTop(m,n),[u,n]));qy(d,[l,a],(m,v)=>{var C;o.send({type:Ke.CloseMenu}),ed(v,qu.Loose)||(m.preventDefault(),(C=o.state.buttonElement)==null||C.focus())});let f=Je(()=>{o.send({type:Ke.CloseMenu})}),h=_i({open:s===Mt.Open,close:f}),g={ref:c},p=tn();return x.createElement(XC,null,x.createElement(U0.Provider,{value:o},x.createElement(UC,{value:Ei(s,{[Mt.Open]:Mo.Open,[Mt.Closed]:Mo.Closed})},p({ourProps:g,theirProps:i,slot:h,defaultTag:pw,name:"Menu"}))))}let bw="button";function vw(e,t){let n=ad("Menu.Button"),r=x.useId(),{id:i=`headlessui-menu-button-${r}`,disabled:o=!1,autoFocus:s=!1,...a}=e,l=x.useRef(null),c=zC(),u=Un(t,l,GC(),Je(E=>n.send({type:Ke.SetButtonElement,element:E}))),d=Je(E=>{switch(E.key){case yt.Space:case yt.Enter:case yt.ArrowDown:E.preventDefault(),E.stopPropagation(),n.send({type:Ke.OpenMenu,focus:{focus:ft.First}});break;case yt.ArrowUp:E.preventDefault(),E.stopPropagation(),n.send({type:Ke.OpenMenu,focus:{focus:ft.Last}});break}}),f=Je(E=>{switch(E.key){case yt.Space:E.preventDefault();break}}),[h,g,p]=an(n,E=>[E.menuState,E.buttonElement,E.itemsElement]),m=h===Mt.Open;n2(m,{trigger:g,action:x.useCallback(E=>{if(g!=null&&g.contains(E.target))return us.Ignore;let P=E.target.closest('[role="menuitem"]:not([data-disabled])');return Jn(P)?us.Select(P):p!=null&&p.contains(E.target)?us.Ignore:us.Close},[g,p]),close:x.useCallback(()=>n.send({type:Ke.CloseMenu}),[]),select:x.useCallback(E=>E.click(),[])});let v=My(E=>{var P;o||(h===Mt.Open?(In.flushSync(()=>n.send({type:Ke.CloseMenu})),(P=l.current)==null||P.focus({preventScroll:!0})):(E.preventDefault(),n.send({type:Ke.OpenMenu,focus:{focus:ft.Nothing},trigger:wa.Pointer})))}),{isFocusVisible:C,focusProps:y}=Jx({autoFocus:s}),{isHovered:I,hoverProps:w}=Zx({isDisabled:o}),{pressed:R,pressProps:A}=ny({disabled:o}),S=_i({open:h===Mt.Open,active:R||h===Mt.Open,disabled:o,hover:I,focus:C,autofocus:s}),_=u0(c(),{ref:u,id:i,type:r2(e,l.current),"aria-haspopup":"menu","aria-controls":p==null?void 0:p.id,"aria-expanded":h===Mt.Open,disabled:o||void 0,autoFocus:s,onKeyDown:d,onKeyUp:f},v,y,w,A);return tn()({ourProps:_,theirProps:a,slot:S,defaultTag:bw,name:"Menu.Button"})}let xw="div",yw=Dc.RenderStrategy|Dc.Static;function Cw(e,t){let n=x.useId(),{id:r=`headlessui-menu-items-${n}`,anchor:i,portal:o=!1,modal:s=!0,transition:a=!1,...l}=e,c=VC(i),u=ad("Menu.Items"),[d,f]=WC(c),h=HC(),[g,p]=x.useState(null),m=Un(t,c?d:null,Je(M=>u.send({type:Ke.SetItemsElement,element:M})),p),[v,C]=an(u,M=>[M.menuState,M.buttonElement]),y=Vc(C),I=Vc(g);c&&(o=!0);let w=JC(),[R,A]=p2(a,g,w!==null?(w&Mo.Open)===Mo.Open:v===Mt.Open);$y(R,C,()=>{u.send({type:Ke.CloseMenu})});let S=an(u,M=>M.__demoMode),_=S?!1:s&&v===Mt.Open;u2(_,I);let E=S?!1:s&&v===Mt.Open;By(E,{allowed:x.useCallback(()=>[C,g],[C,g])});let P=an(u,u.selectors.didButtonMove)?!1:R;x.useEffect(()=>{let M=g;M&&v===Mt.Open&&(qx(M)||M.focus({preventScroll:!0}))},[v,g]),y2(v===Mt.Open,{container:g,accept(M){return M.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:M.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(M){M.setAttribute("role","none")}});let T=Wo(),$=Je(M=>{var F,B,z;switch(T.dispose(),M.key){case yt.Space:if(u.state.searchQuery!=="")return M.preventDefault(),M.stopPropagation(),u.send({type:Ke.Search,value:M.key});case yt.Enter:if(M.preventDefault(),M.stopPropagation(),u.state.activeItemIndex!==null){let{dataRef:G}=u.state.items[u.state.activeItemIndex];(B=(F=G.current)==null?void 0:F.domRef.current)==null||B.click()}u.send({type:Ke.CloseMenu}),E0(u.state.buttonElement);break;case yt.ArrowDown:return M.preventDefault(),M.stopPropagation(),u.send({type:Ke.GoToItem,focus:ft.Next});case yt.ArrowUp:return M.preventDefault(),M.stopPropagation(),u.send({type:Ke.GoToItem,focus:ft.Previous});case yt.Home:case yt.PageUp:return M.preventDefault(),M.stopPropagation(),u.send({type:Ke.GoToItem,focus:ft.First});case yt.End:case yt.PageDown:return M.preventDefault(),M.stopPropagation(),u.send({type:Ke.GoToItem,focus:ft.Last});case yt.Escape:M.preventDefault(),M.stopPropagation(),In.flushSync(()=>u.send({type:Ke.CloseMenu})),(z=u.state.buttonElement)==null||z.focus({preventScroll:!0});break;case yt.Tab:M.preventDefault(),M.stopPropagation(),In.flushSync(()=>u.send({type:Ke.CloseMenu})),Jy(u.state.buttonElement,M.shiftKey?$c.Previous:$c.Next);break;default:M.key.length===1&&(u.send({type:Ke.Search,value:M.key}),T.setTimeout(()=>u.send({type:Ke.ClearSearch}),350));break}}),D=Je(M=>{switch(M.key){case yt.Space:M.preventDefault();break}}),k=_i({open:v===Mt.Open}),O=u0(c?h():{},{"aria-activedescendant":an(u,u.selectors.activeDescendantId),"aria-labelledby":an(u,M=>{var F;return(F=M.buttonElement)==null?void 0:F.id}),id:r,onKeyDown:$,onKeyUp:D,role:"menu",tabIndex:v===Mt.Open?0:void 0,ref:m,style:{...l.style,...f,"--button-width":Ey(R,C,!0).width},...g2(A)}),N=tn();return x.createElement(lw,{enabled:o?e.static||R:!1,ownerDocument:y},N({ourProps:O,theirProps:l,slot:k,defaultTag:xw,features:yw,visible:P,name:"Menu.Items"}))}let ww=x.Fragment;function Sw(e,t){let n=x.useId(),{id:r=`headlessui-menu-item-${n}`,disabled:i=!1,...o}=e,s=ad("Menu.Item"),a=an(s,P=>s.selectors.isActive(P,r)),l=x.useRef(null),c=Un(t,l),u=an(s,P=>s.selectors.shouldScrollIntoView(P,r));wt(()=>{if(u)return $t().requestAnimationFrame(()=>{var P,T;(T=(P=l.current)==null?void 0:P.scrollIntoView)==null||T.call(P,{block:"nearest"})})},[u,l]);let d=dw(l),f=x.useRef({disabled:i,domRef:l,get textValue(){return d()}});wt(()=>{f.current.disabled=i},[f,i]),wt(()=>(s.actions.registerItem(r,f),()=>s.actions.unregisterItem(r)),[f,r]);let h=Je(()=>{s.send({type:Ke.CloseMenu})}),g=Je(P=>{if(i)return P.preventDefault();s.send({type:Ke.CloseMenu}),E0(s.state.buttonElement)}),p=Je(()=>{if(i)return s.send({type:Ke.GoToItem,focus:ft.Nothing});s.send({type:Ke.GoToItem,focus:ft.Specific,id:r})}),m=d2(),v=Je(P=>m.update(P)),C=Je(P=>{m.wasMoved(P)&&(i||a||s.send({type:Ke.GoToItem,focus:ft.Specific,id:r,trigger:wa.Pointer}))}),y=Je(P=>{m.wasMoved(P)&&(i||a&&s.state.activationTrigger===wa.Pointer&&s.send({type:Ke.GoToItem,focus:ft.Nothing}))}),[I,w]=m0(),[R,A]=vy(),S=_i({active:a,focus:a,disabled:i,close:h}),_={id:r,ref:c,role:"menuitem",tabIndex:i===!0?void 0:-1,"aria-disabled":i===!0?!0:void 0,"aria-labelledby":I,"aria-describedby":R,disabled:void 0,onClick:g,onFocus:p,onPointerEnter:v,onMouseEnter:v,onPointerMove:C,onMouseMove:C,onPointerLeave:y,onMouseLeave:y},E=tn();return x.createElement(w,null,x.createElement(A,null,E({ourProps:_,theirProps:o,slot:S,defaultTag:ww,name:"Menu.Item"})))}let Iw="div";function _w(e,t){let[n,r]=m0(),i=e,o={ref:t,"aria-labelledby":n,role:"group"},s=tn();return x.createElement(r,null,s({ourProps:o,theirProps:i,slot:{},defaultTag:Iw,name:"Menu.Section"}))}let Ew="header";function Mw(e,t){let n=x.useId(),{id:r=`headlessui-menu-heading-${n}`,...i}=e,o=Qu();wt(()=>o.register(r),[r,o.register]);let s={id:r,ref:t,role:"presentation",...o.props};return tn()({ourProps:s,theirProps:i,slot:{},defaultTag:Ew,name:"Menu.Heading"})}let Aw="div";function Rw(e,t){let n=e,r={ref:t,role:"separator"};return tn()({ourProps:r,theirProps:n,slot:{},defaultTag:Aw,name:"Menu.Separator"})}let kw=nn(mw),K0=nn(vw),q0=nn(Cw),em=nn(Sw),Pw=nn(_w),Fw=nn(Mw),Ow=nn(Rw),Nw=Object.assign(kw,{Button:K0,Items:q0,Item:em,Section:Pw,Heading:Fw,Separator:Ow});const Tw=({menuButton:e,menuItems:t})=>{const[n,r]=x.useState(),[i,o]=x.useState(!1),s=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),o(!0)};return x.useEffect(()=>{const a=()=>o(!1);return window.addEventListener("scroll",a,!0),window.addEventListener("resize",a),()=>{window.removeEventListener("scroll",a),window.removeEventListener("resize",a)}},[]),b.jsxs(Nw,{as:"div","data-open":i,className:"relative",children:[b.jsx(K0,{"data-testid":"dropdown-menu-button",onClick:s,className:"headlessui-menu-button",children:e}),i&&n&&b.jsx(q0,{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)=>b.jsx(em,{disabled:u,children:({close:f})=>b.jsxs("button",{"data-testid":`dropdown-menu-item-${a.toLowerCase().replace(/\s+/g,"-")}`,onClick:()=>{u||(c(),f(),o(!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 Gr(e){"@babel/helpers - typeof";return Gr=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},Gr(e)}function Dw(e,t){if(Gr(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Gr(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function tm(e){var t=Dw(e,"string");return Gr(t)=="symbol"?t:t+""}function Yi(e,t,n){return(t=tm(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kf(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 ve(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Kf(Object(n),!0).forEach(function(r){Yi(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kf(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Lw(e){if(Array.isArray(e))return e}function jw(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.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&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}function Wc(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 nm(e,t){if(e){if(typeof e=="string")return Wc(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)?Wc(e,t):void 0}}function Bw(){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 Wn(e,t){return Lw(e)||jw(e,t)||nm(e,t)||Bw()}function $w(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 Rn(e,t){if(e==null)return{};var n,r,i=$w(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var Vw=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function rm(e){var t=e.defaultInputValue,n=t===void 0?"":t,r=e.defaultMenuIsOpen,i=r===void 0?!1:r,o=e.defaultValue,s=o===void 0?null:o,a=e.inputValue,l=e.menuIsOpen,c=e.onChange,u=e.onInputChange,d=e.onMenuClose,f=e.onMenuOpen,h=e.value,g=Rn(e,Vw),p=x.useState(a!==void 0?a:n),m=Wn(p,2),v=m[0],C=m[1],y=x.useState(l!==void 0?l:i),I=Wn(y,2),w=I[0],R=I[1],A=x.useState(h!==void 0?h:s),S=Wn(A,2),_=S[0],E=S[1],P=x.useCallback(function(M,F){typeof c=="function"&&c(M,F),E(M)},[c]),T=x.useCallback(function(M,F){var B;typeof u=="function"&&(B=u(M,F)),C(B!==void 0?B:M)},[u]),$=x.useCallback(function(){typeof f=="function"&&f(),R(!0)},[f]),D=x.useCallback(function(){typeof d=="function"&&d(),R(!1)},[d]),k=a!==void 0?a:v,O=l!==void 0?l:w,N=h!==void 0?h:_;return ve(ve({},g),{},{inputValue:k,menuIsOpen:O,onChange:P,onInputChange:T,onMenuClose:D,onMenuOpen:$,value:N})}function Ce(){return Ce=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},Ce.apply(null,arguments)}function Gw(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qf(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,tm(r.key),r)}}function zw(e,t,n){return t&&qf(e.prototype,t),n&&qf(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Xc(e,t){return Xc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Xc(e,t)}function Hw(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&&Xc(e,t)}function Sa(e){return Sa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Sa(e)}function im(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(im=function(){return!!e})()}function Ww(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Xw(e,t){if(t&&(Gr(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ww(e)}function Yw(e){var t=im();return function(){var n,r=Sa(e);if(t){var i=Sa(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Xw(this,n)}}function Zw(e){if(Array.isArray(e))return Wc(e)}function Jw(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Uw(){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 ci(e){return Zw(e)||Jw(e)||nm(e)||Uw()}function Qw(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 Kw(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 qw=function(){function e(n){var r=this;this._insertTag=function(i){var o;r.tags.length===0?r.insertionPoint?o=r.insertionPoint.nextSibling:r.prepend?o=r.container.firstChild:o=r.before:o=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(i,o),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(Kw(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var o=Qw(i);try{o.insertRule(r,o.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-",Ia="-moz-",ze="-webkit-",om="comm",ld="rule",cd="decl",eS="@import",sm="@keyframes",tS="@layer",nS=Math.abs,gl=String.fromCharCode,rS=Object.assign;function iS(e,t){return Ct(e,0)^45?(((t<<2^Ct(e,0))<<2^Ct(e,1))<<2^Ct(e,2))<<2^Ct(e,3):0}function am(e){return e.trim()}function oS(e,t){return(e=t.exec(e))?e[0]:e}function He(e,t,n){return e.replace(t,n)}function Yc(e,t){return e.indexOf(t)}function Ct(e,t){return e.charCodeAt(t)|0}function Ao(e,t,n){return e.slice(t,n)}function pn(e){return e.length}function ud(e){return e.length}function hs(e,t){return t.push(e),e}function sS(e,t){return e.map(t).join("")}var pl=1,mi=1,lm=0,Bt=0,ht=0,ki="";function ml(e,t,n,r,i,o,s){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:pl,column:mi,length:s,return:""}}function Di(e,t){return rS(ml("",null,null,"",null,null,0),e,{length:-e.length},t)}function aS(){return ht}function lS(){return ht=Bt>0?Ct(ki,--Bt):0,mi--,ht===10&&(mi=1,pl--),ht}function zt(){return ht=Bt<lm?Ct(ki,Bt++):0,mi++,ht===10&&(mi=1,pl++),ht}function yn(){return Ct(ki,Bt)}function Us(){return Bt}function Jo(e,t){return Ao(ki,e,t)}function Ro(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 cm(e){return pl=mi=1,lm=pn(ki=e),Bt=0,[]}function um(e){return ki="",e}function Qs(e){return am(Jo(Bt-1,Zc(e===91?e+2:e===40?e+1:e)))}function cS(e){for(;(ht=yn())&&ht<33;)zt();return Ro(e)>2||Ro(ht)>3?"":" "}function uS(e,t){for(;--t&&zt()&&!(ht<48||ht>102||ht>57&&ht<65||ht>70&&ht<97););return Jo(e,Us()+(t<6&&yn()==32&&zt()==32))}function Zc(e){for(;zt();)switch(ht){case e:return Bt;case 34:case 39:e!==34&&e!==39&&Zc(ht);break;case 40:e===41&&Zc(e);break;case 92:zt();break}return Bt}function dS(e,t){for(;zt()&&e+ht!==57;)if(e+ht===84&&yn()===47)break;return"/*"+Jo(t,Bt-1)+"*"+gl(e===47?e:zt())}function fS(e){for(;!Ro(yn());)zt();return Jo(e,Bt)}function hS(e){return um(Ks("",null,null,null,[""],e=cm(e),0,[0],e))}function Ks(e,t,n,r,i,o,s,a,l){for(var c=0,u=0,d=s,f=0,h=0,g=0,p=1,m=1,v=1,C=0,y="",I=i,w=o,R=r,A=y;m;)switch(g=C,C=zt()){case 40:if(g!=108&&Ct(A,d-1)==58){Yc(A+=He(Qs(C),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:A+=Qs(C);break;case 9:case 10:case 13:case 32:A+=cS(g);break;case 92:A+=uS(Us()-1,7);continue;case 47:switch(yn()){case 42:case 47:hs(gS(dS(zt(),Us()),t,n),l);break;default:A+="/"}break;case 123*p:a[c++]=pn(A)*v;case 125*p:case 59:case 0:switch(C){case 0:case 125:m=0;case 59+u:v==-1&&(A=He(A,/\f/g,"")),h>0&&pn(A)-d&&hs(h>32?th(A+";",r,n,d-1):th(He(A," ","")+";",r,n,d-2),l);break;case 59:A+=";";default:if(hs(R=eh(A,t,n,c,u,i,a,y,I=[],w=[],d),o),C===123)if(u===0)Ks(A,t,R,R,I,o,d,a,w);else switch(f===99&&Ct(A,3)===110?100:f){case 100:case 108:case 109:case 115:Ks(e,R,R,r&&hs(eh(e,R,R,0,0,i,a,y,i,I=[],d),w),i,w,d,a,r?I:w);break;default:Ks(A,R,R,R,[""],w,0,a,w)}}c=u=h=0,p=v=1,y=A="",d=s;break;case 58:d=1+pn(A),h=g;default:if(p<1){if(C==123)--p;else if(C==125&&p++==0&&lS()==125)continue}switch(A+=gl(C),C*p){case 38:v=u>0?1:(A+="\f",-1);break;case 44:a[c++]=(pn(A)-1)*v,v=1;break;case 64:yn()===45&&(A+=Qs(zt())),f=yn(),u=d=pn(y=A+=fS(Us())),C++;break;case 45:g===45&&pn(A)==2&&(p=0)}}return o}function eh(e,t,n,r,i,o,s,a,l,c,u){for(var d=i-1,f=i===0?o:[""],h=ud(f),g=0,p=0,m=0;g<r;++g)for(var v=0,C=Ao(e,d+1,d=nS(p=s[g])),y=e;v<h;++v)(y=am(p>0?f[v]+" "+C:He(C,/&\f/g,f[v])))&&(l[m++]=y);return ml(e,t,n,i===0?ld:a,l,c,u)}function gS(e,t,n){return ml(e,t,n,om,gl(aS()),Ao(e,2,-2),0)}function th(e,t,n,r){return ml(e,t,n,cd,Ao(e,0,r),Ao(e,r+1,-1),r)}function ui(e,t){for(var n="",r=ud(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function pS(e,t,n,r){switch(e.type){case tS:if(e.children.length)break;case eS:case cd:return e.return=e.return||e.value;case om:return"";case sm:return e.return=e.value+"{"+ui(e.children,r)+"}";case ld:e.value=e.props.join(",")}return pn(n=ui(e.children,r))?e.return=e.value+"{"+n+"}":""}function mS(e){var t=ud(e);return function(n,r,i,o){for(var s="",a=0;a<t;a++)s+=e[a](n,r,i,o)||"";return s}}function bS(e){return function(t){t.root||(t=t.return)&&e(t)}}function vS(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var xS=function(t,n,r){for(var i=0,o=0;i=o,o=yn(),i===38&&o===12&&(n[r]=1),!Ro(o);)zt();return Jo(t,Bt)},yS=function(t,n){var r=-1,i=44;do switch(Ro(i)){case 0:i===38&&yn()===12&&(n[r]=1),t[r]+=xS(Bt-1,n,r);break;case 2:t[r]+=Qs(i);break;case 4:if(i===44){t[++r]=yn()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=gl(i)}while(i=zt());return t},CS=function(t,n){return um(yS(cm(t),n))},nh=new WeakMap,wS=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&&!nh.get(r))&&!i){nh.set(t,!0);for(var o=[],s=CS(n,o),a=r.props,l=0,c=0;l<s.length;l++)for(var u=0;u<a.length;u++,c++)t.props[c]=o[l]?s[l].replace(/&\f/g,a[u]):a[u]+" "+s[l]}}},SS=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function dm(e,t){switch(iS(e,t)){case 5103:return ze+"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 ze+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return ze+e+Ia+e+_t+e+e;case 6828:case 4268:return ze+e+_t+e+e;case 6165:return ze+e+_t+"flex-"+e+e;case 5187:return ze+e+He(e,/(\w+).+(:[^]+)/,ze+"box-$1$2"+_t+"flex-$1$2")+e;case 5443:return ze+e+_t+"flex-item-"+He(e,/flex-|-self/,"")+e;case 4675:return ze+e+_t+"flex-line-pack"+He(e,/align-content|flex-|-self/,"")+e;case 5548:return ze+e+_t+He(e,"shrink","negative")+e;case 5292:return ze+e+_t+He(e,"basis","preferred-size")+e;case 6060:return ze+"box-"+He(e,"-grow","")+ze+e+_t+He(e,"grow","positive")+e;case 4554:return ze+He(e,/([^-])(transform)/g,"$1"+ze+"$2")+e;case 6187:return He(He(He(e,/(zoom-|grab)/,ze+"$1"),/(image-set)/,ze+"$1"),e,"")+e;case 5495:case 3959:return He(e,/(image-set\([^]*)/,ze+"$1$`$1");case 4968:return He(He(e,/(.+:)(flex-)?(.*)/,ze+"box-pack:$3"+_t+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ze+e+e;case 4095:case 3583:case 4068:case 2532:return He(e,/(.+)-inline(.+)/,ze+"$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(pn(e)-1-t>6)switch(Ct(e,t+1)){case 109:if(Ct(e,t+4)!==45)break;case 102:return He(e,/(.+:)(.+)-([^]+)/,"$1"+ze+"$2-$3$1"+Ia+(Ct(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Yc(e,"stretch")?dm(He(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ct(e,t+1)!==115)break;case 6444:switch(Ct(e,pn(e)-3-(~Yc(e,"!important")&&10))){case 107:return He(e,":",":"+ze)+e;case 101:return He(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ze+(Ct(e,14)===45?"inline-":"")+"box$3$1"+ze+"$2$3$1"+_t+"$2box$3")+e}break;case 5936:switch(Ct(e,t+11)){case 114:return ze+e+_t+He(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ze+e+_t+He(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ze+e+_t+He(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ze+e+_t+e+e}return e}var IS=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case cd:t.return=dm(t.value,t.length);break;case sm:return ui([Di(t,{value:He(t.value,"@","@"+ze)})],i);case ld:if(t.length)return sS(t.props,function(o){switch(oS(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return ui([Di(t,{props:[He(o,/:(read-\w+)/,":"+Ia+"$1")]})],i);case"::placeholder":return ui([Di(t,{props:[He(o,/:(plac\w+)/,":"+ze+"input-$1")]}),Di(t,{props:[He(o,/:(plac\w+)/,":"+Ia+"$1")]}),Di(t,{props:[He(o,/:(plac\w+)/,_t+"input-$1")]})],i)}return""})}},_S=[IS],ES=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||_S,o={},s,a=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(p){for(var m=p.getAttribute("data-emotion").split(" "),v=1;v<m.length;v++)o[m[v]]=!0;a.push(p)});var l,c=[wS,SS];{var u,d=[pS,bS(function(p){u.insert(p)})],f=mS(c.concat(i,d)),h=function(m){return ui(hS(m),f)};l=function(m,v,C,y){u=C,h(m?m+"{"+v.styles+"}":v.styles),y&&(g.inserted[v.name]=!0)}}var g={key:n,sheet:new qw({key:n,container:s,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:o,registered:{},insert:l};return g.sheet.hydrate(a),g},Jc={exports:{}},Xe={};/** @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 rh;function MS(){if(rh)return Xe;rh=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,o=e?Symbol.for("react.profiler"):60114,s=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,v=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function y(w){if(typeof w=="object"&&w!==null){var R=w.$$typeof;switch(R){case t:switch(w=w.type,w){case l:case c:case r:case o:case i:case d:return w;default:switch(w=w&&w.$$typeof,w){case a:case u:case g:case h:case s:return w;default:return R}}case n:return R}}}function I(w){return y(w)===c}return Xe.AsyncMode=l,Xe.ConcurrentMode=c,Xe.ContextConsumer=a,Xe.ContextProvider=s,Xe.Element=t,Xe.ForwardRef=u,Xe.Fragment=r,Xe.Lazy=g,Xe.Memo=h,Xe.Portal=n,Xe.Profiler=o,Xe.StrictMode=i,Xe.Suspense=d,Xe.isAsyncMode=function(w){return I(w)||y(w)===l},Xe.isConcurrentMode=I,Xe.isContextConsumer=function(w){return y(w)===a},Xe.isContextProvider=function(w){return y(w)===s},Xe.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===t},Xe.isForwardRef=function(w){return y(w)===u},Xe.isFragment=function(w){return y(w)===r},Xe.isLazy=function(w){return y(w)===g},Xe.isMemo=function(w){return y(w)===h},Xe.isPortal=function(w){return y(w)===n},Xe.isProfiler=function(w){return y(w)===o},Xe.isStrictMode=function(w){return y(w)===i},Xe.isSuspense=function(w){return y(w)===d},Xe.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===r||w===c||w===o||w===i||w===d||w===f||typeof w=="object"&&w!==null&&(w.$$typeof===g||w.$$typeof===h||w.$$typeof===s||w.$$typeof===a||w.$$typeof===u||w.$$typeof===m||w.$$typeof===v||w.$$typeof===C||w.$$typeof===p)},Xe.typeOf=y,Xe}var Ye={};/** @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 ih;function AS(){return ih||(ih=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,o=e?Symbol.for("react.profiler"):60114,s=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,v=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function y(H){return typeof H=="string"||typeof H=="function"||H===r||H===c||H===o||H===i||H===d||H===f||typeof H=="object"&&H!==null&&(H.$$typeof===g||H.$$typeof===h||H.$$typeof===s||H.$$typeof===a||H.$$typeof===u||H.$$typeof===m||H.$$typeof===v||H.$$typeof===C||H.$$typeof===p)}function I(H){if(typeof H=="object"&&H!==null){var Te=H.$$typeof;switch(Te){case t:var re=H.type;switch(re){case l:case c:case r:case o:case i:case d:return re;default:var ie=re&&re.$$typeof;switch(ie){case a:case u:case g:case h:case s:return ie;default:return Te}}case n:return Te}}}var w=l,R=c,A=a,S=s,_=t,E=u,P=r,T=g,$=h,D=n,k=o,O=i,N=d,M=!1;function F(H){return M||(M=!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.")),B(H)||I(H)===l}function B(H){return I(H)===c}function z(H){return I(H)===a}function G(H){return I(H)===s}function V(H){return typeof H=="object"&&H!==null&&H.$$typeof===t}function J(H){return I(H)===u}function le(H){return I(H)===r}function he(H){return I(H)===g}function Ne(H){return I(H)===h}function fe(H){return I(H)===n}function ge(H){return I(H)===o}function we(H){return I(H)===i}function ce(H){return I(H)===d}Ye.AsyncMode=w,Ye.ConcurrentMode=R,Ye.ContextConsumer=A,Ye.ContextProvider=S,Ye.Element=_,Ye.ForwardRef=E,Ye.Fragment=P,Ye.Lazy=T,Ye.Memo=$,Ye.Portal=D,Ye.Profiler=k,Ye.StrictMode=O,Ye.Suspense=N,Ye.isAsyncMode=F,Ye.isConcurrentMode=B,Ye.isContextConsumer=z,Ye.isContextProvider=G,Ye.isElement=V,Ye.isForwardRef=J,Ye.isFragment=le,Ye.isLazy=he,Ye.isMemo=Ne,Ye.isPortal=fe,Ye.isProfiler=ge,Ye.isStrictMode=we,Ye.isSuspense=ce,Ye.isValidElementType=y,Ye.typeOf=I}()),Ye}process.env.NODE_ENV==="production"?Jc.exports=MS():Jc.exports=AS();var RS=Jc.exports,fm=RS,kS={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},PS={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},hm={};hm[fm.ForwardRef]=kS;hm[fm.Memo]=PS;var FS=!0;function OS(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):i&&(r+=i+" ")}),r}var gm=function(t,n,r){var i=t.key+"-"+n.name;(r===!1||FS===!1)&&t.registered[i]===void 0&&(t.registered[i]=n.styles)},NS=function(t,n,r){gm(t,n,r);var i=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var o=n;do t.insert(n===o?"."+i:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function TS(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 DS={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},LS=/[A-Z]|^ms/g,jS=/_EMO_([^_]+?)_([^]*?)_EMO_/g,pm=function(t){return t.charCodeAt(1)===45},oh=function(t){return t!=null&&typeof t!="boolean"},Yl=vS(function(e){return pm(e)?e:e.replace(LS,"-$&").toLowerCase()}),sh=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(jS,function(r,i,o){return mn={name:i,styles:o,next:mn},i})}return DS[t]!==1&&!pm(t)&&typeof n=="number"&&n!==0?n+"px":n};function ko(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 mn={name:i.name,styles:i.styles,next:mn},i.name;var o=n;if(o.styles!==void 0){var s=o.next;if(s!==void 0)for(;s!==void 0;)mn={name:s.name,styles:s.styles,next:mn},s=s.next;var a=o.styles+";";return a}return BS(e,t,n)}case"function":{if(e!==void 0){var l=mn,c=n(e);return mn=l,ko(e,t,c)}break}}var u=n;return u}function BS(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=ko(e,t,n[i])+";";else for(var o in n){var s=n[o];if(typeof s!="object"){var a=s;oh(a)&&(r+=Yl(o)+":"+sh(o,a)+";")}else if(Array.isArray(s)&&typeof s[0]=="string"&&t==null)for(var l=0;l<s.length;l++)oh(s[l])&&(r+=Yl(o)+":"+sh(o,s[l])+";");else{var c=ko(e,t,s);switch(o){case"animation":case"animationName":{r+=Yl(o)+":"+c+";";break}default:r+=o+"{"+c+"}"}}}return r}var ah=/label:\s*([^\s;{]+)\s*(;|$)/g,mn;function mm(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="";mn=void 0;var o=e[0];if(o==null||o.raw===void 0)r=!1,i+=ko(n,t,o);else{var s=o;i+=s[0]}for(var a=1;a<e.length;a++)if(i+=ko(n,t,e[a]),r){var l=o;i+=l[a]}ah.lastIndex=0;for(var c="",u;(u=ah.exec(i))!==null;)c+="-"+u[1];var d=TS(i)+c;return{name:d,styles:i,next:mn}}var $S=function(t){return t()},VS=W.useInsertionEffect?W.useInsertionEffect:!1,GS=VS||$S,bm=W.createContext(typeof HTMLElement<"u"?ES({key:"css"}):null);bm.Provider;var zS=function(t){return x.forwardRef(function(n,r){var i=x.useContext(bm);return t(n,i,r)})},HS=W.createContext({}),dd={}.hasOwnProperty,Uc="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",WS=function(t,n){var r={};for(var i in n)dd.call(n,i)&&(r[i]=n[i]);return r[Uc]=t,r},XS=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return gm(n,r,i),GS(function(){return NS(n,r,i)}),null},YS=zS(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var i=e[Uc],o=[r],s="";typeof e.className=="string"?s=OS(t.registered,o,e.className):e.className!=null&&(s=e.className+" ");var a=mm(o,void 0,W.useContext(HS));s+=t.key+"-"+a.name;var l={};for(var c in e)dd.call(e,c)&&c!=="css"&&c!==Uc&&(l[c]=e[c]);return l.className=s,n&&(l.ref=n),W.createElement(W.Fragment,null,W.createElement(XS,{cache:t,serialized:a,isStringTag:typeof i=="string"}),W.createElement(i,l))}),ZS=YS,be=function(t,n){var r=arguments;if(n==null||!dd.call(n,"css"))return W.createElement.apply(void 0,r);var i=r.length,o=new Array(i);o[0]=ZS,o[1]=WS(t,n);for(var s=2;s<i;s++)o[s]=r[s];return W.createElement.apply(null,o)};(function(e){var t;t||(t=e.JSX||(e.JSX={}))})(be||(be={}));function fd(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return mm(t)}function JS(){var e=fd.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 US(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Qc=x.useLayoutEffect,QS=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],_a=function(){};function KS(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function qS(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 o=[].concat(r);if(t&&e)for(var s in t)t.hasOwnProperty(s)&&t[s]&&o.push("".concat(KS(e,s)));return o.filter(function(a){return a}).map(function(a){return String(a).trim()}).join(" ")}var Ea=function(t){return l4(t)?t.filter(Boolean):Gr(t)==="object"&&t!==null?[t]:[]},vm=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=Rn(t,QS);return ve({},n)},ut=function(t,n,r){var i=t.cx,o=t.getStyles,s=t.getClassNames,a=t.className;return{css:o(n,t),className:i(r??{},s(n,t),a)}};function bl(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function e4(e){return bl(e)?window.innerHeight:e.clientHeight}function xm(e){return bl(e)?window.pageYOffset:e.scrollTop}function Ma(e,t){if(bl(e)){window.scrollTo(0,t);return}e.scrollTop=t}function t4(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 n4(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function gs(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:_a,i=xm(e),o=t-i,s=10,a=0;function l(){a+=s;var c=n4(a,i,o,n);Ma(e,c),a<n?window.requestAnimationFrame(l):r(e)}l()}function lh(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=t.offsetHeight/3;r.bottom+i>n.bottom?Ma(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+i,e.scrollHeight)):r.top-i<n.top&&Ma(e,Math.max(t.offsetTop-i,0))}function r4(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 ch(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function i4(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var ym=!1,o4={get passive(){return ym=!0}},ps=typeof window<"u"?window:{};ps.addEventListener&&ps.removeEventListener&&(ps.addEventListener("p",_a,o4),ps.removeEventListener("p",_a,!1));var s4=ym;function a4(e){return e!=null}function l4(e){return Array.isArray(e)}function Zi(e,t,n){return e?t:n}var c4=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 o=Object.entries(t).filter(function(s){var a=Wn(s,1),l=a[0];return!r.includes(l)});return o.reduce(function(s,a){var l=Wn(a,2),c=l[0],u=l[1];return s[c]=u,s},{})},u4=["children","innerProps"],d4=["children","innerProps"];function f4(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,i=e.placement,o=e.shouldScroll,s=e.isFixedPosition,a=e.controlHeight,l=t4(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(),v=m.top,C=s?window.innerHeight:e4(l),y=xm(l),I=parseInt(getComputedStyle(n).marginBottom,10),w=parseInt(getComputedStyle(n).marginTop,10),R=v-w,A=C-p,S=R+y,_=d-y-p,E=h-C+y+I,P=y+p-w,T=160;switch(i){case"auto":case"bottom":if(A>=g)return{placement:"bottom",maxHeight:t};if(_>=g&&!s)return o&&gs(l,E,T),{placement:"bottom",maxHeight:t};if(!s&&_>=r||s&&A>=r){o&&gs(l,E,T);var $=s?A-I:_-I;return{placement:"bottom",maxHeight:$}}if(i==="auto"||s){var D=t,k=s?R:S;return k>=r&&(D=Math.min(k-I-a,t)),{placement:"top",maxHeight:D}}if(i==="bottom")return o&&Ma(l,E),{placement:"bottom",maxHeight:t};break;case"top":if(R>=g)return{placement:"top",maxHeight:t};if(S>=g&&!s)return o&&gs(l,P,T),{placement:"top",maxHeight:t};if(!s&&S>=r||s&&R>=r){var O=t;return(!s&&S>=r||s&&R>=r)&&(O=s?R-w:S-w),o&&gs(l,P,T),{placement:"top",maxHeight:O}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(i,'".'))}return c}function h4(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var Cm=function(t){return t==="auto"?"bottom":t},g4=function(t,n){var r,i=t.placement,o=t.theme,s=o.borderRadius,a=o.spacing,l=o.colors;return ve((r={label:"menu"},Yi(r,h4(i),"100%"),Yi(r,"position","absolute"),Yi(r,"width","100%"),Yi(r,"zIndex",1),r),n?{}:{backgroundColor:l.neutral0,borderRadius:s,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})},wm=x.createContext(null),p4=function(t){var n=t.children,r=t.minMenuHeight,i=t.maxMenuHeight,o=t.menuPlacement,s=t.menuPosition,a=t.menuShouldScrollIntoView,l=t.theme,c=x.useContext(wm)||{},u=c.setPortalPlacement,d=x.useRef(null),f=x.useState(i),h=Wn(f,2),g=h[0],p=h[1],m=x.useState(null),v=Wn(m,2),C=v[0],y=v[1],I=l.spacing.controlHeight;return Qc(function(){var w=d.current;if(w){var R=s==="fixed",A=a&&!R,S=f4({maxHeight:i,menuEl:w,minHeight:r,placement:o,shouldScroll:A,isFixedPosition:R,controlHeight:I});p(S.maxHeight),y(S.placement),u==null||u(S.placement)}},[i,o,s,a,r,u,I]),n({ref:d,placerProps:ve(ve({},t),{},{placement:C||Cm(o),maxHeight:g})})},m4=function(t){var n=t.children,r=t.innerRef,i=t.innerProps;return be("div",Ce({},ut(t,"menu",{menu:!0}),{ref:r},i),n)},b4=m4,v4=function(t,n){var r=t.maxHeight,i=t.theme.spacing.baseUnit;return ve({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:i,paddingTop:i})},x4=function(t){var n=t.children,r=t.innerProps,i=t.innerRef,o=t.isMulti;return be("div",Ce({},ut(t,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:i},r),n)},Sm=function(t,n){var r=t.theme,i=r.spacing.baseUnit,o=r.colors;return ve({textAlign:"center"},n?{}:{color:o.neutral40,padding:"".concat(i*2,"px ").concat(i*3,"px")})},y4=Sm,C4=Sm,w4=function(t){var n=t.children,r=n===void 0?"No options":n,i=t.innerProps,o=Rn(t,u4);return be("div",Ce({},ut(ve(ve({},o),{},{children:r,innerProps:i}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),i),r)},S4=function(t){var n=t.children,r=n===void 0?"Loading...":n,i=t.innerProps,o=Rn(t,d4);return be("div",Ce({},ut(ve(ve({},o),{},{children:r,innerProps:i}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),i),r)},I4=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}},_4=function(t){var n=t.appendTo,r=t.children,i=t.controlElement,o=t.innerProps,s=t.menuPlacement,a=t.menuPosition,l=x.useRef(null),c=x.useRef(null),u=x.useState(Cm(s)),d=Wn(u,2),f=d[0],h=d[1],g=x.useMemo(function(){return{setPortalPlacement:h}},[]),p=x.useState(null),m=Wn(p,2),v=m[0],C=m[1],y=x.useCallback(function(){if(i){var A=r4(i),S=a==="fixed"?0:window.pageYOffset,_=A[f]+S;(_!==(v==null?void 0:v.offset)||A.left!==(v==null?void 0:v.rect.left)||A.width!==(v==null?void 0:v.rect.width))&&C({offset:_,rect:A})}},[i,a,f,v==null?void 0:v.offset,v==null?void 0:v.rect.left,v==null?void 0:v.rect.width]);Qc(function(){y()},[y]);var I=x.useCallback(function(){typeof c.current=="function"&&(c.current(),c.current=null),i&&l.current&&(c.current=$0(i,l.current,y,{elementResize:"ResizeObserver"in window}))},[i,y]);Qc(function(){I()},[I]);var w=x.useCallback(function(A){l.current=A,I()},[I]);if(!n&&a!=="fixed"||!v)return null;var R=be("div",Ce({ref:w},ut(ve(ve({},t),{},{offset:v.offset,position:a,rect:v.rect}),"menuPortal",{"menu-portal":!0}),o),r);return be(wm.Provider,{value:g},n?In.createPortal(R,n):R)},E4=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},M4=function(t){var n=t.children,r=t.innerProps,i=t.isDisabled,o=t.isRtl;return be("div",Ce({},ut(t,"container",{"--is-disabled":i,"--is-rtl":o}),r),n)},A4=function(t,n){var r=t.theme.spacing,i=t.isMulti,o=t.hasValue,s=t.selectProps.controlShouldRenderValue;return ve({alignItems:"center",display:i&&o&&s?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},n?{}:{padding:"".concat(r.baseUnit/2,"px ").concat(r.baseUnit*2,"px")})},R4=function(t){var n=t.children,r=t.innerProps,i=t.isMulti,o=t.hasValue;return be("div",Ce({},ut(t,"valueContainer",{"value-container":!0,"value-container--is-multi":i,"value-container--has-value":o}),r),n)},k4=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},P4=function(t){var n=t.children,r=t.innerProps;return be("div",Ce({},ut(t,"indicatorsContainer",{indicators:!0}),r),n)},uh,F4=["size"],O4=["innerProps","isRtl","size"];function N4(){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 T4=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:N4},Im=function(t){var n=t.size,r=Rn(t,F4);return be("svg",Ce({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:T4},r))},hd=function(t){return be(Im,Ce({size:20},t),be("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"}))},_m=function(t){return be(Im,Ce({size:20},t),be("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"}))},Em=function(t,n){var r=t.isFocused,i=t.theme,o=i.spacing.baseUnit,s=i.colors;return ve({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:r?s.neutral60:s.neutral20,padding:o*2,":hover":{color:r?s.neutral80:s.neutral40}})},D4=Em,L4=function(t){var n=t.children,r=t.innerProps;return be("div",Ce({},ut(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||be(_m,null))},j4=Em,B4=function(t){var n=t.children,r=t.innerProps;return be("div",Ce({},ut(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||be(hd,null))},$4=function(t,n){var r=t.isDisabled,i=t.theme,o=i.spacing.baseUnit,s=i.colors;return ve({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:r?s.neutral10:s.neutral20,marginBottom:o*2,marginTop:o*2})},V4=function(t){var n=t.innerProps;return be("span",Ce({},n,ut(t,"indicatorSeparator",{"indicator-separator":!0})))},G4=JS(uh||(uh=US([`
38
- 0%, 80%, 100% { opacity: 0; }
39
- 40% { opacity: 1; }
40
- `]))),z4=function(t,n){var r=t.isFocused,i=t.size,o=t.theme,s=o.colors,a=o.spacing.baseUnit;return ve({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:i,lineHeight:1,marginRight:i,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?s.neutral60:s.neutral20,padding:a*2})},Zl=function(t){var n=t.delay,r=t.offset;return be("span",{css:fd({animation:"".concat(G4," 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= */")})},H4=function(t){var n=t.innerProps,r=t.isRtl,i=t.size,o=i===void 0?4:i,s=Rn(t,O4);return be("div",Ce({},ut(ve(ve({},s),{},{innerProps:n,isRtl:r,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),be(Zl,{delay:0,offset:r}),be(Zl,{delay:160,offset:!0}),be(Zl,{delay:320,offset:!r}))},W4=function(t,n){var r=t.isDisabled,i=t.isFocused,o=t.theme,s=o.colors,a=o.borderRadius,l=o.spacing;return ve({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?s.neutral5:s.neutral0,borderColor:r?s.neutral10:i?s.primary:s.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:i?"0 0 0 1px ".concat(s.primary):void 0,"&:hover":{borderColor:i?s.primary:s.neutral30}})},X4=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,o=t.innerRef,s=t.innerProps,a=t.menuIsOpen;return be("div",Ce({ref:o},ut(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":i,"control--menu-is-open":a}),s,{"aria-disabled":r||void 0}),n)},Y4=X4,Z4=["data"],J4=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},U4=function(t){var n=t.children,r=t.cx,i=t.getStyles,o=t.getClassNames,s=t.Heading,a=t.headingProps,l=t.innerProps,c=t.label,u=t.theme,d=t.selectProps;return be("div",Ce({},ut(t,"group",{group:!0}),l),be(s,Ce({},a,{selectProps:d,theme:u,getStyles:i,getClassNames:o,cx:r}),c),be("div",null,n))},Q4=function(t,n){var r=t.theme,i=r.colors,o=r.spacing;return ve({label:"group",cursor:"default",display:"block"},n?{}:{color:i.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:o.baseUnit*3,paddingRight:o.baseUnit*3,textTransform:"uppercase"})},K4=function(t){var n=vm(t);n.data;var r=Rn(n,Z4);return be("div",Ce({},ut(t,"groupHeading",{"group-heading":!0}),r))},q4=U4,eI=["innerRef","isDisabled","isHidden","inputClassName"],tI=function(t,n){var r=t.isDisabled,i=t.value,o=t.theme,s=o.spacing,a=o.colors;return ve(ve({visibility:r?"hidden":"visible",transform:i?"translateZ(0)":""},nI),n?{}:{margin:s.baseUnit/2,paddingBottom:s.baseUnit/2,paddingTop:s.baseUnit/2,color:a.neutral80})},Mm={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},nI={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":ve({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},Mm)},rI=function(t){return ve({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},Mm)},iI=function(t){var n=t.cx,r=t.value,i=vm(t),o=i.innerRef,s=i.isDisabled,a=i.isHidden,l=i.inputClassName,c=Rn(i,eI);return be("div",Ce({},ut(t,"input",{"input-container":!0}),{"data-value":r||""}),be("input",Ce({className:n({input:!0},l),ref:o,style:rI(a),disabled:s},c)))},oI=iI,sI=function(t,n){var r=t.theme,i=r.spacing,o=r.borderRadius,s=r.colors;return ve({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:s.neutral10,borderRadius:o/2,margin:i.baseUnit/2})},aI=function(t,n){var r=t.theme,i=r.borderRadius,o=r.colors,s=t.cropWithEllipsis;return ve({overflow:"hidden",textOverflow:s||s===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:i/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},lI=function(t,n){var r=t.theme,i=r.spacing,o=r.borderRadius,s=r.colors,a=t.isFocused;return ve({alignItems:"center",display:"flex"},n?{}:{borderRadius:o/2,backgroundColor:a?s.dangerLight:void 0,paddingLeft:i.baseUnit,paddingRight:i.baseUnit,":hover":{backgroundColor:s.dangerLight,color:s.danger}})},Am=function(t){var n=t.children,r=t.innerProps;return be("div",r,n)},cI=Am,uI=Am;function dI(e){var t=e.children,n=e.innerProps;return be("div",Ce({role:"button"},n),t||be(hd,{size:14}))}var fI=function(t){var n=t.children,r=t.components,i=t.data,o=t.innerProps,s=t.isDisabled,a=t.removeProps,l=t.selectProps,c=r.Container,u=r.Label,d=r.Remove;return be(c,{data:i,innerProps:ve(ve({},ut(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":s})),o),selectProps:l},be(u,{data:i,innerProps:ve({},ut(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},n),be(d,{data:i,innerProps:ve(ve({},ut(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},a),selectProps:l}))},hI=fI,gI=function(t,n){var r=t.isDisabled,i=t.isFocused,o=t.isSelected,s=t.theme,a=s.spacing,l=s.colors;return ve({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:o?l.primary:i?l.primary25:"transparent",color:r?l.neutral20:o?l.neutral0:"inherit",padding:"".concat(a.baseUnit*2,"px ").concat(a.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:o?l.primary:l.primary50}})},pI=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,o=t.isSelected,s=t.innerRef,a=t.innerProps;return be("div",Ce({},ut(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":i,"option--is-selected":o}),{ref:s,"aria-disabled":r},a),n)},mI=pI,bI=function(t,n){var r=t.theme,i=r.spacing,o=r.colors;return ve({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:o.neutral50,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2})},vI=function(t){var n=t.children,r=t.innerProps;return be("div",Ce({},ut(t,"placeholder",{placeholder:!0}),r),n)},xI=vI,yI=function(t,n){var r=t.isDisabled,i=t.theme,o=i.spacing,s=i.colors;return ve({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:r?s.neutral40:s.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},CI=function(t){var n=t.children,r=t.isDisabled,i=t.innerProps;return be("div",Ce({},ut(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),i),n)},wI=CI,sn={ClearIndicator:B4,Control:Y4,DropdownIndicator:L4,DownChevron:_m,CrossIcon:hd,Group:q4,GroupHeading:K4,IndicatorsContainer:P4,IndicatorSeparator:V4,Input:oI,LoadingIndicator:H4,Menu:b4,MenuList:x4,MenuPortal:_4,LoadingMessage:S4,NoOptionsMessage:w4,MultiValue:hI,MultiValueContainer:cI,MultiValueLabel:uI,MultiValueRemove:dI,Option:mI,Placeholder:xI,SelectContainer:M4,SingleValue:wI,ValueContainer:R4},SI=function(t){return ve(ve({},sn),t.components)},dh=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function II(e,t){return!!(e===t||dh(e)&&dh(t))}function _I(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!II(e[n],t[n]))return!1;return!0}function EI(e,t){t===void 0&&(t=_I);var n=null;function r(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];if(n&&n.lastThis===this&&t(i,n.lastArgs))return n.lastResult;var s=e.apply(this,i);return n={lastResult:s,lastArgs:i,lastThis:this},s}return r.clear=function(){n=null},r}function MI(){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 AI=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:MI},RI=function(t){return be("span",Ce({css:AI},t))},fh=RI,kI={guidance:function(t){var n=t.isSearchable,r=t.isMulti,i=t.tabSelectsValue,o=t.context,s=t.isInitialFocus;switch(o){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 s?"".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,o=t.labels,s=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(o.length>1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return s?"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,o=t.label,s=o===void 0?"":o,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(s," focused, ").concat(d(a,r),".");if(n==="menu"&&u){var f=l?" disabled":"",h="".concat(c?" selected":"").concat(f);return"".concat(s).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:"",".")}},PI=function(t){var n=t.ariaSelection,r=t.focusedOption,i=t.focusedValue,o=t.focusableOptions,s=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,v=l.menuIsOpen,C=l.options,y=l.screenReaderStatus,I=l.tabSelectsValue,w=l.isLoading,R=l["aria-label"],A=l["aria-live"],S=x.useMemo(function(){return ve(ve({},kI),d||{})},[d]),_=x.useMemo(function(){var k="";if(n&&S.onChange){var O=n.option,N=n.options,M=n.removedValue,F=n.removedValues,B=n.value,z=function(fe){return Array.isArray(fe)?null:fe},G=M||O||z(B),V=G?f(G):"",J=N||F||void 0,le=J?J.map(f):[],he=ve({isDisabled:G&&p(G,a),label:V,labels:le},n);k=S.onChange(he)}return k},[n,S,p,a,f]),E=x.useMemo(function(){var k="",O=r||i,N=!!(r&&a&&a.includes(r));if(O&&S.onFocus){var M={focused:O,label:f(O),isDisabled:p(O,a),isSelected:N,options:o,context:O===r?"menu":"value",selectValue:a,isAppleDevice:u};k=S.onFocus(M)}return k},[r,i,f,p,S,o,a,u]),P=x.useMemo(function(){var k="";if(v&&C.length&&!w&&S.onFilter){var O=y({count:o.length});k=S.onFilter({inputValue:h,resultsMessage:O})}return k},[o,h,v,S,C,y,w]),T=(n==null?void 0:n.action)==="initial-input-focus",$=x.useMemo(function(){var k="";if(S.guidance){var O=i?"value":v?"menu":"input";k=S.guidance({"aria-label":R,context:O,isDisabled:r&&p(r,a),isMulti:g,isSearchable:m,tabSelectsValue:I,isInitialFocus:T})}return k},[R,r,i,g,p,m,v,S,a,I,T]),D=be(x.Fragment,null,be("span",{id:"aria-selection"},_),be("span",{id:"aria-focused"},E),be("span",{id:"aria-results"},P),be("span",{id:"aria-guidance"},$));return be(x.Fragment,null,be(fh,{id:c},T&&D),be(fh,{"aria-live":A,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},s&&!T&&D))},FI=PI,Kc=[{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źẑżžẓẕƶȥɀⱬꝣ"}],OI=new RegExp("["+Kc.map(function(e){return e.letters}).join("")+"]","g"),Rm={};for(var Jl=0;Jl<Kc.length;Jl++)for(var Ul=Kc[Jl],Ql=0;Ql<Ul.letters.length;Ql++)Rm[Ul.letters[Ql]]=Ul.base;var km=function(t){return t.replace(OI,function(n){return Rm[n]})},NI=EI(km),hh=function(t){return t.replace(/^\s+|\s+$/g,"")},TI=function(t){return"".concat(t.label," ").concat(t.value)},DI=function(t){return function(n,r){if(n.data.__isNew__)return!0;var i=ve({ignoreCase:!0,ignoreAccents:!0,stringify:TI,trim:!0,matchFrom:"any"},t),o=i.ignoreCase,s=i.ignoreAccents,a=i.stringify,l=i.trim,c=i.matchFrom,u=l?hh(r):r,d=l?hh(a(n)):a(n);return o&&(u=u.toLowerCase(),d=d.toLowerCase()),s&&(u=NI(u),d=km(d)),c==="start"?d.substr(0,u.length)===u:d.indexOf(u)>-1}},LI=["innerRef"];function jI(e){var t=e.innerRef,n=Rn(e,LI),r=c4(n,"onExited","in","enter","exit","appear");return be("input",Ce({ref:t},r,{css:fd({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 BI=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function $I(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,i=e.onTopArrive,o=e.onTopLeave,s=x.useRef(!1),a=x.useRef(!1),l=x.useRef(0),c=x.useRef(null),u=x.useCallback(function(m,v){if(c.current!==null){var C=c.current,y=C.scrollTop,I=C.scrollHeight,w=C.clientHeight,R=c.current,A=v>0,S=I-w-y,_=!1;S>v&&s.current&&(r&&r(m),s.current=!1),A&&a.current&&(o&&o(m),a.current=!1),A&&v>S?(n&&!s.current&&n(m),R.scrollTop=I,_=!0,s.current=!0):!A&&-v>y&&(i&&!a.current&&i(m),R.scrollTop=0,_=!0,a.current=!0),_&&BI(m)}},[n,r,i,o]),d=x.useCallback(function(m){u(m,m.deltaY)},[u]),f=x.useCallback(function(m){l.current=m.changedTouches[0].clientY},[]),h=x.useCallback(function(m){var v=l.current-m.changedTouches[0].clientY;u(m,v)},[u]),g=x.useCallback(function(m){if(m){var v=s4?{passive:!1}:!1;m.addEventListener("wheel",d,v),m.addEventListener("touchstart",f,v),m.addEventListener("touchmove",h,v)}},[h,f,d]),p=x.useCallback(function(m){m&&(m.removeEventListener("wheel",d,!1),m.removeEventListener("touchstart",f,!1),m.removeEventListener("touchmove",h,!1))},[h,f,d]);return x.useEffect(function(){if(t){var m=c.current;return g(m),function(){p(m)}}},[t,g,p]),function(m){c.current=m}}var gh=["boxSizing","height","overflow","paddingRight","position"],ph={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function mh(e){e.cancelable&&e.preventDefault()}function bh(e){e.stopPropagation()}function vh(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function xh(){return"ontouchstart"in window||navigator.maxTouchPoints}var yh=!!(typeof window<"u"&&window.document&&window.document.createElement),Li=0,ei={capture:!1,passive:!1};function VI(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,i=x.useRef({}),o=x.useRef(null),s=x.useCallback(function(l){if(yh){var c=document.body,u=c&&c.style;if(r&&gh.forEach(function(g){var p=u&&u[g];i.current[g]=p}),r&&Li<1){var d=parseInt(i.current.paddingRight,10)||0,f=document.body?document.body.clientWidth:0,h=window.innerWidth-f+d||0;Object.keys(ph).forEach(function(g){var p=ph[g];u&&(u[g]=p)}),u&&(u.paddingRight="".concat(h,"px"))}c&&xh()&&(c.addEventListener("touchmove",mh,ei),l&&(l.addEventListener("touchstart",vh,ei),l.addEventListener("touchmove",bh,ei))),Li+=1}},[r]),a=x.useCallback(function(l){if(yh){var c=document.body,u=c&&c.style;Li=Math.max(Li-1,0),r&&Li<1&&gh.forEach(function(d){var f=i.current[d];u&&(u[d]=f)}),c&&xh()&&(c.removeEventListener("touchmove",mh,ei),l&&(l.removeEventListener("touchstart",vh,ei),l.removeEventListener("touchmove",bh,ei)))}},[r]);return x.useEffect(function(){if(t){var l=o.current;return s(l),function(){a(l)}}},[t,s,a]),function(l){o.current=l}}function GI(){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 zI=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},HI=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:GI};function WI(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,i=r===void 0?!0:r,o=e.onBottomArrive,s=e.onBottomLeave,a=e.onTopArrive,l=e.onTopLeave,c=$I({isEnabled:i,onBottomArrive:o,onBottomLeave:s,onTopArrive:a,onTopLeave:l}),u=VI({isEnabled:n}),d=function(h){c(h),u(h)};return be(x.Fragment,null,n&&be("div",{onClick:zI,css:HI}),t(d))}function XI(){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 YI=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:XI},ZI=function(t){var n=t.name,r=t.onFocus;return be("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:YI,value:"",onChange:function(){}})},JI=ZI;function gd(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 UI(){return gd(/^iPhone/i)}function Pm(){return gd(/^Mac/i)}function QI(){return gd(/^iPad/i)||Pm()&&navigator.maxTouchPoints>1}function KI(){return UI()||QI()}function qI(){return Pm()||KI()}var e5=function(t){return t.label},Fm=function(t){return t.label},Om=function(t){return t.value},t5=function(t){return!!t.isDisabled},n5={clearIndicator:j4,container:E4,control:W4,dropdownIndicator:D4,group:J4,groupHeading:Q4,indicatorsContainer:k4,indicatorSeparator:$4,input:tI,loadingIndicator:z4,loadingMessage:C4,menu:g4,menuList:v4,menuPortal:I4,multiValue:sI,multiValueLabel:aI,multiValueRemove:lI,noOptionsMessage:y4,option:gI,placeholder:bI,singleValue:yI,valueContainer:A4},r5={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%)"},i5=4,Nm=4,o5=38,s5=Nm*2,a5={baseUnit:Nm,controlHeight:o5,menuGutter:s5},Kl={borderRadius:i5,colors:r5,spacing:a5},l5={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:ch(),captureMenuScroll:!ch(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:DI(),formatGroupLabel:e5,getOptionLabel:Fm,getOptionValue:Om,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:t5,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!i4(),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 Ch(e,t,n,r){var i=Lm(e,t,n),o=jm(e,t,n),s=Dm(e,t),a=Aa(e,t);return{type:"option",data:t,isDisabled:i,isSelected:o,label:s,value:a,index:r}}function qs(e,t){return e.options.map(function(n,r){if("options"in n){var i=n.options.map(function(s,a){return Ch(e,s,t,a)}).filter(function(s){return Sh(e,s)});return i.length>0?{type:"group",data:n,options:i,index:r}:void 0}var o=Ch(e,n,t,r);return Sh(e,o)?o:void 0}).filter(a4)}function Tm(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,ci(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function wh(e,t){return e.reduce(function(n,r){return r.type==="group"?n.push.apply(n,ci(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 c5(e,t){return Tm(qs(e,t))}function Sh(e,t){var n=e.inputValue,r=n===void 0?"":n,i=t.data,o=t.isSelected,s=t.label,a=t.value;return(!$m(e)||!o)&&Bm(e,{label:s,value:a,data:i},r)}function u5(e,t){var n=e.focusedValue,r=e.selectValue,i=r.indexOf(n);if(i>-1){var o=t.indexOf(n);if(o>-1)return n;if(i<t.length)return t[i]}return null}function d5(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var ql=function(t,n){var r,i=(r=t.find(function(o){return o.data===n}))===null||r===void 0?void 0:r.id;return i||null},Dm=function(t,n){return t.getOptionLabel(n)},Aa=function(t,n){return t.getOptionValue(n)};function Lm(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function jm(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=Aa(e,t);return n.some(function(i){return Aa(e,i)===r})}function Bm(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var $m=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},f5=1,pd=function(e){Hw(n,e);var t=Yw(n);function n(r){var i;if(Gw(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(v){return i.getOptionValue(v)!==m}),"deselect-option",l)}else if(!p)d?i.setValue([].concat(ci(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=Zi(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(Zi(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=Zi(l,d,d[0]||null);u&&i.onChange(f,{action:"pop-value",removedValue:u})},i.getFocusedOptionId=function(l){return ql(i.state.focusableOptionsWithIds,l)},i.getFocusableOptionsWithIds=function(){return wh(qs(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 qS.apply(void 0,[i.props.classNamePrefix].concat(c))},i.getOptionLabel=function(l){return Dm(i.props,l)},i.getOptionValue=function(l){return Aa(i.props,l)},i.getStyles=function(l,c){var u=i.props.unstyled,d=n5[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 SI(i.props)},i.buildCategorizedOptions=function(){return qs(i.props,i.state.selectValue)},i.getCategorizedOptions=function(){return i.props.menuIsOpen?i.buildCategorizedOptions():[]},i.buildFocusableOptions=function(){return Tm(i.buildCategorizedOptions())},i.getFocusableOptions=function(){return i.props.menuIsOpen?i.buildFocusableOptions():[]},i.ariaOnChange=function(l,c){i.setState({ariaSelection:ve({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&&bl(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 $m(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,v=c.onKeyDown,C=c.tabSelectsValue,y=c.openMenuOnFocus,I=i.state,w=I.focusedOption,R=I.focusedValue,A=I.selectValue;if(!p&&!(typeof v=="function"&&(v(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(R)i.removeValue(R);else{if(!d)return;u?i.popValue():g&&i.clearValue()}break;case"Tab":if(i.isComposing||l.shiftKey||!m||!C||!w||y&&i.isOptionSelected(w,A))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||++f5),i.state.selectValue=Ea(r.value),r.menuIsOpen&&i.state.selectValue.length){var o=i.getFocusableOptionsWithIds(),s=i.buildFocusableOptions(),a=s.indexOf(i.state.selectValue[0]);i.state.focusableOptionsWithIds=o,i.state.focusedOption=s[a],i.state.focusedOptionId=ql(o,s[a])}return i}return zw(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&&lh(this.menuListRef,this.focusedOptionRef),qI()&&this.setState({isAppleDevice:!0})}},{key:"componentDidUpdate",value:function(i){var o=this.props,s=o.isDisabled,a=o.menuIsOpen,l=this.state.isFocused;(l&&!s&&i.isDisabled||l&&a&&!i.menuIsOpen)&&this.focusInput(),l&&s&&!i.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!l&&!s&&i.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(lh(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,o){this.props.onInputChange(i,o)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(i){var o=this,s=this.state,a=s.selectValue,l=s.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 o.onMenuOpen()})}},{key:"focusValue",value:function(i){var o=this.state,s=o.selectValue,a=o.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var l=s.indexOf(a);a||(l=-1);var c=s.length-1,u=-1;if(s.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:s[u]})}}}},{key:"focusOption",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",o=this.props.pageSize,s=this.state.focusedOption,a=this.getFocusableOptions();if(a.length){var l=0,c=a.indexOf(s);s||(c=-1),i==="up"?l=c>0?c-1:a.length-1:i==="down"?l=(c+1)%a.length:i==="pageup"?(l=c-o,l<0&&(l=0)):i==="pagedown"?(l=c+o,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(Kl):ve(ve({},Kl),this.props.theme):Kl}},{key:"getCommonProps",value:function(){var i=this.clearValue,o=this.cx,s=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:o,getStyles:s,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,o=i.isClearable,s=i.isMulti;return o===void 0?s:o}},{key:"isOptionDisabled",value:function(i,o){return Lm(this.props,i,o)}},{key:"isOptionSelected",value:function(i,o){return jm(this.props,i,o)}},{key:"filterOption",value:function(i,o){return Bm(this.props,i,o)}},{key:"formatOptionLabel",value:function(i,o){if(typeof this.props.formatOptionLabel=="function"){var s=this.props.inputValue,a=this.state.selectValue;return this.props.formatOptionLabel(i,{context:o,inputValue:s,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,o=i.isDisabled,s=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,v=p.ariaSelection,C=this.commonProps,y=a||this.getElementId("input"),I=ve(ve(ve({"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")}),!s&&{"aria-readonly":!0}),this.hasValue()?(v==null?void 0:v.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return s?W.createElement(g,Ce({},C,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:y,innerRef:this.getInputRef,isDisabled:o,isHidden:m,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:c,form:u,type:"text",value:l},I)):W.createElement(jI,Ce({id:y,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:_a,onFocus:this.onInputFocus,disabled:o,tabIndex:c,inputMode:"none",form:u,value:""},I))}},{key:"renderPlaceholderOrValue",value:function(){var i=this,o=this.getComponents(),s=o.MultiValue,a=o.MultiValueContainer,l=o.MultiValueLabel,c=o.MultiValueRemove,u=o.SingleValue,d=o.Placeholder,f=this.commonProps,h=this.props,g=h.controlShouldRenderValue,p=h.isDisabled,m=h.isMulti,v=h.inputValue,C=h.placeholder,y=this.state,I=y.selectValue,w=y.focusedValue,R=y.isFocused;if(!this.hasValue()||!g)return v?null:W.createElement(d,Ce({},f,{key:"placeholder",isDisabled:p,isFocused:R,innerProps:{id:this.getElementId("placeholder")}}),C);if(m)return I.map(function(S,_){var E=S===w,P="".concat(i.getOptionLabel(S),"-").concat(i.getOptionValue(S));return W.createElement(s,Ce({},f,{components:{Container:a,Label:l,Remove:c},isFocused:E,isDisabled:p,key:P,index:_,removeProps:{onClick:function(){return i.removeValue(S)},onTouchEnd:function(){return i.removeValue(S)},onMouseDown:function($){$.preventDefault()}},data:S}),i.formatOptionLabel(S,"value"))});if(v)return null;var A=I[0];return W.createElement(u,Ce({},f,{data:A,isDisabled:p}),this.formatOptionLabel(A,"value"))}},{key:"renderClearIndicator",value:function(){var i=this.getComponents(),o=i.ClearIndicator,s=this.commonProps,a=this.props,l=a.isDisabled,c=a.isLoading,u=this.state.isFocused;if(!this.isClearable()||!o||l||!this.hasValue()||c)return null;var d={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return W.createElement(o,Ce({},s,{innerProps:d,isFocused:u}))}},{key:"renderLoadingIndicator",value:function(){var i=this.getComponents(),o=i.LoadingIndicator,s=this.commonProps,a=this.props,l=a.isDisabled,c=a.isLoading,u=this.state.isFocused;if(!o||!c)return null;var d={"aria-hidden":"true"};return W.createElement(o,Ce({},s,{innerProps:d,isDisabled:l,isFocused:u}))}},{key:"renderIndicatorSeparator",value:function(){var i=this.getComponents(),o=i.DropdownIndicator,s=i.IndicatorSeparator;if(!o||!s)return null;var a=this.commonProps,l=this.props.isDisabled,c=this.state.isFocused;return W.createElement(s,Ce({},a,{isDisabled:l,isFocused:c}))}},{key:"renderDropdownIndicator",value:function(){var i=this.getComponents(),o=i.DropdownIndicator;if(!o)return null;var s=this.commonProps,a=this.props.isDisabled,l=this.state.isFocused,c={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return W.createElement(o,Ce({},s,{innerProps:c,isDisabled:a,isFocused:l}))}},{key:"renderMenu",value:function(){var i=this,o=this.getComponents(),s=o.Group,a=o.GroupHeading,l=o.Menu,c=o.MenuList,u=o.MenuPortal,d=o.LoadingMessage,f=o.NoOptionsMessage,h=o.Option,g=this.commonProps,p=this.state.focusedOption,m=this.props,v=m.captureMenuScroll,C=m.inputValue,y=m.isLoading,I=m.loadingMessage,w=m.minMenuHeight,R=m.maxMenuHeight,A=m.menuIsOpen,S=m.menuPlacement,_=m.menuPosition,E=m.menuPortalTarget,P=m.menuShouldBlockScroll,T=m.menuShouldScrollIntoView,$=m.noOptionsMessage,D=m.onMenuScrollToTop,k=m.onMenuScrollToBottom;if(!A)return null;var O=function(V,J){var le=V.type,he=V.data,Ne=V.isDisabled,fe=V.isSelected,ge=V.label,we=V.value,ce=p===he,H=Ne?void 0:function(){return i.onOptionHover(he)},Te=Ne?void 0:function(){return i.selectOption(he)},re="".concat(i.getElementId("option"),"-").concat(J),ie={id:re,onClick:Te,onMouseMove:H,onMouseOver:H,tabIndex:-1,role:"option","aria-selected":i.state.isAppleDevice?void 0:fe};return W.createElement(h,Ce({},g,{innerProps:ie,data:he,isDisabled:Ne,isSelected:fe,key:re,label:ge,type:le,value:we,isFocused:ce,innerRef:ce?i.getFocusedOptionRef:void 0}),i.formatOptionLabel(V.data,"menu"))},N;if(this.hasOptions())N=this.getCategorizedOptions().map(function(G){if(G.type==="group"){var V=G.data,J=G.options,le=G.index,he="".concat(i.getElementId("group"),"-").concat(le),Ne="".concat(he,"-heading");return W.createElement(s,Ce({},g,{key:he,data:V,options:J,Heading:a,headingProps:{id:Ne,data:G.data},label:i.formatGroupLabel(G.data)}),G.options.map(function(fe){return O(fe,"".concat(le,"-").concat(fe.index))}))}else if(G.type==="option")return O(G,"".concat(G.index))});else if(y){var M=I({inputValue:C});if(M===null)return null;N=W.createElement(d,g,M)}else{var F=$({inputValue:C});if(F===null)return null;N=W.createElement(f,g,F)}var B={minMenuHeight:w,maxMenuHeight:R,menuPlacement:S,menuPosition:_,menuShouldScrollIntoView:T},z=W.createElement(p4,Ce({},g,B),function(G){var V=G.ref,J=G.placerProps,le=J.placement,he=J.maxHeight;return W.createElement(l,Ce({},g,B,{innerRef:V,innerProps:{onMouseDown:i.onMenuMouseDown,onMouseMove:i.onMenuMouseMove},isLoading:y,placement:le}),W.createElement(WI,{captureEnabled:v,onTopArrive:D,onBottomArrive:k,lockEnabled:P},function(Ne){return W.createElement(c,Ce({},g,{innerRef:function(ge){i.getMenuListRef(ge),Ne(ge)},innerProps:{role:"listbox","aria-multiselectable":g.isMulti,id:i.getElementId("listbox")},isLoading:y,maxHeight:he,focusedOption:p}),N)}))});return E||_==="fixed"?W.createElement(u,Ce({},g,{appendTo:E,controlElement:this.controlRef,menuPlacement:S,menuPosition:_}),z):z}},{key:"renderFormField",value:function(){var i=this,o=this.props,s=o.delimiter,a=o.isDisabled,l=o.isMulti,c=o.name,u=o.required,d=this.state.selectValue;if(u&&!this.hasValue()&&!a)return W.createElement(JI,{name:c,onFocus:this.onValueInputFocus});if(!(!c||a))if(l)if(s){var f=d.map(function(p){return i.getOptionValue(p)}).join(s);return W.createElement("input",{name:c,type:"hidden",value:f})}else{var h=d.length>0?d.map(function(p,m){return W.createElement("input",{key:"i-".concat(m),name:c,type:"hidden",value:i.getOptionValue(p)})}):W.createElement("input",{name:c,type:"hidden",value:""});return W.createElement("div",null,h)}else{var g=d[0]?this.getOptionValue(d[0]):"";return W.createElement("input",{name:c,type:"hidden",value:g})}}},{key:"renderLiveRegion",value:function(){var i=this.commonProps,o=this.state,s=o.ariaSelection,a=o.focusedOption,l=o.focusedValue,c=o.isFocused,u=o.selectValue,d=this.getFocusableOptions();return W.createElement(FI,Ce({},i,{id:this.getElementId("live-region"),ariaSelection:s,focusedOption:a,focusedValue:l,isFocused:c,selectValue:u,focusableOptions:d,isAppleDevice:this.state.isAppleDevice}))}},{key:"render",value:function(){var i=this.getComponents(),o=i.Control,s=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 W.createElement(a,Ce({},p,{className:u,innerProps:{id:d,onKeyDown:this.onKeyDown},isDisabled:f,isFocused:g}),this.renderLiveRegion(),W.createElement(o,Ce({},p,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:f,isFocused:g,menuIsOpen:h}),W.createElement(l,Ce({},p,{isDisabled:f}),this.renderPlaceholderOrValue(),this.renderInput()),W.createElement(s,Ce({},p,{isDisabled:f}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(i,o){var s=o.prevProps,a=o.clearFocusValueOnUpdate,l=o.inputIsHiddenAfterUpdate,c=o.ariaSelection,u=o.isFocused,d=o.prevWasFocused,f=o.instancePrefix,h=i.options,g=i.value,p=i.menuIsOpen,m=i.inputValue,v=i.isMulti,C=Ea(g),y={};if(s&&(g!==s.value||h!==s.options||p!==s.menuIsOpen||m!==s.inputValue)){var I=p?c5(i,C):[],w=p?wh(qs(i,C),"".concat(f,"-option")):[],R=a?u5(o,C):null,A=d5(o,I),S=ql(w,A);y={selectValue:C,focusedOption:A,focusedOptionId:S,focusableOptionsWithIds:w,focusedValue:R,clearFocusValueOnUpdate:!1}}var _=l!=null&&i!==s?{inputIsHidden:l,inputIsHiddenAfterUpdate:void 0}:{},E=c,P=u&&d;return u&&!P&&(E={value:Zi(v,C,C[0]||null),options:C,action:"initial-input-focus"},P=!d),(c==null?void 0:c.action)==="initial-input-focus"&&(E=null),ve(ve(ve({},y),_),{},{prevProps:i,ariaSelection:E,prevWasFocused:P})}}]),n}(x.Component);pd.defaultProps=l5;var h5=x.forwardRef(function(e,t){var n=rm(e);return W.createElement(pd,Ce({ref:t},n))}),Vm=h5,g5=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],Ih=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(),o=String(r.getOptionValue(n)).toLowerCase(),s=String(r.getOptionLabel(n)).toLowerCase();return o===i||s===i},ec={formatCreateLabel:function(t){return'Create "'.concat(t,'"')},isValidNewOption:function(t,n,r,i){return!(!t||n.some(function(o){return Ih(t,o,i)})||r.some(function(o){return Ih(t,o,i)}))},getNewOptionData:function(t,n){return{label:n,value:t,__isNew__:!0}}};function p5(e){var t=e.allowCreateWhileLoading,n=t===void 0?!1:t,r=e.createOptionPosition,i=r===void 0?"last":r,o=e.formatCreateLabel,s=o===void 0?ec.formatCreateLabel:o,a=e.isValidNewOption,l=a===void 0?ec.isValidNewOption:a,c=e.getNewOptionData,u=c===void 0?ec.getNewOptionData:c,d=e.onCreateOption,f=e.options,h=f===void 0?[]:f,g=e.onChange,p=Rn(e,g5),m=p.getOptionValue,v=m===void 0?Om:m,C=p.getOptionLabel,y=C===void 0?Fm:C,I=p.inputValue,w=p.isLoading,R=p.isMulti,A=p.value,S=p.name,_=x.useMemo(function(){return l(I,Ea(A),h,{getOptionValue:v,getOptionLabel:y})?u(I,s(I)):void 0},[s,u,y,v,I,l,h,A]),E=x.useMemo(function(){return(n||!w)&&_?i==="first"?[_].concat(ci(h)):[].concat(ci(h),[_]):h},[n,i,w,_,h]),P=x.useCallback(function(T,$){if($.action!=="select-option")return g(T,$);var D=Array.isArray(T)?T:[T];if(D[D.length-1]===_){if(d)d(I);else{var k=u(I,I),O={action:"create-option",name:S,option:k};g(Zi(R,[].concat(ci(Ea(A)),[k]),k),O)}return}g(T,$)},[u,I,R,S,_,d,g,A]);return ve(ve({},p),{},{options:E,onChange:P})}var m5=x.forwardRef(function(e,t){var n=rm(e),r=p5(n);return W.createElement(pd,Ce({ref:t},r))}),b5=m5;const Po=({label:e,placeholder:t,options:n,selectedOptions:r,handleChange:i,className:o="",creatable:s=!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:v,isLoading:C=!1,noOptionsMessage:y,includeApply:I,onApply:w})=>{const R=s?b5:Vm,[A,S]=x.useState(!1),_=x.useRef(null);x.useEffect(()=>{if(g)return;const M=F=>{var B;(B=_.current)!=null&&B.contains(F.target)?S(z=>!z):S(!1)};return document.addEventListener("mousedown",M),()=>document.removeEventListener("mousedown",M)},[g]);const E=[...r,...n.filter(M=>!r.some(F=>F.value===M.value))],P=M=>b.jsxs(sn.Control,{...M,children:[!M.getValue().length&&b.jsx(sn.Placeholder,{...M,children:M.selectProps.placeholder}),M.children]}),T=M=>{const{data:F,isSelected:B}=M;if(p){const z=p;return b.jsx(sn.Option,{...M,children:b.jsx(z,{data:F,isSelected:B})})}return I?b.jsx(sn.Option,{...M,children:b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("input",{type:"checkbox",checked:B,readOnly:!0,style:{accentColor:"var(--brand-orange)",marginRight:8}}),F.icon&&b.jsx("span",{className:"",children:F.icon}),b.jsx("span",{children:F.label})]})}):b.jsx(sn.Option,{...M,children:b.jsxs("div",{className:"flex items-center flex-1 gap-2",children:[F.icon&&b.jsx("span",{className:"option-icon",children:F.icon}),b.jsx("span",{children:F.label})]})})},$=M=>{const{data:F}=M;if(p){const B=p;return b.jsx(sn.SingleValue,{...M,children:b.jsx(B,{data:F})})}return b.jsx(sn.SingleValue,{...M,children:b.jsx("div",{className:"flex items-center gap-2",children:b.jsx("span",{children:F.label})})})},D=M=>{const{data:F}=M;return b.jsx(sn.MultiValue,{...M,children:b.jsx("div",{className:"flex items-center gap-1",children:b.jsx("span",{children:F.label})})})},k=M=>{const{children:F}=M;return b.jsxs(sn.Menu,{...M,children:[F,I&&b.jsx("div",{style:{padding:"8px"},children:b.jsx("button",{onClick:B=>{B.stopPropagation(),w==null||w(),S(!1)},style:{width:"100%",padding:"8px",background:"var(--brand-orange)",color:"white",border:"none",cursor:"pointer",borderRadius:"4px"},onMouseEnter:B=>B.currentTarget.style.opacity="0.9",onMouseLeave:B=>B.currentTarget.style.opacity="1",children:"Apply"})})]})},O=M=>b.jsx(sn.DropdownIndicator,{...M}),N=()=>d?{Control:P,SingleValue:M=>M.selectProps.menuIsOpen?b.jsx($,{...M}):b.jsx("div",{style:{position:"absolute",left:"10px"},children:t}),Option:T,MultiValue:D,DropdownIndicator:O,Menu:k}:{Option:T,SingleValue:$,MultiValue:D,DropdownIndicator:O,Menu:k};return b.jsxs("div",{ref:_,className:`${o} flex flex-col gap-1`,children:[e&&b.jsx("label",{className:"block text-sm font-medium",style:{color:"var(--text-color)"},children:e}),b.jsx(R,{isMulti:l,isClearable:f,value:r,onChange:i,options:E,placeholder:t,isDisabled:a,className:`${h} react-select-container w-full text-sm`,classNamePrefix:"react-select",menuPosition:u,menuPortalTarget:m,components:N(),...!g&&{menuIsOpen:A},onInputChange:v,isLoading:C,noOptionsMessage:y,styles:{control:(M,F)=>({...M,borderColor:F.isFocused?"var(--brand-orange)":"var(--border-color)",borderRadius:"0.25rem",cursor:"pointer",backgroundColor:"var(--bg-color)",color:"var(--text-color)",boxShadow:F.isFocused?"0 0 0 1px var(--brand-orange)":"none",":hover":{borderColor:"var(--brand-orange)"}}),input:M=>({...M,color:"var(--text-color)",boxShadow:"none",border:"none"}),singleValue:M=>({...M,color:"var(--text-color)"}),multiValue:M=>({...M,backgroundColor:"var(--brand-light)",borderRadius:"0.25rem"}),multiValueLabel:M=>({...M,color:"var(--brand-dark)"}),multiValueRemove:M=>({...M,color:"var(--brand-dark)",cursor:"pointer",":hover":{backgroundColor:"var(--brand-orange)",color:"white"}}),placeholder:M=>({...M,color:"var(--secondary-text-color)"}),option:(M,F)=>({...M,backgroundColor:F.isSelected?"var(--brand-orange)":F.isFocused?"var(--hover-bg-color)":"var(--bg-color)",color:F.isSelected?"white":"var(--text-color)",cursor:"pointer",":active":{backgroundColor:"var(--brand-orange)"}}),menu:M=>({...M,backgroundColor:"var(--bg-color)",color:"var(--text-color)",border:"1px solid var(--border-color)",zIndex:9999}),dropdownIndicator:M=>({...M,cursor:"pointer",color:"var(--secondary-text-color)",":hover":{color:"var(--brand-orange)"}}),clearIndicator:M=>({...M,cursor:"pointer",color:"var(--secondary-text-color)",":hover":{color:"var(--brand-orange)"}}),indicatorSeparator:M=>({...M,backgroundColor:"var(--border-color)"}),...c},...s&&{formatCreateLabel:M=>M.trim()?`Create "${M}"`:null,isValidNewOption:M=>M.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 qn(e,t){return typeof e=="function"?e(t):e}function Wt(e,t){return n=>{t.setState(r=>({...r,[e]:qn(n,r[e])}))}}function vl(e){return e instanceof Function}function v5(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function x5(e,t){const n=[],r=i=>{i.forEach(o=>{n.push(o);const s=t(o);s!=null&&s.length&&r(s)})};return r(e),n}function _e(e,t,n){let r=[],i;return o=>{let s;n.key&&n.debug&&(s=Date.now());const a=e(o);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()-s)*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 Ee(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 y5(e,t,n,r){const i=()=>{var s;return(s=o.getValue())!=null?s:e.options.renderFallbackValue},o={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:i,getContext:_e(()=>[e,n,t,o],(s,a,l,c)=>({table:s,column:a,row:l,cell:c,getValue:c.getValue,renderValue:c.renderValue}),Ee(e.options,"debugCells","cell.getContext"))};return e._features.forEach(s=>{s.createCell==null||s.createCell(o,n,t,e)},{}),o}function C5(e,t,n,r){var i,o;const a={...e._getDefaultColumnDef(),...t},l=a.accessorKey;let c=(i=(o=a.id)!=null?o: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:_e(()=>[!0],()=>{var f;return[d,...(f=d.columns)==null?void 0:f.flatMap(h=>h.getFlatColumns())]},Ee(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:_e(()=>[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]},Ee(e.options,"debugColumns","column.getLeafColumns"))};for(const f of e._features)f.createColumn==null||f.createColumn(d,e);return d}const It="debugHeaders";function _h(e,t,n){var r;let o={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 s=[],a=l=>{l.subHeaders&&l.subHeaders.length&&l.subHeaders.map(a),s.push(l)};return a(o),s},getContext:()=>({table:e,header:o,column:t})};return e._features.forEach(s=>{s.createHeader==null||s.createHeader(o,e)}),o}const w5={createTable:e=>{e.getHeaderGroups=_e(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>{var o,s;const a=(o=r==null?void 0:r.map(d=>n.find(f=>f.id===d)).filter(Boolean))!=null?o:[],l=(s=i==null?void 0:i.map(d=>n.find(f=>f.id===d)).filter(Boolean))!=null?s:[],c=n.filter(d=>!(r!=null&&r.includes(d.id))&&!(i!=null&&i.includes(d.id)));return ms(t,[...a,...c,...l],e)},Ee(e.options,It,"getHeaderGroups")),e.getCenterHeaderGroups=_e(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>(n=n.filter(o=>!(r!=null&&r.includes(o.id))&&!(i!=null&&i.includes(o.id))),ms(t,n,e,"center")),Ee(e.options,It,"getCenterHeaderGroups")),e.getLeftHeaderGroups=_e(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var i;const o=(i=r==null?void 0:r.map(s=>n.find(a=>a.id===s)).filter(Boolean))!=null?i:[];return ms(t,o,e,"left")},Ee(e.options,It,"getLeftHeaderGroups")),e.getRightHeaderGroups=_e(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var i;const o=(i=r==null?void 0:r.map(s=>n.find(a=>a.id===s)).filter(Boolean))!=null?i:[];return ms(t,o,e,"right")},Ee(e.options,It,"getRightHeaderGroups")),e.getFooterGroups=_e(()=>[e.getHeaderGroups()],t=>[...t].reverse(),Ee(e.options,It,"getFooterGroups")),e.getLeftFooterGroups=_e(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),Ee(e.options,It,"getLeftFooterGroups")),e.getCenterFooterGroups=_e(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),Ee(e.options,It,"getCenterFooterGroups")),e.getRightFooterGroups=_e(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),Ee(e.options,It,"getRightFooterGroups")),e.getFlatHeaders=_e(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ee(e.options,It,"getFlatHeaders")),e.getLeftFlatHeaders=_e(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ee(e.options,It,"getLeftFlatHeaders")),e.getCenterFlatHeaders=_e(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ee(e.options,It,"getCenterFlatHeaders")),e.getRightFlatHeaders=_e(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ee(e.options,It,"getRightFlatHeaders")),e.getCenterLeafHeaders=_e(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Ee(e.options,It,"getCenterLeafHeaders")),e.getLeftLeafHeaders=_e(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Ee(e.options,It,"getLeftLeafHeaders")),e.getRightLeafHeaders=_e(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Ee(e.options,It,"getRightLeafHeaders")),e.getLeafHeaders=_e(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var i,o,s,a,l,c;return[...(i=(o=t[0])==null?void 0:o.headers)!=null?i:[],...(s=(a=n[0])==null?void 0:a.headers)!=null?s:[],...(l=(c=r[0])==null?void 0:c.headers)!=null?l:[]].map(u=>u.getLeafHeaders()).flat()},Ee(e.options,It,"getLeafHeaders"))}};function ms(e,t,n,r){var i,o;let s=0;const a=function(f,h){h===void 0&&(h=1),s=Math.max(s,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 v=[...p].reverse()[0],C=m.column.depth===g.depth;let y,I=!1;if(C&&m.column.parent?y=m.column.parent:(y=m.column,I=!0),v&&(v==null?void 0:v.column)===y)v.subHeaders.push(m);else{const w=_h(n,y,{id:[r,h,y.id,m==null?void 0:m.id].filter(Boolean).join("_"),isPlaceholder:I,placeholderId:I?`${p.filter(R=>R.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)=>_h(n,f,{depth:s,index:h}));c(u,s-1),l.reverse();const d=f=>f.filter(g=>g.column.getIsVisible()).map(g=>{let p=0,m=0,v=[0];g.subHeaders&&g.subHeaders.length?(v=[],d(g.subHeaders).forEach(y=>{let{colSpan:I,rowSpan:w}=y;p+=I,v.push(w)})):p=1;const C=Math.min(...v);return m=m+C,g.colSpan=p,g.rowSpan=m,{colSpan:p,rowSpan:m}});return d((i=(o=l[0])==null?void 0:o.headers)!=null?i:[]),l}const S5=(e,t,n,r,i,o,s)=>{let a={id:t,index:r,original:n,depth:i,parentId:s,_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:()=>x5(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:_e(()=>[e.getAllLeafColumns()],l=>l.map(c=>y5(e,a,c,c.id)),Ee(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:_e(()=>[a.getAllCells()],l=>l.reduce((c,u)=>(c[u.column.id]=u,c),{}),Ee(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},I5={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()}}},Gm=(e,t,n)=>{var r,i;const o=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(o))};Gm.autoRemove=e=>un(e);const zm=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};zm.autoRemove=e=>un(e);const Hm=(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())};Hm.autoRemove=e=>un(e);const Wm=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};Wm.autoRemove=e=>un(e);const Xm=(e,t,n)=>!n.some(r=>{var i;return!((i=e.getValue(t))!=null&&i.includes(r))});Xm.autoRemove=e=>un(e)||!(e!=null&&e.length);const Ym=(e,t,n)=>n.some(r=>{var i;return(i=e.getValue(t))==null?void 0:i.includes(r)});Ym.autoRemove=e=>un(e)||!(e!=null&&e.length);const Zm=(e,t,n)=>e.getValue(t)===n;Zm.autoRemove=e=>un(e);const Jm=(e,t,n)=>e.getValue(t)==n;Jm.autoRemove=e=>un(e);const md=(e,t,n)=>{let[r,i]=n;const o=e.getValue(t);return o>=r&&o<=i};md.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,i=typeof n!="number"?parseFloat(n):n,o=t===null||Number.isNaN(r)?-1/0:r,s=n===null||Number.isNaN(i)?1/0:i;if(o>s){const a=o;o=s,s=a}return[o,s]};md.autoRemove=e=>un(e)||un(e[0])&&un(e[1]);const Nn={includesString:Gm,includesStringSensitive:zm,equalsString:Hm,arrIncludes:Wm,arrIncludesAll:Xm,arrIncludesSome:Ym,equals:Zm,weakEquals:Jm,inNumberRange:md};function un(e){return e==null||e===""}const _5={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Wt("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"?Nn.includesString:typeof r=="number"?Nn.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?Nn.equals:Array.isArray(r)?Nn.arrIncludes:Nn.weakEquals},e.getFilterFn=()=>{var n,r;return vl(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:Nn[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(),o=r==null?void 0:r.find(u=>u.id===e.id),s=qn(n,o?o.value:void 0);if(Eh(i,s,e)){var a;return(a=r==null?void 0:r.filter(u=>u.id!==e.id))!=null?a:[]}const l={id:e.id,value:s};if(o){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 o;return(o=qn(t,i))==null?void 0:o.filter(s=>{const a=n.find(l=>l.id===s.id);if(a){const l=a.getFilterFn();if(Eh(l,s.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 Eh(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const E5=(e,t,n)=>n.reduce((r,i)=>{const o=i.getValue(e);return r+(typeof o=="number"?o:0)},0),M5=(e,t,n)=>{let r;return n.forEach(i=>{const o=i.getValue(e);o!=null&&(r>o||r===void 0&&o>=o)&&(r=o)}),r},A5=(e,t,n)=>{let r;return n.forEach(i=>{const o=i.getValue(e);o!=null&&(r<o||r===void 0&&o>=o)&&(r=o)}),r},R5=(e,t,n)=>{let r,i;return n.forEach(o=>{const s=o.getValue(e);s!=null&&(r===void 0?s>=s&&(r=i=s):(r>s&&(r=s),i<s&&(i=s)))}),[r,i]},k5=(e,t)=>{let n=0,r=0;if(t.forEach(i=>{let o=i.getValue(e);o!=null&&(o=+o)>=o&&(++n,r+=o)}),n)return r/n},P5=(e,t)=>{if(!t.length)return;const n=t.map(o=>o.getValue(e));if(!v5(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),i=n.sort((o,s)=>o-s);return n.length%2!==0?i[r]:(i[r-1]+i[r])/2},F5=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),O5=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,N5=(e,t)=>t.length,tc={sum:E5,min:M5,max:A5,extent:R5,mean:k5,median:P5,unique:F5,uniqueCount:O5,count:N5},T5={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:Wt("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 tc.sum;if(Object.prototype.toString.call(r)==="[object Date]")return tc.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return vl(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:tc[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 D5(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(o=>!t.includes(o.id));return n==="remove"?r:[...t.map(o=>e.find(s=>s.id===o)).filter(Boolean),...r]}const L5={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Wt("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=_e(n=>[so(t,n)],n=>n.findIndex(r=>r.id===e.id),Ee(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=n=>{var r;return((r=so(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const i=so(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=_e(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>i=>{let o=[];if(!(t!=null&&t.length))o=i;else{const s=[...t],a=[...i];for(;a.length&&s.length;){const l=s.shift(),c=a.findIndex(u=>u.id===l);c>-1&&o.push(a.splice(c,1)[0])}o=[...o,...a]}return D5(o,n,r)},Ee(e.options,"debugTable","_getOrderColumnsFn"))}},nc=()=>({left:[],right:[]}),j5={getInitialState:e=>({columnPinning:nc(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Wt("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(i=>i.id).filter(Boolean);t.setColumnPinning(i=>{var o,s;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:((o=i==null?void 0:i.left)!=null?o:[]).filter(d=>!(r!=null&&r.includes(d))),right:((s=i==null?void 0:i.right)!=null?s:[]).filter(d=>!(r!=null&&r.includes(d)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var i,o,s;return((i=r.columnDef.enablePinning)!=null?i:!0)&&((o=(s=t.options.enableColumnPinning)!=null?s:t.options.enablePinning)!=null?o:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(a=>a.id),{left:r,right:i}=t.getState().columnPinning,o=n.some(a=>r==null?void 0:r.includes(a)),s=n.some(a=>i==null?void 0:i.includes(a));return o?"left":s?"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=_e(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,i)=>{const o=[...r??[],...i??[]];return n.filter(s=>!o.includes(s.column.id))},Ee(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=_e(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(o=>n.find(s=>s.column.id===o)).filter(Boolean).map(o=>({...o,position:"left"})),Ee(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=_e(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(o=>n.find(s=>s.column.id===o)).filter(Boolean).map(o=>({...o,position:"right"})),Ee(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?nc():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:nc())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var i,o;return!!((i=r.left)!=null&&i.length||(o=r.right)!=null&&o.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=_e(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),Ee(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=_e(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),Ee(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=_e(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const i=[...n??[],...r??[]];return t.filter(o=>!i.includes(o.id))},Ee(e.options,"debugColumns","getCenterLeafColumns"))}};function B5(e){return e||(typeof document<"u"?document:null)}const bs={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},rc=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),$5={getDefaultColumnDef:()=>bs,getInitialState:e=>({columnSizing:{},columnSizingInfo:rc(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Wt("columnSizing",e),onColumnSizingInfoChange:Wt("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,i;const o=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:bs.minSize,(r=o??e.columnDef.size)!=null?r:bs.size),(i=e.columnDef.maxSize)!=null?i:bs.maxSize)},e.getStart=_e(n=>[n,so(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((i,o)=>i+o.getSize(),0),Ee(t.options,"debugColumns","getStart")),e.getAfter=_e(n=>[n,so(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((i,o)=>i+o.getSize(),0),Ee(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 o;n+=(o=i.column.getSize())!=null?o: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 o=>{if(!r||!i||(o.persist==null||o.persist(),ic(o)&&o.touches&&o.touches.length>1))return;const s=e.getSize(),a=e?e.getLeafHeaders().map(v=>[v.column.id,v.column.getSize()]):[[r.id,r.getSize()]],l=ic(o)?Math.round(o.touches[0].clientX):o.clientX,c={},u=(v,C)=>{typeof C=="number"&&(t.setColumnSizingInfo(y=>{var I,w;const R=t.options.columnResizeDirection==="rtl"?-1:1,A=(C-((I=y==null?void 0:y.startOffset)!=null?I:0))*R,S=Math.max(A/((w=y==null?void 0:y.startSize)!=null?w:0),-.999999);return y.columnSizingStart.forEach(_=>{let[E,P]=_;c[E]=Math.round(Math.max(P+P*S,0)*100)/100}),{...y,deltaOffset:A,deltaPercentage:S}}),(t.options.columnResizeMode==="onChange"||v==="end")&&t.setColumnSizing(y=>({...y,...c})))},d=v=>u("move",v),f=v=>{u("end",v),t.setColumnSizingInfo(C=>({...C,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},h=B5(n),g={moveHandler:v=>d(v.clientX),upHandler:v=>{h==null||h.removeEventListener("mousemove",g.moveHandler),h==null||h.removeEventListener("mouseup",g.upHandler),f(v.clientX)}},p={moveHandler:v=>(v.cancelable&&(v.preventDefault(),v.stopPropagation()),d(v.touches[0].clientX),!1),upHandler:v=>{var C;h==null||h.removeEventListener("touchmove",p.moveHandler),h==null||h.removeEventListener("touchend",p.upHandler),v.cancelable&&(v.preventDefault(),v.stopPropagation()),f((C=v.touches[0])==null?void 0:C.clientX)}},m=V5()?{passive:!1}:!1;ic(o)?(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(v=>({...v,startOffset:l,startSize:s,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?rc():(n=e.initialState.columnSizingInfo)!=null?n:rc())},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 vs=null;function V5(){if(typeof vs=="boolean")return vs;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 vs=e,vs}function ic(e){return e.type==="touchstart"}const G5={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Wt("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(o=>o.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=_e(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),Ee(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=_e(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,i)=>[...n,...r,...i],Ee(t.options,"debugRows","getVisibleCells"))},createTable:e=>{const t=(n,r)=>_e(()=>[r(),r().filter(i=>i.getIsVisible()).map(i=>i.id).join("_")],i=>i.filter(o=>o.getIsVisible==null?void 0:o.getIsVisible()),Ee(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,o)=>({...i,[o.id]:n||!(o.getCanHide!=null&&o.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 so(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const z5={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()}}},H5={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Wt("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,o;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&((o=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?o:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Nn.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return vl(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:Nn[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},W5={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Wt("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,o;e.setExpanded(r?{}:(i=(o=e.initialState)==null?void 0:o.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(o=>{const s=o.split(".");r=Math.max(r,s.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 o=r===!0?!0:!!(r!=null&&r[e.id]);let s={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(a=>{s[a]=!0}):s=r,n=(i=n)!=null?i:!o,!o&&n)return{...s,[e.id]:!0};if(o&&!n){const{[e.id]:a,...l}=s;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()}}}},qc=0,eu=10,oc=()=>({pageIndex:qc,pageSize:eu}),X5={getInitialState:e=>({...e,pagination:{...oc(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:Wt("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=o=>qn(r,o);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(i)},e.resetPagination=r=>{var i;e.setPagination(r?oc():(i=e.initialState.pagination)!=null?i:oc())},e.setPageIndex=r=>{e.setPagination(i=>{let o=qn(r,i.pageIndex);const s=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return o=Math.max(0,Math.min(o,s)),{...i,pageIndex:o}})},e.resetPageIndex=r=>{var i,o;e.setPageIndex(r?qc:(i=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageIndex)!=null?i:qc)},e.resetPageSize=r=>{var i,o;e.setPageSize(r?eu:(i=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageSize)!=null?i:eu)},e.setPageSize=r=>{e.setPagination(i=>{const o=Math.max(1,qn(r,i.pageSize)),s=i.pageSize*i.pageIndex,a=Math.floor(s/o);return{...i,pageIndex:a,pageSize:o}})},e.setPageCount=r=>e.setPagination(i=>{var o;let s=qn(r,(o=e.options.pageCount)!=null?o:-1);return typeof s=="number"&&(s=Math.max(-1,s)),{...i,pageCount:s}}),e.getPageOptions=_e(()=>[e.getPageCount()],r=>{let i=[];return r&&r>0&&(i=[...new Array(r)].fill(null).map((o,s)=>s)),i},Ee(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}}},sc=()=>({top:[],bottom:[]}),Y5={getInitialState:e=>({rowPinning:sc(),...e}),getDefaultOptions:e=>({onRowPinningChange:Wt("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,i)=>{const o=r?e.getLeafRows().map(l=>{let{id:c}=l;return c}):[],s=i?e.getParentRows().map(l=>{let{id:c}=l;return c}):[],a=new Set([...s,e.id,...o]);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,o=n.some(a=>r==null?void 0:r.includes(a)),s=n.some(a=>i==null?void 0:i.includes(a));return o?"top":s?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const i=e.getIsPinned();if(!i)return-1;const o=(n=i==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(s=>{let{id:a}=s;return a});return(r=o==null?void 0:o.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?sc():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:sc())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var i,o;return!!((i=r.top)!=null&&i.length||(o=r.bottom)!=null&&o.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=(t,n,r)=>{var i;return((i=e.options.keepPinnedRows)==null||i?(n??[]).map(s=>{const a=e.getRow(s,!0);return a.getIsAllParentsExpanded()?a:null}):(n??[]).map(s=>t.find(a=>a.id===s))).filter(Boolean).map(s=>({...s,position:r}))},e.getTopRows=_e(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),Ee(e.options,"debugRows","getTopRows")),e.getBottomRows=_e(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),Ee(e.options,"debugRows","getBottomRows")),e.getCenterRows=_e(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const i=new Set([...n??[],...r??[]]);return t.filter(o=>!i.has(o.id))},Ee(e.options,"debugRows","getCenterRows"))}},Z5={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Wt("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(o=>{o.getCanSelect()&&(r[o.id]=!0)}):i.forEach(o=>{delete r[o.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),i={...n};return e.getRowModel().rows.forEach(o=>{tu(i,o.id,r,!0,e)}),i}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=_e(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?ac(e,n):{rows:[],flatRows:[],rowsById:{}},Ee(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=_e(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?ac(e,n):{rows:[],flatRows:[],rowsById:{}},Ee(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=_e(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?ac(e,n):{rows:[],flatRows:[],rowsById:{}},Ee(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(o=>{var s;if(n=typeof n<"u"?n:!i,e.getCanSelect()&&i===n)return o;const a={...o};return tu(a,e.id,n,(s=r==null?void 0:r.selectChildren)!=null?s:!0,t),a})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return bd(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return nu(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return nu(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)}}}},tu=(e,t,n,r,i)=>{var o;const s=i.getRow(t,!0);n?(s.getCanMultiSelect()||Object.keys(e).forEach(a=>delete e[a]),s.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(o=s.subRows)!=null&&o.length&&s.getCanSelectSubRows()&&s.subRows.forEach(a=>tu(e,a.id,n,r,i))};function ac(e,t){const n=e.getState().rowSelection,r=[],i={},o=function(s,a){return s.map(l=>{var c;const u=bd(l,n);if(u&&(r.push(l),i[l.id]=l),(c=l.subRows)!=null&&c.length&&(l={...l,subRows:o(l.subRows)}),u)return l}).filter(Boolean)};return{rows:o(t.rows),flatRows:r,rowsById:i}}function bd(e,t){var n;return(n=t[e.id])!=null?n:!1}function nu(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let i=!0,o=!1;return e.subRows.forEach(s=>{if(!(o&&!i)&&(s.getCanSelect()&&(bd(s,t)?o=!0:i=!1),s.subRows&&s.subRows.length)){const a=nu(s,t);a==="all"?o=!0:(a==="some"&&(o=!0),i=!1)}}),i?"all":o?"some":!1}const ru=/([0-9]+)/gm,J5=(e,t,n)=>Um(lr(e.getValue(n)).toLowerCase(),lr(t.getValue(n)).toLowerCase()),U5=(e,t,n)=>Um(lr(e.getValue(n)),lr(t.getValue(n))),Q5=(e,t,n)=>vd(lr(e.getValue(n)).toLowerCase(),lr(t.getValue(n)).toLowerCase()),K5=(e,t,n)=>vd(lr(e.getValue(n)),lr(t.getValue(n))),q5=(e,t,n)=>{const r=e.getValue(n),i=t.getValue(n);return r>i?1:r<i?-1:0},e_=(e,t,n)=>vd(e.getValue(n),t.getValue(n));function vd(e,t){return e===t?0:e>t?1:-1}function lr(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function Um(e,t){const n=e.split(ru).filter(Boolean),r=t.split(ru).filter(Boolean);for(;n.length&&r.length;){const i=n.shift(),o=r.shift(),s=parseInt(i,10),a=parseInt(o,10),l=[s,a].sort();if(isNaN(l[0])){if(i>o)return 1;if(o>i)return-1;continue}if(isNaN(l[1]))return isNaN(s)?-1:1;if(s>a)return 1;if(a>s)return-1}return n.length-r.length}const ji={alphanumeric:J5,alphanumericCaseSensitive:U5,text:Q5,textCaseSensitive:K5,datetime:q5,basic:e_},t_={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Wt("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 o=i==null?void 0:i.getValue(e.id);if(Object.prototype.toString.call(o)==="[object Date]")return ji.datetime;if(typeof o=="string"&&(r=!0,o.split(ru).length>1))return ji.alphanumeric}return r?ji.text:ji.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 vl(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:ji[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const i=e.getNextSortingOrder(),o=typeof n<"u"&&n!==null;t.setSorting(s=>{const a=s==null?void 0:s.find(h=>h.id===e.id),l=s==null?void 0:s.findIndex(h=>h.id===e.id);let c=[],u,d=o?n:i==="desc";if(s!=null&&s.length&&e.getCanMultiSort()&&r?a?u="toggle":u="add":s!=null&&s.length&&l!==s.length-1?u="replace":a?u="toggle":u="replace",u==="toggle"&&(o||i||(u="remove")),u==="add"){var f;c=[...s,{id:e.id,desc:d}],c.splice(0,c.length-((f=t.options.maxMultiSortColCount)!=null?f:Number.MAX_SAFE_INTEGER))}else u==="toggle"?c=s.map(h=>h.id===e.id?{...h,desc:d}:h):u==="remove"?c=s.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 o=e.getFirstSortDir(),s=e.getIsSorted();return s?s!==o&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(i=t.options.enableMultiRemove)!=null)||i)?!1:s==="desc"?"asc":"desc":o},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())}},n_=[w5,G5,L5,j5,I5,_5,z5,H5,t_,T5,W5,X5,Y5,Z5,$5];function r_(e){var t,n;process.env.NODE_ENV!=="production"&&(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");const r=[...n_,...(t=e._features)!=null?t:[]];let i={_features:r};const o=i._features.reduce((f,h)=>Object.assign(f,h.getDefaultOptions==null?void 0:h.getDefaultOptions(i)),{}),s=f=>i.options.mergeOptions?i.options.mergeOptions(o,f):{...o,...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:{...o,...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=qn(f,i.options);i.options=s(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:_e(()=>[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}},Ee(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>i.options.columns,getAllColumns:_e(()=>[i._getColumnDefs()],f=>{const h=function(g,p,m){return m===void 0&&(m=0),g.map(v=>{const C=C5(i,v,m,p),y=v;return C.columns=y.columns?h(y.columns,C,m+1):[],C})};return h(f)},Ee(e,"debugColumns","getAllColumns")),getAllFlatColumns:_e(()=>[i.getAllColumns()],f=>f.flatMap(h=>h.getFlatColumns()),Ee(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:_e(()=>[i.getAllFlatColumns()],f=>f.reduce((h,g)=>(h[g.id]=g,h),{}),Ee(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:_e(()=>[i.getAllColumns(),i._getOrderColumnsFn()],(f,h)=>{let g=f.flatMap(p=>p.getLeafColumns());return h(g)},Ee(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 i_(){return e=>_e(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(i,o,s){o===void 0&&(o=0);const a=[];for(let c=0;c<i.length;c++){const u=S5(e,e._getRowId(i[c],c,s),i[c],c,o,void 0,s==null?void 0:s.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,o+1,u))}}return a};return n.rows=r(t),n},Ee(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function o_(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 s_(e){return t=>_e(()=>[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:o}=n;let{rows:s,flatRows:a,rowsById:l}=r;const c=i*o,u=c+i;s=s.slice(c,u);let d;t.options.paginateExpandedRows?d={rows:s,flatRows:a,rowsById:l}:d=o_({rows:s,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},Ee(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 Mh(e,t){return e?a_(e)?W.createElement(e,t):e:null}function a_(e){return l_(e)||typeof e=="function"||c_(e)}function l_(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function c_(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function u_(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=W.useState(()=>({current:r_(t)})),[r,i]=W.useState(()=>n.current.initialState);return n.current.setOptions(o=>({...o,...e,state:{...r,...e.state},onStateChange:s=>{i(s),e.onStateChange==null||e.onStateChange(s)}})),n.current}function d_(e){return Ie({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 Qm(e){return Ie({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 Km(e){return Ie({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 xd(e){return Ie({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 f_(e){return Ie({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 h_(e){return Ie({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 g_(e){return Ie({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 p_(e){return Ie({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 m_(e){return Ie({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 b_(e){return Ie({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 v_(e){return Ie({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 x_(e){return Ie({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 y_(e){return Ie({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 C_(e){return Ie({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 w_(e){return Ie({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 S_(e){return Ie({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 I_(e){return Ie({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 __(e){return Ie({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 E_(e){return Ie({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 Ra(e){return Ie({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 M_(e){return Ie({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 A_(e){return Ie({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 Ah(e){return Ie({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 R_(e){return Ie({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 qm=x.createContext(void 0),eb=({children:e,onToastShow:t})=>{const[n,r]=x.useState(!1),[i,o]=x.useState(pt.INFO),[s,a]=x.useState(""),l=x.useCallback((c,u,d)=>{if(t)try{t(c,u,d)}catch(f){console.warn("Toast external integration failed:",f)}o(c),a(u),r(!0)},[t]);return b.jsx(qm.Provider,{value:{toast:n,toastMessage:s,toastType:i,setToast:r,setToastMessage:a,setToastType:o,showToast:l},children:e})},yd=()=>{const e=x.useContext(qm);if(!e)throw new Error("useToast must be used within a ToastProvider");return e};let ka=null,Pa=null,Rh=!1;function Cd(){if(!Rh){Rh=!0;try{const e=require("react-redux");ka=e.useDispatch,Pa=e.useSelector}catch{}}}const tb=()=>(Cd(),ka?ka():(console.warn("[useAppDispatch] Redux is not installed. Install @reduxjs/toolkit and react-redux to use this hook."),null)),nb=(e,t)=>(Cd(),Pa?Pa(e,t):(console.warn("[useAppSelector] Redux is not installed. Install @reduxjs/toolkit and react-redux to use this hook."),null)),rb=()=>(Cd(),ka!==null&&Pa!==null),ib=x.createContext(void 0),ob=({children:e})=>{const[t,n]=x.useState(!1),r=()=>n(!0),i=()=>n(!1);return b.jsx(ib.Provider,{value:{isLoading:t,showLoader:r,hideLoader:i},children:e})},xl=()=>{const e=x.useContext(ib);if(!e)throw new Error("useLoader must be used within a LoaderProvider");return e},sb=(e,t={})=>{const[n,r]=x.useState(t),[i,o]=x.useState(null),[s,a]=x.useState(!1),[l,c]=x.useState(null);return{filters:n,filteredData:i,loading:s,error:l,updateFilters:f=>{r(h=>({...h,...f}))},clearFilters:()=>{r(t),o(null)},setFilteredData:o,setLoading:a,setError:c}},ea=10,ta=0,iu=8,ou=`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`,su=({type:e,options:t,columns:n,data:r,fetchTableData:i,searchEnabled:o=!1,filtersEnabled:s,filterFields:a,setTableData:l,refreshTable:c,paginationEnabled:u=!0,exportEnabled:d=!0,bulkActions:f={},handleBulkAction:h,onRowClick:g,columnBorders:p,showConnectorsSummary:m=!1,connectorScanObject:v,connectorDetail:C,scanDetails:y,isDeletedItemsList:I=!1,onViewDeletedItemsClick:w,showViewDeleteButton:R=!1,refreshData:A,setRefreshData:S,tableWrapperClass:_,searchColumns:E=[],onExport:P,FilterModal:T,ConnectorSummaryAccordion:$})=>{var Ti,X,K,ue,Ae;const D=tb(),k=rb(),O=nb(L=>!k||!(L!=null&&L.tableData)?null:L.tableData[e]||null),[N,M]=x.useState(""),[F,B]=x.useState(()=>(O==null?void 0:O.sorting)??[]),[z,G]=x.useState(new Set),[V,J]=x.useState(),[le,he]=x.useState(!0),[Ne,fe]=x.useState(!1),[ge,we]=x.useState(0),{filters:ce}=sb(),[H,Te]=x.useState({}),[re,ie]=x.useState(()=>O!=null&&O.pagination?{...O.pagination}:{pageIndex:ta,pageSize:ea}),{showToast:j}=yd(),{showLoader:oe,hideLoader:Z}=xl(),[ne,te]=x.useState(),ee=x.useRef(null),se=x.useRef(""),pe=x.useRef(""),ae=x.useRef(!1),q=u_({data:r,columns:n,state:{columnVisibility:{actions:le},globalFilter:N,sorting:F,pagination:re},onColumnVisibilityChange:()=>he(!le),onGlobalFilterChange:M,onSortingChange:B,getCoreRowModel:i_(),manualPagination:!0,manualSorting:!0,manualFiltering:!0,pageCount:Math.ceil(ge/re.pageSize),onPaginationChange:ie,...u&&{getPaginationRowModel:s_()}}),ye=((Ti=q.getState().pagination)==null?void 0:Ti.pageIndex)+1||1,[Q,xe]=x.useState(!1),[Re,Ve]=x.useState(!1),[st,Ge]=x.useState(ye),et=x.useMemo(()=>!ge||ge===0||isNaN(ge)?1:Math.max(Math.ceil(ge/re.pageSize),1),[ge,re.pageSize,re.pageIndex,Q,I]);x.useEffect(()=>{A&&(Kr(),S&&S(!1))},[A]),x.useEffect(()=>{if(e&&k&&D)try{const{setPagination:L}=require("../../redux/slices/tableDataSlice");D(L({tableType:e,pagination:re}))}catch{}},[re.pageIndex,re.pageSize,e]),x.useEffect(()=>{Ge(ye)},[ye]),x.useEffect(()=>{if(k&&D)try{const{setGlobalSorting:L}=require("../../redux/slices/tableDataSlice");D(L({tableType:e,sorting:F}))}catch{}},[(X=F[0])==null?void 0:X.desc,(K=F[0])==null?void 0:K.id]);const at=x.useMemo(()=>{var me,Pe,ot;const L={pageNumber:q.getState().pagination.pageIndex,pageSize:q.getState().pagination.pageSize},de={sortBy:F.length&&(me=F[0])!=null&&me.id?(Pe=F[0])==null?void 0:Pe.id:void 0,order:F.length&&(ot=F[0])!=null&&ot.desc?"desc":"asc"},Y={searchTerm:N,searchColumns:E.length>0?E:void 0};return{options:t,filters:Object.keys(ce).length>0?ce:H,...Y,...L,...de,fetchDeleted:I}},[N,ce,F,q.getState().pagination.pageIndex,q.getState().pagination.pageSize,(ue=F[0])==null?void 0:ue.id,(Ae=F[0])==null?void 0:Ae.desc,I,Q,t==null?void 0:t.arg,E]),fn=L=>{if(L){const de=r.filter(Y=>!Y.isDisabled).map(Y=>Y.id);G(new Set(de))}else G(new Set)};x.useEffect(()=>()=>{var L;ne&&((L=window.api)!=null&&L.deleteExportedFile)&&window.api.deleteExportedFile((ne??"").replace("download:\\",""))},[ne]),x.useEffect(()=>{const L=async()=>{if(i){ae.current=!0;try{oe();let me=0;if(e===Co.SCANRESULT&&(t!=null&&t.usePermanentCache)){const ot=`scandetails_count_${JSON.stringify({...at,pageNumber:void 0,pageSize:void 0})}`,rn=localStorage.getItem(ot)||sessionStorage.getItem(ot);if(rn)try{const Yt=JSON.parse(rn);Yt&&typeof Yt.totalRecords=="number"&&(me=Yt.totalRecords)}catch{}me||(me=(await i({...at,usePermanentCache:(t==null?void 0:t.usePermanentCache)||!1})).totalRecords??0)}else me=(await i({...at,...t!=null&&t.usePermanentCache?{usePermanentCache:t.usePermanentCache}:{}})).totalRecords??0;const Pe=Math.max(Math.ceil(me/re.pageSize)-1,0);r.length===0&&re.pageIndex>0?ie(ot=>({...ot,pageIndex:Math.min(re.pageIndex,Pe)})):re.pageIndex>Pe&&ie(ot=>({...ot,pageIndex:Pe})),q.setPageCount(Math.ceil(me/re.pageSize))}catch(me){console.error("Failed to update total count",me)}finally{ae.current=!1;const me=JSON.stringify({pagination:re,searchApplied:Re,sorting:F,isDeletedItemsList:I});me!==se.current&&(se.current=me,Kr()),Z()}}},de=JSON.stringify({options:t,filters:ce,searchTerm:N,searchColumns:E,sorting:F,isDeletedItemsList:I,pageSize:re.pageSize});de!==pe.current&&(L(),pe.current=de)},[t,ce,N,e,F,I,re.pageSize,E]);const es=L=>{var de;L.key==="Enter"&&((de=ee.current)==null||de.click())},Ol=(L,de)=>{G(Y=>{const me=new Set(Y);return de?me.add(L):me.delete(L),me})},Nl=async()=>{var de;if(!e)return;let L="";try{if(oe(),P)L=await P(e,H,t,I);else if((de=window.api)!=null&&de.exportTable)L=t?await window.api.exportTable(e,H,t,I):await window.api.exportTable(e,H,{},I);else{j(pt.ERROR,"Export functionality is not available. Please provide an onExport handler.");return}te(L);const Y=document.createElement("a");Y.href=L,Y.download=`export-${e}.csv`,document.body.appendChild(Y),Y.click(),document.body.removeChild(Y),j(pt.SUCCESS,"Export initiated successfully")}catch(Y){console.error("Export error",Y),j(pt.ERROR,"Export failed")}finally{Z(),L&&L.startsWith("blob:")&&URL.revokeObjectURL(L)}},ts=()=>{let L=0;return r.forEach(de=>{de.isDisabled||L++}),L},ns=async()=>{if(!(!i||!l)){oe(),ie(L=>({...L,pageIndex:0}));try{Ve(N!==""),await Kr()}catch(L){console.error("Search error:",L),j(pt.ERROR,"Search operation failed.")}finally{Z()}}},Kr=async()=>{if(!(!i||!l)){oe();try{const L=await i({...at,...t!=null&&t.usePermanentCache?{usePermanentCache:t.usePermanentCache}:{}}),de=L.totalRecords;if(we(de),l(L.data),k&&D)try{const{setTotalCount:Y,setTableData:me}=require("../../redux/slices/tableDataSlice");D(Y({tableType:e,totalCount:de})),D(me({tableType:e,data:L.data}))}catch{}}catch(L){console.error("Failed to fetch data",L),j(pt.ERROR,"Failed to fetch data!")}finally{Z()}}};x.useEffect(()=>{const L=JSON.stringify({pagination:re,searchApplied:Re,sorting:F,isDeletedItemsList:I});L!==se.current&&!ae.current&&(se.current=L,Kr())},[re.pageIndex,re.pageSize,Re,F,I]);const mr=Object.entries(f).map(([L,de])=>({value:L,label:de})),Tl=()=>G(new Set),Ni=()=>J(""),br=x.useMemo(()=>!!h,[h]),rs=z.size>0,is=L=>{let de=0,Y=!1;return br&&(de+=57),q.getHeaderGroups().forEach(me=>{me.headers.forEach(Pe=>{if(!Y&&Pe.column.columnDef.fixedColumn){if(Pe.id===L){Y=!0;return}Pe.getSize()?de+=Pe.getSize()+16:de+=150}})}),`${de}px`},os=T,ss=$;return b.jsxs("div",{className:"py-0 px-0 flex flex-col gap-2 mt-2",children:[b.jsxs("div",{className:"main-action-wrapper flex gap-2 relative justify-end",children:[d&&!!e&&b.jsxs("button",{onClick:Nl,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:[b.jsx(Ra,{className:"h-4 w-4"}),b.jsx("span",{children:"Export"})]}),s&&b.jsxs("button",{onClick:()=>fe(!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:[Q&&b.jsx("span",{className:"h-2 w-2 bg-brand-primary rounded-full"}),b.jsx(Uv,{className:"h-3 w-3 text-brand-primary"}),b.jsx("span",{children:"Filters"})]}),br&&rs&&b.jsx("div",{className:"rounded-md text-gray-500 dark:text-gray-400 text-sm appearance-none absolute top-0 left-0 z-30",children:b.jsx(Vm,{placeholder:"Bulk Actions",className:"w-[10rem] bulk-actions-select",value:mr.find(L=>L.value===V)||null,options:mr,onChange:L=>{L&&(J(L.value),h&&(h(L.value,z,Tl,Ni),J("")))},isClearable:!0,styles:{control:(L,de)=>({...L,borderColor:de.isFocused?"var(--brand-orange)":"var(--border-color)",borderRadius:"0.25rem",cursor:"pointer",backgroundColor:"var(--bg-color)",color:"var(--text-color)",boxShadow:de.isFocused?"0 0 0 1px var(--brand-orange)":"none",":hover":{borderColor:"var(--brand-orange)"}}),input:L=>({...L,color:"var(--text-color)"}),singleValue:L=>({...L,color:"var(--text-color)"}),placeholder:L=>({...L,color:"var(--secondary-text-color)"}),option:(L,de)=>({...L,backgroundColor:de.isSelected?"var(--brand-orange)":de.isFocused?"var(--hover-bg-color)":"var(--bg-color)",color:de.isSelected?"white":"var(--text-color)",cursor:"pointer",":active":{backgroundColor:"var(--brand-orange)"}}),menu:L=>({...L,backgroundColor:"var(--bg-color)",color:"var(--text-color)",border:"1px solid var(--border-color)",zIndex:9999}),dropdownIndicator:L=>({...L,cursor:"pointer",color:"var(--secondary-text-color)",":hover":{color:"var(--brand-orange)"}}),clearIndicator:L=>({...L,cursor:"pointer",color:"var(--secondary-text-color)",":hover":{color:"var(--brand-orange)"}}),indicatorSeparator:L=>({...L,backgroundColor:"var(--border-color)"})}})}),o&&b.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:[b.jsx("input",{type:"text","data-testid":"table-search-input",placeholder:"Search...",value:N,onKeyDown:es,onChange:L=>M(L.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)"}}),b.jsx("button",{ref:ee,"data-testid":"table-search-button",className:"px-4 py-0 transition-colors",style:{backgroundColor:"var(--brand-light)",color:"var(--brand-dark)"},onMouseEnter:L=>L.currentTarget.style.backgroundColor="var(--hover-bg-color)",onMouseLeave:L=>L.currentTarget.style.backgroundColor="var(--brand-light)",onClick:ns,children:b.jsx(Km,{size:22})})]})]}),m&&ss&&b.jsx(ss,{connectorDetail:C,scanDetails:y,scanObjects:v??[]}),b.jsx("div",{className:"main-table-wrapper flex-grow overflow-hidden rounded-md table-container",children:b.jsx("div",{className:`overflow-auto${_?` ${_}`:""}`,style:_?{}:{maxHeight:"calc(100vh - 21rem)"},children:b.jsxs("table",{className:"table-auto w-full text-left border-collapse border dark:border-gray-700 main-table",children:[b.jsx("thead",{className:"sticky -top-1 z-20 bg-brand-surface-subtle dark:bg-gray-800",children:q.getHeaderGroups().map((L,de)=>b.jsxs("tr",{children:[br&&b.jsx("th",{className:"sticky -left-1 z-20 table-header checkbox font-bold cursor-pointer",style:{width:"40px"},children:b.jsx("input",{type:"checkbox",className:`${ou} dark:border-gray-600`,checked:q.getRowModel().rows.length>0&&z.size===ts()&&ts()>0,onChange:Y=>{Y.stopPropagation(),fn(Y.target.checked)}})}),L.headers.map((Y,me)=>{var rn,Yt;let Pe="";const ot=["actions"].includes((rn=Y==null?void 0:Y.column)==null?void 0:rn.id);return Y.column.columnDef.fixedColumn&&(Pe+=" sticky z-10"),Y.column.columnDef.centerAlign&&(Pe+=" text-center"),ot&&(Pe+=" right-fixed"),["#","id"].includes((Yt=Y==null?void 0:Y.column)==null?void 0:Yt.id)&&(Pe+=" id-column"),b.jsxs("th",{className:`table-header ${p?"border dark:border-gray-600":""} font-bold whitespace-nowrap text-ellipsis cursor-pointer ${Pe}`,style:{minWidth:Y.column.columnDef.minSize||"auto",maxWidth:Y.column.columnDef.maxSize||"auto",left:Y.column.columnDef.fixedColumn?is(Y.id):void 0,right:ot?0:void 0},onClick:()=>{Y.column.getCanSort()&&Y.column.toggleSorting()},children:[Y.isPlaceholder?null:Mh(Y.column.columnDef.header,Y.getContext()),b.jsxs("span",{className:"ml-0",children:[Y.column.getIsSorted()==="asc"&&b.jsx(p_,{size:24,className:"inline-block pb-1"}),Y.column.getIsSorted()==="desc"&&b.jsx(g_,{size:24,className:"inline-block pb-1"})]})]},`${Y.id}_${me}`)})]},`${L.id}_${de}`))}),b.jsx("tbody",{children:q.getRowModel().rows.length===0?b.jsx("tr",{children:b.jsx("td",{colSpan:n.length+(br?1:0),className:"text-center text-sm py-4 text-gray-600 dark:text-gray-400",children:"No data available"})}):q.getRowModel().rows.map((L,de)=>b.jsxs("tr",{className:`table-data${g?" cursor-pointer":""}`,onClick:Y=>{g&&!Y.target.closest('input[type="checkbox"]')&&g(L.original)},children:[br&&b.jsx("td",{className:"table-padding checkbox sticky -left-1 z-10",style:{width:"40px"},onClick:Y=>{Y.stopPropagation();const me=Y.currentTarget.querySelector('input[type="checkbox"]');me&&me.click()},children:b.jsx("input",{type:"checkbox",disabled:L.original.isDisabled,className:`${ou} dark:border-gray-600`,checked:z.has(L.original.id)&&!L.original.isDisabled,onChange:Y=>{L.original.isDisabled||Ol(L.original.id,Y.target.checked)},onClick:Y=>Y.stopPropagation()})}),L.getVisibleCells().map((Y,me)=>{var rn;let Pe="";const ot=["actions","startTime","endTime","created_at","updated_at","created","updated"].includes((rn=Y==null?void 0:Y.column)==null?void 0:rn.id);return Y.column.columnDef.preLine&&(Pe+=" pre-line"),Y.column.columnDef.fixedColumn&&(Pe+=" sticky z-10"),Y.column.columnDef.centerAlign&&(Pe+=" text-center"),ot&&(Pe+=" right-fixed"),b.jsx("td",{className:`table-padding ${Pe} ${p?"border":""} whitespace-nowrap text-ellipsis`,style:{minWidth:Y.column.columnDef.minSize||"auto",maxWidth:Y.column.columnDef.maxSize||"auto",left:Y.column.columnDef.fixedColumn?is(Y.column.id):void 0,right:ot?0:void 0,backgroundColor:Y.column.columnDef.fixedColumn?"var(--bg-color)":void 0,borderColor:p?"var(--border-color)":void 0,color:"var(--text-color)"},onClick:Yt=>{Y.column.columnDef.disableClick&&Yt.stopPropagation()},children:Mh(Y.column.columnDef.cell,Y.getContext())},`${Y.id}_${me}`)})]},`${L.id}_${de}`))})]})})}),u&&b.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:[b.jsxs("div",{className:"flex items-center space-x-1",children:[b.jsx("button",{onClick:()=>q.setPageIndex(0),disabled:re.pageIndex===0,className:"disabled:opacity-50 transition-colors",style:{color:"var(--secondary-text-color)"},onMouseEnter:L=>!L.currentTarget.disabled&&(L.currentTarget.style.color="var(--brand-orange)"),onMouseLeave:L=>L.currentTarget.style.color="var(--secondary-text-color)",children:b.jsx(h_,{size:20})}),b.jsx("button",{onClick:()=>q.previousPage(),disabled:re.pageIndex===0,className:"disabled:opacity-50 transition-colors",style:{color:"var(--secondary-text-color)"},onMouseEnter:L=>!L.currentTarget.disabled&&(L.currentTarget.style.color="var(--brand-orange)"),onMouseLeave:L=>L.currentTarget.style.color="var(--secondary-text-color)",children:b.jsx(m_,{size:20})}),b.jsxs("span",{className:"pagination-content",style:{color:"var(--text-color)"},children:["Page",b.jsx("input",{type:"number",value:st,onChange:L=>{const de=L.target.value.replace(/^0+/,"");Ge(de===""?"":Number(de))},onBlur:()=>{const L=Math.min(Math.max(Number(st),1),et);Ge(L),q.setPageIndex(L-1)},onKeyDown:L=>{if(L.key==="Enter"){const de=Math.min(Math.max(Number(st),1),et);Ge(de),q.setPageIndex(de-1)}},className:"px-2 py-1 rounded text-center mx-2",style:{width:`${String(st||iu).length+iu}ch`,backgroundColor:"var(--bg-color)",border:"1px solid var(--border-color)",color:"var(--text-color)"}}),"of ",b.jsx("span",{className:"mx-1",children:et})]}),b.jsx("button",{onClick:()=>q.nextPage(),disabled:re.pageIndex+1===et,className:"disabled:opacity-50 transition-colors",style:{color:"var(--secondary-text-color)"},onMouseEnter:L=>!L.currentTarget.disabled&&(L.currentTarget.style.color="var(--brand-orange)"),onMouseLeave:L=>L.currentTarget.style.color="var(--secondary-text-color)",children:b.jsx(b_,{size:20})}),b.jsx("button",{onClick:()=>q.setPageIndex(et),disabled:re.pageIndex+1===et,className:"disabled:opacity-50 transition-colors",style:{color:"var(--secondary-text-color)"},onMouseEnter:L=>!L.currentTarget.disabled&&(L.currentTarget.style.color="var(--brand-orange)"),onMouseLeave:L=>L.currentTarget.style.color="var(--secondary-text-color)",children:b.jsx(f_,{size:20})})]}),R&&b.jsx("button",{"data-testid":I?"view-active-items-button":"view-deleted-items-button",onClick:()=>{if(G(new Set),re.pageIndex=ta,re.pageSize=ea,k&&D)try{const{setPagination:L}=require("../../redux/slices/tableDataSlice");D(L({tableType:e,pagination:{pageIndex:ta,pageSize:ea}}));try{const{setFilters:de}=require("../../redux/slices/filterSlice");D(de({tableType:e,filters:{}}))}catch{}}catch{}xe(!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 ${I?"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:I?"View Active Items":"View Deleted Items"}),b.jsxs("div",{className:"flex items-center space-x-2 pagination-content",style:{color:"var(--text-color)"},children:[b.jsx("span",{children:"Rows per page"}),b.jsx("div",{style:{width:"90px"},children:b.jsx(Po,{placeholder:"",options:[10,25,50,100].map(L=>({label:L.toString(),value:L.toString()})),selectedOptions:[{label:re.pageSize.toString(),value:re.pageSize.toString()}],handleChange:L=>{L&&ie(de=>({...de,pageSize:+L.value}))},isMulti:!1,closeMenuOnSelect:!0,isClearable:!1,menuPosition:"fixed",customStyles:{control:(L,de)=>({...L,minHeight:"34px",height:"34px",backgroundColor:"var(--bg-color)",borderColor:de.isFocused?"var(--brand-orange)":"var(--border-color)",boxShadow:de.isFocused?"0 0 0 1px var(--brand-orange)":L.boxShadow})}})})]})]}),s&&a&&l&&c&&os&&b.jsx(os,{type:e,fields:a,inlineRowFields:a==null?void 0:a.filter(L=>L.inline===!0),visible:Ne,onClose:()=>fe(!1),title:"Filters",okText:"Apply Filters",cancelText:"Clear",data:r,setFilteredData:l,filtersApplied:Q,toggleFilterApply:xe,fetchTableData:i,pageNumber:re.pageIndex,pageSize:re.pageSize,setTotalRowCount:we,setPagination:ie,options:t,sorting:F,setSorting:B,showDeletedItems:I,setExportFilters:Te,searchTerm:N})]})},k_=({isOpen:e,onClose:t,onConfirm:n,title:r,message:i,confirmText:o="Confirm",cancelText:s="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 b.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[b.jsx("div",{className:"absolute inset-0 bg-gray-500 bg-opacity-75 transition-opacity",onClick:t}),b.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:[b.jsx("div",{className:"px-4 pt-5 pb-4 sm:p-6 sm:pb-4",style:{backgroundColor:"var(--bg-color)"},children:b.jsxs("div",{className:"sm:flex sm:items-start",children:[b.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:b.jsx(Wp,{className:`h-6 w-6 ${c()}`})}),b.jsxs("div",{className:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left",children:[b.jsx("h3",{className:"text-lg leading-6 font-medium",style:{color:"var(--text-color)"},children:r}),b.jsx("div",{className:"mt-2",children:b.jsx("p",{className:"text-sm whitespace-pre-line",style:{color:"var(--secondary-text-color)"},children:i})})]})]})}),b.jsxs("div",{className:"px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse",style:{backgroundColor:"var(--hover-bg-color)"},children:[b.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...":o}),b.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:s})]})]})]})};var ab={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(al,function(){var n=1e3,r=6e4,i=36e5,o="millisecond",s="second",a="minute",l="hour",c="day",u="week",d="month",f="quarter",h="year",g="date",p="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,C={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(D){var k=["th","st","nd","rd"],O=D%100;return"["+D+(k[(O-20)%10]||k[O]||k[0])+"]"}},y=function(D,k,O){var N=String(D);return!N||N.length>=k?D:""+Array(k+1-N.length).join(O)+D},I={s:y,z:function(D){var k=-D.utcOffset(),O=Math.abs(k),N=Math.floor(O/60),M=O%60;return(k<=0?"+":"-")+y(N,2,"0")+":"+y(M,2,"0")},m:function D(k,O){if(k.date()<O.date())return-D(O,k);var N=12*(O.year()-k.year())+(O.month()-k.month()),M=k.clone().add(N,d),F=O-M<0,B=k.clone().add(N+(F?-1:1),d);return+(-(N+(O-M)/(F?M-B:B-M))||0)},a:function(D){return D<0?Math.ceil(D)||0:Math.floor(D)},p:function(D){return{M:d,y:h,w:u,d:c,D:g,h:l,m:a,s,ms:o,Q:f}[D]||String(D||"").toLowerCase().replace(/s$/,"")},u:function(D){return D===void 0}},w="en",R={};R[w]=C;var A="$isDayjsObject",S=function(D){return D instanceof T||!(!D||!D[A])},_=function D(k,O,N){var M;if(!k)return w;if(typeof k=="string"){var F=k.toLowerCase();R[F]&&(M=F),O&&(R[F]=O,M=F);var B=k.split("-");if(!M&&B.length>1)return D(B[0])}else{var z=k.name;R[z]=k,M=z}return!N&&M&&(w=M),M||!N&&w},E=function(D,k){if(S(D))return D.clone();var O=typeof k=="object"?k:{};return O.date=D,O.args=arguments,new T(O)},P=I;P.l=_,P.i=S,P.w=function(D,k){return E(D,{locale:k.$L,utc:k.$u,x:k.$x,$offset:k.$offset})};var T=function(){function D(O){this.$L=_(O.locale,null,!0),this.parse(O),this.$x=this.$x||O.x||{},this[A]=!0}var k=D.prototype;return k.parse=function(O){this.$d=function(N){var M=N.date,F=N.utc;if(M===null)return new Date(NaN);if(P.u(M))return new Date;if(M instanceof Date)return new Date(M);if(typeof M=="string"&&!/Z$/i.test(M)){var B=M.match(m);if(B){var z=B[2]-1||0,G=(B[7]||"0").substring(0,3);return F?new Date(Date.UTC(B[1],z,B[3]||1,B[4]||0,B[5]||0,B[6]||0,G)):new Date(B[1],z,B[3]||1,B[4]||0,B[5]||0,B[6]||0,G)}}return new Date(M)}(O),this.init()},k.init=function(){var O=this.$d;this.$y=O.getFullYear(),this.$M=O.getMonth(),this.$D=O.getDate(),this.$W=O.getDay(),this.$H=O.getHours(),this.$m=O.getMinutes(),this.$s=O.getSeconds(),this.$ms=O.getMilliseconds()},k.$utils=function(){return P},k.isValid=function(){return this.$d.toString()!==p},k.isSame=function(O,N){var M=E(O);return this.startOf(N)<=M&&M<=this.endOf(N)},k.isAfter=function(O,N){return E(O)<this.startOf(N)},k.isBefore=function(O,N){return this.endOf(N)<E(O)},k.$g=function(O,N,M){return P.u(O)?this[N]:this.set(M,O)},k.unix=function(){return Math.floor(this.valueOf()/1e3)},k.valueOf=function(){return this.$d.getTime()},k.startOf=function(O,N){var M=this,F=!!P.u(N)||N,B=P.p(O),z=function(ge,we){var ce=P.w(M.$u?Date.UTC(M.$y,we,ge):new Date(M.$y,we,ge),M);return F?ce:ce.endOf(c)},G=function(ge,we){return P.w(M.toDate()[ge].apply(M.toDate("s"),(F?[0,0,0,0]:[23,59,59,999]).slice(we)),M)},V=this.$W,J=this.$M,le=this.$D,he="set"+(this.$u?"UTC":"");switch(B){case h:return F?z(1,0):z(31,11);case d:return F?z(1,J):z(0,J+1);case u:var Ne=this.$locale().weekStart||0,fe=(V<Ne?V+7:V)-Ne;return z(F?le-fe:le+(6-fe),J);case c:case g:return G(he+"Hours",0);case l:return G(he+"Minutes",1);case a:return G(he+"Seconds",2);case s:return G(he+"Milliseconds",3);default:return this.clone()}},k.endOf=function(O){return this.startOf(O,!1)},k.$set=function(O,N){var M,F=P.p(O),B="set"+(this.$u?"UTC":""),z=(M={},M[c]=B+"Date",M[g]=B+"Date",M[d]=B+"Month",M[h]=B+"FullYear",M[l]=B+"Hours",M[a]=B+"Minutes",M[s]=B+"Seconds",M[o]=B+"Milliseconds",M)[F],G=F===c?this.$D+(N-this.$W):N;if(F===d||F===h){var V=this.clone().set(g,1);V.$d[z](G),V.init(),this.$d=V.set(g,Math.min(this.$D,V.daysInMonth())).$d}else z&&this.$d[z](G);return this.init(),this},k.set=function(O,N){return this.clone().$set(O,N)},k.get=function(O){return this[P.p(O)]()},k.add=function(O,N){var M,F=this;O=Number(O);var B=P.p(N),z=function(J){var le=E(F);return P.w(le.date(le.date()+Math.round(J*O)),F)};if(B===d)return this.set(d,this.$M+O);if(B===h)return this.set(h,this.$y+O);if(B===c)return z(1);if(B===u)return z(7);var G=(M={},M[a]=r,M[l]=i,M[s]=n,M)[B]||1,V=this.$d.getTime()+O*G;return P.w(V,this)},k.subtract=function(O,N){return this.add(-1*O,N)},k.format=function(O){var N=this,M=this.$locale();if(!this.isValid())return M.invalidDate||p;var F=O||"YYYY-MM-DDTHH:mm:ssZ",B=P.z(this),z=this.$H,G=this.$m,V=this.$M,J=M.weekdays,le=M.months,he=M.meridiem,Ne=function(we,ce,H,Te){return we&&(we[ce]||we(N,F))||H[ce].slice(0,Te)},fe=function(we){return P.s(z%12||12,we,"0")},ge=he||function(we,ce,H){var Te=we<12?"AM":"PM";return H?Te.toLowerCase():Te};return F.replace(v,function(we,ce){return ce||function(H){switch(H){case"YY":return String(N.$y).slice(-2);case"YYYY":return P.s(N.$y,4,"0");case"M":return V+1;case"MM":return P.s(V+1,2,"0");case"MMM":return Ne(M.monthsShort,V,le,3);case"MMMM":return Ne(le,V);case"D":return N.$D;case"DD":return P.s(N.$D,2,"0");case"d":return String(N.$W);case"dd":return Ne(M.weekdaysMin,N.$W,J,2);case"ddd":return Ne(M.weekdaysShort,N.$W,J,3);case"dddd":return J[N.$W];case"H":return String(z);case"HH":return P.s(z,2,"0");case"h":return fe(1);case"hh":return fe(2);case"a":return ge(z,G,!0);case"A":return ge(z,G,!1);case"m":return String(G);case"mm":return P.s(G,2,"0");case"s":return String(N.$s);case"ss":return P.s(N.$s,2,"0");case"SSS":return P.s(N.$ms,3,"0");case"Z":return B}return null}(we)||B.replace(":","")})},k.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},k.diff=function(O,N,M){var F,B=this,z=P.p(N),G=E(O),V=(G.utcOffset()-this.utcOffset())*r,J=this-G,le=function(){return P.m(B,G)};switch(z){case h:F=le()/12;break;case d:F=le();break;case f:F=le()/3;break;case u:F=(J-V)/6048e5;break;case c:F=(J-V)/864e5;break;case l:F=J/i;break;case a:F=J/r;break;case s:F=J/n;break;default:F=J}return M?F:P.a(F)},k.daysInMonth=function(){return this.endOf(d).$D},k.$locale=function(){return R[this.$L]},k.locale=function(O,N){if(!O)return this.$L;var M=this.clone(),F=_(O,N,!0);return F&&(M.$L=F),M},k.clone=function(){return P.w(this.$d,this)},k.toDate=function(){return new Date(this.valueOf())},k.toJSON=function(){return this.isValid()?this.toISOString():null},k.toISOString=function(){return this.$d.toISOString()},k.toString=function(){return this.$d.toUTCString()},D}(),$=T.prototype;return E.prototype=$,[["$ms",o],["$s",s],["$m",a],["$H",l],["$W",c],["$M",d],["$y",h],["$D",g]].forEach(function(D){$[D[1]]=function(k){return this.$g(k,D[0],D[1])}}),E.extend=function(D,k){return D.$i||(D(k,T,E),D.$i=!0),E},E.locale=_,E.isDayjs=S,E.unix=function(D){return E(1e3*D)},E.en=R[w],E.Ls=R,E.p={},E})})(ab);var P_=ab.exports;const Fa=ll(P_);var lb={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(al,function(){var n="minute",r=/[+-]\d\d(?::?\d\d)?/g,i=/([+-]|\d\d)/g;return function(o,s,a){var l=s.prototype;a.utc=function(p){var m={date:p,utc:!0,args:arguments};return new s(m)},l.utc=function(p){var m=a(this.toDate(),{locale:this.$L,utc:!0});return p?m.add(this.utcOffset(),n):m},l.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var c=l.parse;l.parse=function(p){p.utc&&(this.$u=!0),this.$utils().u(p.$offset)||(this.$offset=p.$offset),c.call(this,p)};var u=l.init;l.init=function(){if(this.$u){var p=this.$d;this.$y=p.getUTCFullYear(),this.$M=p.getUTCMonth(),this.$D=p.getUTCDate(),this.$W=p.getUTCDay(),this.$H=p.getUTCHours(),this.$m=p.getUTCMinutes(),this.$s=p.getUTCSeconds(),this.$ms=p.getUTCMilliseconds()}else u.call(this)};var d=l.utcOffset;l.utcOffset=function(p,m){var v=this.$utils().u;if(v(p))return this.$u?0:v(this.$offset)?d.call(this):this.$offset;if(typeof p=="string"&&(p=function(w){w===void 0&&(w="");var R=w.match(r);if(!R)return null;var A=(""+R[0]).match(i)||["-",0,0],S=A[0],_=60*+A[1]+ +A[2];return _===0?0:S==="+"?_:-_}(p),p===null))return this;var C=Math.abs(p)<=16?60*p:p;if(C===0)return this.utc(m);var y=this.clone();if(m)return y.$offset=C,y.$u=!1,y;var I=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(y=this.local().add(C+I,n)).$offset=C,y.$x.$localOffset=I,y};var f=l.format;l.format=function(p){var m=p||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return f.call(this,m)},l.valueOf=function(){var p=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*p},l.isUTC=function(){return!!this.$u},l.toISOString=function(){return this.toDate().toISOString()},l.toString=function(){return this.toDate().toUTCString()};var h=l.toDate;l.toDate=function(p){return p==="s"&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():h.call(this)};var g=l.diff;l.diff=function(p,m,v){if(p&&this.$u===p.$u)return g.call(this,p,m,v);var C=this.local(),y=a(p).local();return g.call(C,y,m,v)}}})})(lb);var F_=lb.exports;const O_=ll(F_);Fa.extend(O_);const N_=({seconds:e,pauseOnMount:t=!1,startDateTime:n,runningTime:r=!0})=>{const[i,o]=x.useState(e),[s,a]=x.useState(0);x.useEffect(()=>{!n&&typeof e=="number"&&!isNaN(e)&&o(e)},[e,n]),x.useEffect(()=>{let d;if(n){const f=Fa.utc(n,"YYYY-MM-DD HH:mm:ss");d=setInterval(()=>{const g=Fa.utc().diff(f,"second");a(g)},1e3)}else!t&&typeof i=="number"&&(d=setInterval(()=>{o(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?s:i;return typeof u!="number"||isNaN(u)?b.jsx("span",{className:"text-gray-400 dark:text-gray-500 text-sm font-mono",children:"-- --"}):b.jsx("span",{className:`font-mono ${c(u)}`,children:l(u)})},T_=({error:e,onRetry:t,fallbackPath:n})=>{const[r,i]=x.useState(!1),[o,s]=x.useState(!1),a=async()=>{s(!0);try{n?window.location.href=n:window.location.reload()}finally{s(!1)}},l=()=>{t()};return x.useEffect(()=>{typeof window<"u"&&window.Sentry&&window.Sentry.captureException(e)},[e]),b.jsx("div",{className:"fixed inset-0 z-[9999] overflow-auto",style:{backgroundColor:"var(--app-bg-color, #ffffff)"},children:b.jsx("div",{className:"flex items-center justify-center min-h-screen w-full p-4 sm:p-8 font-sans",children:b.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:[b.jsxs("div",{className:"mb-8",children:[b.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:b.jsx(xd,{size:32})}),b.jsx("h2",{className:"text-xl font-semibold mb-3 leading-snug",style:{color:"var(--text-color)"},children:"Something went wrong"}),b.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"})]}),b.jsxs("div",{className:"flex flex-wrap justify-center gap-3 mb-8",children:[b.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:o,children:[b.jsx(y_,{size:16,className:o?"animate-spin ":""}),"Try Again"]}),b.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:o,children:[b.jsx(d_,{size:16}),n?"Go to Home":"Refresh Page"]})]}),process.env.NODE_ENV!=="production"&&b.jsxs("div",{className:"pt-6",style:{borderTop:"1px solid var(--border-color)"},children:[b.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?b.jsx(v_,{size:16}):b.jsx(x_,{size:16}),r?"Hide":"Show"," Error Details"]}),r&&b.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:[b.jsxs("div",{className:"mb-4 flex flex-col gap-2",children:[b.jsx("span",{className:"font-semibold text-sm",style:{color:"var(--text-color)"},children:"Error Message:"}),b.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})]}),b.jsxs("div",{className:"mb-4 flex flex-col gap-2",children:[b.jsx("span",{className:"font-semibold text-sm",style:{color:"var(--text-color)"},children:"Timestamp:"}),b.jsx("span",{className:"text-sm leading-snug break-words",style:{color:"var(--text-color)"},children:new Date().toLocaleString()})]}),e.stack&&b.jsxs("div",{className:"mb-0 flex flex-col gap-2",children:[b.jsx("span",{className:"font-semibold text-sm",style:{color:"var(--text-color)"},children:"Stack Trace:"}),b.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 D_ extends x.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?b.jsx(T_,{error:this.state.error,onRetry:this.handleReset,fallbackPath:this.props.fallbackPath}):this.props.children}}class L_ extends x.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:b.jsxs("div",{className:"p-4 rounded",style:{backgroundColor:"rgba(239, 68, 68, 0.1)",border:"1px solid rgba(239, 68, 68, 0.3)"},children:[b.jsx("p",{className:"text-sm",style:{color:"#dc2626"},children:"Something went wrong displaying this component."}),process.env.NODE_ENV==="development"&&b.jsxs("details",{className:"mt-2",children:[b.jsx("summary",{className:"cursor-pointer text-xs",style:{color:"var(--text-color)"},children:"Error details"}),b.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 j_=({used:e,max:t,resourceName:n,warningThreshold:r=5,className:i=""})=>{const o=t-e;if(!t)return null;const a=o<=0?"exhausted":o<=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 b.jsxs("div",{className:`ml-2 px-2 py-1 rounded flex items-center gap-1 text-xs font-semibold ${i}`,style:l(),children:[b.jsxs("span",{children:[e," / ",t," (",o," available)"]}),a==="exhausted"&&b.jsxs("span",{className:"ml-2 font-semibold",children:["No more ",n," can be added."]})]})},B_=({displayText:e,hasMoreData:t,restDataLength:n,onClick:r,isTruncatedData:i,tooltipText:o="",customButtonEl:s})=>b.jsxs("div",{className:"flex gap-2 items-center",children:[b.jsx("div",{children:b.jsx("span",{children:b.jsx(gi,{text:o,isVisible:i,children:e})})}),t&&b.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:s||b.jsx(b.Fragment,{children:b.jsxs("span",{className:"text-xs",children:["+",n&&Number(n)>0?n:""]})})})]}),Rr={low:{label:"Low"},medium:{min:40,label:"Medium"},high:{min:70,label:"High"},critical:{min:90,label:"Critical"}},$_={low:{level:"low",label:Rr.low.label,color:"text-white",backgroundColor:"bg-green-500"},medium:{level:"medium",label:Rr.medium.label,color:"text-white",backgroundColor:"bg-yellow-500"},high:{level:"high",label:Rr.high.label,color:"text-white",backgroundColor:"bg-orange-500"},critical:{level:"critical",label:Rr.critical.label,color:"text-white",backgroundColor:"bg-red-500"}},wd=e=>e>=Rr.critical.min?"critical":e>=Rr.high.min?"high":e>=Rr.medium.min?"medium":"low",cb=e=>{const t=wd(e);return $_[t]},V_=e=>{const t=wd(e);return t==="high"||t==="critical"},G_=({score:e,customStyles:t})=>{const{label:n,backgroundColor:r,color:i}=cb(e);return b.jsx("span",{className:Ht("px-2 py-1 rounded text-xs font-semibold",r,i,t),children:n})},ub=(e={})=>{const{fallbackPath:t="/assets",basePath:n=e.basePath||t}=e;return{getAssetPath:x.useMemo(()=>i=>{if(!i)return n;const o=i.startsWith("/")?i.slice(1):i;return`${n.endsWith("/")?n.slice(0,-1):n}/${o}`},[n]),basePath:n}},db=e=>{const{getAssetPath:t}=ub(),n=x.useMemo(()=>!e||e.trim()===""?t("files/unknown_file.svg"):t(`files/${e.toLowerCase()}.svg`),[e,t]),r=x.useMemo(()=>t("files/unknown_file.svg"),[t]);return{iconPath:n,fallbackPath:r}},z_=({category:e,className:t="w-3 h-4 object-cover"})=>{const{iconPath:n,fallbackPath:r}=db(e),[i,o]=x.useState(!1),s=x.useCallback(()=>{o(!0)},[]),a=i?r:n;return b.jsx("img",{src:a,alt:e||"unknown file",className:t,onError:s})},fb=({message:e="No Active Attributes Present!"})=>b.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:[b.jsx(xd,{role:"img",size:14}),b.jsx("span",{children:e})]}),H_=({icon:e,title:t="Select Country"})=>{const n=x.useRef(null),[r,i]=x.useState(!1);x.useEffect(()=>{const s=n.current;s&&i(s.scrollWidth>s.clientWidth)},[t]);const o=b.jsx("p",{ref:n,className:"overflow-hidden text-ellipsis whitespace-nowrap max-w-36",children:t});return b.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:[b.jsx("img",{src:e,alt:t,className:"w-4 h-4 mr-2 rounded-full object-cover"}),r?b.jsx(gi,{text:t,children:o}):o]})},W_=({isOpen:e,onDismiss:t,summaryData:n,errors:r=[],onDownload:i,onRetry:o,title:s,dataType:a})=>{if(x.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]=x.useState(!0);return b.jsx("div",{role:"dialog",className:"fixed inset-0 z-[1000] flex items-center justify-center bg-black/40",onClick:t,children:b.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:[b.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:"×"}),b.jsxs("div",{className:"p-4 border-b",style:{borderColor:"var(--border-color)"},children:[b.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[b.jsx(M_,{className:"text-blue-500",size:20}),b.jsx("h3",{className:"text-lg font-semibold",style:{color:"var(--text-color)"},children:s??"Result"})]}),b.jsxs("div",{className:"grid grid-cols-3 gap-4 mb-4",children:[b.jsxs("div",{className:"text-center",children:[b.jsx("div",{className:"text-2xl font-bold",style:{color:"var(--text-color)"},children:n.total}),b.jsx("div",{className:"text-sm",style:{color:"var(--secondary-text-color)"},children:"Total"})]}),b.jsxs("div",{className:"text-center",children:[b.jsx("div",{className:"text-2xl font-bold text-green-600 dark:text-green-400",children:n.success}),b.jsx("div",{className:"text-sm",style:{color:"var(--secondary-text-color)"},children:"Success"})]}),b.jsxs("div",{className:"text-center",children:[b.jsx("div",{className:"text-2xl font-bold text-red-600 dark:text-red-400",children:n.failed}),b.jsx("div",{className:"text-sm",style:{color:"var(--secondary-text-color)"},children:"Failed"})]})]}),b.jsx("div",{className:"w-full rounded-full h-2",style:{backgroundColor:"var(--brand-light)"},children:b.jsx("div",{className:"bg-green-600 dark:bg-green-400 h-2 rounded-full transition-all duration-500",style:{width:`${l}%`}})}),b.jsxs("div",{className:"text-sm font-bold mt-2",style:{color:"var(--secondary-text-color)"},children:[l.toFixed(0),"% successful"]})]}),r.length>0&&b.jsxs("div",{className:"p-4 border-b",style:{borderColor:"var(--border-color)"},children:[b.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:[b.jsxs("h4",{className:"text-md font-medium flex items-center gap-2",style:{color:"var(--text-color)"},children:[b.jsx(C_,{className:"text-amber-500"}),"Error Details (",r.length," issues)"]}),c?b.jsx(__,{style:{color:"var(--secondary-text-color)"}}):b.jsx(I_,{style:{color:"var(--secondary-text-color)"}})]}),c&&b.jsx("div",{className:"mt-4 space-y-2 max-h-60 overflow-y-auto",children:r.map(d=>b.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:[b.jsxs("div",{className:"font-medium",style:{color:"#dc2626"},children:[d.field?`${d.field}: `:"",d.error]}),d.value&&b.jsxs("div",{className:"mt-1 text-xs",style:{color:"var(--secondary-text-color)"},children:["Value: ",d.value]})]},d.id))})]}),b.jsxs("div",{className:"p-4 flex flex-wrap justify-end gap-2",children:[i&&b.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:[b.jsx(Ra,{}),"Download Errors"]}),o&&b.jsxs("button",{onClick:o,className:"px-4 py-2 rounded-md flex items-center gap-2 bg-brand-primary text-white hover:bg-opacity-90 transition-colors",children:[b.jsx(A_,{}),"Retry"]}),b.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"})]})]})})},X_=({isVisible:e,currentStep:t,error:n,onDismiss:r})=>{if(!e)return null;const i=(o,s)=>s?b.jsx(S_,{className:"w-6 h-6 text-green-600 dark:text-green-400"}):o?b.jsx("div",{className:"animate-spin rounded-full h-6 w-6",style:{borderWidth:"2px",borderStyle:"solid",borderColor:"var(--brand-light)",borderTopColor:"var(--brand-orange)"}}):b.jsx("div",{className:"w-6 h-6 border-2 rounded-full",style:{borderColor:"var(--border-color)"}});return b.jsx("div",{className:"fixed inset-0 bg-black/80 backdrop-blur-sm flex items-center justify-center z-50",children:b.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&&b.jsx("button",{onClick:r,className:"absolute top-4 right-4 p-2 transition-colors",style:{color:"var(--secondary-text-color)"},onMouseEnter:o=>o.currentTarget.style.color="var(--text-color)",onMouseLeave:o=>o.currentTarget.style.color="var(--secondary-text-color)",children:b.jsx(R_,{className:"w-5 h-5"})}),b.jsxs("div",{className:"text-center mb-8",children:[b.jsx("div",{className:"flex items-center justify-center mb-4",children:b.jsx(Ra,{className:"w-12 h-12 text-brand-primary"})}),b.jsx("h2",{className:"text-2xl font-bold mb-2",style:{color:"var(--text-color)"},children:"Installing Update"}),b.jsx("p",{style:{color:"var(--secondary-text-color)"},children:"Please wait while we install the update safely"})]}),n&&b.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:[b.jsxs("div",{className:"flex items-center space-x-2",children:[b.jsx(Ah,{className:"w-5 h-5 text-red-600 dark:text-red-400"}),b.jsx("p",{className:"text-sm text-red-700 dark:text-red-300 font-medium",children:"Installation Failed"})]}),b.jsx("p",{className:"text-sm text-red-600 dark:text-red-400 mt-1",children:n}),b.jsx("div",{className:"mt-3 flex space-x-2",children:b.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"})})]}),b.jsxs("div",{className:"space-y-4",children:[b.jsxs("div",{className:"flex items-center space-x-3",children:[i(t==="backup",t==="install"||t==="complete"),b.jsxs("div",{className:"flex-1",children:[b.jsxs("div",{className:"flex items-center space-x-2",children:[b.jsx(E_,{className:"w-4 h-4",style:{color:"var(--secondary-text-color)"}}),b.jsx("span",{className:"text-sm font-medium",style:{color:"var(--text-color)"},children:"Database Backup"})]}),b.jsx("p",{className:"text-xs",style:{color:"var(--secondary-text-color)"},children:t==="backup"?"Creating secure backup...":t==="install"||t==="complete"?"Backup completed":"Pending"})]})]}),b.jsxs("div",{className:"flex items-center space-x-3",children:[i(t==="install",t==="complete"),b.jsxs("div",{className:"flex-1",children:[b.jsxs("div",{className:"flex items-center space-x-2",children:[b.jsx(Ra,{className:"w-4 h-4",style:{color:"var(--secondary-text-color)"}}),b.jsx("span",{className:"text-sm font-medium",style:{color:"var(--text-color)"},children:"Update Installation"})]}),b.jsx("p",{className:"text-xs",style:{color:"var(--secondary-text-color)"},children:t==="install"?"Installing update...":t==="complete"?"Installation completed":"Pending"})]})]})]}),b.jsx("div",{className:"mt-6",children:b.jsx("div",{className:"w-full rounded-full h-2",style:{backgroundColor:"var(--brand-light)"},children:b.jsx("div",{className:"h-2 rounded-full transition-all duration-500",style:{width:t==="backup"?"50%":"100%",backgroundColor:"var(--brand-orange)"}})})}),b.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:b.jsxs("div",{className:"flex items-start space-x-2",children:[b.jsx(Ah,{className:"w-4 h-4 text-yellow-600 dark:text-yellow-400 mt-0.5 flex-shrink-0"}),b.jsxs("p",{className:"text-xs text-yellow-700 dark:text-yellow-300",children:[b.jsx("strong",{children:"Important:"})," Do not close the application during this process. The app will restart automatically after installation."]})]})})]})})},hb=({confidenceData:e,children:t,position:n="top"})=>{const[r,i]=x.useState(!1),[o,s]=x.useState({}),[a,l]=x.useState({}),c=x.useRef(null),u=x.useRef(null);x.useEffect(()=>{if(!r||!c.current)return;const p=c.current.getBoundingClientRect(),m=u.current;if(!m)return;const v=m.getBoundingClientRect(),C=window.innerWidth,y=window.innerHeight;let I=n,w=0,R=0,A=0,S=0;switch(n==="top"&&p.top-v.height<10?I="bottom":n==="bottom"&&p.bottom+v.height>y-10?I="top":n==="left"&&p.left-v.width<10?I="right":n==="right"&&p.right+v.width>C-10&&(I="left"),I){case"top":w=p.top-v.height-8,R=p.left+p.width/2-v.width/2,A=v.height-4,S=v.width/2-5;break;case"bottom":w=p.bottom+8,R=p.left+p.width/2-v.width/2,A=-5,S=v.width/2-5;break;case"left":w=p.top+p.height/2-v.height/2,R=p.left-v.width-8,A=v.height/2-5,S=v.width-4;break;case"right":w=p.top+p.height/2-v.height/2,R=p.right+8,A=v.height/2-5,S=-5;break}s({top:`${w}px`,left:`${R}px`,opacity:1,visibility:"visible"}),l({top:`${A}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:v,confidence_reason:C}=e;return b.jsxs("div",{className:"confidence-tooltip-content",children:[b.jsx("div",{className:"confidence-tooltip-header",children:b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx(Qm,{className:"h-4 w-4 text-blue-500"}),b.jsx("span",{className:"font-semibold",style:{color:"var(--text-color)"},children:"Classification Details"})]})}),b.jsxs("div",{className:"confidence-tooltip-body",children:[p!==void 0&&b.jsx("div",{className:"confidence-score-section",children:b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsx("span",{className:"text-sm font-medium",style:{color:"var(--secondary-text-color)"},children:"Confidence Score:"}),b.jsxs("span",{className:`text-sm font-bold ${d(p)}`,children:[f(p)," (",(p*100).toFixed(0),"%)"]})]})}),b.jsx("div",{className:"classification-reason-section",children:b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsx("span",{className:"text-sm font-medium",style:{color:"var(--secondary-text-color)"},children:"Classification Method:"}),b.jsx("span",{className:"text-sm",style:{color:"var(--text-color)"},children:h(m)})]})}),m==="sample_data"&&v&&b.jsxs("div",{className:"sample-data-section",children:[b.jsx("div",{className:"text-sm font-medium mb-1",style:{color:"var(--text-color)"},children:"Sample Data Preview:"}),b.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:b.jsx("div",{className:"truncate",title:v,children:v})})]}),C&&b.jsxs("div",{className:"confidence-reason-section",children:[b.jsx("div",{className:"text-sm font-medium mb-1",style:{color:"var(--text-color)"},children:"Additional Details:"}),b.jsx("div",{className:"text-xs",style:{color:"var(--secondary-text-color)"},children:C})]})]})]})};return b.jsxs("div",{className:"confidence-tooltip-wrapper",ref:c,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),children:[t,r&&In.createPortal(b.jsxs("div",{ref:u,className:"confidence-tooltip",style:o,children:[g(),b.jsx("span",{className:"confidence-tooltip-arrow",style:a})]}),document.body)]})},Y_=({isOpen:e,imagePath:t,imageSrc:n,loadImageFromPath:r,onClose:i})=>{const[o,s]=x.useState(""),[a,l]=x.useState(!1),[c,u]=x.useState("");if(Hu(e),x.useEffect(()=>{if(!e){s(""),u(""),l(!1);return}if(n){s(n),u(""),l(!1);return}t?(async()=>{l(!0),u(""),s("");try{if(r){const h=await r(t);s(h)}else s(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]),x.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=b.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:b.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:[b.jsx("div",{className:"px-4",children:b.jsxs("div",{className:"flex justify-between items-center",children:[b.jsx("h2",{className:"text-lg font-semibold",style:{color:"var(--text-color)"},children:"Image Preview"}),b.jsx("button",{onClick:i,className:"text-brand-primary hover:opacity-80 transition-opacity","aria-label":"Close",children:b.jsx(Xp,{size:16})})]})}),b.jsxs("div",{className:"px-4 mt-4 pb-4",children:[a&&b.jsx("div",{className:"flex justify-center items-center py-8",style:{color:"var(--text-color)"},children:b.jsx("span",{children:"Loading image..."})}),c&&b.jsx("div",{className:"flex justify-center items-center py-8",style:{color:"var(--text-color)"},children:b.jsxs("div",{className:"text-center",children:[b.jsx("p",{className:"text-red-500 mb-2",children:"Error loading image"}),b.jsx("p",{className:"text-sm",style:{color:"var(--secondary-text-color)"},children:c})]})}),!a&&!c&&o&&b.jsx("div",{className:"flex justify-center items-center max-h-[70vh] overflow-auto",children:b.jsx("img",{src:o,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 In.createPortal(d,document.getElementById("modal-root")||document.body)};var gb={exports:{}};/* @license
69
- Papa Parse
70
- v5.5.3
71
- https://github.com/mholt/PapaParse
72
- License: MIT
73
- */(function(e,t){((n,r)=>{e.exports=r()})(al,function n(){var r=typeof self<"u"?self:typeof window<"u"?window:r!==void 0?r:{},i,o=!r.document&&!!r.postMessage,s=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(_){var E=w(_);E.chunkSize=parseInt(E.chunkSize),_.step||_.chunk||(E.chunkSize=null),this._handle=new p(E),(this._handle.streamer=this)._config=E}).call(this,S),this.parseChunk=function(_,E){var P=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<P){let $=this._config.newline;$||(T=this._config.quoteChar||'"',$=this._handle.guessLineEndings(_,T)),_=[..._.split($).slice(P)].join($)}this.isFirstChunk&&A(this._config.beforeFirstChunk)&&(T=this._config.beforeFirstChunk(_))!==void 0&&(_=T),this.isFirstChunk=!1,this._halted=!1;var P=this._partialLine+_,T=(this._partialLine="",this._handle.parse(P,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(_=T.meta.cursor,P=(this._finished||(this._partialLine=P.substring(_-this._baseIndex),this._baseIndex=_),T&&T.data&&(this._rowCount+=T.data.length),this._finished||this._config.preview&&this._rowCount>=this._config.preview),s)r.postMessage({results:T,workerId:c.WORKER_ID,finished:P});else if(A(this._config.chunk)&&!E){if(this._config.chunk(T,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=T=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(T.data),this._completeResults.errors=this._completeResults.errors.concat(T.errors),this._completeResults.meta=T.meta),this._completed||!P||!A(this._config.complete)||T&&T.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),P||T&&T.meta.paused||this._nextChunk(),T}this._halted=!0},this._sendError=function(_){A(this._config.error)?this._config.error(_):s&&this._config.error&&r.postMessage({workerId:c.WORKER_ID,error:_,finished:!1})}}function d(S){var _;(S=S||{}).chunkSize||(S.chunkSize=c.RemoteChunkSize),u.call(this,S),this._nextChunk=o?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(E){this._input=E,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(_=new XMLHttpRequest,this._config.withCredentials&&(_.withCredentials=this._config.withCredentials),o||(_.onload=R(this._chunkLoaded,this),_.onerror=R(this._chunkError,this)),_.open(this._config.downloadRequestBody?"POST":"GET",this._input,!o),this._config.downloadRequestHeaders){var E,P=this._config.downloadRequestHeaders;for(E in P)_.setRequestHeader(E,P[E])}var T;this._config.chunkSize&&(T=this._start+this._config.chunkSize-1,_.setRequestHeader("Range","bytes="+this._start+"-"+T));try{_.send(this._config.downloadRequestBody)}catch($){this._chunkError($.message)}o&&_.status===0&&this._chunkError()}},this._chunkLoaded=function(){_.readyState===4&&(_.status<200||400<=_.status?this._chunkError():(this._start+=this._config.chunkSize||_.responseText.length,this._finished=!this._config.chunkSize||this._start>=(E=>(E=E.getResponseHeader("Content-Range"))!==null?parseInt(E.substring(E.lastIndexOf("/")+1)):-1)(_),this.parseChunk(_.responseText)))},this._chunkError=function(E){E=_.statusText||E,this._sendError(new Error(E))}}function f(S){(S=S||{}).chunkSize||(S.chunkSize=c.LocalChunkSize),u.call(this,S);var _,E,P=typeof FileReader<"u";this.stream=function(T){this._input=T,E=T.slice||T.webkitSlice||T.mozSlice,P?((_=new FileReader).onload=R(this._chunkLoaded,this),_.onerror=R(this._chunkError,this)):_=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var T=this._input,$=(this._config.chunkSize&&($=Math.min(this._start+this._config.chunkSize,this._input.size),T=E.call(T,this._start,$)),_.readAsText(T,this._config.encoding));P||this._chunkLoaded({target:{result:$}})},this._chunkLoaded=function(T){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(T.target.result)},this._chunkError=function(){this._sendError(_.error)}}function h(S){var _;u.call(this,S=S||{}),this.stream=function(E){return _=E,this._nextChunk()},this._nextChunk=function(){var E,P;if(!this._finished)return E=this._config.chunkSize,_=E?(P=_.substring(0,E),_.substring(E)):(P=_,""),this._finished=!_,this.parseChunk(P)}}function g(S){u.call(this,S=S||{});var _=[],E=!0,P=!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(T){this._input=T,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){P&&_.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),_.length?this.parseChunk(_.shift()):E=!0},this._streamData=R(function(T){try{_.push(typeof T=="string"?T:T.toString(this._config.encoding)),E&&(E=!1,this._checkIsFinished(),this.parseChunk(_.shift()))}catch($){this._streamError($)}},this),this._streamError=R(function(T){this._streamCleanUp(),this._sendError(T)},this),this._streamEnd=R(function(){this._streamCleanUp(),P=!0,this._streamData("")},this),this._streamCleanUp=R(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function p(S){var _,E,P,T,$=Math.pow(2,53),D=-$,k=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,O=/^((\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)))$/,N=this,M=0,F=0,B=!1,z=!1,G=[],V={data:[],errors:[],meta:{}};function J(fe){return S.skipEmptyLines==="greedy"?fe.join("").trim()==="":fe.length===1&&fe[0].length===0}function le(){if(V&&P&&(Ne("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+c.DefaultDelimiter+"'"),P=!1),S.skipEmptyLines&&(V.data=V.data.filter(function(ce){return!J(ce)})),he()){let ce=function(H,Te){A(S.transformHeader)&&(H=S.transformHeader(H,Te)),G.push(H)};if(V)if(Array.isArray(V.data[0])){for(var fe=0;he()&&fe<V.data.length;fe++)V.data[fe].forEach(ce);V.data.splice(0,1)}else V.data.forEach(ce)}function ge(ce,H){for(var Te=S.header?{}:[],re=0;re<ce.length;re++){var ie=re,j=ce[re],j=((oe,Z)=>(ne=>(S.dynamicTypingFunction&&S.dynamicTyping[ne]===void 0&&(S.dynamicTyping[ne]=S.dynamicTypingFunction(ne)),(S.dynamicTyping[ne]||S.dynamicTyping)===!0))(oe)?Z==="true"||Z==="TRUE"||Z!=="false"&&Z!=="FALSE"&&((ne=>{if(k.test(ne)&&(ne=parseFloat(ne),D<ne&&ne<$))return 1})(Z)?parseFloat(Z):O.test(Z)?new Date(Z):Z===""?null:Z):Z)(ie=S.header?re>=G.length?"__parsed_extra":G[re]:ie,j=S.transform?S.transform(j,ie):j);ie==="__parsed_extra"?(Te[ie]=Te[ie]||[],Te[ie].push(j)):Te[ie]=j}return S.header&&(re>G.length?Ne("FieldMismatch","TooManyFields","Too many fields: expected "+G.length+" fields but parsed "+re,F+H):re<G.length&&Ne("FieldMismatch","TooFewFields","Too few fields: expected "+G.length+" fields but parsed "+re,F+H)),Te}var we;V&&(S.header||S.dynamicTyping||S.transform)&&(we=1,!V.data.length||Array.isArray(V.data[0])?(V.data=V.data.map(ge),we=V.data.length):V.data=ge(V.data,0),S.header&&V.meta&&(V.meta.fields=G),F+=we)}function he(){return S.header&&G.length===0}function Ne(fe,ge,we,ce){fe={type:fe,code:ge,message:we},ce!==void 0&&(fe.row=ce),V.errors.push(fe)}A(S.step)&&(T=S.step,S.step=function(fe){V=fe,he()?le():(le(),V.data.length!==0&&(M+=fe.data.length,S.preview&&M>S.preview?E.abort():(V.data=V.data[0],T(V,N))))}),this.parse=function(fe,ge,we){var ce=S.quoteChar||'"',ce=(S.newline||(S.newline=this.guessLineEndings(fe,ce)),P=!1,S.delimiter?A(S.delimiter)&&(S.delimiter=S.delimiter(fe),V.meta.delimiter=S.delimiter):((ce=((H,Te,re,ie,j)=>{var oe,Z,ne,te;j=j||[","," ","|",";",c.RECORD_SEP,c.UNIT_SEP];for(var ee=0;ee<j.length;ee++){for(var se,pe=j[ee],ae=0,q=0,ye=0,Q=(ne=void 0,new v({comments:ie,delimiter:pe,newline:Te,preview:10}).parse(H)),xe=0;xe<Q.data.length;xe++)re&&J(Q.data[xe])?ye++:(se=Q.data[xe].length,q+=se,ne===void 0?ne=se:0<se&&(ae+=Math.abs(se-ne),ne=se));0<Q.data.length&&(q/=Q.data.length-ye),(Z===void 0||ae<=Z)&&(te===void 0||te<q)&&1.99<q&&(Z=ae,oe=pe,te=q)}return{successful:!!(S.delimiter=oe),bestDelimiter:oe}})(fe,S.newline,S.skipEmptyLines,S.comments,S.delimitersToGuess)).successful?S.delimiter=ce.bestDelimiter:(P=!0,S.delimiter=c.DefaultDelimiter),V.meta.delimiter=S.delimiter),w(S));return S.preview&&S.header&&ce.preview++,_=fe,E=new v(ce),V=E.parse(_,ge,we),le(),B?{meta:{paused:!0}}:V||{meta:{paused:!1}}},this.paused=function(){return B},this.pause=function(){B=!0,E.abort(),_=A(S.chunk)?"":_.substring(E.getCharIndex())},this.resume=function(){N.streamer._halted?(B=!1,N.streamer.parseChunk(_,!0)):setTimeout(N.resume,3)},this.aborted=function(){return z},this.abort=function(){z=!0,E.abort(),V.meta.aborted=!0,A(S.complete)&&S.complete(V),_=""},this.guessLineEndings=function(H,ce){H=H.substring(0,1048576);var ce=new RegExp(m(ce)+"([^]*?)"+m(ce),"gm"),we=(H=H.replace(ce,"")).split("\r"),ce=H.split(`
74
- `),H=1<ce.length&&ce[0].length<we[0].length;if(we.length===1||H)return`
75
- `;for(var Te=0,re=0;re<we.length;re++)we[re][0]===`
76
- `&&Te++;return Te>=we.length/2?`\r
77
- `:"\r"}}function m(S){return S.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function v(S){var _=(S=S||{}).delimiter,E=S.newline,P=S.comments,T=S.step,$=S.preview,D=S.fastMode,k=null,O=!1,N=S.quoteChar==null?'"':S.quoteChar,M=N;if(S.escapeChar!==void 0&&(M=S.escapeChar),(typeof _!="string"||-1<c.BAD_DELIMITERS.indexOf(_))&&(_=","),P===_)throw new Error("Comment character same as delimiter");P===!0?P="#":(typeof P!="string"||-1<c.BAD_DELIMITERS.indexOf(P))&&(P=!1),E!==`
78
- `&&E!=="\r"&&E!==`\r
79
- `&&(E=`
80
- `);var F=0,B=!1;this.parse=function(z,G,V){if(typeof z!="string")throw new Error("Input must be a string");var J=z.length,le=_.length,he=E.length,Ne=P.length,fe=A(T),ge=[],we=[],ce=[],H=F=0;if(!z)return ae();if(D||D!==!1&&z.indexOf(N)===-1){for(var Te=z.split(E),re=0;re<Te.length;re++){if(ce=Te[re],F+=ce.length,re!==Te.length-1)F+=E.length;else if(V)return ae();if(!P||ce.substring(0,Ne)!==P){if(fe){if(ge=[],te(ce.split(_)),q(),B)return ae()}else te(ce.split(_));if($&&$<=re)return ge=ge.slice(0,$),ae(!0)}}return ae()}for(var ie=z.indexOf(_,F),j=z.indexOf(E,F),oe=new RegExp(m(M)+m(N),"g"),Z=z.indexOf(N,F);;)if(z[F]===N)for(Z=F,F++;;){if((Z=z.indexOf(N,Z+1))===-1)return V||we.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:ge.length,index:F}),se();if(Z===J-1)return se(z.substring(F,Z).replace(oe,N));if(N===M&&z[Z+1]===M)Z++;else if(N===M||Z===0||z[Z-1]!==M){ie!==-1&&ie<Z+1&&(ie=z.indexOf(_,Z+1));var ne=ee((j=j!==-1&&j<Z+1?z.indexOf(E,Z+1):j)===-1?ie:Math.min(ie,j));if(z.substr(Z+1+ne,le)===_){ce.push(z.substring(F,Z).replace(oe,N)),z[F=Z+1+ne+le]!==N&&(Z=z.indexOf(N,F)),ie=z.indexOf(_,F),j=z.indexOf(E,F);break}if(ne=ee(j),z.substring(Z+1+ne,Z+1+ne+he)===E){if(ce.push(z.substring(F,Z).replace(oe,N)),pe(Z+1+ne+he),ie=z.indexOf(_,F),Z=z.indexOf(N,F),fe&&(q(),B))return ae();if($&&ge.length>=$)return ae(!0);break}we.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:ge.length,index:F}),Z++}}else if(P&&ce.length===0&&z.substring(F,F+Ne)===P){if(j===-1)return ae();F=j+he,j=z.indexOf(E,F),ie=z.indexOf(_,F)}else if(ie!==-1&&(ie<j||j===-1))ce.push(z.substring(F,ie)),F=ie+le,ie=z.indexOf(_,F);else{if(j===-1)break;if(ce.push(z.substring(F,j)),pe(j+he),fe&&(q(),B))return ae();if($&&ge.length>=$)return ae(!0)}return se();function te(ye){ge.push(ye),H=F}function ee(ye){var Q=0;return Q=ye!==-1&&(ye=z.substring(Z+1,ye))&&ye.trim()===""?ye.length:Q}function se(ye){return V||(ye===void 0&&(ye=z.substring(F)),ce.push(ye),F=J,te(ce),fe&&q()),ae()}function pe(ye){F=ye,te(ce),ce=[],j=z.indexOf(E,F)}function ae(ye){if(S.header&&!G&&ge.length&&!O){var Q=ge[0],xe=Object.create(null),Re=new Set(Q);let Ve=!1;for(let st=0;st<Q.length;st++){let Ge=Q[st];if(xe[Ge=A(S.transformHeader)?S.transformHeader(Ge,st):Ge]){let et,at=xe[Ge];for(;et=Ge+"_"+at,at++,Re.has(et););Re.add(et),Q[st]=et,xe[Ge]++,Ve=!0,(k=k===null?{}:k)[et]=Ge}else xe[Ge]=1,Q[st]=Ge;Re.add(Ge)}Ve&&console.warn("Duplicate headers found and renamed."),O=!0}return{data:ge,errors:we,meta:{delimiter:_,linebreak:E,aborted:B,truncated:!!ye,cursor:H+(G||0),renamedHeaders:k}}}function q(){T(ae()),ge=[],we=[]}},this.abort=function(){B=!0},this.getCharIndex=function(){return F}}function C(S){var _=S.data,E=a[_.workerId],P=!1;if(_.error)E.userError(_.error,_.file);else if(_.results&&_.results.data){var T={abort:function(){P=!0,y(_.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:I,resume:I};if(A(E.userStep)){for(var $=0;$<_.results.data.length&&(E.userStep({data:_.results.data[$],errors:_.results.errors,meta:_.results.meta},T),!P);$++);delete _.results}else A(E.userChunk)&&(E.userChunk(_.results,T,_.file),delete _.results)}_.finished&&!P&&y(_.workerId,_.results)}function y(S,_){var E=a[S];A(E.userComplete)&&E.userComplete(_),E.terminate(),delete a[S]}function I(){throw new Error("Not implemented.")}function w(S){if(typeof S!="object"||S===null)return S;var _,E=Array.isArray(S)?[]:{};for(_ in S)E[_]=w(S[_]);return E}function R(S,_){return function(){S.apply(_,arguments)}}function A(S){return typeof S=="function"}return c.parse=function(S,_){var E=(_=_||{}).dynamicTyping||!1;if(A(E)&&(_.dynamicTypingFunction=E,E={}),_.dynamicTyping=E,_.transform=!!A(_.transform)&&_.transform,!_.worker||!c.WORKERS_SUPPORTED)return E=null,c.NODE_STREAM_INPUT,typeof S=="string"?(S=(P=>P.charCodeAt(0)!==65279?P:P.slice(1))(S),E=new(_.download?d:h)(_)):S.readable===!0&&A(S.read)&&A(S.on)?E=new g(_):(r.File&&S instanceof File||S instanceof Object)&&(E=new f(_)),E.stream(S);(E=(()=>{var P;return!!c.WORKERS_SUPPORTED&&(P=(()=>{var T=r.URL||r.webkitURL||null,$=n.toString();return c.BLOB_URL||(c.BLOB_URL=T.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; ","(",$,")();"],{type:"text/javascript"})))})(),(P=new r.Worker(P)).onmessage=C,P.id=l++,a[P.id]=P)})()).userStep=_.step,E.userChunk=_.chunk,E.userComplete=_.complete,E.userError=_.error,_.step=A(_.step),_.chunk=A(_.chunk),_.complete=A(_.complete),_.error=A(_.error),delete _.worker,E.postMessage({input:S,config:_,workerId:E.id})},c.unparse=function(S,_){var E=!1,P=!0,T=",",$=`\r
81
- `,D='"',k=D+D,O=!1,N=null,M=!1,F=((()=>{if(typeof _=="object"){if(typeof _.delimiter!="string"||c.BAD_DELIMITERS.filter(function(G){return _.delimiter.indexOf(G)!==-1}).length||(T=_.delimiter),typeof _.quotes!="boolean"&&typeof _.quotes!="function"&&!Array.isArray(_.quotes)||(E=_.quotes),typeof _.skipEmptyLines!="boolean"&&typeof _.skipEmptyLines!="string"||(O=_.skipEmptyLines),typeof _.newline=="string"&&($=_.newline),typeof _.quoteChar=="string"&&(D=_.quoteChar),typeof _.header=="boolean"&&(P=_.header),Array.isArray(_.columns)){if(_.columns.length===0)throw new Error("Option columns is empty");N=_.columns}_.escapeChar!==void 0&&(k=_.escapeChar+D),_.escapeFormulae instanceof RegExp?M=_.escapeFormulae:typeof _.escapeFormulae=="boolean"&&_.escapeFormulae&&(M=/^[=+\-@\t\r].*$/)}})(),new RegExp(m(D),"g"));if(typeof S=="string"&&(S=JSON.parse(S)),Array.isArray(S)){if(!S.length||Array.isArray(S[0]))return B(null,S,O);if(typeof S[0]=="object")return B(N||Object.keys(S[0]),S,O)}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||N),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])),B(S.fields||[],S.data||[],O);throw new Error("Unable to serialize unrecognized input");function B(G,V,J){var le="",he=(typeof G=="string"&&(G=JSON.parse(G)),typeof V=="string"&&(V=JSON.parse(V)),Array.isArray(G)&&0<G.length),Ne=!Array.isArray(V[0]);if(he&&P){for(var fe=0;fe<G.length;fe++)0<fe&&(le+=T),le+=z(G[fe],fe);0<V.length&&(le+=$)}for(var ge=0;ge<V.length;ge++){var we=(he?G:V[ge]).length,ce=!1,H=he?Object.keys(V[ge]).length===0:V[ge].length===0;if(J&&!he&&(ce=J==="greedy"?V[ge].join("").trim()==="":V[ge].length===1&&V[ge][0].length===0),J==="greedy"&&he){for(var Te=[],re=0;re<we;re++){var ie=Ne?G[re]:re;Te.push(V[ge][ie])}ce=Te.join("").trim()===""}if(!ce){for(var j=0;j<we;j++){0<j&&!H&&(le+=T);var oe=he&&Ne?G[j]:j;le+=z(V[ge][oe],j)}ge<V.length-1&&(!J||0<we&&!H)&&(le+=$)}}return le}function z(G,V){var J,le;return G==null?"":G.constructor===Date?JSON.stringify(G).slice(1,25):(le=!1,M&&typeof G=="string"&&M.test(G)&&(G="'"+G,le=!0),J=G.toString().replace(F,k),(le=le||E===!0||typeof E=="function"&&E(G,V)||Array.isArray(E)&&E[V]||((he,Ne)=>{for(var fe=0;fe<Ne.length;fe++)if(-1<he.indexOf(Ne[fe]))return!0;return!1})(J,c.BAD_DELIMITERS)||-1<J.indexOf(T)||J.charAt(0)===" "||J.charAt(J.length-1)===" ")?D+J+D:J)}},c.RECORD_SEP="",c.UNIT_SEP="",c.BYTE_ORDER_MARK="\uFEFF",c.BAD_DELIMITERS=["\r",`
82
- `,'"',c.BYTE_ORDER_MARK],c.WORKERS_SUPPORTED=!o&&!!r.Worker,c.NODE_STREAM_INPUT=1,c.LocalChunkSize=10485760,c.RemoteChunkSize=5242880,c.DefaultDelimiter=",",c.Parser=v,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 _=S.config||{},E=[];return this.each(function($){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 D=0;D<this.files.length;D++)E.push({file:this.files[D],inputElem:this,instanceConfig:i.extend({},_)})}),P(),this;function P(){if(E.length===0)A(S.complete)&&S.complete();else{var $,D,k,O,N=E[0];if(A(S.before)){var M=S.before(N.file,N.inputElem);if(typeof M=="object"){if(M.action==="abort")return $="AbortError",D=N.file,k=N.inputElem,O=M.reason,void(A(S.error)&&S.error({name:$},D,k,O));if(M.action==="skip")return void T();typeof M.config=="object"&&(N.instanceConfig=i.extend(N.instanceConfig,M.config))}else if(M==="skip")return void T()}var F=N.instanceConfig.complete;N.instanceConfig.complete=function(B){A(F)&&F(B,N.file,N.inputElem),T()},c.parse(N.file,N.instanceConfig)}}function T(){E.splice(0,1),P()}}),s&&(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})})(gb);var Z_=gb.exports;const J_=ll(Z_),U_=(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(`
83
- `),i=new Blob([r],{type:"text/csv"}),o=window.URL.createObjectURL(i),s=document.createElement("a");s.href=o,s.setAttribute("download","sample.csv"),document.body.appendChild(s),s.click(),document.body.removeChild(s)},Q_=(e,t="database")=>t==="database"?e.map(n=>{var r,i,o,s,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:((o=n.Username)==null?void 0:o.trim())||"",Password:((s=n.Password)==null?void 0:s.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,o,s,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:((o=n.Department)==null?void 0:o.trim())||"","Country ISO2":((s=n["Country ISO2"])==null?void 0:s.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())||""}}):[],K_="••••••••••",q_=({csvType:e="database",connectionType:t,onClose:n,onConfirm:r,TestConnection:i})=>{const[o,s]=x.useState(null),[a,l]=x.useState([]),[c,u]=x.useState(new Set),d=h=>{if(h.target.files){const g=h.target.files[0];s(g),f(g)}},f=h=>{const g=new FileReader;g.onload=({target:p})=>{p!=null&&p.result&&J_.parse(p.result,{header:!0,skipEmptyLines:!0,complete:m=>{l(Q_(m.data,e))}})},g.readAsText(h)};return b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"fixed inset-0 z-40 bg-gray-900 bg-opacity-50 backdrop-blur-sm"}),b.jsx("div",{className:"fixed inset-0 flex items-center justify-center z-40",children:b.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:[b.jsxs("div",{className:"flex justify-between items-center",children:[b.jsx("h3",{className:"text-xl font-semibold",style:{color:"var(--text-color)",fontFamily:"'Afacad', 'Rubik', sans-serif"},children:"Import Connectors"}),b.jsx("button",{className:"text-2xl transition-colors text-brand-primary hover:opacity-80",onClick:n,children:"×"})]}),e==="database"?b.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:b.jsxs("strong",{className:"font-bold flex gap-2 text-sm items-center",children:[b.jsx(xd,{}),"Import connectors works only for connection without SSH Configuration"]})}):b.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:b.jsxs("strong",{className:"font-normal flex gap-2 text-sm items-center",children:[b.jsx(Qm,{style:{color:"var(--brand-orange)"}}),"Please refer to the sample CSV before uploading"]})}),a.length>0&&b.jsx("div",{className:"max-h-[60vh] overflow-auto border rounded-md shadow-sm mt-4",children:b.jsxs("table",{className:"min-w-full max-h-[60vh] border-collapse",children:[b.jsx("thead",{children:b.jsxs("tr",{className:"sticky top-0 z-10",style:{backgroundColor:"var(--brand-light)"},children:[Object.keys(a[0]).map((h,g)=>b.jsx("th",{className:"p-3 text-left",style:{border:"1px solid var(--border-color)",color:"var(--brand-dark)"},children:h},g)),t&&i&&b.jsx("th",{style:{border:"1px solid var(--border-color)",color:"var(--brand-dark)"},children:"Test Status"})]})}),b.jsx("tbody",{children:a.map((h,g)=>b.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],v)=>b.jsx("td",{className:"border p-3 text-gray-600 dark:text-gray-200",children:p.toLowerCase().includes("password")?K_:m},v)),t&&i&&b.jsx("td",{className:"border p-3 text-gray-600 dark:text-gray-200",children:b.jsx("div",{className:"flex justify-center",children:b.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 v=new Set(m);return v.delete(g),v}):u(m=>new Set([...m,g]))},enableCopy:!1,enableTechnicalDetails:!1,customStyles:"mb-0"})})})]},g))})]})}),b.jsxs("div",{className:"flex flex-col items-center mt-6",children:[b.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:o?o.name:"Add File"}),b.jsx("input",{type:"file",id:"file-upload",className:"hidden",accept:".csv",onChange:d})]}),b.jsxs("div",{className:"flex justify-between items-center mt-6",children:[b.jsx("button",{onClick:()=>U_(e),className:"text-sm text-brand-primary hover:opacity-80 underline transition-colors",children:"Download Sample CSV"}),a.length>0&&b.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"})]})]})})]})},e3=({title:e})=>b.jsxs("div",{className:"nochartdata-container w-full h-full flex flex-col items-center justify-center text-center select-none",children:[b.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}),b.jsxs("div",{className:"flex flex-col items-center justify-center w-full h-full",children:[b.jsx(w_,{size:80,style:{color:"var(--brand-color-orange)",opacity:.2}}),b.jsx("span",{className:"mt-4 text-[1rem]",style:{color:"var(--secondary-text-color)"},children:"No data to display"})]})]}),t3=({title:e,mainClassname:t,rightContent:n})=>b.jsxs("div",{className:`${t} flex items-center justify-between`,children:[b.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}),b.jsx("div",{children:n})]}),Sd=({legends:e,maxDisplayLegends:t=8,dataValues:n,colors:r,showAllLegends:i=!1,onClick:o})=>{const s=Math.min(e.length,t),a=(n==null?void 0:n.reduce((l,c)=>l+c,0))??0;return b.jsxs("div",{className:"flex flex-col",style:{minWidth:"150px",maxWidth:"100%"},children:[b.jsx("div",{className:"flex-1 overflow-y-auto",children:e.slice(0,s).map((l,c)=>b.jsxs("div",{className:"flex items-center mb-2 min-w-0",children:[b.jsx("div",{className:"mr-2 flex-shrink-0",style:{width:"12px",height:"12px",borderRadius:"50%",backgroundColor:r[c%r.length]}}),b.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&&b.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&&b.jsx("div",{className:"mt-1 text-right",children:i?b.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:o,children:"Show Less"}):b.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:o,children:["View All (",e.length-t," more)"]})})]})};/*!
84
- * @kurkle/color v0.3.4
85
- * https://github.com/kurkle/color#readme
86
- * (c) 2024 Jukka Kurkela
87
- * Released under the MIT License
88
- */function Uo(e){return e+.5|0}const er=(e,t,n)=>Math.max(Math.min(e,n),t);function Ji(e){return er(Uo(e*2.55),0,255)}function or(e){return er(Uo(e*255),0,255)}function Tn(e){return er(Uo(e/2.55)/100,0,1)}function kh(e){return er(Uo(e*100),0,100)}const Jt={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},au=[..."0123456789ABCDEF"],n3=e=>au[e&15],r3=e=>au[(e&240)>>4]+au[e&15],xs=e=>(e&240)>>4===(e&15),i3=e=>xs(e.r)&&xs(e.g)&&xs(e.b)&&xs(e.a);function o3(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&Jt[e[1]]*17,g:255&Jt[e[2]]*17,b:255&Jt[e[3]]*17,a:t===5?Jt[e[4]]*17:255}:(t===7||t===9)&&(n={r:Jt[e[1]]<<4|Jt[e[2]],g:Jt[e[3]]<<4|Jt[e[4]],b:Jt[e[5]]<<4|Jt[e[6]],a:t===9?Jt[e[7]]<<4|Jt[e[8]]:255})),n}const s3=(e,t)=>e<255?t(e):"";function a3(e){var t=i3(e)?n3:r3;return e?"#"+t(e.r)+t(e.g)+t(e.b)+s3(e.a,t):void 0}const l3=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function pb(e,t,n){const r=t*Math.min(n,1-n),i=(o,s=(o+e/30)%12)=>n-r*Math.max(Math.min(s-3,9-s,1),-1);return[i(0),i(8),i(4)]}function c3(e,t,n){const r=(i,o=(i+e/60)%6)=>n-n*t*Math.max(Math.min(o,4-o,1),0);return[r(5),r(3),r(1)]}function u3(e,t,n){const r=pb(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 d3(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 Id(e){const n=e.r/255,r=e.g/255,i=e.b/255,o=Math.max(n,r,i),s=Math.min(n,r,i),a=(o+s)/2;let l,c,u;return o!==s&&(u=o-s,c=a>.5?u/(2-o-s):u/(o+s),l=d3(n,r,i,u,o),l=l*60+.5),[l|0,c||0,a]}function _d(e,t,n,r){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,r)).map(or)}function Ed(e,t,n){return _d(pb,e,t,n)}function f3(e,t,n){return _d(u3,e,t,n)}function h3(e,t,n){return _d(c3,e,t,n)}function mb(e){return(e%360+360)%360}function g3(e){const t=l3.exec(e);let n=255,r;if(!t)return;t[5]!==r&&(n=t[6]?Ji(+t[5]):or(+t[5]));const i=mb(+t[2]),o=+t[3]/100,s=+t[4]/100;return t[1]==="hwb"?r=f3(i,o,s):t[1]==="hsv"?r=h3(i,o,s):r=Ed(i,o,s),{r:r[0],g:r[1],b:r[2],a:n}}function p3(e,t){var n=Id(e);n[0]=mb(n[0]+t),n=Ed(n),e.r=n[0],e.g=n[1],e.b=n[2]}function m3(e){if(!e)return;const t=Id(e),n=t[0],r=kh(t[1]),i=kh(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${i}%, ${Tn(e.a)})`:`hsl(${n}, ${r}%, ${i}%)`}const Ph={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"},Fh={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 b3(){const e={},t=Object.keys(Fh),n=Object.keys(Ph);let r,i,o,s,a;for(r=0;r<t.length;r++){for(s=a=t[r],i=0;i<n.length;i++)o=n[i],a=a.replace(o,Ph[o]);o=parseInt(Fh[s],16),e[a]=[o>>16&255,o>>8&255,o&255]}return e}let ys;function v3(e){ys||(ys=b3(),ys.transparent=[0,0,0,0]);const t=ys[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const x3=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function y3(e){const t=x3.exec(e);let n=255,r,i,o;if(t){if(t[7]!==r){const s=+t[7];n=t[8]?Ji(s):er(s*255,0,255)}return r=+t[1],i=+t[3],o=+t[5],r=255&(t[2]?Ji(r):er(r,0,255)),i=255&(t[4]?Ji(i):er(i,0,255)),o=255&(t[6]?Ji(o):er(o,0,255)),{r,g:i,b:o,a:n}}}function C3(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${Tn(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const lc=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,ti=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function w3(e,t,n){const r=ti(Tn(e.r)),i=ti(Tn(e.g)),o=ti(Tn(e.b));return{r:or(lc(r+n*(ti(Tn(t.r))-r))),g:or(lc(i+n*(ti(Tn(t.g))-i))),b:or(lc(o+n*(ti(Tn(t.b))-o))),a:e.a+n*(t.a-e.a)}}function Cs(e,t,n){if(e){let r=Id(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,t===0?360:1)),r=Ed(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function bb(e,t){return e&&Object.assign(t||{},e)}function Oh(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=or(e[3]))):(t=bb(e,{r:0,g:0,b:0,a:1}),t.a=or(t.a)),t}function S3(e){return e.charAt(0)==="r"?y3(e):g3(e)}let vb=class lu{constructor(t){if(t instanceof lu)return t;const n=typeof t;let r;n==="object"?r=Oh(t):n==="string"&&(r=o3(t)||v3(t)||S3(t)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var t=bb(this._rgb);return t&&(t.a=Tn(t.a)),t}set rgb(t){this._rgb=Oh(t)}rgbString(){return this._valid?C3(this._rgb):void 0}hexString(){return this._valid?a3(this._rgb):void 0}hslString(){return this._valid?m3(this._rgb):void 0}mix(t,n){if(t){const r=this.rgb,i=t.rgb;let o;const s=n===o?.5:n,a=2*s-1,l=r.a-i.a,c=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;o=1-c,r.r=255&c*r.r+o*i.r+.5,r.g=255&c*r.g+o*i.g+.5,r.b=255&c*r.b+o*i.b+.5,r.a=s*r.a+(1-s)*i.a,this.rgb=r}return this}interpolate(t,n){return t&&(this._rgb=w3(this._rgb,t._rgb,n)),this}clone(){return new lu(this.rgb)}alpha(t){return this._rgb.a=or(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=Uo(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 Cs(this._rgb,2,t),this}darken(t){return Cs(this._rgb,2,-t),this}saturate(t){return Cs(this._rgb,1,t),this}desaturate(t){return Cs(this._rgb,1,-t),this}rotate(t){return p3(this._rgb,t),this}};/*!
89
- * Chart.js v4.5.1
90
- * https://www.chartjs.org
91
- * (c) 2025 Chart.js Contributors
92
- * Released under the MIT License
93
- */function Pn(){}const I3=(()=>{let e=0;return()=>e++})();function Oe(e){return e==null}function nt(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 Le(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function ct(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function Vt(e,t){return ct(e)?e:t}function Me(e,t){return typeof e>"u"?t:e}const _3=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,xb=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function Ue(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function Ze(e,t,n,r){let i,o,s;if(nt(e))for(o=e.length,i=0;i<o;i++)t.call(n,e[i],i);else if(Le(e))for(s=Object.keys(e),o=s.length,i=0;i<o;i++)t.call(n,e[s[i]],s[i])}function Oa(e,t){let n,r,i,o;if(!e||!t||e.length!==t.length)return!1;for(n=0,r=e.length;n<r;++n)if(i=e[n],o=t[n],i.datasetIndex!==o.datasetIndex||i.index!==o.index)return!1;return!0}function Na(e){if(nt(e))return e.map(Na);if(Le(e)){const t=Object.create(null),n=Object.keys(e),r=n.length;let i=0;for(;i<r;++i)t[n[i]]=Na(e[n[i]]);return t}return e}function yb(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function E3(e,t,n,r){if(!yb(e))return;const i=t[e],o=n[e];Le(i)&&Le(o)?vt(i,o,r):t[e]=Na(o)}function vt(e,t,n){const r=nt(t)?t:[t],i=r.length;if(!Le(e))return e;n=n||{};const o=n.merger||E3;let s;for(let a=0;a<i;++a){if(s=r[a],!Le(s))continue;const l=Object.keys(s);for(let c=0,u=l.length;c<u;++c)o(l[c],e,s,n)}return e}function ao(e,t){return vt(e,t,{merger:M3})}function M3(e,t,n){if(!yb(e))return;const r=t[e],i=n[e];Le(r)&&Le(i)?ao(r,i):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=Na(i))}const Nh={"":e=>e,x:e=>e.x,y:e=>e.y};function A3(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 R3(e){const t=A3(e);return n=>{for(const r of t){if(r==="")break;n=n&&n[r]}return n}}function cr(e,t){return(Nh[t]||(Nh[t]=R3(t)))(e)}function Md(e){return e.charAt(0).toUpperCase()+e.slice(1)}const Fo=e=>typeof e<"u",ur=e=>typeof e=="function",Th=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function k3(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const $e=Math.PI,rt=2*$e,P3=rt+$e,Ta=Number.POSITIVE_INFINITY,F3=$e/180,dt=$e/2,vr=$e/4,Dh=$e*2/3,tr=Math.log10,Cn=Math.sign;function lo(e,t,n){return Math.abs(e-t)<n}function Lh(e){const t=Math.round(e);e=lo(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(tr(e))),r=e/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function O3(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,o)=>i-o).pop(),t}function N3(e){return typeof e=="symbol"||typeof e=="object"&&e!==null&&!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e)}function bi(e){return!N3(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function T3(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function Cb(e,t,n){let r,i,o;for(r=0,i=e.length;r<i;r++)o=e[r][n],isNaN(o)||(t.min=Math.min(t.min,o),t.max=Math.max(t.max,o))}function cn(e){return e*($e/180)}function Ad(e){return e*(180/$e)}function jh(e){if(!ct(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function wb(e,t){const n=t.x-e.x,r=t.y-e.y,i=Math.sqrt(n*n+r*r);let o=Math.atan2(r,n);return o<-.5*$e&&(o+=rt),{angle:o,distance:i}}function cu(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function D3(e,t){return(e-t+P3)%rt-$e}function At(e){return(e%rt+rt)%rt}function Oo(e,t,n,r){const i=At(e),o=At(t),s=At(n),a=At(o-i),l=At(s-i),c=At(i-o),u=At(i-s);return i===o||i===s||r&&o===s||a>l&&c<u}function bt(e,t,n){return Math.max(t,Math.min(n,e))}function L3(e){return bt(e,-32768,32767)}function Bn(e,t,n,r=1e-6){return e>=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function Rd(e,t,n){n=n||(s=>e[s]<t);let r=e.length-1,i=0,o;for(;r-i>1;)o=i+r>>1,n(o)?i=o:r=o;return{lo:i,hi:r}}const $n=(e,t,n,r)=>Rd(e,n,r?i=>{const o=e[i][t];return o<n||o===n&&e[i+1][t]===n}:i=>e[i][t]<n),j3=(e,t,n)=>Rd(e,n,r=>e[r][t]>=n);function B3(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 Sb=["push","pop","shift","splice","unshift"];function $3(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),Sb.forEach(n=>{const r="_onData"+Md(n),i=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...o){const s=i.apply(this,o);return e._chartjs.listeners.forEach(a=>{typeof a[r]=="function"&&a[r](...o)}),s}})})}function Bh(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)&&(Sb.forEach(o=>{delete e[o]}),delete e._chartjs)}function Ib(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const _b=function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame}();function Eb(e,t){let n=[],r=!1;return function(...i){n=i,r||(r=!0,_b.call(window,()=>{r=!1,e.apply(t,n)}))}}function V3(e,t){let n;return function(...r){return t?(clearTimeout(n),n=setTimeout(e,t,r)):e.apply(this,r),t}}const kd=e=>e==="start"?"left":e==="end"?"right":"center",Et=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,G3=(e,t,n,r)=>e===(r?"left":"right")?n:e==="center"?(t+n)/2:t;function Mb(e,t,n){const r=t.length;let i=0,o=r;if(e._sorted){const{iScale:s,vScale:a,_parsed:l}=e,c=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null,u=s.axis,{min:d,max:f,minDefined:h,maxDefined:g}=s.getUserBounds();if(h){if(i=Math.min($n(l,u,d).lo,n?r:$n(t,u,s.getPixelForValue(d)).lo),c){const p=l.slice(0,i+1).reverse().findIndex(m=>!Oe(m[a.axis]));i-=Math.max(0,p)}i=bt(i,0,r-1)}if(g){let p=Math.max($n(l,s.axis,f,!0).hi+1,n?0:$n(t,u,s.getPixelForValue(f),!0).hi+1);if(c){const m=l.slice(p-1).findIndex(v=>!Oe(v[a.axis]));p+=Math.max(0,m)}o=bt(p,i,r)-i}else o=r-i}return{start:i,count:o}}function Ab(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 o=r.xmin!==t.min||r.xmax!==t.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,i),o}const ws=e=>e===0||e===1,$h=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*rt/n)),Vh=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*rt/n)+1,co={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*dt)+1,easeOutSine:e=>Math.sin(e*dt),easeInOutSine:e=>-.5*(Math.cos($e*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=>ws(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=>ws(e)?e:$h(e,.075,.3),easeOutElastic:e=>ws(e)?e:Vh(e,.075,.3),easeInOutElastic(e){return ws(e)?e:e<.5?.5*$h(e*2,.1125,.45):.5+.5*Vh(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-co.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?co.easeInBounce(e*2)*.5:co.easeOutBounce(e*2-1)*.5+.5};function Pd(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function Gh(e){return Pd(e)?e:new vb(e)}function cc(e){return Pd(e)?e:new vb(e).saturate(.5).darken(.1).hexString()}const z3=["x","y","borderWidth","radius","tension"],H3=["color","borderColor","backgroundColor"];function W3(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:H3},numbers:{type:"number",properties:z3}}),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 X3(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const zh=new Map;function Y3(e,t){t=t||{};const n=e+JSON.stringify(t);let r=zh.get(n);return r||(r=new Intl.NumberFormat(e,t),zh.set(n,r)),r}function Qo(e,t,n){return Y3(t,n).format(e)}const Rb={values(e){return nt(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const r=this.chart.options.locale;let i,o=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"),o=Z3(e,n)}const s=tr(Math.abs(o)),a=isNaN(s)?1:Math.max(Math.min(-1*Math.floor(s),20),0),l={notation:i,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),Qo(e,r,l)},logarithmic(e,t,n){if(e===0)return"0";const r=n[t].significand||e/Math.pow(10,Math.floor(tr(e)));return[1,2,3,5,10,15].includes(r)||t>.8*n.length?Rb.numeric.call(this,e,t,n):""}};function Z3(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 yl={formatters:Rb};function J3(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:yl.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 zr=Object.create(null),uu=Object.create(null);function uo(e,t){if(!t)return e;const n=t.split(".");for(let r=0,i=n.length;r<i;++r){const o=n[r];e=e[o]||(e[o]=Object.create(null))}return e}function uc(e,t,n){return typeof t=="string"?vt(uo(e,t),n):vt(uo(e,""),t)}class U3{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)=>cc(i.backgroundColor),this.hoverBorderColor=(r,i)=>cc(i.borderColor),this.hoverColor=(r,i)=>cc(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 uc(this,t,n)}get(t){return uo(this,t)}describe(t,n){return uc(uu,t,n)}override(t,n){return uc(zr,t,n)}route(t,n,r,i){const o=uo(this,t),s=uo(this,r),a="_"+n;Object.defineProperties(o,{[a]:{value:o[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[a],c=s[i];return Le(l)?Object.assign({},c,l):Me(l,c)},set(l){this[a]=l}}})}apply(t){t.forEach(n=>n(this))}}var it=new U3({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[W3,X3,J3]);function Q3(e){return!e||Oe(e.size)||Oe(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function Da(e,t,n,r,i){let o=t[i];return o||(o=t[i]=e.measureText(i).width,n.push(i)),o>r&&(r=o),r}function K3(e,t,n,r){r=r||{};let i=r.data=r.data||{},o=r.garbageCollect=r.garbageCollect||[];r.font!==t&&(i=r.data={},o=r.garbageCollect=[],r.font=t),e.save(),e.font=t;let s=0;const a=n.length;let l,c,u,d,f;for(l=0;l<a;l++)if(d=n[l],d!=null&&!nt(d))s=Da(e,i,o,s,d);else if(nt(d))for(c=0,u=d.length;c<u;c++)f=d[c],f!=null&&!nt(f)&&(s=Da(e,i,o,s,f));e.restore();const h=o.length/2;if(h>n.length){for(l=0;l<h;l++)delete i[o[l]];o.splice(0,h)}return s}function xr(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 Hh(e,t){!t&&!e||(t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function La(e,t,n,r){kb(e,t,n,r,null)}function kb(e,t,n,r,i){let o,s,a,l,c,u,d,f;const h=t.pointStyle,g=t.rotation,p=t.radius;let m=(g||0)*F3;if(h&&typeof h=="object"&&(o=h.toString(),o==="[object HTMLImageElement]"||o==="[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,rt):e.arc(n,r,p,0,rt),e.closePath();break;case"triangle":u=i?i/2:p,e.moveTo(n+Math.sin(m)*u,r-Math.cos(m)*p),m+=Dh,e.lineTo(n+Math.sin(m)*u,r-Math.cos(m)*p),m+=Dh,e.lineTo(n+Math.sin(m)*u,r-Math.cos(m)*p),e.closePath();break;case"rectRounded":c=p*.516,l=p-c,s=Math.cos(m+vr)*l,d=Math.cos(m+vr)*(i?i/2-c:l),a=Math.sin(m+vr)*l,f=Math.sin(m+vr)*(i?i/2-c:l),e.arc(n-d,r-a,c,m-$e,m-dt),e.arc(n+f,r-s,c,m-dt,m),e.arc(n+d,r+a,c,m,m+dt),e.arc(n-f,r+s,c,m+dt,m+$e),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+=vr;case"rectRot":d=Math.cos(m)*(i?i/2:p),s=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-s),e.lineTo(n+d,r+a),e.lineTo(n-f,r+s),e.closePath();break;case"crossRot":m+=vr;case"cross":d=Math.cos(m)*(i?i/2:p),s=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-s),e.lineTo(n-f,r+s);break;case"star":d=Math.cos(m)*(i?i/2:p),s=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-s),e.lineTo(n-f,r+s),m+=vr,d=Math.cos(m)*(i?i/2:p),s=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-s),e.lineTo(n-f,r+s);break;case"line":s=i?i/2:Math.cos(m)*p,a=Math.sin(m)*p,e.moveTo(n-s,r-a),e.lineTo(n+s,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 Vn(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 Fr(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function Or(e){e.restore()}function q3(e,t,n,r,i){if(!t)return e.lineTo(n.x,n.y);if(i==="middle"){const o=(t.x+n.x)/2;e.lineTo(o,t.y),e.lineTo(o,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 eE(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 tE(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),Oe(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 nE(e,t,n,r,i){if(i.strikethrough||i.underline){const o=e.measureText(r),s=t-o.actualBoundingBoxLeft,a=t+o.actualBoundingBoxRight,l=n-o.actualBoundingBoxAscent,c=n+o.actualBoundingBoxDescent,u=i.strikethrough?(l+c)/2:c;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=i.decorationWidth||2,e.moveTo(s,u),e.lineTo(a,u),e.stroke()}}function rE(e,t){const n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function Hr(e,t,n,r,i,o={}){const s=nt(t)?t:[t],a=o.strokeWidth>0&&o.strokeColor!=="";let l,c;for(e.save(),e.font=i.string,tE(e,o),l=0;l<s.length;++l)c=s[l],o.backdrop&&rE(e,o.backdrop),a&&(o.strokeColor&&(e.strokeStyle=o.strokeColor),Oe(o.strokeWidth)||(e.lineWidth=o.strokeWidth),e.strokeText(c,n,r,o.maxWidth)),e.fillText(c,n,r,o.maxWidth),nE(e,n,r,c,o),r+=Number(i.lineHeight);e.restore()}function No(e,t){const{x:n,y:r,w:i,h:o,radius:s}=t;e.arc(n+s.topLeft,r+s.topLeft,s.topLeft,1.5*$e,$e,!0),e.lineTo(n,r+o-s.bottomLeft),e.arc(n+s.bottomLeft,r+o-s.bottomLeft,s.bottomLeft,$e,dt,!0),e.lineTo(n+i-s.bottomRight,r+o),e.arc(n+i-s.bottomRight,r+o-s.bottomRight,s.bottomRight,dt,0,!0),e.lineTo(n+i,r+s.topRight),e.arc(n+i-s.topRight,r+s.topRight,s.topRight,0,-dt,!0),e.lineTo(n+s.topLeft,r)}const iE=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,oE=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function sE(e,t){const n=(""+e).match(iE);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 aE=e=>+e||0;function Fd(e,t){const n={},r=Le(t),i=r?Object.keys(t):t,o=Le(e)?r?s=>Me(e[s],e[t[s]]):s=>e[s]:()=>e;for(const s of i)n[s]=aE(o(s));return n}function Pb(e){return Fd(e,{top:"y",right:"x",bottom:"y",left:"x"})}function Nr(e){return Fd(e,["topLeft","topRight","bottomLeft","bottomRight"])}function St(e){const t=Pb(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function gt(e,t){e=e||{},t=t||it.font;let n=Me(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let r=Me(e.style,t.style);r&&!(""+r).match(oE)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const i={family:Me(e.family,t.family),lineHeight:sE(Me(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:Me(e.weight,t.weight),string:""};return i.string=Q3(i),i}function tt(e,t,n,r){let i,o,s;for(i=0,o=e.length;i<o;++i)if(s=e[i],s!==void 0&&(t!==void 0&&typeof s=="function"&&(s=s(t)),n!==void 0&&nt(s)&&(s=s[n%s.length]),s!==void 0))return s}function lE(e,t,n){const{min:r,max:i}=e,o=xb(t,(i-r)/2),s=(a,l)=>n&&a===0?0:a+l;return{min:s(r,-Math.abs(o)),max:s(i,o)}}function gr(e,t){return Object.assign(Object.create(e),t)}function Od(e,t=[""],n,r,i=()=>e[0]){const o=n||e;typeof r>"u"&&(r=Tb("_fallback",e));const s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:o,_fallback:r,_getTarget:i,override:a=>Od([a,...e],t,o,r)};return new Proxy(s,{deleteProperty(a,l){return delete a[l],delete a._keys,delete e[0][l],!0},get(a,l){return Ob(a,l,()=>mE(l,t,e,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(a,l){return Xh(a).includes(l)},ownKeys(a){return Xh(a)},set(a,l,c){const u=a._storage||(a._storage=i());return a[l]=u[l]=c,delete a._keys,!0}})}function vi(e,t,n,r){const i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:Fb(e,r),setContext:o=>vi(e,o,n,r),override:o=>vi(e.override(o),t,n,r)};return new Proxy(i,{deleteProperty(o,s){return delete o[s],delete e[s],!0},get(o,s,a){return Ob(o,s,()=>uE(o,s,a))},getOwnPropertyDescriptor(o,s){return o._descriptors.allKeys?Reflect.has(e,s)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,s)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(o,s){return Reflect.has(e,s)},ownKeys(){return Reflect.ownKeys(e)},set(o,s,a){return e[s]=a,delete o[s],!0}})}function Fb(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:ur(n)?n:()=>n,isIndexable:ur(r)?r:()=>r}}const cE=(e,t)=>e?e+Md(t):t,Nd=(e,t)=>Le(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function Ob(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||t==="constructor")return e[t];const r=n();return e[t]=r,r}function uE(e,t,n){const{_proxy:r,_context:i,_subProxy:o,_descriptors:s}=e;let a=r[t];return ur(a)&&s.isScriptable(t)&&(a=dE(t,a,e,n)),nt(a)&&a.length&&(a=fE(t,a,e,s.isIndexable)),Nd(t,a)&&(a=vi(a,i,o&&o[t],s)),a}function dE(e,t,n,r){const{_proxy:i,_context:o,_subProxy:s,_stack:a}=n;if(a.has(e))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+e);a.add(e);let l=t(o,s||r);return a.delete(e),Nd(e,l)&&(l=Td(i._scopes,i,e,l)),l}function fE(e,t,n,r){const{_proxy:i,_context:o,_subProxy:s,_descriptors:a}=n;if(typeof o.index<"u"&&r(e))return t[o.index%t.length];if(Le(t[0])){const l=t,c=i._scopes.filter(u=>u!==l);t=[];for(const u of l){const d=Td(c,i,e,u);t.push(vi(d,o,s&&s[e],a))}}return t}function Nb(e,t,n){return ur(e)?e(t,n):e}const hE=(e,t)=>e===!0?t:typeof e=="string"?cr(t,e):void 0;function gE(e,t,n,r,i){for(const o of t){const s=hE(n,o);if(s){e.add(s);const a=Nb(s._fallback,n,i);if(typeof a<"u"&&a!==n&&a!==r)return a}else if(s===!1&&typeof r<"u"&&n!==r)return null}return!1}function Td(e,t,n,r){const i=t._rootScopes,o=Nb(t._fallback,n,r),s=[...e,...i],a=new Set;a.add(r);let l=Wh(a,s,n,o||n,r);return l===null||typeof o<"u"&&o!==n&&(l=Wh(a,s,o,l,r),l===null)?!1:Od(Array.from(a),[""],i,o,()=>pE(t,n,r))}function Wh(e,t,n,r,i){for(;n;)n=gE(e,t,n,r,i);return n}function pE(e,t,n){const r=e._getTarget();t in r||(r[t]={});const i=r[t];return nt(i)&&Le(n)?n:i||{}}function mE(e,t,n,r){let i;for(const o of t)if(i=Tb(cE(o,e),n),typeof i<"u")return Nd(e,i)?Td(n,r,e,i):i}function Tb(e,t){for(const n of t){if(!n)continue;const r=n[e];if(typeof r<"u")return r}}function Xh(e){let t=e._keys;return t||(t=e._keys=bE(e._scopes)),t}function bE(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 Db(e,t,n,r){const{iScale:i}=e,{key:o="r"}=this._parsing,s=new Array(r);let a,l,c,u;for(a=0,l=r;a<l;++a)c=a+n,u=t[c],s[a]={r:i.parse(cr(u,o),c)};return s}const vE=Number.EPSILON||1e-14,xi=(e,t)=>t<e.length&&!e[t].skip&&e[t],Lb=e=>e==="x"?"y":"x";function xE(e,t,n,r){const i=e.skip?t:e,o=t,s=n.skip?t:n,a=cu(o,i),l=cu(s,o);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:o.x-d*(s.x-i.x),y:o.y-d*(s.y-i.y)},next:{x:o.x+f*(s.x-i.x),y:o.y+f*(s.y-i.y)}}}function yE(e,t,n){const r=e.length;let i,o,s,a,l,c=xi(e,0);for(let u=0;u<r-1;++u)if(l=c,c=xi(e,u+1),!(!l||!c)){if(lo(t[u],0,vE)){n[u]=n[u+1]=0;continue}i=n[u]/t[u],o=n[u+1]/t[u],a=Math.pow(i,2)+Math.pow(o,2),!(a<=9)&&(s=3/Math.sqrt(a),n[u]=i*s*t[u],n[u+1]=o*s*t[u])}}function CE(e,t,n="x"){const r=Lb(n),i=e.length;let o,s,a,l=xi(e,0);for(let c=0;c<i;++c){if(s=a,a=l,l=xi(e,c+1),!a)continue;const u=a[n],d=a[r];s&&(o=(u-s[n])/3,a[`cp1${n}`]=u-o,a[`cp1${r}`]=d-o*t[c]),l&&(o=(l[n]-u)/3,a[`cp2${n}`]=u+o,a[`cp2${r}`]=d+o*t[c])}}function wE(e,t="x"){const n=Lb(t),r=e.length,i=Array(r).fill(0),o=Array(r);let s,a,l,c=xi(e,0);for(s=0;s<r;++s)if(a=l,l=c,c=xi(e,s+1),!!l){if(c){const u=c[t]-l[t];i[s]=u!==0?(c[n]-l[n])/u:0}o[s]=a?c?Cn(i[s-1])!==Cn(i[s])?0:(i[s-1]+i[s])/2:i[s-1]:i[s]}yE(e,i,o),CE(e,o,t)}function Ss(e,t,n){return Math.max(Math.min(e,n),t)}function SE(e,t){let n,r,i,o,s,a=Vn(e[0],t);for(n=0,r=e.length;n<r;++n)s=o,o=a,a=n<r-1&&Vn(e[n+1],t),o&&(i=e[n],s&&(i.cp1x=Ss(i.cp1x,t.left,t.right),i.cp1y=Ss(i.cp1y,t.top,t.bottom)),a&&(i.cp2x=Ss(i.cp2x,t.left,t.right),i.cp2y=Ss(i.cp2y,t.top,t.bottom)))}function IE(e,t,n,r,i){let o,s,a,l;if(t.spanGaps&&(e=e.filter(c=>!c.skip)),t.cubicInterpolationMode==="monotone")wE(e,i);else{let c=r?e[e.length-1]:e[0];for(o=0,s=e.length;o<s;++o)a=e[o],l=xE(c,a,e[Math.min(o+1,s-(r?0:1))%s],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&&SE(e,n)}function Dd(){return typeof window<"u"&&typeof document<"u"}function Ld(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function ja(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 Cl=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function _E(e,t){return Cl(e).getPropertyValue(t)}const EE=["top","right","bottom","left"];function Tr(e,t,n){const r={};n=n?"-"+n:"";for(let i=0;i<4;i++){const o=EE[i];r[o]=parseFloat(e[t+"-"+o+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const ME=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function AE(e,t){const n=e.touches,r=n&&n.length?n[0]:e,{offsetX:i,offsetY:o}=r;let s=!1,a,l;if(ME(i,o,e.target))a=i,l=o;else{const c=t.getBoundingClientRect();a=r.clientX-c.left,l=r.clientY-c.top,s=!0}return{x:a,y:l,box:s}}function wr(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:r}=t,i=Cl(n),o=i.boxSizing==="border-box",s=Tr(i,"padding"),a=Tr(i,"border","width"),{x:l,y:c,box:u}=AE(e,n),d=s.left+(u&&a.left),f=s.top+(u&&a.top);let{width:h,height:g}=t;return o&&(h-=s.width+a.width,g-=s.height+a.height),{x:Math.round((l-d)/h*n.width/r),y:Math.round((c-f)/g*n.height/r)}}function RE(e,t,n){let r,i;if(t===void 0||n===void 0){const o=e&&Ld(e);if(!o)t=e.clientWidth,n=e.clientHeight;else{const s=o.getBoundingClientRect(),a=Cl(o),l=Tr(a,"border","width"),c=Tr(a,"padding");t=s.width-c.width-l.width,n=s.height-c.height-l.height,r=ja(a.maxWidth,o,"clientWidth"),i=ja(a.maxHeight,o,"clientHeight")}}return{width:t,height:n,maxWidth:r||Ta,maxHeight:i||Ta}}const nr=e=>Math.round(e*10)/10;function kE(e,t,n,r){const i=Cl(e),o=Tr(i,"margin"),s=ja(i.maxWidth,e,"clientWidth")||Ta,a=ja(i.maxHeight,e,"clientHeight")||Ta,l=RE(e,t,n);let{width:c,height:u}=l;if(i.boxSizing==="content-box"){const f=Tr(i,"border","width"),h=Tr(i,"padding");c-=h.width+f.width,u-=h.height+f.height}return c=Math.max(0,c-o.width),u=Math.max(0,r?c/r:u-o.height),c=nr(Math.min(c,s,l.maxWidth)),u=nr(Math.min(u,a,l.maxHeight)),c&&!u&&(u=nr(c/2)),(t!==void 0||n!==void 0)&&r&&l.height&&u>l.height&&(u=l.height,c=nr(Math.floor(u*r))),{width:c,height:u}}function Yh(e,t,n){const r=t||1,i=nr(e.height*r),o=nr(e.width*r);e.height=nr(e.height),e.width=nr(e.width);const s=e.canvas;return s.style&&(n||!s.style.height&&!s.style.width)&&(s.style.height=`${e.height}px`,s.style.width=`${e.width}px`),e.currentDevicePixelRatio!==r||s.height!==i||s.width!==o?(e.currentDevicePixelRatio=r,s.height=i,s.width=o,e.ctx.setTransform(r,0,0,r,0,0),!0):!1}const PE=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};Dd()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return e}();function Zh(e,t){const n=_E(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function Sr(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function FE(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 OE(e,t,n,r){const i={x:e.cp2x,y:e.cp2y},o={x:t.cp1x,y:t.cp1y},s=Sr(e,i,n),a=Sr(i,o,n),l=Sr(o,t,n),c=Sr(s,a,n),u=Sr(a,l,n);return Sr(c,u,n)}const NE=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}}},TE=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function di(e,t,n){return e?NE(t,n):TE()}function jb(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 Bb(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function $b(e){return e==="angle"?{between:Oo,compare:D3,normalize:At}:{between:Bn,compare:(t,n)=>t-n,normalize:t=>t}}function Jh({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 DE(e,t,n){const{property:r,start:i,end:o}=n,{between:s,normalize:a}=$b(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&&s(a(t[c%l][r]),i,o);++f)c--,u--;c%=l,u%=l}return u<c&&(u+=l),{start:c,end:u,loop:d,style:e.style}}function Vb(e,t,n){if(!n)return[e];const{property:r,start:i,end:o}=n,s=t.length,{compare:a,between:l,normalize:c}=$b(r),{start:u,end:d,loop:f,style:h}=DE(e,t,n),g=[];let p=!1,m=null,v,C,y;const I=()=>l(i,y,v)&&a(i,y)!==0,w=()=>a(o,v)===0||l(o,y,v),R=()=>p||I(),A=()=>!p||w();for(let S=u,_=u;S<=d;++S)C=t[S%s],!C.skip&&(v=c(C[r]),v!==y&&(p=l(v,i,o),m===null&&R()&&(m=a(v,i)===0?S:_),m!==null&&A()&&(g.push(Jh({start:m,end:S,loop:f,count:s,style:h})),m=null),_=S,y=v));return m!==null&&g.push(Jh({start:m,end:d,loop:f,count:s,style:h})),g}function Gb(e,t){const n=[],r=e.segments;for(let i=0;i<r.length;i++){const o=Vb(r[i],e.points,t);o.length&&n.push(...o)}return n}function LE(e,t,n,r){let i=0,o=t-1;if(n&&!r)for(;i<t&&!e[i].skip;)i++;for(;i<t&&e[i].skip;)i++;for(i%=t,n&&(o+=i);o>i&&e[o%t].skip;)o--;return o%=t,{start:i,end:o}}function jE(e,t,n,r){const i=e.length,o=[];let s=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,o.push({start:t%i,end:(l-1)%i,loop:r}),t=s=c.stop?l:null):(s=l,a.skip&&(t=l)),a=c}return s!==null&&o.push({start:t%i,end:s%i,loop:r}),o}function BE(e,t){const n=e.points,r=e.options.spanGaps,i=n.length;if(!i)return[];const o=!!e._loop,{start:s,end:a}=LE(n,i,o,r);if(r===!0)return Uh(e,[{start:s,end:a,loop:o}],n,t);const l=a<s?a+i:a,c=!!e._fullLoop&&s===0&&a===i-1;return Uh(e,jE(n,s,l,c),n,t)}function Uh(e,t,n,r){return!r||!r.setContext||!n?t:$E(e,t,n,r)}function $E(e,t,n,r){const i=e._chart.getContext(),o=Qh(e.options),{_datasetIndex:s,options:{spanGaps:a}}=e,l=n.length,c=[];let u=o,d=t[0].start,f=d;function h(g,p,m,v){const C=a?-1:1;if(g!==p){for(g+=l;n[g%l].skip;)g-=C;for(;n[p%l].skip;)p+=C;g%l!==p%l&&(c.push({start:g%l,end:p%l,loop:m,style:v}),u=v,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 v=n[f%l];m=Qh(r.setContext(gr(i,{type:"segment",p0:p,p1:v,p0DataIndex:(f-1)%l,p1DataIndex:f%l,datasetIndex:s}))),VE(m,u)&&h(d,f-1,g.loop,u),p=v,u=m}d<f-1&&h(d,f-1,g.loop,u)}return c}function Qh(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function VE(e,t){if(!t)return!1;const n=[],r=function(i,o){return Pd(o)?(n.includes(o)||n.push(o),n.indexOf(o)):o};return JSON.stringify(e,r)!==JSON.stringify(t,r)}function Is(e,t,n){return e.options.clip?e[n]:t[n]}function GE(e,t){const{xScale:n,yScale:r}=e;return n&&r?{left:Is(n,t,"left"),right:Is(n,t,"right"),top:Is(r,t,"top"),bottom:Is(r,t,"bottom")}:t}function zb(e,t){const n=t._clip;if(n.disabled)return!1;const r=GE(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)}}/*!
94
- * Chart.js v4.5.1
95
- * https://www.chartjs.org
96
- * (c) 2025 Chart.js Contributors
97
- * Released under the MIT License
98
- */class zE{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,r,i){const o=n.listeners[i],s=n.duration;o.forEach(a=>a({chart:t,initial:n.initial,numSteps:s,currentStep:Math.min(r-n.start,s)}))}_refresh(){this._request||(this._running=!0,this._request=_b.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 o=r.items;let s=o.length-1,a=!1,l;for(;s>=0;--s)l=o[s],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(t),a=!0):(o[s]=o[o.length-1],o.pop());a&&(i.draw(),this._notify(i,r,t,"progress")),o.length||(r.running=!1,this._notify(i,r,t,"complete"),r.initial=!1),n+=o.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 Fn=new zE;const Kh="transparent",HE={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const r=Gh(e||Kh),i=r.valid&&Gh(t||Kh);return i&&i.valid?i.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class WE{constructor(t,n,r,i){const o=n[r];i=tt([t.to,i,o,t.from]);const s=tt([t.from,o,i]);this._active=!0,this._fn=t.fn||HE[t.type||typeof s],this._easing=co[t.easing]||co.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=s,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],o=r-this._start,s=this._duration-o;this._start=r,this._duration=Math.floor(Math.max(s,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=tt([t.to,n,i,t.from]),this._from=tt([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,o=this._from,s=this._loop,a=this._to;let l;if(this._active=o!==a&&(s||n<r),!this._active){this._target[i]=a,this._notify(!0);return}if(n<0){this._target[i]=o;return}l=n/r%2,l=s&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(o,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 Hb{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!Le(t))return;const n=Object.keys(it.animation),r=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const o=t[i];if(!Le(o))return;const s={};for(const a of n)s[a]=o[a];(nt(o.properties)&&o.properties||[i]).forEach(a=>{(a===i||!r.has(a))&&r.set(a,s)})})}_animateOptions(t,n){const r=n.options,i=YE(t,r);if(!i)return[];const o=this._createAnimations(i,r);return r.$shared&&XE(t.options.$animations,r).then(()=>{t.options=r},()=>{}),o}_createAnimations(t,n){const r=this._properties,i=[],o=t.$animations||(t.$animations={}),s=Object.keys(n),a=Date.now();let l;for(l=s.length-1;l>=0;--l){const c=s[l];if(c.charAt(0)==="$")continue;if(c==="options"){i.push(...this._animateOptions(t,n));continue}const u=n[c];let d=o[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}o[c]=d=new WE(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 Fn.add(this._chart,r),!0}}function XE(e,t){const n=[],r=Object.keys(t);for(let i=0;i<r.length;i++){const o=e[r[i]];o&&o.active()&&n.push(o.wait())}return Promise.all(n)}function YE(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 qh(e,t){const n=e&&e.options||{},r=n.reverse,i=n.min===void 0?t:0,o=n.max===void 0?t:0;return{start:r?o:i,end:r?i:o}}function ZE(e,t,n){if(n===!1)return!1;const r=qh(e,n),i=qh(t,n);return{top:i.end,right:r.end,bottom:i.start,left:r.start}}function JE(e){let t,n,r,i;return Le(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 Wb(e,t){const n=[],r=e._getSortedDatasetMetas(t);let i,o;for(i=0,o=r.length;i<o;++i)n.push(r[i].index);return n}function eg(e,t,n,r={}){const i=e.keys,o=r.mode==="single";let s,a,l,c;if(t===null)return;let u=!1;for(s=0,a=i.length;s<a;++s){if(l=+i[s],l===n){if(u=!0,r.all)continue;break}c=e.values[l],ct(c)&&(o||t===0||Cn(t)===Cn(c))&&(t+=c)}return!u&&!r.all?0:t}function UE(e,t){const{iScale:n,vScale:r}=t,i=n.axis==="x"?"x":"y",o=r.axis==="x"?"x":"y",s=Object.keys(e),a=new Array(s.length);let l,c,u;for(l=0,c=s.length;l<c;++l)u=s[l],a[l]={[i]:u,[o]:e[u]};return a}function dc(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function QE(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function KE(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 qE(e,t,n){const r=e[t]||(e[t]={});return r[n]||(r[n]={})}function tg(e,t,n,r){for(const i of t.getMatchingVisibleMetas(r).reverse()){const o=e[i.index];if(n&&o>0||!n&&o<0)return i.index}return null}function ng(e,t){const{chart:n,_cachedMeta:r}=e,i=n._stacks||(n._stacks={}),{iScale:o,vScale:s,index:a}=r,l=o.axis,c=s.axis,u=QE(o,s,r),d=t.length;let f;for(let h=0;h<d;++h){const g=t[h],{[l]:p,[c]:m}=g,v=g._stacks||(g._stacks={});f=v[c]=qE(i,u,p),f[a]=m,f._top=tg(f,s,!0,r.type),f._bottom=tg(f,s,!1,r.type);const C=f._visualValues||(f._visualValues={});C[a]=m}}function fc(e,t){const n=e.scales;return Object.keys(n).filter(r=>n[r].axis===t).shift()}function e6(e,t){return gr(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function t6(e,t,n){return gr(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function Bi(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 o=i._stacks;if(!o||o[r]===void 0||o[r][n]===void 0)return;delete o[r][n],o[r]._visualValues!==void 0&&o[r]._visualValues[n]!==void 0&&delete o[r]._visualValues[n]}}}const hc=e=>e==="reset"||e==="none",rg=(e,t)=>t?e:Object.assign({},e),n6=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:Wb(n,!0),values:null};class qt{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=dc(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&&Bi(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,o=n.xAxisID=Me(r.xAxisID,fc(t,"x")),s=n.yAxisID=Me(r.yAxisID,fc(t,"y")),a=n.rAxisID=Me(r.rAxisID,fc(t,"r")),l=n.indexAxis,c=n.iAxisID=i(l,o,s,a),u=n.vAxisID=i(l,s,o,a);n.xScale=this.getScaleForId(o),n.yScale=this.getScaleForId(s),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&&Bh(this._data,this),t._stacked&&Bi(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(Le(n)){const i=this._cachedMeta;this._data=UE(n,i)}else if(r!==n){if(r){Bh(r,this);const i=this._cachedMeta;Bi(i),i._parsed=[]}n&&Object.isExtensible(n)&&$3(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 o=n._stacked;n._stacked=dc(n.vScale,n),n.stack!==r.stack&&(i=!0,Bi(n),n.stack=r.stack),this._resyncElements(t),(i||o!==n._stacked)&&(ng(this,n._parsed),n._stacked=dc(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:o,_stacked:s}=r,a=o.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{nt(i[t])?f=this.parseArrayData(r,i,t,n):Le(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}s&&ng(this,f)}parsePrimitiveData(t,n,r,i){const{iScale:o,vScale:s}=t,a=o.axis,l=s.axis,c=o.getLabels(),u=o===s,d=new Array(i);let f,h,g;for(f=0,h=i;f<h;++f)g=f+r,d[f]={[a]:u||o.parse(c[g],g),[l]:s.parse(n[g],g)};return d}parseArrayData(t,n,r,i){const{xScale:o,yScale:s}=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:o.parse(d[0],u),y:s.parse(d[1],u)};return a}parseObjectData(t,n,r,i){const{xScale:o,yScale:s}=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:o.parse(cr(h,a),f),y:s.parse(cr(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,o=this._cachedMeta,s=n[t.axis],a={keys:Wb(i,!0),values:n._stacks[t.axis]._visualValues};return eg(a,s,o.index,{mode:r})}updateRangeFromParsed(t,n,r,i){const o=r[n.axis];let s=o===null?NaN:o;const a=i&&r._stacks[n.axis];i&&a&&(i.values=a,s=eg(i,o,this._cachedMeta.index)),t.min=Math.min(t.min,s),t.max=Math.max(t.max,s)}getMinMax(t,n){const r=this._cachedMeta,i=r._parsed,o=r._sorted&&t===r.iScale,s=i.length,a=this._getOtherScale(t),l=n6(n,r,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:d}=KE(a);let f,h;function g(){h=i[f];const p=h[a.axis];return!ct(h[t.axis])||u>p||d<p}for(f=0;f<s&&!(!g()&&(this.updateRangeFromParsed(c,t,h,l),o));++f);if(o){for(f=s-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,o,s;for(i=0,o=n.length;i<o;++i)s=n[i][t.axis],ct(s)&&r.push(s);return r}getMaxOverflow(){return!1}getLabelAndValue(t){const n=this._cachedMeta,r=n.iScale,i=n.vScale,o=this.getParsed(t);return{label:r?""+r.getLabelForValue(o[r.axis]):"",value:i?""+i.getLabelForValue(o[i.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default"),n._clip=JE(Me(this.options.clip,ZE(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,n=this.chart,r=this._cachedMeta,i=r.data||[],o=n.chartArea,s=[],a=this._drawStart||0,l=this._drawCount||i.length-a,c=this.options.drawActiveElementsOnTop;let u;for(r.dataset&&r.dataset.draw(t,o,a,l),u=a;u<a+l;++u){const d=i[u];d.hidden||(d.active&&c?s.push(d):d.draw(t,o))}for(u=0;u<s.length;++u)s[u].draw(t,o)}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 o;if(t>=0&&t<this._cachedMeta.data.length){const s=this._cachedMeta.data[t];o=s.$context||(s.$context=t6(this.getContext(),t,s)),o.parsed=this.getParsed(t),o.raw=i.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=e6(this.chart.getContext(),this.index)),o.dataset=i,o.index=o.datasetIndex=this.index;return o.active=!!n,o.mode=r,o}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",o=this._cachedDataOpts,s=t+"-"+n,a=o[s],l=this.enableOptionSharing&&Fo(r);if(a)return rg(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(it.elements[t]),g=()=>this.getContext(r,i,n),p=c.resolveNamedOptions(f,h,g,d);return p.$shared&&(p.$shared=l,o[s]=Object.freeze(rg(p,l))),p}_resolveAnimations(t,n,r){const i=this.chart,o=this._cachedDataOpts,s=`animation-${n}`,a=o[s];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 Hb(i,l&&l.animations);return l&&l._cacheable&&(o[s]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||hc(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const r=this.resolveDataElementOptions(t,n),i=this._sharedOptions,o=this.getSharedOptions(r),s=this.includeOptions(n,o)||o!==i;return this.updateSharedOptions(o,n,r),{sharedOptions:o,includeOptions:s}}updateElement(t,n,r,i){hc(i)?Object.assign(t,r):this._resolveAnimations(n,i).update(t,r)}updateSharedOptions(t,n,r){t&&!hc(n)&&this._resolveAnimations(void 0,n).update(t,r)}_setStyle(t,n,r,i){t.active=i;const o=this.getStyle(n,i);this._resolveAnimations(n,r,i).update(t,{options:!i&&this.getSharedOptions(o)||o})}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,o=n.length,s=Math.min(o,i);s&&this.parse(0,s),o>i?this._insertElements(i,o-i,t):o<i&&this._removeElements(o,i-o)}_insertElements(t,n,r=!0){const i=this._cachedMeta,o=i.data,s=t+n;let a;const l=c=>{for(c.length+=n,a=c.length-1;a>=s;a--)c[a]=c[a-n]};for(l(o),a=t;a<s;++a)o[a]=new this.dataElementType;this._parsing&&l(i._parsed),this.parse(t,n),r&&this.updateElements(o,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&&Bi(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])}}U(qt,"defaults",{}),U(qt,"datasetElementType",null),U(qt,"dataElementType",null);function r6(e,t){if(!e._cache.$bar){const n=e.getMatchingVisibleMetas(t);let r=[];for(let i=0,o=n.length;i<o;i++)r=r.concat(n[i].controller.getAllParsedValues(e));e._cache.$bar=Ib(r.sort((i,o)=>i-o))}return e._cache.$bar}function i6(e){const t=e.iScale,n=r6(t,e.type);let r=t._length,i,o,s,a;const l=()=>{s===32767||s===-32768||(Fo(a)&&(r=Math.min(r,Math.abs(s-a)||r)),a=s)};for(i=0,o=n.length;i<o;++i)s=t.getPixelForValue(n[i]),l();for(a=void 0,i=0,o=t.ticks.length;i<o;++i)s=t.getPixelForTick(i),l();return r}function o6(e,t,n,r){const i=n.barThickness;let o,s;return Oe(i)?(o=t.min*n.categoryPercentage,s=n.barPercentage):(o=i*r,s=1),{chunk:o/r,ratio:s,start:t.pixels[e]-o/2}}function s6(e,t,n,r){const i=t.pixels,o=i[e];let s=e>0?i[e-1]:null,a=e<i.length-1?i[e+1]:null;const l=n.categoryPercentage;s===null&&(s=o-(a===null?t.end-t.start:a-o)),a===null&&(a=o+o-s);const c=o-(o-Math.min(s,a))/2*l;return{chunk:Math.abs(a-s)/2*l/r,ratio:n.barPercentage,start:c}}function a6(e,t,n,r){const i=n.parse(e[0],r),o=n.parse(e[1],r),s=Math.min(i,o),a=Math.max(i,o);let l=s,c=a;Math.abs(s)>Math.abs(a)&&(l=a,c=s),t[n.axis]=c,t._custom={barStart:l,barEnd:c,start:i,end:o,min:s,max:a}}function Xb(e,t,n,r){return nt(e)?a6(e,t,n,r):t[n.axis]=n.parse(e,r),t}function ig(e,t,n,r){const i=e.iScale,o=e.vScale,s=i.getLabels(),a=i===o,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(s[c],c),l.push(Xb(f,d,o,c));return l}function gc(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function l6(e,t,n){return e!==0?Cn(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}function c6(e){let t,n,r,i,o;return e.horizontal?(t=e.base>e.x,n="left",r="right"):(t=e.base<e.y,n="bottom",r="top"),t?(i="end",o="start"):(i="start",o="end"),{start:n,end:r,reverse:t,top:i,bottom:o}}function u6(e,t,n,r){let i=t.borderSkipped;const o={};if(!i){e.borderSkipped=o;return}if(i===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:s,end:a,reverse:l,top:c,bottom:u}=c6(e);i==="middle"&&n&&(e.enableBorderRadius=!0,(n._top||0)===r?i=c:(n._bottom||0)===r?i=u:(o[og(u,s,a,l)]=!0,i=c)),o[og(i,s,a,l)]=!0,e.borderSkipped=o}function og(e,t,n,r){return r?(e=d6(e,t,n),e=sg(e,n,t)):e=sg(e,t,n),e}function d6(e,t,n){return e===t?n:e===n?t:e}function sg(e,t,n){return e==="start"?t:e==="end"?n:e}function f6(e,{inflateAmount:t},n){e.inflateAmount=t==="auto"?n===1?.33:0:t}class fo extends qt{parsePrimitiveData(t,n,r,i){return ig(t,n,r,i)}parseArrayData(t,n,r,i){return ig(t,n,r,i)}parseObjectData(t,n,r,i){const{iScale:o,vScale:s}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=o.axis==="x"?a:l,u=s.axis==="x"?a:l,d=[];let f,h,g,p;for(f=r,h=r+i;f<h;++f)p=n[f],g={},g[o.axis]=o.parse(cr(p,c),f),d.push(Xb(cr(p,u),g,s,f));return d}updateRangeFromParsed(t,n,r,i){super.updateRangeFromParsed(t,n,r,i);const o=r._custom;o&&n===this._cachedMeta.vScale&&(t.min=Math.min(t.min,o.min),t.max=Math.max(t.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const n=this._cachedMeta,{iScale:r,vScale:i}=n,o=this.getParsed(t),s=o._custom,a=gc(s)?"["+s.start+", "+s.end+"]":""+i.getLabelForValue(o[i.axis]);return{label:""+r.getLabelForValue(o[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 o=i==="reset",{index:s,_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=o||Oe(g[a.axis])?{base:l,head:l}:this._calculateBarValuePixels(h),m=this._calculateBarIndexPixels(h,u),v=(g._stacks||{})[a.axis],C={horizontal:c,base:p.base,enableBorderRadius:!v||gc(g._custom)||s===v._top||s===v._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&&(C.options=d||this.resolveDataElementOptions(h,t[h].active?"active":i));const y=C.options||t[h].options;u6(C,y,v,s),f6(C,y,u.ratio),this.updateElement(t[h],h,C,i)}}_getStacks(t,n){const{iScale:r}=this._cachedMeta,i=r.getMatchingVisibleMetas(this._type).filter(u=>u.controller.options.grouped),o=r.options.stacked,s=[],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(Oe(f)||isNaN(f))return!0};for(const u of i)if(!(n!==void 0&&c(u))&&((o===!1||s.indexOf(u.stack)===-1||o===void 0&&u.stack===void 0)&&s.push(u.stack),u.index===t))break;return s.length||s.push(void 0),s}_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[Me(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),o=n!==void 0?i.indexOf(n):-1;return o===-1?i.length-1:o}_getRuler(){const t=this.options,n=this._cachedMeta,r=n.iScale,i=[];let o,s;for(o=0,s=n.data.length;o<s;++o)i.push(r.getPixelForValue(this.getParsed(o)[r.axis],o));const a=t.barThickness;return{min:a||i6(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:o,minBarLength:s}}=this,a=o||0,l=this.getParsed(t),c=l._custom,u=gc(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&&Cn(d)!==Cn(c.barEnd)&&(f=0),f+=d);const m=!Oe(o)&&!u?o:f;let v=n.getPixelForValue(m);if(this.chart.getDataVisibility(t)?g=n.getPixelForValue(f+h):g=v,p=g-v,Math.abs(p)<s){p=l6(p,n,a)*s,d===a&&(v-=p/2);const C=n.getPixelForDecimal(0),y=n.getPixelForDecimal(1),I=Math.min(C,y),w=Math.max(C,y);v=Math.max(Math.min(v,w),I),g=v+p,r&&!u&&(l._stacks[n.axis]._visualValues[i]=n.getValueForPixel(g)-n.getValueForPixel(v))}if(v===n.getPixelForValue(a)){const C=Cn(p)*n.getLineWidthForValue(a)/2;v+=C,p-=C}return{size:p,base:v,head:g,center:g+p/2}}_calculateBarIndexPixels(t,n){const r=n.scale,i=this.options,o=i.skipNull,s=Me(i.maxBarThickness,1/0);let a,l;const c=this._getAxisCount();if(n.grouped){const u=o?this._getStackCount(t):n.stackCount,d=i.barThickness==="flex"?s6(t,n,i,u*c):o6(t,n,i,u*c),f=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,h=this._getAxis().indexOf(Me(f,this.getFirstScaleIdForIndexAxis())),g=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0)+h;a=d.start+d.chunk*g+d.chunk/2,l=Math.min(s,d.chunk*d.ratio)}else a=r.getPixelForValue(this.getParsed(t)[r.axis],t),l=Math.min(s,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 o=0;for(;o<i;++o)this.getParsed(o)[n.axis]!==null&&!r[o].hidden&&r[o].draw(this._ctx)}}U(fo,"id","bar"),U(fo,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),U(fo,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class na extends qt{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,n,r,i){const o=super.parsePrimitiveData(t,n,r,i);for(let s=0;s<o.length;s++)o[s]._custom=this.resolveDataElementOptions(s+r).radius;return o}parseArrayData(t,n,r,i){const o=super.parseArrayData(t,n,r,i);for(let s=0;s<o.length;s++){const a=n[r+s];o[s]._custom=Me(a[2],this.resolveDataElementOptions(s+r).radius)}return o}parseObjectData(t,n,r,i){const o=super.parseObjectData(t,n,r,i);for(let s=0;s<o.length;s++){const a=n[r+s];o[s]._custom=Me(a&&a.r&&+a.r,this.resolveDataElementOptions(s+r).radius)}return o}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:o}=n,s=this.getParsed(t),a=i.getLabelForValue(s.x),l=o.getLabelForValue(s.y),c=s._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 o=i==="reset",{iScale:s,vScale:a}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(n,i),u=s.axis,d=a.axis;for(let f=n;f<n+r;f++){const h=t[f],g=!o&&this.getParsed(f),p={},m=p[u]=o?s.getPixelForDecimal(.5):s.getPixelForValue(g[u]),v=p[d]=o?a.getBasePixel():a.getPixelForValue(g[d]);p.skip=isNaN(m)||isNaN(v),c&&(p.options=l||this.resolveDataElementOptions(f,h.active?"active":i),o&&(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 o=i.radius;return n!=="active"&&(i.radius=0),i.radius+=Me(r&&r._custom,o),i}}U(na,"id","bubble"),U(na,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),U(na,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function h6(e,t,n){let r=1,i=1,o=0,s=0;if(t<rt){const a=e,l=a+t,c=Math.cos(a),u=Math.sin(a),d=Math.cos(l),f=Math.sin(l),h=(y,I,w)=>Oo(y,a,l,!0)?1:Math.max(I,I*n,w,w*n),g=(y,I,w)=>Oo(y,a,l,!0)?-1:Math.min(I,I*n,w,w*n),p=h(0,c,d),m=h(dt,u,f),v=g($e,c,d),C=g($e+dt,u,f);r=(p-v)/2,i=(m-C)/2,o=-(p+v)/2,s=-(m+C)/2}return{ratioX:r,ratioY:i,offsetX:o,offsetY:s}}class rr extends qt{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 o=l=>+r[l];if(Le(r[t])){const{key:l="value"}=this._parsing;o=c=>+cr(r[c],l)}let s,a;for(s=t,a=t+n;s<a;++s)i._parsed[s]=o(s)}}_getRotation(){return cn(this.options.rotation-90)}_getCircumference(){return cn(this.options.circumference)}_getRotationExtents(){let t=rt,n=-rt;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,o=i._getRotation(),s=i._getCircumference();t=Math.min(t,o),n=Math.max(n,o+s)}return{rotation:t,circumference:n-t}}update(t){const n=this.chart,{chartArea:r}=n,i=this._cachedMeta,o=i.data,s=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,a=Math.max((Math.min(r.width,r.height)-s)/2,0),l=Math.min(_3(this.options.cutout,a),1),c=this._getRingWeight(this.index),{circumference:u,rotation:d}=this._getRotationExtents(),{ratioX:f,ratioY:h,offsetX:g,offsetY:p}=h6(d,u,l),m=(r.width-s)/f,v=(r.height-s)/h,C=Math.max(Math.min(m,v)/2,0),y=xb(this.options.radius,C),I=Math.max(y*l,0),w=(y-I)/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(o,0,o.length,t)}_circumference(t,n){const r=this.options,i=this._cachedMeta,o=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]*o/rt)}updateElements(t,n,r,i){const o=i==="reset",s=this.chart,a=s.chartArea,c=s.options.animation,u=(a.left+a.right)/2,d=(a.top+a.bottom)/2,f=o&&c.animateScale,h=f?0:this.innerRadius,g=f?0:this.outerRadius,{sharedOptions:p,includeOptions:m}=this._getSharedOptions(n,i);let v=this._getRotation(),C;for(C=0;C<n;++C)v+=this._circumference(C,o);for(C=n;C<n+r;++C){const y=this._circumference(C,o),I=t[C],w={x:u+this.offsetX,y:d+this.offsetY,startAngle:v,endAngle:v+y,circumference:y,outerRadius:g,innerRadius:h};m&&(w.options=p||this.resolveDataElementOptions(C,I.active?"active":i)),v+=y,this.updateElement(I,C,w,i)}}calculateTotal(){const t=this._cachedMeta,n=t.data;let r=0,i;for(i=0;i<n.length;i++){const o=t._parsed[i];o!==null&&!isNaN(o)&&this.chart.getDataVisibility(i)&&!n[i].hidden&&(r+=Math.abs(o))}return r}calculateCircumference(t){const n=this._cachedMeta.total;return n>0&&!isNaN(t)?rt*(Math.abs(t)/n):0}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],o=Qo(n._parsed[t],r.options.locale);return{label:i[t]||"",value:o}}getMaxBorderWidth(t){let n=0;const r=this.chart;let i,o,s,a,l;if(!t){for(i=0,o=r.data.datasets.length;i<o;++i)if(r.isDatasetVisible(i)){s=r.getDatasetMeta(i),t=s.data,a=s.controller;break}}if(!t)return 0;for(i=0,o=t.length;i<o;++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 o=this.resolveDataElementOptions(r);n=Math.max(n,o.offset||0,o.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(Me(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}U(rr,"id","doughnut"),U(rr,"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"}),U(rr,"descriptors",{_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),U(rr,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data,{labels:{pointStyle:r,textAlign:i,color:o,useBorderRadius:s,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:o,hidden:!t.getDataVisibility(c),lineDash:d.borderDash,lineDashOffset:d.borderDashOffset,lineJoin:d.borderJoinStyle,lineWidth:d.borderWidth,strokeStyle:d.borderColor,textAlign:i,pointStyle:r,borderRadius:s&&(a||d.borderRadius),index:c}}):[]}},onClick(t,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}}});class ra extends qt{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:r,data:i=[],_dataset:o}=n,s=this.chart._animationsDisabled;let{start:a,count:l}=Mb(n,i,s);this._drawStart=a,this._drawCount=l,Ab(n)&&(a=0,l=i.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!o._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:!s,options:c},t),this.updateElements(i,a,l,t)}updateElements(t,n,r,i){const o=i==="reset",{iScale:s,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:u,includeOptions:d}=this._getSharedOptions(n,i),f=s.axis,h=a.axis,{spanGaps:g,segment:p}=this.options,m=bi(g)?g:Number.POSITIVE_INFINITY,v=this.chart._animationsDisabled||o||i==="none",C=n+r,y=t.length;let I=n>0&&this.getParsed(n-1);for(let w=0;w<y;++w){const R=t[w],A=v?R:{};if(w<n||w>=C){A.skip=!0;continue}const S=this.getParsed(w),_=Oe(S[h]),E=A[f]=s.getPixelForValue(S[f],w),P=A[h]=o||_?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,S,l):S[h],w);A.skip=isNaN(E)||isNaN(P)||_,A.stop=w>0&&Math.abs(S[f]-I[f])>m,p&&(A.parsed=S,A.raw=c.data[w]),d&&(A.options=u||this.resolveDataElementOptions(w,R.active?"active":i)),v||this.updateElement(R,w,A,i),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 o=i[0].size(this.resolveDataElementOptions(0)),s=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(r,o,s)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}U(ra,"id","line"),U(ra,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),U(ra,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class ho extends qt{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||[],o=Qo(n._parsed[t].r,r.options.locale);return{label:i[t]||"",value:o}}parseObjectData(t,n,r,i){return Db.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 o=this.getParsed(i).r;!isNaN(o)&&this.chart.getDataVisibility(i)&&(o<n.min&&(n.min=o),o>n.max&&(n.max=o))}),n}_updateRadius(){const t=this.chart,n=t.chartArea,r=t.options,i=Math.min(n.right-n.left,n.bottom-n.top),o=Math.max(i/2,0),s=Math.max(r.cutoutPercentage?o/100*r.cutoutPercentage:1,0),a=(o-s)/t.getVisibleDatasetCount();this.outerRadius=o-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(t,n,r,i){const o=i==="reset",s=this.chart,l=s.options.animation,c=this._cachedMeta.rScale,u=c.xCenter,d=c.yCenter,f=c.getIndexAngle(0)-.5*$e;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 v=h,C=h+this._computeAngle(g,i,p),y=s.getDataVisibility(g)?c.getDistanceFromCenterForValue(this.getParsed(g).r):0;h=C,o&&(l.animateScale&&(y=0),l.animateRotate&&(v=C=f));const I={x:u,y:d,innerRadius:0,outerRadius:y,startAngle:v,endAngle:C,options:this.resolveDataElementOptions(g,m.active?"active":i)};this.updateElement(m,g,I,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)?cn(this.resolveDataElementOptions(t,n).angle||r):0}}U(ho,"id","polarArea"),U(ho,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),U(ho,"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((o,s)=>{const l=t.getDatasetMeta(0).controller.getStyle(s);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:i,lineWidth:l.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(s),index:s}})}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 Ba extends rr{}U(Ba,"id","pie"),U(Ba,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class ia extends qt{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 Db.bind(this)(t,n,r,i)}update(t){const n=this._cachedMeta,r=n.dataset,i=n.data||[],o=n.iScale.getLabels();if(r.points=i,t!=="resize"){const s=this.resolveDatasetElementOptions(t);this.options.showLine||(s.borderWidth=0);const a={_loop:!0,_fullLoop:o.length===i.length,options:s};this.updateElement(r,void 0,a,t)}this.updateElements(i,0,i.length,t)}updateElements(t,n,r,i){const o=this._cachedMeta.rScale,s=i==="reset";for(let a=n;a<n+r;a++){const l=t[a],c=this.resolveDataElementOptions(a,l.active?"active":i),u=o.getPointPositionForValue(a,this.getParsed(a).r),d=s?o.xCenter:u.x,f=s?o.yCenter:u.y,h={x:d,y:f,angle:u.angle,skip:isNaN(d)||isNaN(f),options:c};this.updateElement(l,a,h,i)}}}U(ia,"id","radar"),U(ia,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),U(ia,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class oa extends qt{getLabelAndValue(t){const n=this._cachedMeta,r=this.chart.data.labels||[],{xScale:i,yScale:o}=n,s=this.getParsed(t),a=i.getLabelForValue(s.x),l=o.getLabelForValue(s.y);return{label:r[t]||"",value:"("+a+", "+l+")"}}update(t){const n=this._cachedMeta,{data:r=[]}=n,i=this.chart._animationsDisabled;let{start:o,count:s}=Mb(n,r,i);if(this._drawStart=o,this._drawCount=s,Ab(n)&&(o=0,s=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,o,s,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 o=i==="reset",{iScale:s,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,u=this.resolveDataElementOptions(n,i),d=this.getSharedOptions(u),f=this.includeOptions(i,d),h=s.axis,g=a.axis,{spanGaps:p,segment:m}=this.options,v=bi(p)?p:Number.POSITIVE_INFINITY,C=this.chart._animationsDisabled||o||i==="none";let y=n>0&&this.getParsed(n-1);for(let I=n;I<n+r;++I){const w=t[I],R=this.getParsed(I),A=C?w:{},S=Oe(R[g]),_=A[h]=s.getPixelForValue(R[h],I),E=A[g]=o||S?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,R,l):R[g],I);A.skip=isNaN(_)||isNaN(E)||S,A.stop=I>0&&Math.abs(R[h]-y[h])>v,m&&(A.parsed=R,A.raw=c.data[I]),f&&(A.options=d||this.resolveDataElementOptions(I,w.active?"active":i)),C||this.updateElement(w,I,A,i),y=R}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 o=n[0].size(this.resolveDataElementOptions(0)),s=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,o,s)/2}}U(oa,"id","scatter"),U(oa,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),U(oa,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var g6=Object.freeze({__proto__:null,BarController:fo,BubbleController:na,DoughnutController:rr,LineController:ra,PieController:Ba,PolarAreaController:ho,RadarController:ia,ScatterController:oa});function yr(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class jd{constructor(t){U(this,"options");this.options=t||{}}static override(t){Object.assign(jd.prototype,t)}init(){}formats(){return yr()}parse(){return yr()}format(){return yr()}add(){return yr()}diff(){return yr()}startOf(){return yr()}endOf(){return yr()}}var p6={_date:jd};function m6(e,t,n,r){const{controller:i,data:o,_sorted:s}=e,a=i._cachedMeta.iScale,l=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(a&&t===a.axis&&t!=="r"&&s&&o.length){const c=a._reversePixels?j3:$n;if(r){if(i._sharedOptions){const u=o[0],d=typeof u.getRange=="function"&&u.getRange(t);if(d){const f=c(o,t,n-d),h=c(o,t,n+d);return{lo:f.lo,hi:h.hi}}}}else{const u=c(o,t,n);if(l){const{vScale:d}=i._cachedMeta,{_parsed:f}=e,h=f.slice(0,u.lo+1).reverse().findIndex(p=>!Oe(p[d.axis]));u.lo-=Math.max(0,h);const g=f.slice(u.hi).findIndex(p=>!Oe(p[d.axis]));u.hi+=Math.max(0,g)}return u}}return{lo:0,hi:o.length-1}}function wl(e,t,n,r,i){const o=e.getSortedVisibleDatasetMetas(),s=n[t];for(let a=0,l=o.length;a<l;++a){const{index:c,data:u}=o[a],{lo:d,hi:f}=m6(o[a],t,s,i);for(let h=d;h<=f;++h){const g=u[h];g.skip||r(g,c,h)}}}function b6(e){const t=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(r,i){const o=t?Math.abs(r.x-i.x):0,s=n?Math.abs(r.y-i.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(s,2))}}function pc(e,t,n,r,i){const o=[];return!i&&!e.isPointInArea(t)||wl(e,n,t,function(a,l,c){!i&&!Vn(a,e.chartArea,0)||a.inRange(t.x,t.y,r)&&o.push({element:a,datasetIndex:l,index:c})},!0),o}function v6(e,t,n,r){let i=[];function o(s,a,l){const{startAngle:c,endAngle:u}=s.getProps(["startAngle","endAngle"],r),{angle:d}=wb(s,{x:t.x,y:t.y});Oo(d,c,u)&&i.push({element:s,datasetIndex:a,index:l})}return wl(e,n,t,o),i}function x6(e,t,n,r,i,o){let s=[];const a=b6(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(!(!!o||e.isPointInArea(g))&&!h)return;const m=a(t,g);m<l?(s=[{element:u,datasetIndex:d,index:f}],l=m):m===l&&s.push({element:u,datasetIndex:d,index:f})}return wl(e,n,t,c),s}function mc(e,t,n,r,i,o){return!o&&!e.isPointInArea(t)?[]:n==="r"&&!r?v6(e,t,n,i):x6(e,t,n,r,i,o)}function ag(e,t,n,r,i){const o=[],s=n==="x"?"inXRange":"inYRange";let a=!1;return wl(e,n,t,(l,c,u)=>{l[s]&&l[s](t[n],i)&&(o.push({element:l,datasetIndex:c,index:u}),a=a||l.inRange(t.x,t.y,i))}),r&&!a?[]:o}var y6={modes:{index(e,t,n,r){const i=wr(t,e),o=n.axis||"x",s=n.includeInvisible||!1,a=n.intersect?pc(e,i,o,r,s):mc(e,i,o,!1,r,s),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=wr(t,e),o=n.axis||"xy",s=n.includeInvisible||!1;let a=n.intersect?pc(e,i,o,r,s):mc(e,i,o,!1,r,s);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=wr(t,e),o=n.axis||"xy",s=n.includeInvisible||!1;return pc(e,i,o,r,s)},nearest(e,t,n,r){const i=wr(t,e),o=n.axis||"xy",s=n.includeInvisible||!1;return mc(e,i,o,n.intersect,r,s)},x(e,t,n,r){const i=wr(t,e);return ag(e,i,"x",n.intersect,r)},y(e,t,n,r){const i=wr(t,e);return ag(e,i,"y",n.intersect,r)}}};const Yb=["left","top","right","bottom"];function $i(e,t){return e.filter(n=>n.pos===t)}function lg(e,t){return e.filter(n=>Yb.indexOf(n.pos)===-1&&n.box.axis===t)}function Vi(e,t){return e.sort((n,r)=>{const i=t?r:n,o=t?n:r;return i.weight===o.weight?i.index-o.index:i.weight-o.weight})}function C6(e){const t=[];let n,r,i,o,s,a;for(n=0,r=(e||[]).length;n<r;++n)i=e[n],{position:o,options:{stack:s,stackWeight:a=1}}=i,t.push({index:n,box:i,pos:o,horizontal:i.isHorizontal(),weight:i.weight,stack:s&&o+s,stackWeight:a});return t}function w6(e){const t={};for(const n of e){const{stack:r,pos:i,stackWeight:o}=n;if(!r||!Yb.includes(i))continue;const s=t[r]||(t[r]={count:0,placed:0,weight:0,size:0});s.count++,s.weight+=o}return t}function S6(e,t){const n=w6(e),{vBoxMaxWidth:r,hBoxMaxHeight:i}=t;let o,s,a;for(o=0,s=e.length;o<s;++o){a=e[o];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 I6(e){const t=C6(e),n=Vi(t.filter(c=>c.box.fullSize),!0),r=Vi($i(t,"left"),!0),i=Vi($i(t,"right")),o=Vi($i(t,"top"),!0),s=Vi($i(t,"bottom")),a=lg(t,"x"),l=lg(t,"y");return{fullSize:n,leftAndTop:r.concat(o),rightAndBottom:i.concat(l).concat(s).concat(a),chartArea:$i(t,"chartArea"),vertical:r.concat(i).concat(l),horizontal:o.concat(s).concat(a)}}function cg(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function Zb(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 _6(e,t,n,r){const{pos:i,box:o}=n,s=e.maxPadding;if(!Le(i)){n.size&&(e[i]-=n.size);const d=r[n.stack]||{size:0,count:1};d.size=Math.max(d.size,n.horizontal?o.height:o.width),n.size=d.size/d.count,e[i]+=n.size}o.getPadding&&Zb(s,o.getPadding());const a=Math.max(0,t.outerWidth-cg(s,e,"left","right")),l=Math.max(0,t.outerHeight-cg(s,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 E6(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 M6(e,t){const n=t.maxPadding;function r(i){const o={left:0,top:0,right:0,bottom:0};return i.forEach(s=>{o[s]=Math.max(t[s],n[s])}),o}return r(e?["left","right"]:["top","bottom"])}function Ui(e,t,n,r){const i=[];let o,s,a,l,c,u;for(o=0,s=e.length,c=0;o<s;++o){a=e[o],l=a.box,l.update(a.width||t.w,a.height||t.h,M6(a.horizontal,t));const{same:d,other:f}=_6(t,n,a,r);c|=d&&i.length,u=u||f,l.fullSize||i.push(a)}return c&&Ui(i,t,n,r)||u}function _s(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 ug(e,t,n,r){const i=n.padding;let{x:o,y:s}=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;Fo(c.start)&&(s=c.start),l.fullSize?_s(l,i.left,s,n.outerWidth-i.right-i.left,f):_s(l,t.left+c.placed,s,d,f),c.start=s,c.placed+=d,s=l.bottom}else{const d=t.h*u,f=c.size||l.width;Fo(c.start)&&(o=c.start),l.fullSize?_s(l,o,i.top,f,n.outerHeight-i.bottom-i.top):_s(l,o,t.top+c.placed,f,d),c.start=o,c.placed+=d,o=l.right}}t.x=o,t.y=s}var Pt={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=St(e.options.layout.padding),o=Math.max(t-i.width,0),s=Math.max(n-i.height,0),a=I6(e.boxes),l=a.vertical,c=a.horizontal;Ze(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:o,availableHeight:s,vBoxMaxWidth:o/2/u,hBoxMaxHeight:s/2}),f=Object.assign({},i);Zb(f,St(r));const h=Object.assign({maxPadding:f,w:o,h:s,x:i.left,y:i.top},i),g=S6(l.concat(c),d);Ui(a.fullSize,h,d,g),Ui(l,h,d,g),Ui(c,h,d,g)&&Ui(l,h,d,g),E6(h),ug(a.leftAndTop,h,d,g),h.x+=h.w,h.y+=h.h,ug(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},Ze(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 Jb{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 A6 extends Jb{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const sa="$chartjs",R6={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},dg=e=>e===null||e==="";function k6(e,t){const n=e.style,r=e.getAttribute("height"),i=e.getAttribute("width");if(e[sa]={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",dg(i)){const o=Zh(e,"width");o!==void 0&&(e.width=o)}if(dg(r))if(e.style.height==="")e.height=e.width/(t||2);else{const o=Zh(e,"height");o!==void 0&&(e.height=o)}return e}const Ub=PE?{passive:!0}:!1;function P6(e,t,n){e&&e.addEventListener(t,n,Ub)}function F6(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,Ub)}function O6(e,t){const n=R6[e.type]||e.type,{x:r,y:i}=wr(e,t);return{type:n,chart:t,native:e,x:r!==void 0?r:null,y:i!==void 0?i:null}}function $a(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function N6(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let s=!1;for(const a of o)s=s||$a(a.addedNodes,r),s=s&&!$a(a.removedNodes,r);s&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function T6(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let s=!1;for(const a of o)s=s||$a(a.removedNodes,r),s=s&&!$a(a.addedNodes,r);s&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const To=new Map;let fg=0;function Qb(){const e=window.devicePixelRatio;e!==fg&&(fg=e,To.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function D6(e,t){To.size||window.addEventListener("resize",Qb),To.set(e,t)}function L6(e){To.delete(e),To.size||window.removeEventListener("resize",Qb)}function j6(e,t,n){const r=e.canvas,i=r&&Ld(r);if(!i)return;const o=Eb((a,l)=>{const c=i.clientWidth;n(a,l),c<i.clientWidth&&n()},window),s=new ResizeObserver(a=>{const l=a[0],c=l.contentRect.width,u=l.contentRect.height;c===0&&u===0||o(c,u)});return s.observe(i),D6(e,o),s}function bc(e,t,n){n&&n.disconnect(),t==="resize"&&L6(e)}function B6(e,t,n){const r=e.canvas,i=Eb(o=>{e.ctx!==null&&n(O6(o,e))},e);return P6(r,t,i),i}class $6 extends Jb{acquireContext(t,n){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(k6(t,n),r):null}releaseContext(t){const n=t.canvas;if(!n[sa])return!1;const r=n[sa].initial;["height","width"].forEach(o=>{const s=r[o];Oe(s)?n.removeAttribute(o):n.setAttribute(o,s)});const i=r.style||{};return Object.keys(i).forEach(o=>{n.style[o]=i[o]}),n.width=n.width,delete n[sa],!0}addEventListener(t,n,r){this.removeEventListener(t,n);const i=t.$proxies||(t.$proxies={}),s={attach:N6,detach:T6,resize:j6}[n]||B6;i[n]=s(t,n,r)}removeEventListener(t,n){const r=t.$proxies||(t.$proxies={}),i=r[n];if(!i)return;({attach:bc,detach:bc,resize:bc}[n]||F6)(t,n,i),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,r,i){return kE(t,n,r,i)}isAttached(t){const n=t&&Ld(t);return!!(n&&n.isConnected)}}function V6(e){return!Dd()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?A6:$6}var Xs;let kn=(Xs=class{constructor(){U(this,"x");U(this,"y");U(this,"active",!1);U(this,"options");U(this,"$animations")}tooltipPosition(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}hasValue(){return bi(this.x)&&bi(this.y)}getProps(t,n){const r=this.$animations;if(!n||!r)return this;const i={};return t.forEach(o=>{i[o]=r[o]&&r[o].active()?r[o]._to:this[o]}),i}},U(Xs,"defaults",{}),U(Xs,"defaultRoutes"),Xs);function G6(e,t){const n=e.options.ticks,r=z6(e),i=Math.min(n.maxTicksLimit||r,r),o=n.major.enabled?W6(t):[],s=o.length,a=o[0],l=o[s-1],c=[];if(s>i)return X6(t,c,o,s/i),c;const u=H6(o,t,i);if(s>0){let d,f;const h=s>1?Math.round((l-a)/(s-1)):null;for(Es(t,c,u,Oe(h)?0:a-h,a),d=0,f=s-1;d<f;d++)Es(t,c,u,o[d],o[d+1]);return Es(t,c,u,l,Oe(h)?t.length:l+h),c}return Es(t,c,u),c}function z6(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 H6(e,t,n){const r=Y6(e),i=t.length/n;if(!r)return Math.max(i,1);const o=O3(r);for(let s=0,a=o.length-1;s<a;s++){const l=o[s];if(l>i)return l}return Math.max(i,1)}function W6(e){const t=[];let n,r;for(n=0,r=e.length;n<r;n++)e[n].major&&t.push(n);return t}function X6(e,t,n,r){let i=0,o=n[0],s;for(r=Math.ceil(r),s=0;s<e.length;s++)s===o&&(t.push(e[s]),i++,o=n[i*r])}function Es(e,t,n,r,i){const o=Me(r,0),s=Math.min(Me(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=o;u<0;)a++,u=Math.round(o+a*n);for(c=Math.max(o,0);c<s;c++)c===u&&(t.push(e[c]),a++,u=Math.round(o+a*n))}function Y6(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 Z6=e=>e==="left"?"right":e==="right"?"left":e,hg=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,gg=(e,t)=>Math.min(t||e,e);function pg(e,t){const n=[],r=e.length/t,i=e.length;let o=0;for(;o<i;o+=r)n.push(e[Math.floor(o)]);return n}function J6(e,t,n){const r=e.ticks.length,i=Math.min(t,r-1),o=e._startPixel,s=e._endPixel,a=1e-6;let l=e.getPixelForTick(i),c;if(!(n&&(r===1?c=Math.max(l-o,s-l):t===0?c=(e.getPixelForTick(1)-l)/2:c=(l-e.getPixelForTick(i-1))/2,l+=i<t?c:-c,l<o-a||l>s+a)))return l}function U6(e,t){Ze(e,n=>{const r=n.gc,i=r.length/2;let o;if(i>t){for(o=0;o<i;++o)delete n.data[r[o]];r.splice(0,i)}})}function Gi(e){return e.drawTicks?e.tickLength:0}function mg(e,t){if(!e.display)return 0;const n=gt(e.font,t),r=St(e.padding);return(nt(e.text)?e.text.length:1)*n.lineHeight+r.height}function Q6(e,t){return gr(e,{scale:t,type:"scale"})}function K6(e,t,n){return gr(e,{tick:n,index:t,type:"tick"})}function q6(e,t,n){let r=kd(e);return(n&&t!=="right"||!n&&t==="right")&&(r=Z6(r)),r}function eM(e,t,n,r){const{top:i,left:o,bottom:s,right:a,chart:l}=e,{chartArea:c,scales:u}=l;let d=0,f,h,g;const p=s-i,m=a-o;if(e.isHorizontal()){if(h=Et(r,o,a),Le(n)){const v=Object.keys(n)[0],C=n[v];g=u[v].getPixelForValue(C)+p-t}else n==="center"?g=(c.bottom+c.top)/2+p-t:g=hg(e,n,t);f=a-o}else{if(Le(n)){const v=Object.keys(n)[0],C=n[v];h=u[v].getPixelForValue(C)-m+t}else n==="center"?h=(c.left+c.right)/2-m+t:h=hg(e,n,t);g=Et(r,s,i),d=n==="left"?-dt:dt}return{titleX:h,titleY:g,maxWidth:f,rotation:d}}class pr extends kn{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=Vt(t,Number.POSITIVE_INFINITY),n=Vt(n,Number.NEGATIVE_INFINITY),r=Vt(r,Number.POSITIVE_INFINITY),i=Vt(i,Number.NEGATIVE_INFINITY),{min:Vt(t,r),max:Vt(n,i),minDefined:ct(t),maxDefined:ct(n)}}getMinMax(t){let{min:n,max:r,minDefined:i,maxDefined:o}=this.getUserBounds(),s;if(i&&o)return{min:n,max:r};const a=this.getMatchingVisibleMetas();for(let l=0,c=a.length;l<c;++l)s=a[l].controller.getMinMax(this,t),i||(n=Math.min(n,s.min)),o||(r=Math.max(r,s.max));return n=o&&n>r?r:n,r=i&&n>r?n:r,{min:Vt(n,Vt(r,n)),max:Vt(r,Vt(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(){Ue(this.options.beforeUpdate,[this])}update(t,n,r){const{beginAtZero:i,grace:o,ticks:s}=this.options,a=s.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=lE(this,o,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a<this.ticks.length;this._convertTicksToLabels(l?pg(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),s.display&&(s.autoSkip||s.source==="auto")&&(this.ticks=G6(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(){Ue(this.options.afterUpdate,[this])}beforeSetDimensions(){Ue(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(){Ue(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),Ue(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Ue(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const n=this.options.ticks;let r,i,o;for(r=0,i=t.length;r<i;r++)o=t[r],o.label=Ue(n.callback,[o.value,r,t],this)}afterTickToLabelConversion(){Ue(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Ue(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,r=gg(this.ticks.length,t.ticks.maxTicksLimit),i=n.minRotation||0,o=n.maxRotation;let s=i,a,l,c;if(!this._isVisible()||!n.display||i>=o||r<=1||!this.isHorizontal()){this.labelRotation=i;return}const u=this._getLabelSizes(),d=u.widest.width,f=u.highest.height,h=bt(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-Gi(t.grid)-n.padding-mg(t.title,this.chart.options.font),c=Math.sqrt(d*d+f*f),s=Ad(Math.min(Math.asin(bt((u.highest.height+6)/a,-1,1)),Math.asin(bt(l/c,-1,1))-Math.asin(bt(f/c,-1,1)))),s=Math.max(i,Math.min(o,s))),this.labelRotation=s}afterCalculateLabelRotation(){Ue(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Ue(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:r,title:i,grid:o}}=this,s=this._isVisible(),a=this.isHorizontal();if(s){const l=mg(i,n.options.font);if(a?(t.width=this.maxWidth,t.height=Gi(o)+l):(t.height=this.maxHeight,t.width=Gi(o)+l),r.display&&this.ticks.length){const{first:c,last:u,widest:d,highest:f}=this._getLabelSizes(),h=r.padding*2,g=cn(this.labelRotation),p=Math.cos(g),m=Math.sin(g);if(a){const v=r.mirror?0:m*d.width+p*f.height;t.height=Math.min(this.maxHeight,t.height+v+h)}else{const v=r.mirror?0:p*d.width+m*f.height;t.width=Math.min(this.maxWidth,t.width+v+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:o,padding:s},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):o==="start"?h=n.width:o==="end"?f=t.width:o!=="inner"&&(f=t.width/2,h=n.width/2),this.paddingLeft=Math.max((f-u+s)*this.width/(this.width-u),0),this.paddingRight=Math.max((h-d+s)*this.width/(this.width-d),0)}else{let u=n.height/2,d=t.height/2;o==="start"?(u=0,d=t.height):o==="end"&&(u=n.height,d=0),this.paddingTop=u+s,this.paddingBottom=d+s}}_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(){Ue(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++)Oe(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=pg(r,n)),this._labelSizes=t=this._computeLabelSizes(r,r.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,n,r){const{ctx:i,_longestTextCache:o}=this,s=[],a=[],l=Math.floor(n/gg(n,r));let c=0,u=0,d,f,h,g,p,m,v,C,y,I,w;for(d=0;d<n;d+=l){if(g=t[d].label,p=this._resolveTickFontOptions(d),i.font=m=p.string,v=o[m]=o[m]||{data:{},gc:[]},C=p.lineHeight,y=I=0,!Oe(g)&&!nt(g))y=Da(i,v.data,v.gc,y,g),I=C;else if(nt(g))for(f=0,h=g.length;f<h;++f)w=g[f],!Oe(w)&&!nt(w)&&(y=Da(i,v.data,v.gc,y,w),I+=C);s.push(y),a.push(I),c=Math.max(y,c),u=Math.max(I,u)}U6(o,n);const R=s.indexOf(c),A=a.indexOf(u),S=_=>({width:s[_]||0,height:a[_]||0});return{first:S(0),last:S(n-1),widest:S(R),highest:S(A),widths:s,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 L3(this._alignToPixels?xr(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=K6(this.getContext(),t,r))}return this.$context||(this.$context=Q6(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=cn(this.labelRotation),r=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),o=this._getLabelSizes(),s=t.autoSkipPadding||0,a=o?o.widest.width+s:0,l=o?o.highest.height+s: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:o,position:s,border:a}=i,l=o.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),f=Gi(o),h=[],g=a.setContext(this.getContext()),p=g.display?g.width:0,m=p/2,v=function(O){return xr(r,O,p)};let C,y,I,w,R,A,S,_,E,P,T,$;if(s==="top")C=v(this.bottom),A=this.bottom-f,_=C-m,P=v(t.top)+m,$=t.bottom;else if(s==="bottom")C=v(this.top),P=t.top,$=v(t.bottom)-m,A=C+m,_=this.top+f;else if(s==="left")C=v(this.right),R=this.right-f,S=C-m,E=v(t.left)+m,T=t.right;else if(s==="right")C=v(this.left),E=t.left,T=v(t.right)-m,R=C+m,S=this.left+f;else if(n==="x"){if(s==="center")C=v((t.top+t.bottom)/2+.5);else if(Le(s)){const O=Object.keys(s)[0],N=s[O];C=v(this.chart.scales[O].getPixelForValue(N))}P=t.top,$=t.bottom,A=C+m,_=A+f}else if(n==="y"){if(s==="center")C=v((t.left+t.right)/2);else if(Le(s)){const O=Object.keys(s)[0],N=s[O];C=v(this.chart.scales[O].getPixelForValue(N))}R=C-m,S=R-f,E=t.left,T=t.right}const D=Me(i.ticks.maxTicksLimit,d),k=Math.max(1,Math.ceil(d/D));for(y=0;y<d;y+=k){const O=this.getContext(y),N=o.setContext(O),M=a.setContext(O),F=N.lineWidth,B=N.color,z=M.dash||[],G=M.dashOffset,V=N.tickWidth,J=N.tickColor,le=N.tickBorderDash||[],he=N.tickBorderDashOffset;I=J6(this,y,l),I!==void 0&&(w=xr(r,I,F),c?R=S=E=T=w:A=_=P=$=w,h.push({tx1:R,ty1:A,tx2:S,ty2:_,x1:E,y1:P,x2:T,y2:$,width:F,color:B,borderDash:z,borderDashOffset:G,tickWidth:V,tickColor:J,tickBorderDash:le,tickBorderDashOffset:he}))}return this._ticksLength=d,this._borderValue=C,h}_computeLabelItems(t){const n=this.axis,r=this.options,{position:i,ticks:o}=r,s=this.isHorizontal(),a=this.ticks,{align:l,crossAlign:c,padding:u,mirror:d}=o,f=Gi(r.grid),h=f+u,g=d?-u:h,p=-cn(this.labelRotation),m=[];let v,C,y,I,w,R,A,S,_,E,P,T,$="middle";if(i==="top")R=this.bottom-g,A=this._getXAxisLabelAlignment();else if(i==="bottom")R=this.top+g,A=this._getXAxisLabelAlignment();else if(i==="left"){const k=this._getYAxisLabelAlignment(f);A=k.textAlign,w=k.x}else if(i==="right"){const k=this._getYAxisLabelAlignment(f);A=k.textAlign,w=k.x}else if(n==="x"){if(i==="center")R=(t.top+t.bottom)/2+h;else if(Le(i)){const k=Object.keys(i)[0],O=i[k];R=this.chart.scales[k].getPixelForValue(O)+h}A=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")w=(t.left+t.right)/2-h;else if(Le(i)){const k=Object.keys(i)[0],O=i[k];w=this.chart.scales[k].getPixelForValue(O)}A=this._getYAxisLabelAlignment(f).textAlign}n==="y"&&(l==="start"?$="top":l==="end"&&($="bottom"));const D=this._getLabelSizes();for(v=0,C=a.length;v<C;++v){y=a[v],I=y.label;const k=o.setContext(this.getContext(v));S=this.getPixelForTick(v)+o.labelOffset,_=this._resolveTickFontOptions(v),E=_.lineHeight,P=nt(I)?I.length:1;const O=P/2,N=k.color,M=k.textStrokeColor,F=k.textStrokeWidth;let B=A;s?(w=S,A==="inner"&&(v===C-1?B=this.options.reverse?"left":"right":v===0?B=this.options.reverse?"right":"left":B="center"),i==="top"?c==="near"||p!==0?T=-P*E+E/2:c==="center"?T=-D.highest.height/2-O*E+E:T=-D.highest.height+E/2:c==="near"||p!==0?T=E/2:c==="center"?T=D.highest.height/2-O*E:T=D.highest.height-P*E,d&&(T*=-1),p!==0&&!k.showLabelBackdrop&&(w+=E/2*Math.sin(p))):(R=S,T=(1-P)*E/2);let z;if(k.showLabelBackdrop){const G=St(k.backdropPadding),V=D.heights[v],J=D.widths[v];let le=T-G.top,he=0-G.left;switch($){case"middle":le-=V/2;break;case"bottom":le-=V;break}switch(A){case"center":he-=J/2;break;case"right":he-=J;break;case"inner":v===C-1?he-=J:v>0&&(he-=J/2);break}z={left:he,top:le,width:J+G.width,height:V+G.height,color:k.backdropColor}}m.push({label:I,font:_,textOffset:T,options:{rotation:p,color:N,strokeColor:M,strokeWidth:F,textAlign:B,textBaseline:$,translation:[w,R],backdrop:z}})}return m}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-cn(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:o}}=this.options,s=this._getLabelSizes(),a=t+o,l=s.widest.width;let c,u;return n==="left"?i?(u=this.right+o,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+o,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:o,height:s}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(r,i,o,s),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const i=this.ticks.findIndex(o=>o.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 o,s;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(o=0,s=i.length;o<s;++o){const l=i[o];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,o=r.setContext(this.getContext()),s=r.display?o.width:0;if(!s)return;const a=i.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,u,d,f;this.isHorizontal()?(c=xr(t,this.left,s)-s/2,u=xr(t,this.right,a)+a/2,d=f=l):(d=xr(t,this.top,s)-s/2,f=xr(t,this.bottom,a)+a/2,c=u=l),n.save(),n.lineWidth=o.width,n.strokeStyle=o.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&&Fr(r,i);const o=this.getLabelItems(t);for(const s of o){const a=s.options,l=s.font,c=s.label,u=s.textOffset;Hr(r,c,0,u,l,a)}i&&Or(r)}drawTitle(){const{ctx:t,options:{position:n,title:r,reverse:i}}=this;if(!r.display)return;const o=gt(r.font),s=St(r.padding),a=r.align;let l=o.lineHeight/2;n==="bottom"||n==="center"||Le(n)?(l+=s.bottom,nt(r.text)&&(l+=o.lineHeight*(r.text.length-1))):l+=s.top;const{titleX:c,titleY:u,maxWidth:d,rotation:f}=eM(this,l,n,a);Hr(t,r.text,0,0,o,{color:r.color,maxWidth:d,rotation:f,textAlign:q6(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=Me(t.grid&&t.grid.z,-1),i=Me(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==pr.prototype.draw?[{z:n,draw:o=>{this.draw(o)}}]:[{z:r,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",i=[];let o,s;for(o=0,s=n.length;o<s;++o){const a=n[o];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 gt(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Ms{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;rM(n)&&(r=this.register(n));const i=this.items,o=t.id,s=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+t);return o in i||(i[o]=t,tM(t,s,r),this.override&&it.override(t.id,t.overrides)),s}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 it[i]&&(delete it[i][r],this.override&&delete zr[r])}}function tM(e,t,n){const r=vt(Object.create(null),[n?it.get(n):{},it.get(t),e.defaults]);it.set(t,r),e.defaultRoutes&&nM(t,e.defaultRoutes),e.descriptors&&it.describe(t,e.descriptors)}function nM(e,t){Object.keys(t).forEach(n=>{const r=n.split("."),i=r.pop(),o=[e].concat(r).join("."),s=t[n].split("."),a=s.pop(),l=s.join(".");it.route(o,i,l,a)})}function rM(e){return"id"in e&&"defaults"in e}class iM{constructor(){this.controllers=new Ms(qt,"datasets",!0),this.elements=new Ms(kn,"elements"),this.plugins=new Ms(Object,"plugins"),this.scales=new Ms(pr,"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 o=r||this._getRegistryForType(i);r||o.isForType(i)||o===this.plugins&&i.id?this._exec(t,o,i):Ze(i,s=>{const a=r||this._getRegistryForType(s);this._exec(t,a,s)})})}_exec(t,n,r){const i=Md(t);Ue(r["before"+i],[],r),n[t](r),Ue(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 iM;class oM{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 o=i?this._descriptors(t).filter(i):this._descriptors(t),s=this._notify(o,t,n,r);return n==="afterDestroy"&&(this._notify(o,t,"stop"),this._notify(this._init,t,"uninstall"),this._init=void 0),s}_notify(t,n,r,i){i=i||{};for(const o of t){const s=o.plugin,a=s[r],l=[n,i,o.options];if(Ue(a,l,s)===!1&&i.cancelable)return!1}return!0}invalidate(){Oe(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=Me(r.options&&r.options.plugins,{}),o=sM(r);return i===!1&&!n?[]:lM(t,o,i,n)}_notifyStateChanges(t){const n=this._oldCache||[],r=this._cache,i=(o,s)=>o.filter(a=>!s.some(l=>a.plugin.id===l.plugin.id));this._notify(i(n,r),t,"stop"),this._notify(i(r,n),t,"start")}}function sM(e){const t={},n=[],r=Object.keys(Nt.plugins.items);for(let o=0;o<r.length;o++)n.push(Nt.getPlugin(r[o]));const i=e.plugins||[];for(let o=0;o<i.length;o++){const s=i[o];n.indexOf(s)===-1&&(n.push(s),t[s.id]=!0)}return{plugins:n,localIds:t}}function aM(e,t){return!t&&e===!1?null:e===!0?{}:e}function lM(e,{plugins:t,localIds:n},r,i){const o=[],s=e.getContext();for(const a of t){const l=a.id,c=aM(r[l],i);c!==null&&o.push({plugin:a,options:cM(e.config,{plugin:a,local:n[l]},c,s)})}return o}function cM(e,{plugin:t,local:n},r,i){const o=e.pluginScopeKeys(t),s=e.getOptionScopes(r,o);return n&&t.defaults&&s.push(t.defaults),e.createResolver(s,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function du(e,t){const n=it.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function uM(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function dM(e,t){return e===t?"_index_":"_value_"}function bg(e){if(e==="x"||e==="y"||e==="r")return e}function fM(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function fu(e,...t){if(bg(e))return e;for(const n of t){const r=n.axis||fM(n.position)||e.length>1&&bg(e[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function vg(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function hM(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 vg(e,"x",n[0])||vg(e,"y",n[0])}return{}}function gM(e,t){const n=zr[e.type]||{scales:{}},r=t.scales||{},i=du(e.type,t),o=Object.create(null);return Object.keys(r).forEach(s=>{const a=r[s];if(!Le(a))return console.error(`Invalid scale configuration for scale: ${s}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${s}`);const l=fu(s,a,hM(s,e),it.scales[a.type]),c=dM(l,i),u=n.scales||{};o[s]=ao(Object.create(null),[{axis:l},a,u[l],u[c]])}),e.data.datasets.forEach(s=>{const a=s.type||e.type,l=s.indexAxis||du(a,t),u=(zr[a]||{}).scales||{};Object.keys(u).forEach(d=>{const f=uM(d,l),h=s[f+"AxisID"]||f;o[h]=o[h]||Object.create(null),ao(o[h],[{axis:f},r[h],u[d]])})}),Object.keys(o).forEach(s=>{const a=o[s];ao(a,[it.scales[a.type],it.scale])}),o}function Kb(e){const t=e.options||(e.options={});t.plugins=Me(t.plugins,{}),t.scales=gM(e,t)}function qb(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function pM(e){return e=e||{},e.data=qb(e.data),Kb(e),e}const xg=new Map,e1=new Set;function As(e,t){let n=xg.get(e);return n||(n=t(),xg.set(e,n),e1.add(n)),n}const zi=(e,t,n)=>{const r=cr(t,n);r!==void 0&&e.add(r)};class mM{constructor(t){this._config=pM(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=qb(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(),Kb(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return As(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return As(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return As(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,r=this.type;return As(`${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:o}=this,s=this._cachedScopes(t,r),a=s.get(n);if(a)return a;const l=new Set;n.forEach(u=>{t&&(l.add(t),u.forEach(d=>zi(l,t,d))),u.forEach(d=>zi(l,i,d)),u.forEach(d=>zi(l,zr[o]||{},d)),u.forEach(d=>zi(l,it,d)),u.forEach(d=>zi(l,uu,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),e1.has(n)&&s.set(n,c),c}chartOptionScopes(){const{options:t,type:n}=this;return[t,zr[n]||{},it.datasets[n]||{},{type:n},it,uu]}resolveNamedOptions(t,n,r,i=[""]){const o={$shared:!0},{resolver:s,subPrefixes:a}=yg(this._resolverCache,t,i);let l=s;if(vM(s,n)){o.$shared=!1,r=ur(r)?r():r;const c=this.createResolver(t,r,a);l=vi(s,r,c)}for(const c of n)o[c]=l[c];return o}createResolver(t,n,r=[""],i){const{resolver:o}=yg(this._resolverCache,t,r);return Le(n)?vi(o,n,void 0,i):o}}function yg(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));const i=n.join();let o=r.get(i);return o||(o={resolver:Od(t,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},r.set(i,o)),o}const bM=e=>Le(e)&&Object.getOwnPropertyNames(e).some(t=>ur(e[t]));function vM(e,t){const{isScriptable:n,isIndexable:r}=Fb(e);for(const i of t){const o=n(i),s=r(i),a=(s||o)&&e[i];if(o&&(ur(a)||bM(a))||s&&nt(a))return!0}return!1}var xM="4.5.1";const yM=["top","bottom","left","right","chartArea"];function Cg(e,t){return e==="top"||e==="bottom"||yM.indexOf(e)===-1&&t==="x"}function wg(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function Sg(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),Ue(n&&n.onComplete,[e],t)}function CM(e){const t=e.chart,n=t.options.animation;Ue(n&&n.onProgress,[e],t)}function t1(e){return Dd()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const aa={},Ig=e=>{const t=t1(e);return Object.values(aa).filter(n=>n.canvas===t).pop()};function wM(e,t,n){const r=Object.keys(e);for(const i of r){const o=+i;if(o>=t){const s=e[i];delete e[i],(n>0||o>t)&&(e[o+n]=s)}}}function SM(e,t,n,r){return!n||e.type==="mouseout"?null:r?t:e}var Kn;let xt=(Kn=class{static register(...t){Nt.add(...t),_g()}static unregister(...t){Nt.remove(...t),_g()}constructor(t,n){const r=this.config=new mM(n),i=t1(t),o=Ig(i);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const s=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||V6(i)),this.platform.updateConfig(r);const a=this.platform.acquireContext(i,s.aspectRatio),l=a&&a.canvas,c=l&&l.height,u=l&&l.width;if(this.id=I3(),this.ctx=a,this.canvas=l,this.width=u,this.height=c,this._options=s,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 oM,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=V3(d=>this.update(d),s.resizeDelay||0),this._dataChanges=[],aa[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Fn.listen(this,"complete",Sg),Fn.listen(this,"progress",CM),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:r,height:i,_aspectRatio:o}=this;return Oe(t)?n&&o?o: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():Yh(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Hh(this.canvas,this.ctx),this}stop(){return Fn.stop(this),this}resize(t,n){Fn.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const r=this.options,i=this.canvas,o=r.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(i,t,n,o),a=r.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,Yh(this,a,!0)&&(this.notifyPlugins("resize",{size:s}),Ue(r.onResize,[this,s],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};Ze(n,(r,i)=>{r.id=i})}buildOrUpdateScales(){const t=this.options,n=t.scales,r=this.scales,i=Object.keys(r).reduce((s,a)=>(s[a]=!1,s),{});let o=[];n&&(o=o.concat(Object.keys(n).map(s=>{const a=n[s],l=fu(s,a),c=l==="r",u=l==="x";return{options:a,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),Ze(o,s=>{const a=s.options,l=a.id,c=fu(l,a),u=Me(a.type,s.dtype);(a.position===void 0||Cg(a.position,c)!==Cg(s.dposition))&&(a.position=s.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)}),Ze(i,(s,a)=>{s||delete r[a]}),Ze(r,s=>{Pt.configure(this,s,s.options),Pt.addBox(this,s)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,r=t.length;if(t.sort((i,o)=>i.index-o.index),r>n){for(let i=n;i<r;++i)this._destroyDatasetMeta(i);t.splice(n,r-n)}this._sortedMetasets=t.slice(0).sort(wg("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((r,i)=>{n.filter(o=>o===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 o=n[r];let s=this.getDatasetMeta(r);const a=o.type||this.config.type;if(s.type&&s.type!==a&&(this._destroyDatasetMeta(r),s=this.getDatasetMeta(r)),s.type=a,s.indexAxis=o.indexAxis||du(a,this.options),s.order=o.order||0,s.index=r,s.label=""+o.label,s.visible=this.isDatasetVisible(r),s.controller)s.controller.updateIndex(r),s.controller.linkScales();else{const l=Nt.getController(a),{datasetElementType:c,dataElementType:u}=it.datasets[a];Object.assign(l,{dataElementType:Nt.getElement(u),datasetElementType:c&&Nt.getElement(c)}),s.controller=new l(this,r),t.push(s.controller)}}return this._updateMetasets(),t}_resetElements(){Ze(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 o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let c=0,u=this.data.datasets.length;c<u;c++){const{controller:d}=this.getDatasetMeta(c),f=!i&&o.indexOf(d)===-1;d.buildOrUpdateElements(f),s=Math.max(+d.getMaxOverflow(),s)}s=this._minPadding=r.layout.autoPadding?s:0,this._updateLayout(s),i||Ze(o,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(wg("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){Ze(this.scales,t=>{Pt.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!Th(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:o}of n){const s=r==="_removeElements"?-o:o;wM(t,i,s)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=o=>new Set(t.filter(s=>s[0]===o).map((s,a)=>a+","+s.splice(1).join(","))),i=r(0);for(let o=1;o<n;o++)if(!Th(i,r(o)))return;return Array.from(i).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Pt.update(this,this.width,this.height,t);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],Ze(this.boxes,i=>{r&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,o)=>{i._idx=o}),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,ur(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&&(Fn.has(this)?this.attached&&!Fn.running(this)&&Fn.start(this):(this.draw(),Sg({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,o;for(i=0,o=n.length;i<o;++i){const s=n[i];(!t||s.visible)&&r.push(s)}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=zb(this,t);this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(i&&Fr(n,i),t.controller.draw(),i&&Or(n),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(t){return Vn(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,r,i){const o=y6.modes[n];return typeof o=="function"?o(this,t,r,i):[]}getDatasetMeta(t){const n=this.data.datasets[t],r=this._metasets;let i=r.filter(o=>o&&o._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=gr(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",o=this.getDatasetMeta(t),s=o.controller._resolveAnimations(void 0,i);Fo(n)?(o.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),s.update(o,{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(),Fn.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(),Hh(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete aa[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=(o,s)=>{n.addEventListener(this,o,s),t[o]=s},i=(o,s,a)=>{o.offsetX=s,o.offsetY=a,this._eventHandler(o)};Ze(this.options.events,o=>r(o,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])},o=(l,c)=>{this.canvas&&this.resize(l,c)};let s;const a=()=>{i("attach",a),this.attached=!0,this.resize(),r("resize",o),r("detach",s)};s=()=>{this.attached=!1,i("resize",o),this._stop(),this._resize(0,0),r("attach",a)},n.isAttached(this.canvas)?a():s()}unbindEvents(){Ze(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},Ze(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,r){const i=r?"set":"remove";let o,s,a,l;for(n==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+i+"DatasetHoverStyle"]()),a=0,l=t.length;a<l;++a){s=t[a];const c=s&&this.getDatasetMeta(s.datasetIndex).controller;c&&c[i+"HoverStyle"](s.element,s.datasetIndex,s.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const n=this._active||[],r=t.map(({datasetIndex:o,index:s})=>{const a=this.getDatasetMeta(o);if(!a)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:a.data[s],index:s}});!Oa(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,o=(l,c)=>l.filter(u=>!c.some(d=>u.datasetIndex===d.datasetIndex&&u.index===d.index)),s=o(n,t),a=r?t:o(t,n);s.length&&this.updateHoverStyle(s,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=s=>(s.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",r,i)===!1)return;const o=this._handleEvent(t,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,i),(o||r.changed)&&this.render(),this}_handleEvent(t,n,r){const{_active:i=[],options:o}=this,s=n,a=this._getActiveElements(t,i,r,s),l=k3(t),c=SM(t,this._lastEvent,r,l);r&&(this._lastEvent=null,Ue(o.onHover,[t,a,this],this),l&&Ue(o.onClick,[t,a,this],this));const u=!Oa(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 o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,i)}},U(Kn,"defaults",it),U(Kn,"instances",aa),U(Kn,"overrides",zr),U(Kn,"registry",Nt),U(Kn,"version",xM),U(Kn,"getChart",Ig),Kn);function _g(){return Ze(xt.instances,e=>e._plugins.invalidate())}function IM(e,t,n){const{startAngle:r,x:i,y:o,outerRadius:s,innerRadius:a,options:l}=t,{borderWidth:c,borderJoinStyle:u}=l,d=Math.min(c/s,At(r-n));if(e.beginPath(),e.arc(i,o,s-c/2,r+d/2,n-d/2),a>0){const f=Math.min(c/a,At(r-n));e.arc(i,o,a+c/2,n-f/2,r+f/2,!0)}else{const f=Math.min(c/2,s*At(r-n));if(u==="round")e.arc(i,o,f,n-$e/2,r+$e/2,!0);else if(u==="bevel"){const h=2*f*f,g=-h*Math.cos(n+$e/2)+i,p=-h*Math.sin(n+$e/2)+o,m=h*Math.cos(r+$e/2)+i,v=h*Math.sin(r+$e/2)+o;e.lineTo(g,p),e.lineTo(m,v)}}e.closePath(),e.moveTo(0,0),e.rect(0,0,e.canvas.width,e.canvas.height),e.clip("evenodd")}function _M(e,t,n){const{startAngle:r,pixelMargin:i,x:o,y:s,outerRadius:a,innerRadius:l}=t;let c=i/a;e.beginPath(),e.arc(o,s,a,r-c,n+c),l>i?(c=i/l,e.arc(o,s,l,n+c,r-c,!0)):e.arc(o,s,i,n+dt,r-dt),e.closePath(),e.clip()}function EM(e){return Fd(e,["outerStart","outerEnd","innerStart","innerEnd"])}function MM(e,t,n,r){const i=EM(e.options.borderRadius),o=(n-t)/2,s=Math.min(o,r*t/2),a=l=>{const c=(n-Math.min(o,l))*r/2;return bt(l,0,Math.min(o,c))};return{outerStart:a(i.outerStart),outerEnd:a(i.outerEnd),innerStart:bt(i.innerStart,0,s),innerEnd:bt(i.innerEnd,0,s)}}function ni(e,t,n,r){return{x:n+e*Math.cos(t),y:r+e*Math.sin(t)}}function Va(e,t,n,r,i,o){const{x:s,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 k=u>0?u-r:0,O=d>0?d-r:0,N=(k+O)/2,M=N!==0?g*N/(N+r):g;h=(g-M)/2}const p=Math.max(.001,g*d-n/$e)/d,m=(g-p)/2,v=l+m+h,C=i-m-h,{outerStart:y,outerEnd:I,innerStart:w,innerEnd:R}=MM(t,f,d,C-v),A=d-y,S=d-I,_=v+y/A,E=C-I/S,P=f+w,T=f+R,$=v+w/P,D=C-R/T;if(e.beginPath(),o){const k=(_+E)/2;if(e.arc(s,a,d,_,k),e.arc(s,a,d,k,E),I>0){const F=ni(S,E,s,a);e.arc(F.x,F.y,I,E,C+dt)}const O=ni(T,C,s,a);if(e.lineTo(O.x,O.y),R>0){const F=ni(T,D,s,a);e.arc(F.x,F.y,R,C+dt,D+Math.PI)}const N=(C-R/f+(v+w/f))/2;if(e.arc(s,a,f,C-R/f,N,!0),e.arc(s,a,f,N,v+w/f,!0),w>0){const F=ni(P,$,s,a);e.arc(F.x,F.y,w,$+Math.PI,v-dt)}const M=ni(A,v,s,a);if(e.lineTo(M.x,M.y),y>0){const F=ni(A,_,s,a);e.arc(F.x,F.y,y,v-dt,_)}}else{e.moveTo(s,a);const k=Math.cos(_)*d+s,O=Math.sin(_)*d+a;e.lineTo(k,O);const N=Math.cos(E)*d+s,M=Math.sin(E)*d+a;e.lineTo(N,M)}e.closePath()}function AM(e,t,n,r,i){const{fullCircles:o,startAngle:s,circumference:a}=t;let l=t.endAngle;if(o){Va(e,t,n,r,l,i);for(let c=0;c<o;++c)e.fill();isNaN(a)||(l=s+(a%rt||rt))}return Va(e,t,n,r,l,i),e.fill(),l}function RM(e,t,n,r,i){const{fullCircles:o,startAngle:s,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(o){Va(e,t,n,r,p,i);for(let m=0;m<o;++m)e.stroke();isNaN(a)||(p=s+(a%rt||rt))}g&&_M(e,t,p),l.selfJoin&&p-s>=$e&&h===0&&u!=="miter"&&IM(e,t,p),o||(Va(e,t,n,r,p,i),e.stroke())}class Gn extends kn{constructor(n){super();U(this,"circumference");U(this,"endAngle");U(this,"fullCircles");U(this,"innerRadius");U(this,"outerRadius");U(this,"pixelMargin");U(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 o=this.getProps(["x","y"],i),{angle:s,distance:a}=wb(o,{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=Me(f,c-l),p=Oo(s,l,c)&&l!==c,m=g>=rt||p,v=Bn(a,u+h,d+h);return m&&v}getCenterPoint(n){const{x:r,y:i,startAngle:o,endAngle:s,innerRadius:a,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:c,spacing:u}=this.options,d=(o+s)/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,o=(r.offset||0)/4,s=(r.spacing||0)/2,a=r.circular;if(this.pixelMargin=r.borderAlign==="inner"?.33:0,this.fullCircles=i>rt?Math.floor(i/rt):0,i===0||this.innerRadius<0||this.outerRadius<0)return;n.save();const l=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(l)*o,Math.sin(l)*o);const c=1-Math.sin(Math.min($e,i||0)),u=o*c;n.fillStyle=r.backgroundColor,n.strokeStyle=r.borderColor,AM(n,this,u,s,a),RM(n,this,u,s,a),n.restore()}}U(Gn,"id","arc"),U(Gn,"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}),U(Gn,"defaultRoutes",{backgroundColor:"backgroundColor"}),U(Gn,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function n1(e,t,n=t){e.lineCap=Me(n.borderCapStyle,t.borderCapStyle),e.setLineDash(Me(n.borderDash,t.borderDash)),e.lineDashOffset=Me(n.borderDashOffset,t.borderDashOffset),e.lineJoin=Me(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=Me(n.borderWidth,t.borderWidth),e.strokeStyle=Me(n.borderColor,t.borderColor)}function kM(e,t,n){e.lineTo(n.x,n.y)}function PM(e){return e.stepped?q3:e.tension||e.cubicInterpolationMode==="monotone"?eE:kM}function r1(e,t,n={}){const r=e.length,{start:i=0,end:o=r-1}=n,{start:s,end:a}=t,l=Math.max(i,s),c=Math.min(o,a),u=i<s&&o<s||i>a&&o>a;return{count:r,start:l,loop:t.loop,ilen:c<l&&!u?r+c-l:c-l}}function FM(e,t,n,r){const{points:i,options:o}=t,{count:s,start:a,loop:l,ilen:c}=r1(i,n,r),u=PM(o);let{move:d=!0,reverse:f}=r||{},h,g,p;for(h=0;h<=c;++h)g=i[(a+(f?c-h:h))%s],!g.skip&&(d?(e.moveTo(g.x,g.y),d=!1):u(e,p,g,f,o.stepped),p=g);return l&&(g=i[(a+(f?c:0))%s],u(e,p,g,f,o.stepped)),!!l}function OM(e,t,n,r){const i=t.points,{count:o,start:s,ilen:a}=r1(i,n,r),{move:l=!0,reverse:c}=r||{};let u=0,d=0,f,h,g,p,m,v;const C=I=>(s+(c?a-I:I))%o,y=()=>{p!==m&&(e.lineTo(u,m),e.lineTo(u,p),e.lineTo(u,v))};for(l&&(h=i[C(0)],e.moveTo(h.x,h.y)),f=0;f<=a;++f){if(h=i[C(f)],h.skip)continue;const I=h.x,w=h.y,R=I|0;R===g?(w<p?p=w:w>m&&(m=w),u=(d*u+I)/++d):(y(),e.lineTo(I,w),g=R,d=0,p=m=w),v=w}y()}function hu(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?OM:FM}function NM(e){return e.stepped?FE:e.tension||e.cubicInterpolationMode==="monotone"?OE:Sr}function TM(e,t,n,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,r)&&i.closePath()),n1(e,t.options),e.stroke(i)}function DM(e,t,n,r){const{segments:i,options:o}=t,s=hu(t);for(const a of i)n1(e,o,a.style),e.beginPath(),s(e,t,a,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}const LM=typeof Path2D=="function";function jM(e,t,n,r){LM&&!t.options.segment?TM(e,t,n,r):DM(e,t,n,r)}class zn extends kn{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;IE(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=BE(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],o=this.points,s=Gb(this,{property:n,start:i,end:i});if(!s.length)return;const a=[],l=NM(r);let c,u;for(c=0,u=s.length;c<u;++c){const{start:d,end:f}=s[c],h=o[d],g=o[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 hu(this)(t,this,n,r)}path(t,n,r){const i=this.segments,o=hu(this);let s=this._loop;n=n||0,r=r||this.points.length-n;for(const a of i)s&=o(t,this,a,{start:n,end:n+r-1});return!!s}draw(t,n,r,i){const o=this.options||{};(this.points||[]).length&&o.borderWidth&&(t.save(),jM(t,this,r,i),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}U(zn,"id","line"),U(zn,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),U(zn,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),U(zn,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function Eg(e,t,n,r){const i=e.options,{[n]:o}=e.getProps([n],r);return Math.abs(t-o)<i.radius+i.hitRadius}class Dr extends kn{constructor(n){super();U(this,"parsed");U(this,"skip");U(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 o=this.options,{x:s,y:a}=this.getProps(["x","y"],i);return Math.pow(n-s,2)+Math.pow(r-a,2)<Math.pow(o.hitRadius+o.radius,2)}inXRange(n,r){return Eg(this,n,"x",r)}inYRange(n,r){return Eg(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||!Vn(this,r,this.size(i)/2)||(n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.fillStyle=i.backgroundColor,La(n,i,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}U(Dr,"id","point"),U(Dr,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),U(Dr,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function i1(e,t){const{x:n,y:r,base:i,width:o,height:s}=e.getProps(["x","y","base","width","height"],t);let a,l,c,u,d;return e.horizontal?(d=s/2,a=Math.min(n,i),l=Math.max(n,i),c=r-d,u=r+d):(d=o/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 ir(e,t,n,r){return e?0:bt(t,n,r)}function BM(e,t,n){const r=e.options.borderWidth,i=e.borderSkipped,o=Pb(r);return{t:ir(i.top,o.top,0,n),r:ir(i.right,o.right,0,t),b:ir(i.bottom,o.bottom,0,n),l:ir(i.left,o.left,0,t)}}function $M(e,t,n){const{enableBorderRadius:r}=e.getProps(["enableBorderRadius"]),i=e.options.borderRadius,o=Nr(i),s=Math.min(t,n),a=e.borderSkipped,l=r||Le(i);return{topLeft:ir(!l||a.top||a.left,o.topLeft,0,s),topRight:ir(!l||a.top||a.right,o.topRight,0,s),bottomLeft:ir(!l||a.bottom||a.left,o.bottomLeft,0,s),bottomRight:ir(!l||a.bottom||a.right,o.bottomRight,0,s)}}function VM(e){const t=i1(e),n=t.right-t.left,r=t.bottom-t.top,i=BM(e,n/2,r/2),o=$M(e,n/2,r/2);return{outer:{x:t.left,y:t.top,w:n,h:r,radius:o},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,o.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,o.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(i.b,i.r))}}}}function vc(e,t,n,r){const i=t===null,o=n===null,a=e&&!(i&&o)&&i1(e,r);return a&&(i||Bn(t,a.left,a.right))&&(o||Bn(n,a.top,a.bottom))}function GM(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function zM(e,t){e.rect(t.x,t.y,t.w,t.h)}function xc(e,t,n={}){const r=e.x!==n.x?-t:0,i=e.y!==n.y?-t:0,o=(e.x+e.w!==n.x+n.w?t:0)-r,s=(e.y+e.h!==n.y+n.h?t:0)-i;return{x:e.x+r,y:e.y+i,w:e.w+o,h:e.h+s,radius:e.radius}}class wn extends kn{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:o,outer:s}=VM(this),a=GM(s.radius)?No:zM;t.save(),(s.w!==o.w||s.h!==o.h)&&(t.beginPath(),a(t,xc(s,n,o)),t.clip(),a(t,xc(o,-n,s)),t.fillStyle=r,t.fill("evenodd")),t.beginPath(),a(t,xc(o,n)),t.fillStyle=i,t.fill(),t.restore()}inRange(t,n,r){return vc(this,t,n,r)}inXRange(t,n){return vc(this,t,null,n)}inYRange(t,n){return vc(this,null,t,n)}getCenterPoint(t){const{x:n,y:r,base:i,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(n+i)/2:n,y:o?r:(r+i)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}U(wn,"id","bar"),U(wn,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),U(wn,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var HM=Object.freeze({__proto__:null,ArcElement:Gn,BarElement:wn,LineElement:zn,PointElement:Dr});const gu=["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)"],Mg=gu.map(e=>e.replace("rgb(","rgba(").replace(")",", 0.5)"));function o1(e){return gu[e%gu.length]}function s1(e){return Mg[e%Mg.length]}function WM(e,t){return e.borderColor=o1(t),e.backgroundColor=s1(t),++t}function XM(e,t){return e.backgroundColor=e.data.map(()=>o1(t++)),t}function YM(e,t){return e.backgroundColor=e.data.map(()=>s1(t++)),t}function ZM(e){let t=0;return(n,r)=>{const i=e.getDatasetMeta(r).controller;i instanceof rr?t=XM(n,t):i instanceof ho?t=YM(n,t):i&&(t=WM(n,t))}}function Ag(e){let t;for(t in e)if(e[t].borderColor||e[t].backgroundColor)return!0;return!1}function JM(e){return e&&(e.borderColor||e.backgroundColor)}function UM(){return it.borderColor!=="rgba(0,0,0,0.1)"||it.backgroundColor!=="rgba(0,0,0,0.1)"}var QM={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,t,n){if(!n.enabled)return;const{data:{datasets:r},options:i}=e.config,{elements:o}=i,s=Ag(r)||JM(i)||o&&Ag(o)||UM();if(!n.forceOverride&&s)return;const a=ZM(e);r.forEach(a)}};function KM(e,t,n,r,i){const o=i.samples||r;if(o>=n)return e.slice(t,t+n);const s=[],a=(n-2)/(o-2);let l=0;const c=t+n-1;let u=t,d,f,h,g,p;for(s[l++]=e[u],d=0;d<o-2;d++){let m=0,v=0,C;const y=Math.floor((d+1)*a)+1+t,I=Math.min(Math.floor((d+2)*a)+1,n)+t,w=I-y;for(C=y;C<I;C++)m+=e[C].x,v+=e[C].y;m/=w,v/=w;const R=Math.floor(d*a)+1+t,A=Math.min(Math.floor((d+1)*a)+1,n)+t,{x:S,y:_}=e[u];for(h=g=-1,C=R;C<A;C++)g=.5*Math.abs((S-m)*(e[C].y-_)-(S-e[C].x)*(v-_)),g>h&&(h=g,f=e[C],p=C);s[l++]=f,u=p}return s[l++]=e[c],s}function qM(e,t,n,r){let i=0,o=0,s,a,l,c,u,d,f,h,g,p;const m=[],v=t+n-1,C=e[t].x,I=e[v].x-C;for(s=t;s<t+n;++s){a=e[s],l=(a.x-C)/I*r,c=a.y;const w=l|0;if(w===u)c<g?(g=c,d=s):c>p&&(p=c,f=s),i=(o*i+a.x)/++o;else{const R=s-1;if(!Oe(d)&&!Oe(f)){const A=Math.min(d,f),S=Math.max(d,f);A!==h&&A!==R&&m.push({...e[A],x:i}),S!==h&&S!==R&&m.push({...e[S],x:i})}s>0&&R!==h&&m.push(e[R]),m.push(a),u=w,o=0,g=p=c,d=f=h=s}}return m}function a1(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 Rg(e){e.data.datasets.forEach(t=>{a1(t)})}function e9(e,t){const n=t.length;let r=0,i;const{iScale:o}=e,{min:s,max:a,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(r=bt($n(t,o.axis,s).lo,0,n-1)),c?i=bt($n(t,o.axis,a).hi+1,r,n)-r:i=n-r,{start:r,count:i}}var t9={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(e,t,n)=>{if(!n.enabled){Rg(e);return}const r=e.width;e.data.datasets.forEach((i,o)=>{const{_data:s,indexAxis:a}=i,l=e.getDatasetMeta(o),c=s||i.data;if(tt([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}=e9(l,c);const h=n.threshold||4*r;if(f<=h){a1(i);return}Oe(s)&&(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=KM(c,d,f,r,n);break;case"min-max":g=qM(c,d,f,r);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}i._decimated=g})},destroy(e){Rg(e)}};function n9(e,t,n){const r=e.segments,i=e.points,o=t.points,s=[];for(const a of r){let{start:l,end:c}=a;c=Sl(l,c,i);const u=pu(n,i[l],i[c],a.loop);if(!t.segments){s.push({source:a,target:u,start:i[l],end:i[c]});continue}const d=Gb(t,u);for(const f of d){const h=pu(n,o[f.start],o[f.end],f.loop),g=Vb(a,i,h);for(const p of g)s.push({source:p,target:f,start:{[n]:kg(u,h,"start",Math.max)},end:{[n]:kg(u,h,"end",Math.min)}})}}return s}function pu(e,t,n,r){if(r)return;let i=t[e],o=n[e];return e==="angle"&&(i=At(i),o=At(o)),{property:e,start:i,end:o}}function r9(e,t){const{x:n=null,y:r=null}=e||{},i=t.points,o=[];return t.segments.forEach(({start:s,end:a})=>{a=Sl(s,a,i);const l=i[s],c=i[a];r!==null?(o.push({x:l.x,y:r}),o.push({x:c.x,y:r})):n!==null&&(o.push({x:n,y:l.y}),o.push({x:n,y:c.y}))}),o}function Sl(e,t,n){for(;t>e;t--){const r=n[t];if(!isNaN(r.x)&&!isNaN(r.y))break}return t}function kg(e,t,n,r){return e&&t?r(e[n],t[n]):e?e[n]:t?t[n]:0}function l1(e,t){let n=[],r=!1;return nt(e)?(r=!0,n=e):n=r9(e,t),n.length?new zn({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function Pg(e){return e&&e.fill!==!1}function i9(e,t,n){let i=e[t].fill;const o=[t];let s;if(!n)return i;for(;i!==!1&&o.indexOf(i)===-1;){if(!ct(i))return i;if(s=e[i],!s)return!1;if(s.visible)return i;o.push(i),i=s.fill}return!1}function o9(e,t,n){const r=c9(e);if(Le(r))return isNaN(r.value)?!1:r;let i=parseFloat(r);return ct(i)&&Math.floor(i)===i?s9(r[0],t,i,n):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function s9(e,t,n,r){return(e==="-"||e==="+")&&(n=t+n),n===t||n<0||n>=r?!1:n}function a9(e,t){let n=null;return e==="start"?n=t.bottom:e==="end"?n=t.top:Le(e)?n=t.getPixelForValue(e.value):t.getBasePixel&&(n=t.getBasePixel()),n}function l9(e,t,n){let r;return e==="start"?r=n:e==="end"?r=t.options.reverse?t.min:t.max:Le(e)?r=e.value:r=t.getBaseValue(),r}function c9(e){const t=e.options,n=t.fill;let r=Me(n&&n.target,n);return r===void 0&&(r=!!t.backgroundColor),r===!1||r===null?!1:r===!0?"origin":r}function u9(e){const{scale:t,index:n,line:r}=e,i=[],o=r.segments,s=r.points,a=d9(t,n);a.push(l1({x:null,y:t.bottom},r));for(let l=0;l<o.length;l++){const c=o[l];for(let u=c.start;u<=c.end;u++)f9(i,s[u],a)}return new zn({points:i,options:{}})}function d9(e,t){const n=[],r=e.getMatchingVisibleMetas("line");for(let i=0;i<r.length;i++){const o=r[i];if(o.index===t)break;o.hidden||n.unshift(o.dataset)}return n}function f9(e,t,n){const r=[];for(let i=0;i<n.length;i++){const o=n[i],{first:s,last:a,point:l}=h9(o,t,"x");if(!(!l||s&&a)){if(s)r.unshift(l);else if(e.push(l),!a)break}}e.push(...r)}function h9(e,t,n){const r=e.interpolate(t,n);if(!r)return{};const i=r[n],o=e.segments,s=e.points;let a=!1,l=!1;for(let c=0;c<o.length;c++){const u=o[c],d=s[u.start][n],f=s[u.end][n];if(Bn(i,d,f)){a=i===d,l=i===f;break}}return{first:a,last:l,point:r}}class c1{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,n,r){const{x:i,y:o,radius:s}=this;return n=n||{start:0,end:rt},t.arc(i,o,s,n.end,n.start,!0),!r.bounds}interpolate(t){const{x:n,y:r,radius:i}=this,o=t.angle;return{x:n+Math.cos(o)*i,y:r+Math.sin(o)*i,angle:o}}}function g9(e){const{chart:t,fill:n,line:r}=e;if(ct(n))return p9(t,n);if(n==="stack")return u9(e);if(n==="shape")return!0;const i=m9(e);return i instanceof c1?i:l1(i,r)}function p9(e,t){const n=e.getDatasetMeta(t);return n&&e.isDatasetVisible(t)?n.dataset:null}function m9(e){return(e.scale||{}).getPointPositionForValue?v9(e):b9(e)}function b9(e){const{scale:t={},fill:n}=e,r=a9(n,t);if(ct(r)){const i=t.isHorizontal();return{x:i?r:null,y:i?null:r}}return null}function v9(e){const{scale:t,fill:n}=e,r=t.options,i=t.getLabels().length,o=r.reverse?t.max:t.min,s=l9(n,t,o),a=[];if(r.grid.circular){const l=t.getPointPositionForValue(0,o);return new c1({x:l.x,y:l.y,radius:t.getDistanceFromCenterForValue(s)})}for(let l=0;l<i;++l)a.push(t.getPointPositionForValue(l,s));return a}function yc(e,t,n){const r=g9(t),{chart:i,index:o,line:s,scale:a,axis:l}=t,c=s.options,u=c.fill,d=c.backgroundColor,{above:f=d,below:h=d}=u||{},g=i.getDatasetMeta(o),p=zb(i,g);r&&s.points.length&&(Fr(e,n),x9(e,{line:s,target:r,above:f,below:h,area:n,scale:a,axis:l,clip:p}),Or(e))}function x9(e,t){const{line:n,target:r,above:i,below:o,area:s,scale:a,clip:l}=t,c=n._loop?"angle":t.axis;e.save();let u=o;o!==i&&(c==="x"?(Fg(e,r,s.top),Cc(e,{line:n,target:r,color:i,scale:a,property:c,clip:l}),e.restore(),e.save(),Fg(e,r,s.bottom)):c==="y"&&(Og(e,r,s.left),Cc(e,{line:n,target:r,color:o,scale:a,property:c,clip:l}),e.restore(),e.save(),Og(e,r,s.right),u=i)),Cc(e,{line:n,target:r,color:u,scale:a,property:c,clip:l}),e.restore()}function Fg(e,t,n){const{segments:r,points:i}=t;let o=!0,s=!1;e.beginPath();for(const a of r){const{start:l,end:c}=a,u=i[l],d=i[Sl(l,c,i)];o?(e.moveTo(u.x,u.y),o=!1):(e.lineTo(u.x,n),e.lineTo(u.x,u.y)),s=!!t.pathSegment(e,a,{move:s}),s?e.closePath():e.lineTo(d.x,n)}e.lineTo(t.first().x,n),e.closePath(),e.clip()}function Og(e,t,n){const{segments:r,points:i}=t;let o=!0,s=!1;e.beginPath();for(const a of r){const{start:l,end:c}=a,u=i[l],d=i[Sl(l,c,i)];o?(e.moveTo(u.x,u.y),o=!1):(e.lineTo(n,u.y),e.lineTo(u.x,u.y)),s=!!t.pathSegment(e,a,{move:s}),s?e.closePath():e.lineTo(n,d.y)}e.lineTo(n,t.first().y),e.closePath(),e.clip()}function Cc(e,t){const{line:n,target:r,property:i,color:o,scale:s,clip:a}=t,l=n9(n,r,i);for(const{source:c,target:u,start:d,end:f}of l){const{style:{backgroundColor:h=o}={}}=c,g=r!==!0;e.save(),e.fillStyle=h,y9(e,s,a,g&&pu(i,d,f)),e.beginPath();const p=!!n.pathSegment(e,c);let m;if(g){p?e.closePath():Ng(e,r,f,i);const v=!!r.pathSegment(e,u,{move:p,reverse:!0});m=p&&v,m||Ng(e,r,d,i)}e.closePath(),e.fill(m?"evenodd":"nonzero"),e.restore()}}function y9(e,t,n,r){const i=t.chart.chartArea,{property:o,start:s,end:a}=r||{};if(o==="x"||o==="y"){let l,c,u,d;o==="x"?(l=s,c=i.top,u=a,d=i.bottom):(l=i.left,c=s,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 Ng(e,t,n,r){const i=t.interpolate(n,r);i&&e.lineTo(i.x,i.y)}var C9={id:"filler",afterDatasetsUpdate(e,t,n){const r=(e.data.datasets||[]).length,i=[];let o,s,a,l;for(s=0;s<r;++s)o=e.getDatasetMeta(s),a=o.dataset,l=null,a&&a.options&&a instanceof zn&&(l={visible:e.isDatasetVisible(s),index:s,fill:o9(a,s,r),chart:e,axis:o.controller.options.indexAxis,scale:o.vScale,line:a}),o.$filler=l,i.push(l);for(s=0;s<r;++s)l=i[s],!(!l||l.fill===!1)&&(l.fill=i9(i,s,n.propagate))},beforeDraw(e,t,n){const r=n.drawTime==="beforeDraw",i=e.getSortedVisibleDatasetMetas(),o=e.chartArea;for(let s=i.length-1;s>=0;--s){const a=i[s].$filler;a&&(a.line.updateControlPoints(o,a.axis),r&&a.fill&&yc(e.ctx,a,o))}},beforeDatasetsDraw(e,t,n){if(n.drawTime!=="beforeDatasetsDraw")return;const r=e.getSortedVisibleDatasetMetas();for(let i=r.length-1;i>=0;--i){const o=r[i].$filler;Pg(o)&&yc(e.ctx,o,e.chartArea)}},beforeDatasetDraw(e,t,n){const r=t.meta.$filler;!Pg(r)||n.drawTime!=="beforeDatasetDraw"||yc(e.ctx,r,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const Tg=(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)}},w9=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class Dg extends kn{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=Ue(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=gt(r.font),o=i.size,s=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=Tg(r,o);let c,u;n.font=i.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(s,o,a,l)+10):(u=this.maxHeight,c=this._fitCols(s,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:o,maxWidth:s,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],u=i+a;let d=t;o.textAlign="left",o.textBaseline="middle";let f=-1,h=-u;return this.legendItems.forEach((g,p)=>{const m=r+n/2+o.measureText(g.text).width;(p===0||c[c.length-1]+m+2*a>s)&&(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:o,maxHeight:s,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],u=s-t;let d=a,f=0,h=0,g=0,p=0;return this.legendItems.forEach((m,v)=>{const{itemWidth:C,itemHeight:y}=S9(r,n,o,m,i);v>0&&h+y+2*a>u&&(d+=f+a,c.push({width:f,height:h}),g+=f+a,p++,f=h=0),l[v]={left:g,top:h,col:p,width:C,height:y},f=Math.max(f,C),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:o}}=this,s=di(o,this.left,this.width);if(this.isHorizontal()){let a=0,l=Et(r,this.left+i,this.right-this.lineWidths[a]);for(const c of n)a!==c.row&&(a=c.row,l=Et(r,this.left+i,this.right-this.lineWidths[a])),c.top+=this.top+t+i,c.left=s.leftForLtr(s.x(l),c.width),l+=c.width+i}else{let a=0,l=Et(r,this.top+t+i,this.bottom-this.columnSizes[a].height);for(const c of n)c.col!==a&&(a=c.col,l=Et(r,this.top+t+i,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+i,c.left=s.leftForLtr(s.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;Fr(t,this),this._draw(),Or(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:r,ctx:i}=this,{align:o,labels:s}=t,a=it.color,l=di(t.rtl,this.left,this.width),c=gt(s.font),{padding:u}=s,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}=Tg(s,d),v=function(R,A,S){if(isNaN(g)||g<=0||isNaN(p)||p<0)return;i.save();const _=Me(S.lineWidth,1);if(i.fillStyle=Me(S.fillStyle,a),i.lineCap=Me(S.lineCap,"butt"),i.lineDashOffset=Me(S.lineDashOffset,0),i.lineJoin=Me(S.lineJoin,"miter"),i.lineWidth=_,i.strokeStyle=Me(S.strokeStyle,a),i.setLineDash(Me(S.lineDash,[])),s.usePointStyle){const E={radius:p*Math.SQRT2/2,pointStyle:S.pointStyle,rotation:S.rotation,borderWidth:_},P=l.xPlus(R,g/2),T=A+f;kb(i,E,P,T,s.pointStyleWidth&&g)}else{const E=A+Math.max((d-p)/2,0),P=l.leftForLtr(R,g),T=Nr(S.borderRadius);i.beginPath(),Object.values(T).some($=>$!==0)?No(i,{x:P,y:E,w:g,h:p,radius:T}):i.rect(P,E,g,p),i.fill(),_!==0&&i.stroke()}i.restore()},C=function(R,A,S){Hr(i,S.text,R,A+m/2,c,{strikethrough:S.hidden,textAlign:l.textAlign(S.textAlign)})},y=this.isHorizontal(),I=this._computeTitleHeight();y?h={x:Et(o,this.left+u,this.right-r[0]),y:this.top+u+I,line:0}:h={x:this.left+u,y:Et(o,this.top+I+u,this.bottom-n[0].height),line:0},jb(this.ctx,t.textDirection);const w=m+u;this.legendItems.forEach((R,A)=>{i.strokeStyle=R.fontColor,i.fillStyle=R.fontColor;const S=i.measureText(R.text).width,_=l.textAlign(R.textAlign||(R.textAlign=s.textAlign)),E=g+f+S;let P=h.x,T=h.y;l.setWidth(this.width),y?A>0&&P+E+u>this.right&&(T=h.y+=w,h.line++,P=h.x=Et(o,this.left+u,this.right-r[h.line])):A>0&&T+w>this.bottom&&(P=h.x=P+n[h.line].width+u,h.line++,T=h.y=Et(o,this.top+I+u,this.bottom-n[h.line].height));const $=l.x(P);if(v($,T,R),P=G3(_,P+g+f,y?P+E:this.right,t.rtl),C(l.x(P),T,R),y)h.x+=E+u;else if(typeof R.text!="string"){const D=c.lineHeight;h.y+=u1(R,D)+u}else h.y+=w}),Bb(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,r=gt(n.font),i=St(n.padding);if(!n.display)return;const o=di(t.rtl,this.left,this.width),s=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=Et(t.align,d,this.right-f);else{const g=this.columnSizes.reduce((p,m)=>Math.max(p,m.height),0);u=c+Et(t.align,this.top,this.bottom-g-t.labels.padding-this._computeTitleHeight())}const h=Et(a,d,d+f);s.textAlign=o.textAlign(kd(a)),s.textBaseline="middle",s.strokeStyle=n.color,s.fillStyle=n.color,s.font=r.string,Hr(s,n.text,h,u,r)}_computeTitleHeight(){const t=this.options.title,n=gt(t.font),r=St(t.padding);return t.display?n.lineHeight+r.height:0}_getLegendItemAt(t,n){let r,i,o;if(Bn(t,this.left,this.right)&&Bn(n,this.top,this.bottom)){for(o=this.legendHitBoxes,r=0;r<o.length;++r)if(i=o[r],Bn(t,i.left,i.left+i.width)&&Bn(n,i.top,i.top+i.height))return this.legendItems[r]}return null}handleEvent(t){const n=this.options;if(!E9(t.type,n))return;const r=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const i=this._hoveredItem,o=w9(i,r);i&&!o&&Ue(n.onLeave,[t,i,this],this),this._hoveredItem=r,r&&!o&&Ue(n.onHover,[t,r,this],this)}else r&&Ue(n.onClick,[t,r,this],this)}}function S9(e,t,n,r,i){const o=I9(r,e,t,n),s=_9(i,r,t.lineHeight);return{itemWidth:o,itemHeight:s}}function I9(e,t,n,r){let i=e.text;return i&&typeof i!="string"&&(i=i.reduce((o,s)=>o.length>s.length?o:s)),t+n.size/2+r.measureText(i).width}function _9(e,t,n){let r=e;return typeof t.text!="string"&&(r=u1(t,n)),r}function u1(e,t){const n=e.text?e.text.length:0;return t*n}function E9(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var Jr={id:"legend",_element:Dg,start(e,t,n){const r=e.legend=new Dg({ctx:e.ctx,options:n,chart:e});Pt.configure(e,r,n),Pt.addBox(e,r)},stop(e){Pt.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const r=e.legend;Pt.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:o,useBorderRadius:s,borderRadius:a}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(n?0:void 0),u=St(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:o,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:s&&(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 Bd extends kn{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=nt(r.text)?r.text.length:1;this._padding=St(r.padding);const o=i*gt(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:n,left:r,bottom:i,right:o,options:s}=this,a=s.align;let l=0,c,u,d;return this.isHorizontal()?(u=Et(a,r,o),d=n+t,c=o-r):(s.position==="left"?(u=r+t,d=Et(a,i,n),l=$e*-.5):(u=o-t,d=Et(a,n,i),l=$e*.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=gt(n.font),o=r.lineHeight/2+this._padding.top,{titleX:s,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(o);Hr(t,n.text,0,0,r,{color:n.color,maxWidth:l,rotation:c,textAlign:kd(n.align),textBaseline:"middle",translation:[s,a]})}}function M9(e,t){const n=new Bd({ctx:e.ctx,options:t,chart:e});Pt.configure(e,n,t),Pt.addBox(e,n),e.titleBlock=n}var $d={id:"title",_element:Bd,start(e,t,n){M9(e,n)},stop(e){const t=e.titleBlock;Pt.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const r=e.titleBlock;Pt.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 Rs=new WeakMap;var A9={id:"subtitle",start(e,t,n){const r=new Bd({ctx:e.ctx,options:n,chart:e});Pt.configure(e,r,n),Pt.addBox(e,r),Rs.set(e,r)},stop(e){Pt.removeBox(e,Rs.get(e)),Rs.delete(e)},beforeUpdate(e,t,n){const r=Rs.get(e);Pt.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 Qi={average(e){if(!e.length)return!1;let t,n,r=new Set,i=0,o=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,++o}}return o===0||r.size===0?!1:{x:[...r].reduce((a,l)=>a+l)/r.size,y:i/o}},nearest(e,t){if(!e.length)return!1;let n=t.x,r=t.y,i=Number.POSITIVE_INFINITY,o,s,a;for(o=0,s=e.length;o<s;++o){const l=e[o].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),u=cu(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 gn(e,t){return t&&(nt(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function On(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
99
- `)>-1?e.split(`
100
- `):e}function R9(e,t){const{element:n,datasetIndex:r,index:i}=t,o=e.getDatasetMeta(r).controller,{label:s,value:a}=o.getLabelAndValue(i);return{chart:e,label:s,parsed:o.getParsed(i),raw:e.data.datasets[r].data[i],formattedValue:a,dataset:o.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function Lg(e,t){const n=e.chart.ctx,{body:r,footer:i,title:o}=e,{boxWidth:s,boxHeight:a}=t,l=gt(t.bodyFont),c=gt(t.titleFont),u=gt(t.footerFont),d=o.length,f=i.length,h=r.length,g=St(t.padding);let p=g.height,m=0,v=r.reduce((I,w)=>I+w.before.length+w.lines.length+w.after.length,0);if(v+=e.beforeBody.length+e.afterBody.length,d&&(p+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),v){const I=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;p+=h*I+(v-h)*l.lineHeight+(v-1)*t.bodySpacing}f&&(p+=t.footerMarginTop+f*u.lineHeight+(f-1)*t.footerSpacing);let C=0;const y=function(I){m=Math.max(m,n.measureText(I).width+C)};return n.save(),n.font=c.string,Ze(e.title,y),n.font=l.string,Ze(e.beforeBody.concat(e.afterBody),y),C=t.displayColors?s+2+t.boxPadding:0,Ze(r,I=>{Ze(I.before,y),Ze(I.lines,y),Ze(I.after,y)}),C=0,n.font=u.string,Ze(e.footer,y),n.restore(),m+=g.width,{width:m,height:p}}function k9(e,t){const{y:n,height:r}=t;return n<r/2?"top":n>e.height-r/2?"bottom":"center"}function P9(e,t,n,r){const{x:i,width:o}=r,s=n.caretSize+n.caretPadding;if(e==="left"&&i+o+s>t.width||e==="right"&&i-o-s<0)return!0}function F9(e,t,n,r){const{x:i,width:o}=n,{width:s,chartArea:{left:a,right:l}}=e;let c="center";return r==="center"?c=i<=(a+l)/2?"left":"right":i<=o/2?c="left":i>=s-o/2&&(c="right"),P9(c,e,t,n)&&(c="center"),c}function jg(e,t,n){const r=n.yAlign||t.yAlign||k9(e,n);return{xAlign:n.xAlign||t.xAlign||F9(e,t,n,r),yAlign:r}}function O9(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function N9(e,t,n){let{y:r,height:i}=e;return t==="top"?r+=n:t==="bottom"?r-=i+n:r-=i/2,r}function Bg(e,t,n,r){const{caretSize:i,caretPadding:o,cornerRadius:s}=e,{xAlign:a,yAlign:l}=n,c=i+o,{topLeft:u,topRight:d,bottomLeft:f,bottomRight:h}=Nr(s);let g=O9(t,a);const p=N9(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:bt(g,0,r.width-t.width),y:bt(p,0,r.height-t.height)}}function ks(e,t,n){const r=St(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function $g(e){return gn([],On(e))}function T9(e,t,n){return gr(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function Vg(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const d1={beforeTitle:Pn,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:Pn,beforeBody:Pn,beforeLabel:Pn,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 Oe(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:Pn,afterBody:Pn,beforeFooter:Pn,footer:Pn,afterFooter:Pn};function Dt(e,t,n,r){const i=e[t].call(n,r);return typeof i>"u"?d1[t].call(n,r):i}class mu extends kn{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,o=new Hb(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=T9(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,i=Dt(r,"beforeTitle",this,t),o=Dt(r,"title",this,t),s=Dt(r,"afterTitle",this,t);let a=[];return a=gn(a,On(i)),a=gn(a,On(o)),a=gn(a,On(s)),a}getBeforeBody(t,n){return $g(Dt(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:r}=n,i=[];return Ze(t,o=>{const s={before:[],lines:[],after:[]},a=Vg(r,o);gn(s.before,On(Dt(a,"beforeLabel",this,o))),gn(s.lines,Dt(a,"label",this,o)),gn(s.after,On(Dt(a,"afterLabel",this,o))),i.push(s)}),i}getAfterBody(t,n){return $g(Dt(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:r}=n,i=Dt(r,"beforeFooter",this,t),o=Dt(r,"footer",this,t),s=Dt(r,"afterFooter",this,t);let a=[];return a=gn(a,On(i)),a=gn(a,On(o)),a=gn(a,On(s)),a}_createItems(t){const n=this._active,r=this.chart.data,i=[],o=[],s=[];let a=[],l,c;for(l=0,c=n.length;l<c;++l)a.push(R9(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))),Ze(a,u=>{const d=Vg(t.callbacks,u);i.push(Dt(d,"labelColor",this,u)),o.push(Dt(d,"labelPointStyle",this,u)),s.push(Dt(d,"labelTextColor",this,u))}),this.labelColors=i,this.labelPointStyles=o,this.labelTextColors=s,this.dataPoints=a,a}update(t,n){const r=this.options.setContext(this.getContext()),i=this._active;let o,s=[];if(!i.length)this.opacity!==0&&(o={opacity:0});else{const a=Qi[r.position].call(this,i,this._eventPosition);s=this._createItems(r),this.title=this.getTitle(s,r),this.beforeBody=this.getBeforeBody(s,r),this.body=this.getBody(s,r),this.afterBody=this.getAfterBody(s,r),this.footer=this.getFooter(s,r);const l=this._size=Lg(this,r),c=Object.assign({},a,l),u=jg(this.chart,r,c),d=Bg(r,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,o={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=s,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,r,i){const o=this.getCaretPosition(t,r,i);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)}getCaretPosition(t,n,r){const{xAlign:i,yAlign:o}=this,{caretSize:s,cornerRadius:a}=r,{topLeft:l,topRight:c,bottomLeft:u,bottomRight:d}=Nr(a),{x:f,y:h}=t,{width:g,height:p}=n;let m,v,C,y,I,w;return o==="center"?(I=h+p/2,i==="left"?(m=f,v=m-s,y=I+s,w=I-s):(m=f+g,v=m+s,y=I-s,w=I+s),C=m):(i==="left"?v=f+Math.max(l,u)+s:i==="right"?v=f+g-Math.max(c,d)-s:v=this.caretX,o==="top"?(y=h,I=y-s,m=v-s,C=v+s):(y=h+p,I=y+s,m=v+s,C=v-s),w=y),{x1:m,x2:v,x3:C,y1:y,y2:I,y3:w}}drawTitle(t,n,r){const i=this.title,o=i.length;let s,a,l;if(o){const c=di(r.rtl,this.x,this.width);for(t.x=ks(this,r.titleAlign,r),n.textAlign=c.textAlign(r.titleAlign),n.textBaseline="middle",s=gt(r.titleFont),a=r.titleSpacing,n.fillStyle=r.titleColor,n.font=s.string,l=0;l<o;++l)n.fillText(i[l],c.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+a,l+1===o&&(t.y+=r.titleMarginBottom-a)}}_drawColorBox(t,n,r,i,o){const s=this.labelColors[r],a=this.labelPointStyles[r],{boxHeight:l,boxWidth:c}=o,u=gt(o.bodyFont),d=ks(this,"left",o),f=i.x(d),h=l<u.lineHeight?(u.lineHeight-l)/2:0,g=n.y+h;if(o.usePointStyle){const p={radius:Math.min(c,l)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},m=i.leftForLtr(f,c)+c/2,v=g+l/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,La(t,p,m,v),t.strokeStyle=s.borderColor,t.fillStyle=s.backgroundColor,La(t,p,m,v)}else{t.lineWidth=Le(s.borderWidth)?Math.max(...Object.values(s.borderWidth)):s.borderWidth||1,t.strokeStyle=s.borderColor,t.setLineDash(s.borderDash||[]),t.lineDashOffset=s.borderDashOffset||0;const p=i.leftForLtr(f,c),m=i.leftForLtr(i.xPlus(f,1),c-2),v=Nr(s.borderRadius);Object.values(v).some(C=>C!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,No(t,{x:p,y:g,w:c,h:l,radius:v}),t.fill(),t.stroke(),t.fillStyle=s.backgroundColor,t.beginPath(),No(t,{x:m,y:g+1,w:c-2,h:l-2,radius:v}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(p,g,c,l),t.strokeRect(p,g,c,l),t.fillStyle=s.backgroundColor,t.fillRect(m,g+1,c-2,l-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,n,r){const{body:i}=this,{bodySpacing:o,bodyAlign:s,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:u}=r,d=gt(r.bodyFont);let f=d.lineHeight,h=0;const g=di(r.rtl,this.x,this.width),p=function(S){n.fillText(S,g.x(t.x+h),t.y+f/2),t.y+=f+o},m=g.textAlign(s);let v,C,y,I,w,R,A;for(n.textAlign=s,n.textBaseline="middle",n.font=d.string,t.x=ks(this,m,r),n.fillStyle=r.bodyColor,Ze(this.beforeBody,p),h=a&&m!=="right"?s==="center"?c/2+u:c+2+u:0,I=0,R=i.length;I<R;++I){for(v=i[I],C=this.labelTextColors[I],n.fillStyle=C,Ze(v.before,p),y=v.lines,a&&y.length&&(this._drawColorBox(n,t,I,g,r),f=Math.max(d.lineHeight,l)),w=0,A=y.length;w<A;++w)p(y[w]),f=d.lineHeight;Ze(v.after,p)}h=0,f=d.lineHeight,Ze(this.afterBody,p),t.y-=o}drawFooter(t,n,r){const i=this.footer,o=i.length;let s,a;if(o){const l=di(r.rtl,this.x,this.width);for(t.x=ks(this,r.footerAlign,r),t.y+=r.footerMarginTop,n.textAlign=l.textAlign(r.footerAlign),n.textBaseline="middle",s=gt(r.footerFont),n.fillStyle=r.footerColor,n.font=s.string,a=0;a<o;++a)n.fillText(i[a],l.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+r.footerSpacing}}drawBackground(t,n,r,i){const{xAlign:o,yAlign:s}=this,{x:a,y:l}=t,{width:c,height:u}=r,{topLeft:d,topRight:f,bottomLeft:h,bottomRight:g}=Nr(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(a+d,l),s==="top"&&this.drawCaret(t,n,r,i),n.lineTo(a+c-f,l),n.quadraticCurveTo(a+c,l,a+c,l+f),s==="center"&&o==="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),s==="bottom"&&this.drawCaret(t,n,r,i),n.lineTo(a+h,l+u),n.quadraticCurveTo(a,l+u,a,l+u-h),s==="center"&&o==="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,o=r&&r.y;if(i||o){const s=Qi[t.position].call(this,this._active,this._eventPosition);if(!s)return;const a=this._size=Lg(this,t),l=Object.assign({},s,this._size),c=jg(n,t,l),u=Bg(t,l,c,n);(i._to!==u.x||o._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=a.width,this.height=a.height,this.caretX=s.x,this.caretY=s.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},o={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const s=St(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(o,t,i,n),jb(t,n.textDirection),o.y+=s.top,this.drawTitle(o,t,n),this.drawBody(o,t,n),this.drawFooter(o,t,n),Bb(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}}),o=!Oa(r,i),s=this._positionChanged(i,n);(o||s)&&(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,o=this._active||[],s=this._getActiveElements(t,o,n,r),a=this._positionChanged(s,t),l=n||!Oa(s,o)||a;return l&&(this._active=s,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,r,i){const o=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 s=this.chart.getElementsAtEventForMode(t,o.mode,o,r);return o.reverse&&s.reverse(),s}_positionChanged(t,n){const{caretX:r,caretY:i,options:o}=this,s=Qi[o.position].call(this,t,n);return s!==!1&&(r!==s.x||i!==s.y)}}U(mu,"positioners",Qi);var Ur={id:"tooltip",_element:mu,positioners:Qi,afterInit(e,t,n){n&&(e.tooltip=new mu({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:d1},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"]},D9=Object.freeze({__proto__:null,Colors:QM,Decimation:t9,Filler:C9,Legend:Jr,SubTitle:A9,Title:$d,Tooltip:Ur});const L9=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function j9(e,t,n,r){const i=e.indexOf(t);if(i===-1)return L9(e,t,n,r);const o=e.lastIndexOf(t);return i!==o?n:i}const B9=(e,t)=>e===null?null:bt(Math.round(e),0,t);function Gg(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class yi extends pr{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:o}of n)r[i]===o&&r.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(Oe(t))return null;const r=this.getLabels();return n=isFinite(n)&&r[n]===t?n:j9(r,t,Me(n,t),this._addedLabels),B9(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 o=this.getLabels();o=t===0&&n===o.length-1?o:o.slice(t,n+1),this._valueRange=Math.max(o.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let s=t;s<=n;s++)i.push({value:s});return i}getLabelForValue(t){return Gg.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}}U(yi,"id","category"),U(yi,"defaults",{ticks:{callback:Gg}});function $9(e,t){const n=[],{bounds:i,step:o,min:s,max:a,precision:l,count:c,maxTicks:u,maxDigits:d,includeBounds:f}=e,h=o||1,g=u-1,{min:p,max:m}=t,v=!Oe(s),C=!Oe(a),y=!Oe(c),I=(m-p)/(d+1);let w=Lh((m-p)/g/h)*h,R,A,S,_;if(w<1e-14&&!v&&!C)return[{value:p},{value:m}];_=Math.ceil(m/w)-Math.floor(p/w),_>g&&(w=Lh(_*w/g/h)*h),Oe(l)||(R=Math.pow(10,l),w=Math.ceil(w*R)/R),i==="ticks"?(A=Math.floor(p/w)*w,S=Math.ceil(m/w)*w):(A=p,S=m),v&&C&&o&&T3((a-s)/o,w/1e3)?(_=Math.round(Math.min((a-s)/w,u)),w=(a-s)/_,A=s,S=a):y?(A=v?s:A,S=C?a:S,_=c-1,w=(S-A)/_):(_=(S-A)/w,lo(_,Math.round(_),w/1e3)?_=Math.round(_):_=Math.ceil(_));const E=Math.max(jh(w),jh(A));R=Math.pow(10,Oe(l)?E:l),A=Math.round(A*R)/R,S=Math.round(S*R)/R;let P=0;for(v&&(f&&A!==s?(n.push({value:s}),A<s&&P++,lo(Math.round((A+P*w)*R)/R,s,zg(s,I,e))&&P++):A<s&&P++);P<_;++P){const T=Math.round((A+P*w)*R)/R;if(C&&T>a)break;n.push({value:T})}return C&&f&&S!==a?n.length&&lo(n[n.length-1].value,a,zg(a,I,e))?n[n.length-1].value=a:n.push({value:a}):(!C||S===a)&&n.push({value:S}),n}function zg(e,t,{horizontal:n,minRotation:r}){const i=cn(r),o=(n?Math.sin(i):Math.cos(i))||.001,s=.75*t*(""+e).length;return Math.min(t/o,s)}class Ga extends pr{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 Oe(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:o}=this;const s=l=>i=n?i:l,a=l=>o=r?o:l;if(t){const l=Cn(i),c=Cn(o);l<0&&c<0?a(0):l>0&&c>0&&s(0)}if(i===o){let l=o===0?1:Math.abs(o*.05);a(o+l),t||s(i-l)}this.min=i,this.max=o}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},o=this._range||this,s=$9(i,o);return t.bounds==="ticks"&&Cb(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}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 Qo(t,this.chart.options.locale,this.options.ticks.format)}}class Xn extends Ga{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=ct(t)?t:0,this.max=ct(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,r=cn(this.options.ticks.minRotation),i=(t?Math.sin(r):Math.cos(r))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,o.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}}U(Xn,"id","linear"),U(Xn,"defaults",{ticks:{callback:yl.formatters.numeric}});const Do=e=>Math.floor(tr(e)),Cr=(e,t)=>Math.pow(10,Do(e)+t);function Hg(e){return e/Math.pow(10,Do(e))===1}function Wg(e,t,n){const r=Math.pow(10,n),i=Math.floor(e/r);return Math.ceil(t/r)-i}function V9(e,t){const n=t-e;let r=Do(n);for(;Wg(e,t,r)>10;)r++;for(;Wg(e,t,r)<10;)r--;return Math.min(r,Do(e))}function G9(e,{min:t,max:n}){t=Vt(e.min,t);const r=[],i=Do(t);let o=V9(t,n),s=o<0?Math.pow(10,Math.abs(o)):1;const a=Math.pow(10,o),l=i>o?Math.pow(10,i):0,c=Math.round((t-l)*s)/s,u=Math.floor((t-l)/a/10)*a*10;let d=Math.floor((c-u)/Math.pow(10,o)),f=Vt(e.min,Math.round((l+u+d*Math.pow(10,o))*s)/s);for(;f<n;)r.push({value:f,major:Hg(f),significand:d}),d>=10?d=d<15?15:20:d++,d>=20&&(o++,d=2,s=o>=0?1:s),f=Math.round((l+u+d*Math.pow(10,o))*s)/s;const h=Vt(e.max,f);return r.push({value:h,major:Hg(h),significand:d}),r}class Wr extends pr{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,n){const r=Ga.prototype.parse.apply(this,[t,n]);if(r===0){this._zero=!0;return}return ct(r)&&r>0?r:null}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=ct(t)?Math.max(0,t):null,this.max=ct(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!ct(this._userMin)&&(this.min=t===Cr(this.min,0)?Cr(this.min,-1):Cr(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let r=this.min,i=this.max;const o=a=>r=t?r:a,s=a=>i=n?i:a;r===i&&(r<=0?(o(1),s(10)):(o(Cr(r,-1)),s(Cr(i,1)))),r<=0&&o(Cr(i,-1)),i<=0&&s(Cr(r,1)),this.min=r,this.max=i}buildTicks(){const t=this.options,n={min:this._userMin,max:this._userMax},r=G9(n,this);return t.bounds==="ticks"&&Cb(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":Qo(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=tr(t),this._valueRange=tr(this.max)-tr(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(tr(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const n=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+n*this._valueRange)}}U(Wr,"id","logarithmic"),U(Wr,"defaults",{ticks:{callback:yl.formatters.logarithmic,major:{enabled:!0}}});function bu(e){const t=e.ticks;if(t.display&&e.display){const n=St(t.backdropPadding);return Me(t.font&&t.font.size,it.font.size)+n.height}return 0}function z9(e,t,n){return n=nt(n)?n:[n],{w:K3(e,t.string,n),h:n.length*t.lineHeight}}function Xg(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 H9(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=[],o=e._pointLabels.length,s=e.options.pointLabels,a=s.centerPointLabels?$e/o:0;for(let l=0;l<o;l++){const c=s.setContext(e.getPointLabelContext(l));i[l]=c.padding;const u=e.getPointPosition(l,e.drawingArea+i[l],a),d=gt(c.font),f=z9(e.ctx,d,e._pointLabels[l]);r[l]=f;const h=At(e.getIndexAngle(l)+a),g=Math.round(Ad(h)),p=Xg(g,u.x,f.w,0,180),m=Xg(g,u.y,f.h,90,270);W9(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=Z9(e,r,i)}function W9(e,t,n,r,i){const o=Math.abs(Math.sin(n)),s=Math.abs(Math.cos(n));let a=0,l=0;r.start<t.l?(a=(t.l-r.start)/o,e.l=Math.min(e.l,t.l-a)):r.end>t.r&&(a=(r.end-t.r)/o,e.r=Math.max(e.r,t.r+a)),i.start<t.t?(l=(t.t-i.start)/s,e.t=Math.min(e.t,t.t-l)):i.end>t.b&&(l=(i.end-t.b)/s,e.b=Math.max(e.b,t.b+l))}function X9(e,t,n){const r=e.drawingArea,{extra:i,additionalAngle:o,padding:s,size:a}=n,l=e.getPointPosition(t,r+i+s,o),c=Math.round(Ad(At(l.angle+dt))),u=Q9(l.y,a.h,c),d=J9(c),f=U9(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 Y9(e,t){if(!t)return!0;const{left:n,top:r,right:i,bottom:o}=e;return!(Vn({x:n,y:r},t)||Vn({x:n,y:o},t)||Vn({x:i,y:r},t)||Vn({x:i,y:o},t))}function Z9(e,t,n){const r=[],i=e._pointLabels.length,o=e.options,{centerPointLabels:s,display:a}=o.pointLabels,l={extra:bu(o)/2,additionalAngle:s?$e/i:0};let c;for(let u=0;u<i;u++){l.padding=n[u],l.size=t[u];const d=X9(e,u,l);r.push(d),a==="auto"&&(d.visible=Y9(d,c),d.visible&&(c=d))}return r}function J9(e){return e===0||e===180?"center":e<180?"left":"right"}function U9(e,t,n){return n==="right"?e-=t:n==="center"&&(e-=t/2),e}function Q9(e,t,n){return n===90||n===270?e-=t/2:(n>270||n<90)&&(e-=t),e}function K9(e,t,n){const{left:r,top:i,right:o,bottom:s}=n,{backdropColor:a}=t;if(!Oe(a)){const l=Nr(t.borderRadius),c=St(t.backdropPadding);e.fillStyle=a;const u=r-c.left,d=i-c.top,f=o-r+c.width,h=s-i+c.height;Object.values(l).some(g=>g!==0)?(e.beginPath(),No(e,{x:u,y:d,w:f,h,radius:l}),e.fill()):e.fillRect(u,d,f,h)}}function q9(e,t){const{ctx:n,options:{pointLabels:r}}=e;for(let i=t-1;i>=0;i--){const o=e._pointLabelItems[i];if(!o.visible)continue;const s=r.setContext(e.getPointLabelContext(i));K9(n,s,o);const a=gt(s.font),{x:l,y:c,textAlign:u}=o;Hr(n,e._pointLabels[i],l,c+a.lineHeight/2,a,{color:s.color,textAlign:u,textBaseline:"middle"})}}function f1(e,t,n,r){const{ctx:i}=e;if(n)i.arc(e.xCenter,e.yCenter,t,0,rt);else{let o=e.getPointPosition(0,t);i.moveTo(o.x,o.y);for(let s=1;s<r;s++)o=e.getPointPosition(s,t),i.lineTo(o.x,o.y)}}function eA(e,t,n,r,i){const o=e.ctx,s=t.circular,{color:a,lineWidth:l}=t;!s&&!r||!a||!l||n<0||(o.save(),o.strokeStyle=a,o.lineWidth=l,o.setLineDash(i.dash||[]),o.lineDashOffset=i.dashOffset,o.beginPath(),f1(e,n,s,r),o.closePath(),o.stroke(),o.restore())}function tA(e,t,n){return gr(e,{label:n,index:t,type:"pointLabel"})}class Ki extends Ga{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=St(bu(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=ct(t)&&!isNaN(t)?t:0,this.max=ct(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/bu(this.options))}generateTickLabels(t){Ga.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((n,r)=>{const i=Ue(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?H9(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=rt/(this._pointLabels.length||1),r=this.options.startAngle||0;return At(t*n+cn(r))}getDistanceFromCenterForValue(t){if(Oe(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(Oe(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 tA(this.getContext(),t,r)}}getPointPosition(t,n,r=0){const i=this.getIndexAngle(t)-dt+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:o}=this._pointLabelItems[t];return{left:n,top:r,right:i,bottom:o}}drawBackground(){const{backgroundColor:t,grid:{circular:n}}=this.options;if(t){const r=this.ctx;r.save(),r.beginPath(),f1(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:o}=n,s=this._pointLabels.length;let a,l,c;if(n.pointLabels.display&&q9(this,s),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=o.setContext(f);eA(this,h,l,s,g)}}),r.display){for(t.save(),a=s-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 o,s;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=gt(c.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=u.string,s=t.measureText(a.label).width,t.fillStyle=c.backdropColor;const d=St(c.backdropPadding);t.fillRect(-s/2-d.left,-o-u.size/2-d.top,s+d.width,u.size+d.height)}Hr(t,a.label,0,-o,u,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),t.restore()}drawTitle(){}}U(Ki,"id","radialLinear"),U(Ki,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:yl.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),U(Ki,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),U(Ki,"descriptors",{angleLines:{_fallback:"grid"}});const Il={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}},jt=Object.keys(Il);function Yg(e,t){return e-t}function Zg(e,t){if(Oe(t))return null;const n=e._adapter,{parser:r,round:i,isoWeekday:o}=e._parseOpts;let s=t;return typeof r=="function"&&(s=r(s)),ct(s)||(s=typeof r=="string"?n.parse(s,r):n.parse(s)),s===null?null:(i&&(s=i==="week"&&(bi(o)||o===!0)?n.startOf(s,"isoWeek",o):n.startOf(s,i)),+s)}function Jg(e,t,n,r){const i=jt.length;for(let o=jt.indexOf(e);o<i-1;++o){const s=Il[jt[o]],a=s.steps?s.steps:Number.MAX_SAFE_INTEGER;if(s.common&&Math.ceil((n-t)/(a*s.size))<=r)return jt[o]}return jt[i-1]}function nA(e,t,n,r,i){for(let o=jt.length-1;o>=jt.indexOf(n);o--){const s=jt[o];if(Il[s].common&&e._adapter.diff(i,r,s)>=t-1)return s}return jt[n?jt.indexOf(n):0]}function rA(e){for(let t=jt.indexOf(e)+1,n=jt.length;t<n;++t)if(Il[jt[t]].common)return jt[t]}function Ug(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:r,hi:i}=Rd(n,t),o=n[r]>=t?n[r]:n[i];e[o]=!0}}function iA(e,t,n,r){const i=e._adapter,o=+i.startOf(t[0].value,r),s=t[t.length-1].value;let a,l;for(a=o;a<=s;a=+i.add(a,1,r))l=n[a],l>=0&&(t[l].major=!0);return t}function Qg(e,t,n){const r=[],i={},o=t.length;let s,a;for(s=0;s<o;++s)a=t[s],i[a]=s,r.push({value:a,major:!1});return o===0||!n?r:iA(e,r,i,n)}class Lo extends pr{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 p6._date(t.adapters.date);i.init(n),ao(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:Zg(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:o,minDefined:s,maxDefined:a}=this.getUserBounds();function l(c){!s&&!isNaN(c.min)&&(i=Math.min(i,c.min)),!a&&!isNaN(c.max)&&(o=Math.max(o,c.max))}(!s||!a)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),i=ct(i)&&!isNaN(i)?i:+n.startOf(Date.now(),r),o=ct(o)&&!isNaN(o)?o:+n.endOf(Date.now(),r)+1,this.min=Math.min(i,o-1),this.max=Math.max(i+1,o)}_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 o=this.min,s=this.max,a=B3(i,o,s);return this._unit=n.unit||(r.autoSkip?Jg(n.minUnit,this.min,this.max,this._getLabelCapacity(o)):nA(this,a.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:rA(this._unit),this.initOffsets(i),t.reverse&&a.reverse(),Qg(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,r=0,i,o;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?n=1-i:n=(this.getDecimalForValue(t[1])-i)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?r=o:r=(o-this.getDecimalForValue(t[t.length-2]))/2);const s=t.length<3?.5:.25;n=bt(n,0,s),r=bt(r,0,s),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,o=i.time,s=o.unit||Jg(o.minUnit,n,r,this._getLabelCapacity(n)),a=Me(i.ticks.stepSize,1),l=s==="week"?o.isoWeekday:!1,c=bi(l)||l===!0,u={};let d=n,f,h;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":s),t.diff(r,n,s)>1e5*a)throw new Error(n+" and "+r+" are too far apart with stepSize of "+a+" "+s);const g=i.ticks.source==="data"&&this.getDataTimestamps();for(f=d,h=0;f<r;f=+t.add(f,a,s),h++)Ug(u,f,g);return(f===r||i.bounds==="ticks"||h===1)&&Ug(u,f,g),Object.keys(u).sort(Yg).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,o=this._unit,s=n||i[o];return this._adapter.format(t,s)}_tickFormatFunction(t,n,r,i){const o=this.options,s=o.ticks.callback;if(s)return Ue(s,[t,n,r],this);const a=o.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=cn(this.isHorizontal()?n.maxRotation:n.minRotation),o=Math.cos(i),s=Math.sin(i),a=this._resolveTickFontOptions(0).size;return{w:r*o+a*s,h:r*s+a*o}}_getLabelCapacity(t){const n=this.options.time,r=n.displayFormats,i=r[n.unit]||r.millisecond,o=this._tickFormatFunction(t,0,Qg(this,[t],this._majorUnit),i),s=this._getLabelSize(o),a=Math.floor(this.isHorizontal()?this.width/s.w:this.height/s.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(Zg(this,i[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return Ib(t.sort(Yg))}}U(Lo,"id","time"),U(Lo,"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 Ps(e,t,n){let r=0,i=e.length-1,o,s,a,l;n?(t>=e[r].pos&&t<=e[i].pos&&({lo:r,hi:i}=$n(e,"pos",t)),{pos:o,time:a}=e[r],{pos:s,time:l}=e[i]):(t>=e[r].time&&t<=e[i].time&&({lo:r,hi:i}=$n(e,"time",t)),{time:o,pos:a}=e[r],{time:s,pos:l}=e[i]);const c=s-o;return c?a+(l-a)*(t-o)/c:a}class vu extends Lo{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=Ps(n,this.min),this._tableRange=Ps(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:r}=this,i=[],o=[];let s,a,l,c,u;for(s=0,a=t.length;s<a;++s)c=t[s],c>=n&&c<=r&&i.push(c);if(i.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(s=0,a=i.length;s<a;++s)u=i[s+1],l=i[s-1],c=i[s],Math.round((u+l)/2)!==c&&o.push({time:c,pos:s/(a-1)});return o}_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,o)=>i-o)}_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(Ps(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return Ps(this._table,r*this._tableRange+this._minPos,!0)}}U(vu,"id","timeseries"),U(vu,"defaults",Lo.defaults);var oA=Object.freeze({__proto__:null,CategoryScale:yi,LinearScale:Xn,LogarithmicScale:Wr,RadialLinearScale:Ki,TimeScale:Lo,TimeSeriesScale:vu});const sA=[g6,HM,D9,oA],h1="label";function Kg(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function aA(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function g1(e,t){e.labels=t}function p1(e,t,n=h1){const r=[];e.datasets=t.map(i=>{const o=e.datasets.find(s=>s[n]===i[n]);return!o||!i.data||r.includes(o)?{...i}:(r.push(o),Object.assign(o,i),o)})}function lA(e,t=h1){const n={labels:[],datasets:[]};return g1(n,e.labels),p1(n,e.datasets,t),n}function cA(e,t){const{height:n=150,width:r=300,redraw:i=!1,datasetIdKey:o,type:s,data:a,options:l,plugins:c=[],fallbackContent:u,updateMode:d,...f}=e,h=x.useRef(null),g=x.useRef(null),p=()=>{h.current&&(g.current=new xt(h.current,{type:s,data:lA(a,o),options:l&&{...l},plugins:c}),Kg(t,g.current))},m=()=>{Kg(t,null),g.current&&(g.current.destroy(),g.current=null)};return x.useEffect(()=>{!i&&g.current&&l&&aA(g.current,l)},[i,l]),x.useEffect(()=>{!i&&g.current&&g1(g.current.config.data,a.labels)},[i,a.labels]),x.useEffect(()=>{!i&&g.current&&a.datasets&&p1(g.current.config.data,a.datasets,o)},[i,a.datasets]),x.useEffect(()=>{g.current&&(i?(m(),setTimeout(p)):g.current.update(d))},[i,l,a.labels,a.datasets,d]),x.useEffect(()=>{g.current&&(m(),setTimeout(p))},[s]),x.useEffect(()=>(p(),()=>m()),[]),b.jsx("canvas",{ref:h,role:"img",height:n,width:r,...f,children:u})}const Vd=x.forwardRef(cA);function Gd(e,t){return xt.register(t),x.forwardRef((n,r)=>b.jsx(Vd,{...n,ref:r,type:e}))}const uA=Gd("bar",fo),m1=Gd("doughnut",rr),dA=Gd("pie",Ba);/*!
101
- * chartjs-plugin-datalabels v2.2.0
102
- * https://chartjs-plugin-datalabels.netlify.app
103
- * (c) 2017-2022 chartjs-plugin-datalabels contributors
104
- * Released under the MIT license
105
- */var qg=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}(),go={toTextLines:function(e){var t=[],n;for(e=[].concat(e);e.length;)n=e.pop(),typeof n=="string"?t.unshift.apply(t,n.split(`
106
- `)):Array.isArray(n)?e.push.apply(e,n):Oe(e)||t.unshift(""+n);return t},textSize:function(e,t,n){var r=[].concat(t),i=r.length,o=e.font,s=0,a;for(e.font=n.string,a=0;a<i;++a)s=Math.max(e.measureText(r[a]).width,s);return e.font=o,{height:i*n.lineHeight,width:s}},bound:function(e,t,n){return Math.max(e,Math.min(t,n))},arrayDiff:function(e,t){var n=e.slice(),r=[],i,o,s,a;for(i=0,s=t.length;i<s;++i)a=t[i],o=n.indexOf(a),o===-1?r.push([a,1]):n.splice(o,1);for(i=0,s=n.length;i<s;++i)r.push([n[i],-1]);return r},rasterize:function(e){return Math.round(e*qg)/qg}};function wc(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,o=e.y-r,s=Math.sqrt(i*i+o*o);return{x:s?i/s:0,y:s?o/s:-1}}function fA(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 hA=0,b1=1,v1=2,x1=4,y1=8;function Fs(e,t,n){var r=hA;return e<n.left?r|=b1:e>n.right&&(r|=v1),t<n.top?r|=y1:t>n.bottom&&(r|=x1),r}function gA(e,t){for(var n=e.x0,r=e.y0,i=e.x1,o=e.y1,s=Fs(n,r,t),a=Fs(i,o,t),l,c,u;!(!(s|a)||s&a);)l=s||a,l&y1?(c=n+(i-n)*(t.top-r)/(o-r),u=t.top):l&x1?(c=n+(i-n)*(t.bottom-r)/(o-r),u=t.bottom):l&v1?(u=r+(o-r)*(t.right-n)/(i-n),c=t.right):l&b1&&(u=r+(o-r)*(t.left-n)/(i-n),c=t.left),l===s?(n=c,r=u,s=Fs(n,r,t)):(i=c,o=u,a=Fs(i,o,t));return{x0:n,x1:i,y0:r,y1:o}}function Os(e,t){var n=t.anchor,r=e,i,o;return t.clamp&&(r=gA(r,t.area)),n==="start"?(i=r.x0,o=r.y0):n==="end"?(i=r.x1,o=r.y1):(i=(r.x0+r.x1)/2,o=(r.y0+r.y1)/2),fA(i,o,e.vx,e.vy,t.align)}var Ns={arc:function(e,t){var n=(e.startAngle+e.endAngle)/2,r=Math.cos(n),i=Math.sin(n),o=e.innerRadius,s=e.outerRadius;return Os({x0:e.x+r*o,y0:e.y+i*o,x1:e.x+r*s,y1:e.y+i*s,vx:r,vy:i},t)},point:function(e,t){var n=wc(e,t.origin),r=n.x*e.options.radius,i=n.y*e.options.radius;return Os({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=wc(e,t.origin),r=e.x,i=e.y,o=0,s=0;return e.horizontal?(r=Math.min(e.x,e.base),o=Math.abs(e.base-e.x)):(i=Math.min(e.y,e.base),s=Math.abs(e.base-e.y)),Os({x0:r,y0:i+s,x1:r+o,y1:i,vx:n.x,vy:n.y},t)},fallback:function(e,t){var n=wc(e,t.origin);return Os({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)}},Hn=go.rasterize;function pA(e){var t=e.borderWidth||0,n=e.padding,r=e.size.height,i=e.size.width,o=-i/2,s=-r/2;return{frame:{x:o-n.left-t,y:s-n.top-t,w:i+n.width+t*2,h:r+n.height+t*2},text:{x:o,y:s,w:i,h:r}}}function mA(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 bA(e){return e instanceof Gn?Ns.arc:e instanceof Dr?Ns.point:e instanceof wn?Ns.bar:Ns.fallback}function vA(e,t,n,r,i,o){var s=Math.PI/2;if(o){var a=Math.min(o,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,-s),e.arc(u,c,a,-s,0),e.arc(u,d,a,0,s),e.arc(l,d,a,s,Math.PI)):l<u?(e.moveTo(l,n),e.arc(u,c,a,-s,s),e.arc(l,c,a,s,Math.PI+s)):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 xA(e,t,n){var r=n.backgroundColor,i=n.borderColor,o=n.borderWidth;!r&&(!i||!o)||(e.beginPath(),vA(e,Hn(t.x)+o/2,Hn(t.y)+o/2,Hn(t.w)-o,Hn(t.h)-o,n.borderRadius),e.closePath(),r&&(e.fillStyle=r,e.fill()),i&&o&&(e.strokeStyle=i,e.lineWidth=o,e.lineJoin="miter",e.stroke()))}function yA(e,t,n){var r=n.lineHeight,i=e.w,o=e.x,s=e.y+r/2;return t==="center"?o+=i/2:(t==="end"||t==="right")&&(o+=i),{h:r,w:i,x:o,y:s}}function CA(e,t,n){var r=e.shadowBlur,i=n.stroked,o=Hn(n.x),s=Hn(n.y),a=Hn(n.w);i&&e.strokeText(t,o,s,a),n.filled&&(r&&i&&(e.shadowBlur=0),e.fillText(t,o,s,a),r&&i&&(e.shadowBlur=r))}function wA(e,t,n,r){var i=r.textAlign,o=r.color,s=!!o,a=r.font,l=t.length,c=r.textStrokeColor,u=r.textStrokeWidth,d=c&&u,f;if(!(!l||!s&&!d))for(n=yA(n,i,a),e.font=a.string,e.textAlign=i,e.textBaseline="middle",e.shadowBlur=r.textShadowBlur,e.shadowColor=r.textShadowColor,s&&(e.fillStyle=o),d&&(e.lineJoin="round",e.lineWidth=u,e.strokeStyle=c),f=0,l=t.length;f<l;++f)CA(e,t[f],{stroked:d,filled:s,w:n.w,x:n.x,y:n.y+n.h*f})}var C1=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};vt(C1.prototype,{_modelize:function(e,t,n,r){var i=this,o=i._index,s=gt(tt([n.font,{}],r,o)),a=tt([n.color,it.color],r,o);return{align:tt([n.align,"center"],r,o),anchor:tt([n.anchor,"center"],r,o),area:r.chart.chartArea,backgroundColor:tt([n.backgroundColor,null],r,o),borderColor:tt([n.borderColor,null],r,o),borderRadius:tt([n.borderRadius,0],r,o),borderWidth:tt([n.borderWidth,0],r,o),clamp:tt([n.clamp,!1],r,o),clip:tt([n.clip,!1],r,o),color:a,display:e,font:s,lines:t,offset:tt([n.offset,4],r,o),opacity:tt([n.opacity,1],r,o),origin:mA(i._el,r),padding:St(tt([n.padding,4],r,o)),positioner:bA(i._el),rotation:tt([n.rotation,0],r,o)*(Math.PI/180),size:go.textSize(i._ctx,t,s),textAlign:tt([n.textAlign,"start"],r,o),textShadowBlur:tt([n.textShadowBlur,0],r,o),textShadowColor:tt([n.textShadowColor,a],r,o),textStrokeColor:tt([n.textStrokeColor,a],r,o),textStrokeWidth:tt([n.textStrokeWidth,0],r,o)}},update:function(e){var t=this,n=null,r=null,i=t._index,o=t._config,s,a,l,c=tt([o.display,!0],e,i);c&&(s=e.dataset.data[i],a=Me(Ue(o.formatter,[s,e]),s),l=Oe(a)?[]:go.toTextLines(a),l.length&&(n=t._modelize(c,l,o,e),r=pA(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,o=n._rects,s;this.visible()&&(r.save(),i.clip&&(s=i.area,r.beginPath(),r.rect(s.left,s.top,s.right-s.left,s.bottom-s.top),r.clip()),r.globalAlpha=go.bound(0,i.opacity,1),r.translate(Hn(t.x),Hn(t.y)),r.rotate(i.rotation),xA(r,o.frame,i),wA(r,i.lines,o.text,i),r.restore())}});var SA=Number.MIN_SAFE_INTEGER||-9007199254740991,IA=Number.MAX_SAFE_INTEGER||9007199254740991;function Hi(e,t,n){var r=Math.cos(n),i=Math.sin(n),o=t.x,s=t.y;return{x:o+r*(e.x-o)-i*(e.y-s),y:s+i*(e.x-o)+r*(e.y-s)}}function ep(e,t){var n=IA,r=SA,i=t.origin,o,s,a,l,c;for(o=0;o<e.length;++o)s=e[o],a=s.x-i.x,l=s.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 Ts(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 w1=function(){this._rotation=0,this._rect={x:0,y:0,w:0,h:0}};vt(w1.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=Hi(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=[Ts(t[0],t[1]),Ts(t[0],t[3])],i,o,s;for(this._rotation!==e._rotation&&r.push(Ts(n[0],n[1]),Ts(n[0],n[3])),i=0;i<r.length;++i)if(o=ep(t,r[i]),s=ep(n,r[i]),o.max<s.min||s.max<o.min)return!1;return!0},_points:function(){var e=this,t=e._rect,n=e._rotation,r=e.center();return[Hi({x:t.x,y:t.y},r,n),Hi({x:t.x+t.w,y:t.y},r,n),Hi({x:t.x+t.w,y:t.y+t.h},r,n),Hi({x:t.x,y:t.y+t.h},r,n)]}});function S1(e,t,n){var r=t.positioner(e,t),i=r.vx,o=r.vy;if(!i&&!o)return{x:r.x,y:r.y};var s=n.w,a=n.h,l=t.rotation,c=Math.abs(s/2*Math.cos(l))+Math.abs(a/2*Math.sin(l)),u=Math.abs(s/2*Math.sin(l))+Math.abs(a/2*Math.cos(l)),d=1/Math.max(Math.abs(i),Math.abs(o));return c*=i*d,u*=o*d,c+=t.offset*i,u+=t.offset*o,{x:r.x+c,y:r.y+u}}function _A(e,t){var n,r,i,o;for(n=e.length-1;n>=0;--n)for(i=e[n].$layout,r=n-1;r>=0&&i._visible;--r)o=e[r].$layout,o._visible&&i._box.intersects(o._box)&&t(i,o);return e}function EA(e){var t,n,r,i,o,s,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]}),o=r.geometry(),s=S1(a,r.model(),o),i._box.update(s,o,r.rotation()));return _A(e,function(l,c){var u=l._hidable,d=c._hidable;u&&d||d?c._visible=!1:u&&(l._visible=!1)})}var po={prepare:function(e){var t=[],n,r,i,o,s;for(n=0,i=e.length;n<i;++n)for(r=0,o=e[n].length;r<o;++r)s=e[n][r],t.push(s),s.$layout={_box:new w1,_hidable:!1,_visible:!0,_set:n,_idx:s._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,o,s;for(n=0,r=e.length;n<r;++n)i=e[n],o=i.model(),s=i.$layout,s._hidable=o&&o.display==="auto",s._visible=i.visible(),t|=s._hidable;t&&EA(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,o,s,a;for(n=0,r=t.length;n<r;++n)i=t[n],o=i.$layout,o._visible&&(s=i.geometry(),a=S1(i._el,i.model(),s),o._box.update(a,s,i.rotation()),i.draw(e,a))}},MA=function(e){if(Oe(e))return null;var t=e,n,r,i;if(Le(e))if(!Oe(e.label))t=e.label;else if(!Oe(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},AA={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:MA,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},Lt="$datalabels",I1="$default";function RA(e,t){var n=e.datalabels,r={},i=[],o,s;return n===!1?null:(n===!0&&(n={}),t=vt({},[t,n]),o=t.labels||{},s=Object.keys(o),delete t.labels,s.length?s.forEach(function(a){o[a]&&i.push(vt({},[t,o[a],{_key:a}]))}):i.push(t),r=i.reduce(function(a,l){return Ze(l.listeners||{},function(c,u){a[u]=a[u]||{},a[u][l._key||I1]=c}),delete l.listeners,a},{}),{labels:i,listeners:r})}function xu(e,t,n,r){if(t){var i=n.$context,o=n.$groups,s;t[o._set]&&(s=t[o._set][o._key],s&&Ue(s,[i,r])===!0&&(e[Lt]._dirty=!0,n.update(i)))}}function kA(e,t,n,r,i){var o,s;!n&&!r||(n?r?n!==r&&(s=o=!0):s=!0:o=!0,s&&xu(e,t.leave,n,i),o&&xu(e,t.enter,r,i))}function PA(e,t){var n=e[Lt],r=n._listeners,i,o;if(!(!r.enter&&!r.leave)){if(t.type==="mousemove")o=po.lookup(n._labels,t);else if(t.type!=="mouseout")return;i=n._hovered,n._hovered=o,kA(e,r,i,o,t)}}function FA(e,t){var n=e[Lt],r=n._listeners.click,i=r&&po.lookup(n._labels,t);i&&xu(e,r,i,t)}var _1={id:"datalabels",defaults:AA,beforeInit:function(e){e[Lt]={_actives:[]}},beforeUpdate:function(e){var t=e[Lt];t._listened=!1,t._listeners={},t._datasets=[],t._labels=[]},afterDatasetUpdate:function(e,t,n){var r=t.index,i=e[Lt],o=i._datasets[r]=[],s=e.isDatasetVisible(r),a=e.data.datasets[r],l=RA(a,n),c=t.meta.data||[],u=e.ctx,d,f,h,g,p,m,v,C;for(u.save(),d=0,h=c.length;d<h;++d)if(v=c[d],v[Lt]=[],s&&v&&e.getDataVisibility(d)&&!v.skip)for(f=0,g=l.labels.length;f<g;++f)p=l.labels[f],m=p._key,C=new C1(p,u,v,d),C.$groups={_set:r,_key:m||I1},C.$context={active:!1,chart:e,dataIndex:d,dataset:a,datasetIndex:r},C.update(C.$context),v[Lt].push(C),o.push(C);u.restore(),vt(i._listeners,l.listeners,{merger:function(y,I,w){I[y]=I[y]||{},I[y][t.index]=w[y],i._listened=!0}})},afterUpdate:function(e){e[Lt]._labels=po.prepare(e[Lt]._datasets)},afterDatasetsDraw:function(e){po.draw(e,e[Lt]._labels)},beforeEvent:function(e,t){if(e[Lt]._listened){var n=t.event;switch(n.type){case"mousemove":case"mouseout":PA(e,n);break;case"click":FA(e,n);break}}},afterEvent:function(e){var t=e[Lt],n=t._actives,r=t._actives=e.getActiveElements(),i=go.arrayDiff(n,r),o,s,a,l,c,u,d;for(o=0,s=i.length;o<s;++o)if(c=i[o],c[1])for(d=c[0].element[Lt]||[],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)&&(po.update(t._labels),e.render()),delete t._dirty}};xt.register(Gn,Ur,Jr,_1);xt.defaults.font.family="'Rubik', 'Inter', sans-serif";const OA=({labels:e,dataValues:t,colors:n,title:r,tableHeader:i="",renderLegendTable:o})=>{const[s,a]=x.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 v=m.chart.data.datasets[0].data.reduce((y,I)=>y+I,0);return`${(p/v*100).toFixed(2)+"%"}
107
- (${p})`},font:function(p){const m=p.chart.width,v=Math.round(m/32);return{weight:"bold",size:v>12?12:v}},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=b.jsx("div",{className:"space-y-2",children:h.map(p=>b.jsxs("div",{className:"flex items-center justify-between p-2 border-b",style:{borderColor:"var(--border-color)"},children:[b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("div",{style:{width:"12px",height:"12px",borderRadius:"50%",backgroundColor:c[p.id-1]}}),b.jsx("span",{style:{color:"var(--text-color)"},children:p.label})]}),b.jsxs("div",{className:"flex gap-4",children:[b.jsx("span",{style:{color:"var(--secondary-text-color)"},children:p.percentage}),b.jsxs("span",{style:{color:"var(--secondary-text-color)"},children:["(",p.value,")"]})]})]},p.id))});return b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"flex flex-row flex-1 items-end",children:[b.jsx("div",{className:"w-2/3 h-64",children:b.jsx(m1,{data:u,options:f})}),b.jsx(Sd,{legends:e,colors:c,dataValues:t,showAllLegends:s,onClick:()=>a(!s)})]}),b.jsx(ai,{isOpen:s,onClose:()=>{a(!1)},title:`${r||"Chart"} Legends:`,showFooter:!1,body:o?o(h):g})]})},Be={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"},NA={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"},E1=x.createContext(void 0),M1=({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")},[o,s]=x.useState(i),[a,l]=x.useState(()=>({...Be,...n})),c=x.useMemo(()=>o==="dark"?{...a,...NA,...n}:{...a,...n},[o,a,n]);x.useEffect(()=>{if(typeof window>"u")return;const g=window.document.documentElement;g.classList.remove(o==="light"?"dark":"light"),g.classList.add(o),localStorage.setItem(r,o);const p={"--brand-orange":c.brandOrange||Be.brandOrange,"--brand-dark":c.brandDark||Be.brandDark,"--brand-dark-secondary":c.brandDarkSecondary||Be.brandDarkSecondary,"--brand-light":c.brandLight||Be.brandLight,"--brand-orange-10":c.brandOrange10||Be.brandOrange10,"--app-bg-color":c.appBgColor||Be.appBgColor,"--app-bg-color-dark":c.appBgColorDark||Be.appBgColorDark,"--bg-color":c.bgColor||Be.bgColor,"--text-color":c.textColor||Be.textColor,"--hover-bg-color":c.hoverBgColor||Be.hoverBgColor,"--sidebar-hover-bg":c.sidebarHoverBg||Be.sidebarHoverBg,"--grid-color":c.gridColor||Be.gridColor,"--chart-text-color":c.chartTextColor||Be.chartTextColor,"--chart-grid-color":c.chartGridColor||Be.chartGridColor,"--chart-label-color":c.chartLabelColor||Be.chartLabelColor,"--border-color":c.borderColor||Be.borderColor,"--secondary-text-color":c.secondaryTextColor||Be.secondaryTextColor,"--disabled-text-color":c.disabledTextColor||Be.disabledTextColor,"--status-error-bg":c.statusErrorBg||Be.statusErrorBg,"--status-error-text":c.statusErrorText||Be.statusErrorText,"--status-error-border":c.statusErrorBorder||Be.statusErrorBorder,"--status-warning-bg":c.statusWarningBg||Be.statusWarningBg,"--status-warning-text":c.statusWarningText||Be.statusWarningText,"--status-warning-border":c.statusWarningBorder||Be.statusWarningBorder,"--status-success-bg":c.statusSuccessBg||Be.statusSuccessBg,"--status-success-text":c.statusSuccessText||Be.statusSuccessText,"--status-success-border":c.statusSuccessBorder||Be.statusSuccessBorder,"--font-family":c.fontFamily||Be.fontFamily,"--font-family-heading":c.fontFamilyHeading||Be.fontFamilyHeading,...c.customVariables||{}};Object.entries(p).forEach(([m,v])=>{g.style.setProperty(m,v)}),c.fontFamily&&(document.body.style.fontFamily=c.fontFamily),document.body.style.backgroundColor=o==="dark"?c.appBgColorDark||Be.appBgColorDark:c.appBgColor||Be.appBgColor},[o,c,r]);const h={theme:o,toggleTheme:()=>{s(g=>g==="light"?"dark":"light")},setTheme:g=>{s(g)},config:c,updateConfig:g=>{l(p=>({...p,...g}))}};return b.jsx(E1.Provider,{value:h,children:e})},_l=()=>{const e=x.useContext(E1);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e};xt.register(Gn,Ur,Jr,_1);xt.defaults.font.family="'Rubik', 'Inter', sans-serif";const TA=({labels:e,dataValues:t,colors:n,title:r="",tableHeader:i="",renderLegendTable:o})=>{const[s,a]=x.useState(!1),{theme:l}=_l(),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,v)=>m+v,0),h={responsive:!0,maintainAspectRatio:!1,plugins:{title:{display:!1},legend:{display:!1},datalabels:{color:"#fff",anchor:"center",align:"center",formatter:(m,v)=>{const C=v.chart.data.datasets[0].data.reduce((w,R)=>{const A=Number(R);return isNaN(A)?w:w+A},0);return`${Math.round(m/C*100)+"%"}`},font:function(m){const v=m.chart.width,C=Math.round(v/24);return{weight:"bold",size:C>14?14:C}}},tooltip:{callbacks:{label:m=>{const v=m.raw,C=t.reduce((I,w)=>I+w,0);return` ${(v/C*100).toFixed(2)}% (${v})`}}}}},g=e.map((m,v)=>({id:v+1,label:m,percentage:(t[v]/f*100).toFixed(2)+"%",value:t[v]})),p=b.jsx("div",{className:"space-y-2",children:g.map(m=>b.jsxs("div",{className:"flex items-center justify-between p-2 border-b",style:{borderColor:"var(--border-color)"},children:[b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("div",{style:{width:"12px",height:"12px",borderRadius:"50%",backgroundColor:u[m.id-1]}}),b.jsx("span",{style:{color:"var(--text-color)"},children:m.label})]}),b.jsxs("div",{className:"flex gap-4",children:[b.jsx("span",{style:{color:"var(--secondary-text-color)"},children:m.percentage}),b.jsxs("span",{style:{color:"var(--secondary-text-color)"},children:["(",m.value,")"]})]})]},m.id))});return b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"pie-chart-container flex flex-row flex-1 items-end",children:[b.jsx("div",{className:"w-2/3 h-64",children:b.jsx(dA,{data:d,options:h})}),b.jsx(Sd,{legends:e,colors:u,dataValues:t,showAllLegends:s,onClick:()=>a(!s)})]}),b.jsx(ai,{isOpen:s,onClose:()=>{a(!1)},title:`${r||"Chart"} Legends:`,showFooter:!1,body:o?o(g):p})]})};xt.register(...sA);xt.register(yi,Xn,wn,Dr,zn,$d,Ur,Jr);xt.defaults.font.family="'Rubik', 'Inter', sans-serif";const DA=({chartData:e,title:t})=>{const{theme:n}=_l(),r=getComputedStyle(document.documentElement).getPropertyValue("--chart-text-color").trim()||(n==="dark"?"#fff":"#333333"),i=x.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:(s,a)=>a.dataset.label==="Blue Bar"?s.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(s){return`${s.dataset.type==="line"?"Trend":"Value"}: ${s.raw}`}}}}}),[t,n,r]),o=x.useMemo(()=>{var s;return e!=null&&e.monthlyData?{labels:(s=e.monthlyData)==null?void 0:s.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 b.jsx("div",{className:"vertical-bar-chart",style:{height:"400px"},children:b.jsx(Vd,{type:"bar",options:i,data:o})})};xt.register(yi,Wr,Xn,wn,$d,Ur,Jr);xt.defaults.font.family="'Rubik', 'Inter', sans-serif";const LA=({data:e,maxValue:t=5e4,scaleType:n=Ir.LINEAR})=>{const{theme:r}=_l(),i=getComputedStyle(document.documentElement).getPropertyValue("--chart-text-color").trim()||(r==="dark"?"#fff":"#333333"),{processedData:o,computedMaxValue:s}=x.useMemo(()=>{const d=Object.values(e);let f=[...d],h=t;if(n===Ir.NORMALISED){const g=Math.min(...d),m=Math.max(...d)-g;f=d.map(v=>(v-g)/m*100),h=100}else n===Ir.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===Ir.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===Ir.LOG?"logarithmic":"linear",max:s,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(o),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 b.jsx("div",{className:"horizontal-bar-chart-container",style:{height:`${a}px`},children:b.jsx(uA,{options:c,data:u})})};function zd(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 jA=({icon:e,value:t,isSize:n=!1,label:r})=>{const i=x.useMemo(()=>{if(!n)return t;const o=typeof t=="number"?t:parseInt(t,10),s=zd(o).split(" ");return{size:s[0],unit:s[1]}},[t,n]);return b.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:[b.jsxs("div",{className:"flex flex-col flex-1 items-center justify-center p-0",children:[b.jsx("div",{className:"p-2",style:{color:"var(--brand-orange)"},children:typeof e=="string"?b.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"}):b.jsx("div",{className:"text-4xl md:text-5xl lg:text-6xl",children:e})}),b.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&&b.jsx("span",{className:"ml-1 text-sm md:text-base",style:{color:"var(--secondary-text-color)"},children:i.unit})]})]}),b.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})]})};xt.register(Gn,Ur,Jr);xt.defaults.font.family="'Rubik', 'Inter', sans-serif";const BA=e=>`
108
- input[type=range] {
109
- height: 4px;
110
- -webkit-appearance: none;
111
- width: 100%;
112
- position: absolute;
113
- top: 0;
114
- margin: 0;
115
- padding: 0;
116
- background: none;
117
- pointer-events: none;
118
- }
119
-
120
- /* Center thumbs vertically on the track */
121
- input[type=range]::-webkit-slider-runnable-track {
122
- height: 1px;
123
- -webkit-appearance: none;
124
- color: #13bba4;
125
- }
126
-
127
- input[type=range]::-webkit-slider-thumb {
128
- -webkit-appearance: none;
129
- width: ${e}px;
130
- height: ${e}px;
131
- border-radius: 50%;
132
- background: #ffffff;
133
- cursor: pointer;
134
- box-shadow: 0 1px 3px rgba(0,0,0,0.3);
135
- border: 2px solid gray;
136
- margin-top: -0.8rem;
137
- pointer-events: all;
138
- z-index: 3;
139
- }
140
-
141
- input[type=range]::-moz-range-track {
142
- height: 1px;
143
- -moz-appearance: none;
144
- color: #13bba4;
145
- }
146
-
147
- input[type=range]::-moz-range-thumb {
148
- width: ${e}px;
149
- height: ${e}px;
150
- border-radius: 50%;
151
- background: #ffffff;
152
- cursor: pointer;
153
- box-shadow: 0 1px 3px rgba(0,0,0,0.3);
154
- border: 2px solid gray;
155
- margin-top: -0.8rem;
156
- pointer-events: all;
157
- }
158
- `,$A=({title:e,data:t,maxValue:n,minRange:r=0,maxRange:i=10,onMinRangeChange:o,onMaxRangeChange:s,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]=x.useState(0),p=x.useRef(null),[m,v]=x.useState(r),[C,y]=x.useState(i),I=t,w=n>0?I/n*100:0,R=25;x.useEffect(()=>{const F=()=>{if(p.current){const B=p.current.offsetWidth;g(z=>z!==B?B:z)}};return window.addEventListener("resize",F),F(),()=>window.removeEventListener("resize",F)},[]),x.useEffect(()=>{v(r)},[r]),x.useEffect(()=>{y(i)},[i]);const A=x.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=x.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]),_=x.useCallback(F=>{const B=parseFloat(F.target.value);v(B)},[]),E=x.useCallback(F=>{const B=parseFloat(F.target.value);y(B)},[]),P=x.useCallback(()=>{o==null||o(m)},[m,o]),T=x.useCallback(()=>{s==null||s(C)},[C,s]),$=c-l,D=$>0?(m-l)/$*100:0,k=$>0?(C-l)/$*100:0,O=`${D}%`,N=`${k}%`,M=x.useMemo(()=>{const F=getComputedStyle(document.documentElement).getPropertyValue("--brand-light").trim()||"#dae0e8",B=getComputedStyle(document.documentElement).getPropertyValue("--brand-orange").trim()||"#ff6503";return{background:`linear-gradient(to right, ${F} 0%, ${F} ${D}%,
159
- ${B} ${D}%, ${B} ${k}%, ${F} ${k}%, ${F} 100%)`}},[D,k]);return b.jsxs("div",{className:"retention flex flex-col items-center rounded-xl select-none p-3",children:[b.jsx("div",{className:"w-full flex flex-col items-center justify-center p-2 mb-4",children:b.jsxs("div",{className:"relative w-11/12 h-64 flex items-center justify-center",children:[b.jsx(m1,{data:S,options:A}),b.jsx("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:f?b.jsxs(b.Fragment,{children:[b.jsx("span",{className:"text-xl font-bold",style:{color:"var(--chart-text-color)"},children:I.toLocaleString()}),b.jsx("span",{className:"text-xs",style:{color:"var(--secondary-text-color)"},children:e})]}):b.jsxs(b.Fragment,{children:[b.jsx("span",{className:"text-lg font-medium",style:{color:"var(--secondary-text-color)"},children:"No Data"}),b.jsx("span",{className:"text-xs",style:{color:"var(--secondary-text-color)"},children:"Available"})]})})]})}),a&&b.jsx("div",{className:"w-full px-6",children:b.jsxs("div",{className:"relative w-full",ref:p,children:[b.jsx("style",{children:BA(R)}),b.jsx("div",{className:"absolute top-0 w-full h-1 rounded-full",style:M}),b.jsx("input",{type:"range",min:l,max:c,step:u,value:m,onChange:_,onMouseUp:P,onTouchEnd:P,className:"w-full"}),b.jsx("input",{type:"range",min:l,max:c,step:u,value:C,onChange:E,onMouseUp:T,onTouchEnd:T,className:"w-full"}),b.jsx("div",{className:"absolute flex items-center justify-center w-8 h-8 text-white text-xs font-bold rounded",style:{left:O,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)}),b.jsx("div",{className:"absolute flex items-center justify-center w-8 h-8 text-white text-xs font-bold rounded",style:{left:N,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(C)})]})})]})};class dr{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 o=n[i],s=t+o,a=Math.abs(t)<Math.abs(o)?t-(s-o):o-(s-t);a&&(n[r++]=a),t=s}return n[r]=t,this._n=r+1,this}valueOf(){const t=this._partials;let n=this._n,r,i,o,s=0;if(n>0){for(s=t[--n];n>0&&(r=s,i=t[--n],s=r+i,o=i-(s-r),!o););n>0&&(o<0&&t[n-1]<0||o>0&&t[n-1]>0)&&(i=o*2,r=s+i,i==r-s&&(s=r))}return s}}function*VA(e){for(const t of e)yield*t}function A1(e){return Array.from(VA(e))}function ii(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,o=new Array(i);++r<i;)o[r]=e+r*n;return o}var Se=1e-6,Hd=1e-12,De=Math.PI,lt=De/2,tp=De/4,Xt=De*2,Ot=180/De,Qe=De/180,je=Math.abs,Pi=Math.atan,En=Math.atan2,Fe=Math.cos,Ds=Math.ceil,R1=Math.exp,za=Math.log,Sc=Math.pow,ke=Math.sin,Kt=Math.sign||function(e){return e>0?1:e<0?-1:0},Tt=Math.sqrt,Wd=Math.tan;function k1(e){return e>1?0:e<-1?De:Math.acos(e)}function en(e){return e>1?lt:e<-1?-lt:Math.asin(e)}function mt(){}function Ha(e,t){e&&rp.hasOwnProperty(e.type)&&rp[e.type](e,t)}var np={Feature:function(e,t){Ha(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)Ha(n[r].geometry,t)}},rp={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){yu(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)yu(n[r],t,0)},Polygon:function(e,t){ip(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)ip(n[r],t)},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)Ha(n[r],t)}};function yu(e,t,n){var r=-1,i=e.length-n,o;for(t.lineStart();++r<i;)o=e[r],t.point(o[0],o[1],o[2]);t.lineEnd()}function ip(e,t){var n=-1,r=e.length;for(t.polygonStart();++n<r;)yu(e[n],t,1);t.polygonEnd()}function _r(e,t){e&&np.hasOwnProperty(e.type)?np[e.type](e,t):Ha(e,t)}function Cu(e){return[En(e[1],e[0]),en(e[2])]}function Ci(e){var t=e[0],n=e[1],r=Fe(n);return[r*Fe(t),r*ke(t),ke(n)]}function Ls(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function Wa(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 Ic(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function js(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function wu(e){var t=Tt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}function Su(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 Iu(e,t){return je(e)>De&&(e-=Math.round(e/Xt)*Xt),[e,t]}Iu.invert=Iu;function P1(e,t,n){return(e%=Xt)?t||n?Su(sp(e),ap(t,n)):sp(e):t||n?ap(t,n):Iu}function op(e){return function(t,n){return t+=e,je(t)>De&&(t-=Math.round(t/Xt)*Xt),[t,n]}}function sp(e){var t=op(e);return t.invert=op(-e),t}function ap(e,t){var n=Fe(e),r=ke(e),i=Fe(t),o=ke(t);function s(a,l){var c=Fe(l),u=Fe(a)*c,d=ke(a)*c,f=ke(l),h=f*n+u*r;return[En(d*i-h*o,u*n-f*r),en(h*i+d*o)]}return s.invert=function(a,l){var c=Fe(l),u=Fe(a)*c,d=ke(a)*c,f=ke(l),h=f*i-d*o;return[En(d*i+f*o,u*n+h*r),en(h*n-u*r)]},s}function GA(e){e=P1(e[0]*Qe,e[1]*Qe,e.length>2?e[2]*Qe:0);function t(n){return n=e(n[0]*Qe,n[1]*Qe),n[0]*=Ot,n[1]*=Ot,n}return t.invert=function(n){return n=e.invert(n[0]*Qe,n[1]*Qe),n[0]*=Ot,n[1]*=Ot,n},t}function zA(e,t,n,r,i,o){if(n){var s=Fe(t),a=ke(t),l=r*n;i==null?(i=t+r*Xt,o=t-l/2):(i=lp(s,i),o=lp(s,o),(r>0?i<o:i>o)&&(i+=r*Xt));for(var c,u=i;r>0?u>o:u<o;u-=l)c=Cu([s,-a*Fe(u),-a*ke(u)]),e.point(c[0],c[1])}}function lp(e,t){t=Ci(t),t[0]-=e,wu(t);var n=k1(-t[1]);return((-t[2]<0?-n:n)+Xt-Se)%Xt}function F1(){var e=[],t;return{point:function(n,r,i){t.push([n,r,i])},lineStart:function(){e.push(t=[])},lineEnd:mt,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function la(e,t){return je(e[0]-t[0])<Se&&je(e[1]-t[1])<Se}function Bs(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 O1(e,t,n,r,i){var o=[],s=[],a,l;if(e.forEach(function(g){if(!((p=g.length-1)<=0)){var p,m=g[0],v=g[p],C;if(la(m,v)){if(!m[2]&&!v[2]){for(i.lineStart(),a=0;a<p;++a)i.point((m=g[a])[0],m[1]);i.lineEnd();return}v[0]+=2*Se}o.push(C=new Bs(m,g,null,!0)),s.push(C.o=new Bs(m,null,C,!1)),o.push(C=new Bs(v,g,null,!1)),s.push(C.o=new Bs(v,null,C,!0))}}),!!o.length){for(s.sort(t),cp(o),cp(s),a=0,l=s.length;a<l;++a)s[a].e=n=!n;for(var c=o[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 cp(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 _c(e){return je(e[0])<=De?e[0]:Kt(e[0])*((je(e[0])+De)%Xt-De)}function N1(e,t){var n=_c(t),r=t[1],i=ke(r),o=[ke(n),-Fe(n),0],s=0,a=0,l=new dr;i===1?r=lt+Se:i===-1&&(r=-lt-Se);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=_c(h),p=h[1]/2+tp,m=ke(p),v=Fe(p),C=0;C<f;++C,g=I,m=R,v=A,h=y){var y=d[C],I=_c(y),w=y[1]/2+tp,R=ke(w),A=Fe(w),S=I-g,_=S>=0?1:-1,E=_*S,P=E>De,T=m*R;if(l.add(En(T*_*ke(E),v*A+T*Fe(E))),s+=P?S+_*Xt:S,P^g>=n^I>=n){var $=Wa(Ci(h),Ci(y));wu($);var D=Wa(o,$);wu(D);var k=(P^S>=0?-1:1)*en(D[2]);(r>k||r===k&&($[0]||$[1]))&&(a+=P^S>=0?1:-1)}}return(s<-Se||s<Se&&l<-Hd)^a&1}function T1(e,t,n,r){return function(i){var o=t(i),s=F1(),a=t(s),l=!1,c,u,d,f={point:h,lineStart:p,lineEnd:m,polygonStart:function(){f.point=v,f.lineStart=C,f.lineEnd=y,u=[],c=[]},polygonEnd:function(){f.point=h,f.lineStart=p,f.lineEnd=m,u=A1(u);var I=N1(c,r);u.length?(l||(i.polygonStart(),l=!0),O1(u,WA,I,n,i)):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(I,w){e(I,w)&&i.point(I,w)}function g(I,w){o.point(I,w)}function p(){f.point=g,o.lineStart()}function m(){f.point=h,o.lineEnd()}function v(I,w){d.push([I,w]),a.point(I,w)}function C(){a.lineStart(),d=[]}function y(){v(d[0][0],d[0][1]),a.lineEnd();var I=a.clean(),w=s.result(),R,A=w.length,S,_,E;if(d.pop(),c.push(d),d=null,!!A){if(I&1){if(_=w[0],(S=_.length-1)>0){for(l||(i.polygonStart(),l=!0),i.lineStart(),R=0;R<S;++R)i.point((E=_[R])[0],E[1]);i.lineEnd()}return}A>1&&I&2&&w.push(w.pop().concat(w.shift())),u.push(w.filter(HA))}}return f}}function HA(e){return e.length>1}function WA(e,t){return((e=e.x)[0]<0?e[1]-lt-Se:lt-e[1])-((t=t.x)[0]<0?t[1]-lt-Se:lt-t[1])}const up=T1(function(){return!0},XA,ZA,[-De,-lt]);function XA(e){var t=NaN,n=NaN,r=NaN,i;return{lineStart:function(){e.lineStart(),i=1},point:function(o,s){var a=o>0?De:-De,l=je(o-t);je(l-De)<Se?(e.point(t,n=(n+s)/2>0?lt:-lt),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(a,n),e.point(o,n),i=0):r!==a&&l>=De&&(je(t-r)<Se&&(t-=r*Se),je(o-a)<Se&&(o-=a*Se),n=YA(t,n,o,s),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(a,n),i=0),e.point(t=o,n=s),r=a},lineEnd:function(){e.lineEnd(),t=n=NaN},clean:function(){return 2-i}}}function YA(e,t,n,r){var i,o,s=ke(e-n);return je(s)>Se?Pi((ke(t)*(o=Fe(r))*ke(n)-ke(r)*(i=Fe(t))*ke(e))/(i*o*s)):(t+r)/2}function ZA(e,t,n,r){var i;if(e==null)i=n*lt,r.point(-De,i),r.point(0,i),r.point(De,i),r.point(De,0),r.point(De,-i),r.point(0,-i),r.point(-De,-i),r.point(-De,0),r.point(-De,i);else if(je(e[0]-t[0])>Se){var o=e[0]<t[0]?De:-De;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(t[0],t[1])}function JA(e){var t=Fe(e),n=2*Qe,r=t>0,i=je(t)>Se;function o(u,d,f,h){zA(h,e,n,f,u,d)}function s(u,d){return Fe(u)*Fe(d)>t}function a(u){var d,f,h,g,p;return{lineStart:function(){g=h=!1,p=1},point:function(m,v){var C=[m,v],y,I=s(m,v),w=r?I?0:c(m,v):I?c(m+(m<0?De:-De),v):0;if(!d&&(g=h=I)&&u.lineStart(),I!==h&&(y=l(d,C),(!y||la(d,y)||la(C,y))&&(C[2]=1)),I!==h)p=0,I?(u.lineStart(),y=l(C,d),u.point(y[0],y[1])):(y=l(d,C),u.point(y[0],y[1],2),u.lineEnd()),d=y;else if(i&&d&&r^I){var R;!(w&f)&&(R=l(C,d,!0))&&(p=0,r?(u.lineStart(),u.point(R[0][0],R[0][1]),u.point(R[1][0],R[1][1]),u.lineEnd()):(u.point(R[1][0],R[1][1]),u.lineEnd(),u.lineStart(),u.point(R[0][0],R[0][1],3)))}I&&(!d||!la(d,C))&&u.point(C[0],C[1]),d=C,h=I,f=w},lineEnd:function(){h&&u.lineEnd(),d=null},clean:function(){return p|(g&&h)<<1}}}function l(u,d,f){var h=Ci(u),g=Ci(d),p=[1,0,0],m=Wa(h,g),v=Ls(m,m),C=m[0],y=v-C*C;if(!y)return!f&&u;var I=t*v/y,w=-t*C/y,R=Wa(p,m),A=js(p,I),S=js(m,w);Ic(A,S);var _=R,E=Ls(A,_),P=Ls(_,_),T=E*E-P*(Ls(A,A)-1);if(!(T<0)){var $=Tt(T),D=js(_,(-E-$)/P);if(Ic(D,A),D=Cu(D),!f)return D;var k=u[0],O=d[0],N=u[1],M=d[1],F;O<k&&(F=k,k=O,O=F);var B=O-k,z=je(B-De)<Se,G=z||B<Se;if(!z&&M<N&&(F=N,N=M,M=F),G?z?N+M>0^D[1]<(je(D[0]-k)<Se?N:M):N<=D[1]&&D[1]<=M:B>De^(k<=D[0]&&D[0]<=O)){var V=js(_,(-E+$)/P);return Ic(V,A),[D,Cu(V)]}}}function c(u,d){var f=r?e:De-e,h=0;return u<-f?h|=1:u>f&&(h|=2),d<-f?h|=4:d>f&&(h|=8),h}return T1(s,a,o,r?[0,-e]:[-De,e-De])}function UA(e,t,n,r,i,o){var s=e[0],a=e[1],l=t[0],c=t[1],u=0,d=1,f=l-s,h=c-a,g;if(g=n-s,!(!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-s,!(!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=o-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]=s+u*f,e[1]=a+u*h),d<1&&(t[0]=s+d*f,t[1]=a+d*h),!0}}}}}var qi=1e9,$s=-qi;function QA(e,t,n,r){function i(c,u){return e<=c&&c<=n&&t<=u&&u<=r}function o(c,u,d,f){var h=0,g=0;if(c==null||(h=s(c,d))!==(g=s(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 s(c,u){return je(c[0]-e)<Se?u>0?0:3:je(c[0]-n)<Se?u>0?2:1:je(c[1]-t)<Se?u>0?1:0:u>0?3:2}function a(c,u){return l(c.x,u.x)}function l(c,u){var d=s(c,1),f=s(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=F1(),f,h,g,p,m,v,C,y,I,w,R,A={point:S,lineStart:T,lineEnd:$,polygonStart:E,polygonEnd:P};function S(k,O){i(k,O)&&u.point(k,O)}function _(){for(var k=0,O=0,N=h.length;O<N;++O)for(var M=h[O],F=1,B=M.length,z=M[0],G,V,J=z[0],le=z[1];F<B;++F)G=J,V=le,z=M[F],J=z[0],le=z[1],V<=r?le>r&&(J-G)*(r-V)>(le-V)*(e-G)&&++k:le<=r&&(J-G)*(r-V)<(le-V)*(e-G)&&--k;return k}function E(){u=d,f=[],h=[],R=!0}function P(){var k=_(),O=R&&k,N=(f=A1(f)).length;(O||N)&&(c.polygonStart(),O&&(c.lineStart(),o(null,null,1,c),c.lineEnd()),N&&O1(f,a,k,o,c),c.polygonEnd()),u=c,f=h=g=null}function T(){A.point=D,h&&h.push(g=[]),w=!0,I=!1,C=y=NaN}function $(){f&&(D(p,m),v&&I&&d.rejoin(),f.push(d.result())),A.point=S,I&&u.lineEnd()}function D(k,O){var N=i(k,O);if(h&&g.push([k,O]),w)p=k,m=O,v=N,w=!1,N&&(u.lineStart(),u.point(k,O));else if(N&&I)u.point(k,O);else{var M=[C=Math.max($s,Math.min(qi,C)),y=Math.max($s,Math.min(qi,y))],F=[k=Math.max($s,Math.min(qi,k)),O=Math.max($s,Math.min(qi,O))];UA(M,F,e,t,n,r)?(I||(u.lineStart(),u.point(M[0],M[1])),u.point(F[0],F[1]),N||u.lineEnd(),R=!1):N&&(u.lineStart(),u.point(k,O),R=!1)}C=k,y=O,I=N}return A}}var _u,Eu,ca,ua,wi={sphere:mt,point:mt,lineStart:KA,lineEnd:mt,polygonStart:mt,polygonEnd:mt};function KA(){wi.point=e8,wi.lineEnd=qA}function qA(){wi.point=wi.lineEnd=mt}function e8(e,t){e*=Qe,t*=Qe,Eu=e,ca=ke(t),ua=Fe(t),wi.point=t8}function t8(e,t){e*=Qe,t*=Qe;var n=ke(t),r=Fe(t),i=je(e-Eu),o=Fe(i),s=ke(i),a=r*s,l=ua*n-ca*r*o,c=ca*n+ua*r*o;_u.add(En(Tt(a*a+l*l),c)),Eu=e,ca=n,ua=r}function n8(e){return _u=new dr,_r(e,wi),+_u}var Mu=[null,null],r8={type:"LineString",coordinates:Mu};function Au(e,t){return Mu[0]=e,Mu[1]=t,n8(r8)}var dp={Feature:function(e,t){return Xa(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)if(Xa(n[r].geometry,t))return!0;return!1}},fp={Sphere:function(){return!0},Point:function(e,t){return hp(e.coordinates,t)},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)if(hp(n[r],t))return!0;return!1},LineString:function(e,t){return gp(e.coordinates,t)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)if(gp(n[r],t))return!0;return!1},Polygon:function(e,t){return pp(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)if(pp(n[r],t))return!0;return!1},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)if(Xa(n[r],t))return!0;return!1}};function Xa(e,t){return e&&fp.hasOwnProperty(e.type)?fp[e.type](e,t):!1}function hp(e,t){return Au(e,t)===0}function gp(e,t){for(var n,r,i,o=0,s=e.length;o<s;o++){if(r=Au(e[o],t),r===0||o>0&&(i=Au(e[o],e[o-1]),i>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))<Hd*i))return!0;n=r}return!1}function pp(e,t){return!!N1(e.map(i8),D1(t))}function i8(e){return e=e.map(D1),e.pop(),e}function D1(e){return[e[0]*Qe,e[1]*Qe]}function o8(e,t){return(e&&dp.hasOwnProperty(e.type)?dp[e.type]:Xa)(e,t)}function mp(e,t,n){var r=ii(e,t-Se,n).concat(t);return function(i){return r.map(function(o){return[i,o]})}}function bp(e,t,n){var r=ii(e,t-Se,n).concat(t);return function(i){return r.map(function(o){return[o,i]})}}function L1(){var e,t,n,r,i,o,s,a,l=10,c=l,u=90,d=360,f,h,g,p,m=2.5;function v(){return{type:"MultiLineString",coordinates:C()}}function C(){return ii(Ds(r/u)*u,n,u).map(g).concat(ii(Ds(a/d)*d,s,d).map(p)).concat(ii(Ds(t/l)*l,e,l).filter(function(y){return je(y%u)>Se}).map(f)).concat(ii(Ds(o/c)*c,i,c).filter(function(y){return je(y%d)>Se}).map(h))}return v.lines=function(){return C().map(function(y){return{type:"LineString",coordinates:y}})},v.outline=function(){return{type:"Polygon",coordinates:[g(r).concat(p(s).slice(1),g(n).reverse().slice(1),p(a).reverse().slice(1))]}},v.extent=function(y){return arguments.length?v.extentMajor(y).extentMinor(y):v.extentMinor()},v.extentMajor=function(y){return arguments.length?(r=+y[0][0],n=+y[1][0],a=+y[0][1],s=+y[1][1],r>n&&(y=r,r=n,n=y),a>s&&(y=a,a=s,s=y),v.precision(m)):[[r,a],[n,s]]},v.extentMinor=function(y){return arguments.length?(t=+y[0][0],e=+y[1][0],o=+y[0][1],i=+y[1][1],t>e&&(y=t,t=e,e=y),o>i&&(y=o,o=i,i=y),v.precision(m)):[[t,o],[e,i]]},v.step=function(y){return arguments.length?v.stepMajor(y).stepMinor(y):v.stepMinor()},v.stepMajor=function(y){return arguments.length?(u=+y[0],d=+y[1],v):[u,d]},v.stepMinor=function(y){return arguments.length?(l=+y[0],c=+y[1],v):[l,c]},v.precision=function(y){return arguments.length?(m=+y,f=mp(o,i,90),h=bp(t,e,m),g=mp(a,s,90),p=bp(r,n,m),v):m},v.extentMajor([[-180,-90+Se],[180,90-Se]]).extentMinor([[-180,-80-Se],[180,80+Se]])}function s8(){return L1()()}const Ru=e=>e;var Ec=new dr,ku=new dr,j1,B1,Pu,Fu,Dn={point:mt,lineStart:mt,lineEnd:mt,polygonStart:function(){Dn.lineStart=a8,Dn.lineEnd=c8},polygonEnd:function(){Dn.lineStart=Dn.lineEnd=Dn.point=mt,Ec.add(je(ku)),ku=new dr},result:function(){var e=Ec/2;return Ec=new dr,e}};function a8(){Dn.point=l8}function l8(e,t){Dn.point=$1,j1=Pu=e,B1=Fu=t}function $1(e,t){ku.add(Fu*e-Pu*t),Pu=e,Fu=t}function c8(){$1(j1,B1)}var Si=1/0,Ya=Si,jo=-Si,Za=jo,Ja={point:u8,lineStart:mt,lineEnd:mt,polygonStart:mt,polygonEnd:mt,result:function(){var e=[[Si,Ya],[jo,Za]];return jo=Za=-(Ya=Si=1/0),e}};function u8(e,t){e<Si&&(Si=e),e>jo&&(jo=e),t<Ya&&(Ya=t),t>Za&&(Za=t)}var Ou=0,Nu=0,eo=0,Ua=0,Qa=0,oi=0,Tu=0,Du=0,to=0,V1,G1,bn,vn,Qt={point:Xr,lineStart:vp,lineEnd:xp,polygonStart:function(){Qt.lineStart=h8,Qt.lineEnd=g8},polygonEnd:function(){Qt.point=Xr,Qt.lineStart=vp,Qt.lineEnd=xp},result:function(){var e=to?[Tu/to,Du/to]:oi?[Ua/oi,Qa/oi]:eo?[Ou/eo,Nu/eo]:[NaN,NaN];return Ou=Nu=eo=Ua=Qa=oi=Tu=Du=to=0,e}};function Xr(e,t){Ou+=e,Nu+=t,++eo}function vp(){Qt.point=d8}function d8(e,t){Qt.point=f8,Xr(bn=e,vn=t)}function f8(e,t){var n=e-bn,r=t-vn,i=Tt(n*n+r*r);Ua+=i*(bn+e)/2,Qa+=i*(vn+t)/2,oi+=i,Xr(bn=e,vn=t)}function xp(){Qt.point=Xr}function h8(){Qt.point=p8}function g8(){z1(V1,G1)}function p8(e,t){Qt.point=z1,Xr(V1=bn=e,G1=vn=t)}function z1(e,t){var n=e-bn,r=t-vn,i=Tt(n*n+r*r);Ua+=i*(bn+e)/2,Qa+=i*(vn+t)/2,oi+=i,i=vn*e-bn*t,Tu+=i*(bn+e),Du+=i*(vn+t),to+=i*3,Xr(bn=e,vn=t)}function H1(e){this._context=e}H1.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,Xt);break}}},result:mt};var Lu=new dr,Mc,W1,X1,no,ro,Bo={point:mt,lineStart:function(){Bo.point=m8},lineEnd:function(){Mc&&Y1(W1,X1),Bo.point=mt},polygonStart:function(){Mc=!0},polygonEnd:function(){Mc=null},result:function(){var e=+Lu;return Lu=new dr,e}};function m8(e,t){Bo.point=Y1,W1=no=e,X1=ro=t}function Y1(e,t){no-=e,ro-=t,Lu.add(Tt(no*no+ro*ro)),no=e,ro=t}let yp,Ka,Cp,wp;class Sp{constructor(t){this._append=t==null?Z1:b8(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!==Cp||this._append!==Ka){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`,Cp=r,Ka=this._append,wp=this._,this._=i}this._+=wp;break}}}result(){const t=this._;return this._="",t.length?t:null}}function Z1(e){let t=1;this._+=e[0];for(const n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function b8(e){const t=Math.floor(e);if(!(t>=0))throw new RangeError(`invalid digits: ${e}`);if(t>15)return Z1;if(t!==yp){const n=10**t;yp=t,Ka=function(i){let o=1;this._+=i[0];for(const s=i.length;o<s;++o)this._+=Math.round(arguments[o]*n)/n+i[o]}}return Ka}function Ip(e,t){let n=3,r=4.5,i,o;function s(a){return a&&(typeof r=="function"&&o.pointRadius(+r.apply(this,arguments)),_r(a,i(o))),o.result()}return s.area=function(a){return _r(a,i(Dn)),Dn.result()},s.measure=function(a){return _r(a,i(Bo)),Bo.result()},s.bounds=function(a){return _r(a,i(Ja)),Ja.result()},s.centroid=function(a){return _r(a,i(Qt)),Qt.result()},s.projection=function(a){return arguments.length?(i=a==null?(e=null,Ru):(e=a).stream,s):e},s.context=function(a){return arguments.length?(o=a==null?(t=null,new Sp(n)):new H1(t=a),typeof r!="function"&&o.pointRadius(r),s):t},s.pointRadius=function(a){return arguments.length?(r=typeof a=="function"?a:(o.pointRadius(+a),+a),s):r},s.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&&(o=new Sp(n)),s},s.projection(e).digits(n).context(t)}function Xd(e){return function(t){var n=new ju;for(var r in e)n[r]=e[r];return n.stream=t,n}}function ju(){}ju.prototype={constructor:ju,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 Yd(e,t,n){var r=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),r!=null&&e.clipExtent(null),_r(n,e.stream(Ja)),t(Ja.result()),r!=null&&e.clipExtent(r),e}function Zd(e,t,n){return Yd(e,function(r){var i=t[1][0]-t[0][0],o=t[1][1]-t[0][1],s=Math.min(i/(r[1][0]-r[0][0]),o/(r[1][1]-r[0][1])),a=+t[0][0]+(i-s*(r[1][0]+r[0][0]))/2,l=+t[0][1]+(o-s*(r[1][1]+r[0][1]))/2;e.scale(150*s).translate([a,l])},n)}function J1(e,t,n){return Zd(e,[[0,0],t],n)}function U1(e,t,n){return Yd(e,function(r){var i=+t,o=i/(r[1][0]-r[0][0]),s=(i-o*(r[1][0]+r[0][0]))/2,a=-o*r[0][1];e.scale(150*o).translate([s,a])},n)}function Q1(e,t,n){return Yd(e,function(r){var i=+t,o=i/(r[1][1]-r[0][1]),s=-o*r[0][0],a=(i-o*(r[1][1]+r[0][1]))/2;e.scale(150*o).translate([s,a])},n)}var _p=16,v8=Fe(30*Qe);function Ep(e,t){return+t?y8(e,t):x8(e)}function x8(e){return Xd({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}})}function y8(e,t){function n(r,i,o,s,a,l,c,u,d,f,h,g,p,m){var v=c-r,C=u-i,y=v*v+C*C;if(y>4*t&&p--){var I=s+f,w=a+h,R=l+g,A=Tt(I*I+w*w+R*R),S=en(R/=A),_=je(je(R)-1)<Se||je(o-d)<Se?(o+d)/2:En(w,I),E=e(_,S),P=E[0],T=E[1],$=P-r,D=T-i,k=C*$-v*D;(k*k/y>t||je((v*$+C*D)/y-.5)>.3||s*f+a*h+l*g<v8)&&(n(r,i,o,s,a,l,P,T,_,I/=A,w/=A,R,p,m),m.point(P,T),n(P,T,_,I,w,R,c,u,d,f,h,g,p,m))}}return function(r){var i,o,s,a,l,c,u,d,f,h,g,p,m={point:v,lineStart:C,lineEnd:I,polygonStart:function(){r.polygonStart(),m.lineStart=w},polygonEnd:function(){r.polygonEnd(),m.lineStart=C}};function v(S,_){S=e(S,_),r.point(S[0],S[1])}function C(){d=NaN,m.point=y,r.lineStart()}function y(S,_){var E=Ci([S,_]),P=e(S,_);n(d,f,u,h,g,p,d=P[0],f=P[1],u=S,h=E[0],g=E[1],p=E[2],_p,r),r.point(d,f)}function I(){m.point=v,r.lineEnd()}function w(){C(),m.point=R,m.lineEnd=A}function R(S,_){y(i=S,_),o=d,s=f,a=h,l=g,c=p,m.point=y}function A(){n(d,f,u,h,g,p,o,s,i,a,l,c,_p,r),m.lineEnd=I,I()}return m}}var C8=Xd({point:function(e,t){this.stream.point(e*Qe,t*Qe)}});function w8(e){return Xd({point:function(t,n){var r=e(t,n);return this.stream.point(r[0],r[1])}})}function S8(e,t,n,r,i){function o(s,a){return s*=r,a*=i,[t+e*s,n-e*a]}return o.invert=function(s,a){return[(s-t)/e*r,(n-a)/e*i]},o}function Mp(e,t,n,r,i,o){if(!o)return S8(e,t,n,r,i);var s=Fe(o),a=ke(o),l=s*e,c=a*e,u=s/e,d=a/e,f=(a*n-s*t)/e,h=(a*t+s*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 Qn(e){return K1(function(){return e})()}function K1(e){var t,n=150,r=480,i=250,o=0,s=0,a=0,l=0,c=0,u,d=0,f=1,h=1,g=null,p=up,m=null,v,C,y,I=Ru,w=.5,R,A,S,_,E;function P(k){return S(k[0]*Qe,k[1]*Qe)}function T(k){return k=S.invert(k[0],k[1]),k&&[k[0]*Ot,k[1]*Ot]}P.stream=function(k){return _&&E===k?_:_=C8(w8(u)(p(R(I(E=k)))))},P.preclip=function(k){return arguments.length?(p=k,g=void 0,D()):p},P.postclip=function(k){return arguments.length?(I=k,m=v=C=y=null,D()):I},P.clipAngle=function(k){return arguments.length?(p=+k?JA(g=k*Qe):(g=null,up),D()):g*Ot},P.clipExtent=function(k){return arguments.length?(I=k==null?(m=v=C=y=null,Ru):QA(m=+k[0][0],v=+k[0][1],C=+k[1][0],y=+k[1][1]),D()):m==null?null:[[m,v],[C,y]]},P.scale=function(k){return arguments.length?(n=+k,$()):n},P.translate=function(k){return arguments.length?(r=+k[0],i=+k[1],$()):[r,i]},P.center=function(k){return arguments.length?(o=k[0]%360*Qe,s=k[1]%360*Qe,$()):[o*Ot,s*Ot]},P.rotate=function(k){return arguments.length?(a=k[0]%360*Qe,l=k[1]%360*Qe,c=k.length>2?k[2]%360*Qe:0,$()):[a*Ot,l*Ot,c*Ot]},P.angle=function(k){return arguments.length?(d=k%360*Qe,$()):d*Ot},P.reflectX=function(k){return arguments.length?(f=k?-1:1,$()):f<0},P.reflectY=function(k){return arguments.length?(h=k?-1:1,$()):h<0},P.precision=function(k){return arguments.length?(R=Ep(A,w=k*k),D()):Tt(w)},P.fitExtent=function(k,O){return Zd(P,k,O)},P.fitSize=function(k,O){return J1(P,k,O)},P.fitWidth=function(k,O){return U1(P,k,O)},P.fitHeight=function(k,O){return Q1(P,k,O)};function $(){var k=Mp(n,0,0,f,h,d).apply(null,t(o,s)),O=Mp(n,r-k[0],i-k[1],f,h,d);return u=P1(a,l,c),A=Su(t,O),S=Su(u,A),R=Ep(A,w),D()}function D(){return _=E=null,P}return function(){return t=e.apply(this,arguments),P.invert=t.invert&&T,$()}}function Jd(e){var t=0,n=De/3,r=K1(e),i=r(t,n);return i.parallels=function(o){return arguments.length?r(t=o[0]*Qe,n=o[1]*Qe):[t*Ot,n*Ot]},i}function I8(e){var t=Fe(e);function n(r,i){return[r*t,ke(i)/t]}return n.invert=function(r,i){return[r/t,en(i*t)]},n}function _8(e,t){var n=ke(e),r=(n+ke(t))/2;if(je(r)<Se)return I8(e);var i=1+n*(2*r-n),o=Tt(i)/r;function s(a,l){var c=Tt(i-2*r*ke(l))/r;return[c*ke(a*=r),o-c*Fe(a)]}return s.invert=function(a,l){var c=o-l,u=En(a,je(c))*Kt(c);return c*r<0&&(u-=De*Kt(a)*Kt(c)),[u/r,en((i-(a*a+c*c)*r*r)/(2*r))]},s}function qa(){return Jd(_8).scale(155.424).center([0,33.6442])}function q1(){return qa().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function E8(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 M8(){var e,t,n=q1(),r,i=qa().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o,s=qa().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||(o.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?s:n).invert(f)},u.stream=function(f){return e&&t===f?e:e=E8([n.stream(t=f),i.stream(f),s.stream(f)])},u.precision=function(f){return arguments.length?(n.precision(f),i.precision(f),s.precision(f),d()):n.precision()},u.scale=function(f){return arguments.length?(n.scale(f),i.scale(f*.35),s.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),o=i.translate([g-.307*h,p+.201*h]).clipExtent([[g-.425*h+Se,p+.12*h+Se],[g-.214*h-Se,p+.234*h-Se]]).stream(c),a=s.translate([g-.205*h,p+.212*h]).clipExtent([[g-.214*h+Se,p+.166*h+Se],[g-.115*h-Se,p+.234*h-Se]]).stream(c),d()},u.fitExtent=function(f,h){return Zd(u,f,h)},u.fitSize=function(f,h){return J1(u,f,h)},u.fitWidth=function(f,h){return U1(u,f,h)},u.fitHeight=function(f,h){return Q1(u,f,h)};function d(){return e=t=null,u}return u.scale(1070)}function ev(e){return function(t,n){var r=Fe(t),i=Fe(n),o=e(r*i);return o===1/0?[2,0]:[o*i*ke(t),o*ke(n)]}}function Ko(e){return function(t,n){var r=Tt(t*t+n*n),i=e(r),o=ke(i),s=Fe(i);return[En(t*o,r*s),en(r&&n*o/r)]}}var tv=ev(function(e){return Tt(2/(1+e))});tv.invert=Ko(function(e){return 2*en(e/2)});function A8(){return Qn(tv).scale(124.75).clipAngle(180-.001)}var nv=ev(function(e){return(e=k1(e))&&e/ke(e)});nv.invert=Ko(function(e){return e});function R8(){return Qn(nv).scale(79.4188).clipAngle(180-.001)}function El(e,t){return[e,za(Wd((lt+t)/2))]}El.invert=function(e,t){return[e,2*Pi(R1(t))-lt]};function k8(){return rv(El).scale(961/Xt)}function rv(e){var t=Qn(e),n=t.center,r=t.scale,i=t.translate,o=t.clipExtent,s=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?s=a=l=c=null:(s=+d[0][0],a=+d[0][1],l=+d[1][0],c=+d[1][1]),u()):s==null?null:[[s,a],[l,c]]};function u(){var d=De*r(),f=t(GA(t.rotate()).invert([0,0]));return o(s==null?[[f[0]-d,f[1]-d],[f[0]+d,f[1]+d]]:e===El?[[Math.max(f[0]-d,s),a],[Math.min(f[0]+d,l),c]]:[[s,Math.max(f[1]-d,a)],[l,Math.min(f[1]+d,c)]])}return u()}function Vs(e){return Wd((lt+e)/2)}function P8(e,t){var n=Fe(e),r=e===t?ke(e):za(n/Fe(t))/za(Vs(t)/Vs(e)),i=n*Sc(Vs(e),r)/r;if(!r)return El;function o(s,a){i>0?a<-lt+Se&&(a=-lt+Se):a>lt-Se&&(a=lt-Se);var l=i/Sc(Vs(a),r);return[l*ke(r*s),i-l*Fe(r*s)]}return o.invert=function(s,a){var l=i-a,c=Kt(r)*Tt(s*s+l*l),u=En(s,je(l))*Kt(l);return l*r<0&&(u-=De*Kt(s)*Kt(l)),[u/r,2*Pi(Sc(i/c,1/r))-lt]},o}function F8(){return Jd(P8).scale(109.5).parallels([30,30])}function el(e,t){return[e,t]}el.invert=el;function O8(){return Qn(el).scale(152.63)}function N8(e,t){var n=Fe(e),r=e===t?ke(e):(n-Fe(t))/(t-e),i=n/r+e;if(je(r)<Se)return el;function o(s,a){var l=i-a,c=r*s;return[l*ke(c),i-l*Fe(c)]}return o.invert=function(s,a){var l=i-a,c=En(s,je(l))*Kt(l);return l*r<0&&(c-=De*Kt(s)*Kt(l)),[c/r,i-Kt(r)*Tt(s*s+l*l)]},o}function T8(){return Jd(N8).scale(131.154).center([0,13.9389])}var mo=1.340264,bo=-.081106,vo=893e-6,xo=.003796,tl=Tt(3)/2,D8=12;function iv(e,t){var n=en(tl*ke(t)),r=n*n,i=r*r*r;return[e*Fe(n)/(tl*(mo+3*bo*r+i*(7*vo+9*xo*r))),n*(mo+bo*r+i*(vo+xo*r))]}iv.invert=function(e,t){for(var n=t,r=n*n,i=r*r*r,o=0,s,a,l;o<D8&&(a=n*(mo+bo*r+i*(vo+xo*r))-t,l=mo+3*bo*r+i*(7*vo+9*xo*r),n-=s=a/l,r=n*n,i=r*r*r,!(je(s)<Hd));++o);return[tl*e*(mo+3*bo*r+i*(7*vo+9*xo*r))/Fe(n),en(ke(n)/tl)]};function L8(){return Qn(iv).scale(177.158)}function ov(e,t){var n=Fe(t),r=Fe(e)*n;return[n*ke(e)/r,ke(t)/r]}ov.invert=Ko(Pi);function j8(){return Qn(ov).scale(144.049).clipAngle(60)}function sv(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)))]}sv.invert=function(e,t){var n=t,r=25,i;do{var o=n*n,s=o*o;n-=i=(n*(1.007226+o*(.015085+s*(-.044475+.028874*o-.005916*s)))-t)/(1.007226+o*(.015085*3+s*(-.044475*7+.028874*9*o-.005916*11*s)))}while(je(i)>Se&&--r>0);return[e/(.8707+(o=n*n)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),n]};function B8(){return Qn(sv).scale(175.295)}function av(e,t){return[Fe(t)*ke(e),ke(t)]}av.invert=Ko(en);function $8(){return Qn(av).scale(249.5).clipAngle(90+Se)}function lv(e,t){var n=Fe(t),r=1+Fe(e)*n;return[n*ke(e)/r,ke(t)/r]}lv.invert=Ko(function(e){return 2*Pi(e)});function V8(){return Qn(lv).scale(250).clipAngle(142)}function cv(e,t){return[za(Wd((lt+t)/2)),-e]}cv.invert=function(e,t){return[-t,2*Pi(R1(e))-lt]};function G8(){var e=rv(cv),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 We(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 Ml(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Ud(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Fi(){}var Yr=.7,Ii=1/Yr,fi="\\s*([+-]?\\d+)\\s*",$o="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Sn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",z8=/^#([0-9a-f]{3,8})$/,H8=new RegExp(`^rgb\\(${fi},${fi},${fi}\\)$`),W8=new RegExp(`^rgb\\(${Sn},${Sn},${Sn}\\)$`),X8=new RegExp(`^rgba\\(${fi},${fi},${fi},${$o}\\)$`),Y8=new RegExp(`^rgba\\(${Sn},${Sn},${Sn},${$o}\\)$`),Z8=new RegExp(`^hsl\\(${$o},${Sn},${Sn}\\)$`),J8=new RegExp(`^hsla\\(${$o},${Sn},${Sn},${$o}\\)$`),Ap={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};Ml(Fi,Al,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Rp,formatHex:Rp,formatHex8:U8,formatHsl:Q8,formatRgb:kp,toString:kp});function Rp(){return this.rgb().formatHex()}function U8(){return this.rgb().formatHex8()}function Q8(){return dv(this).formatHsl()}function kp(){return this.rgb().formatRgb()}function Al(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=z8.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Pp(t):n===3?new Ft(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Gs(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Gs(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=H8.exec(e))?new Ft(t[1],t[2],t[3],1):(t=W8.exec(e))?new Ft(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=X8.exec(e))?Gs(t[1],t[2],t[3],t[4]):(t=Y8.exec(e))?Gs(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Z8.exec(e))?Np(t[1],t[2]/100,t[3]/100,1):(t=J8.exec(e))?Np(t[1],t[2]/100,t[3]/100,t[4]):Ap.hasOwnProperty(e)?Pp(Ap[e]):e==="transparent"?new Ft(NaN,NaN,NaN,0):null}function Pp(e){return new Ft(e>>16&255,e>>8&255,e&255,1)}function Gs(e,t,n,r){return r<=0&&(e=t=n=NaN),new Ft(e,t,n,r)}function uv(e){return e instanceof Fi||(e=Al(e)),e?(e=e.rgb(),new Ft(e.r,e.g,e.b,e.opacity)):new Ft}function Vo(e,t,n,r){return arguments.length===1?uv(e):new Ft(e,t,n,r??1)}function Ft(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Ml(Ft,Vo,Ud(Fi,{brighter(e){return e=e==null?Ii:Math.pow(Ii,e),new Ft(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Yr:Math.pow(Yr,e),new Ft(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ft(Lr(this.r),Lr(this.g),Lr(this.b),nl(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:Fp,formatHex:Fp,formatHex8:K8,formatRgb:Op,toString:Op}));function Fp(){return`#${kr(this.r)}${kr(this.g)}${kr(this.b)}`}function K8(){return`#${kr(this.r)}${kr(this.g)}${kr(this.b)}${kr((isNaN(this.opacity)?1:this.opacity)*255)}`}function Op(){const e=nl(this.opacity);return`${e===1?"rgb(":"rgba("}${Lr(this.r)}, ${Lr(this.g)}, ${Lr(this.b)}${e===1?")":`, ${e})`}`}function nl(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Lr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function kr(e){return e=Lr(e),(e<16?"0":"")+e.toString(16)}function Np(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new ln(e,t,n,r)}function dv(e){if(e instanceof ln)return new ln(e.h,e.s,e.l,e.opacity);if(e instanceof Fi||(e=Al(e)),!e)return new ln;if(e instanceof ln)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),s=NaN,a=o-i,l=(o+i)/2;return a?(t===o?s=(n-r)/a+(n<r)*6:n===o?s=(r-t)/a+2:s=(t-n)/a+4,a/=l<.5?o+i:2-o-i,s*=60):a=l>0&&l<1?0:s,new ln(s,a,l,e.opacity)}function q8(e,t,n,r){return arguments.length===1?dv(e):new ln(e,t,n,r??1)}function ln(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Ml(ln,q8,Ud(Fi,{brighter(e){return e=e==null?Ii:Math.pow(Ii,e),new ln(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Yr:Math.pow(Yr,e),new ln(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 Ft(Ac(e>=240?e-240:e+120,i,r),Ac(e,i,r),Ac(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new ln(Tp(this.h),zs(this.s),zs(this.l),nl(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=nl(this.opacity);return`${e===1?"hsl(":"hsla("}${Tp(this.h)}, ${zs(this.s)*100}%, ${zs(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Tp(e){return e=(e||0)%360,e<0?e+360:e}function zs(e){return Math.max(0,Math.min(1,e||0))}function Ac(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 eR=Math.PI/180,tR=180/Math.PI;var fv=-.14861,Qd=1.78277,Kd=-.29227,Rl=-.90649,Go=1.97294,Dp=Go*Rl,Lp=Go*Qd,jp=Qd*Kd-Rl*fv;function nR(e){if(e instanceof jr)return new jr(e.h,e.s,e.l,e.opacity);e instanceof Ft||(e=uv(e));var t=e.r/255,n=e.g/255,r=e.b/255,i=(jp*r+Dp*t-Lp*n)/(jp+Dp-Lp),o=r-i,s=(Go*(n-i)-Kd*o)/Rl,a=Math.sqrt(s*s+o*o)/(Go*i*(1-i)),l=a?Math.atan2(s,o)*tR-120:NaN;return new jr(l<0?l+360:l,a,i,e.opacity)}function Mn(e,t,n,r){return arguments.length===1?nR(e):new jr(e,t,n,r??1)}function jr(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Ml(jr,Mn,Ud(Fi,{brighter(e){return e=e==null?Ii:Math.pow(Ii,e),new jr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Yr:Math.pow(Yr,e),new jr(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*eR,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),i=Math.sin(e);return new Ft(255*(t+n*(fv*r+Qd*i)),255*(t+n*(Kd*r+Rl*i)),255*(t+n*(Go*r)),this.opacity)}}));function rR(e,t,n,r,i){var o=e*e,s=o*e;return((1-3*e+3*o-s)*t+(4-6*o+3*s)*n+(1+3*e+3*o-3*s)*r+s*i)/6}function iR(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],o=e[r+1],s=r>0?e[r-1]:2*i-o,a=r<t-1?e[r+2]:2*o-i;return rR((n-r/t)*t,s,i,o,a)}}const qd=e=>()=>e;function hv(e,t){return function(n){return e+n*t}}function oR(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 sR(e,t){var n=t-e;return n?hv(e,n>180||n<-180?n-360*Math.round(n/360):n):qd(isNaN(e)?t:e)}function aR(e){return(e=+e)==1?hi:function(t,n){return n-t?oR(t,n,e):qd(isNaN(t)?n:t)}}function hi(e,t){var n=t-e;return n?hv(e,n):qd(isNaN(e)?t:e)}const lR=function e(t){var n=aR(t);function r(i,o){var s=n((i=Vo(i)).r,(o=Vo(o)).r),a=n(i.g,o.g),l=n(i.b,o.b),c=hi(i.opacity,o.opacity);return function(u){return i.r=s(u),i.g=a(u),i.b=l(u),i.opacity=c(u),i+""}}return r.gamma=e,r}(1);function cR(e){return function(t){var n=t.length,r=new Array(n),i=new Array(n),o=new Array(n),s,a;for(s=0;s<n;++s)a=Vo(t[s]),r[s]=a.r||0,i[s]=a.g||0,o[s]=a.b||0;return r=e(r),i=e(i),o=e(o),a.opacity=1,function(l){return a.r=r(l),a.g=i(l),a.b=o(l),a+""}}}var uR=cR(iR);function gv(e){return function t(n){n=+n;function r(i,o){var s=e((i=Mn(i)).h,(o=Mn(o)).h),a=hi(i.s,o.s),l=hi(i.l,o.l),c=hi(i.opacity,o.opacity);return function(u){return i.h=s(u),i.s=a(u),i.l=l(Math.pow(u,n)),i.opacity=c(u),i+""}}return r.gamma=t,r}(1)}gv(sR);var ef=gv(hi);const qe=e=>uR(e[e.length-1]);var dR=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(We);const fR=qe(dR);var hR=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(We);const gR=qe(hR);var pR=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(We);const mR=qe(pR);var bR=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(We);const vR=qe(bR);var xR=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(We);const yR=qe(xR);var CR=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(We);const wR=qe(CR);var SR=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(We);const IR=qe(SR);var _R=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(We);const ER=qe(_R);var MR=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(We);const AR=qe(MR);var RR=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(We);const kR=qe(RR);var PR=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(We);const FR=qe(PR);var OR=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(We);const NR=qe(OR);var TR=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(We);const DR=qe(TR);var LR=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(We);const jR=qe(LR);var BR=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(We);const $R=qe(BR);var VR=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(We);const GR=qe(VR);var zR=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(We);const HR=qe(zR);var WR=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(We);const XR=qe(WR);var YR=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(We);const ZR=qe(YR);var JR=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(We);const UR=qe(JR);var QR=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(We);const KR=qe(QR);var qR=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(We);const ek=qe(qR);var tk=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(We);const nk=qe(tk);var rk=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(We);const ik=qe(rk);var ok=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(We);const sk=qe(ok);var ak=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(We);const lk=qe(ak);var ck=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(We);const uk=qe(ck);function dk(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 fk=ef(Mn(300,.5,0),Mn(-240,.5,1));var hk=ef(Mn(-100,.75,.35),Mn(80,1.5,.8)),gk=ef(Mn(260,.75,.35),Mn(80,1.5,.8)),Hs=Mn();function pk(e){(e<0||e>1)&&(e-=Math.floor(e));var t=Math.abs(e-.5);return Hs.h=360*e-100,Hs.s=1.5-1.5*t,Hs.l=.8-.9*t,Hs+""}var Ws=Vo(),mk=Math.PI/3,bk=Math.PI*2/3;function vk(e){var t;return e=(.5-e)*Math.PI,Ws.r=255*(t=Math.sin(e))*t,Ws.g=255*(t=Math.sin(e+mk))*t,Ws.b=255*(t=Math.sin(e+bk))*t,Ws+""}function xk(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 kl(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}const yk=kl(We("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var Ck=kl(We("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),wk=kl(We("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),Sk=kl(We("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));const yo={geoAzimuthalEqualArea:A8,geoAzimuthalEquidistant:R8,geoGnomonic:j8,geoOrthographic:$8,geoStereographic:V8,geoEqualEarth:L8,geoAlbers:q1,geoAlbersUsa:M8,geoConicConformal:F8,geoConicEqualArea:qa,geoConicEquidistant:T8,geoEquirectangular:O8,geoMercator:k8,geoTransverseMercator:G8,geoNaturalEarth1:B8};Object.keys(yo).forEach(e=>{yo[`${e.charAt(3).toLowerCase()}${e.slice(4)}`]=yo[e]});class Qr extends pr{constructor(t){super(t),this.outlineBounds=null,this.oldChartBounds=null,this.geoPath=Ip()}init(t){t.position="chartArea",super.init(t),typeof t.projection=="function"?this.projection=t.projection:this.projection=(yo[t.projection]||yo.albersUsa)(),this.geoPath.projection(this.projection),this.outlineBounds=null,this.oldChartBounds=null}computeBounds(t){const n=Ip(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]),o=this.projection.translate();this.outlineBounds={width:i,height:r,aspectRatio:i/r,refScale:this.projection.scale(),refX:o[0],refY:o[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,o=typeof r=="number"?r:r.left,s=typeof r=="number"?r:r.bottom,a=typeof r=="number"?r:r.right,l=t.right-t.left-o-a,c=t.bottom-t.top-i-s,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+o,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}}Qr.id="projection";Qr.defaults={projection:"albersUsa",projectionScale:1,projectionOffset:[0,0],padding:0};Qr.descriptors={_scriptable:e=>e!=="projection",_indexable:e=>e!=="projectionOffset"};const Pl={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 Ik(e){const{indicatorWidth:t,align:n,margin:r}=e,i=(typeof r=="number"?r:r.left)+(n==="right"?t:0),o=(typeof r=="number"?r:r.top)+(n==="bottom"?t:0),s=(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:o,right:s,bottom:a}}function _k(e,t,n,r,i){const{indicatorWidth:o,align:s,position:a}=t,l=s==="top"||s==="bottom",c=(s==="left"?i.w:n)+(l?o:0),u=(s==="top"?i.h:r)+(l?0:o),d=Ik(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 si extends Xn{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),o=Math.min(t,this.right==null?Number.POSITIVE_INFINITY:this.right),s=this.options.legend,a=this.isHorizontal(),l=(h,g)=>h<1?g*h:h,c=Math.min(o,l(a?s.length:s.width,o))-(a?0:s.indicatorWidth),u=Math.min(i,l(a?s.width:s.length,i))-(a?s.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=_k(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:o}=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,-o);break;default:r.translate(-o,0);break}this._drawIndicator(),r.restore()}_drawIndicator(){}}class pv extends Wr{constructor(){super(...arguments),this.legendSize={w:0,h:0}}init(t){si.prototype.init.call(this,t)}parse(t,n){return si.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 si.prototype.update.call(this,t,n,r)}_computeLabelArea(){}draw(t){return si.prototype.draw.call(this,t)}_drawIndicator(){}}const Ln={interpolateBlues:ek,interpolateBrBG:fR,interpolateBuGn:kR,interpolateBuPu:FR,interpolateCividis:dk,interpolateCool:gk,interpolateCubehelixDefault:fk,interpolateGnBu:NR,interpolateGreens:nk,interpolateGreys:ik,interpolateInferno:wk,interpolateMagma:Ck,interpolateOrRd:DR,interpolateOranges:uk,interpolatePRGn:gR,interpolatePiYG:mR,interpolatePlasma:Sk,interpolatePuBu:$R,interpolatePuBuGn:jR,interpolatePuOr:vR,interpolatePuRd:GR,interpolatePurples:sk,interpolateRainbow:pk,interpolateRdBu:yR,interpolateRdGy:wR,interpolateRdPu:HR,interpolateRdYlBu:IR,interpolateRdYlGn:ER,interpolateReds:lk,interpolateSinebow:vk,interpolateSpectral:AR,interpolateTurbo:xk,interpolateViridis:yk,interpolateWarm:hk,interpolateYlGn:ZR,interpolateYlGnBu:XR,interpolateYlOrBr:UR,interpolateYlOrRd:KR};Object.keys(Ln).forEach(e=>{Ln[`${e.charAt(11).toLowerCase()}${e.slice(12)}`]=Ln[e],Ln[e.slice(11)]=Ln[e]});function mv(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 bv={interpolate:"blues",missing:"transparent",quantize:0};class fr extends si{get interpolate(){const t=this.options;return t?typeof t.interpolate=="function"?t.interpolate:Ln[t.interpolate]||Ln.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=mv(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,o=n?s=>r-i-s:s=>s;for(let s=0;s<r;s+=i){const a=(s+i/2)/r;this.ctx.fillStyle=this.getColor(a),this.ctx.fillRect(o(s),0,i,t)}}else{const i=n?o=>r-1-o:o=>o;for(let o=0;o<r;o+=1)this.ctx.fillStyle=this.getColor((o+.5)/r),this.ctx.fillRect(i(o),0,1,t)}}else{const r=this.height;if(this.options.quantize>0){const i=r/this.options.quantize,o=n?s=>r-i-s:s=>s;for(let s=0;s<r;s+=i){const a=(s+i/2)/r;this.ctx.fillStyle=this.getColor(a),this.ctx.fillRect(0,o(s),t,i)}}else{const i=n?o=>r-1-o:o=>o;for(let o=0;o<r;o+=1)this.ctx.fillStyle=this.getColor((o+.5)/r),this.ctx.fillRect(0,i(o),t,1)}}}}fr.id="color";fr.defaults=vt({},[Xn.defaults,Pl,bv]);fr.descriptors={_scriptable:e=>e!=="interpolate",_indexable:!1};class tf extends pv{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=Ln[t.interpolate]||Ln.blues}getColorForValue(t){return fr.prototype.getColorForValue.call(this,t)}getColor(t){let n=t;return this.options.quantize>0&&(n=mv(n,this.options.quantize)),this.interpolate(n)}_drawIndicator(){return fr.prototype._drawIndicator.call(this)}}tf.id="colorLogarithmic";tf.defaults=vt({},[Wr.defaults,Pl,bv]);tf.descriptors={_scriptable:e=>e!=="interpolate",_indexable:!1};const vv={missing:1,mode:"area",range:[2,20],legend:{align:"bottom",length:90,width:70,indicatorWidth:42}};class Zr extends si{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 o=r*r*Math.PI,s=n*n*Math.PI,a=o-s,l=t*a+s;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,o=this.getLabelItems(),s=o?o.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=s[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};La(t,h,d,f)})}}Zr.id="size";Zr.defaults=vt({},[Xn.defaults,Pl,vv]);Zr.descriptors={_scriptable:!0,_indexable:e=>e!=="range"};class xv extends pv{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 Zr.prototype.getSizeImpl.call(this,t)}_drawIndicator(){Zr.prototype._drawIndicator.call(this)}}xv.id="sizeLogarithmic";xv.defaults=vt({},[Wr.defaults,Pl,vv]);function Ek(e,t){return[[e[0][0]-t,e[0][1]-t],[e[1][0]+t,e[1][1]+t]]}class Yn extends kn{constructor(){super(...arguments),this.cache=void 0}updateExtras({scale:t,feature:n,center:r,pixelRatio:i,mode:o}){var s,a;const l=o==="resize"||o==="reset"||this.projectionScale!==t||this.feature!==n||((s=this.center)===null||s===void 0?void 0:s.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),o=this.projectionScale.geoPath.projection();if(i&&!Number.isNaN(t)&&!Number.isNaN(n)&&typeof o.invert=="function"){const s=o.invert([t,n]);return s!=null&&o8(this.feature,s)}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=Ek(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),o=Math.floor(n.y),s=Math.ceil(n.x+n.width),a=Math.ceil(n.y+n.height),l=this.pixelRatio||1,c=Math.ceil(Math.max(s-i,1)*l),u=Math.ceil(Math.max(a-o,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,-o),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),o=Math.floor(r.y),s=Math.ceil(r.x+r.width),a=Math.ceil(r.y+r.height),l=s-i,c=a-o;l>0&&c>0&&t.drawImage(this.cache.canvas,i,o,s-i,a-o)}else Number.isFinite(r.x)&&(t.save(),this._drawImpl(t),t.restore())}}Yn.id="geoFeature";Yn.defaults={...wn.defaults,outlineBackgroundColor:null,outlineBorderWidth:0,graticuleBorderColor:"#CCCCCC",graticuleBorderWidth:0};Yn.defaultRoutes={outlineBorderColor:"borderColor",...wn.defaultRoutes||{}};const yv={showOutline:!1,showGraticule:!1,clipMap:!0},Cv={scales:{projection:{axis:"x",type:Qr.id,position:"chartArea",display:!1}}};function Bp(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 wv extends qt{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 Me(this.getGeoDataset().showOutline,this.getGeoOptions().showOutline)}clipMap(){return Me(this.getGeoDataset().clipMap,this.getGeoOptions().clipMap)}getGraticule(){return Me(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 o=n.dataset;if(i&&delete o.cache,o.projectionScale=r,o.pixelRatio=this.chart.currentDevicePixelRatio,t!=="resize"){const s=Bp(this.resolveDatasetElementOptions(t)),a={feature:this.resolveOutline(),options:s};this.updateElement(o,void 0,a,t),this.getGraticule()&&(n.graticule=s)}}else this.getGraticule()&&t!=="resize"&&(n.graticule=Bp(this.resolveDatasetElementOptions(t)));i&&n.data.forEach(o=>delete o.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,o=this.getProjectionScale().geoPath.context(r);if(r.save(),r.beginPath(),typeof t=="boolean")t&&o(s8());else{const s=L1();t.stepMajor&&s.stepMajor(t.stepMajor),t.stepMinor&&s.stepMinor(t.stepMinor),o(s())}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,Fr(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||Fr(t.ctx,t.chartArea):r&&(r=!1,Or(t.ctx)),this.showGraticule(),n===!0||n==="items"?r||Fr(t.ctx,t.chartArea):r&&(r=!1,Or(t.ctx)),this.getMeta().data.forEach(i=>i.draw.call(i,t.ctx,t.chartArea)),r&&(r=!1,Or(t.ctx))}}function Sv(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 o=t;return o.type=e,o}class Oi extends wv{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(),o=this._cachedMeta;for(let s=t;s<t+n;s+=1)o._parsed[s]={[r.axis]:r.parse(i[s],s)}}updateElements(t,n,r,i){const o=this.resolveDataElementOptions(n,i),s=this.getSharedOptions(o),a=this.includeOptions(i,s),l=this.getProjectionScale();this.updateSharedOptions(s,i,o);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=s||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])}}Oi.id="choropleth";Oi.defaults=vt({},[yv,{datasetElementType:Yn.id,dataElementType:Yn.id}]);Oi.overrides=vt({},[Cv,{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:fr.id,axis:"x"}},elements:{geoFeature:{backgroundColor(e){return e.dataIndex==null?null:e.chart.getDatasetMeta(e.datasetIndex).controller.indexToColor(e.dataIndex)}}}}]);class Mk extends xt{constructor(t,n){super(t,Sv("choropleth",n,Oi,Yn,[fr,Qr]))}}Mk.id=Oi.id;class qo extends wv{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,o=this._cachedMeta;for(let s=t;s<t+n;s+=1){const a=i[s];o._parsed[s]={x:a.longitude==null?a.x:a.longitude,y:a.latitude==null?a.y:a.latitude,[r.axis]:r.parse(a,s)}}}updateElements(t,n,r,i){const o=i==="reset",s=this.resolveDataElementOptions(n,i),a=this.getSharedOptions(s),l=this.includeOptions(i,a),c=this.getProjectionScale();this.getMeta().rScale._model=s,this.updateSharedOptions(a,i,s);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),o&&(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])}}qo.id="bubbleMap";qo.defaults=vt({},[yv,{dataElementType:Dr.id,datasetElementType:Yn.id,showOutline:!0,clipMap:"outline+graticule"}]);qo.overrides=vt({},[Cv,{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:Zr.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 Ak extends xt{constructor(t,n){super(t,Sv("bubbleMap",n,qo,Yn,[Zr,Qr]))}}Ak.id=qo.id;xt.register(Oi,Yn,Qr,fr,Ur,Jr,yi,Xn,wn);xt.defaults.font.family="'Rubik', 'Inter', sans-serif";const Rk=({data:e=new Map,defaultCountry:t="India",geoData:n,dataLabel:r="Data Points Found"})=>{const[i,o]=x.useState(null),[s,a]=x.useState(0),l=n?n.features.filter(d=>d.properties.name!=="Antarctica"):[];if(x.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 b.jsx("div",{className:"geochart-container flex flex-col items-center justify-center p-8",style:{minHeight:"400px"},children:b.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}: ${s}`}},datalabels:{display:!1}},onHover:(d,f)=>{var h,g;if(f.length>0){const p=f[0].index;o(((g=(h=l[p])==null?void 0:h.properties)==null?void 0:g.name)||null)}}};return b.jsx("div",{className:"geochart-container flex flex-col items-center",onMouseLeave:()=>o(null),style:{minHeight:"400px"},children:b.jsx(Vd,{type:"choropleth",data:c,options:u,className:"w-full h-full"})})};function Iv(e){return e?e.replace(/\b\w/g,t=>t.toUpperCase()):""}function _v(e,t){if(!e)return{formatted:"",readableDate:""};let n;if(typeof e=="number"||/^\d+$/.test(String(e)))n=new Date(Number(e)*1e3);else{let l=String(e).trim();l=l.replace(/^[A-Za-z]{3},\s*/,"");const c=l.match(/^(\d{1,2})(st|nd|rd|th)\s([A-Za-z]+),\s(\d{4})/);if(c){const[,u,,d,f]=c;l=`${u} ${d} ${f}`}if(!l.endsWith("Z")&&!(l.split(" ").length>2)&&(l+="Z"),n=new Date(l),isNaN(n.getTime())){const u=l.replace(/\s([A-Za-z]{3})$/,"");n=new Date(u)}if(isNaN(n.getTime()))return{formatted:"",readableDate:""}}const r=Intl.DateTimeFormat().resolvedOptions().timeZone,i=new Date,s=n.toLocaleDateString("en-US",{timeZone:r})===i.toLocaleDateString("en-US",{timeZone:r})?n.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",timeZone:r}):t?t.replace("YYYY",String(n.getFullYear())).replace("MM",String(n.getMonth()+1).padStart(2,"0")).replace("DD",String(n.getDate()).padStart(2,"0")).replace("HH",String(n.getHours()).padStart(2,"0")).replace("mm",String(n.getMinutes()).padStart(2,"0")).replace("ss",String(n.getSeconds()).padStart(2,"0")):`${n.toLocaleDateString("en-US",{timeZone:r})} ${n.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",timeZone:r})}`,a=[n.toLocaleDateString("en-US",{day:"numeric",timeZone:r}),n.toLocaleString("en-US",{month:"short",timeZone:r}),n.toLocaleDateString("en-US",{year:"2-digit",timeZone:r}),n.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!0,timeZone:r})].join(" ");return{formatted:s,readableDate:a}}const Bu=(e,t)=>{const n=e.replace(/\\/g,"/"),r=t.replace(/\\/g,"/"),i=n.split("/"),o=r.split("/");return o.length>i.length&&o.slice(0,i.length).join("/")===i.join("/")};function kk(e){return Array.isArray(e)?e.reduce((t,n)=>(n.metadata_value!==null&&(t[n.metadata_key]=n.metadata_value),t),{}):{}}function $u(e){return{...e,absolute_path:e.name||e.object_name,fullPath:e.fullPath||e.name||e.object_name,parentPath:e.parentPath||"",object_type:void 0,object_name:void 0,scan_object_metadata:void 0,scan_object_results:void 0,...kk(e.scan_object_metadata||[])}}function Ev(e,t){const[n,r]=x.useState(e);return x.useEffect(()=>{const i=setTimeout(()=>{r(e)},t);return()=>{clearTimeout(i)}},[e,t]),n}const Vu=50,Mv="-",Fl={attribute_mapping:"attribute_mapping",confidence_metadata:"confidence_metadata"};typeof window<"u"&&Promise.resolve().then(()=>require("./style.min-Dyvby5gX.js"));const Pk="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEwIDRIMjBDMjAuNTUwNyA0IDIxIDQuNDQ5MjggMjEgNVYxOUMyMSAxOS41NTA3IDIwLjU1MDcgMjAgMjAgMjBINEMzLjQ0OTIyIDIwIDMgMTkuNTUwNyAzIDE5VjVDMyA0LjQ0OTI4IDMuNDQ5MjIgNCA0IDRIMTBMMTIgNkgxMFoiIGZpbGw9ImN1cnJlbnRDb2xvciIvPgo8L3N2Zz4K",Fk="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE0IDJINkMyLjg5NTQzIDIgMiAyLjg5NTQzIDIgNlYxOEMyIDE5LjEwNDYgMi44OTU0MyAyMCA0IDIwSDE4QzE5LjEwNDYgMjAgMjAgMTkuMTA0NiAyMCAxOFY4TDE0IDJaIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTE0IDJWOEgyMCIgc3Ryb2tlPSJjdXJyZW50Q29sb3IiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo=",Ok=({scanConnectorUuid:e,api:t,bulkActions:n,handleBulkAction:r,isEditable:i,encryptedFilesFilter:o="",outlookContentTypeFilter:s="",fileSearch:a="",scanDetails:l})=>{const c=x.useRef(null),{showLoader:u,hideLoader:d}=xl(),f=Ev(a,500),[h,g]=x.useState([]),[p,m]=x.useState(!1),[v,C]=x.useState(null),[y,I]=x.useState([]),[w,R]=x.useState(),[A,S]=x.useState([]),[_,E]=x.useState(""),[P,T]=x.useState(new Set),[$,D]=x.useState([]),[k,O]=x.useState(!1),[N,M]=x.useState(!1),F=x.useRef(null),B=x.useRef(!1),z=x.useRef(!1);let G=new Set;const V=new Map;x.useEffect(()=>{if(typeof window>"u")return;(async()=>{try{const oe=await Promise.resolve().then(()=>require("./jquery-CXp5_bMd.js")).then(Z=>Z.jquery);F.current=oe.default,O(!0),await Promise.resolve().then(()=>require("./jstree-4Yq5ootY.js")).then(Z=>Z.jstree),M(!0)}catch(oe){console.error("Failed to load jQuery or jstree:",oe)}})()},[]);const J=j=>typeof window>"u"||!F.current?null:F.current(j),le=j=>Object.keys(j).map(Z=>({value:Z,label:j[Z]})),he=j=>{R((j==null?void 0:j.value)||""),j!=null&&j.value&&r&&r(j.value,y,()=>{I([])},()=>{R("")})},Ne=(j,oe="",Z=!1)=>{const ne=[];if(j.filter(ee=>{const se=ee.fullPath||ee.absolute_path,pe=ee.name||ee.object_name;return se&&pe&&pe.trim()!==""}).forEach((ee,se)=>{if(ee.fullPath){const ae=ee.fullPath.replace(/\\/g,"/").split("/").filter(Q=>Q.trim()!=="");let q=0;oe&&oe!==""&&(q=oe.replace(/\\/g,"/").split("/").filter(xe=>xe.trim()!=="").length);let ye=ne;for(let Q=q;Q<ae.length;Q++){const xe=ae[Q],Re=Q===ae.length-1,Ve=ae.slice(0,Q+1).join("/"),st=/^[A-Z]:$/.test(xe),Ge=Re&&!st&&(ee.object_type==="file"||ee.isFile===!0||ee.isDirectory===!1&&ee.object_type!=="folder"&&ee.object_type!=="directory");let et=ye.find(at=>at.text===xe&&at.full_path===Ve&&at.type===(Ge?"file":"folder"));if(!et){const at=ye.find(fn=>fn.text===xe&&fn.type===(Ge?"file":"folder"));at?et=at:(et={text:xe,children:[],type:Ge?"file":"folder",id:Ve+`_${se}_${Q}`,data:Ge?ee:null,full_path:Ve,state:{opened:!1,disabled:!1,selected:!1},original:{full_path:Ve,type:Ge?"file":"folder"},a_attr:{title:ee.fullPath||Ve},...Ge?{}:{children:!0}},ye.push(et))}Ge||(ye=et.children)}}else if(ee.absolute_path){const ae=ee.absolute_path.replace(/\\/g,"/").split("/").filter(Q=>Q.trim()!=="");let q=0;oe&&oe!==""&&(q=oe.replace(/\\/g,"/").split("/").filter(xe=>xe.trim()!=="").length);let ye=ne;for(let Q=q;Q<ae.length;Q++){const xe=ae[Q],Re=Q===ae.length-1,Ve=ae.slice(0,Q+1).join("/"),st=/^[A-Z]:$/.test(xe),Ge=Re&&!st&&(ee.object_type==="file"||ee.isFile===!0||ee.isDirectory===!1&&ee.object_type!=="folder"&&ee.object_type!=="directory");let et=ye.find(at=>at.text===xe&&at.full_path===Ve&&at.type===(Ge?"file":"folder"));et||(et={text:xe,children:[],type:Ge?"file":"folder",id:Ve+`_${se}_${Q}`,data:Ge?ee:null,full_path:Ve,original:{full_path:Ve,type:Ge?"file":"folder"},a_attr:{title:ee.absolute_path||Ve}},ye.push(et)),Ge||(ye=et.children)}}}),Z&&oe!==void 0){const ee={text:"Load More...",children:[],type:"load_more",id:`load_more_${oe}`,data:null,full_path:oe,original:{full_path:oe,type:"load_more"},a_attr:{title:"Click to load more items",style:"cursor: pointer; color: #007bff; font-weight: bold;"}};ne.push(ee)}return ne},fe=async(j,oe=0,Z=!1)=>{var se;if(typeof window>"u"||!k||!N)return;if(j&&!j.includes("/")&&!j.includes("\\")&&c.current){const pe=J(c.current);if(pe){const q=pe.jstree(!0).get_json("#",{flat:!0}).find(ye=>ye.id===j||ye.text===j);q&&((se=q.original)!=null&&se.full_path)&&(j=q.original.full_path)}}const ne=`${j}_${o}_${s}_${f}`,te=V.get(ne);if(P.has(j)||te!=null&&te.loading||oe===0&&G.has(j)&&!Z||z.current)return;T(pe=>new Set(pe).add(j)),te?V.set(ne,{page:oe,hasMore:te.hasMore??!1,loading:!0}):V.set(ne,{page:0,hasMore:!1,loading:!0}),u();const ee=!!(l!=null&&l.end_time&&l.end_time.length>0);try{const pe=await t.readIndexScanObjectsForPath(e,j,o,s,f,oe,Vu,ee);if(pe!=null&&pe.data){V.set(ne,{page:oe,hasMore:pe.hasMore??!1,loading:!1});const ae=pe.data.map(q=>$u(q));Z&&oe>0?we(j,ae,pe.hasMore??!1):(G.add(j),ge(j,ae,pe.hasMore??!1)),V.set(ne,{page:oe,hasMore:pe.hasMore??!1,loading:!1})}}catch(pe){console.error("Error loading children for path:",pe),V.set(ne,{page:oe,hasMore:!1,loading:!1})}finally{d(),T(pe=>{const ae=new Set(pe);return ae.delete(j),ae})}},ge=(j,oe,Z=!1)=>{var ne;if(!(!c.current||z.current)&&!(typeof window>"u"||!k||!N)){z.current=!0;try{const te=J(c.current);if(!te){z.current=!1;return}const se=te.jstree(!0).get_json("#",{flat:!0}).find(Re=>{var Ve;return Re.text===j||((Ve=Re.a_attr)==null?void 0:Ve.title)===j});if(!se){console.error("Parent node not found for path:",j);return}const pe=(ne=se.state)==null?void 0:ne.opened;se.children&&se.children.length>0&&se.children.forEach(Re=>{te.jstree("delete_node",Re)});const ae=te.jstree("get_children_dom",se.id);ae&&ae.length&&J(ae).each((Re,Ve)=>{const st=J(Ve).attr("id");st&&(st.includes("_loading")||st.includes("_placeholder"))&&te.jstree("delete_node",st)}),Ne(oe,j,Z).map(Re=>Re.type==="folder"?{...Re,children:Re.children&&Re.children.length>0?Re.children:[{text:"",children:[],type:"placeholder",id:`${Re.id}_placeholder`,state:{opened:!1,disabled:!0,selected:!1},original:{full_path:Re.full_path,type:"placeholder"},li_attr:{style:"display: none;"}}],state:{opened:!1,disabled:!1,selected:!1}}:Re).forEach(Re=>{te.jstree("create_node",se.id,Re,"last")});const Q=`${j}_${o}_${s}_${f}`;V.get(Q)||V.set(Q,{page:0,hasMore:Z,loading:!1}),pe&&te.jstree("open_node",se.id),setTimeout(()=>{z.current=!1},100)}catch(te){console.error("Error in updateTreeWithChildren:",te),z.current=!1}}},we=(j,oe,Z=!1)=>{var ye;if(!c.current||typeof window>"u"||!k||!N)return;const ne=J(c.current);if(!ne)return;let te,ee;if(j==="")ee="#",te={id:"#",text:"root",type:"root"};else if(te=ne.jstree(!0).get_json("#",{flat:!0}).find(xe=>{var Re;return xe.text===j||((Re=xe.a_attr)==null?void 0:Re.title)===j}),ee=te==null?void 0:te.id,!te){console.error("Parent node not found for path:",j);return}const se=`load_more_${j}`,pe=ne.jstree("get_node",se);if(pe&&ne.jstree("delete_node",pe),j!==""&&te){const Q=ne.jstree("get_children_dom",te.id);Q&&Q.length&&J(Q).each((xe,Re)=>{const Ve=J(Re).attr("id");Ve&&(Ve.includes("_loading")||Ve.includes("_placeholder"))&&ne.jstree("delete_node",Ve)})}Ne(oe,j,Z).map(Q=>Q.type==="folder"?{...Q,children:Q.children&&Q.children.length>0?Q.children:[{text:"",children:[],type:"placeholder",id:`${Q.id}_placeholder`,state:{opened:!1,disabled:!0,selected:!1},original:{full_path:Q.full_path,type:"placeholder"},li_attr:{style:"display: none;"}}],state:{opened:!1,disabled:!1,selected:!1}}:Q).forEach((Q,xe)=>{try{ne.jstree("create_node",ee,Q,"last")}catch(Re){console.error(`appendChildrenToPath - Error creating child ${xe}:`,Re)}}),j!==""&&te&&((ye=te.state)!=null&&ye.opened)&&ne.jstree("open_node",te.id)},ce=async()=>{if(!B.current)try{B.current=!0,m(!1),u(),G=new Set,D([]),C(null);const j=!!(l!=null&&l.end_time&&l.end_time.length>0),oe=await t.readIndexScanObjectsForPath(e,"",o,s,f,0,Vu,j);if(oe!=null&&oe.data){const Z=oe.data.map(se=>$u(se));g(Z);const ne=`_${o}_${s}_${f}`,ee=Ne(Z,"",oe.hasMore??!1).map(se=>se.type==="folder"?{...se,children:se.children&&se.children.length>0?se.children:[{text:"",children:[],type:"placeholder",id:`${se.id}_placeholder`,state:{opened:!1,disabled:!0,selected:!1},original:{full_path:se.full_path,type:"placeholder"},li_attr:{style:"display: none;"}}],state:{opened:!1,disabled:!1,selected:!1}}:se);D(ee),G.add(""),V.set(ne,{page:0,hasMore:oe.hasMore??!1,loading:!1})}else g([]),D([])}catch(j){console.error("[FileBrowser] Error fetching root level data:",j),g([]),D([])}finally{B.current=!1,d(),m(!0)}};x.useEffect(()=>{e?ce():m(!0)},[e,o,s,f]),x.useEffect(()=>{if(p&&c.current&&k&&N&&typeof window<"u"){const j=J(c.current);if(!j)return;j.jstree(!0)&&j.jstree("destroy");const oe={plugins:["types","state"],types:{folder:{icon:Pk},file:{icon:Fk},load_more:{icon:"jstree-file"}}};i&&(oe.plugins.push("checkbox"),oe.checkbox={three_state:!0,whole_node:!1,tie_selection:!1}),j.jstree({core:{data:$,themes:{name:"default",responsive:!0},check_callback:!0},...oe}),j.on("open_node.jstree",(Z,ne)=>{var se,pe,ae;const te=ne.node;let ee=((se=te.original)==null?void 0:se.full_path)||te.full_path||te.id;if(ee&&!ee.includes("/")&&!ee.includes("\\")&&c.current&&k&&N){const q=J(c.current);if(q){const Q=q.jstree(!0).get_json("#",{flat:!0}).find(xe=>xe.id===te.id);Q&&((pe=Q.original)!=null&&pe.full_path)&&(ee=Q.original.full_path)}}if((!ee||!ee.includes("/")&&!ee.includes("\\"))&&c.current){const q=J(c.current).jstree(!0).get_json("#",{flat:!0}),ye=q.find(Q=>Q.id===te.id);if(ye&&ye.parent&&ye.parent!=="#"){const Q=q.find(xe=>xe.id===ye.parent);Q&&((ae=Q.original)!=null&&ae.full_path)&&(ee=`${Q.original.full_path}/${te.text}`)}}te.type==="folder"&&/^[A-Z]:$/.test(te.text)&&(ee=te.text),te.type==="folder"&&ee&&(G.has(ee)||fe(ee))}),j.on("click.jstree",Z=>{var ee;const ne=J(Z.target);if(!ne)return!0;const te=ne.closest("li").attr("id");if(te&&te.startsWith("load_more_")){const se=j.jstree("get_node",te),pe=((ee=se==null?void 0:se.original)==null?void 0:ee.full_path)||(se==null?void 0:se.full_path)||te.replace("load_more_",""),ae=pe===""?`_${o}_${s}_${f}`:`${pe}_${o}_${s}_${f}`,q=V.get(ae);if(q&&q.hasMore&&!q.loading){const ye=q.page+1;fe(pe,ye,!0)}else q||(V.set(ae,{page:0,hasMore:!0,loading:!1}),fe(pe,1,!0));return Z.preventDefault(),Z.stopPropagation(),!1}return!0}),j.on("select_node.jstree",(Z,ne)=>{var ee;const te=ne.node;if(te.type==="load_more"&&((ee=te.original)!=null&&ee.full_path)){const se=te.original.full_path,pe=`${se}_${o}_${s}_${f}`,ae=V.get(pe);ae&&ae.hasMore&&!ae.loading&&fe(se,ae.page+1,!0);return}te.data?C(te.data):C(null)}),j.on("check_node.jstree uncheck_node.jstree",function(Z,ne){const te=ne.node,ee=te.original.full_path;te.state.checked?I(se=>{const pe=se.filter(q=>q!==ee&&!Bu(ee,q));let ae=te;for(;ae.parent!=="#";){const q=j.jstree("get_node",ae.parent);if(q){if(q.children.every(Q=>{const xe=j.jstree("get_node",Q);return xe==null?void 0:xe.state.checked}))return pe.filter(Q=>!Q.startsWith(q.original.full_path)).concat(q.original.full_path);ae=q}}return pe.concat(ee)}):I(se=>{const pe=se.filter(q=>q!==ee&&!Bu(ee,q));let ae=te;for(;ae.parent!=="#";){const q=j.jstree("get_node",ae.parent);if(q){if(q.children.some(Q=>{const xe=j.jstree("get_node",Q);return xe==null?void 0:xe.state.checked})){const Q=q.children.filter(xe=>{const Re=j.jstree("get_node",xe);return Re==null?void 0:Re.state.checked}).map(xe=>{const Re=j.jstree("get_node",xe);return Re==null?void 0:Re.original.full_path});return pe.filter(xe=>!xe.startsWith(q.original.full_path)).concat(Q)}ae=q}}return pe})})}return()=>{if(c.current&&k&&N&&typeof window<"u"){const j=J(c.current);j&&j.jstree("destroy").empty()}}},[$,p,k,N]);const H=[{header:"Key",accessorKey:"key",minSize:180,maxSize:180},{header:"Value",accessorKey:"value",cell:({row:{original:j}})=>b.jsx("p",{className:"break-words",title:j.value,children:j.value.length>30?j.value.substring(0,30)+"...":j.value})}],Te=(j,oe)=>{if(typeof oe=="boolean"||j.startsWith("is_"))return oe===!0||oe===1||oe==="1"?"Yes":"No";if(j==="file_size")return zd(+oe);if(["last_modified","creation_time","last_accessed","created_at","updated_at"].includes(j))try{return Fa(oe).format("ddd, DD MMM YYYY hh:mm:ss A")}catch{return _v(oe).readableDate}return oe};x.useEffect(()=>{if(v){const j=v.type==="Email"||v.type==="Attachment"||v.object_type==="Email"||v.object_type==="Attachment",oe=Object.entries(v).filter(([Z,ne])=>!["id","scan_id","created_at","updated_at","content_preview","file_system_type","file_system_flags",...j?["absolute_path"]:[]].includes(Z)&&ne!==null).map(([Z,ne])=>{let te=Te(Z,ne);if(j&&Z==="name"&&typeof ne=="string"){const ee=ne.lastIndexOf("/");ee!==-1&&(te=ne.substring(ee+1))}return{id:Z,key:Iv(Z.split("_").join(" ")),value:te}});S(oe)}else S([])},[v]);const re=_&&A?A.filter(j=>j.key.toLowerCase().includes(_.toLowerCase())||String(j.value).toLowerCase().includes(_.toLowerCase())):A,ie=()=>{if(c.current&&k&&N&&typeof window<"u"){const j=J(c.current);j&&j.jstree("close_all")}};return typeof window>"u"||!k||!N?b.jsxs("div",{className:"flex items-center gap-2 p-6 mt-2 text-lg font-semibold rounded-lg shadow-sm",style:{backgroundColor:"var(--hover-bg-color)",border:"1px solid var(--border-color)",color:"var(--text-color)"},children:[b.jsx(ga,{className:"w-6 h-6",style:{color:"var(--secondary-text-color)"}}),b.jsx("span",{children:"Loading file browser..."})]}):!h||h.length===0||!p?b.jsx("div",{className:"flex items-center gap-2 p-6 mt-2 text-lg font-semibold rounded-lg shadow-sm",style:{backgroundColor:"var(--hover-bg-color)",border:"1px solid var(--border-color)",color:"var(--text-color)"},children:p&&b.jsxs(b.Fragment,{children:[b.jsx(ga,{className:"w-6 h-6",style:{color:"var(--secondary-text-color)"}}),b.jsx("span",{children:"No metadata available to display."})]})}):b.jsxs("div",{className:"flex",style:{minHeight:"75vh"},children:[b.jsxs("div",{className:"w-1/2 border-r pt-4 pb-4 overflow-x-auto",children:[b.jsx("div",{className:"flex items-center gap-2 mb-4",children:b.jsx("button",{onClick:ie,className:"px-3 py-1 text-sm text-white rounded-md transition-colors",style:{backgroundColor:"var(--brand-orange)"},onMouseEnter:j=>{j.currentTarget.style.backgroundColor="#e65a03"},onMouseLeave:j=>{j.currentTarget.style.backgroundColor="var(--brand-orange)"},children:"Collapse All"})}),b.jsx("div",{className:"overflow-y-auto file-browser-tree",children:b.jsx("div",{ref:c})})]}),b.jsx("div",{className:"w-1/2 pt-4 pl-4 pr-2",children:y.length>0&&n&&r?b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"relative w-48 px-4 z-40",children:b.jsx(Po,{placeholder:"Bulk Action",options:le(n),selectedOptions:w?le(n).filter(j=>j.value===w):[],handleChange:he,isMulti:!1,isClearable:!0})}),b.jsx("div",{className:"py-4",children:b.jsx(su,{type:Co.FILE,columns:[{header:"Folders",accessorKey:"folder"}],data:y.map(j=>({id:j,folder:j}))||[],paginationEnabled:!1,exportEnabled:!1})})]}):v?b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"flex w-full h-[2rem] rounded-md overflow-hidden shadow-sm",style:{border:"1px solid var(--border-color)"},children:[b.jsx("input",{type:"text",placeholder:"Search Metadata",value:_,onChange:j=>E(j.target.value),className:"flex-grow px-4 py-2 text-sm focus:outline-none w-full",style:{backgroundColor:"var(--bg-color)",color:"var(--text-color)"}}),b.jsx("button",{className:"px-4 py-0 transition-colors",style:{backgroundColor:"var(--brand-light)",color:"var(--brand-dark)"},onMouseEnter:j=>j.currentTarget.style.backgroundColor="var(--hover-bg-color)",onMouseLeave:j=>j.currentTarget.style.backgroundColor="var(--brand-light)",tabIndex:-1,type:"button","aria-label":"Search",disabled:!0,children:b.jsx(Km,{size:18})})]}),b.jsx(su,{tableWrapperClass:"metadata-table overflow-y-auto",type:Co.FILEBROWSER,columns:H,data:re||[],paginationEnabled:!1,exportEnabled:!1})]}):b.jsx("p",{className:"px-4",style:{color:"var(--secondary-text-color)"},children:"Select a file or folder to take action."})})]})};function Nk(e,t,n,r,i=!1){if(!e||typeof e!="object"||Object.keys(e).length===0)return null;let o=`${t}.${n}`;i&&(o=n);const s=e[o];return!s||typeof s!="object"||Object.keys(s).length===0?null:s[r]??null}function Av(e,t,n=!1,r=""){const{id:i,uuid:o,scan_id:s,object_name:a,source:l,created_at:c,updated_at:u,scan_object_metadata:d}=e;let[f,...h]=a.split(".");(r==null?void 0:r.length)>0&&(f=r,h=[a]);const g=h.join(".");let p=(r==null?void 0:r.length)>0;const m=Object.keys(t??{});n&&m.length>0&&m[0].includes(".")&&g.includes(".")&&m[0].split(".").length===2&&(p=!0);const v={id:i,uuid:o,scan_id:s,db_name:(r==null?void 0:r.length)>0?r:f,table_name:g,column_name:l,created_at:c,updated_at:u};let C=null,y=null;for(const w of d||[]){const{metadata_key:R,metadata_value:A}=w;switch(R){case"total_values":v.total_rows=A;break;case"empty_values":v.empty_rows=A;break;case"referenced_table":C=A;break;case"referenced_column":y=A;break;default:v[R]=A;break}}const I=Nk(t,f,g,l,p);return I&&(v[Fl.attribute_mapping]=I),C&&y&&(v.foreign_key=`${C}.${y}`),{result:v,skipDbName:p}}function Gu(e){if(!Array.isArray(e))return{};const t=e.find(n=>n.metadata_key===Fl.attribute_mapping);if(!t||typeof t.metadata_value!="string")return{};try{const n=JSON.parse(t.metadata_value);if(typeof n=="object"&&n!==null)return n}catch(n){console.error("Failed to parse attribute_mapping metadata_value:",n)}return{}}function Rv(e){if(!Array.isArray(e))return{};const t=e.find(n=>n.metadata_key===Fl.confidence_metadata);if(!t||typeof t.metadata_value!="string")return{};try{const n=JSON.parse(t.metadata_value);if(typeof n=="object"&&n!==null)return n}catch(n){console.error("Failed to parse confidence_metadata metadata_value:",n)}return{}}const kv=e=>e>=.8?"bg-green-600":e>=.4?"bg-yellow-600":"bg-red-600";typeof window<"u"&&Promise.resolve().then(()=>require("./style-Dyvby5gX.js"));const Rc="Unassigned",Tk=(e,t)=>{const n=[],r=[],i={};e.forEach(g=>{const{db_name:p,table_name:m,column_name:v,column_type:C,is_primary_key:y,is_unique_key:I,foreign_key:w,total_rows:R,empty_rows:A,encryption_type:S,attribute_mapping:_}=g;i[p]||(i[p]={}),i[p][m]||(i[p][m]={columns:[],primaryKey:[],uniqueKey:[],foreignKeys:[],metadata:{total_rows:R,empty_rows:A}}),i[p][m].columns.push({id:`${p}-${m}-${v}`,title:v,type:C||"varchar",is_primary_key:y&&y!=="0",is_unique_key:I&&I!=="0",encryption_type:S,attribute_mapping:_}),y&&y!=="0"&&i[p][m].primaryKey.push(v),I&&I!=="0"&&i[p][m].uniqueKey.push(v),w&&i[p][m].foreignKeys.push({column:v,reference:w})});const l=[];Object.keys(i).forEach(g=>{Object.keys(i[g]).forEach(p=>{l.push({dbName:g,tableName:p,table:i[g][p]})})});const c=l.length,u=Math.ceil(Math.sqrt(c)),d=50,f=75,h=new Array(u).fill(0);return l.forEach(({dbName:g,tableName:p,table:m},v)=>{const C=50+m.columns.length*30,y=v%u,I=y*(500+d),w=h[y];h[y]=w+C+f,n.push({id:`table-${g}-${p}`,type:"databaseSchema",position:{x:I,y:w},data:{id:`table-${g}-${p}`,label:p,db_name:g,metadata:m.metadata,schema:m.columns,selected:!1}})}),l.forEach(({dbName:g,tableName:p,table:m})=>{const v=`table-${g}-${p}`;m.foreignKeys.forEach(C=>{if(C.reference&&C.reference.includes(".")){const[y,I]=C.reference.split("."),w=i[g][y],R=m.columns.find(S=>S.title===C.column),A=w==null?void 0:w.columns.find(S=>S.title===I);if(w&&A){const S={id:`fk-edge-${v}-${C.column}`,source:v,sourceHandle:R==null?void 0:R.id,target:`table-${g}-${y}`,targetHandle:A==null?void 0:A.id,style:{strokeWidth:2,stroke:"lightblue"},type:"smoothstep",label:`FK: ${C.column} -> ${I}`};t&&(S.markerEnd={type:t.ArrowClosed,width:15,height:15,color:"skyblue"}),r.push(S)}}})}),{nodes:n,edges:r}},Dk=()=>{const[e,t]=x.useState(()=>typeof window<"u"&&document.documentElement.classList.contains("dark"));return x.useEffect(()=>{const n=new MutationObserver(()=>{t(document.documentElement.classList.contains("dark"))});return n.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>n.disconnect()},[]),e},Lk=({bulkActions:e,handleBulkAction:t,scanConnectorUuid:n,api:r,connectorMetadata:i,updateAttributeMappingForConnector:o,isScanRunning:s,isEditable:a,connectionType:l,loadScanReports:c,handleScanStatus:u,setActiveScreen:d,resetStates:f,activeConnector:h,activeReport:g})=>{var Ti;const{showLoader:p,hideLoader:m}=xl(),{showToast:v}=yd(),[C,y]=x.useState(!1),[I,w]=x.useState([]),[R,A]=x.useState([]),[S,_]=x.useState({}),[E,P]=x.useState(""),[T,$]=x.useState([]),[D,k]=x.useState(!1),[O,N]=x.useState(!1),[M,F]=x.useState(!1),[B,z]=x.useState(null),[G,V]=x.useState(),[J,le]=x.useState(!1),[he,Ne]=x.useState(!1),fe=x.useRef(null),ge=x.useRef(null),[we,ce]=x.useState({x:0,y:0,zoom:1}),H=x.useRef(!1),[Te,re]=x.useState(!1),[ie,j]=x.useState(null),[oe,Z]=x.useState([]),[ne,te]=x.useState([]),ee=Dk();x.useEffect(()=>{if(typeof window>"u")return;(async()=>{try{const K=await Promise.resolve().then(()=>require("./index-B5LtRiCc.js"));j({ReactFlow:K.default,MiniMap:K.MiniMap,Background:K.Background,Handle:K.Handle,Position:K.Position,MarkerType:K.MarkerType,Controls:K.Controls,useNodesState:K.useNodesState,useEdgesState:K.useEdgesState}),re(!0)}catch(K){console.error("Failed to load ReactFlow:",K)}})()},[]);const{nodes:se,edges:pe}=x.useMemo(()=>Tk(S[E]||[],ie==null?void 0:ie.MarkerType),[E,S,R,ie]),[ae,q,ye]=ie!=null&&ie.useNodesState?ie.useNodesState(se):[oe.length>0?oe:se,Z,()=>{}],[Q,xe,Re]=ie!=null&&ie.useEdgesState?ie.useEdgesState(pe):[ne.length>0?ne:pe,te,()=>{}];x.useEffect(()=>{ie!=null&&ie.useNodesState||Z(se)},[se,ie]),x.useEffect(()=>{ie!=null&&ie.useEdgesState||te(pe)},[pe,ie]);const Ve=x.useRef({});x.useEffect(()=>{ae.forEach(X=>{Ve.current[X.id]||(Ve.current[X.id]={x:X.position.x,y:X.position.y})})},[ae]);const st=X=>X.map(K=>({...K,position:Ve.current[K.id]||K.position})),Ge=X=>!!X&&typeof X.x=="number"&&typeof X.y=="number"&&typeof X.zoom=="number"&&X.zoom>.001&&X.zoom<=2,et=x.useCallback((X,K)=>{ce(K)},[]);x.useEffect(()=>{ge.current&&ae.length>0&&Ge(we)&&ge.current.setViewport(we)},[E]),x.useEffect(()=>{ge.current&&ae.length>0&&!H.current&&(ge.current.fitView({padding:.2,duration:800}),H.current=!0)},[ae.length]),x.useEffect(()=>{const X=st(se.map(K=>T.find(ue=>ue.table===K.data.label&&ue.db_name===E)?{...K,data:{...K.data,selected:!0}}:K));q(X),xe(pe)},[E,se]);const at=x.useMemo(()=>Gu(i??[]),[i]),fn=x.useMemo(()=>Rv(i??[]),[i]);x.useEffect(()=>{(!i||i&&typeof at=="object")&&(n?(async()=>{var K;y(!1),p();try{const{data:ue}=await r.readIndexScanObjects(n),Ae=await r.readConfig({onlyActive:!0});w(Ae.data??[]);const L=(K=ue==null?void 0:ue.filter(Y=>Y.object_type==="table"))==null?void 0:K.map(Y=>{const{result:me,skipDbName:Pe}=Av(Y,at,l==="mssql"||l==="salesforce",l==="salesforce"?"Default":"");return Pe&&!O&&N(!0),me});A(L);const de=L.reduce((Y,me)=>{const Pe=me.db_name;return Y[Pe]||(Y[Pe]=[]),Y[Pe].push(me),Y},{});de&&Object.keys(de).length>0&&(_(de),(!E||!de[E])&&P(Object.keys(de)[0])),y(!0)}catch(ue){console.error("Error fetching scan metadata:",ue),y(!0)}finally{m()}})():y(!0))},[n,i,at,r]);const es=(X,K)=>{const ue=X.schema.filter(Ae=>Ae!==K);z({...X,schema:[{...K},...ue]}),V(K.attribute_mapping),F(!0)},Ol=x.useMemo(()=>{if(!ie||!Te)return{};const{Handle:X,Position:K}=ie;return{databaseSchema:x.memo(({data:ue})=>b.jsxs("div",{className:"border-[3px] overflow-hidden rounded-lg min-w-[300px] shadow-md",style:{backgroundColor:"var(--bg-color)",borderColor:ue.selected?"var(--brand-orange)":"transparent"},children:[b.jsx("div",{className:"text-white px-1 py-2 text-center",style:{backgroundColor:ue.selected?"#10b981":"var(--brand-orange)"},children:b.jsx("strong",{children:ue.label})}),b.jsxs("div",{className:"py-2",style:{backgroundColor:"var(--hover-bg-color)"},children:[b.jsxs("div",{className:"flex justify-between px-2 pb-1",children:[b.jsx("span",{className:"font-normal text-[11px]",style:{color:"var(--secondary-text-color)"},children:"Total Rows:"}),b.jsx("span",{className:"font-semibold text-[11px]",style:{color:"var(--text-color)"},children:ue.metadata.total_rows})]}),b.jsxs("div",{className:"flex justify-between px-2",style:{backgroundColor:"var(--hover-bg-color)"},children:[b.jsx("span",{className:"font-normal text-[11px]",style:{color:"var(--secondary-text-color)"},children:"Empty Rows:"}),b.jsx("span",{className:"font-semibold text-[11px]",style:{color:"var(--text-color)"},children:ue.metadata.empty_rows})]})]}),b.jsx("table",{className:"border-spacing-10 overflow-visible w-full",children:b.jsx("tbody",{children:ue.schema.map(Ae=>{var L,de,Y,me,Pe,ot,rn,Yt,nf,rf;return b.jsxs("tr",{className:"relative text-xs py-1 px-2 h-7",style:{borderBottom:"1px solid var(--border-color)"},children:[b.jsxs("td",{className:"pr-6 font-light pl-2",style:{verticalAlign:"middle",color:"var(--text-color)"},children:[b.jsx(X,{type:"target",position:K.Left,id:Ae.id}),b.jsxs("span",{className:"flex gap-1",children:[Ae.title,Ae.is_primary_key&&b.jsx(ex,{style:{color:"var(--text-color)"}}),Ae.is_unique_key&&b.jsx(Qv,{style:{color:"var(--text-color)"}}),!!Ae.encryption_type&&b.jsx(tx,{style:{color:"var(--text-color)"}})]})]}),b.jsxs("td",{className:"text-right font-thin pr-2",style:{verticalAlign:"middle",color:"var(--secondary-text-color)"},children:[b.jsx("span",{children:Ae.type}),b.jsx(X,{type:"source",position:K.Right,id:Ae.id})]}),b.jsxs("td",{className:"text-right font-thin pr-2 pl-4",style:{verticalAlign:"middle"},children:[b.jsx("div",{className:"flex items-center justify-end gap-2",children:((de=(L=fn[ue.label])==null?void 0:L[Ae.title])==null?void 0:de.confidence_score)!==void 0?b.jsx(hb,{confidenceData:((Y=fn[ue.label])==null?void 0:Y[Ae.title])||{},position:"top",children:b.jsxs("span",{className:`text-xs rounded p-1 text-white ${kv(((Pe=(me=fn[ue.label])==null?void 0:me[Ae.title])==null?void 0:Pe.confidence_score)||0)}`,children:[(((rn=(ot=fn[ue.label])==null?void 0:ot[Ae.title])==null?void 0:rn.confidence_score)*100).toFixed(0),"%"]})}):b.jsx(gi,{text:"Confidence score not available",position:"top",children:b.jsx("span",{className:"text-xs px-2 py-1 rounded-full cursor-pointer",style:{backgroundColor:"var(--hover-bg-color)",color:"var(--secondary-text-color)"},children:Mv})})}),b.jsx(X,{type:"source",position:K.Right,id:Ae.id})]}),b.jsxs("td",{className:"text-right font-thin pr-2 pl-4",style:{verticalAlign:"middle"},children:[b.jsx("div",{className:"flex items-center justify-end gap-2",children:b.jsx("span",{className:"underline cursor-pointer font-bold",style:{color:!((Yt=Ae.attribute_mapping)!=null&&Yt.value)||((nf=Ae.attribute_mapping)==null?void 0:nf.value)==="undefined"?"var(--secondary-text-color)":"var(--brand-orange)"},onClick:()=>es(ue,Ae),children:((rf=Ae.attribute_mapping)==null?void 0:rf.label)??Rc})}),b.jsx(X,{type:"source",position:K.Right,id:Ae.id})]})]},Ae.title)})})})]})),default:x.memo(({data:ue})=>b.jsxs("div",{className:"p-2 rounded-lg text-center",style:{backgroundColor:"var(--hover-bg-color)",border:"1px solid var(--border-color)",color:"var(--text-color)"},children:[b.jsx("strong",{children:ue.label}),b.jsx(X,{type:"source",position:K.Bottom,className:"-bottom-2",style:{backgroundColor:"var(--border-color)"}})]}))}},[ie,Te,es,fn]),Nl=()=>{if(G&&B){const X=`${B.db_name}.${B.label}`,K=B.schema[0].title,Ae={...Gu(i??[])};Ae[X]||(Ae[X]={}),Ae[X][K]=G,o(Ae,()=>{F(!1),V(void 0),z(null)})}},ts=async()=>{if(T.length===0){v(pt.WARNING,"Please select at least one table to scan.");return}if(await(s==null?void 0:s())){v(pt.WARNING,"A scan is already running. Please wait for it to complete.");return}le(!0)},ns=async()=>{var X,K,ue,Ae;try{Ne(!0);let L=h==null?void 0:h.connector_id;if(!L&&((K=(X=g==null?void 0:g.scan)==null?void 0:X.connectors)!=null&&K.length)){const me=g.scan.connectors.find(Pe=>Pe.uuid===n);me!=null&&me.connector_id&&(L=me.connector_id)}if(!L&&n)try{const me=await r.readScanReportDetails({arg:n});if((Ae=(ue=me==null?void 0:me.scan)==null?void 0:ue.connectors)!=null&&Ae.length){const Pe=me.scan.connectors.find(ot=>ot.uuid===n);Pe!=null&&Pe.connector_id&&(L=Pe.connector_id)}}catch(me){console.error("Error getting scan details for fallback:",me)}if(!L){v(pt.WARNING,"Unable to find connector ID for this scan.");return}const de=T.map(me=>`${me.db_name}.${me.table}`),Y=await r.startSelectedTableScan({connectionType:l||"",indexScan:!1,connectorIDs:L,selectedTables:de});Y&&!Y.startsWith("Error:")?(v(pt.SUCCESS,"Selected table scan started successfully!"),le(!1),$([]),d&&d("reports"),f&&f(),setTimeout(()=>{c&&c(),u&&u()},1e3)):v(pt.ERROR,`Failed to start scan: ${Y}`)}catch(L){console.error("Error starting selected table scan:",L),v(pt.ERROR,"Failed to start selected table scan. Please try again.")}finally{Ne(!1)}},Kr=x.useCallback(X=>{X.forEach(K=>{K.type==="position"&&K.position&&K.id&&(Ve.current[K.id]=K.position)}),ye(X)},[ye]),mr=T.reduce((X,K)=>(X[K.db_name]||(X[K.db_name]=[]),X[K.db_name].push(K.table),X),{}),Tl=x.useMemo(()=>Object.keys(S).map(X=>{const K=new Set(S[X].map(ue=>ue.table_name));return{value:X,label:`${X} (${K.size})`}}),[S,R]),Ni=x.useMemo(()=>I!=null&&I.length?I.map(X=>({value:X.uuid,label:X.name,countries:X.country_data||[]})):[],[I]),br=x.useMemo(()=>{var K;const X=new Set(((K=S[E])==null?void 0:K.map(ue=>ue.table_name))||[]);return`${E} (${X.size||0})`},[S,E]),rs=x.useMemo(()=>b.jsx("div",{className:"flex flex-col items-center gap-4",children:b.jsx("div",{className:"w-full py-2",children:b.jsx("div",{className:"max-h-60 overflow-y-auto rounded p-3",style:{border:"1px solid var(--border-color)",backgroundColor:"var(--hover-bg-color)"},children:Object.entries(mr).map(([X,K])=>b.jsxs("div",{className:"mb-3",children:[b.jsxs("div",{className:"font-semibold mb-1",style:{color:"var(--text-color)"},children:["Database: ",X]}),b.jsx("ul",{className:"ml-4",children:K.map(ue=>b.jsx("li",{className:"text-sm list-disc",style:{color:"var(--secondary-text-color)"},children:ue},ue))})]},X))})})}),[T,mr]),is=x.useMemo(()=>b.jsxs("div",{className:"flex flex-col items-center gap-4",children:[I.length===0&&b.jsx(fb,{}),b.jsx("div",{className:"w-full flex items-center gap-4",style:{color:"var(--text-color)"},children:he?"Scanning Selected Tables...":"Are you sure you want to scan the following selected tables?"}),b.jsxs("div",{className:"w-full",children:[b.jsxs("div",{className:"text-sm font-medium mb-2",style:{color:"var(--text-color)"},children:["Selected Tables (",T.length,"):"]}),b.jsx("div",{className:"max-h-60 overflow-y-auto rounded p-3",style:{border:"1px solid var(--border-color)",backgroundColor:"var(--hover-bg-color)"},children:Object.entries(mr).map(([X,K])=>b.jsxs("div",{className:"mb-3",children:[b.jsxs("div",{className:"font-semibold mb-1",style:{color:"var(--text-color)"},children:["Database: ",X]}),b.jsx("ul",{className:"ml-4",children:K.map(ue=>b.jsx("li",{className:"text-sm list-disc",style:{color:"var(--secondary-text-color)"},children:ue},ue))})]},X))})]}),b.jsx("div",{className:"w-full text-sm",style:{color:"var(--secondary-text-color)"},children:b.jsx("p",{children:"This will initiate a scan for only the selected tables, which may be faster than scanning the entire database."})})]}),[T,mr,he,I.length]),os=({data:X,isSelected:K})=>{let ue=null;if(X.countries&&X.countries.length>0){const L=X.countries.slice(0,3),de=X.countries.length>3,Y=de?X.countries.map(Pe=>Pe.country).join(", "):"",me=L.map((Pe,ot)=>b.jsxs("span",{className:"inline-flex items-center px-2 py-0.5 rounded-full text-xs border-[1px] flex-shrink-0",style:{borderColor:K?"white":"var(--brand-orange)",color:K?"white":"var(--brand-orange)"},children:[b.jsx(Kv,{className:"mr-1 h-2.5 w-2.5 flex-shrink-0",style:{color:K?"white":"var(--brand-orange)"}}),b.jsx("span",{className:"truncate max-w-[80px]",children:Pe.country})]},`${X.value}-${Pe.id}-${ot}`));de?ue=b.jsxs("div",{className:"flex items-center gap-1 ml-2 whitespace-nowrap",children:[me,b.jsx(gi,{text:Y,position:"top",children:b.jsxs("span",{className:"text-xs cursor-pointer flex-shrink-0 px-1",style:{color:K?"white":"var(--secondary-text-color)"},children:["+",X.countries.length-3," more"]})})]}):ue=b.jsx("div",{className:"flex items-center gap-1 ml-2 whitespace-nowrap",children:me})}return b.jsxs("div",{className:"flex items-center w-full min-w-0",children:[b.jsx("div",{className:`font-medium whitespace-nowrap mr-1 ${K?"text-white":""}`,children:X.label}),ue]})},ss=x.useMemo(()=>{const X=G?Ni.find(ue=>ue.value===G.value):null,K={value:(G==null?void 0:G.value)||"undefined",label:(X==null?void 0:X.label)??Rc,countries:(X==null?void 0:X.countries)||[]};return b.jsx(Po,{className:"min-w-[400px] text-sm mt-2",menuPosition:"fixed",placeholder:"Select an attribute",options:[{label:Rc,value:"undefined"},...Ni],handleChange:ue=>{V(ue??void 0)},selectedOptions:[K],isMulti:!1,isClearable:!1,customOptionRenderer:ue=>b.jsx(os,{...ue}),customStyles:{menu:ue=>({...ue,width:"auto",minWidth:"100%"}),option:(ue,Ae)=>({...ue,backgroundColor:Ae.isSelected?"var(--brand-orange)":ue.backgroundColor,color:Ae.isSelected?"#fff":ue.color,cursor:"pointer",whiteSpace:"normal",minHeight:"40px",":active":{backgroundColor:Ae.isSelected?"var(--brand-orange)":ue.backgroundColor}})}})},[Ni,G]);return!R||R.length===0||!C?b.jsx("div",{className:"flex items-center gap-2 p-6 mt-2 text-lg font-semibold rounded-lg shadow-sm",style:{backgroundColor:"var(--hover-bg-color)",border:"1px solid var(--border-color)",color:"var(--text-color)"},children:C&&b.jsxs(b.Fragment,{children:[b.jsx(ga,{className:"w-6 h-6",style:{color:"var(--secondary-text-color)"}}),b.jsx("span",{children:"No metadata available to display."})]})}):b.jsxs("div",{style:{width:"100%",height:"80vh",overflow:"hidden"},className:"dbschema-wrapper",children:[b.jsx("div",{children:b.jsxs("div",{className:"flex justify-between items-center",children:[b.jsxs("div",{className:"py-2 flex items-center",children:[b.jsx("h2",{className:"text-lg font-semibold mr-3",children:"Databases"}),b.jsx(Po,{className:"w-52 text-sm",placeholder:"Select a database",options:Tl,selectedOptions:[{value:E,label:br}],handleChange:X=>X&&P(X.value),isMulti:!1,isClearable:!1})]}),T.length>0&&b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("button",{onClick:()=>{k(!0)},className:"bg-brand-primary text-white px-4 py-2 rounded transition-colors duration-150 shadow-sm font-medium footer-button mr-2",style:{minWidth:140},children:"View Selections"}),b.jsx("button",{onClick:ts,className:"bg-brand-primary text-white px-4 py-2 rounded transition-colors duration-150 shadow-sm font-medium footer-button",style:{minWidth:170},disabled:!a,children:"Scan Selected Tables"})]})]})}),!Te||!ie?b.jsx("div",{className:"flex items-center justify-center",style:{maxHeight:T.length>0?"84%":"90%",minHeight:"400px",backgroundColor:"var(--bg-color)",border:"1px solid var(--border-color)",borderRadius:"8px"},children:b.jsxs("div",{className:"flex flex-col items-center gap-2",children:[b.jsx(ga,{className:"w-6 h-6",style:{color:"var(--secondary-text-color)"}}),b.jsx("span",{style:{color:"var(--text-color)"},children:"Loading schema browser..."})]})}):b.jsxs(ie.ReactFlow,{ref:fe,onInit:X=>{ge.current=X,H.current||(X.fitView({padding:.2,duration:800,minZoom:.15}),X.setViewport({x:50,y:50,zoom:.15}),H.current=!0)},nodes:ae,edges:Q,onNodesChange:Kr,onEdgesChange:Re,onMove:et,nodeTypes:Ol,style:{maxHeight:T.length>0?"84%":"90%"},unselectable:"on",minZoom:.001,maxZoom:2,zoomOnDoubleClick:!1,defaultViewport:we,fitViewOptions:{padding:.2},fitView:!(ae.length>70),proOptions:{hideAttribution:!0},onNodeClick:(X,K)=>{K.type==="default"||!a||(T.find(ue=>ue.db_name===E&&ue.table===K.data.label)?$(ue=>ue.filter(Ae=>!(Ae.db_name===E&&Ae.table===K.data.label))):$(ue=>[...ue,{db_name:E,table:K.data.label}]),q(ue=>ue.map(Ae=>{var L;return Ae.id===K.id?{...Ae,data:{...Ae.data,selected:!((L=Ae.data)!=null&&L.selected)}}:Ae})))},children:[b.jsx(ie.MiniMap,{style:{background:"var(--bg-color)",border:"1px solid var(--border-color)",borderRadius:6},nodeColor:X=>"var(--brand-orange)",maskColor:ee?"rgba(44, 44, 44, 0.6)":"rgba(218, 224, 232, 0.6)"}),b.jsx(ie.Background,{}),b.jsx(ie.Controls,{})]}),b.jsx(ai,{isOpen:D,title:"Selected Tables",customFooter:b.jsx("div",{className:"flex justify-end",children:b.jsx("button",{onClick:()=>{k(!1)},className:"bg-gray-100 text-gray-700 px-4 py-2 rounded hover:bg-gray-300 border border-gray-300 dark:bg-gray-800 dark:text-gray-100 dark:hover:bg-white dark:border-gray-400 footer-button",children:"Close"})}),onClose:()=>{k(!1)},body:rs,cancelButtonText:"Cancel"}),M&&B&&b.jsx(ai,{onClose:()=>F(!1),title:`${B.db_name}.${B.label}`,isOpen:M,isUuidSubtitle:!1,subtitle:b.jsxs("div",{className:"flex flex-col gap-1",children:[b.jsxs("div",{className:"flex gap-1 items-center",children:[b.jsx("b",{className:"text-black dark:text-gray-200",children:"Column Name:"}),b.jsx("span",{className:"dark:text-gray-300",children:B.schema[0].title})]}),b.jsxs("div",{className:"flex gap-1 items-center",children:[b.jsx("b",{className:"text-black dark:text-gray-200",children:"Current Mapping:"}),b.jsx("span",{className:"dark:text-gray-300",children:((Ti=B.schema[0].attribute_mapping)==null?void 0:Ti.label)??"-"})]})]}),body:ss,onConfirm:Nl}),b.jsx(ai,{isOpen:J,title:"Scan Selected Tables",onClose:()=>{he||le(!1)},onConfirm:()=>{he||ns()},confirmButtonText:he?"Scanning...":"Start Scan",disableConfirm:he,body:is,customWidth:"w-full max-w-lg",customFooter:b.jsxs("div",{className:"flex justify-between mt-4 space-x-2",children:[b.jsx("button",{onClick:()=>{he||le(!1)},disabled:he,className:"bg-gray-100 text-gray-700 px-4 py-2 rounded hover:bg-gray-300 border border-gray-300 dark:bg-gray-800 dark:text-gray-100 dark:hover:bg-white dark:border-gray-400 footer-button",children:"Cancel"}),b.jsx("button",{onClick:()=>{he||ns()},disabled:he,className:"bg-brand-primary text-white px-4 py-2 rounded-md hover:bg-[#0b86e6] footer-button",children:he?"Scanning...":"Start Scan"})]})})]})},jk=({children:e,customProviders:t=[],onToastShow:n,themeConfig:r,defaultTheme:i})=>[...[({children:a})=>b.jsx(M1,{defaultTheme:i,config:r,children:a}),ob,({children:a})=>b.jsx(eb,{onToastShow:n,children:a})],...t].reduceRight((a,l)=>b.jsx(l,{children:a}),b.jsx(b.Fragment,{children:e})),Bk=({callback:e,onScroll:t=!0,onResize:n=!0,onEscape:r=!0})=>{const i=x.useRef(null);return x.useEffect(()=>{const o=l=>{var c;i.current&&((c=l.target)!=null&&c.closest("[data-dropdown-ref]")||i.current.contains(l.target)||e())},s=()=>{e()},a=l=>{l.key==="Escape"&&r&&e()};return document.addEventListener("mousedown",o),t&&window.addEventListener("scroll",s),n&&window.addEventListener("resize",s),r&&document.addEventListener("keydown",a),()=>{document.removeEventListener("mousedown",o),t&&window.removeEventListener("scroll",s),n&&window.removeEventListener("resize",s),r&&document.removeEventListener("keydown",a)}},[e,t,n,r]),i};let zu=null,Pv=null,Fv=null,$p=!1;function $k(){if(!$p){$p=!0;try{const e=require("react-redux"),t=require("@reduxjs/toolkit");zu=e.useDispatch,Pv=e.useSelector,Fv=t.createSelector}catch{}}}const Vk=e=>{const{metric:t,fetchFunction:n,cacheKey:r,...i}=e,[o,s]=x.useState({}),[a,l]=x.useState(!1),[c,u]=x.useState(null),d=x.useMemo(()=>r||`${t}_${JSON.stringify(i)}`,[r,t,JSON.stringify(i)]);return $k(),zu&&Pv&&Fv&&!zu()?Vp({metric:t,fetchFunction:n,cacheKey:d,...i}):Vp({metric:t,fetchFunction:n,cacheKey:d,...i})};function Vp(e){const{fetchFunction:t,cacheKey:n}=e,[r,i]=x.useState({}),[o,s]=x.useState(!1),[a,l]=x.useState(null),c=r[n||""]||{data:null,loading:!1,error:null};x.useEffect(()=>{!c.data&&!c.loading&&t&&(s(!0),t(e).then(d=>{i(f=>({...f,[n||""]:{data:d,loading:!1,error:null}})),s(!1)}).catch(d=>{l(d),s(!1)}))},[n,t]);const u=()=>{i(d=>{const f={...d};return delete f[n||""],f})};return{data:c.data,loading:c.loading||o,error:c.error||a,clearCache:u}}const rl=(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(!rl(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)||!rl(e[i],t[i]))return!1;return!0},Gk=(e,t)=>{const n=["country_iso2","department_name"];for(const r of n)if(!rl(e[r],t[r]))return!1;return!0};exports.Alert=Zv;exports.ApiMetric=Yp;exports.CHECKBOX_STYLE=ou;exports.CSVImporter=q_;exports.CSVType=Zp;exports.ChartHeader=t3;exports.ComponentErrorBoundary=L_;exports.ConfidenceScoreTooltip=hb;exports.ConfirmationModal=k_;exports.ContextProvider=jk;exports.CountryBox=H_;exports.CustomLegends=Sd;exports.DbSchemaBrowser=Lk;exports.DonutChart=OA;exports.Dropdown=Tw;exports.ErrorBoundary=D_;exports.FILE_BROWSER_PAGE_SIZE=Vu;exports.FileBrowser=Ok;exports.FileTypeIcon=z_;exports.GaugeChart=$A;exports.GeoChart=Rk;exports.HorizontalBarChart=LA;exports.ImagePreviewModal=Y_;exports.InstallUpdateLoader=X_;exports.Loader=Jv;exports.LoaderProvider=ob;exports.METADATA_KEYS=Fl;exports.Modal=ai;exports.MultiSelect=Po;exports.NOT_APPLICABLE=Mv;exports.NoActiveAttributeWarning=fb;exports.NoDataChart=e3;exports.NotificationType=Jp;exports.PAGE_INDEX=ta;exports.PAGE_SIZE=ea;exports.PAGINATION_INPUT_BUFFER_CH=iu;exports.PieChart=TA;exports.ResourceUsageBadge=j_;exports.RiskScoreLabel=G_;exports.STATUS_BADGE_CLASSES=on;exports.STATUS_CONFIGURATIONS=kc;exports.ScaleType=Ir;exports.ShowMultiData=B_;exports.StatusBadge=yx;exports.StatusIcon=pa;exports.StorageChart=jA;exports.Table=su;exports.TableType=Co;exports.TaskResult=W_;exports.ThemeProvider=M1;exports.Timer=N_;exports.Toast=mx;exports.ToastProvider=eb;exports.ToastType=pt;exports.ToggleSwitch=Cx;exports.ToolTip=gi;exports.VerticalBarChart=DA;exports.cn=Ht;exports.color=Al;exports.commonjsGlobal=al;exports.conditionalClass=ox;exports.convertScanObjectToDbSchema=Av;exports.convertScanObjectToFiledata=$u;exports.deepEqual=rl;exports.extractAttributeMapping=Gu;exports.extractConfidenceMetadata=Rv;exports.formatBytes=zd;exports.formatDateTime=_v;exports.getConfidenceColor=kv;exports.getDefaultExportFromCjs=ll;exports.getRiskLevel=wd;exports.getRiskScoreInfo=cb;exports.getStatusConfig=Wu;exports.globalFiltersEqual=Gk;exports.interpolateRgb=lR;exports.isChildPath=Bu;exports.isFailedStatus=vx;exports.isHighRisk=V_;exports.isReduxAvailable=rb;exports.isRunningStatus=bx;exports.isSuccessStatus=xx;exports.switchClass=sx;exports.ucwords=Iv;exports.useApiCache=Vk;exports.useAppDispatch=tb;exports.useAppSelector=nb;exports.useAssetPath=ub;exports.useBodyScrollLock=Hu;exports.useClickOutside=Bk;exports.useDebounce=Ev;exports.useFileIconPath=db;exports.useFilterCache=sb;exports.useLoader=xl;exports.useTheme=_l;exports.useToast=yd;