@deepfrog/pangents-widget 2.2.2 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -17
- package/dist/Widget.d.ts +4 -1
- package/dist/components/ChatbotWidget.d.ts +2 -0
- package/dist/components/CountryCodePicker.d.ts +9 -0
- package/dist/components/WidgetPopup.d.ts +2 -1
- package/dist/context/ChatContext.d.ts +5 -1
- package/dist/index.cjs.js +2 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +10 -16
- package/dist/index.es.js.map +1 -1
- package/dist/index.html +837 -0
- package/dist/pages/DataAgent/Components/AIAnswerRenderer.d.ts +6 -0
- package/dist/pages/DataAgent/Components/ChatHistory.d.ts +14 -0
- package/dist/pages/DataAgent/Components/ChatInput.d.ts +10 -0
- package/dist/pages/DataAgent/Components/DataAgentHeader.d.ts +8 -0
- package/dist/pages/DataAgent/Components/MessageBubble.d.ts +8 -0
- package/dist/pages/DataAgent/Components/WelcomeScreen.d.ts +6 -0
- package/dist/pages/DataAgent/Components/index.d.ts +5 -0
- package/dist/pages/DataAgent/index.d.ts +1 -0
- package/dist/pages/DataAgentV2/Components/AIAnswerRenderer.d.ts +6 -0
- package/dist/pages/DataAgentV2/Components/ChartRenderer.d.ts +10 -0
- package/dist/pages/DataAgentV2/Components/ChatHistory.d.ts +14 -0
- package/dist/pages/DataAgentV2/Components/ChatInput.d.ts +34 -0
- package/dist/pages/DataAgentV2/Components/DataAgentHeader.d.ts +9 -0
- package/dist/pages/DataAgentV2/Components/LoadingStepper.d.ts +5 -0
- package/dist/pages/DataAgentV2/Components/MessageBubble.d.ts +9 -0
- package/dist/pages/DataAgentV2/Components/WelcomeScreen.d.ts +6 -0
- package/dist/pages/DataAgentV2/Components/index.d.ts +5 -0
- package/dist/pages/DataAgentV2/index.d.ts +1 -0
- package/dist/pages/EmailLeads/LeadAction.d.ts +1 -0
- package/dist/pangents-widget.css +1 -1
- package/dist/preview-isolation.html +1 -0
- package/dist/preview-new.html +1 -0
- package/dist/preview-playground.html +792 -0
- package/dist/preview-production.html +293 -0
- package/dist/preview-staging.html +293 -0
- package/dist/preview.html +3 -4
- package/dist/services/api/client.d.ts +3 -0
- package/dist/services/api/dataAgentService.d.ts +38 -0
- package/dist/services/api/dataAgentServiceV2.d.ts +40 -0
- package/dist/services/api/emailLeadsService.d.ts +35 -0
- package/dist/services/mock/mockDataAgentService.d.ts +34 -0
- package/dist/services/mock/mockDataAgentServiceV2.d.ts +34 -0
- package/dist/stores/dataAgentStore.d.ts +37 -0
- package/dist/stores/dataAgentStoreV2.d.ts +40 -0
- package/dist/types/dataAgent.d.ts +37 -0
- package/dist/types/dataAgentV2.d.ts +97 -0
- package/dist/types/email.d.ts +28 -0
- package/dist/types/index.d.ts +0 -2
- package/dist/utils/countryCodes.d.ts +11 -0
- package/dist/widget-embed-CmAr6iD-.cjs.js +90 -0
- package/dist/widget-embed-CmAr6iD-.cjs.js.map +1 -0
- package/dist/widget-embed-DgNAEfZX.es.js +83784 -0
- package/dist/widget-embed-DgNAEfZX.es.js.map +1 -0
- package/dist/widget-embed.cjs.js +2 -2
- package/dist/widget-embed.d.ts +3 -0
- package/dist/widget-embed.es.js +2 -2
- package/dist/widget.js +76792 -23925
- package/package.json +5 -1
- package/dist/widget-embed-DCSN_j6Y.cjs.js +0 -46
- package/dist/widget-embed-DCSN_j6Y.cjs.js.map +0 -1
- package/dist/widget-embed-DzLM7DN8.es.js +0 -29838
- package/dist/widget-embed-DzLM7DN8.es.js.map +0 -1
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
|
|
2
|
+
(function() {
|
|
3
|
+
try {
|
|
4
|
+
if (typeof window !== 'undefined') {
|
|
5
|
+
window.__PANGENTS_WIDGET_CSS = "*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: \"\"}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",Segoe UI Symbol,\"Noto Color Emoji\";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:host,.pg-widget-root{--background: 0 0% 100%;--foreground: 0 0% 3.9%;--card: 0 0% 100%;--card-foreground: 0 0% 3.9%;--popover: 0 0% 100%;--popover-foreground: 0 0% 3.9%;--primary: 0 0% 9%;--primary-foreground: 0 0% 98%;--secondary: 0 0% 96.1%;--secondary-foreground: 0 0% 9%;--muted: 0 0% 96.1%;--muted-foreground: 0 0% 45.1%;--accent: 0 0% 96.1%;--accent-foreground: 0 0% 9%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 0 0% 98%;--border: 0 0% 89.8%;--input: 0 0% 89.8%;--ring: 0 0% 3.9%;--chart-1: 12 76% 61%;--chart-2: 173 58% 39%;--chart-3: 197 37% 24%;--chart-4: 43 74% 66%;--chart-5: 27 87% 67%;--radius: .5rem}:host(.pg-dark),.pg-widget-root.pg-dark{--background: 0 0% 3.9%;--foreground: 0 0% 98%;--card: 0 0% 3.9%;--card-foreground: 0 0% 98%;--popover: 0 0% 3.9%;--popover-foreground: 0 0% 98%;--primary: 0 0% 98%;--primary-foreground: 0 0% 9%;--secondary: 0 0% 14.9%;--secondary-foreground: 0 0% 98%;--muted: 0 0% 14.9%;--muted-foreground: 0 0% 63.9%;--accent: 0 0% 14.9%;--accent-foreground: 0 0% 98%;--destructive: 0 62.8% 30.6%;--destructive-foreground: 0 0% 98%;--border: 0 0% 14.9%;--input: 0 0% 14.9%;--ring: 0 0% 83.1%;--chart-1: 220 70% 50%;--chart-2: 160 60% 45%;--chart-3: 30 80% 55%;--chart-4: 280 65% 60%;--chart-5: 340 75% 55%}*{border-color:hsl(var(--border))}.pg-widget-root{background-color:hsl(var(--background));color:hsl(var(--foreground))}.\\!container{width:100%!important;margin-right:auto!important;margin-left:auto!important}.container{width:100%;margin-right:auto;margin-left:auto}@media(min-width:640px){.\\!container{max-width:640px!important}.container{max-width:640px}}@media(min-width:768px){.\\!container{max-width:768px!important}.container{max-width:768px}}@media(min-width:1024px){.\\!container{max-width:1024px!important}.container{max-width:1024px}}@media(min-width:1280px){.\\!container{max-width:1280px!important}.container{max-width:1280px}}@media(min-width:1536px){.\\!container{max-width:1536px!important}.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-\\[-4px\\]{top:-4px;right:-4px;bottom:-4px;left:-4px}.-right-1{right:-.25rem}.-top-1{top:-.25rem}.bottom-0{bottom:0}.bottom-6{bottom:1.5rem}.left-0{left:0}.left-2\\.5{left:.625rem}.left-3{left:.75rem}.left-6{left:1.5rem}.right-0{right:0}.right-2{right:.5rem}.right-3{right:.75rem}.right-6{right:1.5rem}.top-0{top:0}.top-1\\/2{top:50%}.top-6{top:1.5rem}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-50{z-index:50}.col-span-2{grid-column:span 2 / span 2}.col-span-full{grid-column:1 / -1}.mx-0\\.5{margin-left:.125rem;margin-right:.125rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-3{margin-top:.75rem;margin-bottom:.75rem}.my-4{margin-top:1rem;margin-bottom:1rem}.-ml-1{margin-left:-.25rem}.-mt-0\\.5{margin-top:-.125rem}.mb-0\\.5{margin-bottom:.125rem}.mb-1{margin-bottom:.25rem}.mb-1\\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-0\\.5{margin-left:.125rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mt-0\\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-2\\.5{margin-top:.625rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-auto{margin-top:auto}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-0\\.5{height:.125rem}.h-1{height:.25rem}.h-1\\.5{height:.375rem}.h-10{height:2.5rem}.h-12{height:3rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\\.5{height:.625rem}.h-20{height:5rem}.h-24{height:6rem}.h-3{height:.75rem}.h-3\\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\\[18px\\]{height:18px}.h-\\[1px\\]{height:1px}.h-\\[2px\\]{height:2px}.h-\\[3px\\]{height:3px}.h-auto{height:auto}.h-full{height:100%}.max-h-40{max-height:10rem}.max-h-48{max-height:12rem}.max-h-60{max-height:15rem}.max-h-64{max-height:16rem}.max-h-80{max-height:20rem}.max-h-96{max-height:24rem}.max-h-\\[120px\\]{max-height:120px}.min-h-0{min-height:0px}.min-h-\\[110px\\]{min-height:110px}.min-h-\\[120px\\]{min-height:120px}.min-h-\\[130px\\]{min-height:130px}.min-h-\\[140px\\]{min-height:140px}.min-h-\\[36px\\]{min-height:36px}.min-h-full{min-height:100%}.min-h-screen{min-height:100vh}.w-1\\.5{width:.375rem}.w-10{width:2.5rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\\.5{width:.625rem}.w-20{width:5rem}.w-28{width:7rem}.w-3{width:.75rem}.w-3\\.5{width:.875rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-80{width:20rem}.w-9{width:2.25rem}.w-\\[18px\\]{width:18px}.w-\\[3px\\]{width:3px}.w-full{width:100%}.w-px{width:1px}.min-w-0{min-width:0px}.min-w-\\[20px\\]{min-width:20px}.min-w-full{min-width:100%}.max-w-2xl{max-width:42rem}.max-w-4xl{max-width:56rem}.max-w-6xl{max-width:72rem}.max-w-\\[220px\\]{max-width:220px}.max-w-\\[80\\%\\]{max-width:80%}.max-w-\\[85\\%\\]{max-width:85%}.max-w-full{max-width:100%}.max-w-md{max-width:28rem}.max-w-none{max-width:none}.max-w-sm{max-width:24rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.-translate-y-1\\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-105{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.resize{resize:both}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-\\[2px\\]{gap:2px}.gap-y-2{row-gap:.5rem}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-0\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-none{border-radius:0}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:.75rem}.rounded-tl-md{border-top-left-radius:calc(var(--radius) - 2px)}.rounded-tr-md{border-top-right-radius:calc(var(--radius) - 2px)}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l-4{border-left-width:4px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-none{border-style:none}.border-amber-200{--tw-border-opacity: 1;border-color:rgb(253 230 138 / var(--tw-border-opacity, 1))}.border-blue-200{--tw-border-opacity: 1;border-color:rgb(191 219 254 / var(--tw-border-opacity, 1))}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.border-blue-600{--tw-border-opacity: 1;border-color:rgb(37 99 235 / var(--tw-border-opacity, 1))}.border-gray-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity, 1))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.border-green-200{--tw-border-opacity: 1;border-color:rgb(187 247 208 / var(--tw-border-opacity, 1))}.border-input{border-color:hsl(var(--input))}.border-orange-200{--tw-border-opacity: 1;border-color:rgb(254 215 170 / var(--tw-border-opacity, 1))}.border-orange-500{--tw-border-opacity: 1;border-color:rgb(249 115 22 / var(--tw-border-opacity, 1))}.border-primary{border-color:hsl(var(--primary))}.border-red-200{--tw-border-opacity: 1;border-color:rgb(254 202 202 / var(--tw-border-opacity, 1))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.border-transparent{border-color:transparent}.border-white{--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity, 1))}.border-yellow-200{--tw-border-opacity: 1;border-color:rgb(254 240 138 / var(--tw-border-opacity, 1))}.border-t-blue-500{--tw-border-opacity: 1;border-top-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.bg-amber-100{--tw-bg-opacity: 1;background-color:rgb(254 243 199 / var(--tw-bg-opacity, 1))}.bg-amber-50{--tw-bg-opacity: 1;background-color:rgb(255 251 235 / var(--tw-bg-opacity, 1))}.bg-amber-500{--tw-bg-opacity: 1;background-color:rgb(245 158 11 / var(--tw-bg-opacity, 1))}.bg-background{background-color:hsl(var(--background))}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.bg-black\\/10{background-color:#0000001a}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.bg-card{background-color:hsl(var(--card))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity, 1))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.bg-gray-50\\/50{background-color:#f9fafb80}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.bg-green-50{--tw-bg-opacity: 1;background-color:rgb(240 253 244 / var(--tw-bg-opacity, 1))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-indigo-50{--tw-bg-opacity: 1;background-color:rgb(238 242 255 / var(--tw-bg-opacity, 1))}.bg-muted{background-color:hsl(var(--muted))}.bg-orange-100{--tw-bg-opacity: 1;background-color:rgb(255 237 213 / var(--tw-bg-opacity, 1))}.bg-orange-50{--tw-bg-opacity: 1;background-color:rgb(255 247 237 / var(--tw-bg-opacity, 1))}.bg-orange-500{--tw-bg-opacity: 1;background-color:rgb(249 115 22 / var(--tw-bg-opacity, 1))}.bg-purple-100{--tw-bg-opacity: 1;background-color:rgb(243 232 255 / var(--tw-bg-opacity, 1))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity, 1))}.bg-secondary{background-color:hsl(var(--secondary))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-white\\/20{background-color:#fff3}.bg-white\\/30{background-color:#ffffff4d}.bg-white\\/80{background-color:#fffc}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity, 1))}.bg-yellow-200{--tw-bg-opacity: 1;background-color:rgb(254 240 138 / var(--tw-bg-opacity, 1))}.bg-yellow-50{--tw-bg-opacity: 1;background-color:rgb(254 252 232 / var(--tw-bg-opacity, 1))}.bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity, 1))}.bg-yellow-600{--tw-bg-opacity: 1;background-color:rgb(202 138 4 / var(--tw-bg-opacity, 1))}.bg-opacity-50{--tw-bg-opacity: .5}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-t{background-image:linear-gradient(to top,var(--tw-gradient-stops))}.from-gray-100{--tw-gradient-from: #f3f4f6 var(--tw-gradient-from-position);--tw-gradient-to: rgb(243 244 246 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-gray-50{--tw-gradient-from: #f9fafb var(--tw-gradient-from-position);--tw-gradient-to: rgb(249 250 251 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-gray-200{--tw-gradient-to: #e5e7eb var(--tw-gradient-to-position)}.to-white{--tw-gradient-to: #fff var(--tw-gradient-to-position)}.fill-current{fill:currentColor}.fill-yellow-400{fill:#facc15}.object-contain{-o-object-fit:contain;object-fit:contain}.p-0{padding:0}.p-0\\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\\.5{padding:.375rem}.p-2{padding:.5rem}.p-2\\.5{padding:.625rem}.p-3{padding:.75rem}.p-3\\.5{padding:.875rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-1{padding-bottom:.25rem}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pb-6{padding-bottom:1.5rem}.pb-8{padding-bottom:2rem}.pl-10{padding-left:2.5rem}.pl-8{padding-left:2rem}.pl-9{padding-left:2.25rem}.pr-10{padding-right:2.5rem}.pr-3{padding-right:.75rem}.pr-4{padding-right:1rem}.pt-0{padding-top:0}.pt-0\\.5{padding-top:.125rem}.pt-2{padding-top:.5rem}.pt-2\\.5{padding-top:.625rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.pt-5{padding-top:1.25rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[13px\\]{font-size:13px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-6{line-height:1.5rem}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.text-amber-500{--tw-text-opacity: 1;color:rgb(245 158 11 / var(--tw-text-opacity, 1))}.text-amber-600{--tw-text-opacity: 1;color:rgb(217 119 6 / var(--tw-text-opacity, 1))}.text-amber-700{--tw-text-opacity: 1;color:rgb(180 83 9 / var(--tw-text-opacity, 1))}.text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-blue-800{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity, 1))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.text-green-800{--tw-text-opacity: 1;color:rgb(22 101 52 / var(--tw-text-opacity, 1))}.text-indigo-600{--tw-text-opacity: 1;color:rgb(79 70 229 / var(--tw-text-opacity, 1))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-orange-600{--tw-text-opacity: 1;color:rgb(234 88 12 / var(--tw-text-opacity, 1))}.text-orange-700{--tw-text-opacity: 1;color:rgb(194 65 12 / var(--tw-text-opacity, 1))}.text-primary{color:hsl(var(--primary))}.text-purple-800{--tw-text-opacity: 1;color:rgb(107 33 168 / var(--tw-text-opacity, 1))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity, 1))}.text-red-800{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity, 1))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity, 1))}.text-yellow-600{--tw-text-opacity: 1;color:rgb(202 138 4 / var(--tw-text-opacity, 1))}.text-yellow-800{--tw-text-opacity: 1;color:rgb(133 77 14 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.placeholder-gray-400::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}.placeholder-gray-400::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}.opacity-25{opacity:.25}.opacity-50{opacity:.5}.opacity-75{opacity:.75}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-blue-50{--tw-shadow-color: #eff6ff;--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-inset{--tw-ring-inset: inset}.ring-gray-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity, 1))}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-lg{--tw-drop-shadow: drop-shadow(0 10px 8px rgb(0 0 0 / .04)) drop-shadow(0 4px 3px rgb(0 0 0 / .1));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-shadow{transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.duration-150{animation-duration:.15s}.duration-200{animation-duration:.2s}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.running{animation-play-state:running}:root{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\";line-height:1.5;font-weight:400;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.widget-bubble-button svg{width:2rem!important;height:2rem!important}.widget-bubble-button img{width:2rem!important;height:2rem!important;max-width:2rem!important}.widget-toast{position:relative!important;max-width:calc(100% - 20px)!important;margin:0 auto!important}[data-sonner-toaster]{position:absolute!important;width:100%!important;max-width:100%!important}[data-sonner-toaster] [data-sonner-toast]{max-width:calc(100% - 20px)!important;margin:0 auto!important}@media screen and (-webkit-min-device-pixel-ratio:2){.widget-container{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}*{text-rendering:optimizeLegibility}.mac-optimized-padding{padding:.75rem!important}button{letter-spacing:.025em}}@supports (-webkit-appearance: none){input[type=text],input[type=email],input[type=password],input[type=date],input[type=time],select{-webkit-appearance:none;border-radius:.375rem}.flex{display:flex}}@media(max-width:450px){html{font-size:14px}.text-xs{font-size:.7rem!important}.text-sm{font-size:.8rem!important}}@media(max-width:380px){html{font-size:13px}.text-xs{font-size:.65rem!important}.text-sm{font-size:.75rem!important}}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:#0000001a;border-radius:10px}::-webkit-scrollbar-thumb:hover{background:#0003}.dark ::-webkit-scrollbar-thumb{background:#ffffff1a}.dark ::-webkit-scrollbar-thumb:hover{background:#fff3}@keyframes shimmer{0%{transform:translate(-100%)}to{transform:translate(100%)}}@keyframes shimmerVertical{0%{transform:translateY(100%)}to{transform:translateY(-100%)}}@keyframes sidebarShimmer{0%{transform:translateY(100%)}to{transform:translateY(-100%)}}@keyframes headerShimmer{0%{background-position:0% 0%}to{background-position:100% 0%}}.ai-answer-container{line-height:1.6}.table-scroll{width:100%;max-width:100%;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}.ai-table{width:-moz-max-content;width:max-content;min-width:100%;border-collapse:collapse}.shaky-gradient{filter:blur(24px);transform-origin:center;background-size:200% 200%;animation:shakyMotion 2s steps(1) infinite}@keyframes shakyMotion{0%{background-position:40% 60%;transform:scale(1.1) translate(0) rotate(0)}10%{background-position:45% 55%;transform:scale(1.12) translate(-6px,4px) rotate(.3deg)}20%{background-position:50% 65%;transform:scale(1.15) translate(8px,-6px) rotate(-.4deg)}30%{background-position:55% 50%;transform:scale(1.13) translate(-10px,8px) rotate(.6deg)}40%{background-position:48% 58%;transform:scale(1.14) translate(6px,-4px) rotate(-.5deg)}50%{background-position:60% 45%;transform:scale(1.16) translate(-8px,6px) rotate(.4deg)}70%{background-position:52% 62%;transform:scale(1.13) translate(10px,-6px) rotate(-.3deg)}to{background-position:40% 60%;transform:scale(1.1) translate(0) rotate(0)}}.file\\:border-0::file-selector-button{border-width:0px}.file\\:bg-transparent::file-selector-button{background-color:transparent}.file\\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:font-medium::file-selector-button{font-weight:500}.file\\:text-foreground::file-selector-button{color:hsl(var(--foreground))}.placeholder\\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.focus-within\\:border-gray-300:focus-within{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.focus-within\\:shadow-md:focus-within{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\\:border-blue-300:hover{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity, 1))}.hover\\:border-gray-300:hover{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.hover\\:border-transparent:hover{border-color:transparent}.hover\\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\\:bg-amber-600:hover{--tw-bg-opacity: 1;background-color:rgb(217 119 6 / var(--tw-bg-opacity, 1))}.hover\\:bg-blue-50:hover{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.hover\\:bg-blue-600:hover{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.hover\\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity, 1))}.hover\\:bg-destructive\\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.hover\\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.hover\\:bg-gray-200\\/60:hover{background-color:#e5e7eb99}.hover\\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.hover\\:bg-green-50:hover{--tw-bg-opacity: 1;background-color:rgb(240 253 244 / var(--tw-bg-opacity, 1))}.hover\\:bg-red-50:hover{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.hover\\:bg-red-700:hover{--tw-bg-opacity: 1;background-color:rgb(185 28 28 / var(--tw-bg-opacity, 1))}.hover\\:bg-secondary\\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\\:bg-white\\/10:hover{background-color:#ffffff1a}.hover\\:bg-white\\/40:hover{background-color:#fff6}.hover\\:bg-white\\/60:hover{background-color:#fff9}.hover\\:bg-yellow-700:hover{--tw-bg-opacity: 1;background-color:rgb(161 98 7 / var(--tw-bg-opacity, 1))}.hover\\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\\:text-blue-800:hover{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.hover\\:text-gray-600:hover{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.hover\\:text-gray-700:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.hover\\:text-gray-800:hover{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.hover\\:text-gray-900:hover{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.hover\\:text-green-600:hover{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.hover\\:text-red-500:hover{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.hover\\:text-red-600:hover{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.hover\\:text-red-800:hover{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity, 1))}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:opacity-90:hover{opacity:.9}.hover\\:shadow-lg:hover{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\\:shadow-md:hover{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\\:shadow-xl:hover{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\\:\\[background-color\\:var\\(--hover-bg\\)\\]:hover{background-color:var(--hover-bg)}.focus\\:border-transparent:focus{border-color:transparent}.focus\\:bg-blue-500\\/60:focus{background-color:#3b82f699}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity, 1))}.focus\\:ring-indigo-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity, 1))}.focus\\:ring-red-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity, 1))}.focus\\:ring-yellow-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(234 179 8 / var(--tw-ring-opacity, 1))}.focus\\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:ring-1:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.active\\:scale-95:active{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\\:bg-accent\\/80:active{background-color:hsl(var(--accent) / .8)}.active\\:bg-destructive\\/95:active{background-color:hsl(var(--destructive) / .95)}.active\\:bg-secondary\\/90:active{background-color:hsl(var(--secondary) / .9)}.active\\:underline:active{text-decoration-line:underline}.active\\:\\[background-color\\:var\\(--active-bg\\)\\]:active{background-color:var(--active-bg)}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-40:disabled{opacity:.4}.disabled\\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\\:scale-105{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\\:text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.data-\\[state\\=active\\]\\:bg-background[data-state=active]{background-color:hsl(var(--background))}.data-\\[state\\=active\\]\\:text-foreground[data-state=active]{color:hsl(var(--foreground))}.data-\\[state\\=active\\]\\:shadow[data-state=active]{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}@media(min-width:640px){.sm\\:mx-0{margin-left:0;margin-right:0}.sm\\:my-8{margin-top:2rem;margin-bottom:2rem}.sm\\:ml-3{margin-left:.75rem}.sm\\:ml-4{margin-left:1rem}.sm\\:mt-0{margin-top:0}.sm\\:inline{display:inline}.sm\\:flex{display:flex}.sm\\:hidden{display:none}.sm\\:h-10{height:2.5rem}.sm\\:w-10{width:2.5rem}.sm\\:w-auto{width:auto}.sm\\:w-full{width:100%}.sm\\:max-w-lg{max-width:32rem}.sm\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\\:flex-row-reverse{flex-direction:row-reverse}.sm\\:items-start{align-items:flex-start}.sm\\:items-center{align-items:center}.sm\\:p-0{padding:0}.sm\\:p-4{padding:1rem}.sm\\:p-6{padding:1.5rem}.sm\\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\\:pb-4{padding-bottom:1rem}.sm\\:text-left{text-align:left}}@media(min-width:768px){.md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.md\\:text-sm{font-size:.875rem;line-height:1.25rem}}@media(min-width:1024px){.lg\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}.\\[\\&_svg\\]\\:pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:size-4 svg{width:1rem;height:1rem}.\\[\\&_svg\\]\\:shrink-0 svg{flex-shrink:0}\n";
|
|
6
|
+
}
|
|
7
|
+
} catch (error) {}
|
|
8
|
+
})();
|
|
9
|
+
"use strict";var e,t,n,r,i,a,o,s,A,l,c,u,d,h,p,f,m,g,y,v,w,x,b,B,C,E,k,S,F,Q,j,U,O,N,I,T,P,M,D,L,H,_,R,K,z,V,$,W,G,q,X,Y,J,Z,ee,te,ne,re,ie,ae,oe,se,Ae,le,ce,ue,de,he,pe,fe,me,ge,ye,ve,we,xe,be,Be,Ce,Ee=Object.defineProperty,ke=e=>{throw TypeError(e)},Se=(e,t,n)=>((e,t,n)=>t in e?Ee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),Fe=(e,t,n)=>t.has(e)||ke("Cannot "+n),Qe=(e,t,n)=>(Fe(e,t,"read from private field"),n?n.call(e):t.get(e)),je=(e,t,n)=>t.has(e)?ke("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Ue=(e,t,n,r)=>(Fe(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Oe=(e,t,n)=>(Fe(e,t,"access private method"),n),Ne=(e,t,n,r)=>({set _(r){Ue(e,t,r,n)},get _(){return Qe(e,t,r)}});const Ie=require("react/jsx-runtime"),Te=require("react"),Pe=require("react-dom");function Me(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const n in e)if("default"!==n){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 De=Me(Te);var Le=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},He={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},_e=new(n=class{constructor(){je(this,e,He),je(this,t,!1)}setTimeoutProvider(n){"production"!==process.env.NODE_ENV&&Qe(this,t)&&n!==Qe(this,e)&&console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.",{previous:Qe(this,e),provider:n}),Ue(this,e,n),"production"!==process.env.NODE_ENV&&Ue(this,t,!1)}setTimeout(n,r){return"production"!==process.env.NODE_ENV&&Ue(this,t,!0),Qe(this,e).setTimeout(n,r)}clearTimeout(t){Qe(this,e).clearTimeout(t)}setInterval(n,r){return"production"!==process.env.NODE_ENV&&Ue(this,t,!0),Qe(this,e).setInterval(n,r)}clearInterval(t){Qe(this,e).clearInterval(t)}},e=new WeakMap,t=new WeakMap,n);var Re="undefined"==typeof window||"Deno"in globalThis;function Ke(){}function ze(e){return"number"==typeof e&&e>=0&&e!==1/0}function Ve(e,t){return Math.max(e+(t||0)-Date.now(),0)}function $e(e,t){return"function"==typeof e?e(t):e}function We(e,t){return"function"==typeof e?e(t):e}function Ge(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o)if(r){if(t.queryHash!==Xe(o,t.options))return!1}else if(!Je(t.queryKey,o))return!1;if("all"!==n){const e=t.isActive();if("active"===n&&!e)return!1;if("inactive"===n&&e)return!1}return("boolean"!=typeof s||t.isStale()===s)&&((!i||i===t.state.fetchStatus)&&!(a&&!a(t)))}function qe(e,t){const{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(Ye(t.options.mutationKey)!==Ye(a))return!1}else if(!Je(t.options.mutationKey,a))return!1}return(!r||t.state.status===r)&&!(i&&!i(t))}function Xe(e,t){return((null==t?void 0:t.queryKeyHashFn)||Ye)(e)}function Ye(e){return JSON.stringify(e,(e,t)=>rt(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function Je(e,t){return e===t||typeof e==typeof t&&(!(!e||!t||"object"!=typeof e||"object"!=typeof t)&&Object.keys(t).every(n=>Je(e[n],t[n])))}var Ze=Object.prototype.hasOwnProperty;function et(e,t){if(e===t)return e;const n=nt(e)&&nt(t);if(!(n||rt(e)&&rt(t)))return t;const r=(n?e:Object.keys(e)).length,i=n?t:Object.keys(t),a=i.length,o=n?new Array(a):{};let s=0;for(let A=0;A<a;A++){const a=n?A:i[A],l=e[a],c=t[a];if(l===c){o[a]=l,(n?A<r:Ze.call(e,a))&&s++;continue}if(null===l||null===c||"object"!=typeof l||"object"!=typeof c){o[a]=c;continue}const u=et(l,c);o[a]=u,u===l&&s++}return r===a&&s===r?e:o}function tt(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function nt(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function rt(e){if(!it(e))return!1;const t=e.constructor;if(void 0===t)return!0;const n=t.prototype;return!!it(n)&&(!!n.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(e)===Object.prototype)}function it(e){return"[object Object]"===Object.prototype.toString.call(e)}function at(e,t,n){if("function"==typeof n.structuralSharing)return n.structuralSharing(e,t);if(!1!==n.structuralSharing){if("production"!==process.env.NODE_ENV)try{return et(e,t)}catch(r){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${n.queryHash}]: ${r}`),r}return et(e,t)}return t}function ot(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function st(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var At=Symbol();function lt(e,t){return"production"!==process.env.NODE_ENV&&e.queryFn===At&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&(null==t?void 0:t.initialPromise)?()=>t.initialPromise:e.queryFn&&e.queryFn!==At?e.queryFn:()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`))}function ct(e,t){return"function"==typeof e?e(...t):!!e}var ut=new(o=class extends Le{constructor(){super(),je(this,r),je(this,i),je(this,a),Ue(this,a,e=>{if(!Re&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}})}onSubscribe(){Qe(this,i)||this.setEventListener(Qe(this,a))}onUnsubscribe(){var e;this.hasListeners()||(null==(e=Qe(this,i))||e.call(this),Ue(this,i,void 0))}setEventListener(e){var t;Ue(this,a,e),null==(t=Qe(this,i))||t.call(this),Ue(this,i,e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()}))}setFocused(e){Qe(this,r)!==e&&(Ue(this,r,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){var e;return"boolean"==typeof Qe(this,r)?Qe(this,r):"hidden"!==(null==(e=globalThis.document)?void 0:e.visibilityState)}},r=new WeakMap,i=new WeakMap,a=new WeakMap,o);function dt(){let e,t;const n=new Promise((n,r)=>{e=n,t=r});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.status="pending",n.catch(()=>{}),n.resolve=t=>{r({status:"fulfilled",value:t}),e(t)},n.reject=e=>{r({status:"rejected",reason:e}),t(e)},n}var ht=function(e){setTimeout(e,0)};var pt=function(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=ht;const a=r=>{t?e.push(r):i(()=>{n(r)})};return{batch:a=>{let o;t++;try{o=a()}finally{t--,t||(()=>{const t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})})()}return o},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}(),ft=new(c=class extends Le{constructor(){super(),je(this,s,!0),je(this,A),je(this,l),Ue(this,l,e=>{if(!Re&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}})}onSubscribe(){Qe(this,A)||this.setEventListener(Qe(this,l))}onUnsubscribe(){var e;this.hasListeners()||(null==(e=Qe(this,A))||e.call(this),Ue(this,A,void 0))}setEventListener(e){var t;Ue(this,l,e),null==(t=Qe(this,A))||t.call(this),Ue(this,A,e(this.setOnline.bind(this)))}setOnline(e){Qe(this,s)!==e&&(Ue(this,s,e),this.listeners.forEach(t=>{t(e)}))}isOnline(){return Qe(this,s)}},s=new WeakMap,A=new WeakMap,l=new WeakMap,c);function mt(e){return Math.min(1e3*2**e,3e4)}function gt(e){return"online"!==(e??"online")||ft.isOnline()}var yt=class extends Error{constructor(e){super("CancelledError"),this.revert=null==e?void 0:e.revert,this.silent=null==e?void 0:e.silent}};function vt(e){let t,n=!1,r=0;const i=dt(),a=()=>"pending"!==i.status,o=()=>ut.isFocused()&&("always"===e.networkMode||ft.isOnline())&&e.canRun(),s=()=>gt(e.networkMode)&&e.canRun(),A=e=>{a()||(null==t||t(),i.resolve(e))},l=e=>{a()||(null==t||t(),i.reject(e))},c=()=>new Promise(n=>{var r;t=e=>{(a()||o())&&n(e)},null==(r=e.onPause)||r.call(e)}).then(()=>{var n;t=void 0,a()||null==(n=e.onContinue)||n.call(e)}),u=()=>{if(a())return;let t;const i=0===r?e.initialPromise:void 0;try{t=i??e.fn()}catch(s){t=Promise.reject(s)}Promise.resolve(t).then(A).catch(t=>{var i;if(a())return;const s=e.retry??(Re?0:3),A=e.retryDelay??mt,d="function"==typeof A?A(r,t):A,h=!0===s||"number"==typeof s&&r<s||"function"==typeof s&&s(r,t);var p;!n&&h?(r++,null==(i=e.onFail)||i.call(e,r,t),(p=d,new Promise(e=>{_e.setTimeout(e,p)})).then(()=>o()?void 0:c()).then(()=>{n?l(t):u()})):l(t)})};return{promise:i,status:()=>i.status,cancel:t=>{var n;if(!a()){const r=new yt(t);l(r),null==(n=e.onCancel)||n.call(e,r)}},continue:()=>(null==t||t(),i),cancelRetry:()=>{n=!0},continueRetry:()=>{n=!1},canStart:s,start:()=>(s()?u():c().then(u),i)}}var wt=(d=class{constructor(){je(this,u)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ze(this.gcTime)&&Ue(this,u,_e.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Re?1/0:3e5))}clearGcTimeout(){Qe(this,u)&&(_e.clearTimeout(Qe(this,u)),Ue(this,u,void 0))}},u=new WeakMap,d),xt=(b=class extends wt{constructor(e){super(),je(this,w),je(this,h),je(this,p),je(this,f),je(this,m),je(this,g),je(this,y),je(this,v),Ue(this,v,!1),Ue(this,y,e.defaultOptions),this.setOptions(e.options),this.observers=[],Ue(this,m,e.client),Ue(this,f,Qe(this,m).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,Ue(this,h,Bt(this.options)),this.state=e.state??Qe(this,h),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return null==(e=Qe(this,g))?void 0:e.promise}setOptions(e){if(this.options={...Qe(this,y),...e},this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){const e=Bt(this.options);void 0!==e.data&&(this.setData(e.data,{updatedAt:e.dataUpdatedAt,manual:!0}),Ue(this,h,e))}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||Qe(this,f).remove(this)}setData(e,t){const n=at(this.state.data,e,this.options);return Oe(this,w,x).call(this,{data:n,type:"success",dataUpdatedAt:null==t?void 0:t.updatedAt,manual:null==t?void 0:t.manual}),n}setState(e,t){Oe(this,w,x).call(this,{type:"setState",state:e,setStateOptions:t})}cancel(e){var t,n;const r=null==(t=Qe(this,g))?void 0:t.promise;return null==(n=Qe(this,g))||n.cancel(e),r?r.then(Ke).catch(Ke):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(Qe(this,h))}isActive(){return this.observers.some(e=>!1!==We(e.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===At||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>"static"===$e(e.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(e=0){return void 0===this.state.data||"static"!==e&&(!!this.state.isInvalidated||!Ve(this.state.dataUpdatedAt,e))}onFocus(){var e;const t=this.observers.find(e=>e.shouldFetchOnWindowFocus());null==t||t.refetch({cancelRefetch:!1}),null==(e=Qe(this,g))||e.continue()}onOnline(){var e;const t=this.observers.find(e=>e.shouldFetchOnReconnect());null==t||t.refetch({cancelRefetch:!1}),null==(e=Qe(this,g))||e.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),Qe(this,f).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(Qe(this,g)&&(Qe(this,v)?Qe(this,g).cancel({revert:!0}):Qe(this,g).cancelRetry()),this.scheduleGc()),Qe(this,f).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Oe(this,w,x).call(this,{type:"invalidate"})}async fetch(e,t){var n,r,i,a,o,s,A,l,c,u,d,h;if("idle"!==this.state.fetchStatus&&"rejected"!==(null==(n=Qe(this,g))?void 0:n.status()))if(void 0!==this.state.data&&(null==t?void 0:t.cancelRefetch))this.cancel({silent:!0});else if(Qe(this,g))return Qe(this,g).continueRetry(),Qe(this,g).promise;if(e&&this.setOptions(e),!this.options.queryFn){const e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}"production"!==process.env.NODE_ENV&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const y=new AbortController,b=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(Ue(this,v,!0),y.signal)})},B=()=>{const e=lt(this.options,t),n=(()=>{const e={client:Qe(this,m),queryKey:this.queryKey,meta:this.meta};return b(e),e})();return Ue(this,v,!1),this.options.persister?this.options.persister(e,n,this):e(n)},C=(()=>{const e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:Qe(this,m),state:this.state,fetchFn:B};return b(e),e})();null==(r=this.options.behavior)||r.onFetch(C,this),Ue(this,p,this.state),"idle"!==this.state.fetchStatus&&this.state.fetchMeta===(null==(i=C.fetchOptions)?void 0:i.meta)||Oe(this,w,x).call(this,{type:"fetch",meta:null==(a=C.fetchOptions)?void 0:a.meta}),Ue(this,g,vt({initialPromise:null==t?void 0:t.initialPromise,fn:C.fetchFn,onCancel:e=>{e instanceof yt&&e.revert&&this.setState({...Qe(this,p),fetchStatus:"idle"}),y.abort()},onFail:(e,t)=>{Oe(this,w,x).call(this,{type:"failed",failureCount:e,error:t})},onPause:()=>{Oe(this,w,x).call(this,{type:"pause"})},onContinue:()=>{Oe(this,w,x).call(this,{type:"continue"})},retry:C.options.retry,retryDelay:C.options.retryDelay,networkMode:C.options.networkMode,canRun:()=>!0}));try{const e=await Qe(this,g).start();if(void 0===e)throw"production"!==process.env.NODE_ENV&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),new Error(`${this.queryHash} data is undefined`);return this.setData(e),null==(s=(o=Qe(this,f).config).onSuccess)||s.call(o,e,this),null==(l=(A=Qe(this,f).config).onSettled)||l.call(A,e,this.state.error,this),e}catch(E){if(E instanceof yt){if(E.silent)return Qe(this,g).promise;if(E.revert){if(void 0===this.state.data)throw E;return this.state.data}}throw Oe(this,w,x).call(this,{type:"error",error:E}),null==(u=(c=Qe(this,f).config).onError)||u.call(c,E,this),null==(h=(d=Qe(this,f).config).onSettled)||h.call(d,this.state.data,E,this),E}finally{this.scheduleGc()}}},h=new WeakMap,p=new WeakMap,f=new WeakMap,m=new WeakMap,g=new WeakMap,y=new WeakMap,v=new WeakMap,w=new WeakSet,x=function(e){this.state=(t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...bt(t.data,this.options),fetchMeta:e.meta??null};case"success":const n={...t,data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Ue(this,p,e.manual?n:void 0),n;case"error":const r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),pt.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),Qe(this,f).notify({query:this,type:"updated",action:e})})},b);function bt(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:gt(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}function Bt(e){const t="function"==typeof e.initialData?e.initialData():e.initialData,n=void 0!==t,r=n?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Ct=(G=class extends Le{constructor(e,t){super(),je(this,D),je(this,B),je(this,C),je(this,E),je(this,k),je(this,S),je(this,F),je(this,Q),je(this,j),je(this,U),je(this,O),je(this,N),je(this,I),je(this,T),je(this,P),je(this,M,new Set),this.options=t,Ue(this,B,e),Ue(this,j,null),Ue(this,Q,dt()),this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(Qe(this,C).addObserver(this),Et(Qe(this,C),this.options)?Oe(this,D,L).call(this):this.updateResult(),Oe(this,D,K).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return kt(Qe(this,C),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return kt(Qe(this,C),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Oe(this,D,z).call(this),Oe(this,D,V).call(this),Qe(this,C).removeObserver(this)}setOptions(e){const t=this.options,n=Qe(this,C);if(this.options=Qe(this,B).defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof We(this.options.enabled,Qe(this,C)))throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Oe(this,D,$).call(this),Qe(this,C).setOptions(this.options),t._defaulted&&!tt(this.options,t)&&Qe(this,B).getQueryCache().notify({type:"observerOptionsUpdated",query:Qe(this,C),observer:this});const r=this.hasListeners();r&&St(Qe(this,C),n,this.options,t)&&Oe(this,D,L).call(this),this.updateResult(),!r||Qe(this,C)===n&&We(this.options.enabled,Qe(this,C))===We(t.enabled,Qe(this,C))&&$e(this.options.staleTime,Qe(this,C))===$e(t.staleTime,Qe(this,C))||Oe(this,D,H).call(this);const i=Oe(this,D,_).call(this);!r||Qe(this,C)===n&&We(this.options.enabled,Qe(this,C))===We(t.enabled,Qe(this,C))&&i===Qe(this,P)||Oe(this,D,R).call(this,i)}getOptimisticResult(e){const t=Qe(this,B).getQueryCache().build(Qe(this,B),e),n=this.createResult(t,e);return function(e,t){if(!tt(e.getCurrentResult(),t))return!0;return!1}(this,n)&&(Ue(this,k,n),Ue(this,F,this.options),Ue(this,S,Qe(this,C).state)),n}getCurrentResult(){return Qe(this,k)}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),null==t||t(n),"promise"===n&&(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==Qe(this,Q).status||Qe(this,Q).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(e,n))})}trackProp(e){Qe(this,M).add(e)}getCurrentQuery(){return Qe(this,C)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=Qe(this,B).defaultQueryOptions(e),n=Qe(this,B).getQueryCache().build(Qe(this,B),t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return Oe(this,D,L).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),Qe(this,k)))}createResult(e,t){var n;const r=Qe(this,C),i=this.options,a=Qe(this,k),o=Qe(this,S),s=Qe(this,F),A=e!==r?e.state:Qe(this,E),{state:l}=e;let c,u={...l},d=!1;if(t._optimisticResults){const n=this.hasListeners(),a=!n&&Et(e,t),o=n&&St(e,r,t,i);(a||o)&&(u={...u,...bt(l.data,e.options)}),"isRestoring"===t._optimisticResults&&(u.fetchStatus="idle")}let{error:h,errorUpdatedAt:p,status:f}=u;c=u.data;let m=!1;if(void 0!==t.placeholderData&&void 0===c&&"pending"===f){let e;(null==a?void 0:a.isPlaceholderData)&&t.placeholderData===(null==s?void 0:s.placeholderData)?(e=a.data,m=!0):e="function"==typeof t.placeholderData?t.placeholderData(null==(n=Qe(this,N))?void 0:n.state.data,Qe(this,N)):t.placeholderData,void 0!==e&&(f="success",c=at(null==a?void 0:a.data,e,t),d=!0)}if(t.select&&void 0!==c&&!m)if(a&&c===(null==o?void 0:o.data)&&t.select===Qe(this,U))c=Qe(this,O);else try{Ue(this,U,t.select),c=t.select(c),c=at(null==a?void 0:a.data,c,t),Ue(this,O,c),Ue(this,j,null)}catch(B){Ue(this,j,B)}Qe(this,j)&&(h=Qe(this,j),c=Qe(this,O),p=Date.now(),f="error");const g="fetching"===u.fetchStatus,y="pending"===f,v="error"===f,w=y&&g,x=void 0!==c,b={status:f,fetchStatus:u.fetchStatus,isPending:y,isSuccess:"success"===f,isError:v,isInitialLoading:w,isLoading:w,data:c,dataUpdatedAt:u.dataUpdatedAt,error:h,errorUpdatedAt:p,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:u.dataUpdateCount>0||u.errorUpdateCount>0,isFetchedAfterMount:u.dataUpdateCount>A.dataUpdateCount||u.errorUpdateCount>A.errorUpdateCount,isFetching:g,isRefetching:g&&!y,isLoadingError:v&&!x,isPaused:"paused"===u.fetchStatus,isPlaceholderData:d,isRefetchError:v&&x,isStale:Ft(e,t),refetch:this.refetch,promise:Qe(this,Q),isEnabled:!1!==We(t.enabled,e)};if(this.options.experimental_prefetchInRender){const t=e=>{"error"===b.status?e.reject(b.error):void 0!==b.data&&e.resolve(b.data)},n=()=>{const e=Ue(this,Q,b.promise=dt());t(e)},i=Qe(this,Q);switch(i.status){case"pending":e.queryHash===r.queryHash&&t(i);break;case"fulfilled":"error"!==b.status&&b.data===i.value||n();break;case"rejected":"error"===b.status&&b.error===i.reason||n()}}return b}updateResult(){const e=Qe(this,k),t=this.createResult(Qe(this,C),this.options);if(Ue(this,S,Qe(this,C).state),Ue(this,F,this.options),void 0!==Qe(this,S).data&&Ue(this,N,Qe(this,C)),tt(t,e))return;Ue(this,k,t);Oe(this,D,W).call(this,{listeners:(()=>{if(!e)return!0;const{notifyOnChangeProps:t}=this.options,n="function"==typeof t?t():t;if("all"===n||!n&&!Qe(this,M).size)return!0;const r=new Set(n??Qe(this,M));return this.options.throwOnError&&r.add("error"),Object.keys(Qe(this,k)).some(t=>{const n=t;return Qe(this,k)[n]!==e[n]&&r.has(n)})})()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Oe(this,D,K).call(this)}},B=new WeakMap,C=new WeakMap,E=new WeakMap,k=new WeakMap,S=new WeakMap,F=new WeakMap,Q=new WeakMap,j=new WeakMap,U=new WeakMap,O=new WeakMap,N=new WeakMap,I=new WeakMap,T=new WeakMap,P=new WeakMap,M=new WeakMap,D=new WeakSet,L=function(e){Oe(this,D,$).call(this);let t=Qe(this,C).fetch(this.options,e);return(null==e?void 0:e.throwOnError)||(t=t.catch(Ke)),t},H=function(){Oe(this,D,z).call(this);const e=$e(this.options.staleTime,Qe(this,C));if(Re||Qe(this,k).isStale||!ze(e))return;const t=Ve(Qe(this,k).dataUpdatedAt,e)+1;Ue(this,I,_e.setTimeout(()=>{Qe(this,k).isStale||this.updateResult()},t))},_=function(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(Qe(this,C)):this.options.refetchInterval)??!1},R=function(e){Oe(this,D,V).call(this),Ue(this,P,e),!Re&&!1!==We(this.options.enabled,Qe(this,C))&&ze(Qe(this,P))&&0!==Qe(this,P)&&Ue(this,T,_e.setInterval(()=>{(this.options.refetchIntervalInBackground||ut.isFocused())&&Oe(this,D,L).call(this)},Qe(this,P)))},K=function(){Oe(this,D,H).call(this),Oe(this,D,R).call(this,Oe(this,D,_).call(this))},z=function(){Qe(this,I)&&(_e.clearTimeout(Qe(this,I)),Ue(this,I,void 0))},V=function(){Qe(this,T)&&(_e.clearInterval(Qe(this,T)),Ue(this,T,void 0))},$=function(){const e=Qe(this,B).getQueryCache().build(Qe(this,B),this.options);if(e===Qe(this,C))return;const t=Qe(this,C);Ue(this,C,e),Ue(this,E,e.state),this.hasListeners()&&(null==t||t.removeObserver(this),e.addObserver(this))},W=function(e){pt.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(Qe(this,k))}),Qe(this,B).getQueryCache().notify({query:Qe(this,C),type:"observerResultsUpdated"})})},G);function Et(e,t){return function(e,t){return!1!==We(t.enabled,e)&&void 0===e.state.data&&!("error"===e.state.status&&!1===t.retryOnMount)}(e,t)||void 0!==e.state.data&&kt(e,t,t.refetchOnMount)}function kt(e,t,n){if(!1!==We(t.enabled,e)&&"static"!==$e(t.staleTime,e)){const r="function"==typeof n?n(e):n;return"always"===r||!1!==r&&Ft(e,t)}return!1}function St(e,t,n,r){return(e!==t||!1===We(r.enabled,e))&&(!n.suspense||"error"!==e.state.status)&&Ft(e,n)}function Ft(e,t){return!1!==We(t.enabled,e)&&e.isStaleByTime($e(t.staleTime,e))}function Qt(e){return{onFetch:(t,n)=>{var r,i,a,o,s;const A=t.options,l=null==(a=null==(i=null==(r=t.fetchOptions)?void 0:r.meta)?void 0:i.fetchMore)?void 0:a.direction,c=(null==(o=t.state.data)?void 0:o.pages)||[],u=(null==(s=t.state.data)?void 0:s.pageParams)||[];let d={pages:[],pageParams:[]},h=0;const p=async()=>{let n=!1;const r=lt(t.options,t.fetchOptions),i=async(e,i,a)=>{if(n)return Promise.reject();if(null==i&&e.pages.length)return Promise.resolve(e);const o=(()=>{const e={client:t.client,queryKey:t.queryKey,pageParam:i,direction:a?"backward":"forward",meta:t.options.meta};var r;return r=e,Object.defineProperty(r,"signal",{enumerable:!0,get:()=>(t.signal.aborted?n=!0:t.signal.addEventListener("abort",()=>{n=!0}),t.signal)}),e})(),s=await r(o),{maxPages:A}=t.options,l=a?st:ot;return{pages:l(e.pages,s,A),pageParams:l(e.pageParams,i,A)}};if(l&&c.length){const e="backward"===l,t={pages:c,pageParams:u},n=(e?Ut:jt)(A,t);d=await i(t,n,e)}else{const t=e??c.length;do{const e=0===h?u[0]??A.initialPageParam:jt(A,d);if(h>0&&null==e)break;d=await i(d,e),h++}while(h<t)}return d};t.options.persister?t.fetchFn=()=>{var e,r;return null==(r=(e=t.options).persister)?void 0:r.call(e,p,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=p}}}function jt(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Ut(e,{pages:t,pageParams:n}){var r;return t.length>0?null==(r=e.getPreviousPageParam)?void 0:r.call(e,t[0],t,n[0],n):void 0}var Ot=(te=class extends wt{constructor(e){super(),je(this,Z),je(this,q),je(this,X),je(this,Y),je(this,J),Ue(this,q,e.client),this.mutationId=e.mutationId,Ue(this,Y,e.mutationCache),Ue(this,X,[]),this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){Qe(this,X).includes(e)||(Qe(this,X).push(e),this.clearGcTimeout(),Qe(this,Y).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){Ue(this,X,Qe(this,X).filter(t=>t!==e)),this.scheduleGc(),Qe(this,Y).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){Qe(this,X).length||("pending"===this.state.status?this.scheduleGc():Qe(this,Y).remove(this))}continue(){var e;return(null==(e=Qe(this,J))?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var t,n,r,i,a,o,s,A,l,c,u,d,h,p,f,m,g,y,v,w;const x=()=>{Oe(this,Z,ee).call(this,{type:"continue"})},b={client:Qe(this,q),meta:this.options.meta,mutationKey:this.options.mutationKey};Ue(this,J,vt({fn:()=>this.options.mutationFn?this.options.mutationFn(e,b):Promise.reject(new Error("No mutationFn found")),onFail:(e,t)=>{Oe(this,Z,ee).call(this,{type:"failed",failureCount:e,error:t})},onPause:()=>{Oe(this,Z,ee).call(this,{type:"pause"})},onContinue:x,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>Qe(this,Y).canRun(this)}));const B="pending"===this.state.status,C=!Qe(this,J).canStart();try{if(B)x();else{Oe(this,Z,ee).call(this,{type:"pending",variables:e,isPaused:C}),await(null==(n=(t=Qe(this,Y).config).onMutate)?void 0:n.call(t,e,this,b));const a=await(null==(i=(r=this.options).onMutate)?void 0:i.call(r,e,b));a!==this.state.context&&Oe(this,Z,ee).call(this,{type:"pending",context:a,variables:e,isPaused:C})}const h=await Qe(this,J).start();return await(null==(o=(a=Qe(this,Y).config).onSuccess)?void 0:o.call(a,h,e,this.state.context,this,b)),await(null==(A=(s=this.options).onSuccess)?void 0:A.call(s,h,e,this.state.context,b)),await(null==(c=(l=Qe(this,Y).config).onSettled)?void 0:c.call(l,h,null,this.state.variables,this.state.context,this,b)),await(null==(d=(u=this.options).onSettled)?void 0:d.call(u,h,null,e,this.state.context,b)),Oe(this,Z,ee).call(this,{type:"success",data:h}),h}catch(E){try{throw await(null==(p=(h=Qe(this,Y).config).onError)?void 0:p.call(h,E,e,this.state.context,this,b)),await(null==(m=(f=this.options).onError)?void 0:m.call(f,E,e,this.state.context,b)),await(null==(y=(g=Qe(this,Y).config).onSettled)?void 0:y.call(g,void 0,E,this.state.variables,this.state.context,this,b)),await(null==(w=(v=this.options).onSettled)?void 0:w.call(v,void 0,E,e,this.state.context,b)),E}finally{Oe(this,Z,ee).call(this,{type:"error",error:E})}}finally{Qe(this,Y).runNext(this)}}},q=new WeakMap,X=new WeakMap,Y=new WeakMap,J=new WeakMap,Z=new WeakSet,ee=function(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),pt.batch(()=>{Qe(this,X).forEach(t=>{t.onMutationUpdate(e)}),Qe(this,Y).notify({mutation:this,type:"updated",action:e})})},te);var Nt=(ae=class extends Le{constructor(e={}){super(),je(this,ne),je(this,re),je(this,ie),this.config=e,Ue(this,ne,new Set),Ue(this,re,new Map),Ue(this,ie,0)}build(e,t,n){const r=new Ot({client:e,mutationCache:this,mutationId:++Ne(this,ie)._,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){Qe(this,ne).add(e);const t=It(e);if("string"==typeof t){const n=Qe(this,re).get(t);n?n.push(e):Qe(this,re).set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(Qe(this,ne).delete(e)){const t=It(e);if("string"==typeof t){const n=Qe(this,re).get(t);if(n)if(n.length>1){const t=n.indexOf(e);-1!==t&&n.splice(t,1)}else n[0]===e&&Qe(this,re).delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=It(e);if("string"==typeof t){const n=Qe(this,re).get(t),r=null==n?void 0:n.find(e=>"pending"===e.state.status);return!r||r===e}return!0}runNext(e){var t;const n=It(e);if("string"==typeof n){const r=null==(t=Qe(this,re).get(n))?void 0:t.find(t=>t!==e&&t.state.isPaused);return(null==r?void 0:r.continue())??Promise.resolve()}return Promise.resolve()}clear(){pt.batch(()=>{Qe(this,ne).forEach(e=>{this.notify({type:"removed",mutation:e})}),Qe(this,ne).clear(),Qe(this,re).clear()})}getAll(){return Array.from(Qe(this,ne))}find(e){const t={exact:!0,...e};return this.getAll().find(e=>qe(t,e))}findAll(e={}){return this.getAll().filter(t=>qe(e,t))}notify(e){pt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(e=>e.state.isPaused);return pt.batch(()=>Promise.all(e.map(e=>e.continue().catch(Ke))))}},ne=new WeakMap,re=new WeakMap,ie=new WeakMap,ae);function It(e){var t;return null==(t=e.options.scope)?void 0:t.id}var Tt=(he=class extends Le{constructor(e,t){super(),je(this,ce),je(this,oe),je(this,se),je(this,Ae),je(this,le),Ue(this,oe,e),this.setOptions(t),this.bindMethods(),Oe(this,ce,ue).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var t;const n=this.options;this.options=Qe(this,oe).defaultMutationOptions(e),tt(this.options,n)||Qe(this,oe).getMutationCache().notify({type:"observerOptionsUpdated",mutation:Qe(this,Ae),observer:this}),(null==n?void 0:n.mutationKey)&&this.options.mutationKey&&Ye(n.mutationKey)!==Ye(this.options.mutationKey)?this.reset():"pending"===(null==(t=Qe(this,Ae))?void 0:t.state.status)&&Qe(this,Ae).setOptions(this.options)}onUnsubscribe(){var e;this.hasListeners()||null==(e=Qe(this,Ae))||e.removeObserver(this)}onMutationUpdate(e){Oe(this,ce,ue).call(this),Oe(this,ce,de).call(this,e)}getCurrentResult(){return Qe(this,se)}reset(){var e;null==(e=Qe(this,Ae))||e.removeObserver(this),Ue(this,Ae,void 0),Oe(this,ce,ue).call(this),Oe(this,ce,de).call(this)}mutate(e,t){var n;return Ue(this,le,t),null==(n=Qe(this,Ae))||n.removeObserver(this),Ue(this,Ae,Qe(this,oe).getMutationCache().build(Qe(this,oe),this.options)),Qe(this,Ae).addObserver(this),Qe(this,Ae).execute(e)}},oe=new WeakMap,se=new WeakMap,Ae=new WeakMap,le=new WeakMap,ce=new WeakSet,ue=function(){var e;const t=(null==(e=Qe(this,Ae))?void 0:e.state)??{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0};Ue(this,se,{...t,isPending:"pending"===t.status,isSuccess:"success"===t.status,isError:"error"===t.status,isIdle:"idle"===t.status,mutate:this.mutate,reset:this.reset})},de=function(e){pt.batch(()=>{var t,n,r,i,a,o,s,A;if(Qe(this,le)&&this.hasListeners()){const l=Qe(this,se).variables,c=Qe(this,se).context,u={client:Qe(this,oe),meta:this.options.meta,mutationKey:this.options.mutationKey};"success"===(null==e?void 0:e.type)?(null==(n=(t=Qe(this,le)).onSuccess)||n.call(t,e.data,l,c,u),null==(i=(r=Qe(this,le)).onSettled)||i.call(r,e.data,null,l,c,u)):"error"===(null==e?void 0:e.type)&&(null==(o=(a=Qe(this,le)).onError)||o.call(a,e.error,l,c,u),null==(A=(s=Qe(this,le)).onSettled)||A.call(s,void 0,e.error,l,c,u))}this.listeners.forEach(e=>{e(Qe(this,se))})})},he),Pt=(fe=class extends Le{constructor(e={}){super(),je(this,pe),this.config=e,Ue(this,pe,new Map)}build(e,t,n){const r=t.queryKey,i=t.queryHash??Xe(r,t);let a=this.get(i);return a||(a=new xt({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){Qe(this,pe).has(e.queryHash)||(Qe(this,pe).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=Qe(this,pe).get(e.queryHash);t&&(e.destroy(),t===e&&Qe(this,pe).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){pt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return Qe(this,pe).get(e)}getAll(){return[...Qe(this,pe).values()]}find(e){const t={exact:!0,...e};return this.getAll().find(e=>Ge(t,e))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(t=>Ge(e,t)):t}notify(e){pt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){pt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){pt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},pe=new WeakMap,fe),Mt=(Ce=class{constructor(e={}){je(this,me),je(this,ge),je(this,ye),je(this,ve),je(this,we),je(this,xe),je(this,be),je(this,Be),Ue(this,me,e.queryCache||new Pt),Ue(this,ge,e.mutationCache||new Nt),Ue(this,ye,e.defaultOptions||{}),Ue(this,ve,new Map),Ue(this,we,new Map),Ue(this,xe,0)}mount(){Ne(this,xe)._++,1===Qe(this,xe)&&(Ue(this,be,ut.subscribe(async e=>{e&&(await this.resumePausedMutations(),Qe(this,me).onFocus())})),Ue(this,Be,ft.subscribe(async e=>{e&&(await this.resumePausedMutations(),Qe(this,me).onOnline())})))}unmount(){var e,t;Ne(this,xe)._--,0===Qe(this,xe)&&(null==(e=Qe(this,be))||e.call(this),Ue(this,be,void 0),null==(t=Qe(this,Be))||t.call(this),Ue(this,Be,void 0))}isFetching(e){return Qe(this,me).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return Qe(this,ge).findAll({...e,status:"pending"}).length}getQueryData(e){var t;const n=this.defaultQueryOptions({queryKey:e});return null==(t=Qe(this,me).get(n.queryHash))?void 0:t.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=Qe(this,me).build(this,t),r=n.state.data;return void 0===r?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime($e(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return Qe(this,me).findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=Qe(this,me).get(r.queryHash),a=function(e,t){return"function"==typeof e?e(t):e}(t,null==i?void 0:i.state.data);if(void 0!==a)return Qe(this,me).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return pt.batch(()=>Qe(this,me).findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){var t;const n=this.defaultQueryOptions({queryKey:e});return null==(t=Qe(this,me).get(n.queryHash))?void 0:t.state}removeQueries(e){const t=Qe(this,me);pt.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){const n=Qe(this,me);return pt.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=pt.batch(()=>Qe(this,me).findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(Ke).catch(Ke)}invalidateQueries(e,t={}){return pt.batch(()=>(Qe(this,me).findAll(e).forEach(e=>{e.invalidate()}),"none"===(null==e?void 0:e.refetchType)?Promise.resolve():this.refetchQueries({...e,type:(null==e?void 0:e.refetchType)??(null==e?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=pt.batch(()=>Qe(this,me).findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(Ke)),"paused"===e.state.fetchStatus?Promise.resolve():t}));return Promise.all(r).then(Ke)}fetchQuery(e){const t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);const n=Qe(this,me).build(this,t);return n.isStaleByTime($e(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ke).catch(Ke)}fetchInfiniteQuery(e){return e.behavior=Qt(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ke).catch(Ke)}ensureInfiniteQueryData(e){return e.behavior=Qt(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return ft.isOnline()?Qe(this,ge).resumePausedMutations():Promise.resolve()}getQueryCache(){return Qe(this,me)}getMutationCache(){return Qe(this,ge)}getDefaultOptions(){return Qe(this,ye)}setDefaultOptions(e){Ue(this,ye,e)}setQueryDefaults(e,t){Qe(this,ve).set(Ye(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...Qe(this,ve).values()],n={};return t.forEach(t=>{Je(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){Qe(this,we).set(Ye(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...Qe(this,we).values()],n={};return t.forEach(t=>{Je(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...Qe(this,ye).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Xe(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===At&&(t.enabled=!1),t}defaultMutationOptions(e){return(null==e?void 0:e._defaulted)?e:{...Qe(this,ye).mutations,...(null==e?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){Qe(this,me).clear(),Qe(this,ge).clear()}},me=new WeakMap,ge=new WeakMap,ye=new WeakMap,ve=new WeakMap,we=new WeakMap,xe=new WeakMap,be=new WeakMap,Be=new WeakMap,Ce),Dt=De.createContext(void 0),Lt=e=>{const t=De.useContext(Dt);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Ht=({client:e,children:t})=>(De.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),Ie.jsx(Dt.Provider,{value:e,children:t})),_t=De.createContext(!1);_t.Provider;var Rt=De.createContext(function(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}()),Kt=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function zt(e,t,n){var r,i,a,o,s;if("production"!==process.env.NODE_ENV&&("object"!=typeof e||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const A=De.useContext(_t),l=De.useContext(Rt),c=Lt(),u=c.defaultQueryOptions(e);null==(i=null==(r=c.getDefaultOptions().queries)?void 0:r._experimental_beforeQuery)||i.call(r,u),"production"!==process.env.NODE_ENV&&(u.queryFn||console.error(`[${u.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),u._optimisticResults=A?"isRestoring":"optimistic",(e=>{if(e.suspense){const t=1e3,n=e=>"static"===e?e:Math.max(e??t,t),r=e.staleTime;e.staleTime="function"==typeof r?(...e)=>n(r(...e)):n(r),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,t))}})(u),((e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))})(u,l),(e=>{De.useEffect(()=>{e.clearReset()},[e])})(l);const d=!c.getQueryCache().get(u.queryHash),[h]=De.useState(()=>new t(c,u)),p=h.getOptimisticResult(u),f=!A&&!1!==e.subscribed;if(De.useSyncExternalStore(De.useCallback(e=>{const t=f?h.subscribe(pt.batchCalls(e)):Ke;return h.updateResult(),t},[h,f]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),De.useEffect(()=>{h.setOptions(u)},[u,h]),((e,t)=>(null==e?void 0:e.suspense)&&t.isPending)(u,p))throw Kt(u,h,l);if((({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&void 0===e.data||ct(n,[e.error,r])))({result:p,errorResetBoundary:l,throwOnError:u.throwOnError,query:c.getQueryCache().get(u.queryHash),suspense:u.suspense}))throw p.error;if(null==(o=null==(a=c.getDefaultOptions().queries)?void 0:a._experimental_afterQuery)||o.call(a,u,p),u.experimental_prefetchInRender&&!Re&&((e,t)=>e.isLoading&&e.isFetching&&!t)(p,A)){const e=d?Kt(u,h,l):null==(s=c.getQueryCache().get(u.queryHash))?void 0:s.promise;null==e||e.catch(Ke).finally(()=>{h.updateResult()})}return u.notifyOnChangeProps?p:h.trackResult(p)}function Vt(e,t){const n=Lt(),[r]=De.useState(()=>new Tt(n,e));De.useEffect(()=>{r.setOptions(e)},[r,e]);const i=De.useSyncExternalStore(De.useCallback(e=>r.subscribe(pt.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=De.useCallback((e,t)=>{r.mutate(e,t).catch(Ke)},[r]);if(i.error&&ct(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}function $t(e,t){return function(){return e.apply(t,arguments)}}const{toString:Wt}=Object.prototype,{getPrototypeOf:Gt}=Object,{iterator:qt,toStringTag:Xt}=Symbol,Yt=(e=>t=>{const n=Wt.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Jt=e=>(e=e.toLowerCase(),t=>Yt(t)===e),Zt=e=>t=>typeof t===e,{isArray:en}=Array,tn=Zt("undefined");function nn(e){return null!==e&&!tn(e)&&null!==e.constructor&&!tn(e.constructor)&&on(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const rn=Jt("ArrayBuffer");const an=Zt("string"),on=Zt("function"),sn=Zt("number"),An=e=>null!==e&&"object"==typeof e,ln=e=>{if("object"!==Yt(e))return!1;const t=Gt(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Xt in e||qt in e)},cn=Jt("Date"),un=Jt("File"),dn=Jt("Blob"),hn=Jt("FileList"),pn=Jt("URLSearchParams"),[fn,mn,gn,yn]=["ReadableStream","Request","Response","Headers"].map(Jt);function vn(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,i;if("object"!=typeof e&&(e=[e]),en(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(nn(e))return;const i=n?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length;let o;for(r=0;r<a;r++)o=i[r],t.call(null,e[o],o,e)}}function wn(e,t){if(nn(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r,i=n.length;for(;i-- >0;)if(r=n[i],t===r.toLowerCase())return r;return null}const xn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,bn=e=>!tn(e)&&e!==xn;const Bn=(e=>t=>e&&t instanceof e)("undefined"!=typeof Uint8Array&&Gt(Uint8Array)),Cn=Jt("HTMLFormElement"),En=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),kn=Jt("RegExp"),Sn=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};vn(n,(n,i)=>{let a;!1!==(a=t(n,i,e))&&(r[i]=a||n)}),Object.defineProperties(e,r)};const Fn=Jt("AsyncFunction"),Qn=(jn="function"==typeof setImmediate,Un=on(xn.postMessage),jn?setImmediate:Un?(On=`axios@${Math.random()}`,Nn=[],xn.addEventListener("message",({source:e,data:t})=>{e===xn&&t===On&&Nn.length&&Nn.shift()()},!1),e=>{Nn.push(e),xn.postMessage(On,"*")}):e=>setTimeout(e));var jn,Un,On,Nn;const In="undefined"!=typeof queueMicrotask?queueMicrotask.bind(xn):"undefined"!=typeof process&&process.nextTick||Qn,Tn={isArray:en,isArrayBuffer:rn,isBuffer:nn,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||on(e.append)&&("formdata"===(t=Yt(e))||"object"===t&&on(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&rn(e.buffer),t},isString:an,isNumber:sn,isBoolean:e=>!0===e||!1===e,isObject:An,isPlainObject:ln,isEmptyObject:e=>{if(!An(e)||nn(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(qX){return!1}},isReadableStream:fn,isRequest:mn,isResponse:gn,isHeaders:yn,isUndefined:tn,isDate:cn,isFile:un,isBlob:dn,isRegExp:kn,isFunction:on,isStream:e=>An(e)&&on(e.pipe),isURLSearchParams:pn,isTypedArray:Bn,isFileList:hn,forEach:vn,merge:function e(){const{caseless:t,skipUndefined:n}=bn(this)&&this||{},r={},i=(i,a)=>{const o=t&&wn(r,a)||a;ln(r[o])&&ln(i)?r[o]=e(r[o],i):ln(i)?r[o]=e({},i):en(i)?r[o]=i.slice():n&&tn(i)||(r[o]=i)};for(let a=0,o=arguments.length;a<o;a++)arguments[a]&&vn(arguments[a],i);return r},extend:(e,t,n,{allOwnKeys:r}={})=>(vn(t,(t,r)=>{n&&on(t)?e[r]=$t(t,n):e[r]=t},{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let i,a,o;const s={};if(t=t||{},null==e)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],r&&!r(o,e,t)||s[o]||(t[o]=e[o],s[o]=!0);e=!1!==n&&Gt(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:Yt,kindOfTest:Jt,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(en(e))return e;let t=e.length;if(!sn(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[qt]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:Cn,hasOwnProperty:En,hasOwnProp:En,reduceDescriptors:Sn,freezeMethods:e=>{Sn(e,(t,n)=>{if(on(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];on(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach(e=>{n[e]=!0})};return en(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:wn,global:xn,isContextDefined:bn,isSpecCompliantForm:function(e){return!!(e&&on(e.append)&&"FormData"===e[Xt]&&e[qt])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(An(e)){if(t.indexOf(e)>=0)return;if(nn(e))return e;if(!("toJSON"in e)){t[r]=e;const i=en(e)?[]:{};return vn(e,(e,t)=>{const a=n(e,r+1);!tn(a)&&(i[t]=a)}),t[r]=void 0,i}}return e};return n(e,0)},isAsyncFn:Fn,isThenable:e=>e&&(An(e)||on(e))&&on(e.then)&&on(e.catch),setImmediate:Qn,asap:In,isIterable:e=>null!=e&&on(e[qt])};function Pn(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}Tn.inherits(Pn,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Tn.toJSONObject(this.config),code:this.code,status:this.status}}});const Mn=Pn.prototype,Dn={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Dn[e]={value:e}}),Object.defineProperties(Pn,Dn),Object.defineProperty(Mn,"isAxiosError",{value:!0}),Pn.from=(e,t,n,r,i,a)=>{const o=Object.create(Mn);Tn.toFlatObject(e,o,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e);const s=e&&e.message?e.message:"Error",A=null==t&&e?e.code:t;return Pn.call(o,s,A,n,r,i),e&&null==o.cause&&Object.defineProperty(o,"cause",{value:e,configurable:!0}),o.name=e&&e.name||"Error",a&&Object.assign(o,a),o};function Ln(e){return Tn.isPlainObject(e)||Tn.isArray(e)}function Hn(e){return Tn.endsWith(e,"[]")?e.slice(0,-2):e}function _n(e,t,n){return e?e.concat(t).map(function(e,t){return e=Hn(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}const Rn=Tn.toFlatObject(Tn,{},null,function(e){return/^is[A-Z]/.test(e)});function Kn(e,t,n){if(!Tn.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=Tn.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!Tn.isUndefined(t[e])})).metaTokens,i=n.visitor||l,a=n.dots,o=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&Tn.isSpecCompliantForm(t);if(!Tn.isFunction(i))throw new TypeError("visitor must be a function");function A(e){if(null===e)return"";if(Tn.isDate(e))return e.toISOString();if(Tn.isBoolean(e))return e.toString();if(!s&&Tn.isBlob(e))throw new Pn("Blob is not supported. Use a Buffer instead.");return Tn.isArrayBuffer(e)||Tn.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function l(e,n,i){let s=e;if(e&&!i&&"object"==typeof e)if(Tn.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(Tn.isArray(e)&&function(e){return Tn.isArray(e)&&!e.some(Ln)}(e)||(Tn.isFileList(e)||Tn.endsWith(n,"[]"))&&(s=Tn.toArray(e)))return n=Hn(n),s.forEach(function(e,r){!Tn.isUndefined(e)&&null!==e&&t.append(!0===o?_n([n],r,a):null===o?n:n+"[]",A(e))}),!1;return!!Ln(e)||(t.append(_n(i,n,a),A(e)),!1)}const c=[],u=Object.assign(Rn,{defaultVisitor:l,convertValue:A,isVisitable:Ln});if(!Tn.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!Tn.isUndefined(n)){if(-1!==c.indexOf(n))throw Error("Circular reference detected in "+r.join("."));c.push(n),Tn.forEach(n,function(n,a){!0===(!(Tn.isUndefined(n)||null===n)&&i.call(t,n,Tn.isString(a)?a.trim():a,r,u))&&e(n,r?r.concat(a):[a])}),c.pop()}}(e),t}function zn(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function Vn(e,t){this._pairs=[],e&&Kn(e,this,t)}const $n=Vn.prototype;function Wn(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Gn(e,t,n){if(!t)return e;const r=n&&n.encode||Wn;Tn.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let a;if(a=i?i(t,n):Tn.isURLSearchParams(t)?t.toString():new Vn(t,n).toString(r),a){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}$n.append=function(e,t){this._pairs.push([e,t])},$n.toString=function(e){const t=e?function(t){return e.call(this,t,zn)}:zn;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};class qn{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Tn.forEach(this.handlers,function(t){null!==t&&e(t)})}}const Xn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Yn={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Vn,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Jn="undefined"!=typeof window&&"undefined"!=typeof document,Zn="object"==typeof navigator&&navigator||void 0,er=Jn&&(!Zn||["ReactNative","NativeScript","NS"].indexOf(Zn.product)<0),tr="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,nr=Jn&&window.location.href||"http://localhost",rr={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Jn,hasStandardBrowserEnv:er,hasStandardBrowserWebWorkerEnv:tr,navigator:Zn,origin:nr},Symbol.toStringTag,{value:"Module"})),...Yn};function ir(e){function t(e,n,r,i){let a=e[i++];if("__proto__"===a)return!0;const o=Number.isFinite(+a),s=i>=e.length;if(a=!a&&Tn.isArray(r)?r.length:a,s)return Tn.hasOwnProp(r,a)?r[a]=[r[a],n]:r[a]=n,!o;r[a]&&Tn.isObject(r[a])||(r[a]=[]);return t(e,n,r[a],i)&&Tn.isArray(r[a])&&(r[a]=function(e){const t={},n=Object.keys(e);let r;const i=n.length;let a;for(r=0;r<i;r++)a=n[r],t[a]=e[a];return t}(r[a])),!o}if(Tn.isFormData(e)&&Tn.isFunction(e.entries)){const n={};return Tn.forEachEntry(e,(e,r)=>{t(function(e){return Tn.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),r,n,0)}),n}return null}const ar={transitional:Xn,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,i=Tn.isObject(e);i&&Tn.isHTMLForm(e)&&(e=new FormData(e));if(Tn.isFormData(e))return r?JSON.stringify(ir(e)):e;if(Tn.isArrayBuffer(e)||Tn.isBuffer(e)||Tn.isStream(e)||Tn.isFile(e)||Tn.isBlob(e)||Tn.isReadableStream(e))return e;if(Tn.isArrayBufferView(e))return e.buffer;if(Tn.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Kn(e,new rr.classes.URLSearchParams,{visitor:function(e,t,n,r){return rr.isNode&&Tn.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((a=Tn.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Kn(a?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||r?(t.setContentType("application/json",!1),function(e,t,n){if(Tn.isString(e))try{return(t||JSON.parse)(e),Tn.trim(e)}catch(qX){if("SyntaxError"!==qX.name)throw qX}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||ar.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(Tn.isResponse(e)||Tn.isReadableStream(e))return e;if(e&&Tn.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e,this.parseReviver)}catch(qX){if(n){if("SyntaxError"===qX.name)throw Pn.from(qX,Pn.ERR_BAD_RESPONSE,this,null,this.response);throw qX}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:rr.classes.FormData,Blob:rr.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Tn.forEach(["delete","get","head","post","put","patch"],e=>{ar.headers[e]={}});const or=Tn.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),sr=Symbol("internals");function Ar(e){return e&&String(e).trim().toLowerCase()}function lr(e){return!1===e||null==e?e:Tn.isArray(e)?e.map(lr):String(e)}function cr(e,t,n,r,i){return Tn.isFunction(r)?r.call(this,t,n):(i&&(t=n),Tn.isString(t)?Tn.isString(r)?-1!==t.indexOf(r):Tn.isRegExp(r)?r.test(t):void 0:void 0)}let ur=class{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function i(e,t,n){const i=Ar(t);if(!i)throw new Error("header name must be a non-empty string");const a=Tn.findKey(r,i);(!a||void 0===r[a]||!0===n||void 0===n&&!1!==r[a])&&(r[a||t]=lr(e))}const a=(e,t)=>Tn.forEach(e,(e,n)=>i(e,n,t));if(Tn.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(Tn.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))a((e=>{const t={};let n,r,i;return e&&e.split("\n").forEach(function(e){i=e.indexOf(":"),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim(),!n||t[n]&&or[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t})(e),t);else if(Tn.isObject(e)&&Tn.isIterable(e)){let n,r,i={};for(const t of e){if(!Tn.isArray(t))throw TypeError("Object iterator must return a key-value pair");i[r=t[0]]=(n=i[r])?Tn.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}a(i,t)}else null!=e&&i(t,e,n);return this}get(e,t){if(e=Ar(e)){const n=Tn.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(Tn.isFunction(t))return t.call(this,e,n);if(Tn.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Ar(e)){const n=Tn.findKey(this,e);return!(!n||void 0===this[n]||t&&!cr(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function i(e){if(e=Ar(e)){const i=Tn.findKey(n,e);!i||t&&!cr(0,n[i],i,t)||(delete n[i],r=!0)}}return Tn.isArray(e)?e.forEach(i):i(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const i=t[n];e&&!cr(0,this[i],i,e,!0)||(delete this[i],r=!0)}return r}normalize(e){const t=this,n={};return Tn.forEach(this,(r,i)=>{const a=Tn.findKey(n,i);if(a)return t[a]=lr(r),void delete t[i];const o=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(i):String(i).trim();o!==i&&delete t[i],t[o]=lr(r),n[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Tn.forEach(this,(n,r)=>{null!=n&&!1!==n&&(t[r]=e&&Tn.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[sr]=this[sr]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=Ar(e);t[r]||(!function(e,t){const n=Tn.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})})}(n,e),t[r]=!0)}return Tn.isArray(e)?e.forEach(r):r(e),this}};function dr(e,t){const n=this||ar,r=t||n,i=ur.from(r.headers);let a=r.data;return Tn.forEach(e,function(e){a=e.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function hr(e){return!(!e||!e.__CANCEL__)}function pr(e,t,n){Pn.call(this,null==e?"canceled":e,Pn.ERR_CANCELED,t,n),this.name="CanceledError"}function fr(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new Pn("Request failed with status code "+n.status,[Pn.ERR_BAD_REQUEST,Pn.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}ur.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Tn.reduceDescriptors(ur.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),Tn.freezeMethods(ur),Tn.inherits(pr,Pn,{__CANCEL__:!0});const mr=(e,t,n=3)=>{let r=0;const i=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i,a=0,o=0;return t=void 0!==t?t:1e3,function(s){const A=Date.now(),l=r[o];i||(i=A),n[a]=s,r[a]=A;let c=o,u=0;for(;c!==a;)u+=n[c++],c%=e;if(a=(a+1)%e,a===o&&(o=(o+1)%e),A-i<t)return;const d=l&&A-l;return d?Math.round(1e3*u/d):void 0}}(50,250);return function(e,t){let n,r,i=0,a=1e3/t;const o=(t,a=Date.now())=>{i=a,n=null,r&&(clearTimeout(r),r=null),e(...t)};return[(...e)=>{const t=Date.now(),s=t-i;s>=a?o(e,t):(n=e,r||(r=setTimeout(()=>{r=null,o(n)},a-s)))},()=>n&&o(n)]}(n=>{const a=n.loaded,o=n.lengthComputable?n.total:void 0,s=a-r,A=i(s);r=a;e({loaded:a,total:o,progress:o?a/o:void 0,bytes:s,rate:A||void 0,estimated:A&&o&&a<=o?(o-a)/A:void 0,event:n,lengthComputable:null!=o,[t?"download":"upload"]:!0})},n)},gr=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},yr=e=>(...t)=>Tn.asap(()=>e(...t)),vr=rr.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,rr.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(rr.origin),rr.navigator&&/(msie|trident)/i.test(rr.navigator.userAgent)):()=>!0,wr=rr.hasStandardBrowserEnv?{write(e,t,n,r,i,a){const o=[e+"="+encodeURIComponent(t)];Tn.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),Tn.isString(r)&&o.push("path="+r),Tn.isString(i)&&o.push("domain="+i),!0===a&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function xr(e,t,n){let r=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(r||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const br=e=>e instanceof ur?{...e}:e;function Br(e,t){t=t||{};const n={};function r(e,t,n,r){return Tn.isPlainObject(e)&&Tn.isPlainObject(t)?Tn.merge.call({caseless:r},e,t):Tn.isPlainObject(t)?Tn.merge({},t):Tn.isArray(t)?t.slice():t}function i(e,t,n,i){return Tn.isUndefined(t)?Tn.isUndefined(e)?void 0:r(void 0,e,0,i):r(e,t,0,i)}function a(e,t){if(!Tn.isUndefined(t))return r(void 0,t)}function o(e,t){return Tn.isUndefined(t)?Tn.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,i,a){return a in t?r(n,i):a in e?r(void 0,n):void 0}const A={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(e,t,n)=>i(br(e),br(t),0,!0)};return Tn.forEach(Object.keys({...e,...t}),function(r){const a=A[r]||i,o=a(e[r],t[r],r);Tn.isUndefined(o)&&a!==s||(n[r]=o)}),n}const Cr=e=>{const t=Br({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:a,headers:o,auth:s}=t;if(t.headers=o=ur.from(o),t.url=Gn(xr(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&o.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),Tn.isFormData(n))if(rr.hasStandardBrowserEnv||rr.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(Tn.isFunction(n.getHeaders)){const e=n.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,n])=>{t.includes(e.toLowerCase())&&o.set(e,n)})}if(rr.hasStandardBrowserEnv&&(r&&Tn.isFunction(r)&&(r=r(t)),r||!1!==r&&vr(t.url))){const e=i&&a&&wr.read(a);e&&o.set(i,e)}return t},Er="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){const r=Cr(e);let i=r.data;const a=ur.from(r.headers).normalize();let o,s,A,l,c,{responseType:u,onUploadProgress:d,onDownloadProgress:h}=r;function p(){l&&l(),c&&c(),r.cancelToken&&r.cancelToken.unsubscribe(o),r.signal&&r.signal.removeEventListener("abort",o)}let f=new XMLHttpRequest;function m(){if(!f)return;const r=ur.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders());fr(function(e){t(e),p()},function(e){n(e),p()},{data:u&&"text"!==u&&"json"!==u?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:r,config:e,request:f}),f=null}f.open(r.method.toUpperCase(),r.url,!0),f.timeout=r.timeout,"onloadend"in f?f.onloadend=m:f.onreadystatechange=function(){f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))&&setTimeout(m)},f.onabort=function(){f&&(n(new Pn("Request aborted",Pn.ECONNABORTED,e,f)),f=null)},f.onerror=function(t){const r=new Pn(t&&t.message?t.message:"Network Error",Pn.ERR_NETWORK,e,f);r.event=t||null,n(r),f=null},f.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const i=r.transitional||Xn;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new Pn(t,i.clarifyTimeoutError?Pn.ETIMEDOUT:Pn.ECONNABORTED,e,f)),f=null},void 0===i&&a.setContentType(null),"setRequestHeader"in f&&Tn.forEach(a.toJSON(),function(e,t){f.setRequestHeader(t,e)}),Tn.isUndefined(r.withCredentials)||(f.withCredentials=!!r.withCredentials),u&&"json"!==u&&(f.responseType=r.responseType),h&&([A,c]=mr(h,!0),f.addEventListener("progress",A)),d&&f.upload&&([s,l]=mr(d),f.upload.addEventListener("progress",s),f.upload.addEventListener("loadend",l)),(r.cancelToken||r.signal)&&(o=t=>{f&&(n(!t||t.type?new pr(null,e,f):t),f.abort(),f=null)},r.cancelToken&&r.cancelToken.subscribe(o),r.signal&&(r.signal.aborted?o():r.signal.addEventListener("abort",o)));const g=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);g&&-1===rr.protocols.indexOf(g)?n(new Pn("Unsupported protocol "+g+":",Pn.ERR_BAD_REQUEST,e)):f.send(i||null)})},kr=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const i=function(e){if(!n){n=!0,o();const t=e instanceof Error?e:this.reason;r.abort(t instanceof Pn?t:new pr(t instanceof Error?t.message:t))}};let a=t&&setTimeout(()=>{a=null,i(new Pn(`timeout ${t} of ms exceeded`,Pn.ETIMEDOUT))},t);const o=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener("abort",i)}),e=null)};e.forEach(e=>e.addEventListener("abort",i));const{signal:s}=r;return s.unsubscribe=()=>Tn.asap(o),s}},Sr=function*(e,t){let n=e.byteLength;if(n<t)return void(yield e);let r,i=0;for(;i<n;)r=i+t,yield e.slice(i,r),i=r},Fr=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},Qr=(e,t,n,r)=>{const i=async function*(e,t){for await(const n of Fr(e))yield*Sr(n,t)}(e,t);let a,o=0,s=e=>{a||(a=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await i.next();if(t)return s(),void e.close();let a=r.byteLength;if(n){let e=o+=a;n(e)}e.enqueue(new Uint8Array(r))}catch(t){throw s(t),t}},cancel:e=>(s(e),i.return())},{highWaterMark:2})},{isFunction:jr}=Tn,Ur=(({Request:e,Response:t})=>({Request:e,Response:t}))(Tn.global),{ReadableStream:Or,TextEncoder:Nr}=Tn.global,Ir=(e,...t)=>{try{return!!e(...t)}catch(qX){return!1}},Tr=e=>{e=Tn.merge.call({skipUndefined:!0},Ur,e);const{fetch:t,Request:n,Response:r}=e,i=t?jr(t):"function"==typeof fetch,a=jr(n),o=jr(r);if(!i)return!1;const s=i&&jr(Or),A=i&&("function"==typeof Nr?(e=>t=>e.encode(t))(new Nr):async e=>new Uint8Array(await new n(e).arrayBuffer())),l=a&&s&&Ir(()=>{let e=!1;const t=new n(rr.origin,{body:new Or,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),c=o&&s&&Ir(()=>Tn.isReadableStream(new r("").body)),u={stream:c&&(e=>e.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!u[e]&&(u[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new Pn(`Response type '${e}' is not supported`,Pn.ERR_NOT_SUPPORT,n)})});const d=async(e,t)=>{const r=Tn.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(Tn.isBlob(e))return e.size;if(Tn.isSpecCompliantForm(e)){const t=new n(rr.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return Tn.isArrayBufferView(e)||Tn.isArrayBuffer(e)?e.byteLength:(Tn.isURLSearchParams(e)&&(e+=""),Tn.isString(e)?(await A(e)).byteLength:void 0)})(t):r};return async e=>{let{url:i,method:o,data:s,signal:A,cancelToken:h,timeout:p,onDownloadProgress:f,onUploadProgress:m,responseType:g,headers:y,withCredentials:v="same-origin",fetchOptions:w}=Cr(e),x=t||fetch;g=g?(g+"").toLowerCase():"text";let b=kr([A,h&&h.toAbortSignal()],p),B=null;const C=b&&b.unsubscribe&&(()=>{b.unsubscribe()});let E;try{if(m&&l&&"get"!==o&&"head"!==o&&0!==(E=await d(y,s))){let e,t=new n(i,{method:"POST",body:s,duplex:"half"});if(Tn.isFormData(s)&&(e=t.headers.get("content-type"))&&y.setContentType(e),t.body){const[e,n]=gr(E,mr(yr(m)));s=Qr(t.body,65536,e,n)}}Tn.isString(v)||(v=v?"include":"omit");const t=a&&"credentials"in n.prototype,A={...w,signal:b,method:o.toUpperCase(),headers:y.normalize().toJSON(),body:s,duplex:"half",credentials:t?v:void 0};B=a&&new n(i,A);let h=await(a?x(B,w):x(i,A));const p=c&&("stream"===g||"response"===g);if(c&&(f||p&&C)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=h[t]});const t=Tn.toFiniteNumber(h.headers.get("content-length")),[n,i]=f&&gr(t,mr(yr(f),!0))||[];h=new r(Qr(h.body,65536,n,()=>{i&&i(),C&&C()}),e)}g=g||"text";let k=await u[Tn.findKey(u,g)||"text"](h,e);return!p&&C&&C(),await new Promise((t,n)=>{fr(t,n,{data:k,headers:ur.from(h.headers),status:h.status,statusText:h.statusText,config:e,request:B})})}catch(k){if(C&&C(),k&&"TypeError"===k.name&&/Load failed|fetch/i.test(k.message))throw Object.assign(new Pn("Network Error",Pn.ERR_NETWORK,e,B),{cause:k.cause||k});throw Pn.from(k,k&&k.code,e,B)}}},Pr=new Map,Mr=e=>{let t=e?e.env:{};const{fetch:n,Request:r,Response:i}=t,a=[r,i,n];let o,s,A=a.length,l=Pr;for(;A--;)o=a[A],s=l.get(o),void 0===s&&l.set(o,s=A?new Map:Tr(t)),l=s;return s};Mr();const Dr={http:null,xhr:Er,fetch:{get:Mr}};Tn.forEach(Dr,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(qX){}Object.defineProperty(e,"adapterName",{value:t})}});const Lr=e=>`- ${e}`,Hr=e=>Tn.isFunction(e)||null===e||!1===e,_r=(e,t)=>{e=Tn.isArray(e)?e:[e];const{length:n}=e;let r,i;const a={};for(let o=0;o<n;o++){let n;if(r=e[o],i=r,!Hr(r)&&(i=Dr[(n=String(r)).toLowerCase()],void 0===i))throw new Pn(`Unknown adapter '${n}'`);if(i&&(Tn.isFunction(i)||(i=i.get(t))))break;a[n||"#"+o]=i}if(!i){const e=Object.entries(a).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new Pn("There is no suitable adapter to dispatch the request "+(n?e.length>1?"since :\n"+e.map(Lr).join("\n"):" "+Lr(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return i};function Rr(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new pr(null,e)}function Kr(e){Rr(e),e.headers=ur.from(e.headers),e.data=dr.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return _r(e.adapter||ar.adapter,e)(e).then(function(t){return Rr(e),t.data=dr.call(e,e.transformResponse,t),t.headers=ur.from(t.headers),t},function(t){return hr(t)||(Rr(e),t&&t.response&&(t.response.data=dr.call(e,e.transformResponse,t.response),t.response.headers=ur.from(t.response.headers))),Promise.reject(t)})}const zr="1.12.2",Vr={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Vr[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const $r={};Vr.transitional=function(e,t,n){function r(e,t){return"[Axios v"+zr+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,i,a)=>{if(!1===e)throw new Pn(r(i," has been removed"+(t?" in "+t:"")),Pn.ERR_DEPRECATED);return t&&!$r[i]&&($r[i]=!0,console.warn(r(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,i,a)}},Vr.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};const Wr={assertOptions:function(e,t,n){if("object"!=typeof e)throw new Pn("options must be an object",Pn.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const a=r[i],o=t[a];if(o){const t=e[a],n=void 0===t||o(t,a,e);if(!0!==n)throw new Pn("option "+a+" must be "+n,Pn.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new Pn("Unknown option "+a,Pn.ERR_BAD_OPTION)}},validators:Vr},Gr=Wr.validators;let qr=class{constructor(e){this.defaults=e||{},this.interceptors={request:new qn,response:new qn}}async request(e,t){try{return await this._request(e,t)}catch(n){if(n instanceof Error){let e={};Error.captureStackTrace?Error.captureStackTrace(e):e=new Error;const t=e.stack?e.stack.replace(/^.+\n/,""):"";try{n.stack?t&&!String(n.stack).endsWith(t.replace(/^.+\n.+\n/,""))&&(n.stack+="\n"+t):n.stack=t}catch(qX){}}throw n}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Br(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:i}=t;void 0!==n&&Wr.assertOptions(n,{silentJSONParsing:Gr.transitional(Gr.boolean),forcedJSONParsing:Gr.transitional(Gr.boolean),clarifyTimeoutError:Gr.transitional(Gr.boolean)},!1),null!=r&&(Tn.isFunction(r)?t.paramsSerializer={serialize:r}:Wr.assertOptions(r,{encode:Gr.function,serialize:Gr.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Wr.assertOptions(t,{baseUrl:Gr.spelling("baseURL"),withXsrfToken:Gr.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=i&&Tn.merge(i.common,i[t.method]);i&&Tn.forEach(["delete","get","head","post","put","patch","common"],e=>{delete i[e]}),t.headers=ur.concat(a,i);const o=[];let s=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,o.unshift(e.fulfilled,e.rejected))});const A=[];let l;this.interceptors.response.forEach(function(e){A.push(e.fulfilled,e.rejected)});let c,u=0;if(!s){const e=[Kr.bind(this),void 0];for(e.unshift(...o),e.push(...A),c=e.length,l=Promise.resolve(t);u<c;)l=l.then(e[u++],e[u++]);return l}c=o.length;let d=t;for(;u<c;){const e=o[u++],t=o[u++];try{d=e(d)}catch(h){t.call(this,h);break}}try{l=Kr.call(this,d)}catch(h){return Promise.reject(h)}for(u=0,c=A.length;u<c;)l=l.then(A[u++],A[u++]);return l}getUri(e){return Gn(xr((e=Br(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};Tn.forEach(["delete","get","head","options"],function(e){qr.prototype[e]=function(t,n){return this.request(Br(n||{},{method:e,url:t,data:(n||{}).data}))}}),Tn.forEach(["post","put","patch"],function(e){function t(t){return function(n,r,i){return this.request(Br(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}qr.prototype[e]=t(),qr.prototype[e+"Form"]=t(!0)});const Xr={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Xr).forEach(([e,t])=>{Xr[t]=e});const Yr=function e(t){const n=new qr(t),r=$t(qr.prototype.request,n);return Tn.extend(r,qr.prototype,n,{allOwnKeys:!0}),Tn.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Br(t,n))},r}(ar);Yr.Axios=qr,Yr.CanceledError=pr,Yr.CancelToken=class e{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,i){n.reason||(n.reason=new pr(e,r,i),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}},Yr.isCancel=hr,Yr.VERSION=zr,Yr.toFormData=Kn,Yr.AxiosError=Pn,Yr.Cancel=Yr.CanceledError,Yr.all=function(e){return Promise.all(e)},Yr.spread=function(e){return function(t){return e.apply(null,t)}},Yr.isAxiosError=function(e){return Tn.isObject(e)&&!0===e.isAxiosError},Yr.mergeConfig=Br,Yr.AxiosHeaders=ur,Yr.formToJSON=e=>ir(Tn.isHTMLForm(e)?new FormData(e):e),Yr.getAdapter=_r,Yr.HttpStatusCode=Xr,Yr.default=Yr;const{Axios:Jr,AxiosError:Zr,CanceledError:ei,isCancel:ti,CancelToken:ni,VERSION:ri,all:ii,Cancel:ai,isAxiosError:oi,spread:si,toFormData:Ai,AxiosHeaders:li,HttpStatusCode:ci,formToJSON:ui,getAdapter:di,mergeConfig:hi}=Yr;class pi extends Error{}function fi(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return function(e){return decodeURIComponent(atob(e).replace(/(.)/g,(e,t)=>{let n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}(t)}catch(n){return atob(t)}}function mi(e,t){if("string"!=typeof e)throw new pi("Invalid token specified: must be a string");t||(t={});const n=!0===t.header?0:1,r=e.split(".")[n];if("string"!=typeof r)throw new pi(`Invalid token specified: missing part #${n+1}`);let i;try{i=fi(r)}catch(qX){throw new pi(`Invalid token specified: invalid base64 for part #${n+1} (${qX.message})`)}try{return JSON.parse(i)}catch(qX){throw new pi(`Invalid token specified: invalid json for part #${n+1} (${qX.message})`)}}pi.prototype.name="InvalidTokenError";const gi="pangents_bearer_token",yi="pangents_refresh_token",vi="pangents_token_expiry",wi=()=>{try{return localStorage.getItem(gi)}catch(e){return console.error("[Token Storage] Failed to get access token:",e),null}},xi=()=>{try{return localStorage.getItem(yi)}catch(e){return console.error("[Token Storage] Failed to get refresh token:",e),null}},bi=(e,t)=>{try{localStorage.setItem(gi,e),t&&localStorage.setItem(yi,t);const n=mi(e);localStorage.setItem(vi,n.exp.toString()),console.log("[Token Storage] Tokens stored successfully")}catch(n){console.error("[Token Storage] Failed to store tokens:",n)}},Bi=e=>{try{localStorage.setItem(gi,e);const t=mi(e);localStorage.setItem(vi,t.exp.toString()),console.log("[Token Storage] Bearer token stored successfully")}catch(t){console.error("[Token Storage] Failed to store bearer token:",t),localStorage.setItem(gi,e)}},Ci=()=>{try{localStorage.removeItem(gi),localStorage.removeItem(yi),localStorage.removeItem(vi),console.log("[Token Storage] Tokens cleared successfully")}catch(e){console.error("[Token Storage] Failed to clear tokens:",e)}},Ei=e=>{try{const t=e||wi();if(!t)return!0;const n=mi(t),r=Date.now()/1e3;return n.exp<r+300}catch(t){return console.error("[Token Validation] Failed to check token expiry:",t),!0}},ki=()=>{try{const e=localStorage.getItem(vi);return e?parseInt(e,10):null}catch(e){return console.error("[Token Storage] Failed to get token expiry:",e),null}},Si=async()=>{try{const e=xi();if(!e)throw new Error("No refresh token available");if(Ei(e))throw new Error("Refresh token is expired");const{api:t}=await Promise.resolve().then(()=>$i),n=await t.post("/auth/refresh",{refreshToken:e}),{accessToken:r,refreshToken:i}=n.data;if(r&&i)return bi(r,i),console.log("[Token Refresh] Tokens refreshed successfully"),r;throw new Error("Invalid refresh response")}catch(e){return console.error("[Token Refresh] Failed to refresh tokens:",e),Ci(),null}};let Fi=null;const Qi=()=>{const e=()=>{const t=ki();if(!t)return;const n=t-Date.now()/1e3,r=Math.max(0,1e3*(n-600));Fi&&clearTimeout(Fi),Fi=setTimeout(async()=>{console.log("[Auto Refresh] Attempting to refresh tokens");await Si()?e():window.dispatchEvent(new CustomEvent("auth:logout",{detail:{reason:"auto_refresh_failed"}}))},r),console.log(`[Auto Refresh] Scheduled for ${new Date(Date.now()+r).toISOString()}`)};e()},ji=Object.freeze(Object.defineProperty({__proto__:null,clearAutoRefresh:()=>{Fi&&(clearTimeout(Fi),Fi=null,console.log("[Auto Refresh] Cleared refresh timer"))},clearTokens:Ci,getAccessToken:wi,getRefreshToken:xi,getTokenExpiry:ki,isTokenExpired:Ei,refreshAccessToken:Si,setBearerToken:Bi,setTokens:bi,setupAutoRefresh:Qi},Symbol.toStringTag,{value:"Module"}));class Ui{constructor(){Se(this,"failures",0),Se(this,"lastFailureTime",0),Se(this,"state","closed"),Se(this,"failureThreshold",5),Se(this,"recoveryTimeout",6e4),Se(this,"halfOpenMaxCalls",3),Se(this,"halfOpenCalls",0)}canExecute(){const e=Date.now();switch(this.state){case"closed":return!0;case"open":return e-this.lastFailureTime>=this.recoveryTimeout&&(this.state="half-open",this.halfOpenCalls=0,!0);case"half-open":return this.halfOpenCalls<this.halfOpenMaxCalls;default:return!1}}onSuccess(){this.failures=0,this.state="closed",this.halfOpenCalls=0}onFailure(){this.failures++,this.lastFailureTime=Date.now(),"half-open"===this.state?(this.state="open",this.halfOpenCalls=0):this.failures>=this.failureThreshold&&(this.state="open")}getState(){return this.state}}class Oi{constructor(){Se(this,"requests",[]),Se(this,"maxRequests",10),Se(this,"windowMs",6e4)}canMakeRequest(){const e=Date.now();return this.requests=this.requests.filter(t=>e-t<this.windowMs),this.requests.length<this.maxRequests}recordRequest(){this.requests.push(Date.now())}getRemainingRequests(){const e=Date.now();return this.requests=this.requests.filter(t=>e-t<this.windowMs),Math.max(0,this.maxRequests-this.requests.length)}}const Ni=new class{constructor(){Se(this,"errorQueue",[]),Se(this,"isOnline","undefined"==typeof navigator||navigator.onLine),Se(this,"maxQueueSize",50),Se(this,"retryAttempts",2),Se(this,"retryDelay",2e3),Se(this,"circuitBreaker",new Ui),Se(this,"rateLimiter",new Oi),Se(this,"reportingEnabled",!0),Se(this,"duplicateErrorCache",new Map),Se(this,"duplicateTimeWindow",3e4),this.setupEventListeners()}setupEventListeners(){"undefined"!=typeof window&&(window.addEventListener("online",()=>{this.isOnline=!0,this.flushErrorQueue()}),window.addEventListener("offline",()=>{this.isOnline=!1}),window.addEventListener("error",e=>{this.handleJavaScriptError(e.error,{component:"Global",action:"Runtime Error"})}),window.addEventListener("unhandledrejection",e=>{this.handleJavaScriptError(new Error(e.reason),{component:"Global",action:"Unhandled Promise Rejection"})}))}async validateApiKeyBeforeRequest(e){return!!e||(console.warn("[Enhanced Error Handler] No API key provided for validation"),!1)}generateErrorFingerprint(e,t){return`${e.message}-${e.status}-${t.component}-${t.action}`}isDuplicateError(e){const t=Date.now(),n=this.duplicateErrorCache.get(e);if(n&&t-n<this.duplicateTimeWindow)return!0;this.duplicateErrorCache.set(e,t);for(const[r,i]of this.duplicateErrorCache.entries())t-i>this.duplicateTimeWindow&&this.duplicateErrorCache.delete(r);return!1}handleApiError(e,t){var n,r,i,a,o;const s={message:e.message||"An unexpected error occurred",status:e.status||(null==(n=e.response)?void 0:n.status)||0,code:e.code||(null==(i=null==(r=e.response)?void 0:r.data)?void 0:i.code),details:(null==(o=null==(a=e.response)?void 0:a.data)?void 0:o.details)||e.details,timestamp:(new Date).toISOString()},A={component:(null==t?void 0:t.component)||"Unknown",action:(null==t?void 0:t.action)||"Unknown",userId:null==t?void 0:t.userId,timestamp:(new Date).toISOString(),userAgent:"undefined"!=typeof navigator?navigator.userAgent:"server",url:"undefined"!=typeof window?window.location.href:"",apiKey:(null==t?void 0:t.apiKey)?t.apiKey.substring(0,20)+"...":void 0},l=this.determineSeverity(s),c={error:s,context:A,stack:e.stack,severity:l},u=this.generateErrorFingerprint(s,A);return this.isDuplicateError(u)?(console.log("[Enhanced Error Handler] Duplicate error detected, skipping report"),s):(this.reportError(c),this.showUserNotification(s,l),s)}handleJavaScriptError(e,t){const n={error:{message:e.message,status:0,code:"JAVASCRIPT_ERROR",details:{name:e.name},timestamp:(new Date).toISOString()},context:{component:(null==t?void 0:t.component)||"JavaScript",action:(null==t?void 0:t.action)||"Runtime",userId:null==t?void 0:t.userId,timestamp:(new Date).toISOString(),userAgent:"undefined"!=typeof navigator?navigator.userAgent:"server",url:"undefined"!=typeof window?window.location.href:""},stack:e.stack,severity:"medium"};this.reportError(n)}determineSeverity(e){return e.status>=500||"NETWORK_ERROR"===e.code?"critical":401===e.status||403===e.status||429===e.status?"high":e.status>=400&&e.status<500?"medium":"low"}async reportError(e){try{if(!this.reportingEnabled)return void console.log("[Enhanced Error Handler] Error reporting is disabled");if(!this.circuitBreaker.canExecute())return void console.warn("[Enhanced Error Handler] Circuit breaker is open, skipping error report");if(!this.rateLimiter.canMakeRequest())return void console.warn("[Enhanced Error Handler] Rate limit exceeded, skipping error report");if(this.errorQueue.push(e),this.errorQueue.length>this.maxQueueSize){const e=this.errorQueue.shift();console.warn("[Enhanced Error Handler] Queue full, removed oldest error:",null==e?void 0:e.error.message)}this.isOnline&&await this.flushErrorQueue()}catch(t){console.error("[Enhanced Error Handler] Failed to report error:",t)}}async flushErrorQueue(){var e,t,n,r;if(0===this.errorQueue.length)return;if(!this.circuitBreaker.canExecute())return void console.warn("[Enhanced Error Handler] Circuit breaker prevents error reporting");const i=[...this.errorQueue];this.errorQueue=[];for(let o=1;o<=this.retryAttempts;o++)try{const n=null==(t=null==(e=i[0])?void 0:e.context)?void 0:t.apiKey;if(!(await this.validateApiKeyBeforeRequest(n)))return console.warn("[Enhanced Error Handler] Invalid API key, skipping error report"),void this.circuitBreaker.onFailure();if(!this.rateLimiter.canMakeRequest())return console.warn("[Enhanced Error Handler] Rate limit exceeded during flush"),void this.errorQueue.unshift(...i);this.rateLimiter.recordRequest();const{api:r}=await Promise.resolve().then(()=>$i);return await r.post("/errors/report",{errors:i,clientInfo:{userAgent:"undefined"!=typeof navigator?navigator.userAgent:"server",timestamp:(new Date).toISOString(),url:"undefined"!=typeof window?window.location.href:"",circuitBreakerState:this.circuitBreaker.getState(),remainingRateLimit:this.rateLimiter.getRemainingRequests()}},{timeout:15e3}),console.log(`[Enhanced Error Handler] Successfully reported ${i.length} errors`),void this.circuitBreaker.onSuccess()}catch(a){if(console.warn(`[Enhanced Error Handler] Failed to send errors (attempt ${o}):`,a),401===(null==(n=a.response)?void 0:n.status)||403===(null==(r=a.response)?void 0:r.status))return console.error("[Enhanced Error Handler] Authentication error, stopping retries"),void this.circuitBreaker.onFailure();if(o===this.retryAttempts){this.circuitBreaker.onFailure();const e=i.filter(e=>"critical"===e.severity);e.length>0&&(this.errorQueue.unshift(...e),console.error(`[Enhanced Error Handler] Re-queued ${e.length} critical errors`)),console.error("[Enhanced Error Handler] All retry attempts failed")}else await new Promise(e=>setTimeout(e,this.retryDelay*Math.pow(2,o-1)))}}showUserNotification(e,t){const n=this.getUserFriendlyMessage(e);"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("error:notification",{detail:{message:n,severity:t,error:e,timestamp:(new Date).toISOString(),canRetry:this.canRetryError(e)}}))}canRetryError(e){return 401!==e.status&&403!==e.status&&!(e.status>=400&&e.status<500&&429!==e.status)}getUserFriendlyMessage(e){switch(e.status){case 400:return"Please check your input and try again.";case 401:return"Invalid API key. Please check your credentials.";case 403:return"Access denied. Please check your API key permissions.";case 404:return"The requested resource was not found.";case 422:return"Please check your data and try again.";case 429:return"Too many requests. Please wait a moment and try again.";case 500:return"A server error occurred. Our team has been notified.";case 503:return"The service is temporarily unavailable. Please try again later.";default:return"NETWORK_ERROR"===e.code?"Network connection error. Please check your internet connection.":e.message||"An unexpected error occurred."}}enableReporting(){this.reportingEnabled=!0,console.log("[Enhanced Error Handler] Error reporting enabled")}disableReporting(){this.reportingEnabled=!1,console.log("[Enhanced Error Handler] Error reporting disabled")}getQueueSize(){return this.errorQueue.length}getCircuitBreakerState(){return this.circuitBreaker.getState()}getRemainingRateLimit(){return this.rateLimiter.getRemainingRequests()}clearQueue(){this.errorQueue=[],console.log("[Enhanced Error Handler] Error queue cleared")}async forceFlush(){await this.flushErrorQueue()}};const Ii=new class{formatResponse(e){return e&&"object"==typeof e&&"success"in e?e:{success:!0,data:e,message:"Request completed successfully",status:200,timestamp:(new Date).toISOString()}}formatPaginatedResponse(e,t){const n=t.totalPages||Math.ceil(t.total/t.limit);return{success:!0,data:e,pagination:{page:t.page,limit:t.limit,total:t.total,totalPages:n,hasNext:t.page<n,hasPrev:t.page>1},message:"Request completed successfully",status:200,timestamp:(new Date).toISOString()}}formatErrorResponse(e){return{success:!1,data:null,error:{message:e.message||"An error occurred",status:e.status||500,code:e.code,details:e.details,timestamp:(new Date).toISOString()},message:e.message||"Request failed",status:e.status||500,timestamp:(new Date).toISOString()}}transformResponseData(e){if(null==e)return e;if(Array.isArray(e))return e.map(e=>this.transformResponseData(e));if("object"==typeof e&&e.constructor===Object){const t={};for(const[n,r]of Object.entries(e)){t[this.toCamelCase(n)]=this.transformResponseData(r)}return t}return e}transformRequestData(e){if(null==e)return e;if(Array.isArray(e))return e.map(e=>this.transformRequestData(e));if("object"==typeof e&&e.constructor===Object){const t={};for(const[n,r]of Object.entries(e)){t[this.toSnakeCase(n)]=this.transformRequestData(r)}return t}return e}toCamelCase(e){return e.replace(/_([a-z])/g,(e,t)=>t.toUpperCase())}toSnakeCase(e){return e.replace(/[A-Z]/g,e=>`_${e.toLowerCase()}`)}validateResponse(e){return"object"==typeof e&&null!==e&&"boolean"==typeof e.success&&"data"in e&&"message"in e&&"timestamp"in e}validatePaginatedResponse(e){return this.validateResponse(e)&&"pagination"in e&&"object"==typeof e.pagination&&null!==e.pagination&&"page"in e.pagination&&"limit"in e.pagination&&"total"in e.pagination&&"number"==typeof e.pagination.page&&"number"==typeof e.pagination.limit&&"number"==typeof e.pagination.total}extractData(e){var t;if(!e.success)throw new Error((null==(t=e.error)?void 0:t.message)||"Request failed");return e.data}extractPaginatedData(e){var t;if(!e.success)throw new Error((null==(t=e.error)?void 0:t.message)||"Request failed");return{data:e.data,pagination:e.pagination}}mergeResponses(e){const t=e.filter(e=>e.success),n=e.filter(e=>!e.success);return n.length>0?{success:!1,data:null,status:400,error:{message:`${n.length} out of ${e.length} requests failed`,status:400,code:"BATCH_PARTIAL_FAILURE",details:{successful:t.length,failed:n.length,errors:n.map(e=>e.error)},timestamp:(new Date).toISOString()},message:"Batch operation partially failed",timestamp:(new Date).toISOString()}:{success:!0,data:t.map(e=>e.data),status:200,message:`All ${e.length} requests completed successfully`,timestamp:(new Date).toISOString()}}createResponseWithMetadata(e,t={}){return{...this.formatResponse(e),metadata:t}}formatFileUploadResponse(e,t){return this.formatResponse({filename:t.filename||e.name,originalName:e.name,size:e.size,mimeType:e.type,url:t.url,id:t.id})}formatSearchResponse(e,t,n){return{...this.formatPaginatedResponse(e,n),filters:t}}},Ti=e=>Ii.transformRequestData(e),Pi=e=>{var t;return(e=>Ii.validateResponse(e))(e.data)||(e.data=(t=e.data,Ii.formatResponse(t))),e},Mi={SESSIONS:"chatbot-sessions",THEME:"chatbot-theme",CURRENT_SESSION:"chatbot-current-session",AUTH:"chatbot-auth",API_KEY:"pangents_current_api_key",CURRENT_ROUTE:"chatbot-current-route"},Di=e=>({...e,createdAt:new Date(e.createdAt),updatedAt:new Date(e.updatedAt),messages:e.messages.map(e=>({...e,timestamp:new Date(e.timestamp)}))}),Li={getAuth(){try{const e=localStorage.getItem(Mi.AUTH);return e?JSON.parse(e):null}catch(e){return console.error("Failed to get auth data:",e),null}},saveAuth(e){try{localStorage.setItem(Mi.AUTH,JSON.stringify(e))}catch(t){console.error("Failed to save auth data:",t)}},clearAuth(){try{localStorage.removeItem(Mi.AUTH)}catch(e){console.error("Failed to clear auth data:",e)}},getApiKey(){try{return localStorage.getItem(Mi.API_KEY)}catch(e){return console.error("Failed to get API key:",e),null}},saveApiKey(e){try{localStorage.setItem(Mi.API_KEY,e)}catch(t){console.error("Failed to save API key:",t)}},clearApiKey(){try{localStorage.removeItem(Mi.API_KEY)}catch(e){console.error("Failed to clear API key:",e)}},getSessions(){try{const e=localStorage.getItem(Mi.SESSIONS);if(!e)return[];return JSON.parse(e).map(Di)}catch(e){return console.error("Failed to get sessions:",e),[]}},saveSessions(e){try{localStorage.setItem(Mi.SESSIONS,JSON.stringify(e))}catch(t){console.error("Failed to save sessions:",t)}},getCurrentSession(){try{const e=localStorage.getItem(Mi.CURRENT_SESSION);if(!e)return null;const t=JSON.parse(e);return Di(t)}catch(e){return console.error("Failed to get current session:",e),null}},saveCurrentSession(e){try{e?localStorage.setItem(Mi.CURRENT_SESSION,JSON.stringify(e)):localStorage.removeItem(Mi.CURRENT_SESSION)}catch(t){console.error("Failed to save current session:",t)}},getTheme(){try{const e=localStorage.getItem(Mi.THEME);return e?JSON.parse(e):null}catch{return null}},saveTheme(e){try{localStorage.setItem(Mi.THEME,JSON.stringify(e))}catch(t){console.error("Failed to save theme:",t)}},getCurrentRoute(){try{return localStorage.getItem(Mi.CURRENT_ROUTE)}catch(e){return console.error("Failed to get current route:",e),null}},saveCurrentRoute(e){try{localStorage.setItem(Mi.CURRENT_ROUTE,e)}catch(t){console.error("Failed to save current route:",t)}},clearAll(){try{Object.values(Mi).forEach(e=>{localStorage.removeItem(e)})}catch(e){console.error("Failed to clear storage:",e)}}},Hi={development:"https://dev.backend.pangents.ai",staging:"https://stage.backend.pangents.ai",production:"https://app.backend.pangents.ai"};function _i(e){return e&&Hi[e]?Hi[e]:"https://dev.backend.pangents.ai/"}const Ri={baseURL:_i(),timeout:1e6,headers:{"Content-Type":"application/json",Accept:"application/json"}},Ki=Yr.create(Ri);function zi(e){Ki.defaults.baseURL=_i(e)}Ki.interceptors.request.use(e=>{var t,n;e=(e=>(e.data&&(e.data=Ti(e.data)),e.params&&(e.params=Ti(e.params)),e))(e);const r=wi();r&&e.headers&&(e.headers.Authorization=`Bearer ${r}`);const i=Li.getApiKey();return i&&e.headers&&(e.headers.api_key=i,e.headers.request_origin="tenant"),e.metadata={...e.metadata,requestTime:Date.now(),url:e.url,method:null==(t=e.method)?void 0:t.toUpperCase()},"development"===process.env.NODE_ENV&&console.log(`🚀 API Request: ${null==(n=e.method)?void 0:n.toUpperCase()} ${e.url}`,{headers:e.headers,data:e.data,params:e.params}),e}),Ki.interceptors.response.use(e=>{var t,n;const r=null==(t=(e=Pi(e)).config.metadata)?void 0:t.requestTime,i=r?Date.now()-r:0;return"development"===process.env.NODE_ENV&&console.log(`✅ API Response: ${null==(n=e.config.method)?void 0:n.toUpperCase()} ${e.config.url}`,{status:e.status,responseTime:`${i}ms`,data:e.data}),e.metadata={...e.config.metadata,responseTime:i,status:e.status,timestamp:(new Date).toISOString()},e},async e=>{var t,n,r,i,a,o,s,A,l,c,u,d;const h=e.config,p=null==(t=null==h?void 0:h.metadata)?void 0:t.requestTime,f=p?Date.now()-p:0;if("development"===process.env.NODE_ENV&&console.error(`❌ API Error: ${null==(n=null==h?void 0:h.method)?void 0:n.toUpperCase()} ${null==h?void 0:h.url}`,{status:null==(r=e.response)?void 0:r.status,responseTime:`${f}ms`,message:e.message,data:null==(i=e.response)?void 0:i.data}),401===(null==(a=e.response)?void 0:a.status)&&!h._retry){h._retry=!0;try{const e=await Si();if(e&&h.headers){h.headers.Authorization=`Bearer ${e}`;return(await Promise.resolve().then(()=>$i)).default.request(h)}}catch(g){console.error("[Token Refresh Failed]",g),Ci(),window.dispatchEvent(new CustomEvent("auth:logout",{detail:{reason:"token_refresh_failed"}}))}}const m=((e,t)=>Ni.handleApiError(e,t))(e,{component:"API",action:`${null==(o=null==h?void 0:h.method)?void 0:o.toUpperCase()} ${null==h?void 0:h.url}`});return 401!==(null==(s=e.response)?void 0:s.status)&&403!==(null==(A=e.response)?void 0:A.status)||!(null==(l=null==h?void 0:h.headers)?void 0:l.api_key)||(console.warn("[API Key Invalid] Clearing stored API key"),Li.clearApiKey(),window.dispatchEvent(new CustomEvent("api:key_invalid",{detail:{error:m,url:null==h?void 0:h.url}}))),401===(null==(c=e.response)?void 0:c.status)?window.dispatchEvent(new CustomEvent("auth:unauthorized",{detail:{error:m,url:null==h?void 0:h.url}})):403===(null==(u=e.response)?void 0:u.status)?window.dispatchEvent(new CustomEvent("auth:forbidden",{detail:{error:m,url:null==h?void 0:h.url}})):(null==(d=e.response)?void 0:d.status)>=500?window.dispatchEvent(new CustomEvent("api:server_error",{detail:{error:m,url:null==h?void 0:h.url}})):e.response||window.dispatchEvent(new CustomEvent("api:network_error",{detail:{error:m,url:null==h?void 0:h.url}})),Promise.reject(m)});Ki.defaults.transformRequest=[e=>e&&"object"==typeof e?Object.keys(e).reduce((t,n)=>(t[n.replace(/[A-Z]/g,e=>`_${e.toLowerCase()}`)]=e[n],t),{}):e,...Yr.defaults.transformRequest],Ki.defaults.transformResponse=[e=>e&&"object"==typeof e?Object.keys(e).reduce((t,n)=>(t[n.replace(/_([a-z])/g,(e,t)=>t.toUpperCase())]=e[n],t),{}):e,...Yr.defaults.transformResponse];const Vi={get:(e,t)=>Ki.get(e,t),post:(e,t,n)=>Ki.post(e,t,n),put:(e,t,n)=>Ki.put(e,t,n),patch:(e,t,n)=>Ki.patch(e,t,n),delete:(e,t)=>Ki.delete(e,t),updateProfile:async e=>(await Ki.patch("/profile",e)).data,initiateWorkflow:async e=>(await Ki.post("/workflow/initiate",e)).data,createCall:async e=>(await Ki.post("/calls",e)).data,updateCall:async(e,t)=>(await Ki.patch(`/calls/${e}`,t)).data,deleteCall:async e=>{await Ki.delete(`/calls/${e}`)},searchCarriers:async e=>(await Ki.get("/carriers/search",{params:e})).data,bulkUpdateCalls:async(e,t)=>(await Ki.patch("/calls/bulk",{ids:e,data:t})).data,getWorkflowList:async(e=1,t=10)=>(await Ki.get("/workflow/list",{params:{page:e,page_size:t}})).data.data,deleteWorkflow:async e=>(await Vi.delete(`/workflow/${e}`)).data,getWorkflowStatus:async e=>(await Vi.get(`/workflow/status/${e}`)).data.data,enqueueCallQueue:async e=>(await Vi.post("/agents/livekit/queue/enqueue",{queue:e})).data,getQueueStatus:async e=>(await Vi.get(`/agents/livekit/queue/${e}/status`)).data},$i=Object.freeze(Object.defineProperty({__proto__:null,api:Vi,default:Ki,resolveBaseUrl:_i,setApiBaseUrl:zi},Symbol.toStringTag,{value:"Module"})),Wi=["That's a great question! Let me help you with that.","I understand your concern. Here's what I can suggest...","Thanks for reaching out! I'm here to assist you.","Let me provide you with some helpful information.","I'd be happy to clarify that for you.","That's an interesting point. Here's my perspective...","I can definitely help you with that request.","Thanks for your patience. Here's what you need to know..."];function Gi(e){e=e.replace("#","");const t=parseInt(e.substr(0,2),16)/255,n=parseInt(e.substr(2,2),16)/255,r=parseInt(e.substr(4,2),16)/255,i=Math.max(t,n,r),a=Math.min(t,n,r);let o=0,s=0;const A=(i+a)/2;if(i!==a){const e=i-a;switch(s=A>.5?e/(2-i-a):e/(i+a),i){case t:o=(n-r)/e+(n<r?6:0);break;case n:o=(r-t)/e+2;break;case r:o=(t-n)/e+4}o/=6}return`${Math.round(360*o)} ${Math.round(100*s)}% ${Math.round(100*A)}%`}const qi={primaryColor:"#b07e48",headerBg:"#1f2937",headerText:"#ffffff",userBubble:"#3b82f6",botBubble:"#f3f4f6",fontFamily:"Inter, system-ui, sans-serif"},Xi={isOpen:!1,currentSession:null,sessions:[],isLoading:!1,error:null,currentScreen:"chat",theme:qi,isAuthenticated:!1,user:null,authLoading:!1};function Yi(e,t){var n;switch(console.log("ChatReducer: Action received:",t.type),console.log("ChatReducer: Current state:",e),t.type){case"OPEN_WIDGET":console.log("ChatReducer: Processing OPEN_WIDGET");const r={...e,isOpen:!0};return console.log("ChatReducer: New state after OPEN_WIDGET:",r),r;case"CLOSE_WIDGET":return{...e,isOpen:!1};case"SET_SCREEN":return{...e,currentScreen:t.payload};case"SET_LOADING":return{...e,isLoading:t.payload};case"SET_ERROR":return{...e,error:t.payload};case"SET_AUTH_LOADING":return{...e,authLoading:t.payload};case"SET_AUTHENTICATED":return{...e,isAuthenticated:!0,user:t.payload,authLoading:!1};case"LOGOUT":return{...e,isAuthenticated:!1,user:null,currentSession:null,sessions:[],currentScreen:"chat"};case"ADD_MESSAGE":if(!e.currentSession)return e;const i={...e.currentSession,messages:[...e.currentSession.messages,t.payload],updatedAt:new Date},a=e.sessions.map(e=>e.id===i.id?i:e);return{...e,currentSession:i,sessions:a};case"CREATE_SESSION":return{...e,currentSession:t.payload,sessions:[t.payload,...e.sessions]};case"LOAD_SESSION":return{...e,currentSession:t.payload};case"UPDATE_SESSIONS":return{...e,sessions:t.payload};case"DELETE_SESSION":const o=e.sessions.filter(e=>e.id!==t.payload),s=(null==(n=e.currentSession)?void 0:n.id)===t.payload?null:e.currentSession;return{...e,sessions:o,currentSession:s};case"UPDATE_THEME":return{...e,theme:{...e.theme,...t.payload}};case"CLEAR_DATA":return{...Xi,theme:e.theme};default:return console.log("ChatReducer: Unknown action type:",t),e}}const Ji=Te.createContext(void 0);function Zi({children:e,initialTheme:t,apiKey:n,tenantId:r,email:i,themeTarget:a,environment:o}){const[s,A]=Te.useReducer(Yi,Xi),l=Te.useRef({initialized:!1}),c=Te.useRef(null);Te.useEffect(()=>{c.current=a||null},[a]),Te.useEffect(()=>{zi(o)},[o]),Te.useEffect(()=>{const e=Li.getAuth(),n=Li.getSessions(),r=Li.getCurrentSession(),i=Li.getTheme();e&&e.email&&(A({type:"SET_AUTHENTICATED",payload:e}),n.length>0&&A({type:"UPDATE_SESSIONS",payload:n}),r&&A({type:"LOAD_SESSION",payload:r})),i?A({type:"UPDATE_THEME",payload:i}):t&&A({type:"UPDATE_THEME",payload:t})},[]),Te.useEffect(()=>{t&&A({type:"UPDATE_THEME",payload:t})},[t]),Te.useEffect(()=>{s.isAuthenticated&&Li.saveSessions(s.sessions)},[s.sessions,s.isAuthenticated]),Te.useEffect(()=>{s.isAuthenticated&&Li.saveCurrentSession(s.currentSession)},[s.currentSession,s.isAuthenticated]),Te.useEffect(()=>{Li.saveTheme(s.theme),function(e,t){const n=t||document.documentElement;if(e.primaryColor){const t=Gi(e.primaryColor);n.style.setProperty("--primary",t);const r=parseInt(t.split(" ")[2])>50?"0 0% 98%":"0 0% 9%";n.style.setProperty("--primary-foreground",r)}if(e.userBubble){const t=Gi(e.userBubble);n.style.setProperty("--user-bubble",t)}if(e.botBubble){const t=Gi(e.botBubble);n.style.setProperty("--bot-bubble",t)}}(s.theme,c.current)},[s.theme]),Te.useEffect(()=>{s.user&&Li.saveAuth(s.user)},[s.user]);const u=e=>A({type:"SET_SCREEN",payload:e}),d=async e=>{if(!e.trim())return;if(!s.currentSession)return h(),void setTimeout(()=>d(e),100);const t={id:`msg-${Date.now()}-user`,content:e.trim(),sender:"user",timestamp:new Date};A({type:"ADD_MESSAGE",payload:t}),A({type:"SET_LOADING",payload:!0}),setTimeout(()=>{const e={id:`msg-${Date.now()}-bot`,content:Wi[Math.floor(Math.random()*Wi.length)],sender:"bot",timestamp:new Date};A({type:"ADD_MESSAGE",payload:e}),A({type:"SET_LOADING",payload:!1})},1e3+2e3*Math.random())},h=()=>{const e={id:`session-${Date.now()}`,title:"New Conversation",messages:[],createdAt:new Date,updatedAt:new Date};A({type:"CREATE_SESSION",payload:e})};Te.useEffect(()=>{const e=Li.getApiKey();if(n&&n!==e&&Li.saveApiKey(n),!n&&e&&Li.clearApiKey(),l.current.initialized){const e=Li.getAuth(),t=null==e?void 0:e.email;i&&l.current.email!==i&&i!==t&&(Li.clearAuth(),Li.saveSessions([]),Li.saveCurrentSession(null)),r&&l.current.tenantId&&l.current.tenantId!==r&&(Li.clearAuth(),Li.saveSessions([]),Li.saveCurrentSession(null))}l.current={apiKey:n,tenantId:r,email:i,initialized:!0}},[n,r,i]);const p={...s,openWidget:()=>{console.log("ChatContext: openWidget called"),console.log("ChatContext: Current state before dispatch:",s),A({type:"OPEN_WIDGET"}),console.log("ChatContext: OPEN_WIDGET dispatched")},closeWidget:()=>A({type:"CLOSE_WIDGET"}),setCurrentScreen:u,authenticate:async(e,t)=>{A({type:"SET_AUTH_LOADING",payload:!0});try{if(await new Promise(e=>setTimeout(e,1500)),e&&6===t.length){const t=`token_${Date.now()}_${Math.random().toString(36).substr(2,9)}`;return A({type:"SET_AUTHENTICATED",payload:{email:e,token:t}}),!0}return!1}catch(n){return A({type:"SET_AUTH_LOADING",payload:!1}),!1}},login:e=>{const t=`token_${Date.now()}_${Math.random().toString(36).substr(2,9)}`;A({type:"SET_AUTHENTICATED",payload:{email:e,token:t}})},logout:()=>{Promise.resolve().then(()=>ji).then(({clearTokens:e,clearAutoRefresh:t})=>{t(),e()}),Li.clearAuth(),Li.saveSessions([]),Li.saveCurrentSession(null),A({type:"LOGOUT"})},sendMessage:d,createNewSession:h,loadSession:e=>{const t=s.sessions.find(t=>t.id===e);t&&(A({type:"LOAD_SESSION",payload:t}),u("chat"))},deleteSession:e=>{A({type:"DELETE_SESSION",payload:e})},updateTheme:e=>{A({type:"UPDATE_THEME",payload:e})},resetTheme:()=>{A({type:"UPDATE_THEME",payload:qi})},clearAllData:()=>{Li.clearAll(),A({type:"CLEAR_DATA"})},apiKey:n,tenantId:r,email:i,environment:o};return Ie.jsx(Ji.Provider,{value:p,children:e})}function ea(){const e=Te.useContext(Ji);if(void 0===e)throw new Error("useChatContext must be used within a ChatProvider");return e}const ta=Te.createContext({});function na(e){const t=Te.useRef(null);return null===t.current&&(t.current=e()),t.current}const ra="undefined"!=typeof window,ia=ra?Te.useLayoutEffect:Te.useEffect,aa=Te.createContext(null);function oa(e,t){-1===e.indexOf(t)&&e.push(t)}function sa(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Aa=(e,t,n)=>n>t?t:n<e?e:n;function la(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let ca=()=>{},ua=()=>{};"production"!==process.env.NODE_ENV&&(ca=(e,t,n)=>{e||"undefined"==typeof console||console.warn(la(t,n))},ua=(e,t,n)=>{if(!e)throw new Error(la(t,n))});const da={},ha=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function pa(e){return"object"==typeof e&&null!==e}const fa=e=>/^0[^.\s]+$/u.test(e);function ma(e){let t;return()=>(void 0===t&&(t=e()),t)}const ga=e=>e,ya=(e,t)=>n=>t(e(n)),va=(...e)=>e.reduce(ya),wa=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r};class xa{constructor(){this.subscriptions=[]}add(e){return oa(this.subscriptions,e),()=>sa(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){const r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const ba=e=>1e3*e,Ba=e=>e/1e3;function Ca(e,t){return t?e*(1e3/t):0}const Ea=new Set;function ka(e,t,n){e||Ea.has(t)||(console.warn(la(t,n)),Ea.add(t))}const Sa=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function Fa(e,t,n,r){if(e===t&&n===r)return ga;const i=t=>function(e,t,n,r,i){let a,o,s=0;do{o=t+(n-t)/2,a=Sa(o,r,i)-e,a>0?n=o:t=o}while(Math.abs(a)>1e-7&&++s<12);return o}(t,0,1,e,n);return e=>0===e||1===e?e:Sa(i(e),t,r)}const Qa=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ja=e=>t=>1-e(1-t),Ua=Fa(.33,1.53,.69,.99),Oa=ja(Ua),Na=Qa(Oa),Ia=e=>(e*=2)<1?.5*Oa(e):.5*(2-Math.pow(2,-10*(e-1))),Ta=e=>1-Math.sin(Math.acos(e)),Pa=ja(Ta),Ma=Qa(Ta),Da=Fa(.42,0,1,1),La=Fa(0,0,.58,1),Ha=Fa(.42,0,.58,1),_a=e=>Array.isArray(e)&&"number"==typeof e[0],Ra={linear:ga,easeIn:Da,easeInOut:Ha,easeOut:La,circIn:Ta,circInOut:Ma,circOut:Pa,backIn:Oa,backInOut:Na,backOut:Ua,anticipate:Ia},Ka=e=>{if(_a(e)){ua(4===e.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,i]=e;return Fa(t,n,r,i)}return"string"==typeof e?(ua(void 0!==Ra[e],`Invalid easing type '${e}'`,"invalid-easing-type"),Ra[e]):e},za=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Va(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=za.reduce((e,t)=>(e[t]=function(e){let t=new Set,n=new Set,r=!1,i=!1;const a=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function s(t){a.has(t)&&(A.schedule(t),e()),t(o)}const A={schedule:(e,i=!1,o=!1)=>{const s=o&&r?t:n;return i&&a.add(e),s.has(e)||s.add(e),e},cancel:e=>{n.delete(e),a.delete(e)},process:e=>{o=e,r?i=!0:(r=!0,[t,n]=[n,t],t.forEach(s),t.clear(),r=!1,i&&(i=!1,A.process(e)))}};return A}(a),e),{}),{setup:s,read:A,resolveKeyframes:l,preUpdate:c,update:u,preRender:d,render:h,postRender:p}=o,f=()=>{const a=da.useManualTiming?i.timestamp:performance.now();n=!1,da.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(a-i.timestamp,40),1)),i.timestamp=a,i.isProcessing=!0,s.process(i),A.process(i),l.process(i),c.process(i),u.process(i),d.process(i),h.process(i),p.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(f))};return{schedule:za.reduce((t,a)=>{const s=o[a];return t[a]=(t,a=!1,o=!1)=>(n||(n=!0,r=!0,i.isProcessing||e(f)),s.schedule(t,a,o)),t},{}),cancel:e=>{for(let t=0;t<za.length;t++)o[za[t]].cancel(e)},state:i,steps:o}}const{schedule:$a,cancel:Wa,state:Ga,steps:qa}=Va("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:ga,!0);let Xa;function Ya(){Xa=void 0}const Ja={now:()=>(void 0===Xa&&Ja.set(Ga.isProcessing||da.useManualTiming?Ga.timestamp:performance.now()),Xa),set:e=>{Xa=e,queueMicrotask(Ya)}},Za=e=>t=>"string"==typeof t&&t.startsWith(e),eo=Za("--"),to=Za("var(--"),no=e=>!!to(e)&&ro.test(e.split("/*")[0].trim()),ro=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,io={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},ao={...io,transform:e=>Aa(0,1,e)},oo={...io,default:1},so=e=>Math.round(1e5*e)/1e5,Ao=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const lo=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,co=(e,t)=>n=>Boolean("string"==typeof n&&lo.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),uo=(e,t,n)=>r=>{if("string"!=typeof r)return r;const[i,a,o,s]=r.match(Ao);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:void 0!==s?parseFloat(s):1}},ho={...io,transform:e=>Math.round((e=>Aa(0,255,e))(e))},po={test:co("rgb","red"),parse:uo("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+ho.transform(e)+", "+ho.transform(t)+", "+ho.transform(n)+", "+so(ao.transform(r))+")"};const fo={test:co("#"),parse:function(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}},transform:po.transform},mo=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),go=mo("deg"),yo=mo("%"),vo=mo("px"),wo=mo("vh"),xo=mo("vw"),bo=(()=>({...yo,parse:e=>yo.parse(e)/100,transform:e=>yo.transform(100*e)}))(),Bo={test:co("hsl","hue"),parse:uo("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+yo.transform(so(t))+", "+yo.transform(so(n))+", "+so(ao.transform(r))+")"},Co={test:e=>po.test(e)||fo.test(e)||Bo.test(e),parse:e=>po.test(e)?po.parse(e):Bo.test(e)?Bo.parse(e):fo.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?po.transform(e):Bo.transform(e),getAnimatableNone:e=>{const t=Co.parse(e);return t.alpha=0,Co.transform(t)}},Eo=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const ko="number",So="color",Fo=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Qo(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let a=0;const o=t.replace(Fo,e=>(Co.test(e)?(r.color.push(a),i.push(So),n.push(Co.parse(e))):e.startsWith("var(")?(r.var.push(a),i.push("var"),n.push(e)):(r.number.push(a),i.push(ko),n.push(parseFloat(e))),++a,"${}")).split("${}");return{values:n,split:o,indexes:r,types:i}}function jo(e){return Qo(e).values}function Uo(e){const{split:t,types:n}=Qo(e),r=t.length;return e=>{let i="";for(let a=0;a<r;a++)if(i+=t[a],void 0!==e[a]){const t=n[a];i+=t===ko?so(e[a]):t===So?Co.transform(e[a]):e[a]}return i}}const Oo=e=>"number"==typeof e?0:Co.test(e)?Co.getAnimatableNone(e):e;const No={test:function(e){var t,n;return isNaN(e)&&"string"==typeof e&&((null==(t=e.match(Ao))?void 0:t.length)||0)+((null==(n=e.match(Eo))?void 0:n.length)||0)>0},parse:jo,createTransformer:Uo,getAnimatableNone:function(e){const t=jo(e);return Uo(e)(t.map(Oo))}};function Io(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function To(e,t){return n=>n>0?t:e}const Po=(e,t,n)=>e+(t-e)*n,Mo=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},Do=[fo,po,Bo];function Lo(e){const t=(n=e,Do.find(e=>e.test(n)));var n;if(ca(Boolean(t),`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!Boolean(t))return!1;let r=t.parse(e);return t===Bo&&(r=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let i=0,a=0,o=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=Io(s,r,e+1/3),a=Io(s,r,e),o=Io(s,r,e-1/3)}else i=a=o=n;return{red:Math.round(255*i),green:Math.round(255*a),blue:Math.round(255*o),alpha:r}}(r)),r}const Ho=(e,t)=>{const n=Lo(e),r=Lo(t);if(!n||!r)return To(e,t);const i={...n};return e=>(i.red=Mo(n.red,r.red,e),i.green=Mo(n.green,r.green,e),i.blue=Mo(n.blue,r.blue,e),i.alpha=Po(n.alpha,r.alpha,e),po.transform(i))},_o=new Set(["none","hidden"]);function Ro(e,t){return n=>Po(e,t,n)}function Ko(e){return"number"==typeof e?Ro:"string"==typeof e?no(e)?To:Co.test(e)?Ho:$o:Array.isArray(e)?zo:"object"==typeof e?Co.test(e)?Ho:Vo:To}function zo(e,t){const n=[...e],r=n.length,i=e.map((e,n)=>Ko(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function Vo(e,t){const n={...e,...t},r={};for(const i in n)void 0!==e[i]&&void 0!==t[i]&&(r[i]=Ko(e[i])(e[i],t[i]));return e=>{for(const t in r)n[t]=r[t](e);return n}}const $o=(e,t)=>{const n=No.createTransformer(t),r=Qo(e),i=Qo(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?_o.has(e)&&!i.values.length||_o.has(t)&&!r.values.length?function(e,t){return _o.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):va(zo(function(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const a=t.types[i],o=e.indexes[a][r[a]],s=e.values[o]??0;n[i]=s,r[a]++}return n}(r,i),i.values),n):(ca(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),To(e,t))};function Wo(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return Po(e,t,n);return Ko(e)(e,t)}const Go=e=>{const t=({timestamp:t})=>e(t);return{start:(e=!0)=>$a.update(t,e),stop:()=>Wa(t),now:()=>Ga.isProcessing?Ga.timestamp:Ja.now()}},qo=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let a=0;a<i;a++)r+=Math.round(1e4*e(a/(i-1)))/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Xo=2e4;function Yo(e){let t=0;let n=e.next(t);for(;!n.done&&t<Xo;)t+=50,n=e.next(t);return t>=Xo?1/0:t}function Jo(e,t,n){const r=Math.max(t-5,0);return Ca(n-e(r),t-r)}const Zo=100,es=10,ts=1,ns=0,rs=800,is=.3,as=.3,os={granular:.01,default:2},ss={granular:.005,default:.5},As=.01,ls=10,cs=.05,us=1,ds=.001;function hs({duration:e=rs,bounce:t=is,velocity:n=ns,mass:r=ts}){let i,a;ca(e<=ba(ls),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-t;o=Aa(cs,us,o),e=Aa(As,ls,Ba(e)),o<1?(i=t=>{const r=t*o,i=r*e,a=r-n,s=fs(t,o),A=Math.exp(-i);return ds-a/s*A},a=t=>{const r=t*o*e,a=r*n+n,s=Math.pow(o,2)*Math.pow(t,2)*e,A=Math.exp(-r),l=fs(Math.pow(t,2),o);return(-i(t)+ds>0?-1:1)*((a-s)*A)/l}):(i=t=>Math.exp(-t*e)*((t-n)*e+1)-.001,a=t=>Math.exp(-t*e)*(e*e*(n-t)));const s=function(e,t,n){let r=n;for(let i=1;i<ps;i++)r-=e(r)/t(r);return r}(i,a,5/e);if(e=ba(e),isNaN(s))return{stiffness:Zo,damping:es,duration:e};{const t=Math.pow(s,2)*r;return{stiffness:t,damping:2*o*Math.sqrt(r*t),duration:e}}}const ps=12;function fs(e,t){return e*Math.sqrt(1-t*t)}const ms=["duration","bounce"],gs=["stiffness","damping","mass"];function ys(e,t){return t.some(t=>void 0!==e[t])}function vs(e=as,t=is){const n="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:A,damping:l,mass:c,duration:u,velocity:d,isResolvedFromDuration:h}=function(e){let t={velocity:ns,stiffness:Zo,damping:es,mass:ts,isResolvedFromDuration:!1,...e};if(!ys(e,gs)&&ys(e,ms))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(1.2*n),i=r*r,a=2*Aa(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:ts,stiffness:i,damping:a}}else{const n=hs(e);t={...t,...n,mass:ts},t.isResolvedFromDuration=!0}return t}({...n,velocity:-Ba(n.velocity||0)}),p=d||0,f=l/(2*Math.sqrt(A*c)),m=o-a,g=Ba(Math.sqrt(A/c)),y=Math.abs(m)<5;let v;if(r||(r=y?os.granular:os.default),i||(i=y?ss.granular:ss.default),f<1){const e=fs(g,f);v=t=>{const n=Math.exp(-f*g*t);return o-n*((p+f*g*m)/e*Math.sin(e*t)+m*Math.cos(e*t))}}else if(1===f)v=e=>o-Math.exp(-g*e)*(m+(p+g*m)*e);else{const e=g*Math.sqrt(f*f-1);v=t=>{const n=Math.exp(-f*g*t),r=Math.min(e*t,300);return o-n*((p+f*g*m)*Math.sinh(r)+e*m*Math.cosh(r))/e}}const w={calculatedDuration:h&&u||null,next:e=>{const t=v(e);if(h)s.done=e>=u;else{let n=0===e?p:0;f<1&&(n=0===e?ba(p):Jo(v,e,t));const a=Math.abs(n)<=r,A=Math.abs(o-t)<=i;s.done=a&&A}return s.value=s.done?o:t,s},toString:()=>{const e=Math.min(Yo(w),Xo),t=qo(t=>w.next(e*t).value,e,30);return e+"ms "+t},toTransition:()=>{}};return w}function ws({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:A,restDelta:l=.5,restSpeed:c}){const u=e[0],d={done:!1,value:u},h=e=>void 0===s?A:void 0===A||Math.abs(s-e)<Math.abs(A-e)?s:A;let p=n*t;const f=u+p,m=void 0===o?f:o(f);m!==f&&(p=m-u);const g=e=>-p*Math.exp(-e/r),y=e=>m+g(e),v=e=>{const t=g(e),n=y(e);d.done=Math.abs(t)<=l,d.value=d.done?m:n};let w,x;const b=e=>{var t;(t=d.value,void 0!==s&&t<s||void 0!==A&&t>A)&&(w=e,x=vs({keyframes:[d.value,h(d.value)],velocity:Jo(y,e,d.value),damping:i,stiffness:a,restDelta:l,restSpeed:c}))};return b(0),{calculatedDuration:null,next:e=>{let t=!1;return x||void 0!==w||(t=!0,v(e),b(e)),void 0!==w&&e>=w?x.next(e-w):(!t&&v(e),d)}}}function xs(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const a=e.length;if(ua(a===t.length,"Both input and output ranges must be the same length","range-length"),1===a)return()=>t[0];if(2===a&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=function(e,t,n){const r=[],i=n||da.mix||Wo,a=e.length-1;for(let o=0;o<a;o++){let n=i(e[o],e[o+1]);if(t){const e=Array.isArray(t)?t[o]||ga:t;n=va(e,n)}r.push(n)}return r}(t,r,i),A=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(A>1)for(;r<e.length-2&&!(n<e[r+1]);r++);const i=wa(e[r],e[r+1],n);return s[r](i)};return n?t=>l(Aa(e[0],e[a-1],t)):l}function bs(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=wa(0,t,r);e.push(Po(n,1,i))}}(t,e.length-1),t}function Bs({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=(e=>Array.isArray(e)&&"number"!=typeof e[0])(r)?r.map(Ka):Ka(r),a={done:!1,value:t[0]},o=function(e,t){return e.map(e=>e*t)}(n&&n.length===t.length?n:bs(t),e),s=xs(o,t,{ease:Array.isArray(i)?i:(A=t,l=i,A.map(()=>l||Ha).splice(0,A.length-1))});var A,l;return{calculatedDuration:e,next:t=>(a.value=s(t),a.done=t>=e,a)}}vs.applyToOptions=e=>{const t=function(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(Yo(r),Xo);return{type:"keyframes",ease:e=>r.next(i*e).value/t,duration:Ba(i)}}(e,100,vs);return e.ease=t.ease,e.duration=ba(t.duration),e.type="keyframes",e};const Cs=e=>null!==e;function Es(e,{repeat:t,repeatType:n="loop"},r,i=1){const a=e.filter(Cs),o=i<0||t&&"loop"!==n&&t%2==1?0:a.length-1;return o&&void 0!==r?r:a[o]}const ks={decay:ws,inertia:ws,tween:Bs,keyframes:Bs,spring:vs};function Ss(e){"string"==typeof e.type&&(e.type=ks[e.type])}class Fs{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}}const Qs=e=>e/100;class js extends Fs{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var e,t;const{motionValue:n}=this.options;n&&n.updatedAt!==Ja.now()&&this.tick(Ja.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),null==(t=(e=this.options).onStop)||t.call(e))},this.options=e,this.initAnimation(),this.play(),!1===e.autoplay&&this.pause()}initAnimation(){const{options:e}=this;Ss(e);const{type:t=Bs,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e;let{keyframes:o}=e;const s=t||Bs;"production"!==process.env.NODE_ENV&&s!==Bs&&ua(o.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${o}`,"spring-two-frames"),s!==Bs&&"number"!=typeof o[0]&&(this.mixKeyframes=va(Qs,Wo(o[0],o[1])),o=[0,100]);const A=s({...e,keyframes:o});"mirror"===i&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),null===A.calculatedDuration&&(A.calculatedDuration=Yo(A));const{calculatedDuration:l}=A;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=A}updateTime(e){const t=Math.round(e-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=t}tick(e,t=!1){const{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(null===this.startTime)return n.next(0);const{delay:A=0,keyframes:l,repeat:c,repeatType:u,repeatDelay:d,type:h,onUpdate:p,finalKeyframe:f}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);const m=this.currentTime-A*(this.playbackSpeed>=0?1:-1),g=this.playbackSpeed>=0?m<0:m>r;this.currentTime=Math.max(m,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=r);let y=this.currentTime,v=n;if(c){const e=Math.min(this.currentTime,r)/o;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,c+1);Boolean(t%2)&&("reverse"===u?(n=1-n,d&&(n-=d/o)):"mirror"===u&&(v=a)),y=Aa(0,1,n)*o}const w=g?{done:!1,value:l[0]}:v.next(y);i&&(w.value=i(w.value));let{done:x}=w;g||null===s||(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const b=null===this.holdTime&&("finished"===this.state||"running"===this.state&&x);return b&&h!==ws&&(w.value=Es(l,this.options,f,this.speed)),p&&p(w.value),b&&this.finish(),w}then(e,t){return this.finished.then(e,t)}get duration(){return Ba(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Ba(e)}get time(){return Ba(this.currentTime)}set time(e){var t;e=ba(e),this.currentTime=e,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),null==(t=this.driver)||t.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(Ja.now());const t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=Ba(this.currentTime))}play(){var e,t;if(this.isStopped)return;const{driver:n=Go,startTime:r}=this.options;this.driver||(this.driver=n(e=>this.tick(e))),null==(t=(e=this.options).onPlay)||t.call(e);const i=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=i):null!==this.holdTime?this.startTime=i-this.holdTime:this.startTime||(this.startTime=r??i),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Ja.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,t;this.notifyFinished(),this.teardown(),this.state="finished",null==(t=(e=this.options).onComplete)||t.call(e)}cancel(){var e,t;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),null==(t=(e=this.options).onCancel)||t.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var t;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),null==(t=this.driver)||t.stop(),e.observe(this)}}const Us=e=>180*e/Math.PI,Os=e=>{const t=Us(Math.atan2(e[1],e[0]));return Is(t)},Ns={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Os,rotateZ:Os,skewX:e=>Us(Math.atan(e[1])),skewY:e=>Us(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Is=e=>((e%=360)<0&&(e+=360),e),Ts=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Ps=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Ms={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ts,scaleY:Ps,scale:e=>(Ts(e)+Ps(e))/2,rotateX:e=>Is(Us(Math.atan2(e[6],e[5]))),rotateY:e=>Is(Us(Math.atan2(-e[2],e[0]))),rotateZ:Os,rotate:Os,skewX:e=>Us(Math.atan(e[4])),skewY:e=>Us(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Ds(e){return e.includes("scale")?1:0}function Ls(e,t){if(!e||"none"===e)return Ds(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=Ms,i=n;else{const t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Ns,i=t}if(!i)return Ds(t);const a=r[t],o=i[1].split(",").map(Hs);return"function"==typeof a?a(o):o[a]}function Hs(e){return parseFloat(e.trim())}const _s=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Rs=(()=>new Set(_s))(),Ks=e=>e===io||e===vo,zs=new Set(["x","y","z"]),Vs=_s.filter(e=>!zs.has(e));const $s={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Ls(t,"x"),y:(e,{transform:t})=>Ls(t,"y")};$s.translateX=$s.x,$s.translateY=$s.y;const Ws=new Set;let Gs=!1,qs=!1,Xs=!1;function Ys(){if(qs){const e=Array.from(Ws).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{const t=function(e){const t=[];return Vs.forEach(n=>{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();const t=n.get(e);t&&t.forEach(([t,n])=>{var r;null==(r=e.getValue(t))||r.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}qs=!1,Gs=!1,Ws.forEach(e=>e.complete(Xs)),Ws.clear()}function Js(){Ws.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(qs=!0)})}class Zs{constructor(e,t,n,r,i,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(Ws.add(this),Gs||(Gs=!0,$a.read(Js),$a.resolveKeyframes(Ys))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(null===e[0]){const i=null==r?void 0:r.get(),a=e[e.length-1];if(void 0!==i)e[0]=i;else if(n&&t){const r=n.readValue(t,a);null!=r&&(e[0]=r)}void 0===e[0]&&(e[0]=a),r&&void 0===i&&r.set(e[0])}!function(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Ws.delete(this)}cancel(){"scheduled"===this.state&&(Ws.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const eA=ma(()=>void 0!==window.ScrollTimeline),tA={};function nA(e,t){const n=ma(e);return()=>tA[t]??n()}const rA=nA(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(qX){return!1}return!0},"linearEasing"),iA=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,aA={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:iA([0,.65,.55,1]),circOut:iA([.55,0,1,.45]),backIn:iA([.31,.01,.66,-.59]),backOut:iA([.33,1.53,.69,.99])};function oA(e,t){return e?"function"==typeof e?rA()?qo(e,t):"ease-out":_a(e)?iA(e):Array.isArray(e)?e.map(e=>oA(e,t)||aA.easeOut):aA[e]:void 0}function sA(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o="loop",ease:s="easeOut",times:A}={},l=void 0){const c={[t]:n};A&&(c.offset=A);const u=oA(s,i);Array.isArray(u)&&(c.easing=u);const d={delay:r,duration:i,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:a+1,direction:"reverse"===o?"alternate":"normal"};l&&(d.pseudoElement=l);return e.animate(c,d)}function AA(e){return"function"==typeof e&&"applyToOptions"in e}class lA extends Fs{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=Boolean(i),this.allowFlatten=a,this.options=e,ua("string"!=typeof e.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const A=function({type:e,...t}){return AA(e)&&rA()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}(e);this.animation=sA(t,n,r,A,i),!1===A.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const e=Es(r,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(e):function(e,t,n){(e=>e.startsWith("--"))(t)?e.style.setProperty(t,n):e.style[t]=n}(t,n,e),this.animation.cancel()}null==s||s(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,t;null==(t=(e=this.animation).finish)||t.call(e)}cancel(){try{this.animation.cancel()}catch(qX){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;"idle"!==e&&"finished"!==e&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var e,t;this.isPseudoElement||null==(t=(e=this.animation).commitStyles)||t.call(e)}get duration(){var e,t;const n=(null==(t=null==(e=this.animation.effect)?void 0:e.getComputedTiming)?void 0:t.call(e).duration)||0;return Ba(Number(n))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Ba(e)}get time(){return Ba(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=ba(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:t}){var n;return this.allowFlatten&&(null==(n=this.animation.effect)||n.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&eA()?(this.animation.timeline=e,ga):t(this)}}const cA={anticipate:Ia,backInOut:Na,circInOut:Ma};function uA(e){"string"==typeof e.ease&&e.ease in cA&&(e.ease=cA[e.ease])}class dA extends lA{constructor(e){uA(e),Ss(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(void 0!==e)return void t.set(e);const o=new js({...a,autoplay:!1}),s=ba(this.finishedTime??this.time);t.setWithVelocity(o.sample(s-10).value,o.sample(s).value,10),o.stop()}}const hA=(e,t)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!No.test(e)&&"0"!==e||e.startsWith("url(")));function pA(e){e.duration=0,e.type="keyframes"}const fA=new Set(["opacity","clipPath","filter","transform"]),mA=ma(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class gA extends Fs{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:a="loop",keyframes:o,name:s,motionValue:A,element:l,...c}){var u;super(),this.stop=()=>{var e,t;this._animation&&(this._animation.stop(),null==(e=this.stopTimeline)||e.call(this)),null==(t=this.keyframeResolver)||t.cancel()},this.createdAt=Ja.now();const d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,name:s,motionValue:A,element:l,...c},h=(null==l?void 0:l.KeyframeResolver)||Zs;this.keyframeResolver=new h(o,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,A,l),null==(u=this.keyframeResolver)||u.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;const{name:i,type:a,velocity:o,delay:s,isHandoff:A,onUpdate:l}=n;this.resolvedAt=Ja.now(),function(e,t,n,r){const i=e[0];if(null===i)return!1;if("display"===t||"visibility"===t)return!0;const a=e[e.length-1],o=hA(i,t),s=hA(a,t);return ca(o===s,`You are trying to animate ${t} from "${i}" to "${a}". "${o?a:i}" is not an animatable value.`,"value-not-animatable"),!(!o||!s)&&(function(e){const t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||("spring"===n||AA(n))&&r)}(e,i,a,o)||(!da.instantAnimations&&s||null==l||l(Es(e,n,t)),e[0]=e[e.length-1],pA(n),n.repeat=0);const c={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},u=!A&&function(e){var t;const{motionValue:n,name:r,repeatDelay:i,repeatType:a,damping:o,type:s}=e;if(!((null==(t=null==n?void 0:n.owner)?void 0:t.current)instanceof HTMLElement))return!1;const{onUpdate:A,transformTemplate:l}=n.owner.getProps();return mA()&&r&&fA.has(r)&&("transform"!==r||!l)&&!A&&!i&&"mirror"!==a&&0!==o&&"inertia"!==s}(c)?new dA({...c,element:c.motionValue.owner.current}):new js(c);u.finished.then(()=>this.notifyFinished()).catch(ga),this.pendingTimeline&&(this.stopTimeline=u.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=u}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||(null==(e=this.keyframeResolver)||e.resume(),Xs=!0,Js(),Ys(),Xs=!1),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var e;this._animation&&this.animation.cancel(),null==(e=this.keyframeResolver)||e.cancel()}}const yA=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function vA(e,t,n=1){ua(n<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,i]=function(e){const t=yA.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}(e);if(!r)return;const a=window.getComputedStyle(t).getPropertyValue(r);if(a){const e=a.trim();return ha(e)?parseFloat(e):e}return no(i)?vA(i,t,n+1):i}function wA(e,t){return(null==e?void 0:e[t])??(null==e?void 0:e.default)??e}const xA=new Set(["width","height","top","left","right","bottom",..._s]),bA=e=>t=>t.test(e),BA=[io,vo,yo,go,xo,wo,{test:e=>"auto"===e,parse:e=>e}],CA=e=>BA.find(bA(e));function EA(e){return"number"==typeof e?0===e:null===e||("none"===e||"0"===e||fa(e))}const kA=new Set(["brightness","contrast","saturate","opacity"]);function SA(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(Ao)||[];if(!r)return e;const i=n.replace(r,"");let a=kA.has(t)?1:0;return r!==n&&(a*=100),t+"("+a+i+")"}const FA=/\b([a-z-]*)\(.*?\)/gu,QA={...No,getAnimatableNone:e=>{const t=e.match(FA);return t?t.map(SA).join(" "):e}},jA={...io,transform:Math.round},UA={borderWidth:vo,borderTopWidth:vo,borderRightWidth:vo,borderBottomWidth:vo,borderLeftWidth:vo,borderRadius:vo,radius:vo,borderTopLeftRadius:vo,borderTopRightRadius:vo,borderBottomRightRadius:vo,borderBottomLeftRadius:vo,width:vo,maxWidth:vo,height:vo,maxHeight:vo,top:vo,right:vo,bottom:vo,left:vo,padding:vo,paddingTop:vo,paddingRight:vo,paddingBottom:vo,paddingLeft:vo,margin:vo,marginTop:vo,marginRight:vo,marginBottom:vo,marginLeft:vo,backgroundPositionX:vo,backgroundPositionY:vo,...{rotate:go,rotateX:go,rotateY:go,rotateZ:go,scale:oo,scaleX:oo,scaleY:oo,scaleZ:oo,skew:go,skewX:go,skewY:go,distance:vo,translateX:vo,translateY:vo,translateZ:vo,x:vo,y:vo,z:vo,perspective:vo,transformPerspective:vo,opacity:ao,originX:bo,originY:bo,originZ:vo},zIndex:jA,fillOpacity:ao,strokeOpacity:ao,numOctaves:jA},OA={...UA,color:Co,backgroundColor:Co,outlineColor:Co,fill:Co,stroke:Co,borderColor:Co,borderTopColor:Co,borderRightColor:Co,borderBottomColor:Co,borderLeftColor:Co,filter:QA,WebkitFilter:QA},NA=e=>OA[e];function IA(e,t){let n=NA(e);return n!==QA&&(n=No),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const TA=new Set(["auto","none","0"]);class PA extends Zs{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let s=0;s<e.length;s++){let n=e[s];if("string"==typeof n&&(n=n.trim(),no(n))){const r=vA(n,t.current);void 0!==r&&(e[s]=r),s===e.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!xA.has(n)||2!==e.length)return;const[r,i]=e,a=CA(r),o=CA(i);if(a!==o)if(Ks(a)&&Ks(o))for(let s=0;s<e.length;s++){const t=e[s];"string"==typeof t&&(e[s]=parseFloat(t))}else $s[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let r=0;r<e.length;r++)(null===e[r]||EA(e[r]))&&n.push(r);n.length&&function(e,t,n){let r,i=0;for(;i<e.length&&!r;){const t=e[i];"string"==typeof t&&!TA.has(t)&&Qo(t).values.length&&(r=e[i]),i++}if(r&&n)for(const a of t)e[a]=IA(n,r)}(e,n,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=$s[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const r=t[t.length-1];void 0!==r&&e.getValue(n,r).jump(r,!1)}measureEndState(){var e;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const a=r.length-1,o=r[a];r[a]=$s[n](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==o&&void 0===this.finalKeyframe&&(this.finalKeyframe=o),(null==(e=this.removedTransforms)?void 0:e.length)&&this.removedTransforms.forEach(([e,n])=>{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}}const MA=(e,t)=>t&&"number"==typeof e?t.transform(e):e;function DA(e){return pa(e)&&"offsetHeight"in e}class LA{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{var t;const n=Ja.now();if(this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(null==(t=this.events.change)||t.notify(this.current),this.dependents))for(const r of this.dependents)r.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){var t;this.current=e,this.updatedAt=Ja.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t))))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return"production"!==process.env.NODE_ENV&&ka(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new xa);const n=this.events[e].add(t);return"change"===e?()=>{n(),$a.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;null==(e=this.events.change)||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=Ja.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return Ca(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var e,t;null==(e=this.dependents)||e.clear(),null==(t=this.events.destroy)||t.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function HA(e,t){return new LA(e,t)}const{schedule:_A}=Va(queueMicrotask,!1),RA={x:!1,y:!1};function KA(){return RA.x||RA.y}function zA(e,t){const n=function(e,t,n){if(e instanceof EventTarget)return[e];if("string"==typeof e){let t=document;const r=(null==n?void 0:n[e])??t.querySelectorAll(e);return r?Array.from(r):[]}return Array.from(e)}(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function VA(e){return!("touch"===e.pointerType||KA())}const $A=(e,t)=>!!t&&(e===t||$A(e,t.parentElement)),WA=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary,GA=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const qA=new WeakSet;function XA(e){return t=>{"Enter"===t.key&&e(t)}}function YA(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function JA(e){return WA(e)&&!KA()}function ZA(e,t,n={}){const[r,i,a]=zA(e,n),o=e=>{const r=e.currentTarget;if(!JA(e))return;qA.add(r);const a=t(r,e),o=(e,t)=>{window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",A),qA.has(r)&&qA.delete(r),JA(e)&&"function"==typeof a&&a(e,{success:t})},s=e=>{o(e,r===window||r===document||n.useGlobalTarget||$A(r,e.target))},A=e=>{o(e,!1)};window.addEventListener("pointerup",s,i),window.addEventListener("pointercancel",A,i)};return r.forEach(e=>{var t;(n.useGlobalTarget?window:e).addEventListener("pointerdown",o,i),DA(e)&&(e.addEventListener("focus",e=>((e,t)=>{const n=e.currentTarget;if(!n)return;const r=XA(()=>{if(qA.has(n))return;YA(n,"down");const e=XA(()=>{YA(n,"up")});n.addEventListener("keyup",e,t),n.addEventListener("blur",()=>YA(n,"cancel"),t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)})(e,i)),t=e,GA.has(t.tagName)||-1!==t.tabIndex||e.hasAttribute("tabindex")||(e.tabIndex=0))}),a}function el(e){return pa(e)&&"ownerSVGElement"in e}const tl=e=>Boolean(e&&e.getVelocity),nl=[...BA,Co,No],rl=Te.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function il(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function al(...e){return De.useCallback(function(...e){return t=>{let n=!1;const r=e.map(e=>{const r=il(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():il(e[t],null)}}}}(...e),e)}class ol extends De.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){const e=t.offsetParent,n=DA(e)&&e.offsetWidth||0,r=this.props.sizeRef.current;r.height=t.offsetHeight||0,r.width=t.offsetWidth||0,r.top=t.offsetTop,r.left=t.offsetLeft,r.right=n-r.width-r.left}return null}componentDidUpdate(){}render(){return this.props.children}}function sl({children:e,isPresent:t,anchorX:n,root:r}){const i=Te.useId(),a=Te.useRef(null),o=Te.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:s}=Te.useContext(rl),A=al(a,null==e?void 0:e.ref);return Te.useInsertionEffect(()=>{const{width:e,height:A,top:l,left:c,right:u}=o.current;if(t||!a.current||!e||!A)return;const d="left"===n?`left: ${c}`:`right: ${u}`;a.current.dataset.motionPopId=i;const h=document.createElement("style");s&&(h.nonce=s);const p=r??document.head;return p.appendChild(h),h.sheet&&h.sheet.insertRule(`\n [data-motion-pop-id="${i}"] {\n position: absolute !important;\n width: ${e}px !important;\n height: ${A}px !important;\n ${d}px !important;\n top: ${l}px !important;\n }\n `),()=>{p.contains(h)&&p.removeChild(h)}},[t]),Ie.jsx(ol,{isPresent:t,childRef:a,sizeRef:o,children:De.cloneElement(e,{ref:A})})}const Al=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,root:A})=>{const l=na(ll),c=Te.useId();let u=!0,d=Te.useMemo(()=>(u=!1,{id:c,initial:t,isPresent:n,custom:i,onExitComplete:e=>{l.set(e,!0);for(const t of l.values())if(!t)return;r&&r()},register:e=>(l.set(e,!1),()=>l.delete(e))}),[n,l,r]);return a&&u&&(d={...d}),Te.useMemo(()=>{l.forEach((e,t)=>l.set(t,!1))},[n]),De.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),"popLayout"===o&&(e=Ie.jsx(sl,{isPresent:n,anchorX:s,root:A,children:e})),Ie.jsx(aa.Provider,{value:d,children:e})};function ll(){return new Map}function cl(e=!0){const t=Te.useContext(aa);if(null===t)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,a=Te.useId();Te.useEffect(()=>{if(e)return i(a)},[e]);const o=Te.useCallback(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}const ul=e=>e.key||"";function dl(e){const t=[];return Te.Children.forEach(e,e=>{Te.isValidElement(e)&&t.push(e)}),t}const hl=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:a="sync",propagate:o=!1,anchorX:s="left",root:A})=>{const[l,c]=cl(o),u=Te.useMemo(()=>dl(e),[e]),d=o&&!l?[]:u.map(ul),h=Te.useRef(!0),p=Te.useRef(u),f=na(()=>new Map),[m,g]=Te.useState(u),[y,v]=Te.useState(u);ia(()=>{h.current=!1,p.current=u;for(let e=0;e<y.length;e++){const t=ul(y[e]);d.includes(t)?f.delete(t):!0!==f.get(t)&&f.set(t,!1)}},[y,d.length,d.join("-")]);const w=[];if(u!==m){let e=[...u];for(let t=0;t<y.length;t++){const n=y[t],r=ul(n);d.includes(r)||(e.splice(t,0,n),w.push(n))}return"wait"===a&&w.length&&(e=w),v(dl(e)),g(u),null}"production"!==process.env.NODE_ENV&&"wait"===a&&y.length>1&&console.warn('You\'re attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.');const{forceRender:x}=Te.useContext(ta);return Ie.jsx(Ie.Fragment,{children:y.map(e=>{const m=ul(e),g=!(o&&!l)&&(u===y||d.includes(m));return Ie.jsx(Al,{isPresent:g,initial:!(h.current&&!n)&&void 0,custom:t,presenceAffectsLayout:i,mode:a,root:A,onExitComplete:g?void 0:()=>{if(!f.has(m))return;f.set(m,!0);let e=!0;f.forEach(t=>{t||(e=!1)}),e&&(null==x||x(),v(p.current),o&&(null==c||c()),r&&r())},anchorX:s,children:e},m)})})},pl=Te.createContext({strict:!1}),fl={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},ml={};for(const Uae in fl)ml[Uae]={isEnabled:e=>fl[Uae].some(t=>!!e[t])};const gl=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function yl(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||gl.has(e)}let vl=e=>!yl(e);try{"function"==typeof(wl=require("@emotion/is-prop-valid").default)&&(vl=e=>e.startsWith("on")?!yl(e):wl(e))}catch{}var wl;const xl=Te.createContext({});function bl(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}function Bl(e){return"string"==typeof e||Array.isArray(e)}const Cl=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],El=["initial",...Cl];function kl(e){return bl(e.animate)||El.some(t=>Bl(e[t]))}function Sl(e){return Boolean(kl(e)||e.variants)}function Fl(e){const{initial:t,animate:n}=function(e,t){if(kl(e)){const{initial:t,animate:n}=e;return{initial:!1===t||Bl(t)?t:void 0,animate:Bl(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,Te.useContext(xl));return Te.useMemo(()=>({initial:t,animate:n}),[Ql(t),Ql(n)])}function Ql(e){return Array.isArray(e)?e.join(" "):e}const jl={};function Ul(e,{layout:t,layoutId:n}){return Rs.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!jl[e]||"opacity"===e)}const Ol={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Nl=_s.length;function Il(e,t,n){const{style:r,vars:i,transformOrigin:a}=e;let o=!1,s=!1;for(const A in t){const e=t[A];if(Rs.has(A))o=!0;else if(eo(A))i[A]=e;else{const t=MA(e,UA[A]);A.startsWith("origin")?(s=!0,a[A]=t):r[A]=t}}if(t.transform||(o||n?r.transform=function(e,t,n){let r="",i=!0;for(let a=0;a<Nl;a++){const o=_s[a],s=e[o];if(void 0===s)continue;let A=!0;if(A="number"==typeof s?s===(o.startsWith("scale")?1:0):0===parseFloat(s),!A||n){const e=MA(s,UA[o]);A||(i=!1,r+=`${Ol[o]||o}(${e}) `),n&&(t[o]=e)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:e="50%",originY:t="50%",originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}const Tl=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Pl(e,t,n){for(const r in t)tl(t[r])||Ul(r,n)||(e[r]=t[r])}function Ml(e,t){const n={};return Pl(n,e.style||{},e),Object.assign(n,function({transformTemplate:e},t){return Te.useMemo(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{}};return Il(n,t,e),Object.assign({},n.vars,n.style)},[t])}(e,t)),n}function Dl(e,t){const n={},r=Ml(e,t);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const Ll={offset:"stroke-dashoffset",array:"stroke-dasharray"},Hl={offset:"strokeDashoffset",array:"strokeDasharray"};function _l(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},A,l,c){if(Il(e,s,l),A)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:u,style:d}=e;u.transform&&(d.transform=u.transform,delete u.transform),(d.transform||u.transformOrigin)&&(d.transformOrigin=u.transformOrigin??"50% 50%",delete u.transformOrigin),d.transform&&(d.transformBox=(null==c?void 0:c.transformBox)??"fill-box",delete u.transformBox),void 0!==t&&(u.x=t),void 0!==n&&(u.y=n),void 0!==r&&(u.scale=r),void 0!==i&&function(e,t,n=1,r=0,i=!0){e.pathLength=1;const a=i?Ll:Hl;e[a.offset]=vo.transform(-r);const o=vo.transform(t),s=vo.transform(n);e[a.array]=`${o} ${s}`}(u,i,a,o,!1)}const Rl=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),Kl=e=>"string"==typeof e&&"svg"===e.toLowerCase();function zl(e,t,n,r){const i=Te.useMemo(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return _l(n,t,Kl(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){const t={};Pl(t,e.style,e),i.style={...t,...i.style}}return i}const Vl=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function $l(e){return"string"==typeof e&&!e.includes("-")&&!!(Vl.indexOf(e)>-1||/[A-Z]/u.test(e))}function Wl(e,t,n,{latestValues:r},i,a=!1){const o=($l(e)?zl:Dl)(t,r,i,e),s=function(e,t,n){const r={};for(const i in e)"values"===i&&"object"==typeof e.values||(vl(i)||!0===n&&yl(i)||!t&&!yl(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}(t,"string"==typeof e,a),A=e!==Te.Fragment?{...s,...o,ref:n}:{},{children:l}=t,c=Te.useMemo(()=>tl(l)?l.get():l,[l]);return Te.createElement(e,{...A,children:c})}function Gl(e){const t=[{},{}];return null==e||e.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function ql(e,t,n,r){if("function"==typeof t){const[i,a]=Gl(r);t=t(void 0!==n?n:e.custom,i,a)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){const[i,a]=Gl(r);t=t(void 0!==n?n:e.custom,i,a)}return t}function Xl(e){return tl(e)?e.get():e}function Yl(e,t,n,r){const i={},a=r(e,{});for(const d in a)i[d]=Xl(a[d]);let{initial:o,animate:s}=e;const A=kl(e),l=Sl(e);t&&l&&!A&&!1!==e.inherit&&(void 0===o&&(o=t.initial),void 0===s&&(s=t.animate));let c=!!n&&!1===n.initial;c=c||!1===o;const u=c?s:o;if(u&&"boolean"!=typeof u&&!bl(u)){const t=Array.isArray(u)?u:[u];for(let n=0;n<t.length;n++){const r=ql(e,t[n]);if(r){const{transitionEnd:e,transition:t,...n}=r;for(const r in n){let e=n[r];if(Array.isArray(e)){e=e[c?e.length-1:0]}null!==e&&(i[r]=e)}for(const r in e)i[r]=e[r]}}}return i}const Jl=e=>(t,n)=>{const r=Te.useContext(xl),i=Te.useContext(aa),a=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:Yl(n,r,i,e),renderState:t()}}(e,t,r,i);return n?a():na(a)};function Zl(e,t,n){var r;const{style:i}=e,a={};for(const o in i)(tl(i[o])||t.style&&tl(t.style[o])||Ul(o,e)||void 0!==(null==(r=null==n?void 0:n.getValue(o))?void 0:r.liveStyle))&&(a[o]=i[o]);return a}const ec=Jl({scrapeMotionValuesFromProps:Zl,createRenderState:Tl});function tc(e,t,n){const r=Zl(e,t,n);for(const i in e)if(tl(e[i])||tl(t[i])){r[-1!==_s.indexOf(i)?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i]=e[i]}return r}const nc=Jl({scrapeMotionValuesFromProps:tc,createRenderState:Rl}),rc=Symbol.for("motionComponentSymbol");function ic(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function ac(e,t,n){return Te.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&("function"==typeof n?n(r):ic(n)&&(n.current=r))},[t])}const oc=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),sc="data-"+oc("framerAppearId"),Ac=Te.createContext({});function lc(e,t,n,r,i){var a,o;const{visualElement:s}=Te.useContext(xl),A=Te.useContext(pl),l=Te.useContext(aa),c=Te.useContext(rl).reducedMotion,u=Te.useRef(null);r=r||A.renderer,!u.current&&r&&(u.current=r(e,{visualState:t,parent:s,props:n,presenceContext:l,blockInitialAnimation:!!l&&!1===l.initial,reducedMotionConfig:c}));const d=u.current,h=Te.useContext(Ac);!d||d.projection||!i||"html"!==d.type&&"svg"!==d.type||function(e,t,n,r){const{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:A,layoutRoot:l,layoutCrossfade:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:cc(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:Boolean(o)||s&&ic(s),visualElement:e,animationType:"string"==typeof a?a:"both",initialPromotionConfig:r,crossfade:c,layoutScroll:A,layoutRoot:l})}(u.current,n,i,h);const p=Te.useRef(!1);Te.useInsertionEffect(()=>{d&&p.current&&d.update(n,l)});const f=n[sc],m=Te.useRef(Boolean(f)&&!(null==(a=window.MotionHandoffIsComplete)?void 0:a.call(window,f))&&(null==(o=window.MotionHasOptimisedAnimation)?void 0:o.call(window,f)));return ia(()=>{d&&(p.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),d.scheduleRenderMicrotask(),m.current&&d.animationState&&d.animationState.animateChanges())}),Te.useEffect(()=>{d&&(!m.current&&d.animationState&&d.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{var e;null==(e=window.MotionHandoffMarkAsComplete)||e.call(window,f)}),m.current=!1),d.enteringChildren=void 0)}),d}function cc(e){if(e)return!1!==e.options.allowProjection?e.projection:cc(e.parent)}function uc(e,{forwardMotionProps:t=!1}={},n,r){n&&function(e){for(const t in e)ml[t]={...ml[t],...e[t]}}(n);const i=$l(e)?nc:ec;function a(a,o){let s;const A={...Te.useContext(rl),...a,layoutId:dc(a)},{isStatic:l}=A,c=Fl(a),u=i(a,l);if(!l&&ra){!function(e,t){const n=Te.useContext(pl).strict;if("production"!==process.env.NODE_ENV&&t&&n){const t="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?ca(!1,t,"lazy-strict-mode"):ua(!1,t,"lazy-strict-mode")}}(A,n);const t=function(e){const{drag:t,layout:n}=ml;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:(null==t?void 0:t.isEnabled(e))||(null==n?void 0:n.isEnabled(e))?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}(A);s=t.MeasureLayout,c.visualElement=lc(e,u,A,r,t.ProjectionNode)}return Ie.jsxs(xl.Provider,{value:c,children:[s&&c.visualElement?Ie.jsx(s,{visualElement:c.visualElement,...A}):null,Wl(e,a,ac(u,c.visualElement,o),u,l,t)]})}a.displayName=`motion.${"string"==typeof e?e:`create(${e.displayName??e.name??""})`}`;const o=Te.forwardRef(a);return o[rc]=e,o}function dc({layoutId:e}){const t=Te.useContext(ta).id;return t&&void 0!==e?t+"-"+e:e}function hc(e,t){if("undefined"==typeof Proxy)return uc;const n=new Map,r=(n,r)=>uc(n,r,e,t);return new Proxy((e,t)=>("production"!==process.env.NODE_ENV&&ka(!1,"motion() is deprecated. Use motion.create() instead."),r(e,t)),{get:(i,a)=>"create"===a?r:(n.has(a)||n.set(a,uc(a,void 0,e,t)),n.get(a))})}function pc({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function fc(e){return void 0===e||1===e}function mc({scale:e,scaleX:t,scaleY:n}){return!fc(e)||!fc(t)||!fc(n)}function gc(e){return mc(e)||yc(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function yc(e){return vc(e.x)||vc(e.y)}function vc(e){return e&&"0%"!==e}function wc(e,t,n){return n+t*(e-n)}function xc(e,t,n,r,i){return void 0!==i&&(e=wc(e,i,r)),wc(e,n,r)+t}function bc(e,t=0,n=1,r,i){e.min=xc(e.min,t,n,r,i),e.max=xc(e.max,t,n,r,i)}function Bc(e,{x:t,y:n}){bc(e.x,t.translate,t.scale,t.originPoint),bc(e.y,n.translate,n.scale,n.originPoint)}const Cc=.999999999999,Ec=1.0000000000001;function kc(e,t){e.min=e.min+t,e.max=e.max+t}function Sc(e,t,n,r,i=.5){bc(e,t,n,Po(e.min,e.max,i),r)}function Fc(e,t){Sc(e.x,t.x,t.scaleX,t.scale,t.originX),Sc(e.y,t.y,t.scaleY,t.scale,t.originY)}function Qc(e,t){return pc(function(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}const jc=()=>({x:{min:0,max:0},y:{min:0,max:0}}),Uc={current:null},Oc={current:!1};const Nc=new WeakMap;const Ic=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Tc{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:i,visualState:a},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Zs,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const e=Ja.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,$a.render(this.render,!1,!0))};const{latestValues:s,renderState:A}=a;this.latestValues=s,this.baseTarget={...s},this.initialValues=t.initial?{...s}:{},this.renderState=A,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=o,this.blockInitialAnimation=Boolean(i),this.isControllingVariants=kl(t),this.isVariantNode=Sl(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:l,...c}=this.scrapeMotionValuesFromProps(t,{},this);for(const u in c){const e=c[u];void 0!==s[u]&&tl(e)&&e.set(s[u])}}mount(e){var t;this.current=e,Nc.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),Oc.current||function(){if(Oc.current=!0,ra)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Uc.current=e.matches;e.addEventListener("change",t),t()}else Uc.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Uc.current),"production"!==process.env.NODE_ENV&&ka(!0!==this.shouldReduceMotion,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),null==(t=this.parent)||t.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var e;this.projection&&this.projection.unmount(),Wa(this.notifyUpdate),Wa(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),null==(e=this.parent)||e.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const n=Rs.has(e);n&&this.onBindTransform&&this.onBindTransform();const r=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&$a.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i(),t.owner&&t.stop()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in ml){const t=ml[e];if(!t)continue;const{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let n=0;n<Ic.length;n++){const t=Ic[n];this.propEventSubscriptions[t]&&(this.propEventSubscriptions[t](),delete this.propEventSubscriptions[t]);const r=e["on"+t];r&&(this.propEventSubscriptions[t]=this.on(t,r))}this.prevMotionValues=function(e,t,n){for(const r in t){const i=t[r],a=n[r];if(tl(i))e.addValue(r,i);else if(tl(a))e.addValue(r,HA(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){const t=e.getValue(r);!0===t.liveStyle?t.jump(i):t.hasAnimated||t.set(i)}else{const t=e.getStaticValue(r);e.addValue(r,HA(void 0!==t?t:i,{owner:e}))}}for(const r in n)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=HA(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=void 0===this.latestValues[e]&&this.current?this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];var r;return null!=n&&("string"==typeof n&&(ha(n)||fa(n))?n=parseFloat(n):(r=n,!nl.find(bA(r))&&No.test(t)&&(n=IA(e,t))),this.setBaseTarget(e,tl(n)?n.get():n)),tl(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:n}=this.props;let r;if("string"==typeof n||"object"==typeof n){const i=ql(this.props,n,null==(t=this.presenceContext)?void 0:t.custom);i&&(r=i[e])}if(n&&void 0!==r)return r;const i=this.getBaseTargetFromProps(this.props,e);return void 0===i||tl(i)?void 0!==this.initialValues[e]&&void 0===r?void 0:this.baseTarget[e]:i}on(e,t){return this.events[e]||(this.events[e]=new xa),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){_A.render(this.render)}}class Pc extends Tc{constructor(){super(...arguments),this.KeyframeResolver=PA}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;tl(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}function Mc(e,{style:t,vars:n},r,i){const a=e.style;let o;for(o in t)a[o]=t[o];for(o in null==i||i.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}class Dc extends Pc{constructor(){super(...arguments),this.type="html",this.renderInstance=Mc}readValueFromInstance(e,t){var n,r;if(Rs.has(t))return(null==(n=this.projection)?void 0:n.isProjecting)?Ds(t):((e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Ls(n,t)})(e,t);{const n=(r=e,window.getComputedStyle(r)),i=(eo(t)?n.getPropertyValue(t):n[t])||0;return"string"==typeof i?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:t}){return Qc(e,t)}build(e,t,n){Il(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Zl(e,t,n)}}const Lc=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);class Hc extends Pc{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=jc}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(Rs.has(t)){const e=NA(t);return e&&e.default||0}return t=Lc.has(t)?t:oc(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return tc(e,t,n)}build(e,t,n){_l(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){!function(e,t,n,r){Mc(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(Lc.has(i)?i:oc(i),t.attrs[i])}(e,t,0,r)}mount(e){this.isSVGTag=Kl(e.tagName),super.mount(e)}}const _c=(e,t)=>$l(e)?new Hc(t):new Dc(t,{allowProjection:e!==Te.Fragment});function Rc(e,t,n){const r=e.getProps();return ql(r,t,void 0!==n?n:r.custom,e)}const Kc=e=>Array.isArray(e);function zc(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,HA(n))}function Vc(e){return Kc(e)?e[e.length-1]||0:e}function $c(e,t){const n=e.getValue("willChange");if(r=n,Boolean(tl(r)&&r.add))return n.add(t);if(!n&&da.WillChange){const n=new da.WillChange("auto");e.addValue("willChange",n),n.add(t)}var r}function Wc(e){return e.props[sc]}const Gc=e=>null!==e;const qc={type:"spring",stiffness:500,damping:25,restSpeed:10},Xc={type:"keyframes",duration:.8},Yc={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Jc=(e,{keyframes:t})=>t.length>2?Xc:Rs.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:qc:Yc;const Zc=(e,t,n,r={},i,a)=>o=>{const s=wA(r,e)||{},A=s.delay||r.delay||0;let{elapsed:l=0}=r;l-=ba(A);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};(function({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:a,repeatType:o,repeatDelay:s,from:A,elapsed:l,...c}){return!!Object.keys(c).length})(s)||Object.assign(c,Jc(e,c)),c.duration&&(c.duration=ba(c.duration)),c.repeatDelay&&(c.repeatDelay=ba(c.repeatDelay)),void 0!==c.from&&(c.keyframes[0]=c.from);let u=!1;if((!1===c.type||0===c.duration&&!c.repeatDelay)&&(pA(c),0===c.delay&&(u=!0)),(da.instantAnimations||da.skipAnimations)&&(u=!0,pA(c),c.delay=0),c.allowFlatten=!s.type&&!s.ease,u&&!a&&void 0!==t.get()){const e=function(e,{repeat:t,repeatType:n="loop"}){const r=e.filter(Gc);return r[t&&"loop"!==n&&t%2==1?0:r.length-1]}(c.keyframes,s);if(void 0!==e)return void $a.update(()=>{c.onUpdate(e),c.onComplete()})}return s.isSync?new js(c):new gA(c)};function eu({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function tu(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a=e.getDefaultTransition(),transitionEnd:o,...s}=t;r&&(a=r);const A=[],l=i&&e.animationState&&e.animationState.getState()[i];for(const c in s){const t=e.getValue(c,e.latestValues[c]??null),r=s[c];if(void 0===r||l&&eu(l,c))continue;const i={delay:n,...wA(a||{},c)},o=t.get();if(void 0!==o&&!t.isAnimating&&!Array.isArray(r)&&r===o&&!i.velocity)continue;let u=!1;if(window.MotionHandoffAnimation){const t=Wc(e);if(t){const e=window.MotionHandoffAnimation(t,c,$a);null!==e&&(i.startTime=e,u=!0)}}$c(e,c),t.start(Zc(c,t,r,e.shouldReduceMotion&&xA.has(c)?{type:!1}:i,e,u));const d=t.animation;d&&A.push(d)}return o&&Promise.all(A).then(()=>{$a.update(()=>{o&&function(e,t){const n=Rc(e,t);let{transitionEnd:r={},transition:i={},...a}=n||{};a={...a,...r};for(const o in a)zc(e,o,Vc(a[o]))}(e,o)})}),A}function nu(e,t,n,r=0,i=1){const a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return"function"==typeof n?n(a,o):1===i?a*r:s-a*r}function ru(e,t,n={}){var r;const i=Rc(e,t,"exit"===n.type?null==(r=e.presenceContext)?void 0:r.custom:void 0);let{transition:a=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(a=n.transitionOverride);const o=i?()=>Promise.all(tu(e,i,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(r=0)=>{const{delayChildren:i=0,staggerChildren:o,staggerDirection:s}=a;return function(e,t,n=0,r=0,i=0,a=1,o){const s=[];for(const A of e.variantChildren)A.notify("AnimationStart",t),s.push(ru(A,t,{...o,delay:n+("function"==typeof r?0:r)+nu(e.variantChildren,A,r,i,a)}).then(()=>A.notify("AnimationComplete",t)));return Promise.all(s)}(e,t,r,i,o,s,n)}:()=>Promise.resolve(),{when:A}=a;if(A){const[e,t]="beforeChildren"===A?[o,s]:[s,o];return e().then(()=>t())}return Promise.all([o(),s(n.delay)])}function iu(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const au=El.length;function ou(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent&&ou(e.parent)||{};return void 0!==e.props.initial&&(t.initial=e.props.initial),t}const t={};for(let n=0;n<au;n++){const r=El[n],i=e.props[r];(Bl(i)||!1===i)&&(t[r]=i)}return t}const su=[...Cl].reverse(),Au=Cl.length;function lu(e){return t=>Promise.all(t.map(({animation:t,options:n})=>function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){const i=t.map(t=>ru(e,t,n));r=Promise.all(i)}else if("string"==typeof t)r=ru(e,t,n);else{const i="function"==typeof t?Rc(e,t,n.custom):t;r=Promise.all(tu(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}(e,t,n)))}function cu(e){let t=lu(e),n=hu(),r=!0;const i=t=>(n,r)=>{var i;const a=Rc(e,r,"exit"===t?null==(i=e.presenceContext)?void 0:i.custom:void 0);if(a){const{transition:e,transitionEnd:t,...r}=a;n={...n,...r,...t}}return n};function a(a){const{props:o}=e,s=ou(e.parent)||{},A=[],l=new Set;let c={},u=1/0;for(let t=0;t<Au;t++){const d=su[t],h=n[d],p=void 0!==o[d]?o[d]:s[d],f=Bl(p),m=d===a?h.isActive:null;!1===m&&(u=t);let g=p===s[d]&&p!==o[d]&&f;if(g&&r&&e.manuallyAnimateOnMount&&(g=!1),h.protectedKeys={...c},!h.isActive&&null===m||!p&&!h.prevProp||bl(p)||"boolean"==typeof p)continue;const y=uu(h.prevProp,p);let v=y||d===a&&h.isActive&&!g&&f||t>u&&f,w=!1;const x=Array.isArray(p)?p:[p];let b=x.reduce(i(d),{});!1===m&&(b={});const{prevResolvedValues:B={}}=h,C={...B,...b},E=t=>{v=!0,l.has(t)&&(w=!0,l.delete(t)),h.needsAnimating[t]=!0;const n=e.getValue(t);n&&(n.liveStyle=!1)};for(const e in C){const t=b[e],n=B[e];if(c.hasOwnProperty(e))continue;let r=!1;r=Kc(t)&&Kc(n)?!iu(t,n):t!==n,r?null!=t?E(e):l.add(e):void 0!==t&&l.has(e)?E(e):h.protectedKeys[e]=!0}h.prevProp=p,h.prevResolvedValues=b,h.isActive&&(c={...c,...b}),r&&e.blockInitialAnimation&&(v=!1);const k=g&&y;v&&(!k||w)&&A.push(...x.map(t=>{const n={type:d};if("string"==typeof t&&r&&!k&&e.manuallyAnimateOnMount&&e.parent){const{parent:r}=e,i=Rc(r,t);if(r.enteringChildren&&i){const{delayChildren:t}=i.transition||{};n.delay=nu(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(l.size){const t={};if("boolean"!=typeof o.initial){const n=Rc(e,Array.isArray(o.initial)?o.initial[0]:o.initial);n&&n.transition&&(t.transition=n.transition)}l.forEach(n=>{const r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),A.push({animation:t})}let d=Boolean(A.length);return!r||!1!==o.initial&&o.initial!==o.animate||e.manuallyAnimateOnMount||(d=!1),r=!1,d?t(A):Promise.resolve()}return{animateChanges:a,setActive:function(t,r){var i;if(n[t].isActive===r)return Promise.resolve();null==(i=e.variantChildren)||i.forEach(e=>{var n;return null==(n=e.animationState)?void 0:n.setActive(t,r)}),n[t].isActive=r;const o=a(t);for(const e in n)n[e].protectedKeys={};return o},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=hu()}}}function uu(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!iu(t,e)}function du(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function hu(){return{animate:du(!0),whileInView:du(),whileHover:du(),whileTap:du(),whileDrag:du(),whileFocus:du(),exit:du()}}class pu{constructor(e){this.isMounted=!1,this.node=e}update(){}}let fu=0;const mu={animation:{Feature:class extends pu{constructor(e){super(e),e.animationState||(e.animationState=cu(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();bl(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),null==(e=this.unmountControls)||e.call(this)}}},exit:{Feature:class extends pu{constructor(){super(...arguments),this.id=fu++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;const r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then(()=>{t(this.id)})}mount(){const{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function gu(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function yu(e){return{point:{x:e.pageX,y:e.pageY}}}function vu(e,t,n,r){return gu(e,t,(e=>t=>WA(t)&&e(t,yu(t)))(n),r)}function wu(e){return e.max-e.min}function xu(e,t,n,r=.5){e.origin=r,e.originPoint=Po(t.min,t.max,e.origin),e.scale=wu(n)/wu(t),e.translate=Po(n.min,n.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function bu(e,t,n,r){xu(e.x,t.x,n.x,r?r.originX:void 0),xu(e.y,t.y,n.y,r?r.originY:void 0)}function Bu(e,t,n){e.min=n.min+t.min,e.max=e.min+wu(t)}function Cu(e,t,n){e.min=t.min-n.min,e.max=e.min+wu(t)}function Eu(e,t,n){Cu(e.x,t.x,n.x),Cu(e.y,t.y,n.y)}function ku(e){return[e("x"),e("y")]}const Su=({current:e})=>e?e.ownerDocument.defaultView:null,Fu=(e,t)=>Math.abs(e-t);class Qu{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const e=Ou(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=Fu(e.x,t.x),r=Fu(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;const{point:r}=e,{timestamp:i}=Ga;this.history.push({...r,timestamp:i});const{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=ju(t,this.transformPagePoint),$a.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if(this.dragSnapToOrigin&&i&&i(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const a=Ou("pointercancel"===e.type?this.lastMoveEventInfo:ju(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!WA(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;const o=ju(yu(e),this.transformPagePoint),{point:s}=o,{timestamp:A}=Ga;this.history=[{...s,timestamp:A}];const{onSessionStart:l}=t;l&&l(e,Ou(o,this.history)),this.removeListeners=va(vu(this.contextWindow,"pointermove",this.handlePointerMove),vu(this.contextWindow,"pointerup",this.handlePointerUp),vu(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Wa(this.updatePoint)}}function ju(e,t){return t?{point:t(e.point)}:e}function Uu(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ou({point:e},t){return{point:e,delta:Uu(e,Iu(t)),offset:Uu(e,Nu(t)),velocity:Tu(t,.1)}}function Nu(e){return e[0]}function Iu(e){return e[e.length-1]}function Tu(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=Iu(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>ba(t)));)n--;if(!r)return{x:0,y:0};const a=Ba(i.timestamp-r.timestamp);if(0===a)return{x:0,y:0};const o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Pu(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function Mu(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}const Du=.35;function Lu(e,t,n){return{min:Hu(e,t),max:Hu(e,n)}}function Hu(e,t){return"number"==typeof e?e:e[t]||0}const _u=new WeakMap;class Ru{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){const{presenceContext:r}=this.visualElement;if(r&&!1===r.isPresent)return;const{dragSnapToOrigin:i}=this.getProps();this.panSession=new Qu(e,{onSessionStart:e=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(yu(e).point)},onStart:(e,t)=>{const{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(a=n)||"y"===a?RA[a]?null:(RA[a]=!0,()=>{RA[a]=!1}):RA.x||RA.y?null:(RA.x=RA.y=!0,()=>{RA.x=RA.y=!1}),!this.openDragLock))return;var a;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ku(e=>{let t=this.getAxisMotionValue(e).get()||0;if(yo.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];if(r){t=wu(r)*(parseFloat(t)/100)}}}this.originPoint[e]=t}),i&&$a.postRender(()=>i(e,t)),$c(this.visualElement,"transform");const{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},onMove:(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:o}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(o),void(null!==this.currentDirection&&i&&i(this.currentDirection));this.updateAxis("x",t.point,o),this.updateAxis("y",t.point,o),this.visualElement.render(),a&&a(e,t)},onSessionEnd:(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>ku(e=>{var t;return"paused"===this.getAnimationState(e)&&(null==(t=this.getAxisMotionValue(e).animation)?void 0:t.play())})},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:i,distanceThreshold:n,contextWindow:Su(this.visualElement)})}stop(e,t){const n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;const{velocity:a}=r;this.startAnimation(a);const{onDragEnd:o}=this.getProps();o&&$a.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!Ku(e,r,this.currentDirection))return;const i=this.getAxisMotionValue(e);let a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?Po(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?Po(n,e,r.max):Math.min(e,n)),e}(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){var e;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null==(e=this.visualElement.projection)?void 0:e.layout,i=this.constraints;t&&ic(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!r)&&function(e,{top:t,left:n,bottom:r,right:i}){return{x:Pu(e.x,n,i),y:Pu(e.y,t,r)}}(r.layoutBox,t),this.elastic=function(e=Du){return!1===e?e=0:!0===e&&(e=Du),{x:Lu(e,"left","right"),y:Lu(e,"top","bottom")}}(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&ku(e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(r.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!ic(e))return!1;const n=e.current;ua(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const i=function(e,t,n){const r=Qc(e,n),{scroll:i}=t;return i&&(kc(r.x,i.offset.x),kc(r.y,i.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let a=function(e,t){return{x:Mu(e.x,t.x),y:Mu(e.y,t.y)}}(r.layout.layoutBox,i);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(a));this.hasMutatedConstraints=!!e,e&&(a=pc(e))}return a}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},A=ku(o=>{if(!Ku(o,t,this.currentDirection))return;let A=s&&s[o]||{};a&&(A={min:0,max:0});const l=r?200:1e6,c=r?40:1e7,u={type:"inertia",velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:c,timeConstant:750,restDelta:1,restSpeed:10,...i,...A};return this.startAxisValueAnimation(o,u)});return Promise.all(A).then(o)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return $c(this.visualElement,e),n.start(Zc(e,n,0,t,this.visualElement,!1))}stopAnimation(){ku(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){ku(e=>{var t;return null==(t=this.getAxisMotionValue(e).animation)?void 0:t.pause()})}getAnimationState(e){var t;return null==(t=this.getAxisMotionValue(e).animation)?void 0:t.state}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps(),r=n[t];return r||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){ku(t=>{const{drag:n}=this.getProps();if(!Ku(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:a}=r.layout.layoutBox[t];i.set(e[t]-Po(n,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!ic(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};ku(e=>{const t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){const n=t.get();r[e]=function(e,t){let n=.5;const r=wu(e),i=wu(t);return i>r?n=wa(t.min,t.max-r,e.min):r>i&&(n=wa(e.min,e.max-i,t.min)),Aa(0,1,n)}({min:n,max:n},this.constraints[e])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),ku(t=>{if(!Ku(t,e,null))return;const n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(Po(i,a,r[t]))})}addListeners(){if(!this.visualElement.current)return;_u.set(this.visualElement,this);const e=vu(this.visualElement.current,"pointerdown",e=>{const{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)}),t=()=>{const{dragConstraints:e}=this.getProps();ic(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,r=n.addEventListener("measure",t);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),$a.read(t);const i=gu(window,"resize",()=>this.scalePositionWithinConstraints()),a=n.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(ku(t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())});return()=>{i(),e(),r(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=Du,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}}function Ku(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const zu=e=>(t,n)=>{e&&$a.postRender(()=>e(t,n))};const Vu={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function $u(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Wu={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!vo.test(e))return e;e=parseFloat(e)}return`${$u(e,t.target.x)}% ${$u(e,t.target.y)}%`}},Gu={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=No.parse(e);if(i.length>5)return r;const a=No.createTransformer(e),o="number"!=typeof i[0]?1:0,s=n.x.scale*t.x,A=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=A;const l=Po(s,A,.5);return"number"==typeof i[2+o]&&(i[2+o]/=l),"number"==typeof i[3+o]&&(i[3+o]/=l),a(i)}};let qu=!1;class Xu extends Te.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;!function(e){for(const t in e)jl[t]=e[t],eo(t)&&(jl[t].isCSSVariable=!0)}(Ju),i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),qu&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),Vu.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a?(a.isPresent=i,qu=!0,r||e.layoutDependency!==t||void 0===t||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||$a.postRender(()=>{const e=a.getStack();e&&e.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),_A.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;qu=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Yu(e){const[t,n]=cl(),r=Te.useContext(ta);return Ie.jsx(Xu,{...e,layoutGroup:r,switchLayoutGroup:Te.useContext(Ac),isPresent:t,safeToRemove:n})}const Ju={borderRadius:{...Wu,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Wu,borderTopRightRadius:Wu,borderBottomLeftRadius:Wu,borderBottomRightRadius:Wu,boxShadow:Gu};const Zu=(e,t)=>e.depth-t.depth;class ed{constructor(){this.children=[],this.isDirty=!1}add(e){oa(this.children,e),this.isDirty=!0}remove(e){sa(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Zu),this.isDirty=!1,this.children.forEach(e)}}const td=["TopLeft","TopRight","BottomLeft","BottomRight"],nd=td.length,rd=e=>"string"==typeof e?parseFloat(e):e,id=e=>"number"==typeof e||vo.test(e);function ad(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const od=Ad(0,.5,Pa),sd=Ad(.5,.95,ga);function Ad(e,t,n){return r=>r<e?0:r>t?1:n(wa(e,t,r))}function ld(e,t){e.min=t.min,e.max=t.max}function cd(e,t){ld(e.x,t.x),ld(e.y,t.y)}function ud(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function dd(e,t,n,r,i){return e=wc(e-=t,1/n,r),void 0!==i&&(e=wc(e,1/i,r)),e}function hd(e,t,[n,r,i],a,o){!function(e,t=0,n=1,r=.5,i,a=e,o=e){yo.test(t)&&(t=parseFloat(t),t=Po(o.min,o.max,t/100)-o.min);if("number"!=typeof t)return;let s=Po(a.min,a.max,r);e===a&&(s-=t),e.min=dd(e.min,t,n,s,i),e.max=dd(e.max,t,n,s,i)}(e,t[n],t[r],t[i],t.scale,a,o)}const pd=["x","scaleX","originX"],fd=["y","scaleY","originY"];function md(e,t,n,r){hd(e.x,t,pd,n?n.x:void 0,r?r.x:void 0),hd(e.y,t,fd,n?n.y:void 0,r?r.y:void 0)}function gd(e){return 0===e.translate&&1===e.scale}function yd(e){return gd(e.x)&&gd(e.y)}function vd(e,t){return e.min===t.min&&e.max===t.max}function wd(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function xd(e,t){return wd(e.x,t.x)&&wd(e.y,t.y)}function bd(e){return wu(e.x)/wu(e.y)}function Bd(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Cd{constructor(){this.members=[]}add(e){oa(this.members,e),e.scheduleRender()}remove(e){if(sa(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex(t=>e===t);if(0===t)return!1;let n;for(let r=t;r>=0;r--){const e=this.members[r];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:r}=e.options;!1===r&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const Ed=["","X","Y","Z"];let kd=0;function Sd(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Fd(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Wc(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",$a,!(t||r))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Fd(r)}function Qd({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=(null==t?void 0:t())){this.id=kd++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Od),this.nodes.forEach(Ld),this.nodes.forEach(Hd),this.nodes.forEach(Nd)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new ed)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new xa),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;var n;this.isSVG=el(t)&&!(el(n=t)&&"svg"===n.tagName),this.instance=t;const{layoutId:r,layout:i,visualElement:a}=this.options;if(a&&!a.current&&a.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(i||r)&&(this.isLayoutDirty=!0),e){let n,r=0;const i=()=>this.root.updateBlockedByResize=!1;$a.read(()=>{r=window.innerWidth}),e(t,()=>{const e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=Ja.now(),r=({timestamp:i})=>{const a=i-n;a>=t&&(Wa(r),e(a-t))};return $a.setup(r,!0),()=>Wa(r)}(i,250),Vu.hasAnimatedSinceResize&&(Vu.hasAnimatedSinceResize=!1,this.nodes.forEach(Dd)))})}r&&this.root.registerSharedNode(r,this),!1!==this.options.animate&&a&&(r||i)&&this.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const i=this.options.transition||a.getDefaultTransition()||$d,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=a.getProps(),A=!this.targetLayout||!xd(this.targetLayout,r),l=!t&&n;if(this.options.layoutRoot||this.resumeFrom||l||t&&(A||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const t={...wA(i,"layout"),onPlay:o,onComplete:s};(a.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l)}else t||Dd(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Wa(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(_d),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Fd(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let i=0;i<this.path.length;i++){const e=this.path[i];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(Td);if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(Pd);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Md),this.nodes.forEach(jd),this.nodes.forEach(Ud)):this.nodes.forEach(Pd),this.clearAllSnapshots();const e=Ja.now();Ga.delta=Aa(0,1e3/60,e-Ga.timestamp),Ga.timestamp=e,Ga.isProcessing=!0,qa.update.process(Ga),qa.preRender.process(Ga),qa.render.process(Ga),Ga.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,_A.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Id),this.sharedNodes.forEach(Rd)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,$a.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){$a.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||wu(this.snapshot.measuredBox.x)||wu(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let n=0;n<this.path.length;n++){this.path[n].updateScroll()}const e=this.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){const t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;const e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!yd(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||gc(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);var r;return e&&(n=this.removeTransform(n)),qd((r=n).x),qd(r.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){var e;const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const n=t.measureViewportBox();if(!((null==(e=this.scroll)?void 0:e.wasRoot)||this.path.some(Yd))){const{scroll:e}=this.root;e&&(kc(n.x,e.offset.x),kc(n.y,e.offset.y))}return n}removeElementScroll(e){var t;const n={x:{min:0,max:0},y:{min:0,max:0}};if(cd(n,e),null==(t=this.scroll)?void 0:t.wasRoot)return n;for(let r=0;r<this.path.length;r++){const t=this.path[r],{scroll:i,options:a}=t;t!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&cd(n,e),kc(n.x,i.offset.x),kc(n.y,i.offset.y))}return n}applyTransform(e,t=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};cd(n,e);for(let r=0;r<this.path.length;r++){const e=this.path[r];!t&&e.options.layoutScroll&&e.scroll&&e!==e.root&&Fc(n,{x:-e.scroll.offset.x,y:-e.scroll.offset.y}),gc(e.latestValues)&&Fc(n,e.latestValues)}return gc(this.latestValues)&&Fc(n,this.latestValues),n}removeTransform(e){const t={x:{min:0,max:0},y:{min:0,max:0}};cd(t,e);for(let n=0;n<this.path.length;n++){const e=this.path[n];if(!e.instance)continue;if(!gc(e.latestValues))continue;mc(e.latestValues)&&e.updateSnapshot();const r=jc();cd(r,e.measurePageBox()),md(t,e.latestValues,e.snapshot?e.snapshot.layoutBox:void 0,r)}return gc(this.latestValues)&&md(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Ga.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){var t;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const r=Boolean(this.resumingFrom)||this!==n;if(!(e||r&&this.isSharedProjectionDirty||this.isProjectionDirty||(null==(t=this.parent)?void 0:t.isProjectionDirty)||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:i,layoutId:a}=this.options;if(this.layout&&(i||a)){if(this.resolvedRelativeTargetAt=Ga.timestamp,!this.targetDelta&&!this.relativeTarget){const e=this.getClosestProjectingParent();e&&e.layout&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Eu(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),cd(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}var o,s,A;if(this.relativeTarget||this.targetDelta)if(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),o=this.target,s=this.relativeTarget,A=this.relativeParent.target,Bu(o.x,s.x,A.x),Bu(o.y,s.y,A.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):cd(this.target,this.layout.layoutBox),Bc(this.target,this.targetDelta)):cd(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const e=this.getClosestProjectingParent();e&&Boolean(e.resumingFrom)===Boolean(this.resumingFrom)&&!e.options.layoutScroll&&e.target&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Eu(this.relativeTargetOrigin,this.target,e.target),cd(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(this.parent&&!mc(this.parent.latestValues)&&!yc(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var e;const t=this.getLead(),n=Boolean(this.resumingFrom)||this!==t;let r=!0;if((this.isProjectionDirty||(null==(e=this.parent)?void 0:e.isProjectionDirty))&&(r=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(r=!1),this.resolvedRelativeTargetAt===Ga.timestamp&&(r=!1),r)return;const{layout:i,layoutId:a}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!i&&!a)return;cd(this.layoutCorrected,this.layout.layoutBox);const o=this.treeScale.x,s=this.treeScale.y;!function(e,t,n,r=!1){const i=n.length;if(!i)return;let a,o;t.x=t.y=1;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;const{visualElement:i}=a.options;i&&i.props.style&&"contents"===i.props.style.display||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&Fc(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Bc(e,o)),r&&gc(a.latestValues)&&Fc(e,a.latestValues))}t.x<Ec&&t.x>Cc&&(t.x=1),t.y<Ec&&t.y>Cc&&(t.y=1)}(this.layoutCorrected,this.treeScale,this.path,n),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:A}=t;A?(this.projectionDelta&&this.prevProjectionDelta?(ud(this.prevProjectionDelta.x,this.projectionDelta.x),ud(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),bu(this.projectionDelta,this.layoutCorrected,A,this.latestValues),this.treeScale.x===o&&this.treeScale.y===s&&Bd(this.projectionDelta.x,this.prevProjectionDelta.x)&&Bd(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",A))):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){var t;if(null==(t=this.options.visualElement)||t.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(e,t=!1){const n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const o={x:{min:0,max:0},y:{min:0,max:0}},s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),A=this.getStack(),l=!A||A.members.length<=1,c=Boolean(s&&!l&&!0===this.options.crossfade&&!this.path.some(Vd));let u;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;var A,d,h,p,f,m;Kd(a.x,e.x,n),Kd(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Eu(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox),h=this.relativeTarget,p=this.relativeTargetOrigin,f=o,m=n,zd(h.x,p.x,f.x,m),zd(h.y,p.y,f.y,m),u&&(A=this.relativeTarget,d=u,vd(A.x,d.x)&&vd(A.y,d.y))&&(this.isProjectionDirty=!1),u||(u={x:{min:0,max:0},y:{min:0,max:0}}),cd(u,this.relativeTarget)),s&&(this.animationValues=i,function(e,t,n,r,i,a){i?(e.opacity=Po(0,n.opacity??1,od(r)),e.opacityExit=Po(t.opacity??1,0,sd(r))):a&&(e.opacity=Po(t.opacity??1,n.opacity??1,r));for(let o=0;o<nd;o++){const i=`border${td[o]}Radius`;let a=ad(t,i),s=ad(n,i);void 0===a&&void 0===s||(a||(a=0),s||(s=0),0===a||0===s||id(a)===id(s)?(e[i]=Math.max(Po(rd(a),rd(s),r),0),(yo.test(s)||yo.test(a))&&(e[i]+="%")):e[i]=s)}(t.rotate||n.rotate)&&(e.rotate=Po(t.rotate||0,n.rotate||0,r))}(i,r,this.latestValues,n,c,l)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){var t,n,r;this.notifyListeners("animationStart"),null==(t=this.currentAnimation)||t.stop(),null==(r=null==(n=this.resumingFrom)?void 0:n.currentAnimation)||r.stop(),this.pendingAnimation&&(Wa(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=$a.update(()=>{Vu.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=HA(0)),this.currentAnimation=function(e,t,n){const r=tl(e)?e:HA(e);return r.start(Zc("",r,t,n)),r.animation}(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&Xd(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const t=wu(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=wu(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}cd(t,n),Fc(t,i),bu(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Cd);this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){var e;const{layoutId:t}=this.options;return t&&(null==(e=this.getStack())?void 0:e.lead)||this}getPrevLead(){var e;const{layoutId:t}=this.options;return t?null==(e=this.getStack())?void 0:e.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;const r={};n.z&&Sd("z",e,r,this.animationValues);for(let i=0;i<Ed.length;i++)Sd(`rotate${Ed[i]}`,e,r,this.animationValues),Sd(`skew${Ed[i]}`,e,r,this.animationValues);e.render();for(const i in r)e.setStaticValue(i,r[i]),this.animationValues&&(this.animationValues[i]=r[i]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible)return void(e.visibility="hidden");const n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,e.visibility="",e.opacity="",e.pointerEvents=Xl(null==t?void 0:t.pointerEvents)||"",void(e.transform=n?n(this.latestValues,""):"none");const r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target)return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=Xl(null==t?void 0:t.pointerEvents)||""),void(this.hasProjected&&!gc(this.latestValues)&&(e.transform=n?n({},""):"none",this.hasProjected=!1));e.visibility="";const i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=function(e,t,n){let r="";const i=e.x.translate/t.x,a=e.y.translate/t.y,o=(null==n?void 0:n.z)||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),1===t.x&&1===t.y||(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:e,rotate:t,rotateX:i,rotateY:a,skewX:o,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotateX(${i}deg) `),a&&(r+=`rotateY(${a}deg) `),o&&(r+=`skewX(${o}deg) `),s&&(r+=`skewY(${s}deg) `)}const s=e.x.scale*t.x,A=e.y.scale*t.y;return 1===s&&1===A||(r+=`scale(${s}, ${A})`),r||"none"}(this.projectionDeltaWithTransform,this.treeScale,i);n&&(a=n(i,a)),e.transform=a;const{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${100*o.origin}% ${100*s.origin}% 0`,r.animationValues?e.opacity=r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:e.opacity=r===this?void 0!==i.opacity?i.opacity:"":void 0!==i.opacityExit?i.opacityExit:0;for(const A in jl){if(void 0===i[A])continue;const{correct:t,applyTo:n,isCSSVariable:o}=jl[A],s="none"===a?i[A]:t(i[A],r);if(n){const t=n.length;for(let r=0;r<t;r++)e[n[r]]=s}else o?this.options.visualElement.renderState.vars[A]=s:e[A]=s}this.options.layoutId&&(e.pointerEvents=r===this?Xl(null==t?void 0:t.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>{var t;return null==(t=e.currentAnimation)?void 0:t.stop()}),this.root.nodes.forEach(Td),this.root.sharedNodes.clear()}}}function jd(e){e.updateLayout()}function Ud(e){var t;const n=(null==(t=e.resumeFrom)?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:r}=e.layout,{animationType:i}=e.options,a=n.source!==e.layout.source;"size"===i?ku(e=>{const r=a?n.measuredBox[e]:n.layoutBox[e],i=wu(r);r.min=t[e].min,r.max=r.min+i}):Xd(i,n.layoutBox,t)&&ku(r=>{const i=a?n.measuredBox[r]:n.layoutBox[r],o=wu(t[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});const o={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};bu(o,t,n.layoutBox);const s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};a?bu(s,e.applyTransform(r,!0),n.measuredBox):bu(s,t,n.layoutBox);const A=!yd(o);let l=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:i,layout:a}=r;if(i&&a){const o={x:{min:0,max:0},y:{min:0,max:0}};Eu(o,n.layoutBox,i.layoutBox);const s={x:{min:0,max:0},y:{min:0,max:0}};Eu(s,t,a.layoutBox),xd(o,s)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=s,e.relativeTargetOrigin=o,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:n,delta:s,layoutDelta:o,hasLayoutChanged:A,hasRelativeLayoutChanged:l})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Od(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Nd(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Id(e){e.clearSnapshot()}function Td(e){e.clearMeasurements()}function Pd(e){e.isLayoutDirty=!1}function Md(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Dd(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Ld(e){e.resolveTargetDelta()}function Hd(e){e.calcProjection()}function _d(e){e.resetSkewAndRotation()}function Rd(e){e.removeLeadSnapshot()}function Kd(e,t,n){e.translate=Po(t.translate,0,n),e.scale=Po(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function zd(e,t,n,r){e.min=Po(t.min,n.min,r),e.max=Po(t.max,n.max,r)}function Vd(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const $d={duration:.45,ease:[.4,0,.1,1]},Wd=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Gd=Wd("applewebkit/")&&!Wd("chrome/")?Math.round:ga;function qd(e){e.min=Gd(e.min),e.max=Gd(e.max)}function Xd(e,t,n){return"position"===e||"preserve-aspect"===e&&(r=bd(t),i=bd(n),a=.2,!(Math.abs(r-i)<=a));var r,i,a}function Yd(e){var t;return e!==e.root&&(null==(t=e.scroll)?void 0:t.wasRoot)}const Jd=Qd({attachResizeListener:(e,t)=>gu(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Zd={current:void 0},eh=Qd({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Zd.current){const e=new Jd({});e.mount(window),e.setOptions({layoutScroll:!0}),Zd.current=e}return Zd.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),th={pan:{Feature:class extends pu{constructor(){super(...arguments),this.removePointerDownListener=ga}onPointerDown(e){this.session=new Qu(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Su(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:zu(e),onStart:zu(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&$a.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=vu(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends pu{constructor(e){super(e),this.removeGroupControls=ga,this.removeListeners=ga,this.controls=new Ru(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ga}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:eh,MeasureLayout:Yu}};function nh(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover","Start"===n);const i=r["onHover"+n];i&&$a.postRender(()=>i(t,yu(t)))}function rh(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap","Start"===n);const i=r["onTap"+("End"===n?"":n)];i&&$a.postRender(()=>i(t,yu(t)))}const ih=new WeakMap,ah=new WeakMap,oh=e=>{const t=ih.get(e.target);t&&t(e)},sh=e=>{e.forEach(oh)};function Ah(e,t,n){const r=function({root:e,...t}){const n=e||document;ah.has(n)||ah.set(n,{});const r=ah.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(sh,{root:e,...t})),r[i]}(t);return ih.set(e,n),r.observe(e),()=>{ih.delete(e),r.unobserve(e)}}const lh={some:0,all:1};const ch=hc({...mu,...{inView:{Feature:class extends pu{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:lh[r]};return Ah(this.node.current,a,e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,i&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends pu{mount(){const{current:e}=this.node;e&&(this.unmount=ZA(e,(e,t)=>(rh(this.node,t,"Start"),(e,{success:t})=>rh(this.node,e,t?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends pu{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(qX){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=va(gu(this.node.current,"focus",()=>this.onFocus()),gu(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends pu{mount(){const{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){const[r,i,a]=zA(e,n),o=e=>{if(!VA(e))return;const{target:n}=e,r=t(n,e);if("function"!=typeof r||!n)return;const a=e=>{VA(e)&&(r(e),n.removeEventListener("pointerleave",a))};n.addEventListener("pointerleave",a,i)};return r.forEach(e=>{e.addEventListener("pointerenter",o,i)}),a}(e,(e,t)=>(nh(this.node,t,"Start"),e=>nh(this.node,e,"End"))))}unmount(){}}}},...th,...{layout:{ProjectionNode:eh,MeasureLayout:Yu}}},_c);function uh(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function dh(e){const t=ph(e),n=De.forwardRef((e,n)=>{const{children:r,...i}=e,a=De.Children.toArray(r),o=a.find(mh);if(o){const e=o.props.children,r=a.map(t=>t===o?De.Children.count(e)>1?De.Children.only(null):De.isValidElement(e)?e.props.children:null:t);return Ie.jsx(t,{...i,ref:n,children:De.isValidElement(e)?De.cloneElement(e,void 0,r):null})}return Ie.jsx(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}var hh=dh("Slot");function ph(e){const t=De.forwardRef((e,t)=>{const{children:n,...r}=e;if(De.isValidElement(n)){const e=function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,i=r&&"isReactWarning"in r&&r.isReactWarning;if(i)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,i=r&&"isReactWarning"in r&&r.isReactWarning,i)return e.props.ref;return e.props.ref||e.ref}(n),i=function(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{const t=a(...e);return i(...e),t}:i&&(n[r]=i):"style"===r?n[r]={...i,...a}:"className"===r&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==De.Fragment&&(i.ref=t?function(...e){return t=>{let n=!1;const r=e.map(e=>{const r=uh(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():uh(e[t],null)}}}}(t,e):e),De.cloneElement(n,i)}return De.Children.count(n)>1?De.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var fh=Symbol("radix.slottable");function mh(e){return De.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===fh}function gh(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=gh(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function yh(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=gh(e))&&(r&&(r+=" "),r+=t);return r}const vh=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,wh=yh,xh=e=>{const t=Eh(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{const n=e.split("-");return""===n[0]&&1!==n.length&&n.shift(),bh(n,t)||Ch(e)},getConflictingClassGroupIds:(e,t)=>{const i=n[e]||[];return t&&r[e]?[...i,...r[e]]:i}}},bh=(e,t)=>{var n;if(0===e.length)return t.classGroupId;const r=e[0],i=t.nextPart.get(r),a=i?bh(e.slice(1),i):void 0;if(a)return a;if(0===t.validators.length)return;const o=e.join("-");return null==(n=t.validators.find(({validator:e})=>e(o)))?void 0:n.classGroupId},Bh=/^\[(.+)\]$/,Ch=e=>{if(Bh.test(e)){const t=Bh.exec(e)[1],n=null==t?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Eh=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const i in n)kh(n[i],r,i,t);return r},kh=(e,t,n,r)=>{e.forEach(e=>{if("string"==typeof e){return void((""===e?t:Sh(t,e)).classGroupId=n)}if("function"==typeof e)return Fh(e)?void kh(e(r),t,n,r):void t.validators.push({validator:e,classGroupId:n});Object.entries(e).forEach(([e,i])=>{kh(i,Sh(t,e),n,r)})})},Sh=(e,t)=>{let n=e;return t.split("-").forEach(e=>{n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)}),n},Fh=e=>e.isThemeGetter,Qh=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(i,a)=>{n.set(i,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(e){let t=n.get(e);return void 0!==t?t:void 0!==(t=r.get(e))?(i(e,t),t):void 0},set(e,t){n.has(e)?n.set(e,t):i(e,t)}}},jh=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=e=>{const t=[];let n,r=0,i=0,a=0;for(let A=0;A<e.length;A++){let o=e[A];if(0===r&&0===i){if(":"===o){t.push(e.slice(a,A)),a=A+1;continue}if("/"===o){n=A;continue}}"["===o?r++:"]"===o?r--:"("===o?i++:")"===o&&i--}const o=0===t.length?e:e.substring(a),s=Uh(o);return{modifiers:t,hasImportantModifier:s!==o,baseClassName:s,maybePostfixModifierPosition:n&&n>a?n-a:void 0}};if(t){const e=t+":",n=r;r=t=>t.startsWith(e)?n(t.substring(e.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:t,maybePostfixModifierPosition:void 0}}if(n){const e=r;r=t=>n({className:t,parseClassName:e})}return r},Uh=e=>e.endsWith("!")?e.substring(0,e.length-1):e.startsWith("!")?e.substring(1):e,Oh=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(e=>[e,!0]));return e=>{if(e.length<=1)return e;const n=[];let r=[];return e.forEach(e=>{"["===e[0]||t[e]?(n.push(...r.sort(),e),r=[]):r.push(e)}),n.push(...r.sort()),n}},Nh=/\s+/;function Ih(){let e,t,n=0,r="";for(;n<arguments.length;)(e=arguments[n++])&&(t=Th(e))&&(r&&(r+=" "),r+=t);return r}const Th=e=>{if("string"==typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Th(e[r]))&&(n&&(n+=" "),n+=t);return n};function Ph(e,...t){let n,r,i,a=function(s){const A=t.reduce((e,t)=>t(e),e());return n=(e=>({cache:Qh(e.cacheSize),parseClassName:jh(e),sortModifiers:Oh(e),...xh(e)}))(A),r=n.cache.get,i=n.cache.set,a=o,o(s)};function o(e){const t=r(e);if(t)return t;const a=((e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],s=e.trim().split(Nh);let A="";for(let l=s.length-1;l>=0;l-=1){const e=s[l],{isExternal:t,modifiers:c,hasImportantModifier:u,baseClassName:d,maybePostfixModifierPosition:h}=n(e);if(t){A=e+(A.length>0?" "+A:A);continue}let p=!!h,f=r(p?d.substring(0,h):d);if(!f){if(!p){A=e+(A.length>0?" "+A:A);continue}if(f=r(d),!f){A=e+(A.length>0?" "+A:A);continue}p=!1}const m=a(c).join(":"),g=u?m+"!":m,y=g+f;if(o.includes(y))continue;o.push(y);const v=i(f,p);for(let n=0;n<v.length;++n){const e=v[n];o.push(g+e)}A=e+(A.length>0?" "+A:A)}return A})(e,n);return i(e,a),a}return function(){return a(Ih.apply(null,arguments))}}const Mh=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},Dh=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Lh=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Hh=/^\d+\/\d+$/,_h=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Rh=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Kh=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,zh=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Vh=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,$h=e=>Hh.test(e),Wh=e=>!!e&&!Number.isNaN(Number(e)),Gh=e=>!!e&&Number.isInteger(Number(e)),qh=e=>e.endsWith("%")&&Wh(e.slice(0,-1)),Xh=e=>_h.test(e),Yh=()=>!0,Jh=e=>Rh.test(e)&&!Kh.test(e),Zh=()=>!1,ep=e=>zh.test(e),tp=e=>Vh.test(e),np=e=>!ip(e)&&!cp(e),rp=e=>gp(e,xp,Zh),ip=e=>Dh.test(e),ap=e=>gp(e,bp,Jh),op=e=>gp(e,Bp,Wh),sp=e=>gp(e,vp,Zh),Ap=e=>gp(e,wp,tp),lp=e=>gp(e,Ep,ep),cp=e=>Lh.test(e),up=e=>yp(e,bp),dp=e=>yp(e,Cp),hp=e=>yp(e,vp),pp=e=>yp(e,xp),fp=e=>yp(e,wp),mp=e=>yp(e,Ep,!0),gp=(e,t,n)=>{const r=Dh.exec(e);return!!r&&(r[1]?t(r[1]):n(r[2]))},yp=(e,t,n=!1)=>{const r=Lh.exec(e);return!!r&&(r[1]?t(r[1]):n)},vp=e=>"position"===e||"percentage"===e,wp=e=>"image"===e||"url"===e,xp=e=>"length"===e||"size"===e||"bg-size"===e,bp=e=>"length"===e,Bp=e=>"number"===e,Cp=e=>"family-name"===e,Ep=e=>"shadow"===e,kp=Ph(()=>{const e=Mh("color"),t=Mh("font"),n=Mh("text"),r=Mh("font-weight"),i=Mh("tracking"),a=Mh("leading"),o=Mh("breakpoint"),s=Mh("container"),A=Mh("spacing"),l=Mh("radius"),c=Mh("shadow"),u=Mh("inset-shadow"),d=Mh("text-shadow"),h=Mh("drop-shadow"),p=Mh("blur"),f=Mh("perspective"),m=Mh("aspect"),g=Mh("ease"),y=Mh("animate"),v=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",cp,ip],w=()=>[cp,ip,A],x=()=>[$h,"full","auto",...w()],b=()=>[Gh,"none","subgrid",cp,ip],B=()=>["auto",{span:["full",Gh,cp,ip]},Gh,cp,ip],C=()=>[Gh,"auto",cp,ip],E=()=>["auto","min","max","fr",cp,ip],k=()=>["auto",...w()],S=()=>[$h,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...w()],F=()=>[e,cp,ip],Q=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",hp,sp,{position:[cp,ip]}],j=()=>["auto","cover","contain",pp,rp,{size:[cp,ip]}],U=()=>[qh,up,ap],O=()=>["","none","full",l,cp,ip],N=()=>["",Wh,up,ap],I=()=>[Wh,qh,hp,sp],T=()=>["","none",p,cp,ip],P=()=>["none",Wh,cp,ip],M=()=>["none",Wh,cp,ip],D=()=>[Wh,cp,ip],L=()=>[$h,"full",...w()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Xh],breakpoint:[Xh],color:[Yh],container:[Xh],"drop-shadow":[Xh],ease:["in","out","in-out"],font:[np],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Xh],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Xh],shadow:[Xh],spacing:["px",Wh],text:[Xh],"text-shadow":[Xh],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",$h,ip,cp,m]}],container:["container"],columns:[{columns:[Wh,ip,cp,s]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:v()}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:x()}],"inset-x":[{"inset-x":x()}],"inset-y":[{"inset-y":x()}],start:[{start:x()}],end:[{end:x()}],top:[{top:x()}],right:[{right:x()}],bottom:[{bottom:x()}],left:[{left:x()}],visibility:["visible","invisible","collapse"],z:[{z:[Gh,"auto",cp,ip]}],basis:[{basis:[$h,"full","auto",s,...w()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Wh,$h,"auto","initial","none",ip]}],grow:[{grow:["",Wh,cp,ip]}],shrink:[{shrink:["",Wh,cp,ip]}],order:[{order:[Gh,"first","last","none",cp,ip]}],"grid-cols":[{"grid-cols":b()}],"col-start-end":[{col:B()}],"col-start":[{"col-start":C()}],"col-end":[{"col-end":C()}],"grid-rows":[{"grid-rows":b()}],"row-start-end":[{row:B()}],"row-start":[{"row-start":C()}],"row-end":[{"row-end":C()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":E()}],"auto-rows":[{"auto-rows":E()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe","normal"]}],"justify-items":[{"justify-items":["start","end","center","stretch","center-safe","end-safe","normal"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"align-items":[{items:["start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"align-self":[{self:["auto","start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"place-items":[{"place-items":["start","end","center","stretch","center-safe","end-safe","baseline"]}],"place-self":[{"place-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:k()}],mx:[{mx:k()}],my:[{my:k()}],ms:[{ms:k()}],me:[{me:k()}],mt:[{mt:k()}],mr:[{mr:k()}],mb:[{mb:k()}],ml:[{ml:k()}],"space-x":[{"space-x":w()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":w()}],"space-y-reverse":["space-y-reverse"],size:[{size:S()}],w:[{w:[s,"screen",...S()]}],"min-w":[{"min-w":[s,"screen","none",...S()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[o]},...S()]}],h:[{h:["screen","lh",...S()]}],"min-h":[{"min-h":["screen","lh","none",...S()]}],"max-h":[{"max-h":["screen","lh",...S()]}],"font-size":[{text:["base",n,up,ap]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,cp,op]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",qh,ip]}],"font-family":[{font:[dp,ip,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,cp,ip]}],"line-clamp":[{"line-clamp":[Wh,"none",cp,op]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":["none",cp,ip]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",cp,ip]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:F()}],"text-color":[{text:F()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","wavy"]}],"text-decoration-thickness":[{decoration:[Wh,"from-font","auto",cp,ap]}],"text-decoration-color":[{decoration:F()}],"underline-offset":[{"underline-offset":[Wh,"auto",cp,ip]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:w()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",cp,ip]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",cp,ip]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Q()}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:j()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Gh,cp,ip],radial:["",cp,ip],conic:[Gh,cp,ip]},fp,Ap]}],"bg-color":[{bg:F()}],"gradient-from-pos":[{from:U()}],"gradient-via-pos":[{via:U()}],"gradient-to-pos":[{to:U()}],"gradient-from":[{from:F()}],"gradient-via":[{via:F()}],"gradient-to":[{to:F()}],rounded:[{rounded:O()}],"rounded-s":[{"rounded-s":O()}],"rounded-e":[{"rounded-e":O()}],"rounded-t":[{"rounded-t":O()}],"rounded-r":[{"rounded-r":O()}],"rounded-b":[{"rounded-b":O()}],"rounded-l":[{"rounded-l":O()}],"rounded-ss":[{"rounded-ss":O()}],"rounded-se":[{"rounded-se":O()}],"rounded-ee":[{"rounded-ee":O()}],"rounded-es":[{"rounded-es":O()}],"rounded-tl":[{"rounded-tl":O()}],"rounded-tr":[{"rounded-tr":O()}],"rounded-br":[{"rounded-br":O()}],"rounded-bl":[{"rounded-bl":O()}],"border-w":[{border:N()}],"border-w-x":[{"border-x":N()}],"border-w-y":[{"border-y":N()}],"border-w-s":[{"border-s":N()}],"border-w-e":[{"border-e":N()}],"border-w-t":[{"border-t":N()}],"border-w-r":[{"border-r":N()}],"border-w-b":[{"border-b":N()}],"border-w-l":[{"border-l":N()}],"divide-x":[{"divide-x":N()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":N()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:["solid","dashed","dotted","double","hidden","none"]}],"divide-style":[{divide:["solid","dashed","dotted","double","hidden","none"]}],"border-color":[{border:F()}],"border-color-x":[{"border-x":F()}],"border-color-y":[{"border-y":F()}],"border-color-s":[{"border-s":F()}],"border-color-e":[{"border-e":F()}],"border-color-t":[{"border-t":F()}],"border-color-r":[{"border-r":F()}],"border-color-b":[{"border-b":F()}],"border-color-l":[{"border-l":F()}],"divide-color":[{divide:F()}],"outline-style":[{outline:["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[Wh,cp,ip]}],"outline-w":[{outline:["",Wh,up,ap]}],"outline-color":[{outline:F()}],shadow:[{shadow:["","none",c,mp,lp]}],"shadow-color":[{shadow:F()}],"inset-shadow":[{"inset-shadow":["none",u,mp,lp]}],"inset-shadow-color":[{"inset-shadow":F()}],"ring-w":[{ring:N()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:F()}],"ring-offset-w":[{"ring-offset":[Wh,ap]}],"ring-offset-color":[{"ring-offset":F()}],"inset-ring-w":[{"inset-ring":N()}],"inset-ring-color":[{"inset-ring":F()}],"text-shadow":[{"text-shadow":["none",d,mp,lp]}],"text-shadow-color":[{"text-shadow":F()}],opacity:[{opacity:[Wh,cp,ip]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Wh]}],"mask-image-linear-from-pos":[{"mask-linear-from":I()}],"mask-image-linear-to-pos":[{"mask-linear-to":I()}],"mask-image-linear-from-color":[{"mask-linear-from":F()}],"mask-image-linear-to-color":[{"mask-linear-to":F()}],"mask-image-t-from-pos":[{"mask-t-from":I()}],"mask-image-t-to-pos":[{"mask-t-to":I()}],"mask-image-t-from-color":[{"mask-t-from":F()}],"mask-image-t-to-color":[{"mask-t-to":F()}],"mask-image-r-from-pos":[{"mask-r-from":I()}],"mask-image-r-to-pos":[{"mask-r-to":I()}],"mask-image-r-from-color":[{"mask-r-from":F()}],"mask-image-r-to-color":[{"mask-r-to":F()}],"mask-image-b-from-pos":[{"mask-b-from":I()}],"mask-image-b-to-pos":[{"mask-b-to":I()}],"mask-image-b-from-color":[{"mask-b-from":F()}],"mask-image-b-to-color":[{"mask-b-to":F()}],"mask-image-l-from-pos":[{"mask-l-from":I()}],"mask-image-l-to-pos":[{"mask-l-to":I()}],"mask-image-l-from-color":[{"mask-l-from":F()}],"mask-image-l-to-color":[{"mask-l-to":F()}],"mask-image-x-from-pos":[{"mask-x-from":I()}],"mask-image-x-to-pos":[{"mask-x-to":I()}],"mask-image-x-from-color":[{"mask-x-from":F()}],"mask-image-x-to-color":[{"mask-x-to":F()}],"mask-image-y-from-pos":[{"mask-y-from":I()}],"mask-image-y-to-pos":[{"mask-y-to":I()}],"mask-image-y-from-color":[{"mask-y-from":F()}],"mask-image-y-to-color":[{"mask-y-to":F()}],"mask-image-radial":[{"mask-radial":[cp,ip]}],"mask-image-radial-from-pos":[{"mask-radial-from":I()}],"mask-image-radial-to-pos":[{"mask-radial-to":I()}],"mask-image-radial-from-color":[{"mask-radial-from":F()}],"mask-image-radial-to-color":[{"mask-radial-to":F()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"]}],"mask-image-conic-pos":[{"mask-conic":[Wh]}],"mask-image-conic-from-pos":[{"mask-conic-from":I()}],"mask-image-conic-to-pos":[{"mask-conic-to":I()}],"mask-image-conic-from-color":[{"mask-conic-from":F()}],"mask-image-conic-to-color":[{"mask-conic-to":F()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Q()}],"mask-repeat":[{mask:["no-repeat",{repeat:["","x","y","space","round"]}]}],"mask-size":[{mask:j()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",cp,ip]}],filter:[{filter:["","none",cp,ip]}],blur:[{blur:T()}],brightness:[{brightness:[Wh,cp,ip]}],contrast:[{contrast:[Wh,cp,ip]}],"drop-shadow":[{"drop-shadow":["","none",h,mp,lp]}],"drop-shadow-color":[{"drop-shadow":F()}],grayscale:[{grayscale:["",Wh,cp,ip]}],"hue-rotate":[{"hue-rotate":[Wh,cp,ip]}],invert:[{invert:["",Wh,cp,ip]}],saturate:[{saturate:[Wh,cp,ip]}],sepia:[{sepia:["",Wh,cp,ip]}],"backdrop-filter":[{"backdrop-filter":["","none",cp,ip]}],"backdrop-blur":[{"backdrop-blur":T()}],"backdrop-brightness":[{"backdrop-brightness":[Wh,cp,ip]}],"backdrop-contrast":[{"backdrop-contrast":[Wh,cp,ip]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Wh,cp,ip]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Wh,cp,ip]}],"backdrop-invert":[{"backdrop-invert":["",Wh,cp,ip]}],"backdrop-opacity":[{"backdrop-opacity":[Wh,cp,ip]}],"backdrop-saturate":[{"backdrop-saturate":[Wh,cp,ip]}],"backdrop-sepia":[{"backdrop-sepia":["",Wh,cp,ip]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",cp,ip]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Wh,"initial",cp,ip]}],ease:[{ease:["linear","initial",g,cp,ip]}],delay:[{delay:[Wh,cp,ip]}],animate:[{animate:["none",y,cp,ip]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[f,cp,ip]}],"perspective-origin":[{"perspective-origin":v()}],rotate:[{rotate:P()}],"rotate-x":[{"rotate-x":P()}],"rotate-y":[{"rotate-y":P()}],"rotate-z":[{"rotate-z":P()}],scale:[{scale:M()}],"scale-x":[{"scale-x":M()}],"scale-y":[{"scale-y":M()}],"scale-z":[{"scale-z":M()}],"scale-3d":["scale-3d"],skew:[{skew:D()}],"skew-x":[{"skew-x":D()}],"skew-y":[{"skew-y":D()}],transform:[{transform:[cp,ip,"","none","gpu","cpu"]}],"transform-origin":[{origin:v()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:L()}],"translate-x":[{"translate-x":L()}],"translate-y":[{"translate-y":L()}],"translate-z":[{"translate-z":L()}],"translate-none":["translate-none"],accent:[{accent:F()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:F()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",cp,ip]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",cp,ip]}],fill:[{fill:["none",...F()]}],"stroke-w":[{stroke:[Wh,up,ap,op]}],stroke:[{stroke:["none",...F()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function Sp(...e){return kp(yh(e))}const Fp=(Qp="inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",jp={variants:{variant:{default:"text-white shadow",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90 active:bg-destructive/95",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground active:bg-accent/80",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80 active:bg-secondary/90",ghost:"hover:bg-accent hover:text-accent-foreground active:bg-accent/80",link:"text-primary underline-offset-4 hover:underline active:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}},e=>{var t;if(null==(null==jp?void 0:jp.variants))return wh(Qp,null==e?void 0:e.class,null==e?void 0:e.className);const{variants:n,defaultVariants:r}=jp,i=Object.keys(n).map(t=>{const i=null==e?void 0:e[t],a=null==r?void 0:r[t];if(null===i)return null;const o=vh(i)||vh(a);return n[t][o]}),a=e&&Object.entries(e).reduce((e,t)=>{let[n,r]=t;return void 0===r||(e[n]=r),e},{}),o=null==jp||null===(t=jp.compoundVariants)||void 0===t?void 0:t.reduce((e,t)=>{let{class:n,className:i,...o}=t;return Object.entries(o).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...r,...a}[t]):{...r,...a}[t]===n})?[...e,n,i]:e},[]);return wh(Qp,i,o,null==e?void 0:e.class,null==e?void 0:e.className)});var Qp,jp;const Up=De.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,textColor:i,style:a,disabled:o,...s},A)=>{const{theme:l}=ea(),c=r?hh:"button",u=(e,t)=>`rgba(${parseInt(e.slice(1,3),16)}, ${parseInt(e.slice(3,5),16)}, ${parseInt(e.slice(5,7),16)}, ${t})`,d=(()=>{if("default"!==t||!(null==l?void 0:l.primaryColor))return{};const e=l.primaryColor;return{backgroundColor:o?u(e,.5):e,"--hover-bg":u(e,.9),"--active-bg":u(e,.95)}})();return Ie.jsx(c,{className:Sp(Fp({variant:t,size:n,className:e}),"default"===t&&(null==l?void 0:l.primaryColor)&&"hover:[background-color:var(--hover-bg)] active:[background-color:var(--active-bg)]"),style:{...d,...i&&{color:i},...a},disabled:o,ref:A,...s})});Up.displayName="Button";const Op=e=>{let t;const n=new Set,r=(e,r)=>{const i="function"==typeof e?e(t):e;if(!Object.is(i,t)){const e=t;t=(null!=r?r:"object"!=typeof i||null===i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},Np=e=>e;const Ip=e=>{const t=(e=>e?Op(e):Op)(e),n=e=>function(e,t=Np){const n=Te.useSyncExternalStore(e.subscribe,Te.useCallback(()=>t(e.getState()),[e,t]),Te.useCallback(()=>t(e.getInitialState()),[e,t]));return Te.useDebugValue(n),n}(t,e);return Object.assign(n,t),n},Tp=e=>e?Ip(e):Ip,Pp=e=>(t,n,r)=>{const i=r.subscribe;r.subscribe=(e,t,n)=>{let a=e;if(t){const i=(null==n?void 0:n.equalityFn)||Object.is;let o=e(r.getState());a=n=>{const r=e(n);if(!i(o,r)){const e=o;t(o=r,e)}},(null==n?void 0:n.fireImmediately)&&t(o,o)}return i(a)};return e(t,n,r)};function Mp(e){return{id:e.id,tenantId:e.tenant_id,createdBy:e.created_by,shipperEmail:e.shipper_email,shipperName:e.shipper_name,shipperCompanyName:e.shipper_company_name,shipperPhone:e.shipper_phone,shipperCountryCode:e.shipper_country_code,shipperAddress:e.shipper_address,shipperCity:e.shipper_city,shipperState:e.shipper_state,shipperZipCode:e.shipper_zip_code,shipperLatitude:e.shipper_latitude,shipperLongitude:e.shipper_longitude,origin:e.origin,destination:e.destination,pickupTimestamp:e.pickup_timestamp,deliveryTimestamp:e.delivery_timestamp,loadType:e.load_type,modeOfService:e.mode_of_service,equipmentType:e.equipment_type,grossWeight:e.gross_weight,numberOfPallets:e.number_of_pallets,emailMessageId:e.email_message_id,emailConversationId:e.email_conversation_id,emailSubject:e.email_subject,senderEmail:e.sender_email,senderName:e.sender_name,receiverEmail:e.receiver_email,receivedDatetime:e.received_datetime,status:e.status,actionNeeded:e.action_needed,requiredFields:e.required_fields??!1,prospectCreation:e.prospect_creation??!1,isDuplicate:e.is_duplicate,duplicateOf:e.duplicate_of,notes:e.notes,createdAt:e.created_at,updatedAt:e.updated_at,externalIdentifier:e.external_identifier,equipmentSize:e.equipment_size,shipperTargetPrice:e.shipper_target_price}}class Dp{static async getLeads(e={}){var t,n,r;try{const t={};e.page&&(t.page=e.page),e.size&&(t.size=e.size),e.search&&(t.search=e.search),e.status&&(t.status=e.status),e.date_filter&&(t.date_filter=e.date_filter);const n=(await Vi.get("/crm/public/leads/me",{params:t})).data;return{success:n.success,leads:n.leads.map(Mp),count:n.count,page:n.page,size:n.size}}catch(i){if(console.error("EmailLeadsService.getLeads error:",i),401===(null==(t=i.response)?void 0:t.status))throw new Error("Unauthorized. Please login again.");if(null==(r=null==(n=i.response)?void 0:n.data)?void 0:r.detail)throw new Error(i.response.data.detail);throw new Error("Failed to fetch email leads. Please try again.")}}static async getLeadById(e){var t;try{return Mp((await Vi.get(`/crm/public/leads/${e}`)).data.lead)}catch(n){if(console.error("EmailLeadsService.getLeadById error:",n),404===(null==(t=n.response)?void 0:t.status))throw new Error("Lead not found.");throw new Error("Failed to fetch lead details.")}}static async submitLeadAction(e,t){var n,r,i,a,o,s;try{const n={lead_id:e};t.equipmentType&&(n.equipment_type=t.equipmentType),void 0!==t.equipmentSize&&t.equipmentSize>0&&(n.equipment_size=t.equipmentSize),t.loadType&&(n.load_type=t.loadType),void 0!==t.shipperTargetPrice&&t.shipperTargetPrice>0&&(n.shipper_target_price=t.shipperTargetPrice),t.shipperCompanyName&&(n.shipper_company_name=t.shipperCompanyName),t.shipperName&&(n.shipper_name=t.shipperName),t.shipperEmail&&(n.shipper_email=t.shipperEmail),t.shipperPhone&&(n.shipper_phone=t.shipperPhone),t.shipperAddress&&(n.shipper_address=t.shipperAddress),t.shipperCity&&(n.shipper_city=t.shipperCity),t.shipperState&&(n.shipper_state=t.shipperState),t.shipperZipCode&&(n.shipper_zip_code=t.shipperZipCode),void 0!==t.shipperLatitude&&(n.shipper_latitude=t.shipperLatitude),void 0!==t.shipperLongitude&&(n.shipper_longitude=t.shipperLongitude);const r=await Vi.post("/crm/leads/lead/action/",n);return{success:r.data.success,lead:Mp(r.data.lead)}}catch(A){if(console.error("EmailLeadsService.submitLeadAction error:",A),401===(null==(n=A.response)?void 0:n.status))throw new Error("Unauthorized. Please login again.");if(400===(null==(r=A.response)?void 0:r.status)){const e=null==(i=A.response.data)?void 0:i.detail;if("string"==typeof e)throw new Error(e);throw new Error("Missing required fields. Please fill all required fields.")}if(404===(null==(a=A.response)?void 0:a.status))throw new Error("Lead not found.");if(null==(s=null==(o=A.response)?void 0:o.data)?void 0:s.detail)throw new Error(A.response.data.detail);throw new Error("Failed to submit lead action. Please try again.")}}static async getEquipmentTypes(){var e,t,n;try{const e=await Vi.get("/crm/emails/public/client_db/equipment_types");if(e.data.success)return e.data.data;throw new Error("Failed to fetch equipment types")}catch(r){if(console.error("EmailLeadsService.getEquipmentTypes error:",r),401===(null==(e=r.response)?void 0:e.status))throw new Error("Unauthorized. Please login again.");if(null==(n=null==(t=r.response)?void 0:t.data)?void 0:n.detail)throw new Error(r.response.data.detail);throw new Error("Failed to fetch equipment types. Please try again.")}}}function Lp(e){return{id:e.id,tenantId:e.tenant_id,createdBy:e.created_by,messageId:e.message_id,conversationId:e.conversation_id,conversationIndex:e.conversation_index,senderEmail:e.sender_email,receiverEmail:e.receiver_email,subject:e.subject,receivedDatetime:e.received_datetime,bodyHtml:e.body_html,bodyText:e.body_text,category:e.category,classificationConfidence:e.classification_confidence,status:e.status,userId:e.user_id,metadata:e.metadata,referencedLeadId:e.referenced_lead_id,processedAt:e.processed_at,createdAt:e.created_at,updatedAt:e.updated_at}}class Hp{static async getLeadEmails(e){var t,n,r,i;try{const t=(await Vi.get(`/crm/public/leads/emails/${e}`)).data;return{success:t.success,emails:t.emails.map(Lp),count:t.count}}catch(a){if(console.error("EmailConversationService.getLeadEmails error:",a),401===(null==(t=a.response)?void 0:t.status))throw new Error("Unauthorized. Please login again.");if(404===(null==(n=a.response)?void 0:n.status))throw new Error("Lead emails not found.");if(null==(i=null==(r=a.response)?void 0:r.data)?void 0:i.detail)throw new Error(a.response.data.detail);throw new Error("Failed to fetch lead emails. Please try again.")}}static async sendEmailReply(e,t,n,r){var i,a,o;try{const i={to:e.map(e=>({email:e})),conversation_id:t,subject:n,body_html:r},a=(await Vi.post("/crm/agents/email/send",i)).data;return{success:a.success,reply:a.reply,email:Lp(a.email)}}catch(s){if(console.error("EmailConversationService.sendEmailReply error:",s),401===(null==(i=s.response)?void 0:i.status))throw new Error("Unauthorized. Please login again.");if(null==(o=null==(a=s.response)?void 0:a.data)?void 0:o.detail)throw new Error(s.response.data.detail);throw new Error("Failed to send email. Please try again.")}}}const _p={leads:[],totalCount:0,currentPage:1,pageSize:10,isLoading:!1,isPolling:!1,error:null,searchQuery:"",statusFilter:"",dateFilter:"all",newLeadsCount:0,hasNewLeads:!1,lastFetchedLeadIds:new Set,showNewLeadsAlert:!1,pollingIntervalId:null,isPollingEnabled:!1},Rp=Tp()(Pp((e,t)=>({..._p,fetchLeads:async n=>{const r=t();e({isLoading:!0,error:null});try{const t={page:(null==n?void 0:n.page)??r.currentPage,size:(null==n?void 0:n.size)??r.pageSize,search:(null==n?void 0:n.search)??(r.searchQuery||void 0),status:(null==n?void 0:n.status)??(r.statusFilter||void 0),date_filter:(null==n?void 0:n.date_filter)??("all"!==r.dateFilter?r.dateFilter:void 0)},i=await Dp.getLeads(t),a=new Set(i.leads.map(e=>e.id));e({leads:i.leads,totalCount:i.count,currentPage:i.page,isLoading:!1,lastFetchedLeadIds:a})}catch(i){e({isLoading:!1,error:i.message||"Failed to fetch leads"})}},setPage:n=>{e({currentPage:n}),t().fetchLeads({page:n})},setPageSize:n=>{e({pageSize:n,currentPage:1}),t().fetchLeads({size:n,page:1})},setSearchQuery:t=>{e({searchQuery:t,currentPage:1})},setStatusFilter:n=>{e({statusFilter:n,currentPage:1}),t().fetchLeads({status:n,page:1})},setDateFilter:n=>{e({dateFilter:n,currentPage:1}),t().fetchLeads({date_filter:"all"!==n?n:void 0,page:1})},startPolling:()=>{if(t().pollingIntervalId)return;console.log("[EmailLeadsStore] Starting polling...");const n=setInterval(()=>{t().pollForNewLeads()},6e4);e({pollingIntervalId:n,isPollingEnabled:!0})},stopPolling:()=>{const n=t();n.pollingIntervalId&&(console.log("[EmailLeadsStore] Stopping polling..."),clearInterval(n.pollingIntervalId),e({pollingIntervalId:null,isPollingEnabled:!1}))},pollForNewLeads:async()=>{const n=t();if(n.isPolling||n.isLoading)return;const r=n.lastFetchedLeadIds.size>0;e({isPolling:!0});try{console.log("[EmailLeadsStore] Polling for new leads...");const t=await Dp.getLeads({page:1,size:n.pageSize,search:n.searchQuery||void 0,status:n.statusFilter||void 0,date_filter:"all"!==n.dateFilter?n.dateFilter:void 0}),i=t.leads.map(e=>e.id),a=n.lastFetchedLeadIds,o=i.filter(e=>!a.has(e));o.length>0&&r?(console.log(`[EmailLeadsStore] Found ${o.length} new leads!`),e({newLeadsCount:o.length,hasNewLeads:!0,showNewLeadsAlert:!0,leads:t.leads,totalCount:t.count,lastFetchedLeadIds:new Set(i),isPolling:!1})):e({lastFetchedLeadIds:new Set(i),isPolling:!1})}catch(i){console.error("[EmailLeadsStore] Polling error:",i),e({isPolling:!1})}},clearNewLeadsNotification:()=>{e({newLeadsCount:0,hasNewLeads:!1,showNewLeadsAlert:!1})},acknowledgeNewLeads:()=>{e({showNewLeadsAlert:!1})},reset:()=>{const n=t();n.pollingIntervalId&&clearInterval(n.pollingIntervalId),e({..._p,lastFetchedLeadIds:new Set})}})));function Kp({position:e="bottom-right",margin:t,zIndex:n}){const{openWidget:r,theme:i,isOpen:a,isAuthenticated:o}=ea(),{hasNewLeads:s,newLeadsCount:A,startPolling:l,stopPolling:c,clearNewLeadsNotification:u}=Rp();Te.useEffect(()=>{if(o)return l(),()=>c()},[l,c,o]);return Ie.jsx("div",{className:(()=>{switch(e){case"bottom-right":default:return"fixed bottom-6 right-6 z-50";case"bottom-left":return"fixed bottom-6 left-6 z-50";case"top-right":return"fixed top-6 right-6 z-50";case"top-left":return"fixed top-6 left-6 z-50"}})(),style:{margin:t||void 0,zIndex:n||void 0},children:Ie.jsxs("div",{className:"relative",children:[Ie.jsxs(Up,{onClick:()=>{console.log("WidgetBubble: Button clicked!"),r(),s&&u()},size:"lg",className:"widget-bubble-button h-16 w-16 rounded-full shadow-lg hover:shadow-xl transition-shadow duration-200 bg-pangents-gradient",style:{backgroundColor:i.primaryColor,fontFamily:i.fontFamily},children:[i.bubbleIcon?Ie.jsx("img",{src:i.bubbleIcon,alt:"Chat icon",className:"h-16 w-16 object-contain"}):Ie.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 47 47",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"h-8 w-8",children:[Ie.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M23.5058 3.63059e-06C12.2974 -0.00618902 2.64601 7.91029 0.455364 18.9069C-1.73528 29.9035 4.14513 40.9165 14.4996 45.2094V23.0524L17.8315 18.762V46.3055C19.6877 46.767 21.5932 47.0002 23.5058 47C24.0838 47.0001 24.6543 46.9725 25.221 46.9307V14.4716L28.553 18.762V46.4539C30.5249 46.0214 32.4323 45.3345 34.2273 44.4105V8.89938L37.5593 13.1898V42.3372C45.6702 36.2805 48.9913 25.7075 45.8012 16.0983C42.6111 6.48908 33.6272 0.00428384 23.5059 0.00510346L23.5058 3.63059e-06Z",fill:"url(#paint0_linear_192_413)"}),Ie.jsx("defs",{children:Ie.jsxs("linearGradient",{id:"paint0_linear_192_413",x1:"-18.3065",y1:"-10.34",x2:"-17.2725",y2:"72.427",gradientUnits:"userSpaceOnUse",children:[Ie.jsx("stop",{stopColor:"white"}),Ie.jsx("stop",{offset:"0.6",stopColor:"white",stopOpacity:"0.968627"}),Ie.jsx("stop",{offset:"1",stopColor:"white",stopOpacity:"0.101961"})]})})]}),Ie.jsx("span",{className:"sr-only",children:"Open chat"})]}),s&&!a&&Ie.jsx(ch.div,{initial:{scale:0},animate:{scale:1},className:"absolute -top-1 -right-1 bg-red-500 text-white text-xs font-bold min-w-[20px] h-5 px-1.5 rounded-full flex items-center justify-center shadow-lg",children:A>99?"99+":A})]})})}
|
|
10
|
+
/**
|
|
11
|
+
* @license lucide-react v0.511.0 - ISC
|
|
12
|
+
*
|
|
13
|
+
* This source code is licensed under the ISC license.
|
|
14
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
15
|
+
*/const zp=e=>{const t=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()))(e);return t.charAt(0).toUpperCase()+t.slice(1)},Vp=(...e)=>e.filter((e,t,n)=>Boolean(e)&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim(),$p=e=>{for(const t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0};
|
|
16
|
+
/**
|
|
17
|
+
* @license lucide-react v0.511.0 - ISC
|
|
18
|
+
*
|
|
19
|
+
* This source code is licensed under the ISC license.
|
|
20
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
+
*/
|
|
22
|
+
var Wp={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};
|
|
23
|
+
/**
|
|
24
|
+
* @license lucide-react v0.511.0 - ISC
|
|
25
|
+
*
|
|
26
|
+
* This source code is licensed under the ISC license.
|
|
27
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
28
|
+
*/const Gp=Te.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:a,iconNode:o,...s},A)=>Te.createElement("svg",{ref:A,...Wp,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:Vp("lucide",i),...!a&&!$p(s)&&{"aria-hidden":"true"},...s},[...o.map(([e,t])=>Te.createElement(e,t)),...Array.isArray(a)?a:[a]])),qp=(e,t)=>{const n=Te.forwardRef(({className:n,...r},i)=>{return Te.createElement(Gp,{ref:i,iconNode:t,className:Vp(`lucide-${a=zp(e),a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,n),...r});var a});return n.displayName=zp(e),n},Xp=qp("activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]),Yp=qp("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]),Jp=qp("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]),Zp=qp("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]),ef=qp("bot-message-square",[["path",{d:"M12 6V2H8",key:"1155em"}],["path",{d:"m8 18-4 4V8a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2Z",key:"w2lp3e"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M9 11v2",key:"1ueba0"}],["path",{d:"M15 11v2",key:"i11awn"}],["path",{d:"M20 12h2",key:"1q8mjw"}]]),tf=qp("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]),nf=qp("box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]),rf=qp("brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]),af=qp("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]),of=qp("camera",[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]),sf=qp("chart-column",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]),Af=qp("chart-pie",[["path",{d:"M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z",key:"pzmjnu"}],["path",{d:"M21.21 15.89A10 10 0 1 1 8 2.83",key:"k2fpak"}]]),lf=qp("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),cf=qp("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),uf=qp("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),df=qp("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),hf=qp("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),pf=qp("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]),ff=qp("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]),mf=qp("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]),gf=qp("clipboard-list",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]]),yf=qp("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]),vf=qp("code-xml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]),wf=qp("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]),xf=qp("database-zap",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 15 21.84",key:"14ibmq"}],["path",{d:"M21 5V8",key:"1marbg"}],["path",{d:"M21 12L18 17H22L19 22",key:"zafso"}],["path",{d:"M3 12A9 3 0 0 0 14.59 14.87",key:"1y4wr8"}]]),bf=qp("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]),Bf=qp("dollar-sign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]),Cf=qp("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]),Ef=qp("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),kf=qp("file-text",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]),Sf=qp("funnel",[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]]),Ff=qp("headphones",[["path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3",key:"1xhozi"}]]),Qf=qp("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]),jf=qp("house",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]),Uf=qp("key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]),Of=qp("list-checks",[["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]]),Nf=qp("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),If=qp("mail-check",[["path",{d:"M22 13V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h8",key:"12jkf8"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}],["path",{d:"m16 19 2 2 4-4",key:"1b14m6"}]]),Tf=qp("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]),Pf=qp("map-pin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]),Mf=qp("maximize-2",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]]),Df=qp("maximize",[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]]),Lf=qp("message-square",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]),Hf=qp("mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]),_f=qp("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]),Rf=qp("minimize",[["path",{d:"M8 3v3a2 2 0 0 1-2 2H3",key:"hohbtr"}],["path",{d:"M21 8h-3a2 2 0 0 1-2-2V3",key:"5jw1f3"}],["path",{d:"M3 16h3a2 2 0 0 1 2 2v3",key:"198tvr"}],["path",{d:"M16 21v-3a2 2 0 0 1 2-2h3",key:"ph8mxp"}]]),Kf=qp("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]),zf=qp("navigation",[["polygon",{points:"3 11 22 2 13 21 11 13 3 11",key:"1ltx0t"}]]),Vf=qp("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]),$f=qp("phone",[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]]),Wf=qp("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),Gf=qp("power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]),qf=qp("presentation",[["path",{d:"M2 3h20",key:"91anmk"}],["path",{d:"M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3",key:"2k9sn8"}],["path",{d:"m7 21 5-5 5 5",key:"bip4we"}]]),Xf=qp("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]),Yf=qp("reply",[["path",{d:"M20 18v-2a4 4 0 0 0-4-4H4",key:"5vmcpk"}],["path",{d:"m9 17-5-5 5-5",key:"nvlc11"}]]),Jf=qp("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]),Zf=qp("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]),em=qp("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]),tm=qp("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]),nm=qp("share-2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]),rm=qp("shield-check",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),im=qp("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]),am=qp("signal",[["path",{d:"M2 20h.01",key:"4haj6o"}],["path",{d:"M7 20v-4",key:"j294jx"}],["path",{d:"M12 20v-8",key:"i3yub9"}],["path",{d:"M17 20V8",key:"1tkaf5"}],["path",{d:"M22 4v16",key:"sih9yq"}]]),om=qp("sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]),sm=qp("star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]),Am=qp("thumbs-down",[["path",{d:"M17 14V2",key:"8ymqnk"}],["path",{d:"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z",key:"m61m77"}]]),lm=qp("thumbs-up",[["path",{d:"M7 10v12",key:"1qc93n"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}]]),cm=qp("trash-2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),um=qp("trending-down",[["path",{d:"M16 17h6v-6",key:"t6n2it"}],["path",{d:"m22 17-8.5-8.5-5 5L2 7",key:"x473p"}]]),dm=qp("trending-up",[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]]),hm=qp("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),pm=qp("truck",[["path",{d:"M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2",key:"wrbu53"}],["path",{d:"M15 18H9",key:"1lyqi6"}],["path",{d:"M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14",key:"lysw3i"}],["circle",{cx:"17",cy:"18",r:"2",key:"332jqn"}],["circle",{cx:"7",cy:"18",r:"2",key:"19iecd"}]]),fm=qp("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]),mm=qp("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]),gm=qp("weight",[["circle",{cx:"12",cy:"5",r:"3",key:"rqqgnr"}],["path",{d:"M6.5 8a2 2 0 0 0-1.905 1.46L2.1 18.5A2 2 0 0 0 4 21h16a2 2 0 0 0 1.925-2.54L19.4 9.5A2 2 0 0 0 17.48 8Z",key:"56o5sh"}]]),ym=qp("wifi-off",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]),vm=qp("wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]),wm=qp("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),xm=qp("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),bm=qp("zoom-in",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]),Bm=qp("zoom-out",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]);
|
|
29
|
+
/**
|
|
30
|
+
* @license lucide-react v0.511.0 - ISC
|
|
31
|
+
*
|
|
32
|
+
* This source code is licensed under the ISC license.
|
|
33
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
34
|
+
*/
|
|
35
|
+
/**
|
|
36
|
+
* react-router v7.9.4
|
|
37
|
+
*
|
|
38
|
+
* Copyright (c) Remix Software Inc.
|
|
39
|
+
*
|
|
40
|
+
* This source code is licensed under the MIT license found in the
|
|
41
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
42
|
+
*
|
|
43
|
+
* @license MIT
|
|
44
|
+
*/
|
|
45
|
+
function Cm(e={}){let t,{initialEntries:n=["/"],initialIndex:r,v5Compat:i=!1}=e;t=n.map((e,t)=>c(e,"string"==typeof e?null:e.state,0===t?"default":void 0));let a=A(null==r?t.length-1:r),o="POP",s=null;function A(e){return Math.min(Math.max(e,0),t.length-1)}function l(){return t[a]}function c(e,n=null,r){let i=function(e,t,n=null,r){let i={pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?Qm(t):t,state:n,key:t&&t.key||r||Sm()};return i}(t?l().pathname:"/",e,n,r);return km("/"===i.pathname.charAt(0),`relative pathnames are not supported in memory history: ${JSON.stringify(e)}`),i}function u(e){return"string"==typeof e?e:Fm(e)}return{get index(){return a},get action(){return o},get location(){return l()},createHref:u,createURL:e=>new URL(u(e),"http://localhost"),encodeLocation(e){let t="string"==typeof e?Qm(e):e;return{pathname:t.pathname||"",search:t.search||"",hash:t.hash||""}},push(e,n){o="PUSH";let r=c(e,n);a+=1,t.splice(a,t.length,r),i&&s&&s({action:o,location:r,delta:1})},replace(e,n){o="REPLACE";let r=c(e,n);t[a]=r,i&&s&&s({action:o,location:r,delta:0})},go(e){o="POP";let n=A(a+e),r=t[n];a=n,s&&s({action:o,location:r,delta:e})},listen:e=>(s=e,()=>{s=null})}}function Em(e,t){if(!1===e||null==e)throw new Error(t)}function km(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(qX){}}}function Sm(){return Math.random().toString(36).substring(2,10)}function Fm({pathname:e="/",search:t="",hash:n=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),n&&"#"!==n&&(e+="#"===n.charAt(0)?n:"#"+n),e}function Qm(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function jm(e,t,n="/"){return function(e,t,n,r){let i="string"==typeof t?Qm(t):t,a=zm(i.pathname||"/",n);if(null==a)return null;let o=Um(e);!function(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n]);return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}(o);let s=null;for(let A=0;null==s&&A<o.length;++A){let e=Km(a);s=_m(o[A],e,r)}return s}(e,t,n,!1)}function Um(e,t=[],n=[],r="",i=!1){let a=(e,a,o=i,s)=>{let A={relativePath:void 0===s?e.path||"":s,caseSensitive:!0===e.caseSensitive,childrenIndex:a,route:e};if(A.relativePath.startsWith("/")){if(!A.relativePath.startsWith(r)&&o)return;Em(A.relativePath.startsWith(r),`Absolute route path "${A.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),A.relativePath=A.relativePath.slice(r.length)}let l=Gm([r,A.relativePath]),c=n.concat(A);e.children&&e.children.length>0&&(Em(!0!==e.index,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),Um(e.children,t,c,l,o)),(null!=e.path||e.index)&&t.push({path:l,score:Hm(l,e.index),routesMeta:c})};return e.forEach((e,t)=>{var n;if(""!==e.path&&(null==(n=e.path)?void 0:n.includes("?")))for(let r of Om(e.path))a(e,t,!0,r);else a(e,t)}),t}function Om(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,i=n.endsWith("?"),a=n.replace(/\?$/,"");if(0===r.length)return i?[a,""]:[a];let o=Om(r.join("/")),s=[];return s.push(...o.map(e=>""===e?a:[a,e].join("/"))),i&&s.push(...o),s.map(t=>e.startsWith("/")&&""===t?"/":t)}var Nm=/^:[\w-]+$/,Im=3,Tm=2,Pm=1,Mm=10,Dm=-2,Lm=e=>"*"===e;function Hm(e,t){let n=e.split("/"),r=n.length;return n.some(Lm)&&(r+=Dm),t&&(r+=Tm),n.filter(e=>!Lm(e)).reduce((e,t)=>e+(Nm.test(t)?Im:""===t?Pm:Mm),r)}function _m(e,t,n=!1){let{routesMeta:r}=e,i={},a="/",o=[];for(let s=0;s<r.length;++s){let e=r[s],A=s===r.length-1,l="/"===a?t:t.slice(a.length)||"/",c=Rm({path:e.relativePath,caseSensitive:e.caseSensitive,end:A},l),u=e.route;if(!c&&A&&n&&!r[r.length-1].route.index&&(c=Rm({path:e.relativePath,caseSensitive:e.caseSensitive,end:!1},l)),!c)return null;Object.assign(i,c.params),o.push({params:i,pathname:Gm([a,c.pathname]),pathnameBase:qm(Gm([a,c.pathnameBase])),route:u}),"/"!==c.pathnameBase&&(a=Gm([a,c.pathnameBase]))}return o}function Rm(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=function(e,t=!1,n=!0){km("*"===e||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,n)=>(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");e.endsWith("*")?(r.push({paramName:"*"}),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))");let a=new RegExp(i,t?void 0:"i");return[a,r]}(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,"$1"),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if("*"===t){let e=s[r]||"";o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,"$1")}const i=s[r];return e[t]=n&&!i?void 0:(i||"").replace(/%2F/g,"/"),e},{}),pathname:a,pathnameBase:o,pattern:e}}function Km(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return km(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function zm(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function Vm(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function $m(e){let t=function(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Wm(e,t,n,r=!1){let i;"string"==typeof e?i=Qm(e):(i={...e},Em(!i.pathname||!i.pathname.includes("?"),Vm("?","pathname","search",i)),Em(!i.pathname||!i.pathname.includes("#"),Vm("#","pathname","hash",i)),Em(!i.search||!i.search.includes("#"),Vm("#","search","hash",i)));let a,o=""===e||""===i.pathname,s=o?"/":i.pathname;if(null==s)a=n;else{let e=t.length-1;if(!r&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}a=e>=0?t[e]:"/"}let A=function(e,t="/"){let{pathname:n,search:r="",hash:i=""}="string"==typeof e?Qm(e):e,a=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)}),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:a,search:Xm(r),hash:Ym(i)}}(i,a),l=s&&"/"!==s&&s.endsWith("/"),c=(o||"."===s)&&n.endsWith("/");return A.pathname.endsWith("/")||!l&&!c||(A.pathname+="/"),A}var Gm=e=>e.join("/").replace(/\/\/+/g,"/"),qm=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Xm=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",Ym=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";var Jm=["POST","PUT","PATCH","DELETE"];new Set(Jm);var Zm=["GET",...Jm];new Set(Zm);var eg=De.createContext(null);eg.displayName="DataRouter";var tg=De.createContext(null);tg.displayName="DataRouterState",De.createContext(!1);var ng=De.createContext({isTransitioning:!1});ng.displayName="ViewTransition",De.createContext(new Map).displayName="Fetchers",De.createContext(null).displayName="Await";var rg=De.createContext(null);rg.displayName="Navigation";var ig=De.createContext(null);ig.displayName="Location";var ag=De.createContext({outlet:null,matches:[],isDataRoute:!1});ag.displayName="Route";var og=De.createContext(null);function sg(){return null!=De.useContext(ig)}function Ag(){return Em(sg(),"useLocation() may be used only in the context of a <Router> component."),De.useContext(ig).location}og.displayName="RouteError";var lg="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function cg(e){De.useContext(rg).static||De.useLayoutEffect(e)}function ug(){let{isDataRoute:e}=De.useContext(ag);return e?function(){let{router:e}=function(e){let t=De.useContext(eg);return Em(t,vg(e)),t}("useNavigate"),t=wg("useNavigate"),n=De.useRef(!1);return cg(()=>{n.current=!0}),De.useCallback(async(r,i={})=>{km(n.current,lg),n.current&&("number"==typeof r?e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}():function(){Em(sg(),"useNavigate() may be used only in the context of a <Router> component.");let e=De.useContext(eg),{basename:t,navigator:n}=De.useContext(rg),{matches:r}=De.useContext(ag),{pathname:i}=Ag(),a=JSON.stringify($m(r)),o=De.useRef(!1);return cg(()=>{o.current=!0}),De.useCallback((r,s={})=>{if(km(o.current,lg),!o.current)return;if("number"==typeof r)return void n.go(r);let A=Wm(r,JSON.parse(a),i,"path"===s.relative);null==e&&"/"!==t&&(A.pathname="/"===A.pathname?t:Gm([t,A.pathname])),(s.replace?n.replace:n.push)(A,s.state,s)},[t,n,a,i,e])}()}function dg(){let{matches:e}=De.useContext(ag),t=e[e.length-1];return t?t.params:{}}function hg(e,{relative:t}={}){let{matches:n}=De.useContext(ag),{pathname:r}=Ag(),i=JSON.stringify($m(n));return De.useMemo(()=>Wm(e,JSON.parse(i),r,"path"===t),[e,i,r,t])}function pg(e,t,n,r,i){var a;Em(sg(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=De.useContext(rg),{matches:s}=De.useContext(ag),A=s[s.length-1],l=A?A.params:{},c=A?A.pathname:"/",u=A?A.pathnameBase:"/",d=A&&A.route;{let e=d&&d.path||"";bg(c,!d||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.\n\nPlease change the parent <Route path="${e}"> to <Route path="${"/"===e?"*":`${e}/*`}">.`)}let h,p=Ag();if(t){let e="string"==typeof t?Qm(t):t;Em("/"===u||(null==(a=e.pathname)?void 0:a.startsWith(u)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${u}" but pathname "${e.pathname}" was given in the \`location\` prop.`),h=e}else h=p;let f=h.pathname||"/",m=f;if("/"!==u){let e=u.replace(/^\//,"").split("/");m="/"+f.replace(/^\//,"").split("/").slice(e.length).join("/")}let g=jm(e,{pathname:m});km(d||null!=g,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),km(null==g||void 0!==g[g.length-1].route.element||void 0!==g[g.length-1].route.Component||void 0!==g[g.length-1].route.lazy,`Matched leaf route at location "${h.pathname}${h.search}${h.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let y=function(e,t=[],n=null,r=null){if(null==e){if(!n)return null;if(n.errors)e=n.matches;else{if(0!==t.length||n.initialized||!(n.matches.length>0))return null;e=n.matches}}let i=e,a=null==n?void 0:n.errors;if(null!=a){let e=i.findIndex(e=>e.route.id&&void 0!==(null==a?void 0:a[e.route.id]));Em(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(",")}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n)for(let A=0;A<i.length;A++){let e=i[A];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(s=A),e.route.id){let{loaderData:t,errors:r}=n,a=e.route.loader&&!t.hasOwnProperty(e.route.id)&&(!r||void 0===r[e.route.id]);if(e.route.lazy||a){o=!0,i=s>=0?i.slice(0,s+1):[i[0]];break}}}return i.reduceRight((e,A,l)=>{let c,u=!1,d=null,h=null;n&&(c=a&&A.route.id?a[A.route.id]:void 0,d=A.route.errorElement||mg,o&&(s<0&&0===l?(bg("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),u=!0,h=null):s===l&&(u=!0,h=A.route.hydrateFallbackElement||null)));let p=t.concat(i.slice(0,l+1)),f=()=>{let t;return t=c?d:u?h:A.route.Component?De.createElement(A.route.Component,null):A.route.element?A.route.element:e,De.createElement(yg,{match:A,routeContext:{outlet:e,matches:p,isDataRoute:null!=n},children:t})};return n&&(A.route.ErrorBoundary||A.route.errorElement||0===l)?De.createElement(gg,{location:n.location,revalidation:n.revalidation,component:d,error:c,children:f(),routeContext:{outlet:null,matches:p,isDataRoute:!0},unstable_onError:r}):f()},null)}(g&&g.map(e=>Object.assign({},e,{params:Object.assign({},l,e.params),pathname:Gm([u,o.encodeLocation?o.encodeLocation(e.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?u:Gm([u,o.encodeLocation?o.encodeLocation(e.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathnameBase])})),s,n,r,i);return t&&y?De.createElement(ig.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...h},navigationType:"POP"}},y):y}function fg(){let e=function(){var e;let t=De.useContext(og),n=function(e){let t=De.useContext(tg);return Em(t,vg(e)),t}("useRouteError"),r=wg("useRouteError");if(void 0!==t)return t;return null==(e=n.errors)?void 0:e[r]}(),t=function(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},a={padding:"2px 4px",backgroundColor:r},o=null;return console.error("Error handled by React Router default ErrorBoundary:",e),o=De.createElement(De.Fragment,null,De.createElement("p",null,"💿 Hey developer 👋"),De.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",De.createElement("code",{style:a},"ErrorBoundary")," or"," ",De.createElement("code",{style:a},"errorElement")," prop on your route.")),De.createElement(De.Fragment,null,De.createElement("h2",null,"Unexpected Application Error!"),De.createElement("h3",{style:{fontStyle:"italic"}},t),n?De.createElement("pre",{style:i},n):null,o)}De.createContext(null);var mg=De.createElement(fg,null),gg=class extends De.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.unstable_onError?this.props.unstable_onError(e,t):console.error("React Router caught the following error during render",e)}render(){return void 0!==this.state.error?De.createElement(ag.Provider,{value:this.props.routeContext},De.createElement(og.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function yg({routeContext:e,match:t,children:n}){let r=De.useContext(eg);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),De.createElement(ag.Provider,{value:e},n)}function vg(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function wg(e){let t=function(e){let t=De.useContext(ag);return Em(t,vg(e)),t}(e),n=t.matches[t.matches.length-1];return Em(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}var xg={};function bg(e,t,n){t||xg[e]||(xg[e]=!0,km(!1,n))}function Bg({basename:e,children:t,initialEntries:n,initialIndex:r}){let i=De.useRef();null==i.current&&(i.current=Cm({initialEntries:n,initialIndex:r,v5Compat:!0}));let a=i.current,[o,s]=De.useState({action:a.action,location:a.location}),A=De.useCallback(e=>{De.startTransition(()=>s(e))},[s]);return De.useLayoutEffect(()=>a.listen(A),[a,A]),De.createElement(kg,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a})}function Cg({to:e,replace:t,state:n,relative:r}){Em(sg(),"<Navigate> may be used only in the context of a <Router> component.");let{static:i}=De.useContext(rg);km(!i,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:a}=De.useContext(ag),{pathname:o}=Ag(),s=ug(),A=Wm(e,$m(a),o,"path"===r),l=JSON.stringify(A);return De.useEffect(()=>{s(JSON.parse(l),{replace:t,state:n,relative:r})},[s,l,r,t,n]),null}function Eg(e){Em(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function kg({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:i,static:a=!1}){Em(!sg(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let o=e.replace(/^\/*/,"/"),s=De.useMemo(()=>({basename:o,navigator:i,static:a,future:{}}),[o,i,a]);"string"==typeof n&&(n=Qm(n));let{pathname:A="/",search:l="",hash:c="",state:u=null,key:d="default"}=n,h=De.useMemo(()=>{let e=zm(A,o);return null==e?null:{location:{pathname:e,search:l,hash:c,state:u,key:d},navigationType:r}},[o,A,l,c,u,d,r]);return km(null!=h,`<Router basename="${o}"> is not able to match the URL "${A}${l}${c}" because it does not start with the basename, so the <Router> won't render anything.`),null==h?null:De.createElement(rg.Provider,{value:s},De.createElement(ig.Provider,{children:t,value:h}))}function Sg({children:e,location:t}){return pg(Fg(e),t)}function Fg(e,t=[]){let n=[];return De.Children.forEach(e,(e,r)=>{if(!De.isValidElement(e))return;let i=[...t,r];if(e.type===De.Fragment)return void n.push.apply(n,Fg(e.props.children,i));Em(e.type===Eg,`[${"string"==typeof e.type?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Em(!e.props.index||!e.props.children,"An index route cannot have child routes.");let a={id:e.props.id||i.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:!0===e.props.hasErrorBoundary||null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=Fg(e.props.children,i)),n.push(a)}),n}De.memo(function({routes:e,future:t,state:n,unstable_onError:r}){return pg(e,void 0,n,r,t)});var Qg="get",jg="application/x-www-form-urlencoded";function Ug(e){return null!=e&&"string"==typeof e.tagName}function Og(e=""){return new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}var Ng=null;var Ig=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Tg(e){return null==e||Ig.has(e)?e:(km(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${jg}"`),null)}function Pg(e,t){let n,r,i,a,o;if(Ug(s=e)&&"form"===s.tagName.toLowerCase()){let o=e.getAttribute("action");r=o?zm(o,t):null,n=e.getAttribute("method")||Qg,i=Tg(e.getAttribute("enctype"))||jg,a=new FormData(e)}else if(function(e){return Ug(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return Ug(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let o=e.form;if(null==o)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||o.getAttribute("action");if(r=s?zm(s,t):null,n=e.getAttribute("formmethod")||o.getAttribute("method")||Qg,i=Tg(e.getAttribute("formenctype"))||Tg(o.getAttribute("enctype"))||jg,a=new FormData(o,e),!function(){if(null===Ng)try{new FormData(document.createElement("form"),0),Ng=!1}catch(qX){Ng=!0}return Ng}()){let{name:t,type:n,value:r}=e;if("image"===n){let e=t?`${t}.`:"";a.append(`${e}x`,"0"),a.append(`${e}y`,"0")}else t&&a.append(t,r)}}else{if(Ug(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Qg,r=null,i=jg,o=e}var s;return a&&"text/plain"===i&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}function Mg(e,t){if(!1===e||null==e)throw new Error(t)}function Dg(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}async function Lg(e,t,n){return function(e,t){let n=new Set;return new Set(t),e.reduce((e,t)=>{let r=JSON.stringify(function(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}(t));return n.has(r)||(n.add(r),e.push({key:r,link:t})),e},[])}((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await async function(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(Dg).filter(e=>"stylesheet"===e.rel||"preload"===e.rel).map(e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"}))}function Hg(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>{var r;return n[t].pathname!==e.pathname||(null==(r=n[t].route.path)?void 0:r.endsWith("*"))&&n[t].params["*"]!==e.params["*"]};return"assets"===a?t.filter((e,t)=>o(e,t)||s(e,t)):"data"===a?t.filter((t,a)=>{var A;let l=r.routes[t.route.id];if(!l||!l.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:(null==(A=n[0])?void 0:A.params)||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof r)return r}return!0}):[]}function _g(e,t,{includeHydrateFallback:n}={}){return r=e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1),[...new Set(r)];var r}function Rg(){let e=De.useContext(eg);return Mg(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Kg=De.createContext(void 0);function zg(){let e=De.useContext(Kg);return Mg(e,"You must render this element inside a <HydratedRouter> element"),e}function Vg(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function $g({page:e,...t}){let{router:n}=Rg(),r=De.useMemo(()=>jm(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?De.createElement(Wg,{page:e,matches:r,...t}):null}function Wg({page:e,matches:t,...n}){let r=Ag(),{manifest:i,routeModules:a}=zg(),{basename:o}=Rg(),{loaderData:s,matches:A}=function(){let e=De.useContext(tg);return Mg(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}(),l=De.useMemo(()=>Hg(e,t,A,i,r,"data"),[e,t,A,i,r]),c=De.useMemo(()=>Hg(e,t,A,i,r,"assets"),[e,t,A,i,r]),u=De.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,A=!1;if(t.forEach(e=>{var t;let r=i.routes[e.route.id];r&&r.hasLoader&&(!l.some(t=>t.route.id===e.route.id)&&e.route.id in s&&(null==(t=a[e.route.id])?void 0:t.shouldRevalidate)||r.hasClientLoader?A=!0:n.add(e.route.id))}),0===n.size)return[];let c=function(e,t,n){let r="string"==typeof e?new URL(e,"undefined"==typeof window?"server://singlefetch/":window.location.origin):e;return"/"===r.pathname?r.pathname=`_root.${n}`:t&&"/"===zm(r.pathname,t)?r.pathname=`${t.replace(/\/$/,"")}/_root.${n}`:r.pathname=`${r.pathname.replace(/\/$/,"")}.${n}`,r}(e,o,"data");return A&&n.size>0&&c.searchParams.set("_routes",t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(",")),[c.pathname+c.search]},[o,s,r,i,l,t,e,a]),d=De.useMemo(()=>_g(c,i),[c,i]),h=function(e){let{manifest:t,routeModules:n}=zg(),[r,i]=De.useState([]);return De.useEffect(()=>{let r=!1;return Lg(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}(c);return De.createElement(De.Fragment,null,u.map(e=>De.createElement("link",{key:e,rel:"prefetch",as:"fetch",href:e,...n})),d.map(e=>De.createElement("link",{key:e,rel:"modulepreload",href:e,...n})),h.map(({key:e,link:t})=>De.createElement("link",{key:e,nonce:n.nonce,...t})))}function Gg(...e){return t=>{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}}Kg.displayName="FrameworkContext";var qg="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{qg&&(window.__reactRouterVersion="7.9.4")}catch(qX){}var Xg=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Yg=De.forwardRef(function({onClick:e,discover:t="render",prefetch:n="none",relative:r,reloadDocument:i,replace:a,state:o,target:s,to:A,preventScrollReset:l,viewTransition:c,...u},d){let h,{basename:p}=De.useContext(rg),f="string"==typeof A&&Xg.test(A),m=!1;if("string"==typeof A&&f&&(h=A,qg))try{let e=new URL(window.location.href),t=A.startsWith("//")?new URL(e.protocol+A):new URL(A),n=zm(t.pathname,p);t.origin===e.origin&&null!=n?A=n+t.search+t.hash:m=!0}catch(qX){km(!1,`<Link to="${A}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let g=function(e,{relative:t}={}){Em(sg(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=De.useContext(rg),{hash:i,pathname:a,search:o}=hg(e,{relative:t}),s=a;return"/"!==n&&(s="/"===a?n:Gm([n,a])),r.createHref({pathname:s,search:o,hash:i})}(A,{relative:r}),[y,v,w]=function(e,t){let n=De.useContext(Kg),[r,i]=De.useState(!1),[a,o]=De.useState(!1),{onFocus:s,onBlur:A,onMouseEnter:l,onMouseLeave:c,onTouchStart:u}=t,d=De.useRef(null);De.useEffect(()=>{if("render"===e&&o(!0),"viewport"===e){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return d.current&&e.observe(d.current),()=>{e.disconnect()}}},[e]),De.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let h=()=>{i(!0)},p=()=>{i(!1),o(!1)};return n?"intent"!==e?[a,d,{}]:[a,d,{onFocus:Vg(s,h),onBlur:Vg(A,p),onMouseEnter:Vg(l,h),onMouseLeave:Vg(c,p),onTouchStart:Vg(u,h)}]:[!1,d,{}]}(n,u),x=function(e,{target:t,replace:n,state:r,preventScrollReset:i,relative:a,viewTransition:o}={}){let s=ug(),A=Ag(),l=hg(e,{relative:a});return De.useCallback(c=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(c,t)){c.preventDefault();let t=void 0!==n?n:Fm(A)===Fm(l);s(e,{replace:t,state:r,preventScrollReset:i,relative:a,viewTransition:o})}},[A,s,l,n,r,t,e,i,a,o])}(A,{replace:a,state:o,target:s,preventScrollReset:l,relative:r,viewTransition:c});let b=De.createElement("a",{...u,...w,href:h||g,onClick:m||i?e:function(t){e&&e(t),t.defaultPrevented||x(t)},ref:Gg(d,v),target:s,"data-discover":f||"render"!==t?void 0:"true"});return y&&!f?De.createElement(De.Fragment,null,b,De.createElement($g,{page:g})):b});Yg.displayName="Link";var Jg=De.forwardRef(function({"aria-current":e="page",caseSensitive:t=!1,className:n="",end:r=!1,style:i,to:a,viewTransition:o,children:s,...A},l){let c=hg(a,{relative:A.relative}),u=Ag(),d=De.useContext(tg),{navigator:h,basename:p}=De.useContext(rg),f=null!=d&&function(e,{relative:t}={}){let n=De.useContext(ng);Em(null!=n,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Zg("useViewTransitionState"),i=hg(e,{relative:t});if(!n.isTransitioning)return!1;let a=zm(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=zm(n.nextLocation.pathname,r)||n.nextLocation.pathname;return null!=Rm(i.pathname,o)||null!=Rm(i.pathname,a)}(c)&&!0===o,m=h.encodeLocation?h.encodeLocation(c).pathname:c.pathname,g=u.pathname,y=d&&d.navigation&&d.navigation.location?d.navigation.location.pathname:null;t||(g=g.toLowerCase(),y=y?y.toLowerCase():null,m=m.toLowerCase()),y&&p&&(y=zm(y,p)||y);const v="/"!==m&&m.endsWith("/")?m.length-1:m.length;let w,x=g===m||!r&&g.startsWith(m)&&"/"===g.charAt(v),b=null!=y&&(y===m||!r&&y.startsWith(m)&&"/"===y.charAt(m.length)),B={isActive:x,isPending:b,isTransitioning:f},C=x?e:void 0;w="function"==typeof n?n(B):[n,x?"active":null,b?"pending":null,f?"transitioning":null].filter(Boolean).join(" ");let E="function"==typeof i?i(B):i;return De.createElement(Yg,{...A,"aria-current":C,className:w,ref:l,style:E,to:a,viewTransition:o},"function"==typeof s?s(B):s)});function Zg(e){let t=De.useContext(eg);return Em(t,function(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}(e)),t}function ey(e){km("undefined"!=typeof URLSearchParams,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=De.useRef(Og(e)),n=De.useRef(!1),r=Ag(),i=De.useMemo(()=>function(e,t){let n=Og(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}(r.search,n.current?null:t.current),[r.search]),a=ug(),o=De.useCallback((e,t)=>{const r=Og("function"==typeof e?e(new URLSearchParams(i)):e);n.current=!0,a("?"+r,t)},[a,i]);return[i,o]}Jg.displayName="NavLink",De.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=Qg,action:s,onSubmit:A,relative:l,preventScrollReset:c,viewTransition:u,...d},h)=>{let p=function(){let{router:e}=Zg("useSubmit"),{basename:t}=De.useContext(rg),n=wg("useRouteId");return De.useCallback(async(r,i={})=>{let{action:a,method:o,encType:s,formData:A,body:l}=Pg(r,t);if(!1===i.navigate){let t=i.fetcherKey||ny();await e.fetch(t,n,i.action||a,{preventScrollReset:i.preventScrollReset,formData:A,body:l,formMethod:i.method||o,formEncType:i.encType||s,flushSync:i.flushSync})}else await e.navigate(i.action||a,{preventScrollReset:i.preventScrollReset,formData:A,body:l,formMethod:i.method||o,formEncType:i.encType||s,replace:i.replace,state:i.state,fromRouteId:n,flushSync:i.flushSync,viewTransition:i.viewTransition})},[e,t,n])}(),f=function(e,{relative:t}={}){let{basename:n}=De.useContext(rg),r=De.useContext(ag);Em(r,"useFormAction must be used inside a RouteContext");let[i]=r.matches.slice(-1),a={...hg(e||".",{relative:t})},o=Ag();if(null==e){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll("index");if(t.some(e=>""===e)){e.delete("index"),t.filter(e=>e).forEach(t=>e.append("index",t));let n=e.toString();a.search=n?`?${n}`:""}}e&&"."!==e||!i.route.index||(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index");"/"!==n&&(a.pathname="/"===a.pathname?n:Gm([n,a.pathname]));return Fm(a)}(s,{relative:l}),m="get"===o.toLowerCase()?"get":"post",g="string"==typeof s&&Xg.test(s);return De.createElement("form",{ref:h,method:m,action:f,onSubmit:r?A:e=>{if(A&&A(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=(null==r?void 0:r.getAttribute("formmethod"))||o;p(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:c,viewTransition:u})},...d,"data-discover":g||"render"!==e?void 0:"true"})}).displayName="Form";var ty=0,ny=()=>`__${String(++ty)}__`;function ry(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}const iy=Array(12).fill(0),ay=({visible:e,className:t})=>Te.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},Te.createElement("div",{className:"sonner-spinner"},iy.map((e,t)=>Te.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${t}`})))),oy=Te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},Te.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),sy=Te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},Te.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Ay=Te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},Te.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),ly=Te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},Te.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),cy=Te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},Te.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),Te.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}));let uy=1;const dy=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{const t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;const{message:n,...r}=e,i="number"==typeof(null==e?void 0:e.id)||(null==(t=e.id)?void 0:t.length)>0?e.id:uy++,a=this.toasts.find(e=>e.id===i),o=void 0===e.dismissible||e.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),a?this.toasts=this.toasts.map(t=>t.id===i?(this.publish({...t,...e,id:i,title:n}),{...t,...e,id:i,dismissible:o,title:n}):t):this.addToast({title:n,...r,dismissible:o,id:i}),i},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;void 0!==t.loading&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:"function"!=typeof t.description?t.description:void 0}));const r=Promise.resolve(e instanceof Function?e():e);let i,a=void 0!==n;const o=r.then(async e=>{i=["resolve",e];if(Te.isValidElement(e))a=!1,this.create({id:n,type:"default",message:e});else if(hy(e)&&!e.ok){a=!1;const r="function"==typeof t.error?await t.error(`HTTP error! status: ${e.status}`):t.error,i="function"==typeof t.description?await t.description(`HTTP error! status: ${e.status}`):t.description,o="object"==typeof r&&!Te.isValidElement(r)?r:{message:r};this.create({id:n,type:"error",description:i,...o})}else if(e instanceof Error){a=!1;const r="function"==typeof t.error?await t.error(e):t.error,i="function"==typeof t.description?await t.description(e):t.description,o="object"==typeof r&&!Te.isValidElement(r)?r:{message:r};this.create({id:n,type:"error",description:i,...o})}else if(void 0!==t.success){a=!1;const r="function"==typeof t.success?await t.success(e):t.success,i="function"==typeof t.description?await t.description(e):t.description,o="object"==typeof r&&!Te.isValidElement(r)?r:{message:r};this.create({id:n,type:"success",description:i,...o})}}).catch(async e=>{if(i=["reject",e],void 0!==t.error){a=!1;const r="function"==typeof t.error?await t.error(e):t.error,i="function"==typeof t.description?await t.description(e):t.description,o="object"==typeof r&&!Te.isValidElement(r)?r:{message:r};this.create({id:n,type:"error",description:i,...o})}}).finally(()=>{a&&(this.dismiss(n),n=void 0),null==t.finally||t.finally.call(t)}),s=()=>new Promise((e,t)=>o.then(()=>"reject"===i[0]?t(i[1]):e(i[1])).catch(t));return"string"!=typeof n&&"number"!=typeof n?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{const n=(null==t?void 0:t.id)||uy++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},hy=e=>e&&"object"==typeof e&&"ok"in e&&"boolean"==typeof e.ok&&"status"in e&&"number"==typeof e.status,py=(e,t)=>{const n=(null==t?void 0:t.id)||uy++;return dy.addToast({title:e,...t,id:n}),n},fy=Object.assign(py,{success:dy.success,info:dy.info,warning:dy.warning,error:dy.error,custom:dy.custom,message:dy.message,promise:dy.promise,dismiss:dy.dismiss,loading:dy.loading},{getHistory:()=>dy.toasts,getToasts:()=>dy.getActiveToasts()});function my(e){return void 0!==e.label}!function(e){if("undefined"==typeof document)return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");const gy=3,yy=14;function vy(...e){return e.filter(Boolean).join(" ")}const wy=e=>{var t,n,r,i,a,o,s,A,l;const{invert:c,toast:u,unstyled:d,interacting:h,setHeights:p,visibleToasts:f,heights:m,index:g,toasts:y,expanded:v,removeToast:w,defaultRichColors:x,closeButton:b,style:B,cancelButtonStyle:C,actionButtonStyle:E,className:k="",descriptionClassName:S="",duration:F,position:Q,gap:j,expandByDefault:U,classNames:O,icons:N,closeButtonAriaLabel:I="Close toast"}=e,[T,P]=Te.useState(null),[M,D]=Te.useState(null),[L,H]=Te.useState(!1),[_,R]=Te.useState(!1),[K,z]=Te.useState(!1),[V,$]=Te.useState(!1),[W,G]=Te.useState(!1),[q,X]=Te.useState(0),[Y,J]=Te.useState(0),Z=Te.useRef(u.duration||F||4e3),ee=Te.useRef(null),te=Te.useRef(null),ne=0===g,re=g+1<=f,ie=u.type,ae=!1!==u.dismissible,oe=u.className||"",se=u.descriptionClassName||"",Ae=Te.useMemo(()=>m.findIndex(e=>e.toastId===u.id)||0,[m,u.id]),le=Te.useMemo(()=>{var e;return null!=(e=u.closeButton)?e:b},[u.closeButton,b]),ce=Te.useMemo(()=>u.duration||F||4e3,[u.duration,F]),ue=Te.useRef(0),de=Te.useRef(0),he=Te.useRef(0),pe=Te.useRef(null),[fe,me]=Q.split("-"),ge=Te.useMemo(()=>m.reduce((e,t,n)=>n>=Ae?e:e+t.height,0),[m,Ae]),ye=(()=>{const[e,t]=Te.useState(document.hidden);return Te.useEffect(()=>{const e=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",e),()=>window.removeEventListener("visibilitychange",e)},[]),e})(),ve=u.invert||c,we="loading"===ie;de.current=Te.useMemo(()=>Ae*j+ge,[Ae,ge]),Te.useEffect(()=>{Z.current=ce},[ce]),Te.useEffect(()=>{H(!0)},[]),Te.useEffect(()=>{const e=te.current;if(e){const t=e.getBoundingClientRect().height;return J(t),p(e=>[{toastId:u.id,height:t,position:u.position},...e]),()=>p(e=>e.filter(e=>e.toastId!==u.id))}},[p,u.id]),Te.useLayoutEffect(()=>{if(!L)return;const e=te.current,t=e.style.height;e.style.height="auto";const n=e.getBoundingClientRect().height;e.style.height=t,J(n),p(e=>e.find(e=>e.toastId===u.id)?e.map(e=>e.toastId===u.id?{...e,height:n}:e):[{toastId:u.id,height:n,position:u.position},...e])},[L,u.title,u.description,p,u.id,u.jsx,u.action,u.cancel]);const xe=Te.useCallback(()=>{R(!0),X(de.current),p(e=>e.filter(e=>e.toastId!==u.id)),setTimeout(()=>{w(u)},200)},[u,w,p,de]);Te.useEffect(()=>{if(u.promise&&"loading"===ie||u.duration===1/0||"loading"===u.type)return;let e;return v||h||ye?(()=>{if(he.current<ue.current){const e=(new Date).getTime()-ue.current;Z.current=Z.current-e}he.current=(new Date).getTime()})():Z.current!==1/0&&(ue.current=(new Date).getTime(),e=setTimeout(()=>{null==u.onAutoClose||u.onAutoClose.call(u,u),xe()},Z.current)),()=>clearTimeout(e)},[v,h,u,ie,ye,xe]),Te.useEffect(()=>{u.delete&&(xe(),null==u.onDismiss||u.onDismiss.call(u,u))},[xe,u.delete]);const be=u.icon||(null==N?void 0:N[ie])||(e=>{switch(e){case"success":return oy;case"info":return Ay;case"warning":return sy;case"error":return ly;default:return null}})(ie);var Be,Ce,Ee,ke;return Te.createElement("li",{tabIndex:0,ref:te,className:vy(k,oe,null==O?void 0:O.toast,null==u||null==(t=u.classNames)?void 0:t.toast,null==O?void 0:O.default,null==O?void 0:O[ie],null==u||null==(n=u.classNames)?void 0:n[ie]),"data-sonner-toast":"","data-rich-colors":null!=(Be=u.richColors)?Be:x,"data-styled":!Boolean(u.jsx||u.unstyled||d),"data-mounted":L,"data-promise":Boolean(u.promise),"data-swiped":W,"data-removed":_,"data-visible":re,"data-y-position":fe,"data-x-position":me,"data-index":g,"data-front":ne,"data-swiping":K,"data-dismissible":ae,"data-type":ie,"data-invert":ve,"data-swipe-out":V,"data-swipe-direction":M,"data-expanded":Boolean(v||U&&L),"data-testid":u.testId,style:{"--index":g,"--toasts-before":g,"--z-index":y.length-g,"--offset":`${_?q:de.current}px`,"--initial-height":U?"auto":`${Y}px`,...B,...u.style},onDragEnd:()=>{z(!1),P(null),pe.current=null},onPointerDown:e=>{2!==e.button&&!we&&ae&&(ee.current=new Date,X(de.current),e.target.setPointerCapture(e.pointerId),"BUTTON"!==e.target.tagName&&(z(!0),pe.current={x:e.clientX,y:e.clientY}))},onPointerUp:()=>{var e,t,n;if(V||!ae)return;pe.current=null;const r=Number((null==(e=te.current)?void 0:e.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),i=Number((null==(t=te.current)?void 0:t.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),a=(new Date).getTime()-(null==(n=ee.current)?void 0:n.getTime()),o="x"===T?r:i,s=Math.abs(o)/a;if(Math.abs(o)>=45||s>.11)return X(de.current),null==u.onDismiss||u.onDismiss.call(u,u),D("x"===T?r>0?"right":"left":i>0?"down":"up"),xe(),void $(!0);var A,l;null==(A=te.current)||A.style.setProperty("--swipe-amount-x","0px"),null==(l=te.current)||l.style.setProperty("--swipe-amount-y","0px"),G(!1),z(!1),P(null)},onPointerMove:t=>{var n,r,i;if(!pe.current||!ae)return;if((null==(n=window.getSelection())?void 0:n.toString().length)>0)return;const a=t.clientY-pe.current.y,o=t.clientX-pe.current.x;var s;const A=null!=(s=e.swipeDirections)?s:function(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}(Q);!T&&(Math.abs(o)>1||Math.abs(a)>1)&&P(Math.abs(o)>Math.abs(a)?"x":"y");let l={x:0,y:0};const c=e=>1/(1.5+Math.abs(e)/20);if("y"===T){if(A.includes("top")||A.includes("bottom"))if(A.includes("top")&&a<0||A.includes("bottom")&&a>0)l.y=a;else{const e=a*c(a);l.y=Math.abs(e)<Math.abs(a)?e:a}}else if("x"===T&&(A.includes("left")||A.includes("right")))if(A.includes("left")&&o<0||A.includes("right")&&o>0)l.x=o;else{const e=o*c(o);l.x=Math.abs(e)<Math.abs(o)?e:o}(Math.abs(l.x)>0||Math.abs(l.y)>0)&&G(!0),null==(r=te.current)||r.style.setProperty("--swipe-amount-x",`${l.x}px`),null==(i=te.current)||i.style.setProperty("--swipe-amount-y",`${l.y}px`)}},le&&!u.jsx&&"loading"!==ie?Te.createElement("button",{"aria-label":I,"data-disabled":we,"data-close-button":!0,onClick:we||!ae?()=>{}:()=>{xe(),null==u.onDismiss||u.onDismiss.call(u,u)},className:vy(null==O?void 0:O.closeButton,null==u||null==(r=u.classNames)?void 0:r.closeButton)},null!=(Ce=null==N?void 0:N.close)?Ce:cy):null,(ie||u.icon||u.promise)&&null!==u.icon&&(null!==(null==N?void 0:N[ie])||u.icon)?Te.createElement("div",{"data-icon":"",className:vy(null==O?void 0:O.icon,null==u||null==(i=u.classNames)?void 0:i.icon)},u.promise||"loading"===u.type&&!u.icon?u.icon||((null==N?void 0:N.loading)?Te.createElement("div",{className:vy(null==O?void 0:O.loader,null==u||null==(ke=u.classNames)?void 0:ke.loader,"sonner-loader"),"data-visible":"loading"===ie},N.loading):Te.createElement(ay,{className:vy(null==O?void 0:O.loader,null==u||null==(Ee=u.classNames)?void 0:Ee.loader),visible:"loading"===ie})):null,"loading"!==u.type?be:null):null,Te.createElement("div",{"data-content":"",className:vy(null==O?void 0:O.content,null==u||null==(a=u.classNames)?void 0:a.content)},Te.createElement("div",{"data-title":"",className:vy(null==O?void 0:O.title,null==u||null==(o=u.classNames)?void 0:o.title)},u.jsx?u.jsx:"function"==typeof u.title?u.title():u.title),u.description?Te.createElement("div",{"data-description":"",className:vy(S,se,null==O?void 0:O.description,null==u||null==(s=u.classNames)?void 0:s.description)},"function"==typeof u.description?u.description():u.description):null),Te.isValidElement(u.cancel)?u.cancel:u.cancel&&my(u.cancel)?Te.createElement("button",{"data-button":!0,"data-cancel":!0,style:u.cancelButtonStyle||C,onClick:e=>{my(u.cancel)&&ae&&(null==u.cancel.onClick||u.cancel.onClick.call(u.cancel,e),xe())},className:vy(null==O?void 0:O.cancelButton,null==u||null==(A=u.classNames)?void 0:A.cancelButton)},u.cancel.label):null,Te.isValidElement(u.action)?u.action:u.action&&my(u.action)?Te.createElement("button",{"data-button":!0,"data-action":!0,style:u.actionButtonStyle||E,onClick:e=>{my(u.action)&&(null==u.action.onClick||u.action.onClick.call(u.action,e),e.defaultPrevented||xe())},className:vy(null==O?void 0:O.actionButton,null==u||null==(l=u.classNames)?void 0:l.actionButton)},u.action.label):null)};function xy(){if("undefined"==typeof window)return"ltr";if("undefined"==typeof document)return"ltr";const e=document.documentElement.getAttribute("dir");return"auto"!==e&&e?e:window.getComputedStyle(document.documentElement).direction}function by(e,t){const n={};return[e,t].forEach((e,t)=>{const r=1===t,i=r?"--mobile-offset":"--offset",a=r?"16px":"24px";function o(e){["top","right","bottom","left"].forEach(t=>{n[`${i}-${t}`]="number"==typeof e?`${e}px`:e})}"number"==typeof e||"string"==typeof e?o(e):"object"==typeof e?["top","right","bottom","left"].forEach(t=>{void 0===e[t]?n[`${i}-${t}`]=a:n[`${i}-${t}`]="number"==typeof e[t]?`${e[t]}px`:e[t]}):o(a)}),n}const By=Te.forwardRef(function(e,t){const{id:n,invert:r,position:i="bottom-right",hotkey:a=["altKey","KeyT"],expand:o,closeButton:s,className:A,offset:l,mobileOffset:c,theme:u="light",richColors:d,duration:h,style:p,visibleToasts:f=gy,toastOptions:m,dir:g=xy(),gap:y=yy,icons:v,containerAriaLabel:w="Notifications"}=e,[x,b]=Te.useState([]),B=Te.useMemo(()=>n?x.filter(e=>e.toasterId===n):x.filter(e=>!e.toasterId),[x,n]),C=Te.useMemo(()=>Array.from(new Set([i].concat(B.filter(e=>e.position).map(e=>e.position)))),[B,i]),[E,k]=Te.useState([]),[S,F]=Te.useState(!1),[Q,j]=Te.useState(!1),[U,O]=Te.useState("system"!==u?u:"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),N=Te.useRef(null),I=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),T=Te.useRef(null),P=Te.useRef(!1),M=Te.useCallback(e=>{b(t=>{var n;return(null==(n=t.find(t=>t.id===e.id))?void 0:n.delete)||dy.dismiss(e.id),t.filter(({id:t})=>t!==e.id)})},[]);return Te.useEffect(()=>dy.subscribe(e=>{e.dismiss?requestAnimationFrame(()=>{b(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))}):setTimeout(()=>{Pe.flushSync(()=>{b(t=>{const n=t.findIndex(t=>t.id===e.id);return-1!==n?[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]:[e,...t]})})})}),[x]),Te.useEffect(()=>{if("system"!==u)return void O(u);if("system"===u&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?O("dark"):O("light")),"undefined"==typeof window)return;const e=window.matchMedia("(prefers-color-scheme: dark)");try{e.addEventListener("change",({matches:e})=>{O(e?"dark":"light")})}catch(t){e.addListener(({matches:e})=>{try{O(e?"dark":"light")}catch(qX){console.error(qX)}})}},[u]),Te.useEffect(()=>{x.length<=1&&F(!1)},[x]),Te.useEffect(()=>{const e=e=>{var t;var n;a.every(t=>e[t]||e.code===t)&&(F(!0),null==(n=N.current)||n.focus());"Escape"!==e.code||document.activeElement!==N.current&&!(null==(t=N.current)?void 0:t.contains(document.activeElement))||F(!1)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[a]),Te.useEffect(()=>{if(N.current)return()=>{T.current&&(T.current.focus({preventScroll:!0}),T.current=null,P.current=!1)}},[N.current]),Te.createElement("section",{ref:t,"aria-label":`${w} ${I}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},C.map((t,n)=>{var i;const[a,u]=t.split("-");return B.length?Te.createElement("ol",{key:t,dir:"auto"===g?xy():g,tabIndex:-1,ref:N,className:A,"data-sonner-toaster":!0,"data-sonner-theme":U,"data-y-position":a,"data-x-position":u,style:{"--front-toast-height":`${(null==(i=E[0])?void 0:i.height)||0}px`,"--width":"356px","--gap":`${y}px`,...p,...by(l,c)},onBlur:e=>{P.current&&!e.currentTarget.contains(e.relatedTarget)&&(P.current=!1,T.current&&(T.current.focus({preventScroll:!0}),T.current=null))},onFocus:e=>{e.target instanceof HTMLElement&&"false"===e.target.dataset.dismissible||P.current||(P.current=!0,T.current=e.relatedTarget)},onMouseEnter:()=>F(!0),onMouseMove:()=>F(!0),onMouseLeave:()=>{Q||F(!1)},onDragEnd:()=>F(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&"false"===e.target.dataset.dismissible||j(!0)},onPointerUp:()=>j(!1)},B.filter(e=>!e.position&&0===n||e.position===t).map((n,i)=>{var a,A;return Te.createElement(wy,{key:n.id,icons:v,index:i,toast:n,defaultRichColors:d,duration:null!=(a=null==m?void 0:m.duration)?a:h,className:null==m?void 0:m.className,descriptionClassName:null==m?void 0:m.descriptionClassName,invert:r,visibleToasts:f,closeButton:null!=(A=null==m?void 0:m.closeButton)?A:s,interacting:Q,position:t,style:null==m?void 0:m.style,unstyled:null==m?void 0:m.unstyled,classNames:null==m?void 0:m.classNames,cancelButtonStyle:null==m?void 0:m.cancelButtonStyle,actionButtonStyle:null==m?void 0:m.actionButtonStyle,closeButtonAriaLabel:null==m?void 0:m.closeButtonAriaLabel,removeToast:M,toasts:B.filter(e=>e.position==n.position),heights:E.filter(e=>e.position==n.position),setHeights:k,expandByDefault:o,gap:y,expanded:S,swipeDirections:e.swipeDirections})})):null}))}),Cy=De.forwardRef(({className:e,...t},n)=>Ie.jsx("div",{ref:n,className:Sp("rounded-xl border bg-card text-card-foreground shadow",e),...t}));Cy.displayName="Card";De.forwardRef(({className:e,...t},n)=>Ie.jsx("div",{ref:n,className:Sp("flex flex-col space-y-1.5 p-6",e),...t})).displayName="CardHeader";De.forwardRef(({className:e,...t},n)=>Ie.jsx("div",{ref:n,className:Sp("font-semibold leading-none tracking-tight",e),...t})).displayName="CardTitle";De.forwardRef(({className:e,...t},n)=>Ie.jsx("div",{ref:n,className:Sp("text-sm text-muted-foreground",e),...t})).displayName="CardDescription";De.forwardRef(({className:e,...t},n)=>Ie.jsx("div",{ref:n,className:Sp("p-6 pt-0",e),...t})).displayName="CardContent";De.forwardRef(({className:e,...t},n)=>Ie.jsx("div",{ref:n,className:Sp("flex items-center p-6 pt-0",e),...t})).displayName="CardFooter";const Ey=De.forwardRef(({className:e,type:t,...n},r)=>Ie.jsx("input",{type:t,className:Sp("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));Ey.displayName="Input";const ky=["Dry Van","Refrigerated","Flatbed","Step Deck","Lowboy","Tanker","Container","Other"];function Sy({onSearch:e,theme:t,isLoading:n=!1}){const[r,i]=Te.useState({origin:"Los Angeles, CA",destination:"New York, NY",pickupEarliest:(()=>{const e=new Date;return e.setDate(e.getDate()+1),e.toISOString().split("T")[0]})(),pickupHours:"09:00",dropoffHours:"17:00",equipmentType:"Dry Van",length:"53",weight:"40000",volume:"2000"}),[a,o]=Te.useState({}),{width:s,containerRef:A}=(()=>{const[e,t]=Te.useState(0),n=Te.useRef(null);return Te.useEffect(()=>{const e=()=>{n.current&&t(n.current.offsetWidth)};e();const r=new ResizeObserver(e);return n.current&&r.observe(n.current),()=>r.disconnect()},[]),{width:e,containerRef:n}})(),l=(e=>e<380?{containerPadding:"p-2",headerPadding:"p-3",formPadding:"p-3",spacing:"space-y-3",titleSize:"text-base",subtitleSize:"text-xs",iconSize:"w-5 h-5",iconSizeSmall:"h-3 w-3",labelSize:"text-xs",buttonSize:"text-xs px-3 py-2",buttonIconSize:"h-3 w-3",maxWidth:"max-w-none",gridCols:{location:"grid-cols-1",datetime:"grid-cols-1",equipment:"grid-cols-1"}}:e<450?{containerPadding:"p-3",headerPadding:"p-4",formPadding:"p-4",spacing:"space-y-4",titleSize:"text-lg",subtitleSize:"text-sm",iconSize:"w-6 h-6",iconSizeSmall:"h-3 w-3",labelSize:"text-xs",buttonSize:"text-sm px-4 py-2",buttonIconSize:"h-4 w-4",maxWidth:"max-w-none",gridCols:{location:"grid-cols-1",datetime:"grid-cols-1",equipment:"grid-cols-2"}}:e<600?{containerPadding:"p-4",headerPadding:"p-5",formPadding:"p-5",spacing:"space-y-5",titleSize:"text-xl",subtitleSize:"text-sm",iconSize:"w-8 h-8",iconSizeSmall:"h-3.5 w-3.5",labelSize:"text-sm",buttonSize:"text-sm px-6 py-2.5",buttonIconSize:"h-4 w-4",maxWidth:"max-w-2xl",gridCols:{location:"grid-cols-1",datetime:"grid-cols-1",equipment:"grid-cols-2"}}:{containerPadding:"p-6",headerPadding:"p-6",formPadding:"p-6",spacing:"space-y-6",titleSize:"text-2xl",subtitleSize:"text-base",iconSize:"w-10 h-10",iconSizeSmall:"h-4 w-4",labelSize:"text-sm",buttonSize:"px-8 py-3",buttonIconSize:"h-5 w-5",maxWidth:"max-w-4xl",gridCols:{location:"grid-cols-1 md:grid-cols-2",datetime:"grid-cols-1 md:grid-cols-3",equipment:"grid-cols-1 md:grid-cols-2 lg:grid-cols-4"}})(s),c=(e,t)=>{i(n=>({...n,[e]:t})),a[e]&&o(t=>({...t,[e]:""}))};return Ie.jsx(ch.div,{ref:A,initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:`${l.maxWidth} mx-auto ${l.containerPadding}`,children:Ie.jsxs("div",{className:"bg-white rounded-lg shadow-lg border",children:[Ie.jsxs("div",{className:`${l.headerPadding} border-b`,children:[Ie.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[Ie.jsx("div",{className:`${l.iconSize} rounded-full flex items-center justify-center`,style:{backgroundColor:t.primaryColor+"20"},children:Ie.jsx(em,{className:`${l.iconSizeSmall}`,style:{color:t.primaryColor}})}),Ie.jsx("h2",{className:`${l.titleSize} font-bold`,style:{fontFamily:t.fontFamily,color:t.primaryColor},children:"Search Carriers"})]}),Ie.jsx("p",{className:`text-gray-600 ${l.subtitleSize}`,style:{fontFamily:t.fontFamily},children:"Find the best carriers for your shipment needs"})]}),Ie.jsxs("form",{onSubmit:t=>{t.preventDefault(),(()=>{const e={};return r.origin.trim()||(e.origin="Origin is required"),r.destination.trim()||(e.destination="Destination is required"),r.pickupEarliest||(e.pickupEarliest="Pickup date is required"),r.pickupHours||(e.pickupHours="Pickup time is required"),r.dropoffHours||(e.dropoffHours="Drop-off time is required"),r.length.trim()||(e.length="Length is required"),r.weight.trim()||(e.weight="Weight is required"),o(e),0===Object.keys(e).length})()&&e(r)},className:`${l.formPadding} ${l.spacing}`,children:[Ie.jsxs("div",{className:`grid ${l.gridCols.location} gap-4`,children:[Ie.jsxs("div",{children:[Ie.jsxs("label",{className:`block ${l.labelSize} font-medium text-gray-700 mb-2`,style:{fontFamily:t.fontFamily},children:[Ie.jsx(Pf,{className:`${l.iconSizeSmall} inline mr-1`}),"Origin"]}),Ie.jsx(Ey,{value:r.origin,onChange:e=>c("origin",e.target.value),placeholder:"Enter pickup location",className:a.origin?"border-red-500":"",style:{fontFamily:t.fontFamily}}),a.origin&&Ie.jsx("p",{className:"text-red-500 text-xs mt-1",children:a.origin})]}),Ie.jsxs("div",{children:[Ie.jsxs("label",{className:`block ${l.labelSize} font-medium text-gray-700 mb-2`,style:{fontFamily:t.fontFamily},children:[Ie.jsx(Pf,{className:`${l.iconSizeSmall} inline mr-1`}),"Destination"]}),Ie.jsx(Ey,{value:r.destination,onChange:e=>c("destination",e.target.value),placeholder:"Enter delivery location",className:a.destination?"border-red-500":"",style:{fontFamily:t.fontFamily}}),a.destination&&Ie.jsx("p",{className:"text-red-500 text-xs mt-1",children:a.destination})]})]}),Ie.jsxs("div",{className:`grid ${l.gridCols.datetime} gap-4`,children:[Ie.jsxs("div",{children:[Ie.jsxs("label",{className:`block ${l.labelSize} font-medium text-gray-700 mb-2`,style:{fontFamily:t.fontFamily},children:[Ie.jsx(af,{className:`${l.iconSizeSmall} inline mr-1`}),"Pickup Earliest"]}),Ie.jsx(Ey,{type:"date",value:r.pickupEarliest,onChange:e=>c("pickupEarliest",e.target.value),className:a.pickupEarliest?"border-red-500":"",style:{fontFamily:t.fontFamily}}),a.pickupEarliest&&Ie.jsx("p",{className:"text-red-500 text-xs mt-1",children:a.pickupEarliest})]}),Ie.jsxs("div",{children:[Ie.jsxs("label",{className:`block ${l.labelSize} font-medium text-gray-700 mb-2`,style:{fontFamily:t.fontFamily},children:[Ie.jsx(yf,{className:`${l.iconSizeSmall} inline mr-1`}),"Pickup Hours"]}),Ie.jsx(Ey,{type:"time",value:r.pickupHours,onChange:e=>c("pickupHours",e.target.value),className:a.pickupHours?"border-red-500":"",style:{fontFamily:t.fontFamily}}),a.pickupHours&&Ie.jsx("p",{className:"text-red-500 text-xs mt-1",children:a.pickupHours})]}),Ie.jsxs("div",{children:[Ie.jsxs("label",{className:`block ${l.labelSize} font-medium text-gray-700 mb-2`,style:{fontFamily:t.fontFamily},children:[Ie.jsx(yf,{className:`${l.iconSizeSmall} inline mr-1`}),"Drop-off Hours"]}),Ie.jsx(Ey,{type:"time",value:r.dropoffHours,onChange:e=>c("dropoffHours",e.target.value),className:a.dropoffHours?"border-red-500":"",style:{fontFamily:t.fontFamily}}),a.dropoffHours&&Ie.jsx("p",{className:"text-red-500 text-xs mt-1",children:a.dropoffHours})]})]}),Ie.jsxs("div",{className:`grid ${l.gridCols.equipment} gap-4`,children:[Ie.jsxs("div",{children:[Ie.jsxs("label",{className:`block ${l.labelSize} font-medium text-gray-700 mb-2`,style:{fontFamily:t.fontFamily},children:[Ie.jsx(pm,{className:`${l.iconSizeSmall} inline mr-1`}),"Equipment Type"]}),Ie.jsx("select",{value:r.equipmentType,onChange:e=>c("equipmentType",e.target.value),className:`w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 ${l.labelSize}`,style:{fontFamily:t.fontFamily},children:ky.map(e=>Ie.jsx("option",{value:e,children:e},e))})]}),Ie.jsxs("div",{children:[Ie.jsxs("label",{className:`block ${l.labelSize} font-medium text-gray-700 mb-2`,style:{fontFamily:t.fontFamily},children:[Ie.jsx(Vf,{className:`${l.iconSizeSmall} inline mr-1`}),"Length (ft)"]}),Ie.jsx(Ey,{type:"number",value:r.length,onChange:e=>c("length",e.target.value),placeholder:"e.g., 48",className:a.length?"border-red-500":"",style:{fontFamily:t.fontFamily}}),a.length&&Ie.jsx("p",{className:"text-red-500 text-xs mt-1",children:a.length})]}),Ie.jsxs("div",{children:[Ie.jsxs("label",{className:`block ${l.labelSize} font-medium text-gray-700 mb-2`,style:{fontFamily:t.fontFamily},children:[Ie.jsx(gm,{className:`${l.iconSizeSmall} inline mr-1`}),"Weight (lbs)"]}),Ie.jsx(Ey,{type:"number",value:r.weight,onChange:e=>c("weight",e.target.value),placeholder:"e.g., 40000",className:a.weight?"border-red-500":"",style:{fontFamily:t.fontFamily}}),a.weight&&Ie.jsx("p",{className:"text-red-500 text-xs mt-1",children:a.weight})]}),Ie.jsxs("div",{children:[Ie.jsxs("label",{className:`block ${l.labelSize} font-medium text-gray-700 mb-2`,style:{fontFamily:t.fontFamily},children:[Ie.jsx(nf,{className:`${l.iconSizeSmall} inline mr-1`}),"Volume (cu ft)"]}),Ie.jsx(Ey,{type:"number",value:r.volume||"",onChange:e=>c("volume",e.target.value),placeholder:"e.g., 2000",className:a.volume?"border-red-500":"",style:{fontFamily:t.fontFamily}}),a.volume&&Ie.jsx("p",{className:"text-red-500 text-xs mt-1",children:a.volume})]})]}),Ie.jsx("div",{className:"flex justify-center pt-4",children:Ie.jsx(Up,{type:"submit",size:"lg",disabled:n,className:`${l.buttonSize} text-white font-semibold rounded-lg hover:opacity-90 transition-opacity disabled:opacity-50 disabled:cursor-not-allowed`,style:{backgroundColor:t.primaryColor,fontFamily:t.fontFamily},children:n?Ie.jsxs(Ie.Fragment,{children:[Ie.jsx(Nf,{className:`${l.buttonIconSize} mr-2 animate-spin`}),"Searching..."]}):Ie.jsxs(Ie.Fragment,{children:[Ie.jsx(em,{className:`${l.buttonIconSize} mr-2`}),"Search Carriers"]})})})]})]})})}const Fy=async e=>{try{const t=(e=>{const t=`${e.pickupEarliest}T${e.pickupHours}:00`,n=`${e.pickupEarliest}T${e.dropoffHours}:00`;return{origin:e.origin,destination:e.destination,cargo_type:e.equipmentType,weight:parseFloat(e.weight)||0,volume:parseFloat(e.volume||"0")||0,pickup_date:t,delivery_date:n,max_results:10}})(e);return await Vi.initiateWorkflow(t)}catch(t){throw console.error("Error initiating carrier search:",t),t}},Qy=e=>({id:e.workflow_id,title:`${e.input_params.origin} → ${e.input_params.destination}`,origin:e.input_params.origin,destination:e.input_params.destination,cargoType:e.input_params.cargo_type,weight:e.input_params.weight,volume:e.input_params.volume,pickupDate:e.input_params.pickup_date,deliveryDate:e.input_params.delivery_date,status:e.status,totalCarriers:e.total_carriers,createdAt:new Date(e.created_at),completedAt:e.completed_at?new Date(e.completed_at):null,workflowId:e.workflow_id}),jy=e=>"completed"===e,Uy=new Mt({defaultOptions:{queries:{staleTime:3e5,gcTime:6e5,retry:(e,t)=>!((null==t?void 0:t.status)>=400&&(null==t?void 0:t.status)<500)&&e<3,retryDelay:e=>Math.min(1e3*2**e,3e4),refetchOnWindowFocus:!1,refetchOnReconnect:!0,refetchOnMount:!0},mutations:{retry:(e,t)=>!((null==t?void 0:t.status)>=400&&(null==t?void 0:t.status)<500)&&e<1,retryDelay:1e3}}}),Oy={carriers:{all:()=>["carriers"],lists:()=>[...Oy.carriers.all(),"list"],list:e=>[...Oy.carriers.lists(),e],details:()=>[...Oy.carriers.all(),"detail"],detail:e=>[...Oy.carriers.details(),e],search:e=>[...Oy.carriers.all(),"search",e]}},Ny=e=>{console.error("[Query Error]",e),window.dispatchEvent(new CustomEvent("query:error",{detail:{message:e.message||"An error occurred",status:e.status||0,data:e.data||null}}))},Iy=()=>({fetchWorkflowPage:async e=>{const t=await(async(e=1,t=10)=>{try{return await Vi.getWorkflowList(e,t)}catch(n){throw console.error("Error fetching workflow list:",n),n}})(e,10);return{data:t.workflows.map(Qy),hasMore:10===t.workflows.length,total:t.total_count}}}),Ty=e=>{const t=Lt();return Vt({mutationFn:async e=>await(async e=>{try{return await Vi.deleteWorkflow(e)}catch(t){throw console.error("Error deleting workflow:",t),t}})(e),...e,onSuccess:(n,r,i,a)=>{var o;t.invalidateQueries({queryKey:["workflows"]}),null==(o=null==e?void 0:e.onSuccess)||o.call(e,n,r,i,a)},onError:(t,n,r,i)=>{var a;Ny(t),null==(a=null==e?void 0:e.onError)||a.call(e,t,n,r,i)}})},Py=(e,t)=>function(e){return zt(e,Ct)}({queryKey:["workflow-status",e],queryFn:async()=>await Vi.getWorkflowStatus(e),enabled:!!e,staleTime:3e4,...t});function My(){const{theme:e,isAuthenticated:t}=ea();ug();const n=(e=>{const t=Lt();return Vt({mutationFn:async e=>await Fy(e),...e,onSuccess:(n,r,i,a)=>{var o;t.invalidateQueries({queryKey:Oy.carriers.all()}),null==(o=null==e?void 0:e.onSuccess)||o.call(e,n,r,i,a)},onError:(t,n,r,i)=>{var a;Ny(t),null==(a=null==e?void 0:e.onError)||a.call(e,t,n,r,i)}})})({onSuccess:e=>{fy.success("Workflow Intialted Successfully!",{description:`Workflow ID: ${e.data.workflow_id} and estimated completed time: ${e.data.estimated_completion_time}`,duration:4e3})},onError:e=>{console.error("Carrier search failed:",e),fy.error("Failed to search carriers",{description:e.message||"Please check your connection and try again.",duration:5e3})}});return t?Ie.jsx("div",{className:"flex flex-col h-full",style:{fontFamily:e.fontFamily},children:Ie.jsx("div",{className:"flex-1 overflow-y-auto",children:Ie.jsx(Sy,{onSearch:e=>{const t=(e=>{var t,n,r;const i=[];return(null==(t=e.origin)?void 0:t.trim())||i.push("Origin is required"),(null==(n=e.destination)?void 0:n.trim())||i.push("Destination is required"),e.pickupEarliest||i.push("Pickup date is required"),e.pickupHours||i.push("Pickup time is required"),e.dropoffHours||i.push("Delivery time is required"),e.equipmentType||i.push("Equipment type is required"),(null==(r=e.weight)?void 0:r.trim())?isNaN(parseFloat(e.weight))?i.push("Weight must be a valid number"):parseFloat(e.weight)<=0&&i.push("Weight must be greater than 0"):i.push("Weight is required"),e.volume&&e.volume.trim()&&(isNaN(parseFloat(e.volume))?i.push("Volume must be a valid number"):parseFloat(e.volume)<0&&i.push("Volume must be 0 or greater")),i})(e);t.length>0?fy.error("Please fix the following errors:",{description:t.join(", "),duration:5e3}):n.mutate(e)},theme:e,isLoading:n.isPending})})}):Ie.jsx("div",{className:"flex-1 flex items-center justify-center p-8",children:Ie.jsx("div",{className:"text-center",children:Ie.jsx("p",{className:"text-gray-600",style:{fontFamily:e.fontFamily},children:"Please authenticate to start using the carrier search."})})})}function Dy({carrier:e,isSelected:t,onSelect:n,onCallCarrier:r,theme:i}){const{width:a,containerRef:o}=(()=>{const[e,t]=Te.useState(0),n=Te.useRef(null);return Te.useEffect(()=>{const e=()=>{n.current&&t(n.current.offsetWidth)};e();const r=new ResizeObserver(e);return n.current&&r.observe(n.current),()=>r.disconnect()},[]),{width:e,containerRef:n}})(),s=(e=>e<400?{padding:"p-3",spacing:"gap-2",titleSize:"text-base",textSize:"text-xs",priceSize:"text-lg",iconSize:"h-3 w-3",buttonSize:"text-xs px-2 py-1",buttonIconSize:"h-3 w-3",layout:"mobile",checkboxSize:"h-3 w-3",marginBottom:"mb-1"}:e<600?{padding:"p-3.5",spacing:"gap-2.5",titleSize:"text-lg",textSize:"text-sm",priceSize:"text-xl",iconSize:"h-3.5 w-3.5",buttonSize:"text-sm px-3 py-1.5",buttonIconSize:"h-3.5 w-3.5",layout:"tablet",checkboxSize:"h-3.5 w-3.5",marginBottom:"mb-1.5"}:{padding:"p-4",spacing:"gap-3",titleSize:"text-lg",textSize:"text-sm",priceSize:"text-2xl",iconSize:"h-4 w-4",buttonSize:"text-sm px-4 py-2",buttonIconSize:"h-4 w-4",layout:"desktop",checkboxSize:"h-4 w-4",marginBottom:"mb-2"})(a),A=()=>{n(e.id)},l=t=>{t.stopPropagation(),r(e.id)};return Ie.jsxs(ch.div,{ref:o,initial:{opacity:0,y:20},animate:{opacity:1,y:0},whileHover:{y:-2},className:`bg-white rounded-lg border-2 ${s.padding} cursor-pointer transition-all duration-200 ${t?"border-blue-500 shadow-lg":"border-gray-200 hover:border-gray-300 hover:shadow-md"}`,onClick:A,children:["mobile"===s.layout?Ie.jsxs("div",{className:"space-y-2",children:[Ie.jsxs("div",{className:"flex items-center justify-between",children:[Ie.jsxs("div",{className:"flex items-center gap-2",children:[Ie.jsx("input",{type:"checkbox",checked:t,onChange:A,className:`${s.checkboxSize} rounded border-gray-300 text-blue-600 focus:ring-blue-500`,style:{accentColor:i.primaryColor}}),Ie.jsx("h3",{className:`font-semibold ${s.titleSize}`,style:{fontFamily:i.fontFamily},children:e.name})]}),Ie.jsxs("div",{className:"flex items-center gap-1",children:[Ie.jsx(sm,{className:`${s.iconSize} fill-yellow-400 text-yellow-400`}),Ie.jsx("span",{className:`${s.textSize} text-gray-600`,children:e.rating.toFixed(1)})]})]}),Ie.jsxs("div",{className:"grid grid-cols-2 gap-1 text-xs",children:[Ie.jsxs("div",{className:"flex items-center gap-1",children:[Ie.jsx(Pf,{className:`${s.iconSize} text-gray-500`}),Ie.jsx("span",{className:"text-gray-600 truncate",style:{fontFamily:i.fontFamily},children:e.location||e.source||"Available"})]}),Ie.jsxs("div",{className:"flex items-center gap-1",children:[Ie.jsx(pm,{className:`${s.iconSize} text-gray-500`}),Ie.jsx("span",{className:"text-gray-600 truncate",style:{fontFamily:i.fontFamily},children:e.equipment})]})]}),(e.dotNumber||e.capacity)&&Ie.jsxs("div",{className:"grid grid-cols-2 gap-1 text-xs",children:[e.dotNumber&&Ie.jsxs("div",{className:"text-gray-600 truncate",style:{fontFamily:i.fontFamily},children:["DOT: ",e.dotNumber]}),e.capacity&&Ie.jsxs("div",{className:"text-gray-600 truncate",style:{fontFamily:i.fontFamily},children:["Fleet: ",e.capacity]})]}),(e.vettingResult||e.matchScore)&&Ie.jsxs("div",{className:"flex items-center justify-between text-xs",children:[e.vettingResult&&Ie.jsx("span",{className:"px-2 py-0.5 rounded text-xs font-medium "+("ACCEPT"===e.vettingResult?"bg-green-100 text-green-800":"REJECT"===e.vettingResult?"bg-red-100 text-red-800":"bg-yellow-100 text-yellow-800"),children:e.vettingResult}),e.matchScore&&Ie.jsxs("span",{className:"text-gray-600",style:{fontFamily:i.fontFamily},children:["Match: ",(100*e.matchScore).toFixed(0),"%"]})]}),Ie.jsxs("div",{className:"flex items-center justify-between",children:[Ie.jsxs("div",{className:"flex items-center gap-1",children:[Ie.jsx(yf,{className:`${s.iconSize} text-gray-500`}),Ie.jsx("span",{className:`${s.textSize} text-gray-600`,style:{fontFamily:i.fontFamily},children:e.responseTime||e.estimatedTime||"< 2 hours"})]}),Ie.jsxs("span",{className:`${s.priceSize} font-bold`,style:{fontFamily:i.fontFamily,color:i.primaryColor},children:["$",e.price.toLocaleString()]})]}),Ie.jsxs(Up,{onClick:l,className:`w-full ${s.buttonSize} text-white font-medium hover:opacity-90 transition-opacity`,style:{backgroundColor:i.primaryColor,fontFamily:i.fontFamily},children:[Ie.jsx($f,{className:`${s.buttonIconSize} mr-1`}),"Call Carrier"]})]}):Ie.jsxs("div",{className:"flex items-start justify-between",children:[Ie.jsxs("div",{className:`flex items-start ${s.spacing} flex-1`,children:[Ie.jsx("input",{type:"checkbox",checked:t,onChange:A,className:`mt-1 ${s.checkboxSize} rounded border-gray-300 text-blue-600 focus:ring-blue-500`,style:{accentColor:i.primaryColor}}),Ie.jsxs("div",{className:"flex-1",children:[Ie.jsxs("div",{className:`flex items-center gap-2 ${s.marginBottom}`,children:[Ie.jsx("h3",{className:`font-semibold ${s.titleSize}`,style:{fontFamily:i.fontFamily},children:e.name}),Ie.jsxs("div",{className:"flex items-center gap-1",children:[Ie.jsx(sm,{className:`${s.iconSize} fill-yellow-400 text-yellow-400`}),Ie.jsx("span",{className:`${s.textSize} text-gray-600`,children:e.rating.toFixed(1)})]})]}),Ie.jsxs("div",{className:`flex items-center gap-1 ${s.marginBottom}`,children:[Ie.jsx(Pf,{className:`${s.iconSize} text-gray-500`}),Ie.jsxs("span",{className:`${s.textSize} text-gray-600`,style:{fontFamily:i.fontFamily},children:["Source: ",e.source]})]}),Ie.jsxs("div",{className:`flex items-center gap-1 ${s.marginBottom}`,children:[Ie.jsx(pm,{className:`${s.iconSize} text-gray-500`}),Ie.jsx("span",{className:`${s.textSize} text-gray-600`,style:{fontFamily:i.fontFamily},children:e.equipment})]}),Ie.jsxs("div",{className:"flex items-center gap-1 mb-3",children:[Ie.jsx(yf,{className:`${s.iconSize} text-gray-500`}),Ie.jsxs("span",{className:`${s.textSize} text-gray-600`,style:{fontFamily:i.fontFamily},children:["Est. Time: ",e.estimatedTime]})]}),Ie.jsx("div",{className:"mb-3",children:Ie.jsxs("span",{className:`${s.priceSize} font-bold`,style:{fontFamily:i.fontFamily,color:i.primaryColor},children:["$",e.price.toLocaleString()]})})]})]}),Ie.jsxs(Up,{onClick:l,className:`ml-4 ${s.buttonSize} text-white font-medium hover:opacity-90 transition-opacity`,style:{backgroundColor:i.primaryColor,fontFamily:i.fontFamily},children:[Ie.jsx($f,{className:`${s.buttonIconSize} mr-1`}),"Call Carrier"]})]}),t&&Ie.jsx(ch.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},className:"mt-3 p-2 rounded-md",style:{backgroundColor:i.primaryColor+"10"},children:Ie.jsx("p",{className:`${s.textSize} text-center`,style:{fontFamily:i.fontFamily,color:i.primaryColor},children:"✓ Selected for bulk action"})})]})}const Ly=e=>{switch(e){case"waiting":return"text-yellow-600 bg-yellow-50 border-yellow-200";case"in-progress":return"text-blue-600 bg-blue-50 border-blue-200";case"completed":return"text-green-600 bg-green-50 border-green-200";case"failed":return"text-red-600 bg-red-50 border-red-200";default:return"text-gray-600 bg-gray-50 border-gray-200"}},Hy=e=>{switch(e){case"pending":default:return"text-gray-600 bg-gray-50 border-gray-200";case"negotiating":return"text-orange-600 bg-orange-50 border-orange-200";case"agreed":return"text-green-600 bg-green-50 border-green-200";case"declined":return"text-red-600 bg-red-50 border-red-200"}};function _y({item:e,onViewDetails:t,theme:n}){(()=>{const[e,t]=Te.useState(0),n=Te.useRef(null);Te.useEffect(()=>{const e=()=>{n.current&&t(n.current.offsetWidth)};e();const r=new ResizeObserver(e);return n.current&&r.observe(n.current),()=>r.disconnect()},[])})();const r=Math.min(e.callDuration/e.maxDuration*100,100),i=t;return Ie.jsxs(ch.div,{onClick:()=>{t&&t(e.id)},whileHover:{y:-2,scale:1.01},transition:{duration:.2},className:"rounded-2xl border border-gray-200 bg-white shadow-sm p-3 \n hover:shadow-md transition-all duration-200 "+(i?"cursor-pointer hover:border-blue-300":""),children:[Ie.jsxs("div",{className:"flex items-center justify-between mb-2",children:[Ie.jsx("h3",{className:"font-semibold text-sm text-gray-800 truncate",style:{fontFamily:n.fontFamily},children:e.carrierName}),Ie.jsx("div",{className:`flex items-center gap-1 px-2 py-0.5 rounded-full border text-xs font-medium ${Ly(e.callStatus)}`,children:Ie.jsx("span",{className:"capitalize",children:e.callStatus.replace("-"," ")})})]}),Ie.jsxs("div",{className:"flex items-center justify-between mb-2 text-xs text-gray-600",children:[Ie.jsx("span",{children:e.contactInfo}),Ie.jsxs("span",{className:"font-medium text-gray-500",children:[e.callDuration,"m / ",e.maxDuration,"m"]})]}),Ie.jsx("div",{className:"w-full h-1.5 bg-gray-200 rounded-full overflow-hidden mb-2",children:Ie.jsx(ch.div,{className:"h-1.5 rounded-full",style:{backgroundColor:r>80?"#ef4444":r>60?"#f59e0b":n.primaryColor,width:`${r}%`},initial:{width:0},animate:{width:`${r}%`},transition:{duration:.6,ease:"easeOut"}})}),Ie.jsxs("div",{className:"flex items-center justify-between text-xs text-gray-500",children:[Ie.jsxs("div",{className:"flex items-center gap-1.5",children:[Ie.jsx("div",{className:`px-2 py-0.5 rounded-full border font-medium ${Hy(e.dealStatus)}`,children:e.dealStatus}),e.agreedRate&&Ie.jsxs("div",{className:"flex items-center gap-0.5 text-green-600",children:[Ie.jsx(Bf,{className:"w-3 h-3"}),Ie.jsxs("span",{className:"font-semibold",children:["$",e.agreedRate.toLocaleString()]})]})]}),Ie.jsxs("div",{className:"flex items-center gap-1.5",children:["in-progress"===e.callStatus&&Ie.jsx(ch.div,{animate:{scale:[1,1.3,1]},transition:{duration:1,repeat:1/0},className:"w-1.5 h-1.5 bg-blue-500 rounded-full"}),"agreed"===e.dealStatus&&Ie.jsx(ch.div,{initial:{scale:0},animate:{scale:1},className:"w-1.5 h-1.5 bg-green-500 rounded-full"}),Ie.jsxs("span",{className:"text-gray-400",children:["#",e.id.slice(-4)]})]})]}),e.notes&&Ie.jsx("div",{className:"mt-2 bg-gray-50 border border-gray-100 rounded-lg p-2",children:Ie.jsxs("p",{className:"text-xs text-gray-600 leading-tight",children:[Ie.jsx("span",{className:"font-medium",children:"Note:"})," ",e.notes]})})]})}function Ry({searchResults:e,callQueueItems:t,searchMetadata:n,onBack:r,onCallCarrier:i,onBulkCall:a,onViewCallDetails:o,theme:s}){const[A,l]=Te.useState("results"),[c,u]=Te.useState([]),{width:d,containerRef:h}=(()=>{const[e,t]=Te.useState(0),n=Te.useRef(null);return Te.useEffect(()=>{const e=()=>{n.current&&t(n.current.offsetWidth)};e();const r=new ResizeObserver(e);return n.current&&r.observe(n.current),()=>r.disconnect()},[]),{width:e,containerRef:n}})(),p=(e=>e<380?{containerPadding:"p-2",headerPadding:"p-3",contentPadding:"p-3",spacing:"gap-2",titleSize:"text-base",subtitleSize:"text-xs",textSize:"text-xs",iconSize:"h-3 w-3",buttonSize:"text-xs px-2 py-1",buttonIconSize:"h-3 w-3",maxWidth:"max-w-none",gridCols:"grid-cols-1",metadataGrid:"grid-cols-1",tabPadding:"px-2 py-1.5",tabTextSize:"text-xs",headerLayout:"mobile"}:e<450?{containerPadding:"p-3",headerPadding:"p-4",contentPadding:"p-4",spacing:"gap-3",titleSize:"text-lg",subtitleSize:"text-xs",textSize:"text-xs",iconSize:"h-3 w-3",buttonSize:"text-xs px-2 py-1",buttonIconSize:"h-3 w-3",maxWidth:"max-w-none",gridCols:"grid-cols-1",metadataGrid:"grid-cols-1",tabPadding:"px-3 py-2",tabTextSize:"text-xs",headerLayout:"mobile"}:e<600?{containerPadding:"p-4",headerPadding:"p-5",contentPadding:"p-5",spacing:"gap-4",titleSize:"text-xl",subtitleSize:"text-sm",textSize:"text-sm",iconSize:"h-4 w-4",buttonSize:"text-sm px-3 py-1.5",buttonIconSize:"h-4 w-4",maxWidth:"max-w-4xl",gridCols:"grid-cols-1",metadataGrid:"grid-cols-2",tabPadding:"px-4 py-2.5",tabTextSize:"text-sm",headerLayout:"tablet"}:{containerPadding:"p-6",headerPadding:"p-6",contentPadding:"p-6",spacing:"gap-4",titleSize:"text-2xl",subtitleSize:"text-sm",textSize:"text-sm",iconSize:"h-4 w-4",buttonSize:"text-sm px-4 py-2",buttonIconSize:"h-4 w-4",maxWidth:"max-w-6xl",gridCols:"grid-cols-1 lg:grid-cols-2",metadataGrid:"grid-cols-2 md:grid-cols-4",tabPadding:"px-6 py-3",tabTextSize:"text-sm",headerLayout:"desktop"})(d),[f,m]=Te.useState(null),[g,y]=Te.useState([]),[v,w]=Te.useState(null),x=Te.useRef(null),b=e=>{u(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},B=async()=>{if(f)try{const e=await Vi.getQueueStatus(f);w(e.status);const t=(e=>{const t=Array.isArray(e.items)?e.items:[],n=e.currentItem||e.current_item;return t.map(e=>{const t=e.status,r="completed"===t?"completed":"dispatched"===t?"in-progress":"failed"===t?"failed":"waiting";return{id:e.callLogId||e.call_log_id||`${Date.now()}_${Math.random()}`,carrierName:e.carrierName||e.carrier_name||"Unknown Carrier",callDuration:"in-progress"===r?2:"completed"===r?3:0,maxDuration:15,callStatus:r,dealStatus:"pending",agreedRate:null,contactInfo:`${e.contactName||e.contact_name||"Contact"} • ${e.contactPhone||e.contact_phone||""}`,notes:!n||n.callLogId!==e.callLogId&&n.call_log_id!==e.call_log_id?void 0:"Currently being called"}})})(e);y(t),"completed"===e.status&&x.current&&(window.clearInterval(x.current),x.current=null)}catch(qX){fy.error("Failed to fetch queue status",{description:(null==qX?void 0:qX.message)||"Unexpected error"}),x.current&&(window.clearInterval(x.current),x.current=null)}};Te.useEffect(()=>("queue"===A&&f&&!x.current&&(x.current=window.setInterval(B,3e3),B()),"queue"!==A&&x.current&&(window.clearInterval(x.current),x.current=null),()=>{x.current&&(window.clearInterval(x.current),x.current=null)}),[A,f]);const C=c.length;return Ie.jsxs("div",{ref:h,className:`${p.maxWidth} mx-auto ${p.containerPadding}`,children:[Ie.jsxs("div",{className:"bg-white rounded-lg shadow-lg border mb-6",children:[Ie.jsx("div",{className:`${p.headerPadding} border-b`,children:"mobile"===p.headerLayout?Ie.jsxs("div",{className:"space-y-3",children:[Ie.jsxs(Up,{onClick:r,variant:"outline",size:"sm",className:`flex items-center ${p.spacing} ${p.buttonSize}`,style:{fontFamily:s.fontFamily},children:[Ie.jsx(Yp,{className:p.iconSize}),"Back to Search"]}),Ie.jsxs("div",{children:[Ie.jsx("h1",{className:`${p.titleSize} font-bold`,style:{fontFamily:s.fontFamily,color:s.primaryColor},children:"Search Results"}),Ie.jsxs("p",{className:`text-gray-600 ${p.subtitleSize}`,style:{fontFamily:s.fontFamily},children:[n.searchCriteria.origin," → ",n.searchCriteria.destination]})]}),Ie.jsxs("div",{className:`${p.textSize} text-gray-600`,style:{fontFamily:s.fontFamily},children:[Ie.jsxs("p",{children:["ID: ",n.searchId.slice(-8)]}),Ie.jsx("p",{children:n.timestamp.toLocaleString()})]})]}):Ie.jsxs("div",{className:"flex items-center justify-between",children:[Ie.jsxs("div",{className:`flex items-center ${p.spacing}`,children:[Ie.jsxs(Up,{onClick:r,variant:"outline",size:"sm",className:`flex items-center gap-2 ${p.buttonSize}`,style:{fontFamily:s.fontFamily},children:[Ie.jsx(Yp,{className:p.iconSize}),"Back to Search"]}),Ie.jsxs("div",{children:[Ie.jsx("h1",{className:`${p.titleSize} font-bold`,style:{fontFamily:s.fontFamily,color:s.primaryColor},children:"Search Results"}),Ie.jsxs("p",{className:`text-gray-600 ${p.subtitleSize}`,style:{fontFamily:s.fontFamily},children:[n.searchCriteria.origin," → ",n.searchCriteria.destination]})]})]}),Ie.jsxs("div",{className:"text-right",children:[Ie.jsxs("p",{className:`${p.textSize} text-gray-600`,style:{fontFamily:s.fontFamily},children:["Search ID: ",n.searchId.slice(-8)]}),Ie.jsx("p",{className:`${p.textSize} text-gray-600`,style:{fontFamily:s.fontFamily},children:n.timestamp.toLocaleString()})]})]})}),Ie.jsx("div",{className:"p-4 bg-gray-50",children:Ie.jsxs("div",{className:`grid ${p.metadataGrid} gap-4 ${p.textSize}`,children:[Ie.jsxs("div",{children:[Ie.jsx("span",{className:"text-gray-600",children:"Equipment:"}),Ie.jsx("span",{className:"ml-1 font-medium",children:n.searchCriteria.equipmentType})]}),Ie.jsxs("div",{children:[Ie.jsx("span",{className:"text-gray-600",children:"Weight:"}),Ie.jsxs("span",{className:"ml-1 font-medium",children:[n.searchCriteria.weight," lbs"]})]}),n.searchCriteria.volume&&Ie.jsxs("div",{children:[Ie.jsx("span",{className:"text-gray-600",children:"Volume:"}),Ie.jsxs("span",{className:"ml-1 font-medium",children:[n.searchCriteria.volume," cu ft"]})]}),Ie.jsxs("div",{children:[Ie.jsx("span",{className:"text-gray-600",children:"Pickup:"}),Ie.jsx("span",{className:"ml-1 font-medium",children:n.searchCriteria.pickupDate})]})]})})]}),Ie.jsxs("div",{className:"bg-white rounded-lg shadow-lg border",children:[Ie.jsx("div",{className:"border-b",children:Ie.jsxs("nav",{className:"flex",children:[Ie.jsxs("button",{onClick:()=>l("results"),className:`${p.tabPadding} ${p.tabTextSize} font-medium border-b-2 transition-colors ${"results"===A?"border-blue-500 text-blue-600":"border-transparent text-gray-500 hover:text-gray-700"}`,style:{fontFamily:s.fontFamily,..."results"===A&&{borderBottomColor:s.primaryColor,color:s.primaryColor}},children:[Ie.jsx(em,{className:`${p.iconSize} inline mr-2`}),"Results (",e.length,")"]}),Ie.jsxs("button",{onClick:()=>l("queue"),className:`${p.tabPadding} ${p.tabTextSize} font-medium border-b-2 transition-colors ${"queue"===A?"border-blue-500 text-blue-600":"border-transparent text-gray-500 hover:text-gray-700"}`,style:{fontFamily:s.fontFamily,..."queue"===A&&{borderBottomColor:s.primaryColor,color:s.primaryColor}},children:[Ie.jsx($f,{className:`${p.iconSize} inline mr-2`}),"Call Queue (",t.length,")"]})]})}),Ie.jsx("div",{className:p.contentPadding,children:Ie.jsxs(hl,{mode:"wait",children:["results"===A&&Ie.jsxs(ch.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},exit:{opacity:0,x:20},transition:{duration:.2},children:[Ie.jsxs("div",{className:"flex items-center justify-between mb-6 "+("mobile"===p.headerLayout?"flex-col gap-3":""),children:[Ie.jsxs("div",{className:`flex items-center ${p.spacing} ${"mobile"===p.headerLayout?"w-full justify-between":""}`,children:[Ie.jsx("h3",{className:("text-lg"===p.titleSize?"text-base":"text-lg")+" font-semibold",style:{fontFamily:s.fontFamily},children:"Available Carriers"}),C>0&&Ie.jsxs("span",{className:`px-2 py-1 bg-blue-100 text-blue-800 rounded-full ${p.textSize}`,style:{fontFamily:s.fontFamily},children:[C," selected"]})]}),C>0&&Ie.jsxs(Up,{onClick:async()=>{if(0===c.length)return;const t=e.filter(e=>c.includes(e.id)),r=n.searchCriteria.origin,i=n.searchCriteria.destination,a=n.searchCriteria.volume?`${n.searchCriteria.volume} loads per month`:"Unknown volume",o=t.map(e=>{var t,n;const o="number"==typeof e.price?e.price:0,s=o?`$${(.95*o).toFixed(2)}`:"$0.00",A=o?`$${o.toFixed(2)}`:"$0.00",l=o?`$${(1.1*o).toFixed(2)}`:"$0.00",c=o?`$${(1.02*o).toFixed(2)}`:"$0.00";return{contact_phone:(null==(t=e.contactInfo)?void 0:t.phone)||"",contact_name:(null==(n=e.contactInfo)?void 0:n.contact_person)||e.name,carrier_name:e.name,route:`${r} to ${i}`,volume:a,target_rate:s,market_rate:A,max_rate:l,initiate_call:!0,source:r,destination:i,expected_price:c}});try{const e=await Vi.enqueueCallQueue(o),t=e.queueId||e.queue_id,n=e.status;t?(m(t),w(n||"pending"),fy.success("Call queue triggered",{description:`Queue ID: ${String(t).slice(-8)}`}),l("queue")):fy.error("Failed to trigger call queue",{description:"No queue ID returned"})}catch(qX){fy.error("Failed to trigger call queue",{description:(null==qX?void 0:qX.message)||"Unexpected error"})}finally{u([])}},className:`${p.buttonSize} text-white font-medium hover:opacity-90 transition-opacity ${"mobile"===p.headerLayout?"w-full":""}`,style:{backgroundColor:s.primaryColor,fontFamily:s.fontFamily},children:[Ie.jsx(mm,{className:`${p.buttonIconSize} mr-2`}),"Call Selected (",C,")"]})]}),Ie.jsx("div",{className:`grid ${p.gridCols} gap-4`,children:e.map(e=>Ie.jsx(Dy,{carrier:e,isSelected:c.includes(e.id),onSelect:b,onCallCarrier:i,theme:s},e.id))}),0===e.length&&Ie.jsxs("div",{className:"text-center py-12",children:[Ie.jsx(em,{className:"h-12 w-12 text-gray-400 mx-auto mb-4"}),Ie.jsx("p",{className:`text-gray-600 ${p.textSize}`,style:{fontFamily:s.fontFamily},children:"No carriers found for your search criteria."})]})]},"results"),"queue"===A&&Ie.jsxs(ch.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},transition:{duration:.2},children:[Ie.jsxs("div",{className:"flex items-center justify-between mb-6 "+("mobile"===p.headerLayout?"flex-col gap-3":""),children:[Ie.jsx("h3",{className:("text-lg"===p.titleSize?"text-base":"text-lg")+" font-semibold",style:{fontFamily:s.fontFamily},children:"Call Queue"}),Ie.jsxs("div",{className:`flex items-center ${p.spacing} ${p.textSize} text-gray-600 ${"mobile"===p.headerLayout?"flex-col gap-1":""}`,children:[Ie.jsxs("div",{className:"flex items-center gap-1",children:[Ie.jsx(yf,{className:p.iconSize}),Ie.jsxs("span",{children:["In Progress: ",(g.length?g:t).filter(e=>"in-progress"===e.callStatus).length]})]}),Ie.jsxs("div",{className:"flex items-center gap-1",children:[Ie.jsx(ff,{className:p.iconSize}),Ie.jsxs("span",{children:["Completed: ",(g.length?g:t).filter(e=>"completed"===e.callStatus).length]})]})]})]}),Ie.jsx("div",{className:`grid ${p.gridCols} gap-4`,children:(g.length?g:t).map(e=>Ie.jsx(_y,{item:e,onViewDetails:o,theme:s},e.id))}),0===(g.length?g:t).length&&Ie.jsxs("div",{className:"text-center py-12",children:[Ie.jsx($f,{className:"h-12 w-12 text-gray-400 mx-auto mb-4"}),Ie.jsx("p",{className:`text-gray-600 ${p.textSize}`,style:{fontFamily:s.fontFamily},children:"No calls in queue. Start calling carriers to see them here."})]})]},"queue")]})})]})]})}const Ky=[{id:"carrier-001",name:"Swift Transportation",source:"DAT Load Board",rating:4.8,price:2850,estimatedTime:"2-3 days",equipment:"Dry Van",isSelected:!1},{id:"carrier-002",name:"J.B. Hunt Transport",source:"Truckstop.com",rating:4.6,price:3200,estimatedTime:"1-2 days",equipment:"Refrigerated",isSelected:!1},{id:"carrier-003",name:"Schneider National",source:"123Loadboard",rating:4.7,price:2950,estimatedTime:"2-3 days",equipment:"Dry Van",isSelected:!1},{id:"carrier-004",name:"Werner Enterprises",source:"Direct Contact",rating:4.5,price:2750,estimatedTime:"3-4 days",equipment:"Flatbed",isSelected:!1},{id:"carrier-005",name:"Prime Inc.",source:"DAT Load Board",rating:4.9,price:3100,estimatedTime:"2 days",equipment:"Refrigerated",isSelected:!1}],zy=[{id:"call-001",carrierName:"Swift Transportation",callDuration:15,maxDuration:30,callStatus:"in-progress",dealStatus:"negotiating",agreedRate:null,contactInfo:"John Smith - (555) 123-4567",notes:"Discussing pickup time flexibility"},{id:"call-002",carrierName:"Prime Inc.",callDuration:25,maxDuration:30,callStatus:"completed",dealStatus:"agreed",agreedRate:3100,contactInfo:"Sarah Johnson - (555) 987-6543",notes:"Rate agreed, waiting for confirmation email"},{id:"call-003",carrierName:"Werner Enterprises",callDuration:8,maxDuration:30,callStatus:"waiting",dealStatus:"pending",agreedRate:null,contactInfo:"Mike Davis - (555) 456-7890"},{id:"call-004",carrierName:"Schneider National",callDuration:30,maxDuration:30,callStatus:"failed",dealStatus:"declined",agreedRate:null,contactInfo:"Lisa Brown - (555) 321-0987",notes:"Could not reach carrier, voicemail left"}];function Vy(){const{theme:e}=ea(),t=Ag(),n=ug(),r=t.state,{data:i,isLoading:a,error:o}=Py((null==r?void 0:r.workflowId)||""),[s,A]=Te.useState((null==r?void 0:r.searchResults)||[]),[l,c]=Te.useState((null==r?void 0:r.searchMetadata)||null),[u,d]=Te.useState(zy);Te.useEffect(()=>{if(i&&(null==r?void 0:r.isFromHistory)){const e=i.carriers.map((e,t)=>({id:e.carrier_id,name:e.carrier_name,price:2500+100*t,rating:Math.min(5,Math.max(1,5*e.vetting_details.overall_score)),responseTime:"< 2 hours",equipment:e.type_of_load,location:"Available",capacity:e.fleet_size.toString(),experience:`${e.years_in_business} years`,dotNumber:e.dot_number,contactInfo:e.contact_info,matchScore:e.match_score,vettingResult:e.vetting_result,vettingDetails:e.vetting_details,rfmScore:e.rfm_score})),t={searchId:i.workflow_id,timestamp:new Date(i.created_at),searchCriteria:{origin:i.input_details.origin,destination:i.input_details.destination,pickupDate:i.input_details.pickup_date,deliveryDate:i.input_details.delivery_date,equipmentType:i.input_details.cargo_type,weight:i.input_details.weight,volume:i.input_details.volume},totalResults:i.total_carriers_found,processingTime:i.processing_time_seconds,status:i.status};A(e),c(t)}},[i,null==r?void 0:r.isFromHistory]),Te.useEffect(()=>{a||(null==r?void 0:r.workflowId)||(null==r?void 0:r.searchResults)&&(null==r?void 0:r.searchMetadata)||n("/search",{replace:!0})},[r,n,a]);const h=e=>{const t=s.find(t=>t.id===e);if(t){const e={id:"call-"+Date.now(),carrierName:t.name,callDuration:0,maxDuration:30,callStatus:"waiting",dealStatus:"pending",agreedRate:null,contactInfo:"Contact info not available",notes:`Called from search results - Rate: $${t.price}`};d(t=>[e,...t]),setTimeout(()=>{d(t=>t.map(t=>t.id===e.id?{...t,callStatus:"in-progress"}:t))},1e3)}};return a&&(null==r?void 0:r.isFromHistory)?Ie.jsxs("div",{className:"flex flex-col h-full items-center justify-center",style:{fontFamily:e.fontFamily},children:[Ie.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-500 mb-4"}),Ie.jsx("p",{className:"text-gray-600",children:"Loading workflow results..."})]}):o&&(null==r?void 0:r.isFromHistory)?Ie.jsxs("div",{className:"flex flex-col h-full items-center justify-center",style:{fontFamily:e.fontFamily},children:[Ie.jsx("div",{className:"text-red-500 mb-4",children:Ie.jsx("p",{children:"Failed to load workflow results"})}),Ie.jsx("button",{onClick:()=>n("/search"),className:"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600",children:"Back to Search"})]}):l?Ie.jsx("div",{className:"flex flex-col h-full",style:{fontFamily:e.fontFamily},children:Ie.jsx("div",{className:"flex-1 overflow-y-auto",children:Ie.jsx(Ry,{searchResults:s,callQueueItems:u,searchMetadata:l,onBack:()=>{n(-1)},onCallCarrier:h,onBulkCall:e=>{e.forEach((e,t)=>{setTimeout(()=>h(e),500*t)})},onViewCallDetails:e=>{n(`/call-details/${e}`,{state:{callQueueItems:u,searchResults:s,searchMetadata:l}})},theme:e})})}):null}const $y=e=>{const t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=e%60;return t>0?`${t}:${n.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}`:`${n}:${r.toString().padStart(2,"0")}`},Wy=e=>{switch(e){case"excellent":return"text-green-600 bg-green-100";case"good":return"text-blue-600 bg-blue-100";case"fair":return"text-yellow-600 bg-yellow-100";case"poor":return"text-red-600 bg-red-100";default:return"text-gray-600 bg-gray-100"}},Gy=e=>{switch(e){case"positive":return"text-green-600";case"negative":return"text-red-600";default:return"text-gray-600"}},qy=e=>{switch(e){case"positive":return Ie.jsx(dm,{className:"w-4 h-4"});case"negative":return Ie.jsx(um,{className:"w-4 h-4"});default:return Ie.jsx(_f,{className:"w-4 h-4"})}};function Xy({callDetails:e,onBack:t,theme:n}){var r;const{width:i,containerRef:a}=(()=>{const[e,t]=Te.useState(0),n=Te.useRef(null);return Te.useEffect(()=>{const e=()=>{n.current&&t(n.current.offsetWidth)};e();const r=new ResizeObserver(e);return n.current&&r.observe(n.current),()=>r.disconnect()},[]),{width:e,containerRef:n}})(),o=(e=>e<380?{containerPadding:"p-2",headerPadding:"p-3",cardPadding:"p-3",gridCols:"grid-cols-1",textSize:{title:"text-sm",subtitle:"text-xs",body:"text-xs",caption:"text-xs"},spacing:"space-y-2",buttonSize:"px-2 py-1 text-xs",iconSize:"w-3 h-3",maxWidth:"max-w-full",headerLayout:"stacked"}:e<450?{containerPadding:"p-3",headerPadding:"p-3",cardPadding:"p-3",gridCols:"grid-cols-1",textSize:{title:"text-base",subtitle:"text-sm",body:"text-xs",caption:"text-xs"},spacing:"space-y-2",buttonSize:"px-2 py-1 text-xs",iconSize:"w-3 h-3",maxWidth:"max-w-full",tabPadding:"px-2 py-1",sectionSpacing:"space-y-2",metricGrid:"grid-cols-2",transcriptHeight:"max-h-48"}:e<600?{containerPadding:"p-3",headerPadding:"p-4",cardPadding:"p-4",gridCols:"grid-cols-1",textSize:{title:"text-lg",subtitle:"text-base",body:"text-sm",caption:"text-xs"},spacing:"space-y-3",buttonSize:"px-3 py-2 text-sm",iconSize:"w-4 h-4",maxWidth:"max-w-full",tabPadding:"px-3 py-2",sectionSpacing:"space-y-3",metricGrid:"grid-cols-2",transcriptHeight:"max-h-64"}:{containerPadding:"p-4",headerPadding:"p-5",cardPadding:"p-5",gridCols:"grid-cols-1 md:grid-cols-2",textSize:{title:"text-xl",subtitle:"text-lg",body:"text-base",caption:"text-sm"},spacing:"space-y-4",buttonSize:"px-4 py-2 text-base",iconSize:"w-5 h-5",maxWidth:"max-w-full",tabPadding:"px-4 py-2",sectionSpacing:"space-y-4",metricGrid:"grid-cols-3",transcriptHeight:"max-h-80"})(i),[s,A]=Te.useState("metadata"),[l,c]=Te.useState(new Set(["overview"])),[u,d]=Te.useState(""),[h,p]=Te.useState(!1),[f,m]=Te.useState(null),g=e=>{const t=new Set(l);t.has(e)?t.delete(e):t.add(e),c(t)},y=(null==(r=e.transcription)?void 0:r.fullTranscript.filter(e=>e.text.toLowerCase().includes(u.toLowerCase())))||[],v=async t=>{p(!0);try{await new Promise(e=>setTimeout(e,1e3));const n={callId:e.callId,timestamp:e.timestamp,duration:e.duration,participants:e.participants,..."transcript"===t&&{transcription:e.transcription}},r=new Blob([JSON.stringify(n,null,2)],{type:"application/json"}),i=URL.createObjectURL(r),a=document.createElement("a");a.href=i,a.download=`call-${e.callId}-${t}.${"pdf"===t?"pdf":"json"}`,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(i)}catch(n){m("Failed to download file")}finally{p(!1)}};return Ie.jsxs("div",{ref:a,className:`${o.maxWidth} mx-auto ${o.containerPadding}`,children:[Ie.jsxs("div",{className:"bg-white rounded-lg shadow-lg border mb-6",children:[Ie.jsx("div",{className:`${o.headerPadding} border-b`,children:Ie.jsxs("div",{className:"flex items-center justify-between",children:[Ie.jsxs("div",{className:"flex items-center space-x-4",children:[Ie.jsxs("button",{onClick:t,className:`flex items-center space-x-2 text-gray-600 hover:text-gray-800 ${o.buttonSize}`,children:[Ie.jsx(Yp,{className:o.iconSize}),Ie.jsx("span",{children:"Back"})]}),Ie.jsxs("div",{children:[Ie.jsx("h1",{className:`font-bold text-gray-900 ${o.textSize.title}`,children:"Call Details"}),Ie.jsxs("p",{className:`text-gray-600 ${o.textSize.caption}`,children:["Call ID: ",e.callId]})]})]}),Ie.jsxs("div",{className:"flex items-center space-x-2",children:[Ie.jsxs("button",{onClick:()=>v("json"),disabled:h,className:`flex items-center space-x-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 disabled:opacity-50 ${o.buttonSize}`,children:[Ie.jsx(Cf,{className:o.iconSize}),Ie.jsx("span",{className:"hidden sm:inline",children:"Export"})]}),Ie.jsxs("button",{className:`flex items-center space-x-2 bg-gray-100 text-gray-700 rounded-lg hover:bg-gray-200 ${o.buttonSize}`,children:[Ie.jsx(nm,{className:o.iconSize}),Ie.jsx("span",{className:"hidden sm:inline",children:"Share"})]})]})]})}),Ie.jsx("div",{className:`${o.headerPadding} pt-0`,children:Ie.jsx("div",{className:"flex space-x-1 bg-gray-100 rounded-lg p-1",children:[{id:"metadata",label:"Overview",icon:$f},{id:"details",label:"Technical",icon:Kf},{id:"transcription",label:"Transcript",icon:kf}].map(({id:e,label:t,icon:n})=>Ie.jsxs("button",{onClick:()=>A(e),className:`flex items-center space-x-1 ${o.tabPadding} rounded-md transition-colors flex-1 justify-center ${o.textSize.body} ${s===e?"bg-white text-blue-600 shadow-sm":"text-gray-600 hover:text-gray-800"}`,children:[Ie.jsx(n,{className:o.iconSize}),Ie.jsx("span",{className:"hidden sm:inline",children:t}),Ie.jsx("span",{className:"sm:hidden",children:t.charAt(0)})]},e))})})]}),f&&Ie.jsx("div",{className:"bg-red-50 border border-red-200 rounded-lg p-4 mb-6",children:Ie.jsxs("div",{className:"flex items-center space-x-2",children:[Ie.jsx(pf,{className:"w-5 h-5 text-red-600"}),Ie.jsx("span",{className:"text-red-800",children:f}),Ie.jsx("button",{onClick:()=>m(null),className:"ml-auto text-red-600 hover:text-red-800",children:Ie.jsx(mf,{className:"w-4 h-4"})})]})}),Ie.jsxs(ch.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:o.spacing,children:["metadata"===s&&Ie.jsx(Yy,{callDetails:e,config:o,expandedSections:l,toggleSection:g}),"details"===s&&Ie.jsx(Jy,{callDetails:e,config:o,expandedSections:l,toggleSection:g}),"transcription"===s&&Ie.jsx(Zy,{callDetails:e,config:o,searchTerm:u,setSearchTerm:d,filteredTranscript:y,onDownload:v,isLoading:h})]},s)]})}function Yy({callDetails:e,config:t,expandedSections:n,toggleSection:r}){return Ie.jsxs("div",{className:t.spacing,children:[Ie.jsxs("div",{className:"bg-white rounded-lg shadow-lg border",children:[Ie.jsxs("button",{onClick:()=>r("overview"),className:`w-full ${t.cardPadding} flex items-center justify-between text-left`,children:[Ie.jsx("h2",{className:`font-semibold text-gray-900 ${t.textSize.subtitle}`,children:"Call Overview"}),n.has("overview")?Ie.jsx(hf,{className:t.iconSize}):Ie.jsx(cf,{className:t.iconSize})]}),n.has("overview")&&Ie.jsxs("div",{className:`${t.cardPadding} pt-0 border-t`,children:[Ie.jsxs("div",{className:`grid ${t.gridCols} gap-4`,children:[Ie.jsxs("div",{className:"flex items-center space-x-3",children:[Ie.jsx(yf,{className:`${t.iconSize} text-blue-600`}),Ie.jsxs("div",{children:[Ie.jsx("p",{className:`font-medium text-gray-900 ${t.textSize.body}`,children:"Duration"}),Ie.jsx("p",{className:`text-gray-600 ${t.textSize.caption}`,children:$y(e.duration)})]})]}),Ie.jsxs("div",{className:"flex items-center space-x-3",children:[Ie.jsx($f,{className:`${t.iconSize} text-green-600`}),Ie.jsxs("div",{children:[Ie.jsx("p",{className:`font-medium text-gray-900 ${t.textSize.body}`,children:"Direction"}),Ie.jsx("p",{className:`text-gray-600 ${t.textSize.caption} capitalize`,children:e.direction})]})]}),Ie.jsxs("div",{className:"flex items-center space-x-3",children:[Ie.jsx("div",{className:"w-3 h-3 rounded-full "+("completed"===e.status?"bg-green-500":"failed"===e.status?"bg-red-500":"in-progress"===e.status?"bg-blue-500":"bg-yellow-500")}),Ie.jsxs("div",{children:[Ie.jsx("p",{className:`font-medium text-gray-900 ${t.textSize.body}`,children:"Status"}),Ie.jsx("p",{className:`text-gray-600 ${t.textSize.caption} capitalize`,children:e.status.replace("-"," ")})]})]})]}),Ie.jsxs("div",{className:"mt-4 p-4 bg-gray-50 rounded-lg",children:[Ie.jsxs("p",{className:`text-gray-600 ${t.textSize.caption}`,children:["Started: ",e.timestamp.toLocaleString()]}),e.result.outcome&&Ie.jsxs("p",{className:`text-gray-600 ${t.textSize.caption} mt-1`,children:["Outcome: ",Ie.jsx("span",{className:"capitalize",children:e.result.outcome})]})]})]})]}),Ie.jsxs("div",{className:"bg-white rounded-lg shadow-lg border",children:[Ie.jsxs("button",{onClick:()=>r("participants"),className:`w-full ${t.cardPadding} flex items-center justify-between text-left`,children:[Ie.jsxs("h2",{className:`font-semibold text-gray-900 ${t.textSize.subtitle}`,children:["Participants (",e.participants.length,")"]}),n.has("participants")?Ie.jsx(hf,{className:t.iconSize}):Ie.jsx(cf,{className:t.iconSize})]}),n.has("participants")&&Ie.jsx("div",{className:`${t.cardPadding} pt-0 border-t space-y-3`,children:e.participants.map(e=>Ie.jsxs("div",{className:"flex items-center space-x-3 p-3 bg-gray-50 rounded-lg",children:[Ie.jsx(mm,{className:`${t.iconSize} text-blue-600`}),Ie.jsxs("div",{className:"flex-1",children:[Ie.jsx("p",{className:`font-medium text-gray-900 ${t.textSize.body}`,children:e.name}),Ie.jsxs("p",{className:`text-gray-600 ${t.textSize.caption}`,children:[e.role," • ",e.company||"Unknown Company"]}),e.phoneNumber&&Ie.jsx("p",{className:`text-gray-500 ${t.textSize.caption}`,children:e.phoneNumber})]}),Ie.jsx("div",{className:"px-2 py-1 rounded-full text-xs "+("caller"===e.role?"bg-blue-100 text-blue-800":"receiver"===e.role?"bg-green-100 text-green-800":"bg-purple-100 text-purple-800"),children:e.role})]},e.id))})]}),Ie.jsx("div",{className:"bg-white rounded-lg shadow-lg border",children:Ie.jsxs("div",{className:`${t.cardPadding}`,children:[Ie.jsx("h2",{className:`font-semibold text-gray-900 ${t.textSize.subtitle} mb-4`,children:"Call Quality"}),Ie.jsxs("div",{className:"flex items-center space-x-4 mb-4",children:[Ie.jsx("div",{className:"flex items-center space-x-2",children:[1,2,3,4,5].map(t=>Ie.jsx(sm,{className:"w-5 h-5 "+(t<=e.quality.overallScore?"text-yellow-400 fill-current":"text-gray-300")},t))}),Ie.jsxs("span",{className:`font-medium ${t.textSize.body}`,children:[e.quality.overallScore,"/5"]}),Ie.jsx("span",{className:`px-3 py-1 rounded-full text-xs font-medium ${Wy(e.quality.audioQuality)}`,children:e.quality.audioQuality})]}),Ie.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[Ie.jsxs("div",{children:[Ie.jsx("p",{className:`text-gray-600 ${t.textSize.caption}`,children:"Signal Strength"}),Ie.jsxs("div",{className:"flex items-center space-x-2",children:[Ie.jsx("div",{className:"flex-1 bg-gray-200 rounded-full h-2",children:Ie.jsx("div",{className:"bg-green-500 h-2 rounded-full",style:{width:`${e.quality.signalStrength}%`}})}),Ie.jsxs("span",{className:`${t.textSize.caption} font-medium`,children:[e.quality.signalStrength,"%"]})]})]}),Ie.jsxs("div",{children:[Ie.jsx("p",{className:`text-gray-600 ${t.textSize.caption}`,children:"Latency"}),Ie.jsxs("p",{className:`font-medium ${t.textSize.body}`,children:[e.quality.latency,"ms"]})]})]})]})})]})}function Jy({callDetails:e,config:t,expandedSections:n,toggleSection:r}){return Ie.jsxs("div",{className:t.spacing,children:[Ie.jsxs("div",{className:"bg-white rounded-lg shadow-lg border",children:[Ie.jsxs("button",{onClick:()=>r("network"),className:`w-full ${t.cardPadding} flex items-center justify-between text-left`,children:[Ie.jsx("h2",{className:`font-semibold text-gray-900 ${t.textSize.subtitle}`,children:"Network Information"}),n.has("network")?Ie.jsx(hf,{className:t.iconSize}):Ie.jsx(cf,{className:t.iconSize})]}),n.has("network")&&Ie.jsx("div",{className:`${t.cardPadding} pt-0 border-t`,children:Ie.jsxs("div",{className:`grid ${t.gridCols} gap-4`,children:[Ie.jsxs("div",{className:"flex items-center space-x-3",children:[Ie.jsx(vm,{className:`${t.iconSize} text-blue-600`}),Ie.jsxs("div",{children:[Ie.jsx("p",{className:`font-medium text-gray-900 ${t.textSize.body}`,children:"Connection"}),Ie.jsx("p",{className:`text-gray-600 ${t.textSize.caption} capitalize`,children:e.network.connectionType})]})]}),Ie.jsxs("div",{className:"flex items-center space-x-3",children:[Ie.jsx(am,{className:`${t.iconSize} text-green-600`}),Ie.jsxs("div",{children:[Ie.jsx("p",{className:`font-medium text-gray-900 ${t.textSize.body}`,children:"Bandwidth"}),Ie.jsxs("p",{className:`text-gray-600 ${t.textSize.caption}`,children:[e.network.bandwidth," kbps"]})]})]}),Ie.jsxs("div",{className:"col-span-full",children:[Ie.jsx("p",{className:`font-medium text-gray-900 ${t.textSize.body} mb-2`,children:"Location"}),Ie.jsxs("p",{className:`text-gray-600 ${t.textSize.caption}`,children:[e.network.location.city,", ",e.network.location.state,", ",e.network.location.country]}),Ie.jsxs("p",{className:`text-gray-500 ${t.textSize.caption} mt-1`,children:["IP: ",e.network.ipAddress," • Provider: ",e.network.provider]})]})]})})]}),Ie.jsxs("div",{className:"bg-white rounded-lg shadow-lg border",children:[Ie.jsxs("button",{onClick:()=>r("device"),className:`w-full ${t.cardPadding} flex items-center justify-between text-left`,children:[Ie.jsx("h2",{className:`font-semibold text-gray-900 ${t.textSize.subtitle}`,children:"Device Information"}),n.has("device")?Ie.jsx(hf,{className:t.iconSize}):Ie.jsx(cf,{className:t.iconSize})]}),n.has("device")&&Ie.jsx("div",{className:`${t.cardPadding} pt-0 border-t`,children:Ie.jsxs("div",{className:`grid ${t.gridCols} gap-4`,children:[Ie.jsxs("div",{className:"flex items-center space-x-3",children:[Ie.jsx(Kf,{className:`${t.iconSize} text-blue-600`}),Ie.jsxs("div",{children:[Ie.jsx("p",{className:`font-medium text-gray-900 ${t.textSize.body}`,children:"Browser"}),Ie.jsxs("p",{className:`text-gray-600 ${t.textSize.caption}`,children:[e.device.browser," ",e.device.browserVersion]})]})]}),Ie.jsxs("div",{className:"flex items-center space-x-3",children:[Ie.jsx("div",{className:`${t.iconSize} bg-gray-200 rounded flex items-center justify-center`,children:Ie.jsx("span",{className:"text-xs font-bold",children:"OS"})}),Ie.jsxs("div",{children:[Ie.jsx("p",{className:`font-medium text-gray-900 ${t.textSize.body}`,children:"Operating System"}),Ie.jsxs("p",{className:`text-gray-600 ${t.textSize.caption}`,children:[e.device.operatingSystem," ",e.device.osVersion]})]})]}),Ie.jsxs("div",{className:"flex items-center space-x-3",children:[Ie.jsx(Ff,{className:`${t.iconSize} text-green-600`}),Ie.jsxs("div",{children:[Ie.jsx("p",{className:`font-medium text-gray-900 ${t.textSize.body}`,children:"Audio Devices"}),Ie.jsxs("p",{className:`text-gray-600 ${t.textSize.caption}`,children:["Mic: ",e.device.microphone]}),Ie.jsxs("p",{className:`text-gray-600 ${t.textSize.caption}`,children:["Speaker: ",e.device.speaker]})]})]})]})})]}),Ie.jsx("div",{className:"bg-white rounded-lg shadow-lg border",children:Ie.jsxs("div",{className:`${t.cardPadding}`,children:[Ie.jsx("h2",{className:`font-semibold text-gray-900 ${t.textSize.subtitle} mb-4`,children:"Codec & Technical Parameters"}),Ie.jsxs("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[Ie.jsxs("div",{children:[Ie.jsx("p",{className:`text-gray-600 ${t.textSize.caption}`,children:"Audio Codec"}),Ie.jsx("p",{className:`font-medium ${t.textSize.body}`,children:e.codec.audioCodec})]}),Ie.jsxs("div",{children:[Ie.jsx("p",{className:`text-gray-600 ${t.textSize.caption}`,children:"Bitrate"}),Ie.jsxs("p",{className:`font-medium ${t.textSize.body}`,children:[e.codec.bitrate," kbps"]})]}),Ie.jsxs("div",{children:[Ie.jsx("p",{className:`text-gray-600 ${t.textSize.caption}`,children:"Sample Rate"}),Ie.jsxs("p",{className:`font-medium ${t.textSize.body}`,children:[e.codec.sampleRate," Hz"]})]}),Ie.jsxs("div",{children:[Ie.jsx("p",{className:`text-gray-600 ${t.textSize.caption}`,children:"Channels"}),Ie.jsx("p",{className:`font-medium ${t.textSize.body}`,children:e.codec.channels})]})]}),Ie.jsxs("div",{className:"p-4 bg-gray-50 rounded-lg",children:[Ie.jsx("h3",{className:`font-medium text-gray-900 ${t.textSize.body} mb-2`,children:"Performance Metrics"}),Ie.jsxs("div",{className:"grid grid-cols-2 gap-4 text-sm",children:[Ie.jsxs("div",{children:[Ie.jsx("p",{className:"text-gray-600",children:"RTP Packets Sent"}),Ie.jsx("p",{className:"font-medium",children:e.technicalParams.rtpPackets.sent.toLocaleString()})]}),Ie.jsxs("div",{children:[Ie.jsx("p",{className:"text-gray-600",children:"RTP Packets Lost"}),Ie.jsx("p",{className:"font-medium",children:e.technicalParams.rtpPackets.lost.toLocaleString()})]}),Ie.jsxs("div",{children:[Ie.jsx("p",{className:"text-gray-600",children:"CPU Usage"}),Ie.jsxs("p",{className:"font-medium",children:[e.technicalParams.cpu.usage,"%"]})]}),Ie.jsxs("div",{children:[Ie.jsx("p",{className:"text-gray-600",children:"Memory Used"}),Ie.jsxs("p",{className:"font-medium",children:[e.technicalParams.memory.used," MB"]})]})]})]})]})})]})}function Zy({callDetails:e,config:t,searchTerm:n,setSearchTerm:r,filteredTranscript:i,onDownload:a,isLoading:o}){return e.transcription?Ie.jsxs("div",{className:t.spacing,children:[Ie.jsx("div",{className:"bg-white rounded-lg shadow-lg border",children:Ie.jsxs("div",{className:`${t.cardPadding}`,children:[Ie.jsxs("div",{className:"flex items-center justify-between mb-4",children:[Ie.jsx("h2",{className:`font-semibold text-gray-900 ${t.textSize.subtitle}`,children:"Call Transcription"}),Ie.jsxs("button",{onClick:()=>a("transcript"),disabled:o,className:`flex items-center space-x-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 disabled:opacity-50 ${t.buttonSize}`,children:[Ie.jsx(Cf,{className:t.iconSize}),Ie.jsx("span",{children:"Download"})]})]}),Ie.jsxs("div",{className:"relative mb-4",children:[Ie.jsx(em,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 w-4 h-4"}),Ie.jsx("input",{type:"text",placeholder:"Search transcript...",value:n,onChange:e=>r(e.target.value),className:`w-full pl-10 pr-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent ${t.textSize.body}`})]}),Ie.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-4",children:[Ie.jsxs("div",{className:"text-center p-3 bg-gray-50 rounded-lg",children:[Ie.jsxs("p",{className:`font-medium text-gray-900 ${t.textSize.body}`,children:[e.transcription.confidence,"%"]}),Ie.jsx("p",{className:`text-gray-600 ${t.textSize.caption}`,children:"Confidence"})]}),Ie.jsxs("div",{className:"text-center p-3 bg-gray-50 rounded-lg",children:[Ie.jsx("p",{className:`font-medium text-gray-900 ${t.textSize.body}`,children:e.transcription.speakers.length}),Ie.jsx("p",{className:`text-gray-600 ${t.textSize.caption}`,children:"Speakers"})]}),Ie.jsxs("div",{className:"text-center p-3 bg-gray-50 rounded-lg",children:[Ie.jsx("p",{className:`font-medium text-gray-900 ${t.textSize.body}`,children:e.transcription.fullTranscript.length}),Ie.jsx("p",{className:`text-gray-600 ${t.textSize.caption}`,children:"Segments"})]}),Ie.jsxs("div",{className:"text-center p-3 bg-gray-50 rounded-lg",children:[Ie.jsx("p",{className:`font-medium text-gray-900 ${t.textSize.body} capitalize`,children:e.transcription.language}),Ie.jsx("p",{className:`text-gray-600 ${t.textSize.caption}`,children:"Language"})]})]})]})}),Ie.jsx("div",{className:"bg-white rounded-lg shadow-lg border",children:Ie.jsxs("div",{className:`${t.cardPadding}`,children:[Ie.jsx("h3",{className:`font-semibold text-gray-900 ${t.textSize.subtitle} mb-4`,children:"Sentiment Analysis"}),Ie.jsxs("div",{className:"flex items-center space-x-4 mb-4",children:[Ie.jsxs("div",{className:`flex items-center space-x-2 ${Gy(e.transcription.sentimentAnalysis.overall)}`,children:[qy(e.transcription.sentimentAnalysis.overall),Ie.jsx("span",{className:`font-medium capitalize ${t.textSize.body}`,children:e.transcription.sentimentAnalysis.overall})]}),Ie.jsxs("div",{className:"px-3 py-1 rounded-full text-xs font-medium "+(e.transcription.sentimentAnalysis.score>.3?"bg-green-100 text-green-800":e.transcription.sentimentAnalysis.score<-.3?"bg-red-100 text-red-800":"bg-gray-100 text-gray-800"),children:["Score: ",e.transcription.sentimentAnalysis.score.toFixed(2)]})]}),Ie.jsx("div",{className:"grid grid-cols-2 md:grid-cols-5 gap-2",children:Object.entries(e.transcription.sentimentAnalysis.emotions).map(([e,n])=>Ie.jsxs("div",{className:"text-center",children:[Ie.jsx("div",{className:"w-full bg-gray-200 rounded-full h-2 mb-1",children:Ie.jsx("div",{className:"bg-blue-500 h-2 rounded-full",style:{width:100*n+"%"}})}),Ie.jsx("p",{className:`text-gray-600 ${t.textSize.caption} capitalize`,children:e})]},e))})]})}),Ie.jsx("div",{className:"bg-white rounded-lg shadow-lg border",children:Ie.jsxs("div",{className:`${t.cardPadding}`,children:[Ie.jsx("h3",{className:`font-semibold text-gray-900 ${t.textSize.subtitle} mb-4`,children:"Key Phrases"}),Ie.jsx("div",{className:"flex flex-wrap gap-2",children:e.transcription.keyPhrases.slice(0,10).map((e,t)=>Ie.jsxs("span",{className:"px-3 py-1 rounded-full text-xs font-medium "+(e.importance>7?"bg-red-100 text-red-800":e.importance>5?"bg-yellow-100 text-yellow-800":"bg-blue-100 text-blue-800"),children:[e.phrase," (",e.frequency,")"]},t))})]})}),Ie.jsx("div",{className:"bg-white rounded-lg shadow-lg border",children:Ie.jsxs("div",{className:`${t.cardPadding}`,children:[Ie.jsx("h3",{className:`font-semibold text-gray-900 ${t.textSize.subtitle} mb-4`,children:"Full Transcript"}),Ie.jsx("div",{className:"space-y-3 max-h-96 overflow-y-auto",children:(n?i:e.transcription.fullTranscript).map(r=>{const i=e.transcription.speakers.find(e=>e.id===r.speakerId);return Ie.jsxs("div",{className:"flex space-x-3 p-3 hover:bg-gray-50 rounded-lg",children:[Ie.jsx("div",{className:"flex-shrink-0",children:Ie.jsx("div",{className:"w-8 h-8 bg-blue-100 rounded-full flex items-center justify-center",children:Ie.jsx("span",{className:"text-xs font-medium text-blue-800",children:(null==i?void 0:i.name.charAt(0))||"U"})})}),Ie.jsxs("div",{className:"flex-1",children:[Ie.jsxs("div",{className:"flex items-center space-x-2 mb-1",children:[Ie.jsx("span",{className:`font-medium text-gray-900 ${t.textSize.body}`,children:(null==i?void 0:i.name)||"Unknown"}),Ie.jsx("span",{className:`text-gray-500 ${t.textSize.caption}`,children:(a=r.timestamp,`${Math.floor(a/60)}:${Math.floor(a%60).toString().padStart(2,"0")}`)}),r.sentiment&&Ie.jsx("span",{className:`${Gy(r.sentiment)} ${t.textSize.caption}`,children:qy(r.sentiment)})]}),Ie.jsx("p",{className:`text-gray-700 ${t.textSize.body}`,children:n?r.text.split(new RegExp(`(${n})`,"gi")).map((e,t)=>e.toLowerCase()===n.toLowerCase()?Ie.jsx("mark",{className:"bg-yellow-200",children:e},t):e):r.text}),Ie.jsx("div",{className:"flex items-center space-x-2 mt-1",children:Ie.jsxs("span",{className:`text-gray-500 ${t.textSize.caption}`,children:["Confidence: ",r.confidence,"%"]})})]})]},r.id);var a})}),n&&0===i.length&&Ie.jsxs("div",{className:"text-center py-8",children:[Ie.jsx(em,{className:"w-8 h-8 text-gray-400 mx-auto mb-2"}),Ie.jsxs("p",{className:`text-gray-600 ${t.textSize.body}`,children:['No results found for "',n,'"']})]})]})})]}):Ie.jsxs("div",{className:"bg-white rounded-lg shadow-lg border p-8 text-center",children:[Ie.jsx(kf,{className:"w-12 h-12 text-gray-400 mx-auto mb-4"}),Ie.jsx("h3",{className:`font-medium text-gray-900 ${t.textSize.subtitle} mb-2`,children:"No Transcription Available"}),Ie.jsx("p",{className:`text-gray-600 ${t.textSize.body}`,children:"Transcription is not available for this call."})]})}const ev=(e,t)=>{const n=Math.floor(1800*Math.random())+300,r=new Date(Date.now()-864e5*Math.random()),i=[{id:"participant-1",name:"John Smith",role:"caller",phoneNumber:"+1 (555) 123-4567",email:"john.smith@logistics.com",company:"Logistics Solutions Inc.",joinTime:r,leaveTime:new Date(r.getTime()+1e3*n)},{id:"participant-2",name:t.split(" ")[0]+" Representative",role:"receiver",phoneNumber:"+1 (555) 987-6543",email:`contact@${t.toLowerCase().replace(/\s+/g,"")}.com`,company:t,joinTime:new Date(r.getTime()+15e3),leaveTime:new Date(r.getTime()+1e3*n)}],a={overallScore:Math.floor(2*Math.random())+4,signalStrength:Math.floor(20*Math.random())+80,latency:Math.floor(50*Math.random())+20,jitter:Math.floor(10*Math.random())+2,packetLoss:2*Math.random(),audioQuality:["excellent","good","fair"][Math.floor(3*Math.random())],connectionStability:["stable","unstable"][Math.floor(2*Math.random())]},o={ipAddress:`192.168.${Math.floor(255*Math.random())}.${Math.floor(255*Math.random())}`,connectionType:["wifi","ethernet","cellular"][Math.floor(3*Math.random())],bandwidth:Math.floor(500*Math.random())+100,provider:["Verizon","AT&T","Comcast","Spectrum"][Math.floor(4*Math.random())],location:{city:["New York","Los Angeles","Chicago","Houston","Phoenix"][Math.floor(5*Math.random())],state:["NY","CA","IL","TX","AZ"][Math.floor(5*Math.random())],country:"United States"}},s={browser:["Chrome","Firefox","Safari","Edge"][Math.floor(4*Math.random())],browserVersion:`${Math.floor(20*Math.random())+90}.0.${Math.floor(10*Math.random())}.${Math.floor(100*Math.random())}`,operatingSystem:["Windows","macOS","Linux"][Math.floor(3*Math.random())],osVersion:["11","10.15","20.04"][Math.floor(3*Math.random())],microphone:["Built-in Microphone","USB Headset","Bluetooth Headset"][Math.floor(3*Math.random())],speaker:["Built-in Speakers","USB Headset","Bluetooth Headset"][Math.floor(3*Math.random())],camera:Math.random()>.5?"Built-in Camera":void 0,deviceType:["desktop","mobile","tablet"][Math.floor(3*Math.random())]},A={audioCodec:["Opus","G.722","G.711"][Math.floor(3*Math.random())],bitrate:Math.floor(64*Math.random())+32,sampleRate:[8e3,16e3,48e3][Math.floor(3*Math.random())],channels:Math.random()>.5?2:1,compression:["Lossless","Lossy"][Math.floor(2*Math.random())]},l={rtpPackets:{sent:Math.floor(1e4*Math.random())+5e3,received:Math.floor(1e4*Math.random())+5e3,lost:Math.floor(100*Math.random())+10},bandwidth:{upload:Math.floor(100*Math.random())+50,download:Math.floor(200*Math.random())+100},cpu:{usage:Math.floor(30*Math.random())+10,temperature:Math.floor(20*Math.random())+45},memory:{used:Math.floor(2048*Math.random())+512,available:Math.floor(4096*Math.random())+2048}},c={id:`transcript-${e}`,fullTranscript:[{id:"segment-1",speakerId:"participant-1",text:`Hello, this is John from Logistics Solutions. I'm calling about a shipment from ${["Chicago","New York","Los Angeles"][Math.floor(3*Math.random())]} to ${["Miami","Seattle","Denver"][Math.floor(3*Math.random())]}.`,timestamp:5,duration:8,confidence:95,sentiment:"neutral"},{id:"segment-2",speakerId:"participant-2",text:`Hi John, thanks for calling ${t}. I'd be happy to help you with that shipment. Can you tell me more about the cargo details?`,timestamp:15,duration:6,confidence:92,sentiment:"positive"},{id:"segment-3",speakerId:"participant-1",text:`Sure! We have ${Math.floor(20*Math.random())+5} pallets of ${["electronics","automotive parts","consumer goods","machinery"][Math.floor(4*Math.random())]}, total weight around ${Math.floor(3e4*Math.random())+1e4} pounds. We need it delivered by ${new Date(Date.now()+6048e5*Math.random()).toLocaleDateString()}.`,timestamp:23,duration:12,confidence:88,sentiment:"neutral"},{id:"segment-4",speakerId:"participant-2",text:`That sounds manageable. For that route and timeline, we can offer a rate of $${(2e3*Math.random()+1500).toFixed(2)} for the full load. Does that work within your budget?`,timestamp:38,duration:9,confidence:94,sentiment:"positive"},{id:"segment-5",speakerId:"participant-1",text:`That's a bit higher than we were hoping for. Our budget is closer to $${(1500*Math.random()+1200).toFixed(2)}. Is there any flexibility on the pricing?`,timestamp:50,duration:8,confidence:90,sentiment:"negative"},{id:"segment-6",speakerId:"participant-2",text:`I understand your budget constraints. Let me check with my manager... Okay, I can do $${(1800*Math.random()+1400).toFixed(2)} as our best offer. That includes full insurance coverage.`,timestamp:62,duration:11,confidence:87,sentiment:"neutral"},{id:"segment-7",speakerId:"participant-1",text:"That works better for us. Let's move forward with that rate. What's the next step to book this shipment?",timestamp:76,duration:7,confidence:93,sentiment:"positive"},{id:"segment-8",speakerId:"participant-2",text:`Excellent! I'll send you a booking confirmation within the next hour. You'll receive pickup instructions and our driver's contact information. Thank you for choosing ${t}!`,timestamp:85,duration:10,confidence:96,sentiment:"positive"}],speakers:[{id:"participant-1",name:"John Smith",voiceProfile:{pitch:120,tone:"professional",accent:"American Midwest"},speakingTime:Math.floor(.45*n),wordCount:245},{id:"participant-2",name:t.split(" ")[0]+" Representative",voiceProfile:{pitch:140,tone:"friendly",accent:"American South"},speakingTime:Math.floor(.55*n),wordCount:198}],sentimentAnalysis:{overall:"positive",score:.65,emotions:{joy:.3,anger:.1,fear:.05,sadness:.02,surprise:.15},trends:[{timestamp:0,sentiment:"neutral",score:0},{timestamp:20,sentiment:"positive",score:.3},{timestamp:50,sentiment:"negative",score:-.2},{timestamp:70,sentiment:"positive",score:.6},{timestamp:90,sentiment:"positive",score:.8}]},keyPhrases:[{phrase:"shipment",frequency:8,importance:9,category:"business",timestamps:[5,15,23,76]},{phrase:"rate",frequency:6,importance:8,category:"business",timestamps:[38,50,62]},{phrase:"budget",frequency:4,importance:7,category:"business",timestamps:[50,62]},{phrase:"insurance",frequency:2,importance:6,category:"business",timestamps:[62]},{phrase:"delivery",frequency:3,importance:7,category:"business",timestamps:[23,76]},{phrase:"pallets",frequency:2,importance:5,category:"technical",timestamps:[23]},{phrase:"thank you",frequency:2,importance:4,category:"emotional",timestamps:[15,85]}],summary:`Successful negotiation call between John Smith from Logistics Solutions and ${t} representative. Discussed shipment details, negotiated pricing from initial quote to agreed rate, and finalized booking. Call resulted in confirmed shipment booking with insurance coverage.`,confidence:91,language:"English"},u={recordingUrl:`https://recordings.example.com/calls/${e}.mp3`,recordingSize:Math.floor(5e7*Math.random())+1e7,callCost:5*Math.random()+2,region:"US-East",serverLocation:"Virginia, USA",encryption:!0,compliance:{gdpr:!0,hipaa:!1,sox:!0}},d={outcome:Math.random()>.2?"successful":"failed",reason:Math.random()>.2?"Agreement reached on pricing and terms":"Unable to meet budget requirements",followUpRequired:Math.random()>.7,nextAction:Math.random()>.7?"Send booking confirmation":void 0,dealValue:3e3*Math.random()+1e3,agreementReached:Math.random()>.2};return{id:`call-details-${e}`,callId:e,timestamp:r,duration:n,participants:i,direction:Math.random()>.5?"outbound":"inbound",status:"completed",result:d,quality:a,network:o,device:s,codec:A,technicalParams:l,transcription:c,metadata:u}};function tv(){const{theme:e}=ea(),{callId:t}=dg(),n=Ag(),r=ug(),i=n.state,[a,o]=Te.useState(null);Te.useEffect(()=>{var e;if(!t)return void r("/search",{replace:!0});const n=null==(e=null==i?void 0:i.callQueueItems)?void 0:e.find(e=>e.id===t);if(n){const e=ev(t,n.carrierName);o(e)}else{const e=ev(t,"Unknown Carrier");o(e)}},[t,i,r]);return a?Ie.jsx("div",{className:"flex flex-col h-full",style:{fontFamily:e.fontFamily},children:Ie.jsx("div",{className:"flex-1 overflow-y-auto",children:Ie.jsx(Xy,{callDetails:a,onBack:()=>{(null==i?void 0:i.fromCallLogs)?r("/call-logs"):(null==i?void 0:i.searchResults)&&(null==i?void 0:i.searchMetadata)?r("/results",{state:i}):r("/search")},theme:e})})}):Ie.jsx("div",{className:"flex-1 flex items-center justify-center p-8",children:Ie.jsx("div",{className:"text-center",children:Ie.jsx("p",{className:"text-gray-600",style:{fontFamily:e.fontFamily},children:"Loading call details..."})})})}ev("call-1","Swift Transport"),ev("call-2","Reliable Freight"),ev("call-3","Express Logistics");const nv=({isOpen:e,onClose:t,onConfirm:n,title:r,message:i,confirmText:a="Confirm",cancelText:o="Cancel",isLoading:s=!1,variant:A="danger",containedMode:l=!1})=>{if(!e)return null;const c=(()=>{switch(A){case"danger":default:return{icon:"text-red-500",confirmButton:"bg-red-600 hover:bg-red-700 focus:ring-red-500",iconBg:"bg-red-100"};case"warning":return{icon:"text-yellow-500",confirmButton:"bg-yellow-600 hover:bg-yellow-700 focus:ring-yellow-500",iconBg:"bg-yellow-100"};case"info":return{icon:"text-blue-500",confirmButton:"bg-blue-600 hover:bg-blue-700 focus:ring-blue-500",iconBg:"bg-blue-100"}}})(),u=l?"absolute inset-0 z-50 overflow-y-auto":"fixed inset-0 z-50 overflow-y-auto",d=l?"absolute inset-0 bg-black bg-opacity-50 transition-opacity":"fixed inset-0 bg-black bg-opacity-50 transition-opacity";return Ie.jsxs("div",{className:u,children:[Ie.jsx("div",{className:d,onClick:t}),Ie.jsx("div",{className:"flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0",children:Ie.jsxs("div",{className:"relative transform overflow-hidden rounded-lg bg-white text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-lg",children:[Ie.jsx("div",{className:"bg-white px-4 pb-4 pt-5 sm:p-6 sm:pb-4",children:Ie.jsxs("div",{className:"sm:flex sm:items-start",children:[Ie.jsx("div",{className:`mx-auto flex h-12 w-12 flex-shrink-0 items-center justify-center rounded-full ${c.iconBg} sm:mx-0 sm:h-10 sm:w-10`,children:Ie.jsx(hm,{className:`h-6 w-6 ${c.icon}`})}),Ie.jsxs("div",{className:"mt-3 text-center sm:ml-4 sm:mt-0 sm:text-left flex-1",children:[Ie.jsxs("div",{className:"flex items-center justify-between",children:[Ie.jsx("h3",{className:"text-base font-semibold leading-6 text-gray-900",children:r}),Ie.jsxs("button",{type:"button",className:"rounded-md bg-white text-gray-400 hover:text-gray-600 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2",onClick:t,children:[Ie.jsx("span",{className:"sr-only",children:"Close"}),Ie.jsx(wm,{className:"h-6 w-6"})]})]}),Ie.jsx("div",{className:"mt-2",children:Ie.jsx("p",{className:"text-sm text-gray-500",children:i})})]})]})}),Ie.jsxs("div",{className:"bg-gray-50 px-4 py-3 sm:flex sm:flex-row-reverse sm:px-6",children:[Ie.jsx("button",{type:"button",className:`inline-flex w-full justify-center rounded-md px-3 py-2 text-sm font-semibold text-white shadow-sm sm:ml-3 sm:w-auto ${c.confirmButton} focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed`,onClick:n,disabled:s,children:s?Ie.jsxs(Ie.Fragment,{children:[Ie.jsxs("svg",{className:"animate-spin -ml-1 mr-2 h-4 w-4 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[Ie.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),Ie.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Processing..."]}):a}),Ie.jsx("button",{type:"button",className:"mt-3 inline-flex w-full justify-center rounded-md bg-white px-3 py-2 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 sm:mt-0 sm:w-auto",onClick:t,disabled:s,children:o})]})]})})]})};function rv({fetchData:e,pageSize:t=10,initialData:n=[],enabled:r=!0,dependencies:i=[]}){const[a,o]=Te.useState(n),[s,A]=Te.useState(!1),[l,c]=Te.useState(null),[u,d]=Te.useState(!0),[h,p]=Te.useState(0),[f,m]=Te.useState(0),g=Te.useRef(!1),y=Te.useCallback(async()=>{if(r&&!s&&u&&!g.current){g.current=!0,A(!0),c(null);try{const n=h+1,r=await e(n,t);o(e=>[...e,...r.data]),d(r.hasMore),p(n),void 0!==r.total&&m(r.total)}catch(n){c(n instanceof Error?n.message:"Failed to load data")}finally{A(!1),g.current=!1}}},[r,u,h,e,t]),v=Te.useCallback(async()=>{if(r){o([]),p(0),d(!0),c(null),m(0),g.current=!1,A(!0);try{const n=await e(1,t);o(n.data),d(n.hasMore),p(1),void 0!==n.total&&m(n.total)}catch(n){c(n instanceof Error?n.message:"Failed to load data")}finally{A(!1)}}},[r,e,t]);return Te.useEffect(()=>{i.length>0&&v()},i),Te.useEffect(()=>{r&&0===a.length&&0===h&&!s&&y()},[r,a.length,h,s]),{data:a,loading:s,error:l,hasMore:u,loadMore:y,refresh:v,total:f,currentPage:h}}function iv(e,t,n,r=100){const i=Te.useRef(null);return Te.useEffect(()=>{const a=i.current;if(!a||!t||n)return;const o=new IntersectionObserver(t=>{t[0].isIntersecting&&e()},{rootMargin:`${r}px`,threshold:.1});return o.observe(a),()=>{o.disconnect()}},[e,t,n,r]),i}function av({item:e,onView:t,onDelete:n,theme:r,config:i}){var a;const o="searchFormData"in e,s=e.title,A=o?e.searchFormData.origin:e.origin,l=o?e.searchFormData.destination:e.destination,c=o?e.searchFormData.equipmentType:e.cargoType,u=o?e.searchFormData.pickupEarliest:null==(a=e.pickupDate)?void 0:a.split("T")[0],d=o?e.resultsCount:e.totalCarriers,h=o?e.timestamp:e.createdAt,p=o?"completed":e.status,f=jy(p);return Ie.jsx(ch.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},whileHover:{scale:1.01},transition:{duration:.2},children:Ie.jsx(Cy,{className:`${i.cardPadding} ${i.cardHeight} transition-all duration-200 hover:shadow-md border`,style:{fontFamily:r.fontFamily},children:Ie.jsxs("div",{className:"flex items-start justify-between",children:[Ie.jsxs("div",{className:"flex-1 min-w-0",children:[Ie.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[Ie.jsx(em,{className:`${i.iconSize} text-gray-500 flex-shrink-0`}),Ie.jsx("h3",{className:`font-medium ${i.textSize.title} truncate`,children:s}),!f&&Ie.jsx("div",{className:"flex items-center gap-1",children:Ie.jsx("span",{className:"px-2 py-1 text-xs rounded-full bg-yellow-100 text-yellow-800",children:p})})]}),Ie.jsxs("div",{className:`${i.spacing} mb-3`,children:[Ie.jsxs("div",{className:"flex items-center gap-2",children:[Ie.jsx(Pf,{className:`${i.iconSize} text-gray-400`}),Ie.jsxs("span",{className:`text-gray-600 ${i.textSize.body} truncate`,children:[A," → ",l]})]}),Ie.jsxs("div",{className:"flex items-center gap-4",children:[Ie.jsxs("div",{className:"flex items-center gap-1",children:[Ie.jsx(pm,{className:`${i.iconSize} text-gray-400`}),Ie.jsx("span",{className:`text-gray-600 ${i.textSize.caption}`,children:c})]}),Ie.jsxs("div",{className:"flex items-center gap-1",children:[Ie.jsx(af,{className:`${i.iconSize} text-gray-400`}),Ie.jsx("span",{className:`text-gray-600 ${i.textSize.caption}`,children:u})]})]})]}),Ie.jsxs("div",{className:"flex items-center gap-4 text-gray-500",children:[Ie.jsxs("div",{className:"flex items-center gap-1",children:[Ie.jsx(yf,{className:`${i.iconSize}`}),Ie.jsx("span",{className:i.textSize.caption,children:h.toLocaleDateString()})]}),Ie.jsxs("span",{className:i.textSize.caption,children:[d," result",1!==d?"s":""]})]})]}),Ie.jsxs("div",{className:"flex items-center gap-1 ml-2",children:[Ie.jsxs(Up,{variant:"ghost",size:"sm",onClick:e=>{e.stopPropagation(),n()},className:`${i.buttonSize} p-1 text-gray-400 hover:text-red-500`,children:[Ie.jsx(cm,{className:i.iconSize}),Ie.jsx("span",{className:"sr-only",children:"Delete search"})]}),Ie.jsxs(Up,{variant:"ghost",size:"sm",onClick:t,className:`${i.buttonSize} text-blue-600 hover:text-blue-800 hover:bg-blue-50`,disabled:!f,children:[f?Ie.jsx(Ef,{className:i.iconSize}):Ie.jsx(Nf,{className:`${i.iconSize} animate-spin`}),Ie.jsx("span",{className:"hidden sm:inline ml-1",children:f?"View":"Processing"})]})]})]})})})}function ov({theme:e,config:t}){return Ie.jsx("div",{className:"flex-1 flex items-center justify-center p-8",children:Ie.jsxs("div",{className:"text-center",children:[Ie.jsx("div",{className:"w-16 h-16 rounded-full flex items-center justify-center mx-auto mb-4",style:{backgroundColor:e.primaryColor+"20"},children:Ie.jsx(em,{className:"h-8 w-8",style:{color:e.primaryColor}})}),Ie.jsx("h3",{className:`${t.textSize.title} font-semibold mb-2`,style:{fontFamily:e.fontFamily},children:"No search history"}),Ie.jsx("p",{className:`text-gray-600 ${t.textSize.body}`,style:{fontFamily:e.fontFamily},children:"Your carrier searches will appear here."})]})})}function sv({config:e}){return Ie.jsx("div",{className:"flex justify-center py-4",children:Ie.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-primary"})})}function Av(){const{theme:e}=ea(),t=ug(),{width:n,containerRef:r}=(()=>{const[e,t]=Te.useState(0),n=Te.useRef(null);return Te.useEffect(()=>{const e=()=>{n.current&&t(n.current.offsetWidth)};e();const r=new ResizeObserver(e);return n.current&&r.observe(n.current),()=>r.disconnect()},[]),{width:e,containerRef:n}})(),i=(e=>e<380?{containerPadding:"p-2",cardPadding:"p-3",spacing:"space-y-2",textSize:{title:"text-xs",subtitle:"text-xs",body:"text-xs",caption:"text-xs"},iconSize:"w-3 h-3",buttonSize:"px-2 py-1 text-xs",headerPadding:"p-3",cardHeight:"min-h-[110px]",maxCardsVisible:2.8}:e<450?{containerPadding:"p-2",cardPadding:"p-3",spacing:"space-y-2",textSize:{title:"text-sm",subtitle:"text-xs",body:"text-xs",caption:"text-xs"},iconSize:"w-3 h-3",buttonSize:"px-2 py-1 text-xs",headerPadding:"p-3",cardHeight:"min-h-[120px]",maxCardsVisible:2.5}:e<600?{containerPadding:"p-3",cardPadding:"p-3",spacing:"space-y-2",textSize:{title:"text-sm",subtitle:"text-xs",body:"text-xs",caption:"text-xs"},iconSize:"w-4 h-4",buttonSize:"px-3 py-1 text-xs",headerPadding:"p-3",cardHeight:"min-h-[130px]",maxCardsVisible:2.2}:{containerPadding:"p-4",cardPadding:"p-4",spacing:"space-y-3",textSize:{title:"text-sm",subtitle:"text-xs",body:"text-xs",caption:"text-xs"},iconSize:"w-4 h-4",buttonSize:"px-3 py-2 text-sm",headerPadding:"p-4",cardHeight:"min-h-[140px]",maxCardsVisible:2})(n),[a,o]=Te.useState(!1),[s,A]=Te.useState(!1),[l,c]=Te.useState(""),[u,d]=Te.useState(""),[h,p]=Te.useState({isOpen:!1,workflowId:null,workflowName:""}),{fetchWorkflowPage:f}=Iy(),m=Ty({onSuccess:()=>{p({isOpen:!1,workflowId:null,workflowName:""}),B()},onError:e=>{console.error("Failed to delete workflow:",e)}}),g=Te.useCallback((e,t)=>f(e),[f]),{data:y,loading:v,error:w,hasMore:x,loadMore:b,refresh:B}=rv({fetchData:g,pageSize:10,enabled:!0,dependencies:[l,u]}),C=iv(b,x,v),E=async e=>{var n,r,i;if(jy(e.status))try{const n=e.workflow_id||e.id;t("/results",{state:{workflowId:n,isFromHistory:!0}})}catch(a){console.error("Error viewing workflow:",a);const o={origin:e.origin,destination:e.destination,pickupEarliest:(null==(n=e.pickupDate)?void 0:n.split("T")[0])||"",pickupHours:"08:00",dropoffHours:"17:00",equipmentType:e.cargoType,length:"48",weight:(null==(r=e.weight)?void 0:r.toString())||"40000",volume:(null==(i=e.volume)?void 0:i.toString())||"2000"},{results:s,metadata:A}=(e=>{const t=Ky.filter(t=>"Dry Van"===e.equipmentType||"Dry Van"!==t.equipment||Math.random()>.3).map(e=>({...e,price:e.price+Math.floor(500*Math.random())-250,isSelected:!1}));return{results:t,metadata:{searchId:"search-"+Date.now(),timestamp:new Date,totalResults:t.length,searchCriteria:{origin:e.origin,destination:e.destination,pickupDate:e.pickupEarliest,equipmentType:e.equipmentType,weight:parseInt(e.weight)||4e4,volume:parseInt(e.volume||"2000")}}}})(o);t("/results",{state:{searchResults:s,searchMetadata:A,searchFormData:o}})}};return Ie.jsxs("div",{ref:r,className:"flex flex-col h-full relative",style:{fontFamily:e.fontFamily},children:[Ie.jsxs("div",{className:"border-b",children:[Ie.jsxs("button",{onClick:()=>o(!a),className:`w-full ${i.headerPadding} flex items-center justify-between hover:bg-gray-50 transition-colors`,children:[Ie.jsxs("div",{className:"flex items-center gap-2",children:[Ie.jsx(em,{className:i.iconSize}),Ie.jsx("span",{className:`${i.textSize.body} font-medium`,children:"Search History"})]}),a?Ie.jsx(hf,{className:i.iconSize}):Ie.jsx(cf,{className:i.iconSize})]}),a&&Ie.jsx(ch.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},className:"overflow-hidden",children:Ie.jsx("div",{className:i.containerPadding,children:Ie.jsxs("div",{className:"relative",children:[Ie.jsx(em,{className:`absolute left-3 top-1/2 transform -translate-y-1/2 ${i.iconSize} text-gray-400`}),Ie.jsx("input",{type:"text",placeholder:"Search your history...",value:l,onChange:e=>c(e.target.value),className:`w-full pl-10 pr-10 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent ${i.textSize.body}`}),l&&Ie.jsx("button",{onClick:()=>c(""),className:"absolute right-3 top-1/2 transform -translate-y-1/2 text-gray-400 hover:text-gray-600",children:Ie.jsx(wm,{className:i.iconSize})})]})})})]}),Ie.jsxs("div",{className:"border-b",children:[Ie.jsxs("button",{onClick:()=>A(!s),className:`w-full ${i.headerPadding} flex items-center justify-between hover:bg-gray-50 transition-colors`,children:[Ie.jsxs("div",{className:"flex items-center gap-2",children:[Ie.jsx(Sf,{className:i.iconSize}),Ie.jsx("span",{className:`${i.textSize.body} font-medium`,children:"Filters"}),u&&Ie.jsx("span",{className:`${i.textSize.caption} bg-blue-100 text-blue-800 px-2 py-1 rounded-full`,children:u})]}),s?Ie.jsx(hf,{className:i.iconSize}):Ie.jsx(cf,{className:i.iconSize})]}),s&&Ie.jsx(ch.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},className:"overflow-hidden",children:Ie.jsx("div",{className:i.containerPadding,children:Ie.jsxs("div",{className:"flex flex-wrap gap-2",children:[Ie.jsx("button",{onClick:()=>d(""),className:"px-3 py-1 rounded-full text-xs border transition-colors "+(""===u?"bg-blue-500 text-white border-blue-500":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:"All"}),Ie.jsx("button",{onClick:()=>d("Dry Van"),className:"px-3 py-1 rounded-full text-xs border transition-colors "+("Dry Van"===u?"bg-blue-500 text-white border-blue-500":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:"Dry Van"}),Ie.jsx("button",{onClick:()=>d("Refrigerated"),className:"px-3 py-1 rounded-full text-xs border transition-colors "+("Refrigerated"===u?"bg-blue-500 text-white border-blue-500":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:"Refrigerated"}),Ie.jsx("button",{onClick:()=>d("Flatbed"),className:"px-3 py-1 rounded-full text-xs border transition-colors "+("Flatbed"===u?"bg-blue-500 text-white border-blue-500":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:"Flatbed"})]})})})]}),Ie.jsxs("div",{className:"flex-1 overflow-y-auto",children:[w&&Ie.jsx("div",{className:"p-4",children:Ie.jsxs("div",{className:"bg-red-50 border border-red-200 rounded-lg p-4",children:[Ie.jsxs("p",{className:"text-red-800 text-sm",children:["Failed to load search history: ",w]}),Ie.jsx(Up,{onClick:B,className:"mt-2 text-sm bg-red-600 text-white hover:bg-red-700",children:"Retry"})]})}),w||0!==y.length||v?Ie.jsxs("div",{className:`${i.containerPadding} ${i.spacing}`,children:[y.map(t=>Ie.jsx(av,{item:t,onView:()=>E(t),onDelete:()=>(e=>{p({isOpen:!0,workflowId:e.workflow_id||e.id,workflowName:e.workflow_name||`${e.origin} → ${e.destination}`})})(t),theme:e,config:i},t.id)),v&&Ie.jsx(sv,{config:i}),x&&Ie.jsx("div",{ref:C,className:"h-4"}),!x&&y.length>0&&Ie.jsx("div",{className:"text-center py-4",children:Ie.jsx("p",{className:`text-gray-500 ${i.textSize.caption}`,children:"No more search history to load"})})]}):Ie.jsx(ov,{theme:e,config:i})]}),Ie.jsx(nv,{isOpen:h.isOpen,onClose:()=>{p({isOpen:!1,workflowId:null,workflowName:""})},onConfirm:()=>{h.workflowId&&m.mutate(h.workflowId)},title:"Delete Workflow",message:`Are you sure you want to delete "${h.workflowName}"? This action cannot be undone.`,confirmText:"Delete",cancelText:"Cancel",isLoading:m.isPending,variant:"danger",containedMode:!0})]})}function lv({theme:e,config:t}){return Ie.jsx("div",{className:"flex-1 flex items-center justify-center p-8",children:Ie.jsxs("div",{className:"text-center",children:[Ie.jsx("div",{className:"w-16 h-16 rounded-full flex items-center justify-center mx-auto mb-4",style:{backgroundColor:e.primaryColor+"20"},children:Ie.jsx($f,{className:"h-8 w-8",style:{color:e.primaryColor}})}),Ie.jsx("h3",{className:`${t.textSize.title} font-semibold mb-2`,style:{fontFamily:e.fontFamily},children:"No call logs found"}),Ie.jsx("p",{className:`text-gray-600 ${t.textSize.body}`,style:{fontFamily:e.fontFamily},children:"Try adjusting your filters or search terms."})]})})}function cv({config:e}){return Ie.jsx("div",{className:"flex justify-center py-4",children:Ie.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-primary"})})}function uv(){const{theme:e}=ea(),{width:t,containerRef:n}=(()=>{const[e,t]=Te.useState(0),n=Te.useRef(null);return Te.useEffect(()=>{const e=()=>{n.current&&t(n.current.offsetWidth)};e();const r=new ResizeObserver(e);return n.current&&r.observe(n.current),()=>r.disconnect()},[]),{width:e,containerRef:n}})(),r=(e=>e<380?{containerPadding:"p-2",cardPadding:"p-3",spacing:"space-y-2",textSize:{title:"text-xs",subtitle:"text-xs",body:"text-xs",caption:"text-xs"},iconSize:"w-3 h-3",buttonSize:"px-2 py-1 text-xs",headerPadding:"p-3",filterPadding:"p-2",inputSize:"text-xs"}:e<450?{containerPadding:"p-3",cardPadding:"p-3",spacing:"space-y-2",textSize:{title:"text-sm",subtitle:"text-xs",body:"text-xs",caption:"text-xs"},iconSize:"w-3 h-3",buttonSize:"px-2 py-1 text-xs",headerPadding:"p-3",filterPadding:"p-2",inputSize:"text-xs"}:e<600?{containerPadding:"p-4",cardPadding:"p-4",spacing:"space-y-3",textSize:{title:"text-sm",subtitle:"text-xs",body:"text-xs",caption:"text-xs"},iconSize:"w-4 h-4",buttonSize:"px-3 py-1 text-xs",headerPadding:"p-4",filterPadding:"p-3",inputSize:"text-sm"}:{containerPadding:"p-4",cardPadding:"p-4",spacing:"space-y-3",textSize:{title:"text-sm",subtitle:"text-xs",body:"text-xs",caption:"text-xs"},iconSize:"w-4 h-4",buttonSize:"px-3 py-2 text-sm",headerPadding:"p-4",filterPadding:"p-4",inputSize:"text-sm"})(t),i=ug(),[a,o]=Te.useState(!1),[s,A]=Te.useState(!1),[l,c]=Te.useState(""),[u,d]=Te.useState(""),[h,p]=Te.useState(""),[f,m]=Te.useState({search:l,status:u,carrier:"",dealStatus:h,dateRange:{start:"",end:""}});Te.useEffect(()=>{m(e=>({...e,search:l,status:u,dealStatus:h}))},[l,u,h]);const g=Te.useCallback((e,t)=>((e,t,n)=>new Promise(r=>{setTimeout(()=>{const i=[],a=(e-1)*t,o=["Swift Transportation","J.B. Hunt","Schneider","Werner Enterprises","C.R. England"],s=["New York, NY","Los Angeles, CA","Chicago, IL","Houston, TX","Phoenix, AZ"],A=["Miami, FL","Seattle, WA","Denver, CO","Atlanta, GA","Boston, MA"],l=["waiting","in-progress","completed","failed"],c=["pending","negotiating","agreed","declined"];for(let e=0;e<t;e++){const t=a+e;if(t>=100)break;const r=o[t%o.length],u=s[t%s.length],d=A[t%A.length],h=l[t%l.length],p=c[t%c.length];if(n.search&&!r.toLowerCase().includes(n.search.toLowerCase())&&!u.toLowerCase().includes(n.search.toLowerCase())&&!d.toLowerCase().includes(n.search.toLowerCase()))continue;if(n.status&&h!==n.status)continue;if(n.carrier&&!r.toLowerCase().includes(n.carrier.toLowerCase()))continue;if(n.dealStatus&&p!==n.dealStatus)continue;const f=new Date(Date.now()-30*Math.random()*24*60*60*1e3);n.dateRange.start&&f<new Date(n.dateRange.start)||n.dateRange.end&&f>new Date(n.dateRange.end)||i.push({id:`call-${t+1}`,carrierName:r,callDuration:Math.floor(30*Math.random())+5,maxDuration:45,callStatus:h,dealStatus:p,agreedRate:"agreed"===p?Math.floor(3e3*Math.random())+1500:null,contactInfo:`+1-555-${String(Math.floor(9e3*Math.random())+1e3)}`,notes:`Call notes for ${r}`})}r({data:i,hasMore:a+t<100,total:100})},300)}))(e,t,f),[f]),{data:y,loading:v,error:w,hasMore:x,loadMore:b,refresh:B}=rv({fetchData:g,pageSize:10,enabled:!0,dependencies:[f]}),C=iv(b,x,v);return Ie.jsxs("div",{ref:n,className:"flex flex-col h-full",style:{fontFamily:e.fontFamily},children:[Ie.jsxs("div",{className:"border-b",children:[Ie.jsxs("button",{onClick:()=>o(!a),className:`w-full ${r.headerPadding} flex items-center justify-between hover:bg-gray-50 transition-colors`,children:[Ie.jsxs("div",{className:"flex items-center gap-2",children:[Ie.jsx(em,{className:r.iconSize}),Ie.jsx("span",{className:`${r.textSize.body} font-medium`,children:"Search Calls"})]}),a?Ie.jsx(hf,{className:r.iconSize}):Ie.jsx(cf,{className:r.iconSize})]}),a&&Ie.jsx(ch.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},className:"overflow-hidden",children:Ie.jsx("div",{className:r.containerPadding,children:Ie.jsxs("div",{className:"relative",children:[Ie.jsx(em,{className:`absolute left-3 top-1/2 transform -translate-y-1/2 ${r.iconSize} text-gray-400`}),Ie.jsx("input",{type:"text",placeholder:"Search calls, carriers, locations...",value:l,onChange:e=>c(e.target.value),className:`w-full pl-10 pr-10 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent ${r.textSize.body}`}),l&&Ie.jsx("button",{onClick:()=>c(""),className:"absolute right-3 top-1/2 transform -translate-y-1/2 text-gray-400 hover:text-gray-600",children:Ie.jsx(wm,{className:r.iconSize})})]})})})]}),Ie.jsxs("div",{className:"border-b",children:[Ie.jsxs("button",{onClick:()=>A(!s),className:`w-full ${r.headerPadding} flex items-center justify-between hover:bg-gray-50 transition-colors`,children:[Ie.jsxs("div",{className:"flex items-center gap-2",children:[Ie.jsx(Sf,{className:r.iconSize}),Ie.jsx("span",{className:`${r.textSize.body} font-medium`,children:"Filters"}),(u||h)&&Ie.jsx("span",{className:`${r.textSize.caption} bg-blue-100 text-blue-800 px-2 py-1 rounded-full`,children:u||h})]}),s?Ie.jsx(hf,{className:r.iconSize}):Ie.jsx(cf,{className:r.iconSize})]}),s&&Ie.jsx(ch.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},className:"overflow-hidden",children:Ie.jsx("div",{className:r.containerPadding,children:Ie.jsxs("div",{className:"space-y-3",children:[Ie.jsxs("div",{children:[Ie.jsx("label",{className:`block ${r.textSize.caption} font-medium text-gray-700 mb-2`,children:"Call Status"}),Ie.jsxs("div",{className:"flex flex-wrap gap-2",children:[Ie.jsx("button",{onClick:()=>d(""),className:"px-3 py-1 rounded-full text-xs border transition-colors "+(""===u?"bg-blue-500 text-white border-blue-500":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:"All"}),Ie.jsx("button",{onClick:()=>d("waiting"),className:"px-3 py-1 rounded-full text-xs border transition-colors "+("waiting"===u?"bg-blue-500 text-white border-blue-500":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:"Waiting"}),Ie.jsx("button",{onClick:()=>d("in-progress"),className:"px-3 py-1 rounded-full text-xs border transition-colors "+("in-progress"===u?"bg-blue-500 text-white border-blue-500":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:"In Progress"}),Ie.jsx("button",{onClick:()=>d("completed"),className:"px-3 py-1 rounded-full text-xs border transition-colors "+("completed"===u?"bg-blue-500 text-white border-blue-500":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:"Completed"}),Ie.jsx("button",{onClick:()=>d("failed"),className:"px-3 py-1 rounded-full text-xs border transition-colors "+("failed"===u?"bg-blue-500 text-white border-blue-500":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:"Failed"})]})]}),Ie.jsxs("div",{children:[Ie.jsx("label",{className:`block ${r.textSize.caption} font-medium text-gray-700 mb-2`,children:"Deal Status"}),Ie.jsxs("div",{className:"flex flex-wrap gap-2",children:[Ie.jsx("button",{onClick:()=>p(""),className:"px-3 py-1 rounded-full text-xs border transition-colors "+(""===h?"bg-blue-500 text-white border-blue-500":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:"All"}),Ie.jsx("button",{onClick:()=>p("pending"),className:"px-3 py-1 rounded-full text-xs border transition-colors "+("pending"===h?"bg-blue-500 text-white border-blue-500":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:"Pending"}),Ie.jsx("button",{onClick:()=>p("negotiating"),className:"px-3 py-1 rounded-full text-xs border transition-colors "+("negotiating"===h?"bg-blue-500 text-white border-blue-500":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:"Negotiating"}),Ie.jsx("button",{onClick:()=>p("agreed"),className:"px-3 py-1 rounded-full text-xs border transition-colors "+("agreed"===h?"bg-blue-500 text-white border-blue-500":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:"Agreed"}),Ie.jsx("button",{onClick:()=>p("declined"),className:"px-3 py-1 rounded-full text-xs border transition-colors "+("declined"===h?"bg-blue-500 text-white border-blue-500":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:"Declined"})]})]})]})})})]}),Ie.jsxs("div",{className:"flex-1 overflow-y-auto",children:[w&&Ie.jsx("div",{className:"p-4",children:Ie.jsxs("div",{className:"bg-red-50 border border-red-200 rounded-lg p-4",children:[Ie.jsxs("p",{className:"text-red-800 text-sm",children:["Failed to load call logs: ",w]}),Ie.jsx(Up,{onClick:B,className:"mt-2 text-sm bg-red-600 text-white hover:bg-red-700",children:"Retry"})]})}),w||0!==y.length||v?Ie.jsxs("div",{className:`${r.containerPadding} ${r.spacing}`,children:[y.map(t=>Ie.jsx(_y,{item:t,onViewDetails:()=>{return e=t.id,void i(`/call-logs/${e}`,{state:{callQueueItems:y,fromCallLogs:!0}});var e},theme:e},t.id)),v&&Ie.jsx(cv,{config:r}),Ie.jsx("div",{ref:C,className:"h-4"})]}):Ie.jsx(lv,{theme:e,config:r})]})]})}const dv={currentLead:null,emails:[],isLoading:!1,error:null,isSending:!1,sendError:null},hv=Tp((e,t)=>({...dv,setCurrentLead:t=>{e({currentLead:t})},fetchLeadEmails:async t=>{e({isLoading:!0,error:null});try{const n=[...(await Hp.getLeadEmails(t)).emails].sort((e,t)=>new Date(e.receivedDatetime).getTime()-new Date(t.receivedDatetime).getTime());e({emails:n,isLoading:!1,error:null})}catch(n){console.error("Failed to fetch lead emails:",n),e({isLoading:!1,error:n.message||"Failed to fetch emails",emails:[]})}},sendReply:async(n,r,i,a)=>{e({isSending:!0,sendError:null});try{const o=await Hp.sendEmailReply(n,r,i,a);if(o.success){const n=t().emails;return e({emails:[...n,o.email],isSending:!1,sendError:null}),!0}return e({isSending:!1,sendError:"Failed to send email"}),!1}catch(o){return console.error("Failed to send email:",o),e({isSending:!1,sendError:o.message||"Failed to send email"}),!1}},clearError:()=>{e({error:null,sendError:null})},reset:()=>{e(dv)}}));var pv,fv={exports:{}};var mv=(pv||(pv=1,fv.exports=function(){var e=1e3,t=6e4,n=36e5,r="millisecond",i="second",a="minute",o="hour",s="day",A="week",l="month",c="quarter",u="year",d="date",h="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,f=/\[([^\]]+)]|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,m={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(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}},g=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},y={s:g,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?"+":"-")+g(r,2,"0")+":"+g(i,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),i=t.clone().add(r,l),a=n-i<0,o=t.clone().add(r+(a?-1:1),l);return+(-(r+(n-i)/(a?i-o:o-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:u,w:A,d:s,D:d,h:o,m:a,s:i,ms:r,Q:c}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},v="en",w={};w[v]=m;var x="$isDayjsObject",b=function(e){return e instanceof k||!(!e||!e[x])},B=function e(t,n,r){var i;if(!t)return v;if("string"==typeof t){var a=t.toLowerCase();w[a]&&(i=a),n&&(w[a]=n,i=a);var o=t.split("-");if(!i&&o.length>1)return e(o[0])}else{var s=t.name;w[s]=t,i=s}return!r&&i&&(v=i),i||!r&&v},C=function(e,t){if(b(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new k(n)},E=y;E.l=B,E.i=b,E.w=function(e,t){return C(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var k=function(){function m(e){this.$L=B(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var g=m.prototype;return g.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(E.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(p);if(r){var i=r[2]-1||0,a=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},g.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},g.$utils=function(){return E},g.isValid=function(){return!(this.$d.toString()===h)},g.isSame=function(e,t){var n=C(e);return this.startOf(t)<=n&&n<=this.endOf(t)},g.isAfter=function(e,t){return C(e)<this.startOf(t)},g.isBefore=function(e,t){return this.endOf(t)<C(e)},g.$g=function(e,t,n){return E.u(e)?this[t]:this.set(n,e)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(e,t){var n=this,r=!!E.u(t)||t,c=E.p(e),h=function(e,t){var i=E.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?i:i.endOf(s)},p=function(e,t){return E.w(n.toDate()[e].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},f=this.$W,m=this.$M,g=this.$D,y="set"+(this.$u?"UTC":"");switch(c){case u:return r?h(1,0):h(31,11);case l:return r?h(1,m):h(0,m+1);case A:var v=this.$locale().weekStart||0,w=(f<v?f+7:f)-v;return h(r?g-w:g+(6-w),m);case s:case d:return p(y+"Hours",0);case o:return p(y+"Minutes",1);case a:return p(y+"Seconds",2);case i:return p(y+"Milliseconds",3);default:return this.clone()}},g.endOf=function(e){return this.startOf(e,!1)},g.$set=function(e,t){var n,A=E.p(e),c="set"+(this.$u?"UTC":""),h=(n={},n[s]=c+"Date",n[d]=c+"Date",n[l]=c+"Month",n[u]=c+"FullYear",n[o]=c+"Hours",n[a]=c+"Minutes",n[i]=c+"Seconds",n[r]=c+"Milliseconds",n)[A],p=A===s?this.$D+(t-this.$W):t;if(A===l||A===u){var f=this.clone().set(d,1);f.$d[h](p),f.init(),this.$d=f.set(d,Math.min(this.$D,f.daysInMonth())).$d}else h&&this.$d[h](p);return this.init(),this},g.set=function(e,t){return this.clone().$set(e,t)},g.get=function(e){return this[E.p(e)]()},g.add=function(r,c){var d,h=this;r=Number(r);var p=E.p(c),f=function(e){var t=C(h);return E.w(t.date(t.date()+Math.round(e*r)),h)};if(p===l)return this.set(l,this.$M+r);if(p===u)return this.set(u,this.$y+r);if(p===s)return f(1);if(p===A)return f(7);var m=(d={},d[a]=t,d[o]=n,d[i]=e,d)[p]||1,g=this.$d.getTime()+r*m;return E.w(g,this)},g.subtract=function(e,t){return this.add(-1*e,t)},g.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||h;var r=e||"YYYY-MM-DDTHH:mm:ssZ",i=E.z(this),a=this.$H,o=this.$m,s=this.$M,A=n.weekdays,l=n.months,c=n.meridiem,u=function(e,n,i,a){return e&&(e[n]||e(t,r))||i[n].slice(0,a)},d=function(e){return E.s(a%12||12,e,"0")},p=c||function(e,t,n){var r=e<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(f,function(e,r){return r||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return E.s(t.$y,4,"0");case"M":return s+1;case"MM":return E.s(s+1,2,"0");case"MMM":return u(n.monthsShort,s,l,3);case"MMMM":return u(l,s);case"D":return t.$D;case"DD":return E.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return u(n.weekdaysMin,t.$W,A,2);case"ddd":return u(n.weekdaysShort,t.$W,A,3);case"dddd":return A[t.$W];case"H":return String(a);case"HH":return E.s(a,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return p(a,o,!0);case"A":return p(a,o,!1);case"m":return String(o);case"mm":return E.s(o,2,"0");case"s":return String(t.$s);case"ss":return E.s(t.$s,2,"0");case"SSS":return E.s(t.$ms,3,"0");case"Z":return i}return null}(e)||i.replace(":","")})},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(r,d,h){var p,f=this,m=E.p(d),g=C(r),y=(g.utcOffset()-this.utcOffset())*t,v=this-g,w=function(){return E.m(f,g)};switch(m){case u:p=w()/12;break;case l:p=w();break;case c:p=w()/3;break;case A:p=(v-y)/6048e5;break;case s:p=(v-y)/864e5;break;case o:p=v/n;break;case a:p=v/t;break;case i:p=v/e;break;default:p=v}return h?p:E.a(p)},g.daysInMonth=function(){return this.endOf(l).$D},g.$locale=function(){return w[this.$L]},g.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=B(e,t,!0);return r&&(n.$L=r),n},g.clone=function(){return E.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},m}(),S=k.prototype;return C.prototype=S,[["$ms",r],["$s",i],["$m",a],["$H",o],["$W",s],["$M",l],["$y",u],["$D",d]].forEach(function(e){S[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),C.extend=function(e,t){return e.$i||(e(t,k,C),e.$i=!0),C},C.locale=B,C.isDayjs=b,C.unix=function(e){return C(1e3*e)},C.en=w[v],C.Ls=w,C.p={},C}()),fv.exports);const gv=ry(mv),yv={new:"bg-green-500 text-white",qualified:"bg-blue-500 text-white",contacted:"bg-yellow-500 text-white",rejected:"bg-red-500 text-white"};function vv({item:e,onViewClick:t,onActionClick:n,theme:r}){const i=r.primaryColor||"#1e40af",a=e.pickupTimestamp?gv(e.pickupTimestamp).format("MMM DD, YYYY"):"-",o=e.deliveryTimestamp?gv(e.deliveryTimestamp).format("MMM DD, YYYY"):"-";return Ie.jsxs(ch.div,{layout:!0,initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"bg-white rounded-lg border-l-4 shadow-sm overflow-hidden cursor-pointer hover:shadow-md transition-shadow",style:{borderLeftColor:e.actionNeeded?"#f59e0b":i},onClick:t,children:[Ie.jsxs("div",{className:"px-4 py-3",children:[Ie.jsxs("div",{className:"flex items-center justify-between mb-3",children:[Ie.jsxs("div",{className:"flex items-center gap-3",children:[e.externalIdentifier?Ie.jsxs("span",{className:"flex-shrink-0 px-2 py-1 text-md font-semibold rounded bg-green-500 text-white",children:["LD",e.externalIdentifier]}):null,Ie.jsx("span",{className:"text-base font-semibold",style:{color:i},children:e.shipperName||"Unknown Shipper"}),e.shipperCompanyName&&Ie.jsxs("span",{className:"text-xs text-gray-500",children:["(",e.shipperCompanyName,")"]})]}),Ie.jsxs("div",{className:"flex items-center gap-2",children:[e.actionNeeded&&Ie.jsxs("span",{className:"text-xs px-2 py-1 rounded font-medium bg-amber-100 text-amber-700 flex items-center gap-1",children:[Ie.jsx(hm,{className:"w-3 h-3"}),"Action Needed"]}),Ie.jsx("span",{className:`text-xs px-2 py-1 rounded font-medium capitalize ${yv[e.status]}`,children:e.status}),e.isDuplicate&&Ie.jsx("span",{className:"text-xs px-2 py-1 rounded font-medium bg-orange-100 text-orange-700",children:"Load+"})]})]}),Ie.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-y-2 text-xs text-gray-600",children:[Ie.jsxs("div",{className:"flex items-center gap-1",children:[Ie.jsx(zf,{className:"w-3 h-3 text-green-500"}),Ie.jsx("span",{className:"truncate",title:e.origin,children:e.origin})]}),Ie.jsxs("div",{className:"flex items-center gap-1",children:[Ie.jsx(zf,{className:"w-3 h-3 rotate-180 text-red-500"}),Ie.jsx("span",{className:"truncate",title:e.destination,children:e.destination})]}),Ie.jsxs("div",{className:"flex items-center gap-1",children:[Ie.jsx(Bf,{className:"w-3 h-3"}),Ie.jsx("span",{children:e.shipperTargetPrice||"N/A"})]}),Ie.jsxs("div",{className:"flex items-center gap-1",children:[Ie.jsx(af,{className:"w-3 h-3"}),Ie.jsx("span",{children:a})]}),Ie.jsxs("div",{className:"flex items-center gap-1",children:[Ie.jsx(af,{className:"w-3 h-3"}),Ie.jsx("span",{children:o})]}),e.modeOfService&&Ie.jsxs("div",{className:"flex items-center gap-1",children:[Ie.jsx(pm,{className:"w-3 h-3"}),Ie.jsx("span",{children:e.modeOfService})]})]}),(e.grossWeight||e.numberOfPallets)&&Ie.jsxs("div",{className:"flex gap-4 mt-2 text-xs text-gray-500",children:[e.grossWeight&&Ie.jsxs("span",{children:["Weight: ",e.grossWeight.toLocaleString()," lbs"]}),e.numberOfPallets&&Ie.jsxs("span",{children:["Pallets: ",e.numberOfPallets]})]})]}),Ie.jsxs("div",{className:"flex justify-between items-center px-4 pb-3",children:[Ie.jsx("span",{className:"text-xs text-gray-400",children:gv(e.createdAt).format("MMM DD, YYYY h:mm A")}),Ie.jsxs("div",{className:"flex items-center gap-2",children:[e.actionNeeded&&n&&Ie.jsxs("button",{onClick:e=>{e.stopPropagation(),n()},className:"flex items-center gap-1.5 px-3 py-1.5 rounded text-xs font-medium bg-amber-500 text-white hover:bg-amber-600 transition-colors",children:[Ie.jsx(hm,{className:"w-3.5 h-3.5"}),Ie.jsx("span",{children:"Take Action"})]}),Ie.jsxs("button",{onClick:e=>{e.stopPropagation(),t()},className:"flex items-center gap-2 px-3 py-1.5 rounded text-white text-xs font-medium",style:{backgroundColor:i},children:[Ie.jsx(Tf,{className:"w-3.5 h-3.5"}),Ie.jsx("span",{children:"View Details"})]})]})]})]})}function wv({label:e,active:t,onClick:n,onRemove:r,primaryColor:i}){return Ie.jsxs("button",{onClick:n,className:"px-3 py-1.5 rounded text-xs font-medium border transition-colors flex items-center gap-1 "+(t?"text-white border-transparent":"text-gray-700 border-gray-300 bg-white hover:bg-gray-50"),style:t?{backgroundColor:i}:void 0,children:[e,t&&r&&Ie.jsx(wm,{className:"w-3 h-3 ml-1",onClick:e=>{e.stopPropagation(),r()}})]})}function xv({currentPage:e,totalPages:t,onPageChange:n,primaryColor:r}){const i=[];if(t<=5)for(let a=1;a<=t;a++)i.push(a);else{i.push(1),e>3&&i.push(-1);const n=Math.max(2,e-1),r=Math.min(t-1,e+1);for(let e=n;e<=r;e++)i.push(e);e<t-2&&i.push(-1),i.push(t)}return Ie.jsxs("div",{className:"flex items-center justify-center gap-1 py-3",children:[Ie.jsx("button",{onClick:()=>n(e-1),disabled:1===e,className:"p-1 rounded hover:bg-gray-100 disabled:opacity-50",children:Ie.jsx(uf,{className:"w-4 h-4"})}),i.map((t,i)=>-1===t?Ie.jsx("span",{className:"px-2 text-gray-400",children:".."},`ellipsis-${i}`):Ie.jsx("button",{onClick:()=>n(t),className:"w-7 h-7 rounded text-xs font-medium "+(e===t?"text-white":"text-gray-700 hover:bg-gray-100"),style:e===t?{backgroundColor:r}:void 0,children:t},t)),Ie.jsx("button",{onClick:()=>n(e+1),disabled:e===t,className:"p-1 rounded hover:bg-gray-100 disabled:opacity-50",children:Ie.jsx(df,{className:"w-4 h-4"})})]})}function bv({count:e,onDismiss:t,onRefresh:n,primaryColor:r}){return Ie.jsxs(ch.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},className:"mx-4 mb-3 p-3 rounded-lg flex items-center justify-between",style:{backgroundColor:`${r}15`,border:`1px solid ${r}40`},children:[Ie.jsxs("div",{className:"flex items-center gap-2",children:[Ie.jsx(Zp,{className:"w-4 h-4",style:{color:r}}),Ie.jsxs("span",{className:"text-sm font-medium",style:{color:r},children:[e," new email lead",e>1?"s":""," received!"]})]}),Ie.jsx("div",{className:"flex items-center gap-2",children:Ie.jsx("button",{onClick:t,className:"p-1 hover:bg-gray-200 rounded",children:Ie.jsx(wm,{className:"w-4 h-4 text-gray-500"})})})]})}function Bv(){const{theme:e,isOpen:t}=ea(),n=ug(),[r,i]=Te.useState(""),{leads:a,totalCount:o,currentPage:s,pageSize:A,isLoading:l,error:c,dateFilter:u,hasNewLeads:d,newLeadsCount:h,showNewLeadsAlert:p,fetchLeads:f,setPage:m,setSearchQuery:g,setDateFilter:y,startPolling:v,stopPolling:w,clearNewLeadsNotification:x,acknowledgeNewLeads:b}=Rp(),{setCurrentLead:B}=hv(),C=Te.useCallback(e=>{B(e),n(`/email-leads/${e.id}`)},[n,B]),E=Te.useCallback(e=>{B(e),n(`/email-leads/${e.id}/action?from=list`)},[n,B]),k=((e,t=300)=>{const[n,r]=Te.useState(e);return Te.useEffect(()=>{const n=setTimeout(()=>r(e),t);return()=>clearTimeout(n)},[e,t]),n})(r,500);Te.useEffect(()=>{f()},[]),Te.useEffect(()=>{g(k),""!==k&&f({search:k,page:1})},[k]),Te.useEffect(()=>(v(),()=>w()),[]);const S=Math.ceil(o/A),F=e.primaryColor||"#1e40af",Q=Te.useCallback(e=>{y(e)},[y]),j=Te.useCallback(()=>{x(),f({page:1})},[x,f]);return Ie.jsxs("div",{className:"flex flex-col h-full bg-white",style:{fontFamily:e.fontFamily},children:[Ie.jsx("div",{className:"px-4 py-3 border-b",children:Ie.jsxs("div",{className:"relative",children:[Ie.jsx(em,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-gray-400"}),Ie.jsx("input",{type:"text",placeholder:"Search by subject, shipper, origin, destination...",value:r,onChange:e=>i(e.target.value),className:"w-full pl-10 pr-4 py-2 border border-gray-200 rounded-lg text-sm focus:outline-none focus:ring-2",style:{"--tw-ring-color":F},onFocus:e=>e.currentTarget.style.boxShadow=`0 0 0 2px ${F}40`,onBlur:e=>e.currentTarget.style.boxShadow=""})]})}),Ie.jsx("div",{className:"px-4 py-3 border-b flex gap-2 overflow-x-auto",children:[{id:"today",label:"Today"},{id:"yesterday",label:"Yesterday"},{id:"all",label:"All"}].map(e=>Ie.jsx(wv,{label:e.label,active:u===e.id,onClick:()=>Q(e.id),onRemove:u===e.id&&"all"!==e.id?()=>Q("all"):void 0,primaryColor:F},e.id))}),Ie.jsxs("div",{className:"px-4 py-3 flex items-center justify-between ",children:[Ie.jsxs("h2",{className:"text-base font-semibold text-gray-900",children:["Load Requests ",o>0&&Ie.jsxs("span",{className:"text-gray-500 font-normal",children:["(",o,")"]})]}),l&&Ie.jsx("div",{className:"w-4 h-4 border-2 border-gray-300 border-t-blue-500 rounded-full animate-spin"})]}),Ie.jsx(hl,{children:p&&t&&Ie.jsx(bv,{count:h,onDismiss:b,onRefresh:j,primaryColor:F})}),c&&Ie.jsxs("div",{className:"mx-4 mb-3 p-3 bg-red-50 border border-red-200 rounded-lg",children:[Ie.jsx("p",{className:"text-sm text-red-600",children:c}),Ie.jsx("button",{onClick:()=>f(),className:"mt-2 text-xs text-red-700 underline",children:"Try again"})]}),Ie.jsx("div",{className:"flex-1 overflow-hidden relative",children:l||0!==a.length?Ie.jsx("div",{className:"h-full overflow-y-auto px-4 space-y-3 pb-8",children:Ie.jsx(hl,{initial:!1,children:a.map(t=>Ie.jsx(vv,{item:t,theme:e,onViewClick:()=>C(t),onActionClick:t.actionNeeded?()=>E(t):void 0},t.id))})}):Ie.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-gray-500 p-8 text-center",children:[Ie.jsx("div",{className:"w-16 h-16 bg-gray-100 rounded-full flex items-center justify-center mb-4",children:Ie.jsx(Tf,{className:"h-8 w-8 text-gray-400"})}),Ie.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-1",children:"No email leads found"}),Ie.jsx("p",{className:"text-sm",children:"Try adjusting your filters or search terms"})]})}),a.length>0&&S>1&&Ie.jsx(xv,{currentPage:s,totalPages:S,onPageChange:m,primaryColor:F})]})}const Cv={new:"bg-green-500 text-white",qualified:"bg-blue-500 text-white",contacted:"bg-yellow-500 text-white",rejected:"bg-red-500 text-white"};function Ev(e){return e?gv(e).format("MMM DD, YYYY"):"-"}function kv({lead:e,theme:t,onActionClick:n}){const r=t.primaryColor||"#1e40af";return console.log("Lead",e),Ie.jsx("div",{className:"bg-white rounded-lg border-l-4 shadow-sm overflow-hidden",style:{borderLeftColor:e.actionNeeded?"#f59e0b":r},children:Ie.jsxs("div",{className:"px-4 py-3",children:[Ie.jsxs("div",{className:"flex items-center justify-between mb-3",children:[Ie.jsxs("div",{className:"flex items-center gap-3",children:[Ie.jsx("span",{className:"text-base font-semibold",style:{color:r},children:e.shipperName||"Unknown Shipper"}),Ie.jsx(Tf,{className:"w-4 h-4 text-gray-400"})]}),Ie.jsxs("div",{className:"flex items-center gap-2",children:[e.actionNeeded&&Ie.jsxs("span",{className:"text-xs px-2 py-1 rounded font-medium bg-amber-100 text-amber-700 flex items-center gap-1",children:[Ie.jsx(hm,{className:"w-3 h-3"}),"Action Needed"]}),Ie.jsx("span",{className:`text-xs px-2 py-1 rounded font-medium ${Cv[e.status]}`,children:e.status.charAt(0).toUpperCase()+e.status.slice(1)})]})]}),Ie.jsxs("div",{className:"grid grid-cols-3 gap-y-2 text-xs text-gray-600",children:[Ie.jsxs("div",{className:"flex items-center gap-1",children:[Ie.jsx(zf,{className:"w-3 h-3"}),Ie.jsx("span",{className:"truncate",children:e.origin||"-"})]}),Ie.jsxs("div",{className:"flex items-center gap-1",children:[Ie.jsx(zf,{className:"w-3 h-3 rotate-90"}),Ie.jsx("span",{className:"truncate",children:e.destination||"-"})]}),Ie.jsxs("div",{className:"flex items-center gap-1",children:[Ie.jsx(af,{className:"w-3 h-3"}),Ie.jsx("span",{children:Ev(e.pickupTimestamp)})]}),Ie.jsxs("div",{className:"flex items-center gap-1",children:[Ie.jsx(af,{className:"w-3 h-3"}),Ie.jsx("span",{children:Ev(e.deliveryTimestamp)})]}),Ie.jsxs("div",{className:"flex items-center gap-1",children:[Ie.jsx(pm,{className:"w-3 h-3"}),Ie.jsx("span",{children:e.modeOfService||"-"})]}),Ie.jsxs("div",{className:"flex items-center gap-1",children:[Ie.jsx(Vf,{className:"w-3 h-3"}),Ie.jsx("span",{children:e.loadType||"-"})]})]}),e.actionNeeded&&n&&Ie.jsx("div",{className:"mt-3 pt-3 border-t border-gray-100",children:Ie.jsxs("button",{onClick:n,className:"w-full flex items-center justify-center gap-2 px-4 py-2.5 rounded-lg text-white text-sm font-medium bg-amber-500 hover:bg-amber-600 transition-colors",children:[Ie.jsx(hm,{className:"w-4 h-4"}),Ie.jsx("span",{children:e.requiredFields&&e.prospectCreation?"Take Action - Update Shipper & Load Details":e.prospectCreation?"Take Action - Update Shipper Information":e.requiredFields?"Take Action - Update Load Details":"Take Action - Update Required Details"})]})})]})})}function Sv({activeTab:e,onTabChange:t,theme:n}){const r=n.primaryColor||"#1e40af";return n.headerBg,Ie.jsx("div",{className:"grid grid-cols-1",children:Ie.jsxs("button",{onClick:()=>t("shipper"),className:"px-5 py-3 flex items-center justify-center gap-2",style:"shipper"===e?{backgroundColor:`${r}15`,color:r,borderBottom:`2px solid ${r}`}:{backgroundColor:"#f9fafb",color:"#4b5563"},children:[Ie.jsx(Tf,{className:"w-4 h-4"}),Ie.jsx("span",{className:"text-sm font-medium",children:"Shipper Email"})]})})}function Fv({emails:e,lead:t,theme:n,isLoading:r,error:i,onSendReply:a,isSending:o}){var s,A;const l=n.primaryColor||"#1e40af",[c,u]=Te.useState(""),[d,h]=Te.useState(!1);return r?Ie.jsxs("div",{className:"flex flex-col items-center justify-center h-full py-12",children:[Ie.jsx(Nf,{className:"w-8 h-8 animate-spin text-gray-400 mb-3"}),Ie.jsx("p",{className:"text-sm text-gray-500",children:"Loading emails..."})]}):i?Ie.jsxs("div",{className:"flex flex-col items-center justify-center h-full py-12",children:[Ie.jsx(pf,{className:"w-8 h-8 text-red-400 mb-3"}),Ie.jsx("p",{className:"text-sm text-red-500",children:i})]}):0===e.length?Ie.jsxs("div",{className:"flex flex-col items-center justify-center h-full py-12",children:[Ie.jsx(Tf,{className:"w-12 h-12 text-gray-300 mb-3"}),Ie.jsx("p",{className:"text-sm text-gray-500",children:"No emails found"})]}):Ie.jsxs("div",{className:"flex flex-col h-full",children:[Ie.jsxs("div",{className:"flex-1 overflow-y-auto p-4",children:[Ie.jsxs("div",{className:"flex items-start gap-3 mb-4",children:[Ie.jsx("div",{className:"w-10 h-10 rounded-lg flex items-center justify-center",style:{backgroundColor:`${l}15`},children:Ie.jsx(Tf,{className:"w-5 h-5",style:{color:l}})}),Ie.jsxs("div",{className:"flex-1",children:[Ie.jsx("h3",{className:"text-base font-semibold text-gray-900",children:(null==(s=e[0])?void 0:s.subject)||"No Subject"}),Ie.jsxs("p",{className:"text-xs text-gray-500 mt-1",children:[t.shipperName," • ",t.origin," → ",t.destination]})]})]}),Ie.jsx("div",{className:"space-y-4",children:e.map((e,t)=>{var n,r,i;const a="outgoing"===(null==(n=e.metadata)?void 0:n.direction),o=(null==(i=null==(r=e.senderEmail)?void 0:r.split("@")[0])?void 0:i.slice(0,2).toUpperCase())||"U";return Ie.jsxs(ch.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.1*t},className:"rounded-lg border "+(a?"border-blue-200 bg-blue-50":"border-gray-200 bg-white"),children:[Ie.jsxs("div",{className:"px-4 py-3 border-b border-gray-100 flex items-center justify-between",children:[Ie.jsxs("div",{className:"flex items-center gap-2",children:[Ie.jsx("div",{className:"w-8 h-8 rounded-full flex items-center justify-center text-white text-xs font-medium",style:{backgroundColor:a?"#3b82f6":l},children:o}),Ie.jsxs("div",{children:[Ie.jsx("p",{className:"text-sm font-medium text-gray-900",children:e.senderEmail}),Ie.jsxs("p",{className:"text-xs text-gray-500",children:["To: ",e.receiverEmail]})]})]}),Ie.jsx("span",{className:"text-xs text-gray-400",children:(s=e.receivedDatetime,gv(s).format("MMM DD, YYYY h:mm A"))})]}),Ie.jsx("div",{className:"px-4 py-3",children:e.bodyHtml?Ie.jsx("div",{className:"text-sm text-gray-700 prose prose-sm max-w-none",dangerouslySetInnerHTML:{__html:e.bodyHtml}}):Ie.jsx("p",{className:"text-sm text-gray-700 whitespace-pre-wrap",children:e.bodyText})})]},e.id);var s})})]}),Ie.jsx("div",{className:"flex-shrink-0 border-t bg-white",children:Ie.jsxs("div",{className:"mx-4 my-3 rounded-lg border border-gray-200 overflow-hidden",children:[Ie.jsx(hl,{children:d&&Ie.jsx(ch.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},children:Ie.jsxs("div",{className:"p-4 space-y-3",children:[Ie.jsxs("div",{className:"text-xs text-gray-500 mb-2",children:["Replying to: ",null==(A=e[e.length-1])?void 0:A.senderEmail]}),Ie.jsx("textarea",{value:c,onChange:e=>u(e.target.value),placeholder:"Type your reply...",className:"w-full p-3 border border-gray-200 rounded-lg resize-none text-sm min-h-[120px] focus:outline-none focus:ring-2 focus:ring-blue-500"}),Ie.jsxs("div",{className:"flex gap-2",children:[Ie.jsxs("button",{onClick:async()=>{if(!c.trim())return;const e=`<p>${c.replace(/\n/g,"<br/>")}</p>`;await a(e),u(""),h(!1)},disabled:!c.trim()||o,className:"px-4 py-2 rounded text-white text-sm font-medium disabled:opacity-50 flex items-center gap-2",style:{backgroundColor:l},children:[o&&Ie.jsx(Nf,{className:"w-4 h-4 animate-spin"}),o?"Sending...":"Send"]}),Ie.jsx("button",{onClick:()=>{u(""),h(!1)},className:"px-4 py-2 rounded text-gray-600 text-sm font-medium border border-gray-200 hover:bg-gray-50",children:"Cancel"})]})]})})}),!d&&Ie.jsx("div",{className:"px-4 py-3 bg-gray-50 flex items-center gap-3",children:Ie.jsxs("button",{onClick:()=>h(!d),className:"flex items-center gap-2 text-sm font-medium text-white px-3 py-1.5 rounded",style:{backgroundColor:l},children:[Ie.jsx(Yf,{className:"w-4 h-4"}),Ie.jsx("span",{children:"Reply"})]})})]})})]})}function Qv({theme:e}){const t=e.primaryColor||"#1e40af";return Ie.jsxs("div",{className:"flex flex-col items-center justify-center h-full py-12",children:[Ie.jsx("div",{className:"w-16 h-16 rounded-full flex items-center justify-center mb-4",style:{backgroundColor:`${t}15`},children:Ie.jsx(Tf,{className:"w-8 h-8",style:{color:t}})}),Ie.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-2",children:"Feature Coming Soon"}),Ie.jsx("p",{className:"text-sm text-gray-500 text-center max-w-xs",children:"Carrier email integration is currently under development. Stay tuned for updates!"})]})}function jv(){const{theme:e}=ea(),{leadId:t}=dg(),n=ug(),[r,i]=Te.useState("shipper"),{currentLead:a,emails:o,isLoading:s,error:A,isSending:l,fetchLeadEmails:c,sendReply:u,reset:d}=hv();Te.useEffect(()=>(t&&c(t),()=>{}),[t,c]);return a||s?Ie.jsxs("div",{className:"flex flex-col h-full bg-gray-50",style:{fontFamily:e.fontFamily},children:[Ie.jsx("div",{className:"px-4 py-3 bg-white border-b flex items-center gap-3",children:Ie.jsxs("button",{onClick:()=>n("/email-leads"),className:"flex items-center gap-1 text-sm text-gray-600 hover:text-gray-900",children:[Ie.jsx(Yp,{className:"w-4 h-4"}),Ie.jsx("span",{children:"Back"})]})}),Ie.jsxs("div",{className:"p-4",children:[a&&Ie.jsx(kv,{lead:a,theme:e,onActionClick:a.actionNeeded?()=>n(`/email-leads/${t}/action?from=detail`):void 0}),Ie.jsx("div",{className:"mt-3 bg-white rounded-lg border border-gray-200 shadow-sm overflow-hidden",children:Ie.jsx(Sv,{activeTab:r,onTabChange:i,theme:e})})]}),Ie.jsx("div",{className:"flex-1 overflow-hidden mx-4 mb-4 bg-white rounded-lg border border-gray-200 shadow-sm",children:"shipper"===r?Ie.jsx(Fv,{emails:o,lead:a,theme:e,isLoading:s,error:A,onSendReply:async e=>{var t,n,r;if(!o.length||!a)return;const i=null==(t=o[0])?void 0:t.conversationId,s=a.shipperEmail||(null==(n=o[0])?void 0:n.senderEmail),A=(null==(r=o[0])?void 0:r.subject)||"No Subject",l=A.startsWith("Re: ")?A:`Re: ${A}`;i&&s&&await u([s],i,l,e)},isSending:l}):Ie.jsx(Qv,{theme:e})})]}):Ie.jsxs("div",{className:"flex flex-col h-full bg-gray-50",style:{fontFamily:e.fontFamily},children:[Ie.jsx("div",{className:"px-4 py-3 bg-white border-b flex items-center gap-3",children:Ie.jsxs("button",{onClick:()=>n("/email-leads"),className:"flex items-center gap-1 text-sm text-gray-600 hover:text-gray-900",children:[Ie.jsx(Yp,{className:"w-4 h-4"}),Ie.jsx("span",{children:"Back"})]})}),Ie.jsx("div",{className:"flex-1 flex items-center justify-center",children:Ie.jsxs("div",{className:"text-center",children:[Ie.jsx(pf,{className:"w-12 h-12 text-gray-300 mx-auto mb-3"}),Ie.jsx("p",{className:"text-gray-500",children:"Lead data not found. Please go back and try again."})]})})]})}const Uv=[{code:"US",name:"United States",dialCode:"+1",flag:"🇺🇸"},{code:"GB",name:"United Kingdom",dialCode:"+44",flag:"🇬🇧"},{code:"CA",name:"Canada",dialCode:"+1",flag:"🇨🇦"},{code:"AU",name:"Australia",dialCode:"+61",flag:"🇦🇺"},{code:"DE",name:"Germany",dialCode:"+49",flag:"🇩🇪"},{code:"FR",name:"France",dialCode:"+33",flag:"🇫🇷"},{code:"IT",name:"Italy",dialCode:"+39",flag:"🇮🇹"},{code:"ES",name:"Spain",dialCode:"+34",flag:"🇪🇸"},{code:"NL",name:"Netherlands",dialCode:"+31",flag:"🇳🇱"},{code:"BE",name:"Belgium",dialCode:"+32",flag:"🇧🇪"},{code:"CH",name:"Switzerland",dialCode:"+41",flag:"🇨🇭"},{code:"AT",name:"Austria",dialCode:"+43",flag:"🇦🇹"},{code:"IE",name:"Ireland",dialCode:"+353",flag:"🇮🇪"},{code:"PT",name:"Portugal",dialCode:"+351",flag:"🇵🇹"},{code:"SE",name:"Sweden",dialCode:"+46",flag:"🇸🇪"},{code:"NO",name:"Norway",dialCode:"+47",flag:"🇳🇴"},{code:"DK",name:"Denmark",dialCode:"+45",flag:"🇩🇰"},{code:"FI",name:"Finland",dialCode:"+358",flag:"🇫🇮"},{code:"PL",name:"Poland",dialCode:"+48",flag:"🇵🇱"},{code:"CZ",name:"Czech Republic",dialCode:"+420",flag:"🇨🇿"},{code:"HU",name:"Hungary",dialCode:"+36",flag:"🇭🇺"},{code:"GR",name:"Greece",dialCode:"+30",flag:"🇬🇷"},{code:"TR",name:"Turkey",dialCode:"+90",flag:"🇹🇷"},{code:"RU",name:"Russia",dialCode:"+7",flag:"🇷🇺"},{code:"UA",name:"Ukraine",dialCode:"+380",flag:"🇺🇦"},{code:"IL",name:"Israel",dialCode:"+972",flag:"🇮🇱"},{code:"AE",name:"United Arab Emirates",dialCode:"+971",flag:"🇦🇪"},{code:"SA",name:"Saudi Arabia",dialCode:"+966",flag:"🇸🇦"},{code:"EG",name:"Egypt",dialCode:"+20",flag:"🇪🇬"},{code:"ZA",name:"South Africa",dialCode:"+27",flag:"🇿🇦"},{code:"NG",name:"Nigeria",dialCode:"+234",flag:"🇳🇬"},{code:"KE",name:"Kenya",dialCode:"+254",flag:"🇰🇪"},{code:"IN",name:"India",dialCode:"+91",flag:"🇮🇳"},{code:"CN",name:"China",dialCode:"+86",flag:"🇨🇳"},{code:"JP",name:"Japan",dialCode:"+81",flag:"🇯🇵"},{code:"KR",name:"South Korea",dialCode:"+82",flag:"🇰🇷"},{code:"SG",name:"Singapore",dialCode:"+65",flag:"🇸🇬"},{code:"MY",name:"Malaysia",dialCode:"+60",flag:"🇲🇾"},{code:"TH",name:"Thailand",dialCode:"+66",flag:"🇹🇭"},{code:"PH",name:"Philippines",dialCode:"+63",flag:"🇵🇭"},{code:"ID",name:"Indonesia",dialCode:"+62",flag:"🇮🇩"},{code:"VN",name:"Vietnam",dialCode:"+84",flag:"🇻🇳"},{code:"HK",name:"Hong Kong",dialCode:"+852",flag:"🇭🇰"},{code:"TW",name:"Taiwan",dialCode:"+886",flag:"🇹🇼"},{code:"NZ",name:"New Zealand",dialCode:"+64",flag:"🇳🇿"},{code:"MX",name:"Mexico",dialCode:"+52",flag:"🇲🇽"},{code:"BR",name:"Brazil",dialCode:"+55",flag:"🇧🇷"},{code:"AR",name:"Argentina",dialCode:"+54",flag:"🇦🇷"},{code:"CL",name:"Chile",dialCode:"+56",flag:"🇨🇱"},{code:"CO",name:"Colombia",dialCode:"+57",flag:"🇨🇴"},{code:"PE",name:"Peru",dialCode:"+51",flag:"🇵🇪"},{code:"VE",name:"Venezuela",dialCode:"+58",flag:"🇻🇪"}],Ov=Uv.find(e=>"US"===e.code)||Uv[0],Nv=(e,t)=>{const n=(r=e,Uv.find(e=>e.code===r));var r;if(!n)return t;const i=t.replace(/\D/g,"");return`${n.dialCode}${i}`};function Iv({selectedCountry:e,onCountryChange:t,className:n="",disabled:r=!1}){const[i,a]=Te.useState(!1),[o,s]=Te.useState(""),A=Te.useRef(null),l=Uv.filter(e=>e.name.toLowerCase().includes(o.toLowerCase())||e.code.toLowerCase().includes(o.toLowerCase())||e.dialCode.includes(o));Te.useEffect(()=>{const e=e=>{A.current&&!A.current.contains(e.target)&&a(!1)};return i&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[i]);return Ie.jsxs("div",{ref:A,className:`relative ${n}`,children:[Ie.jsxs("button",{type:"button",onClick:()=>!r&&a(!i),disabled:r,className:"flex items-center gap-2 px-3 py-2.5 text-sm border rounded-lg transition-all "+(r?"bg-gray-50 text-gray-500 cursor-not-allowed border-gray-200":"bg-white border-gray-200 hover:border-gray-300 cursor-pointer"),children:[Ie.jsx("span",{className:"text-lg",children:e.flag}),Ie.jsx("span",{className:"text-gray-700 font-medium",children:e.dialCode}),!r&&Ie.jsx(cf,{className:"w-4 h-4 text-gray-400 transition-transform "+(i?"rotate-180":"")})]}),i&&!r&&Ie.jsxs("div",{className:"absolute z-50 w-80 mt-1 bg-white border border-gray-200 rounded-lg shadow-lg overflow-hidden",children:[Ie.jsx("div",{className:"p-3 border-b border-gray-100",children:Ie.jsxs("div",{className:"relative",children:[Ie.jsx(em,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"}),Ie.jsx("input",{type:"text",value:o,onChange:e=>s(e.target.value),placeholder:"Search country...",className:"w-full pl-9 pr-3 py-2 text-sm border border-gray-200 rounded-lg focus:outline-none focus:ring-2",autoFocus:!0})]})}),Ie.jsx("div",{className:"max-h-60 overflow-y-auto",children:0===l.length?Ie.jsx("div",{className:"px-3 py-4 text-sm text-gray-500 text-center",children:"No countries found"}):l.map(n=>Ie.jsxs("button",{type:"button",onMouseDown:e=>{e.preventDefault(),e.stopPropagation(),(e=>{t(e),a(!1),s("")})(n)},className:"w-full px-3 py-2.5 text-sm text-left transition-colors flex items-center gap-3 hover:bg-gray-50 "+(e.code===n.code?"bg-blue-50 text-blue-600":"text-gray-700"),children:[Ie.jsx("span",{className:"text-lg",children:n.flag}),Ie.jsxs("div",{className:"flex-1",children:[Ie.jsx("div",{className:"font-medium",children:n.name}),Ie.jsx("div",{className:"text-xs text-gray-500",children:n.code})]}),Ie.jsx("span",{className:"font-medium text-gray-600",children:n.dialCode})]},n.code))})]})]})}const Tv=[{value:"DRY VAN",label:"Dry Van"},{value:"REEFER",label:"Reefer"},{value:"FLATBED",label:"Flatbed"},{value:"STEP DECK",label:"Step Deck"},{value:"LOWBOY",label:"Lowboy"},{value:"CONESTOGA",label:"Conestoga"},{value:"POWER ONLY",label:"Power Only"},{value:"BOX TRUCK",label:"Box Truck"},{value:"SPRINTER VAN",label:"Sprinter Van"},{value:"HOTSHOT",label:"Hotshot"}],Pv=[{value:"FTL",label:"Full Truckload (FTL)"},{value:"LTL",label:"Less Than Truckload (LTL)"},{value:"PARTIAL",label:"Partial Load"},{value:"DRYAGE",label:"Dry Age"}],Mv=[{value:48,label:"48 ft"},{value:53,label:"53 ft"},{value:26,label:"26 ft"},{value:24,label:"24 ft"},{value:20,label:"20 ft"}],Dv=[{value:"AL",label:"Alabama"},{value:"AK",label:"Alaska"},{value:"AZ",label:"Arizona"},{value:"AR",label:"Arkansas"},{value:"CA",label:"California"},{value:"CO",label:"Colorado"},{value:"CT",label:"Connecticut"},{value:"DE",label:"Delaware"},{value:"FL",label:"Florida"},{value:"GA",label:"Georgia"},{value:"HI",label:"Hawaii"},{value:"ID",label:"Idaho"},{value:"IL",label:"Illinois"},{value:"IN",label:"Indiana"},{value:"IA",label:"Iowa"},{value:"KS",label:"Kansas"},{value:"KY",label:"Kentucky"},{value:"LA",label:"Louisiana"},{value:"ME",label:"Maine"},{value:"MD",label:"Maryland"},{value:"MA",label:"Massachusetts"},{value:"MI",label:"Michigan"},{value:"MN",label:"Minnesota"},{value:"MS",label:"Mississippi"},{value:"MO",label:"Missouri"},{value:"MT",label:"Montana"},{value:"NE",label:"Nebraska"},{value:"NV",label:"Nevada"},{value:"NH",label:"New Hampshire"},{value:"NJ",label:"New Jersey"},{value:"NM",label:"New Mexico"},{value:"NY",label:"New York"},{value:"NC",label:"North Carolina"},{value:"ND",label:"North Dakota"},{value:"OH",label:"Ohio"},{value:"OK",label:"Oklahoma"},{value:"OR",label:"Oregon"},{value:"PA",label:"Pennsylvania"},{value:"RI",label:"Rhode Island"},{value:"SC",label:"South Carolina"},{value:"SD",label:"South Dakota"},{value:"TN",label:"Tennessee"},{value:"TX",label:"Texas"},{value:"UT",label:"Utah"},{value:"VT",label:"Vermont"},{value:"VA",label:"Virginia"},{value:"WA",label:"Washington"},{value:"WV",label:"West Virginia"},{value:"WI",label:"Wisconsin"},{value:"WY",label:"Wyoming"}],Lv="pg_lead_shipper_";function Hv(e,t){try{const n={shipperCompanyName:t.shipperCompanyName,shipperName:t.shipperName,shipperPhone:t.shipperPhone,shipperAddress:t.shipperAddress,shipperCity:t.shipperCity,shipperState:t.shipperState,shipperZipCode:t.shipperZipCode,shipperLatitude:t.shipperLatitude,shipperLongitude:t.shipperLongitude};localStorage.setItem(`${Lv}${e}`,JSON.stringify(n))}catch(qX){}}function _v(e){try{const t=localStorage.getItem(`${Lv}${e}`);return t?JSON.parse(t):null}catch{return null}}function Rv(){var e;const{theme:t}=ea(),n=ug(),{leadId:r}=dg(),[i]=ey(),{currentLead:a,setCurrentLead:o}=hv(),[s,A]=Te.useState(null);Te.useEffect(()=>{const e=i.get("from");let t=null;if(e)try{localStorage.setItem(`pg_lead_action_from_${r}`,e),t=e,console.log(`[LeadAction] Stored fromPage: ${e} for lead: ${r}`)}catch(qX){}else try{t=localStorage.getItem(`pg_lead_action_from_${r}`),console.log(`[LeadAction] Retrieved fromPage: ${t} for lead: ${r}`)}catch(qX){t=null}A(t)},[i,r]);const l=()=>{try{localStorage.removeItem(`pg_lead_action_from_${r}`),console.log(`[LeadAction] Cleared fromPage for lead: ${r} on back navigation`)}catch(qX){}n("detail"===s?`/email-leads/${r}`:"/email-leads")},[c,u]=Te.useState(a),[d,h]=Te.useState(!a),[p,f]=Te.useState(!1),[m,g]=Te.useState(null),[y,v]=Te.useState(!1),[w,x]=Te.useState([]),[b,B]=Te.useState(!1),[C,E]=Te.useState(null);Te.useEffect(()=>()=>{try{localStorage.removeItem(`pg_lead_action_from_${r}`),console.log(`[LeadAction] Cleared fromPage for lead: ${r} on unmount`)}catch(qX){}},[r]);const k=e=>({equipmentType:(null==e?void 0:e.equipmentType)||"",loadType:(null==e?void 0:e.loadType)||"",equipmentSize:(null==e?void 0:e.equipmentSize)||53,shipperTargetPrice:(null==e?void 0:e.shipperTargetPrice)||null,shipperCompanyName:(null==e?void 0:e.shipperCompanyName)||"",shipperName:(null==e?void 0:e.shipperName)||"",shipperEmail:(null==e?void 0:e.shipperEmail)||"",shipperPhone:(null==e?void 0:e.shipperPhone)||"",shipperCountryCode:(null==e?void 0:e.shipperCountryCode)||Ov.code,shipperAddress:(null==e?void 0:e.shipperAddress)||"",shipperCity:(null==e?void 0:e.shipperCity)||"",shipperState:(null==e?void 0:e.shipperState)||"",shipperZipCode:(null==e?void 0:e.shipperZipCode)||"",shipperLatitude:(null==e?void 0:e.shipperLatitude)||null,shipperLongitude:(null==e?void 0:e.shipperLongitude)||null}),[S,F]=Te.useState(()=>k(a)),Q=Te.useMemo(()=>!0===(null==c?void 0:c.prospectCreation),[null==c?void 0:c.prospectCreation]),j=Te.useMemo(()=>!0===(null==c?void 0:c.requiredFields),[null==c?void 0:c.requiredFields]),U=Te.useMemo(()=>!Q&&!j,[Q,j]),O=Te.useMemo(()=>{const e=[];return Q&&e.push({id:"shipper",label:"Shipper Info",description:"Contact & address details",icon:Ie.jsx(fm,{className:"w-4 h-4"})}),j&&e.push({id:"load",label:"Load Details",description:"Equipment & pricing",icon:Ie.jsx(pm,{className:"w-4 h-4"})}),e},[Q,j]),[N,I]=Te.useState(0),T=O[N]||null,P=N===O.length-1,M=0===N,D=O.length,[L,H]=Te.useState(!1),[_,R]=Te.useState(""),[K,z]=Te.useState(!1),V=w.filter(e=>e.label.toLowerCase().includes(_.toLowerCase())||e.value.toLowerCase().includes(_.toLowerCase())),[$,W]=Te.useState(()=>Uv.find(e=>e.code===S.shipperCountryCode)||Ov),[G,q]=Te.useState({}),X=t.primaryColor||"#1e40af";Te.useEffect(()=>{if(S.shipperCountryCode){const e=Uv.find(e=>e.code===S.shipperCountryCode);e&&e.code!==$.code&&W(e)}},[S.shipperCountryCode,$.code]),Te.useEffect(()=>{if("load"===(null==T?void 0:T.id)&&(null==c?void 0:c.prospectCreation)&&(null==c?void 0:c.requiredFields)){z(!0);const e=setTimeout(()=>{z(!1)},5e3);return()=>clearTimeout(e)}},[T,c]),Te.useEffect(()=>{(async()=>{if(r){if(a&&a.id===r){u(a);const e=k(a),t=_v(r);return t&&Object.assign(e,t),F(e),void h(!1)}try{h(!0);const e=await Dp.getLeadById(r);u(e),o(e);const t=k(e),n=_v(r);n&&Object.assign(t,n),F(t)}catch(e){g(e.message||"Failed to load lead details")}finally{h(!1)}}})()},[r,a,o]),Te.useEffect(()=>{(async()=>{try{B(!0),E(null);const e=(await Dp.getEquipmentTypes()).map(e=>({value:e.toUpperCase().replace(/\s+/g,"_"),label:e}));x(e)}catch(e){console.error("Failed to fetch equipment types:",e),E(e.message||"Failed to load equipment types"),x(Tv)}finally{B(!1)}})()},[]);const Y=Te.useCallback(()=>{var e,t,n,r;const i={};if((null==(e=S.shipperName)?void 0:e.trim())||(i.shipperName="Shipper name is required"),(null==(t=S.shipperEmail)?void 0:t.trim())?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(S.shipperEmail)||(i.shipperEmail="Invalid email format"):i.shipperEmail="Email is required",null==(n=S.shipperPhone)?void 0:n.trim()){const e=S.shipperPhone.trim();if(e.startsWith("+1"))i.shipperPhone="Please enter phone number without country code (+1)";else if("+1"===$.dialCode){/^(\(\d{3}\)-\d{3}-\d{4}|\d{3}-\s\d{3}-\d{4}|\d{10})$/.test(e)||(i.shipperPhone="Invalid US phone format. Use: (302)-244-8111, 302- 244-8111, or 3022448111")}}if(null==(r=S.shipperZipCode)?void 0:r.trim()){5!==S.shipperZipCode.trim().replace(/\D/g,"").length&&(i.shipperZipCode="Zip code must be exactly 5 digits")}return i},[S.shipperName,S.shipperEmail,S.shipperPhone,S.shipperZipCode]),J=Te.useCallback(()=>{const e={};return S.equipmentType||(e.equipmentType="Equipment type is required"),S.loadType||(e.loadType="Load type is required"),(!S.equipmentSize||S.equipmentSize<=0)&&(e.equipmentSize="Equipment size is required"),(!S.shipperTargetPrice||S.shipperTargetPrice<=0)&&(e.shipperTargetPrice="Shipper target price is required"),e},[S.equipmentType,S.loadType,S.equipmentSize,S.shipperTargetPrice]),Z=Te.useCallback(()=>{if(!T)return!0;const e="shipper"===T.id?Y():J();return q(e),0===Object.keys(e).length},[T,Y,J]),ee=(e,t)=>{F(n=>{const i={...n,[e]:t};return r&&e.startsWith("shipper")&&"shipperTargetPrice"!==e&&Hv(r,i),i}),Object.keys(G).length>0&&q({})},te=async e=>{var t,i,a,A,l,c,d;if(e.preventDefault(),Z()&&r)try{f(!0),g(null);const e={};if(j&&(e.equipmentType=S.equipmentType,e.equipmentSize=S.equipmentSize,e.loadType=S.loadType,e.shipperTargetPrice=S.shipperTargetPrice||void 0),Q){e.shipperName=S.shipperName,e.shipperEmail=S.shipperEmail,e.shipperCompanyName=(null==(t=S.shipperCompanyName)?void 0:t.trim())||"TBD";const n=(null==(a=null==(i=S.shipperPhone)?void 0:i.trim())?void 0:a.replace(/[()-]/g,""))||"",r=n?Nv(S.shipperCountryCode,n):"TBD";e.shipperPhone=r,e.shipperCountryCode=S.shipperCountryCode,e.shipperAddress=(null==(A=S.shipperAddress)?void 0:A.trim())||"TBD",e.shipperCity=(null==(l=S.shipperCity)?void 0:l.trim())||"TBD",e.shipperState=(null==(c=S.shipperState)?void 0:c.trim())||"TBD",e.shipperZipCode=(null==(d=S.shipperZipCode)?void 0:d.trim())||"TBD",e.shipperLatitude=S.shipperLatitude??0,e.shipperLongitude=S.shipperLongitude??0}const h=await Dp.submitLeadAction(r,e);h.success&&(v(!0),u(h.lead),o(h.lead),function(e){try{localStorage.removeItem(`${Lv}${e}`)}catch{}}(r),setTimeout(()=>{try{localStorage.removeItem(`pg_lead_action_from_${r}`),console.log(`[LeadAction] Cleared fromPage for lead: ${r} on success navigation`)}catch(e){}n("detail"===s?`/email-leads/${r}`:"/email-leads")},1500))}catch(h){g(h.message||"Failed to submit action")}finally{f(!1)}};if(d)return Ie.jsxs("div",{className:"flex flex-col h-full bg-gray-50 items-center justify-center",children:[Ie.jsx(Nf,{className:"w-8 h-8 animate-spin",style:{color:X}}),Ie.jsx("p",{className:"mt-3 text-sm text-gray-500",children:"Loading lead details..."})]});if(m&&!c)return Ie.jsxs("div",{className:"flex flex-col h-full bg-gray-50 items-center justify-center p-6",children:[Ie.jsx(pf,{className:"w-12 h-12 text-red-500 mb-4"}),Ie.jsx("p",{className:"text-red-600 text-center mb-4",children:m}),Ie.jsx("button",{onClick:l,className:"px-4 py-2 text-sm font-medium text-white rounded-lg",style:{backgroundColor:X},children:"Go Back"})]});return Ie.jsxs("div",{className:"flex flex-col h-full bg-gray-50",style:{fontFamily:t.fontFamily},children:[Ie.jsxs("div",{className:"px-4 py-3 flex items-center gap-3 border-b bg-white",style:{borderBottomColor:`${X}20`},children:[Ie.jsx("button",{onClick:l,className:"p-2 rounded-lg hover:bg-gray-100 transition-colors",children:Ie.jsx(Yp,{className:"w-5 h-5 text-gray-600"})}),Ie.jsxs("div",{className:"flex-1",children:[Ie.jsx("h1",{className:"text-lg font-semibold text-gray-900",children:(null==c?void 0:c.requiredFields)&&(null==c?void 0:c.prospectCreation)?"Update Shipper & Load Details":(null==c?void 0:c.prospectCreation)?"Update Shipper Information":(null==c?void 0:c.requiredFields)?"Update Load Details":"Update Lead Details"}),Ie.jsxs("p",{className:"text-xs text-gray-500",children:[null==c?void 0:c.shipperName," • ",null==c?void 0:c.origin," → ",null==c?void 0:c.destination]})]})]}),D>0&&!U&&Ie.jsx("div",{className:"bg-white border-b border-gray-100 px-4 py-3",children:Ie.jsx("div",{className:"flex items-center gap-3",children:O.map((e,t)=>{const n=(e=>e<N?"completed":e===N?"active":"upcoming")(t),r=t<N;return Ie.jsxs(Te.Fragment,{children:[t>0&&Ie.jsx("div",{className:"flex-1 h-0.5 rounded-full bg-gray-200 overflow-hidden",children:Ie.jsx(ch.div,{className:"h-full rounded-full",style:{backgroundColor:X},initial:!1,animate:{width:"upcoming"===n?"0%":"100%"},transition:{duration:.3}})}),Ie.jsxs("button",{type:"button",onClick:()=>{r&&(q({}),I(t),setTimeout(()=>{const e=document.querySelector(".pg-lead-action-form");e&&e.scrollTo({top:0,behavior:"smooth"})},50))},disabled:!r,className:"flex items-center gap-2 "+(r?"cursor-pointer":"cursor-default"),children:[Ie.jsx("div",{className:"w-7 h-7 rounded-full flex items-center justify-center text-xs font-semibold transition-all",style:"completed"===n?{backgroundColor:X,color:"#fff"}:"active"===n?{backgroundColor:`${X}15`,color:X,border:`2px solid ${X}`}:{backgroundColor:"#f1f5f9",color:"#94a3b8"},children:"completed"===n?Ie.jsx(ff,{className:"w-4 h-4"}):t+1}),Ie.jsx("span",{className:"text-xs font-medium block",style:{color:"active"===n?X:"completed"===n?"#475569":"#94a3b8"},children:"shipper"===e.id?"Shipper Information":"load"===e.id?"Load Information":e.label})]})]},e.id)})})}),y&&Ie.jsxs(ch.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},className:"mx-4 mt-4 p-4 bg-green-50 border border-green-200 rounded-xl flex items-center gap-3",children:[Ie.jsx(ff,{className:"w-5 h-5 text-green-600 flex-shrink-0"}),Ie.jsxs("div",{children:[Ie.jsx("p",{className:"text-sm font-medium text-green-800",children:"Action submitted successfully!"}),Ie.jsx("p",{className:"text-xs text-green-600",children:"Redirecting to lead details..."})]})]}),m&&c&&Ie.jsxs(ch.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},className:"mx-4 mt-4 p-4 bg-red-50 border border-red-200 rounded-xl flex items-center gap-3",children:[Ie.jsx(pf,{className:"w-5 h-5 text-red-600 flex-shrink-0"}),Ie.jsx("p",{className:"text-sm text-red-600",children:m})]}),Ie.jsxs("form",{onSubmit:te,className:"pg-lead-action-form flex-1 overflow-y-auto p-4 space-y-4",children:[U&&!y&&Ie.jsx("div",{className:"bg-blue-50 rounded-xl border border-blue-200 p-4",children:Ie.jsxs("div",{className:"flex items-center gap-3",children:[Ie.jsx(ff,{className:"w-5 h-5 text-blue-600 flex-shrink-0"}),Ie.jsxs("div",{children:[Ie.jsx("p",{className:"text-sm font-medium text-blue-800",children:"No additional information required"}),Ie.jsx("p",{className:"text-xs text-blue-600 mt-1",children:"This lead doesn't require any additional details to be filled."})]})]})}),Ie.jsxs(hl,{mode:"wait",children:["shipper"===(null==T?void 0:T.id)&&Ie.jsxs(ch.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},transition:{duration:.2},className:"space-y-3",children:[Ie.jsxs("div",{className:"bg-white rounded-xl border border-gray-200 p-4 space-y-3",children:[Ie.jsxs("h4",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wide flex items-center gap-1.5",children:[Ie.jsx(fm,{className:"w-3.5 h-3.5",style:{color:X}}),"Contact Details"]}),Ie.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[Ie.jsxs("div",{children:[Ie.jsx("label",{className:"text-xs font-medium text-gray-600 mb-1.5 block",children:"Company"}),Ie.jsx("input",{type:"text",value:S.shipperCompanyName,onChange:e=>ee("shipperCompanyName",e.target.value),placeholder:"Company name",className:"w-full px-3 py-2.5 text-sm border border-gray-200 rounded-lg focus:outline-none focus:ring-2",style:{"--tw-ring-color":`${X}40`}})]}),Ie.jsxs("div",{children:[Ie.jsxs("label",{className:"text-xs font-medium text-gray-600 mb-1.5 block",children:["Name ",Ie.jsx("span",{className:"text-red-500",children:"*"})]}),Ie.jsx("input",{type:"text",value:S.shipperName,onChange:e=>ee("shipperName",e.target.value),placeholder:"Contact name",className:"w-full px-3 py-2.5 text-sm border border-gray-200 rounded-lg focus:outline-none focus:ring-2",style:{"--tw-ring-color":`${X}40`}}),G.shipperName&&Ie.jsx("p",{className:"mt-1 text-xs text-red-500",children:G.shipperName})]})]}),Ie.jsxs("div",{className:"grid grid-cols-1 gap-3",children:[Ie.jsxs("div",{children:[Ie.jsxs("label",{className:"text-xs font-medium text-gray-600 mb-1.5 block",children:["Email ",Ie.jsx("span",{className:"text-red-500",children:"*"})]}),Ie.jsx("input",{type:"email",value:S.shipperEmail,disabled:!0,className:"w-full px-3 py-2.5 text-sm border border-gray-200 rounded-lg bg-gray-50 text-gray-500 cursor-not-allowed"}),G.shipperEmail&&Ie.jsx("p",{className:"mt-1 text-xs text-red-500",children:G.shipperEmail})]}),Ie.jsxs("div",{children:[Ie.jsx("label",{className:"text-xs font-medium text-gray-600 mb-1.5 block",children:"Phone"}),Ie.jsxs("div",{className:"flex gap-2",children:[Ie.jsx(Iv,{selectedCountry:$,onCountryChange:e=>{W(e),F(t=>{const n={...t,shipperCountryCode:e.code};return r&&Hv(r,n),n}),Object.keys(G).length>0&&q({})},className:"w-28"}),Ie.jsx("input",{type:"tel",value:S.shipperPhone,onChange:e=>ee("shipperPhone",e.target.value),placeholder:"3022448111",maxLength:14,className:"flex-1 px-3 py-2.5 text-sm border border-gray-200 rounded-lg focus:outline-none focus:ring-2",style:{"--tw-ring-color":`${X}40`}})]}),G.shipperPhone&&Ie.jsx("p",{className:"mt-1 text-xs text-red-500",children:G.shipperPhone})]})]})]}),Ie.jsxs("div",{className:"bg-white rounded-xl border border-gray-200 p-4 space-y-3",children:[Ie.jsxs("h4",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wide flex items-center gap-1.5",children:[Ie.jsx(Pf,{className:"w-3.5 h-3.5",style:{color:X}}),"Address (Optional)"]}),Ie.jsxs("div",{children:[Ie.jsx("label",{className:"text-xs font-medium text-gray-600 mb-1.5 block",children:"Street"}),Ie.jsx("input",{type:"text",value:S.shipperAddress,maxLength:75,onChange:e=>ee("shipperAddress",e.target.value),placeholder:"Street address",className:"w-full px-3 py-2.5 text-sm border border-gray-200 rounded-lg focus:outline-none focus:ring-2",style:{"--tw-ring-color":`${X}40`}})]}),Ie.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[Ie.jsxs("div",{children:[Ie.jsx("label",{className:"text-xs font-medium text-gray-600 mb-1.5 block",children:"City"}),Ie.jsx("input",{type:"text",value:S.shipperCity,maxLength:75,onChange:e=>ee("shipperCity",e.target.value),placeholder:"City",className:"w-full px-3 py-2.5 text-sm border border-gray-200 rounded-lg focus:outline-none focus:ring-2",style:{"--tw-ring-color":`${X}40`}})]}),Ie.jsxs("div",{children:[Ie.jsx("label",{className:"text-xs font-medium text-gray-600 mb-1.5 block",children:"State"}),Ie.jsxs("select",{value:S.shipperState,onChange:e=>ee("shipperState",e.target.value),className:"w-full px-3 py-2.5 text-sm border border-gray-200 rounded-lg focus:outline-none focus:ring-2 bg-white",style:{"--tw-ring-color":`${X}40`},children:[Ie.jsx("option",{value:"",children:"Select"}),Dv.map(e=>Ie.jsx("option",{value:e.value,children:e.label},e.value))]})]}),Ie.jsxs("div",{children:[Ie.jsx("label",{className:"text-xs font-medium text-gray-600 mb-1.5 block",children:"Zip"}),Ie.jsx("input",{type:"text",value:S.shipperZipCode,maxLength:5,onChange:e=>ee("shipperZipCode",e.target.value),placeholder:"12345",className:"w-full px-3 py-2.5 text-sm border border-gray-200 rounded-lg focus:outline-none focus:ring-2",style:{"--tw-ring-color":`${X}40`}}),G.shipperZipCode&&Ie.jsx("p",{className:"mt-1 text-xs text-red-500",children:G.shipperZipCode})]})]})]})]},"shipper"),"load"===(null==T?void 0:T.id)&&Ie.jsxs(ch.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},transition:{duration:.2},className:"space-y-3",children:[K&&Ie.jsxs(ch.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"bg-amber-50 border border-amber-200 rounded-xl p-3 flex items-center gap-3",children:[Ie.jsx(pf,{className:"w-4 h-4 text-amber-600 flex-shrink-0"}),Ie.jsx("p",{className:"text-xs text-amber-700",children:"Please complete the Load Information to finalize your lead details"})]}),Ie.jsxs("div",{className:"bg-white rounded-xl border border-gray-200 p-4 space-y-3",children:[Ie.jsxs("h4",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wide flex items-center gap-1.5",children:[Ie.jsx(pm,{className:"w-3.5 h-3.5",style:{color:X}}),"Equipment"]}),Ie.jsxs("div",{children:[Ie.jsxs("label",{className:"text-xs font-medium text-gray-600 mb-1.5 block",children:["Type ",Ie.jsx("span",{className:"text-red-500",children:"*"})]}),Ie.jsxs("div",{className:"relative",children:[Ie.jsxs("button",{type:"button",onClick:()=>H(!L),className:"w-full flex items-center justify-between px-3 py-2.5 text-sm rounded-lg border transition-all "+(S.equipmentType?"border-gray-300 bg-white":"border-gray-200 bg-gray-50"),style:S.equipmentType?{borderColor:X}:void 0,children:[Ie.jsx("span",{className:S.equipmentType?"text-gray-900":"text-gray-500",children:S.equipmentType?(null==(e=w.find(e=>e.value===S.equipmentType))?void 0:e.label)||S.equipmentType:"Select type..."}),Ie.jsxs("div",{className:"flex items-center gap-1",children:[S.equipmentType&&Ie.jsx("button",{type:"button",onClick:e=>{e.stopPropagation(),ee("equipmentType","")},className:"p-0.5 hover:bg-gray-100 rounded",children:Ie.jsx(wm,{className:"w-3.5 h-3.5 text-gray-400"})}),Ie.jsx(cf,{className:"w-4 h-4 text-gray-400 transition-transform "+(L?"rotate-180":"")})]})]}),L&&Ie.jsxs("div",{className:"absolute z-50 w-full mt-1 bg-white border border-gray-200 rounded-lg shadow-lg overflow-hidden",children:[Ie.jsx("div",{className:"p-2 border-b border-gray-100",children:Ie.jsxs("div",{className:"relative",children:[Ie.jsx(em,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-gray-400"}),Ie.jsx("input",{type:"text",value:_,onChange:e=>R(e.target.value),placeholder:"Search...",className:"w-full pl-8 pr-3 py-2 text-sm border border-gray-200 rounded-lg focus:outline-none focus:ring-2",style:{"--tw-ring-color":`${X}40`},autoFocus:!0})]})}),Ie.jsx("div",{className:"max-h-40 overflow-y-auto",children:b?Ie.jsxs("div",{className:"px-3 py-4 text-sm text-gray-500 text-center flex items-center justify-center gap-2",children:[Ie.jsx(Nf,{className:"w-3.5 h-3.5 animate-spin"}),"Loading equipment types..."]}):C?Ie.jsx("div",{className:"px-3 py-2 text-sm text-red-500 text-center",children:C}):0===V.length?Ie.jsx("div",{className:"px-3 py-2 text-sm text-gray-500 text-center",children:"No results"}):V.map(e=>Ie.jsxs("button",{type:"button",onClick:()=>{ee("equipmentType",e.value),H(!1),R("")},className:"w-full px-3 py-2 text-sm text-left transition-colors flex items-center justify-between "+(S.equipmentType===e.value?"text-white":"text-gray-700 hover:bg-gray-50"),style:S.equipmentType===e.value?{backgroundColor:X}:void 0,children:[Ie.jsx("span",{children:e.label}),S.equipmentType===e.value&&Ie.jsx(ff,{className:"w-3.5 h-3.5"})]},e.value))})]})]}),G.equipmentType&&Ie.jsx("p",{className:"mt-1 text-xs text-red-500",children:G.equipmentType})]}),Ie.jsxs("div",{children:[Ie.jsxs("label",{className:"text-xs font-medium text-gray-600 mb-1.5 block",children:["Size ",Ie.jsx("span",{className:"text-red-500",children:"*"})]}),Ie.jsxs("div",{className:"flex flex-wrap gap-2",children:[Mv.map(e=>Ie.jsx("button",{type:"button",onClick:()=>ee("equipmentSize",e.value),className:"px-3 py-2 text-xs rounded-lg border transition-all "+(S.equipmentSize===e.value?"border-transparent text-white":"border-gray-200 text-gray-600 hover:border-gray-300 bg-white"),style:S.equipmentSize===e.value?{backgroundColor:X}:void 0,children:e.label},e.value)),Ie.jsxs("div",{className:"flex items-center gap-1.5",children:[Ie.jsx("span",{className:"text-xs text-gray-500",children:"Custom:"}),Ie.jsx("input",{type:"number",value:S.equipmentSize,onChange:e=>ee("equipmentSize",parseInt(e.target.value)||0),className:"w-16 px-2 py-2 text-xs border border-gray-200 rounded-lg focus:outline-none focus:ring-2 text-center",style:{"--tw-ring-color":`${X}40`},min:1,max:100}),Ie.jsx("span",{className:"text-xs text-gray-500",children:"ft"})]})]}),G.equipmentSize&&Ie.jsx("p",{className:"mt-1 text-xs text-red-500",children:G.equipmentSize})]})]}),Ie.jsxs("div",{className:"bg-white rounded-xl border border-gray-200 p-4 space-y-3",children:[Ie.jsxs("h4",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wide flex items-center gap-1.5",children:[Ie.jsx(Vf,{className:"w-3.5 h-3.5",style:{color:X}}),"Load & Pricing"]}),Ie.jsxs("div",{children:[Ie.jsxs("label",{className:"text-xs font-medium text-gray-600 mb-1.5 block",children:["Load Type ",Ie.jsx("span",{className:"text-red-500",children:"*"})]}),Ie.jsx("div",{className:"flex gap-2",children:Pv.map(e=>Ie.jsx("button",{type:"button",onClick:()=>ee("loadType",e.value),className:"flex-1 px-3 py-2.5 text-xs rounded-lg border transition-all text-center "+(S.loadType===e.value?"border-transparent text-white":"border-gray-200 text-gray-600 hover:border-gray-300 bg-white"),style:S.loadType===e.value?{backgroundColor:X}:void 0,children:e.value},e.value))}),G.loadType&&Ie.jsx("p",{className:"mt-1 text-xs text-red-500",children:G.loadType})]}),Ie.jsxs("div",{children:[Ie.jsxs("label",{className:"text-xs font-medium text-gray-600 mb-1.5 block",children:["Target Price ",Ie.jsx("span",{className:"text-red-500",children:"*"})]}),Ie.jsxs("div",{className:"relative",children:[Ie.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-500 text-sm font-medium pointer-events-none",children:"$"}),Ie.jsx("input",{type:"number",value:S.shipperTargetPrice||"",onChange:e=>ee("shipperTargetPrice",e.target.value?parseFloat(e.target.value):null),placeholder:"0.00",className:"w-full pl-8 pr-3 py-2.5 text-sm border border-gray-200 rounded-lg focus:outline-none focus:ring-2",style:{"--tw-ring-color":`${X}40`},min:0,step:.01})]}),G.shipperTargetPrice&&Ie.jsx("p",{className:"mt-1 text-xs text-red-500",children:G.shipperTargetPrice})]})]})]},"load")]}),Ie.jsx("div",{className:"h-24"})]}),Ie.jsxs("div",{className:"p-4 bg-white border-t border-gray-200 space-y-3",children:[Object.keys(G).length>0&&Ie.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 bg-red-50 border border-red-200 rounded-xl",children:[Ie.jsx(pf,{className:"w-4 h-4 text-red-500 flex-shrink-0"}),Ie.jsxs("p",{className:"text-sm text-red-600",children:["Please fix the ",Object.keys(G).length," error",Object.keys(G).length>1?"s":""," above before continuing."]})]}),U?Ie.jsxs("button",{type:"button",onClick:l,className:"w-full flex items-center justify-center gap-2 px-4 py-3 text-white font-medium rounded-xl transition-all",style:{backgroundColor:X},children:[Ie.jsx(Yp,{className:"w-5 h-5"}),"Go Back"]}):Ie.jsxs("div",{className:"flex gap-3",children:[!M&&Ie.jsxs("button",{type:"button",onClick:()=>{q({}),I(e=>{const t=Math.max(e-1,0);return setTimeout(()=>{const e=document.querySelector(".pg-lead-action-form");e&&e.scrollTo({top:0,behavior:"smooth"})},50),t})},className:"flex items-center justify-center gap-2 px-4 py-3 text-sm font-medium rounded-xl border border-gray-200 text-gray-700 hover:bg-gray-50 transition-all",children:[Ie.jsx(Yp,{className:"w-4 h-4"}),"Back"]}),P?Ie.jsx("button",{type:"submit",onClick:te,disabled:p||y,className:"flex-1 flex items-center justify-center gap-2 px-4 py-3 text-white font-medium rounded-xl transition-all disabled:opacity-50 disabled:cursor-not-allowed",style:{backgroundColor:X},children:p?Ie.jsxs(Ie.Fragment,{children:[Ie.jsx(Nf,{className:"w-5 h-5 animate-spin"})," Submitting..."]}):y?Ie.jsxs(Ie.Fragment,{children:[Ie.jsx(ff,{className:"w-5 h-5"})," Submitted!"]}):Ie.jsxs(Ie.Fragment,{children:[Ie.jsx(Zf,{className:"w-5 h-5"})," Submit"]})}):Ie.jsxs("button",{type:"button",onClick:()=>{Z()&&I(e=>{const t=Math.min(e+1,O.length-1);return setTimeout(()=>{const e=document.querySelector(".pg-lead-action-form");e&&e.scrollTo({top:0,behavior:"smooth"})},50),t})},className:"flex-1 flex items-center justify-center gap-2 px-4 py-3 text-white font-medium rounded-xl transition-all",style:{backgroundColor:X},children:["Continue",Ie.jsx(Jp,{className:"w-5 h-5"})]})]})]})]})}class Kv{static async getEmailsClassifiedTodayCount(){return(await Vi.get("/crm/emails/me/metric/clasified_today_count")).data}static async getLeadsTodayCount(){return(await Vi.get("/crm/leads/me/leads/count_today")).data}static async getLeadsTillDateCount(){return(await Vi.get("/crm/leads/me/leads/count_till_date")).data}static async getDashboardStats(){const[e,t,n]=await Promise.all([this.getEmailsClassifiedTodayCount(),this.getLeadsTodayCount(),this.getLeadsTillDateCount()]);return{emailsClassifiedToday:e.count??0,leadsToday:t.count??0,leadsTillDate:n.count??0}}}function zv({title:e,value:t,borderColor:n,iconBg:r,iconColor:i,valueColor:a}){return Ie.jsxs("div",{className:"bg-white rounded-lg p-3 border-l-4 shadow-sm",style:{borderLeftColor:n},children:[Ie.jsxs("div",{className:"flex items-start gap-2 mb-2",children:[Ie.jsx("div",{className:"w-6 h-6 rounded-full flex items-center justify-center flex-shrink-0",style:{backgroundColor:r},children:Ie.jsx(tm,{className:"w-3 h-3",style:{color:i}})}),Ie.jsx("span",{className:"text-xs text-gray-600 leading-tight",children:e})]}),Ie.jsx("div",{className:"border-t border-gray-100 pt-2",children:Ie.jsx("span",{className:"text-xl font-bold",style:{color:a||n},children:t})})]})}function Vv({primaryColor:e}){const t=(()=>{const e=[];for(let t=0;t<35;t++){const t=Math.random();e.push(t)}return e})();return Ie.jsx("div",{className:"grid grid-cols-7 gap-1",children:t.map((t,n)=>Ie.jsx("div",{className:"w-4 h-4 rounded-sm",style:{backgroundColor:t>.7?e:t>.4?`${e}99`:t>.2?`${e}44`:"#e5e7eb"}},n))})}function $v(){var e;const{theme:t,user:n,environment:r}=ea();ug();const[i,a]=Te.useState(null),[o,s]=Te.useState(!1),A=(new Date).toLocaleDateString("en-US",{weekday:"long",month:"long",day:"numeric",year:"numeric"}),l=t.primaryColor||"#1e40af",c=(null==(e=null==n?void 0:n.email)?void 0:e.split("@")[0])||"User",u=c.charAt(0).toUpperCase()+c.slice(1);return Te.useEffect(()=>{let e=!0;return s(!0),Kv.getDashboardStats().then(t=>{e&&a(t)}).catch(()=>{e&&a({emailsClassifiedToday:0,leadsToday:0,leadsTillDate:0})}).finally(()=>{e&&s(!1)}),()=>{e=!1}},[]),Ie.jsxs("div",{className:"flex flex-col h-full bg-white overflow-y-auto",style:{fontFamily:t.fontFamily},children:[Ie.jsxs("div",{className:"px-5 py-4",children:[Ie.jsxs("h1",{className:"text-lg text-gray-800",children:["Hello ",Ie.jsx("span",{className:"font-semibold",children:u}),","]}),Ie.jsx("h2",{className:"text-xl font-semibold text-gray-900 mt-1",children:"Let's check new email for today"}),Ie.jsx("p",{className:"text-sm text-gray-500 mt-1",children:A})]}),Ie.jsx("div",{className:"px-5 pb-6 space-y-5",children:Ie.jsxs("div",{children:[Ie.jsx("h3",{className:"text-base font-semibold text-gray-900 mb-3",children:"Email Leads Agents"}),Ie.jsxs("div",{className:"grid grid-cols-3 gap-3 mb-3",children:[Ie.jsx(zv,{title:"Leads Till Date",value:(null==i?void 0:i.leadsTillDate)??"—",borderColor:l,iconBg:`${l}15`,iconColor:l,valueColor:l}),Ie.jsx(zv,{title:"Leads Today",value:i?`${i.leadsToday}`:"—",borderColor:"#ef4444",iconBg:"#fef2f2",iconColor:"#ef4444",valueColor:"#ef4444"}),Ie.jsx(zv,{title:"Emails Classified Today",value:(null==i?void 0:i.emailsClassifiedToday)??"—",borderColor:"#ef4444",iconBg:"#fef2f2",iconColor:"#ef4444",valueColor:"#ef4444"})]}),"development"===r&&Ie.jsxs("div",{className:"grid grid-cols-3 gap-3 mb-3",children:[Ie.jsx(zv,{title:"Quotes Won",value:"—",borderColor:"#22c55e",iconBg:"#f0fdf4",iconColor:"#22c55e",valueColor:"#22c55e"}),Ie.jsx("div",{style:{borderLeftColor:l},className:"bg-white col-span-2 rounded-lg p-3 border border-gray-100 shadow-sm border-l-4",children:Ie.jsxs("div",{className:"flex items-start gap-3",children:[Ie.jsxs("div",{className:"flex-1",children:[Ie.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[Ie.jsx("div",{className:"w-6 h-6 rounded-full flex items-center justify-center",style:{backgroundColor:`${l}15`},children:Ie.jsx(dm,{className:"w-3 h-3",style:{color:l}})}),Ie.jsx("span",{className:"text-xs text-gray-600",children:"Conversions this month"})]}),Ie.jsx("div",{className:"mt-2",children:Ie.jsx("span",{className:"text-xl font-bold",style:{color:l},children:"—"})})]}),Ie.jsx("div",{className:"flex-shrink-0",children:Ie.jsx(Vv,{primaryColor:l})})]})})]}),"development"===r&&Ie.jsx("div",{className:"grid grid-cols-2 gap-3",children:Ie.jsx(zv,{title:"Time Saved",value:"—",borderColor:l,iconBg:`${l}15`,iconColor:l,valueColor:l})})]})})]})}new Date(Date.now()-36e5).toISOString(),new Date(Date.now()-359e4).toISOString(),new Date(Date.now()-36e5).toISOString(),new Date(Date.now()-359e4).toISOString(),new Date(Date.now()-864e5).toISOString(),new Date(Date.now()-8639e4).toISOString(),new Date(Date.now()-864e5).toISOString(),new Date(Date.now()-8639e4).toISOString();class Wv{static async getConversations(){try{return(await Vi.get("/agents/data/conversations")).data.conversations}catch(e){throw console.error("DataAgentService.getConversations error:",e),new Error("Failed to fetch conversations.")}}static async getConversation(e){try{return(await Vi.get(`/agents/data/conversations/${e}`)).data.conversation}catch(t){return console.error("DataAgentService.getConversation error:",t),null}}static async sendQuery(e,t){var n,r,i,a;try{const n={question:e},r=(await Vi.post("/crm/agents/data/chat?mock=true",n)).data.data,i=`msg-${Date.now()}`;return{success:!0,response:null==r?void 0:r.answer,conversationId:t||`conv-${Date.now()}`,messageId:i}}catch(o){if(console.error("DataAgentService.sendQuery error:",o),401===(null==(n=o.response)?void 0:n.status))throw new Error("Unauthorized. Please login again.");if(429===(null==(r=o.response)?void 0:r.status))throw new Error("Too many requests. Please wait a moment.");if(null==(a=null==(i=o.response)?void 0:i.data)?void 0:a.detail)throw new Error(o.response.data.detail);throw new Error("Failed to get response. Please try again.")}}static async submitFeedback(e,t){var n;try{const n={message_id:e,feedback:t},r=await Vi.post("/agents/data/feedback",n);return{success:r.data.success,message:r.data.message}}catch(r){if(console.error("DataAgentService.submitFeedback error:",r),401===(null==(n=r.response)?void 0:n.status))throw new Error("Unauthorized. Please login again.");throw new Error("Failed to submit feedback.")}}static async deleteConversation(e){try{return(await Vi.delete(`/agents/data/conversations/${e}`)).data}catch(t){throw console.error("DataAgentService.deleteConversation error:",t),new Error("Failed to delete conversation.")}}}const Gv=[{id:"sq-1",text:"Which shipper had the longest days to pay"},{id:"sq-2",text:"Any of my shipments delayed right now?"},{id:"sq-3",text:"What appointments do I have tomorrow?"},{id:"sq-4",text:"Get me capacity for a load from Dallas to Phoenix tomorrow."}],qv={messages:[],conversationId:null,conversations:[],isLoadingHistory:!1,showHistory:!1,isLoading:!1,isSending:!1,error:null,inputValue:""},Xv=Tp()(Pp((e,t)=>({...qv,setInputValue:t=>{e({inputValue:t})},selectSuggestedQuestion:t=>{e({inputValue:t})},sendMessage:async n=>{const r=t();if(!n.trim()||r.isSending)return;const i={id:`msg-${Date.now()}-user`,content:n.trim(),role:"user",timestamp:(new Date).toISOString()},a=`msg-${Date.now()}-loading`,o={id:a,content:"",role:"assistant",timestamp:(new Date).toISOString(),isLoading:!0};e({messages:[...r.messages,i,o],isSending:!0,error:null,inputValue:""});try{const t=await Wv.sendQuery(n.trim(),r.conversationId||void 0);console.log("Response: ",t);const i={id:t.messageId,content:t.response,role:"assistant",timestamp:(new Date).toISOString(),feedback:null};e(e=>{const n=e.messages.filter(e=>e.id!==a).concat(i),r=(new Date).toISOString(),o=t.conversationId,s=e.conversations.findIndex(e=>e.id===o);let A;if(s>=0)A=[...e.conversations],A[s]={...A[s],messages:n,updatedAt:r};else{A=[{id:o,messages:n,createdAt:r,updatedAt:r},...e.conversations]}return{messages:n,conversationId:o,conversations:A,isSending:!1}})}catch(s){e(e=>({messages:e.messages.filter(e=>e.id!==a),isSending:!1,error:s.message||"Failed to get response"}))}},submitFeedback:async(t,n)=>{if(n){e(e=>({messages:e.messages.map(e=>e.id===t?{...e,feedback:n}:e)}));try{await Wv.submitFeedback(t,n)}catch(r){console.error("Failed to submit feedback:",r),e(e=>({messages:e.messages.map(e=>e.id===t?{...e,feedback:null}:e)}))}}},clearConversation:()=>{e({messages:[],conversationId:null,error:null})},fetchConversations:async()=>{e({isLoadingHistory:!1})},loadConversation:async n=>{const r=t();e({showHistory:!1});const i=r.conversations.find(e=>e.id===n);e(i?{messages:i.messages,conversationId:i.id}:{error:"Conversation not found"})},deleteConversation:async t=>{e(e=>({conversations:e.conversations.filter(e=>e.id!==t),...e.conversationId===t?{messages:[],conversationId:null}:{}}))},toggleHistory:()=>{const n=t(),r=!n.showHistory;e({showHistory:r}),r&&0===n.conversations.length&&t().fetchConversations()},startNewConversation:()=>{e({messages:[],conversationId:null,error:null,showHistory:!1,inputValue:""})},reset:()=>{e(qv)}})));function Yv(){}function Jv(){}const Zv=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ew=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,tw={};function nw(e,t){return(tw.jsx?ew:Zv).test(e)}const rw=/[ \t\n\f\r]/g;function iw(e){return""===e.replace(rw,"")}class aw{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}function ow(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new aw(n,r,t)}function sw(e){return e.toLowerCase()}aw.prototype.normal={},aw.prototype.property={},aw.prototype.space=void 0;class Aw{constructor(e,t){this.attribute=t,this.property=e}}Aw.prototype.attribute="",Aw.prototype.booleanish=!1,Aw.prototype.boolean=!1,Aw.prototype.commaOrSpaceSeparated=!1,Aw.prototype.commaSeparated=!1,Aw.prototype.defined=!1,Aw.prototype.mustUseProperty=!1,Aw.prototype.number=!1,Aw.prototype.overloadedBoolean=!1,Aw.prototype.property="",Aw.prototype.spaceSeparated=!1,Aw.prototype.space=void 0;let lw=0;const cw=gw(),uw=gw(),dw=gw(),hw=gw(),pw=gw(),fw=gw(),mw=gw();function gw(){return 2**++lw}const yw=Object.freeze(Object.defineProperty({__proto__:null,boolean:cw,booleanish:uw,commaOrSpaceSeparated:mw,commaSeparated:fw,number:hw,overloadedBoolean:dw,spaceSeparated:pw},Symbol.toStringTag,{value:"Module"})),vw=Object.keys(yw);class ww extends Aw{constructor(e,t,n,r){let i=-1;if(super(e,t),xw(this,"space",r),"number"==typeof n)for(;++i<vw.length;){const e=vw[i];xw(this,vw[i],(n&yw[e])===yw[e])}}}function xw(e,t,n){n&&(e[t]=n)}function bw(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new ww(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[sw(r)]=r,n[sw(a.attribute)]=r}return new aw(t,n,e.space)}ww.prototype.defined=!0;const Bw=bw({properties:{ariaActiveDescendant:null,ariaAtomic:uw,ariaAutoComplete:null,ariaBusy:uw,ariaChecked:uw,ariaColCount:hw,ariaColIndex:hw,ariaColSpan:hw,ariaControls:pw,ariaCurrent:null,ariaDescribedBy:pw,ariaDetails:null,ariaDisabled:uw,ariaDropEffect:pw,ariaErrorMessage:null,ariaExpanded:uw,ariaFlowTo:pw,ariaGrabbed:uw,ariaHasPopup:null,ariaHidden:uw,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:pw,ariaLevel:hw,ariaLive:null,ariaModal:uw,ariaMultiLine:uw,ariaMultiSelectable:uw,ariaOrientation:null,ariaOwns:pw,ariaPlaceholder:null,ariaPosInSet:hw,ariaPressed:uw,ariaReadOnly:uw,ariaRelevant:null,ariaRequired:uw,ariaRoleDescription:pw,ariaRowCount:hw,ariaRowIndex:hw,ariaRowSpan:hw,ariaSelected:uw,ariaSetSize:hw,ariaSort:null,ariaValueMax:hw,ariaValueMin:hw,ariaValueNow:hw,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function Cw(e,t){return t in e?e[t]:t}function Ew(e,t){return Cw(e,t.toLowerCase())}const kw=bw({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:fw,acceptCharset:pw,accessKey:pw,action:null,allow:null,allowFullScreen:cw,allowPaymentRequest:cw,allowUserMedia:cw,alt:null,as:null,async:cw,autoCapitalize:null,autoComplete:pw,autoFocus:cw,autoPlay:cw,blocking:pw,capture:null,charSet:null,checked:cw,cite:null,className:pw,cols:hw,colSpan:null,content:null,contentEditable:uw,controls:cw,controlsList:pw,coords:hw|fw,crossOrigin:null,data:null,dateTime:null,decoding:null,default:cw,defer:cw,dir:null,dirName:null,disabled:cw,download:dw,draggable:uw,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:cw,formTarget:null,headers:pw,height:hw,hidden:dw,high:hw,href:null,hrefLang:null,htmlFor:pw,httpEquiv:pw,id:null,imageSizes:null,imageSrcSet:null,inert:cw,inputMode:null,integrity:null,is:null,isMap:cw,itemId:null,itemProp:pw,itemRef:pw,itemScope:cw,itemType:pw,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:cw,low:hw,manifest:null,max:null,maxLength:hw,media:null,method:null,min:null,minLength:hw,multiple:cw,muted:cw,name:null,nonce:null,noModule:cw,noValidate:cw,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:cw,optimum:hw,pattern:null,ping:pw,placeholder:null,playsInline:cw,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:cw,referrerPolicy:null,rel:pw,required:cw,reversed:cw,rows:hw,rowSpan:hw,sandbox:pw,scope:null,scoped:cw,seamless:cw,selected:cw,shadowRootClonable:cw,shadowRootDelegatesFocus:cw,shadowRootMode:null,shape:null,size:hw,sizes:null,slot:null,span:hw,spellCheck:uw,src:null,srcDoc:null,srcLang:null,srcSet:null,start:hw,step:null,style:null,tabIndex:hw,target:null,title:null,translate:null,type:null,typeMustMatch:cw,useMap:null,value:uw,width:hw,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:pw,axis:null,background:null,bgColor:null,border:hw,borderColor:null,bottomMargin:hw,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:cw,declare:cw,event:null,face:null,frame:null,frameBorder:null,hSpace:hw,leftMargin:hw,link:null,longDesc:null,lowSrc:null,marginHeight:hw,marginWidth:hw,noResize:cw,noHref:cw,noShade:cw,noWrap:cw,object:null,profile:null,prompt:null,rev:null,rightMargin:hw,rules:null,scheme:null,scrolling:uw,standby:null,summary:null,text:null,topMargin:hw,valueType:null,version:null,vAlign:null,vLink:null,vSpace:hw,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:cw,disableRemotePlayback:cw,prefix:null,property:null,results:hw,security:null,unselectable:null},space:"html",transform:Ew}),Sw=bw({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:mw,accentHeight:hw,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:hw,amplitude:hw,arabicForm:null,ascent:hw,attributeName:null,attributeType:null,azimuth:hw,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:hw,by:null,calcMode:null,capHeight:hw,className:pw,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:hw,diffuseConstant:hw,direction:null,display:null,dur:null,divisor:hw,dominantBaseline:null,download:cw,dx:null,dy:null,edgeMode:null,editable:null,elevation:hw,enableBackground:null,end:null,event:null,exponent:hw,externalResourcesRequired:null,fill:null,fillOpacity:hw,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:fw,g2:fw,glyphName:fw,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:hw,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:hw,horizOriginX:hw,horizOriginY:hw,id:null,ideographic:hw,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:hw,k:hw,k1:hw,k2:hw,k3:hw,k4:hw,kernelMatrix:mw,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:hw,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:hw,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:hw,overlineThickness:hw,paintOrder:null,panose1:null,path:null,pathLength:hw,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:pw,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:hw,pointsAtY:hw,pointsAtZ:hw,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:mw,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:mw,rev:mw,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:mw,requiredFeatures:mw,requiredFonts:mw,requiredFormats:mw,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:hw,specularExponent:hw,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:hw,strikethroughThickness:hw,string:null,stroke:null,strokeDashArray:mw,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:hw,strokeOpacity:hw,strokeWidth:null,style:null,surfaceScale:hw,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:mw,tabIndex:hw,tableValues:null,target:null,targetX:hw,targetY:hw,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:mw,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:hw,underlineThickness:hw,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:hw,values:null,vAlphabetic:hw,vMathematical:hw,vectorEffect:null,vHanging:hw,vIdeographic:hw,version:null,vertAdvY:hw,vertOriginX:hw,vertOriginY:hw,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:hw,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Cw}),Fw=bw({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),Qw=bw({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Ew}),jw=bw({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),Uw={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Ow=/[A-Z]/g,Nw=/-[a-z]/g,Iw=/^data[-\w.:]+$/i;function Tw(e){return"-"+e.toLowerCase()}function Pw(e){return e.charAt(1).toUpperCase()}const Mw=ow([Bw,kw,Fw,Qw,jw],"html"),Dw=ow([Bw,Sw,Fw,Qw,jw],"svg");var Lw,Hw,_w,Rw={};function Kw(){if(_w)return Rw;_w=1;var e=Rw&&Rw.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Rw,"__esModule",{value:!0}),Rw.default=function(e,n){let r=null;if(!e||"string"!=typeof e)return r;const i=(0,t.default)(e),a="function"==typeof n;return i.forEach(e=>{if("declaration"!==e.type)return;const{property:t,value:i}=e;a?n(t,i,e):i&&(r=r||{},r[t]=i)}),r};const t=e(function(){if(Hw)return Lw;Hw=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,s=/^\s+|\s+$/g,A="";function l(e){return e?e.replace(s,A):A}return Lw=function(s,c){if("string"!=typeof s)throw new TypeError("First argument must be a string");if(!s)return[];c=c||{};var u=1,d=1;function h(e){var n=e.match(t);n&&(u+=n.length);var r=e.lastIndexOf("\n");d=~r?e.length-r:d+e.length}function p(){var e={line:u,column:d};return function(t){return t.position=new f(e),y(),t}}function f(e){this.start=e,this.end={line:u,column:d},this.source=c.source}function m(e){var t=new Error(c.source+":"+u+":"+d+": "+e);if(t.reason=e,t.filename=c.source,t.line=u,t.column=d,t.source=s,!c.silent)throw t}function g(e){var t=e.exec(s);if(t){var n=t[0];return h(n),s=s.slice(n.length),t}}function y(){g(n)}function v(e){var t;for(e=e||[];t=w();)!1!==t&&e.push(t);return e}function w(){var e=p();if("/"==s.charAt(0)&&"*"==s.charAt(1)){for(var t=2;A!=s.charAt(t)&&("*"!=s.charAt(t)||"/"!=s.charAt(t+1));)++t;if(t+=2,A===s.charAt(t-1))return m("End of comment missing");var n=s.slice(2,t-2);return d+=2,h(n),s=s.slice(t),d+=2,e({type:"comment",comment:n})}}function x(){var t=p(),n=g(r);if(n){if(w(),!g(i))return m("property missing ':'");var s=g(a),c=t({type:"declaration",property:l(n[0].replace(e,A)),value:s?l(s[0].replace(e,A)):A});return g(o),c}}return f.prototype.content=s,y(),function(){var e,t=[];for(v(t);e=x();)!1!==e&&(t.push(e),v(t));return t}()},Lw}());return Rw}var zw,Vw,$w,Ww={};function Gw(){if(zw)return Ww;zw=1,Object.defineProperty(Ww,"__esModule",{value:!0}),Ww.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,a=function(e,t){return t.toUpperCase()},o=function(e,t){return"".concat(t,"-")};return Ww.camelCase=function(s,A){return void 0===A&&(A={}),function(t){return!t||n.test(t)||e.test(t)}(s)?s:(s=s.toLowerCase(),(s=A.reactCompat?s.replace(i,o):s.replace(r,o)).replace(t,a))},Ww}const qw=ry(function(){if($w)return Vw;$w=1;var e=(Vw&&Vw.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(Kw()),t=Gw();function n(n,r){var i={};return n&&"string"==typeof n?((0,e.default)(n,function(e,n){e&&n&&(i[(0,t.camelCase)(e,r)]=n)}),i):i}return n.default=n,Vw=n}()),Xw=Jw("end"),Yw=Jw("start");function Jw(e){return function(t){const n=t&&t.position&&t.position[e]||{};if("number"==typeof n.line&&n.line>0&&"number"==typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"==typeof n.offset&&n.offset>-1?n.offset:void 0}}}function Zw(e){return e&&"object"==typeof e?"position"in e||"type"in e?tx(e.position):"start"in e||"end"in e?tx(e):"line"in e||"column"in e?ex(e):"":""}function ex(e){return nx(e&&e.line)+":"+nx(e&&e.column)}function tx(e){return ex(e&&e.start)+"-"+ex(e&&e.end)}function nx(e){return e&&"number"==typeof e?e:1}class rx extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",i={},a=!1;if(t&&(i="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){const e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}const o=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=o?o.line:void 0,this.name=Zw(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&"string"==typeof i.cause.stack?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}rx.prototype.file="",rx.prototype.name="",rx.prototype.reason="",rx.prototype.message="",rx.prototype.stack="",rx.prototype.column=void 0,rx.prototype.line=void 0,rx.prototype.ancestors=void 0,rx.prototype.cause=void 0,rx.prototype.fatal=void 0,rx.prototype.place=void 0,rx.prototype.ruleId=void 0,rx.prototype.source=void 0;const ix={}.hasOwnProperty,ax=new Map,ox=/[A-Z]/g,sx=new Set(["table","tbody","thead","tfoot","tr"]),Ax=new Set(["td","th"]),lx="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function cx(e,t){if(!t||void 0===t.Fragment)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if("function"!=typeof t.jsxDEV)throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=function(e,t){return n;function n(n,r,i,a){const o=Array.isArray(i.children),s=Yw(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}(n,t.jsxDEV)}else{if("function"!=typeof t.jsx)throw new TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw new TypeError("Expected `jsxs` in production options");r=function(e,t,n){return r;function r(e,r,i,a){const o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}(0,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?Dw:Mw,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},a=ux(i,e,void 0);return a&&"string"!=typeof a?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function ux(e,t,n){return"element"===t.type?function(e,t,n){const r=e.schema;let i=r;"svg"===t.tagName.toLowerCase()&&"html"===r.space&&(i=Dw,e.schema=i);e.ancestors.push(t);const a=mx(e,t.tagName,!1),o=function(e,t){const n={};let r,i;for(i in t.properties)if("children"!==i&&ix.call(t.properties,i)){const a=fx(e,i,t.properties[i]);if(a){const[i,o]=a;e.tableCellAlignToStyle&&"align"===i&&"string"==typeof o&&Ax.has(t.tagName)?r=o:n[i]=o}}if(r){(n.style||(n.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=r}return n}(e,t);let s=px(e,t);sx.has(t.tagName)&&(s=s.filter(function(e){return"string"!=typeof e||!("object"==typeof(t=e)?"text"===t.type&&iw(t.value):iw(t));var t}));return dx(e,o,a,t),hx(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}(e,t,n):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}gx(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?function(e,t,n){const r=e.schema;let i=r;"svg"===t.name&&"html"===r.space&&(i=Dw,e.schema=i);e.ancestors.push(t);const a=null===t.name?e.Fragment:mx(e,t.name,!0),o=function(e,t){const n={};for(const r of t.attributes)if("mdxJsxExpressionAttribute"===r.type)if(r.data&&r.data.estree&&e.evaluater){const t=r.data.estree.body[0];Yv(t.type);const i=t.expression;Yv(i.type);const a=i.properties[0];Yv(a.type),Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else gx(e,t.position);else{const i=r.name;let a;if(r.value&&"object"==typeof r.value)if(r.value.data&&r.value.data.estree&&e.evaluater){const t=r.value.data.estree.body[0];Yv(t.type),a=e.evaluater.evaluateExpression(t.expression)}else gx(e,t.position);else a=null===r.value||r.value;n[i]=a}return n}(e,t),s=px(e,t);return dx(e,o,a,t),hx(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}(e,t,n):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);gx(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return hx(r,px(e,t)),e.create(t,e.Fragment,r,n)}(e,t,n):"text"===t.type?function(e,t){return t.value}(0,t):void 0}function dx(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function hx(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function px(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:ax;for(;++r<t.children.length;){const a=t.children[r];let o;if(e.passKeys){const e="element"===a.type?a.tagName:"mdxJsxFlowElement"===a.type||"mdxJsxTextElement"===a.type?a.name:void 0;if(e){const t=i.get(e)||0;o=e+"-"+t,i.set(e,t+1)}}const s=ux(e,a,o);void 0!==s&&n.push(s)}return n}function fx(e,t,n){const r=function(e,t){const n=sw(t);let r=t,i=Aw;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&Iw.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(Nw,Pw);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!Nw.test(e)){let n=e.replace(Ow,Tw);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}i=ww}return new i(r,t)}(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?function(e){const t={};return(""===e[e.length-1]?[...e,""]:e).join((t.padRight?" ":"")+","+(!1===t.padLeft?"":" ")).trim()}(n):n.join(" ").trim()),"style"===r.property){let t="object"==typeof n?n:function(e,t){try{return qw(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const t=n,r=new rx("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:t,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=lx+"#cannot-parse-style-attribute",r}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)ix.call(e,n)&&(t[yx(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?Uw[r.property]||r.property:r.attribute,n]}}function mx(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,i=-1;for(;++i<e.length;){const t=nw(e[i])?{type:"Identifier",name:e[i]}:{type:"Literal",value:e[i]};n=n?{type:"MemberExpression",object:n,property:t,computed:Boolean(i&&"Literal"===t.type),optional:!1}:t}r=n}else r=nw(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if("Literal"===r.type){const t=r.value;return ix.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);gx(e)}function gx(e,t){const n=new rx("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=lx+"#cannot-handle-mdx-estrees-without-createevaluater",n}function yx(e){let t=e.replace(ox,vx);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function vx(e){return"-"+e.toLowerCase()}const wx={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},xx={};function bx(e,t){return Bx(e,"boolean"!=typeof xx.includeImageAlt||xx.includeImageAlt,"boolean"!=typeof xx.includeHtml||xx.includeHtml)}function Bx(e,t,n){if(function(e){return Boolean(e&&"object"==typeof e)}(e)){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Cx(e.children,t,n)}return Array.isArray(e)?Cx(e,t,n):""}function Cx(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Bx(e[i],t,n);return r.join("")}const Ex=document.createElement("i");function kx(e){const t="&"+e+";";Ex.innerHTML=t;const n=Ex.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&(n!==t&&n)}function Sx(e,t,n,r){const i=e.length;let a,o=0;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);o<r.length;)a=r.slice(o,o+1e4),a.unshift(t,0),e.splice(...a),o+=1e4,t+=1e4}function Fx(e,t){return e.length>0?(Sx(e,e.length,0,t),e):t}const Qx={}.hasOwnProperty;function jx(e){const t={};let n=-1;for(;++n<e.length;)Ux(t,e[n]);return t}function Ux(e,t){let n;for(n in t){const r=(Qx.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let a;if(i)for(a in i){Qx.call(r,a)||(r[a]=[]);const e=i[a];Ox(r[a],Array.isArray(e)?e:e?[e]:[])}}}function Ox(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);Sx(e,0,0,r)}function Nx(e,t){const n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||!(65535&~n)||65534==(65535&n)||n>1114111?"�":String.fromCodePoint(n)}function Ix(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Tx=Wx(/[A-Za-z]/),Px=Wx(/[\dA-Za-z]/),Mx=Wx(/[#-'*+\--9=?A-Z^-~]/);function Dx(e){return null!==e&&(e<32||127===e)}const Lx=Wx(/\d/),Hx=Wx(/[\dA-Fa-f]/),_x=Wx(/[!-/:-@[-`{-~]/);function Rx(e){return null!==e&&e<-2}function Kx(e){return null!==e&&(e<0||32===e)}function zx(e){return-2===e||-1===e||32===e}const Vx=Wx(new RegExp("\\p{P}|\\p{S}","u")),$x=Wx(/\s/);function Wx(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function Gx(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let o="";if(37===a&&Px(e.charCodeAt(n+1))&&Px(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){const t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o="�"}else o=String.fromCharCode(a);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function qx(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return function(r){if(zx(r))return e.enter(n),o(r);return t(r)};function o(r){return zx(r)&&a++<i?(e.consume(r),o):(e.exit(n),t(r))}}const Xx={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,function(n){if(null===n)return void e.consume(n);return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),qx(e,t,"linePrefix")},function(t){return e.enter("paragraph"),r(t)});let n;return t;function r(t){const r=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=r),n=r,i(t)}function i(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):Rx(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),i)}}};const Yx={tokenize:function(e){const t=this,n=[];let r,i,a,o=0;return s;function s(r){if(o<n.length){const i=n[o];return t.containerState=i[1],e.attempt(i[0].continuation,A,l)(r)}return l(r)}function A(e){if(o++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&y();const n=t.events.length;let i,a=n;for(;a--;)if("exit"===t.events[a][0]&&"chunkFlow"===t.events[a][1].type){i=t.events[a][1].end;break}g(o);let s=n;for(;s<t.events.length;)t.events[s][1].end={...i},s++;return Sx(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(i){if(o===n.length){if(!r)return d(i);if(r.currentConstruct&&r.currentConstruct.concrete)return p(i);t.interrupt=Boolean(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Jx,c,u)(i)}function c(e){return r&&y(),g(o),d(e)}function u(e){return t.parser.lazy[t.now().line]=o!==n.length,a=t.now().offset,p(e)}function d(n){return t.containerState={},e.attempt(Jx,h,p)(n)}function h(e){return o++,n.push([t.currentConstruct,t.containerState]),d(e)}function p(n){return null===n?(r&&y(),g(0),void e.consume(n)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:i}),f(n))}function f(n){return null===n?(m(e.exit("chunkFlow"),!0),g(0),void e.consume(n)):Rx(n)?(e.consume(n),m(e.exit("chunkFlow")),o=0,t.interrupt=void 0,s):(e.consume(n),f)}function m(e,n){const s=t.sliceStream(e);if(n&&s.push(null),e.previous=i,i&&(i.next=e),i=e,r.defineSkip(e.start),r.write(s),t.parser.lazy[e.start.line]){let e=r.events.length;for(;e--;)if(r.events[e][1].start.offset<a&&(!r.events[e][1].end||r.events[e][1].end.offset>a))return;const n=t.events.length;let i,s,A=n;for(;A--;)if("exit"===t.events[A][0]&&"chunkFlow"===t.events[A][1].type){if(i){s=t.events[A][1].end;break}i=!0}for(g(o),e=n;e<t.events.length;)t.events[e][1].end={...s},e++;Sx(t.events,A+1,0,t.events.slice(n)),t.events.length=e}}function g(r){let i=n.length;for(;i-- >r;){const r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function y(){r.write([null]),i=void 0,r=void 0,t.containerState._closeFlow=void 0}}},Jx={tokenize:function(e,t,n){return qx(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function Zx(e){return null===e||Kx(e)||$x(e)?1:Vx(e)?2:void 0}function eb(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const tb={name:"attention",resolveAll:function(e,t){let n,r,i,a,o,s,A,l,c=-1;for(;++c<e.length;)if("enter"===e[c][0]&&"attentionSequence"===e[c][1].type&&e[c][1]._close)for(n=c;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[c][1]).charCodeAt(0)){if((e[n][1]._close||e[c][1]._open)&&(e[c][1].end.offset-e[c][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[c][1].end.offset-e[c][1].start.offset)%3))continue;s=e[n][1].end.offset-e[n][1].start.offset>1&&e[c][1].end.offset-e[c][1].start.offset>1?2:1;const u={...e[n][1].end},d={...e[c][1].start};nb(u,-s),nb(d,s),a={type:s>1?"strongSequence":"emphasisSequence",start:u,end:{...e[n][1].end}},o={type:s>1?"strongSequence":"emphasisSequence",start:{...e[c][1].start},end:d},i={type:s>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[c][1].start}},r={type:s>1?"strong":"emphasis",start:{...a.start},end:{...o.end}},e[n][1].end={...a.start},e[c][1].start={...o.end},A=[],e[n][1].end.offset-e[n][1].start.offset&&(A=Fx(A,[["enter",e[n][1],t],["exit",e[n][1],t]])),A=Fx(A,[["enter",r,t],["enter",a,t],["exit",a,t],["enter",i,t]]),A=Fx(A,eb(t.parser.constructs.insideSpan.null,e.slice(n+1,c),t)),A=Fx(A,[["exit",i,t],["enter",o,t],["exit",o,t],["exit",r,t]]),e[c][1].end.offset-e[c][1].start.offset?(l=2,A=Fx(A,[["enter",e[c][1],t],["exit",e[c][1],t]])):l=0,Sx(e,n-1,c-n+3,A),c=n+A.length-l-2;break}c=-1;for(;++c<e.length;)"attentionSequence"===e[c][1].type&&(e[c][1].type="data");return e},tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Zx(r);let a;return function(t){return a=t,e.enter("attentionSequence"),o(t)};function o(s){if(s===a)return e.consume(s),o;const A=e.exit("attentionSequence"),l=Zx(s),c=!l||2===l&&i||n.includes(s),u=!i||2===i&&l||n.includes(r);return A._open=Boolean(42===a?c:c&&(i||!u)),A._close=Boolean(42===a?u:u&&(l||!c)),t(s)}}};function nb(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const rb={name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i};function i(t){return Tx(t)?(e.consume(t),a):64===t?n(t):A(t)}function a(e){return 43===e||45===e||46===e||Px(e)?(r=1,o(e)):A(e)}function o(t){return 58===t?(e.consume(t),r=0,s):(43===t||45===t||46===t||Px(t))&&r++<32?(e.consume(t),o):(r=0,A(t))}function s(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||Dx(r)?n(r):(e.consume(r),s)}function A(t){return 64===t?(e.consume(t),l):Mx(t)?(e.consume(t),A):n(t)}function l(e){return Px(e)?c(e):n(e)}function c(n){return 46===n?(e.consume(n),r=0,l):62===n?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):u(n)}function u(t){if((45===t||Px(t))&&r++<63){const n=45===t?u:c;return e.consume(t),n}return n(t)}}};const ib={partial:!0,tokenize:function(e,t,n){return function(t){return zx(t)?qx(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||Rx(e)?t(e):n(e)}}};const ab={continuation:{tokenize:function(e,t,n){const r=this;return function(t){if(zx(t))return qx(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return i(t)};function i(r){return e.attempt(ab,t,n)(r)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){const r=this;return function(t){if(62===t){const n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),i}return n(t)};function i(n){return zx(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};const ob={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return _x(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}};const sb={name:"characterReference",tokenize:function(e,t,n){const r=this;let i,a,o=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),s};function s(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),A):(e.enter("characterReferenceValue"),i=31,a=Px,l(t))}function A(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,a=Hx,l):(e.enter("characterReferenceValue"),i=7,a=Lx,l(t))}function l(s){if(59===s&&o){const i=e.exit("characterReferenceValue");return a!==Px||kx(r.sliceSerialize(i))?(e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(s)}return a(s)&&o++<i?(e.consume(s),l):n(s)}}};const Ab={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(null===t)return n(t);return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},lb={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){const r=this,i={partial:!0,tokenize:function(e,t,n){let i=0;return o;function o(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),A}function A(t){return e.enter("codeFencedFence"),zx(t)?qx(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):l(t)}function l(t){return t===a?(e.enter("codeFencedFenceSequence"),c(t)):n(t)}function c(t){return t===a?(i++,e.consume(t),c):i>=s?(e.exit("codeFencedFenceSequence"),zx(t)?qx(e,u,"whitespace")(t):u(t)):n(t)}function u(r){return null===r||Rx(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}};let a,o=0,s=0;return function(t){return function(t){const n=r.events[r.events.length-1];return o=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,a=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),A(t)}(t)};function A(t){return t===a?(s++,e.consume(t),A):s<3?n(t):(e.exit("codeFencedFenceSequence"),zx(t)?qx(e,l,"whitespace")(t):l(t))}function l(n){return null===n||Rx(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(Ab,h,y)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),c(n))}function c(t){return null===t||Rx(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),l(t)):zx(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),qx(e,u,"whitespace")(t)):96===t&&t===a?n(t):(e.consume(t),c)}function u(t){return null===t||Rx(t)?l(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),d(t))}function d(t){return null===t||Rx(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),l(t)):96===t&&t===a?n(t):(e.consume(t),d)}function h(t){return e.attempt(i,y,p)(t)}function p(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),f}function f(t){return o>0&&zx(t)?qx(e,m,"linePrefix",o+1)(t):m(t)}function m(t){return null===t||Rx(t)?e.check(Ab,h,y)(t):(e.enter("codeFlowValue"),g(t))}function g(t){return null===t||Rx(t)?(e.exit("codeFlowValue"),m(t)):(e.consume(t),g)}function y(n){return e.exit("codeFenced"),t(n)}}};const cb={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),qx(e,i,"linePrefix",5)(t)};function i(e){const t=r.events[r.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?a(e):n(e)}function a(t){return null===t?s(t):Rx(t)?e.attempt(ub,a,s)(t):(e.enter("codeFlowValue"),o(t))}function o(t){return null===t||Rx(t)?(e.exit("codeFlowValue"),a(t)):(e.consume(t),o)}function s(n){return e.exit("codeIndented"),t(n)}}},ub={partial:!0,tokenize:function(e,t,n){const r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):Rx(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i):qx(e,a,"linePrefix",5)(t)}function a(e){const a=r.events[r.events.length-1];return a&&"linePrefix"===a[1].type&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):Rx(e)?i(e):n(e)}}};const db={name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,n,r=e.length-4,i=3;if(!("lineEnding"!==e[i][1].type&&"space"!==e[i][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=i;++t<r;)if("codeTextData"===e[t][1].type){e[i][1].type="codeTextPadding",e[r][1].type="codeTextPadding",i+=2,r-=2;break}t=i-1,r++;for(;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):t!==r&&"lineEnding"!==e[t][1].type||(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let r,i,a=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),o(t)};function o(t){return 96===t?(e.consume(t),a++,o):(e.exit("codeTextSequence"),s(t))}function s(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),s):96===t?(i=e.enter("codeTextSequence"),r=0,l(t)):Rx(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s):(e.enter("codeTextData"),A(t))}function A(t){return null===t||32===t||96===t||Rx(t)?(e.exit("codeTextData"),s(t)):(e.consume(t),A)}function l(n){return 96===n?(e.consume(n),r++,l):r===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(i.type="codeTextData",A(n))}}};class hb{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const n=null==t?Number.POSITIVE_INFINITY:t;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){const r=t||0;this.setCursor(Math.trunc(e));const i=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&pb(this.left,n),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),pb(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),pb(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&0===this.right.length||e<0&&0===this.left.length))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);pb(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);pb(this.left,t.reverse())}}}function pb(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function fb(e){const t={};let n,r,i,a,o,s,A,l=-1;const c=new hb(e);for(;++l<c.length;){for(;l in t;)l=t[l];if(n=c.get(l),l&&"chunkFlow"===n[1].type&&"listItemPrefix"===c.get(l-1)[1].type&&(s=n[1]._tokenizer.events,i=0,i<s.length&&"lineEndingBlank"===s[i][1].type&&(i+=2),i<s.length&&"content"===s[i][1].type))for(;++i<s.length&&"content"!==s[i][1].type;)"chunkText"===s[i][1].type&&(s[i][1]._isInFirstContentOfListItem=!0,i++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,mb(c,l)),l=t[l],A=!0);else if(n[1]._container){for(i=l,r=void 0;i--;)if(a=c.get(i),"lineEnding"===a[1].type||"lineEndingBlank"===a[1].type)"enter"===a[0]&&(r&&(c.get(r)[1].type="lineEndingBlank"),a[1].type="lineEnding",r=i);else if("linePrefix"!==a[1].type&&"listItemIndent"!==a[1].type)break;r&&(n[1].end={...c.get(r)[1].start},o=c.slice(r,l),o.unshift(n),c.splice(r,l-r+1,o))}}return Sx(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!A}function mb(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const a=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const s=o.events,A=[],l={};let c,u,d=-1,h=n,p=0,f=0;const m=[f];for(;h;){for(;e.get(++i)[1]!==h;);a.push(i),h._tokenizer||(c=r.sliceStream(h),h.next||c.push(null),u&&o.defineSkip(h.start),h._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(c),h._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),u=h,h=h.next}for(h=n;++d<s.length;)"exit"===s[d][0]&&"enter"===s[d-1][0]&&s[d][1].type===s[d-1][1].type&&s[d][1].start.line!==s[d][1].end.line&&(f=d+1,m.push(f),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(o.events=[],h?(h._tokenizer=void 0,h.previous=void 0):m.pop(),d=m.length;d--;){const t=s.slice(m[d],m[d+1]),n=a.pop();A.push([n,n+t.length-1]),e.splice(n,2,t)}for(A.reverse(),d=-1;++d<A.length;)l[p+A[d][0]]=p+A[d][1],p+=A[d][1]-A[d][0]-1;return l}const gb={resolve:function(e){return fb(e),e},tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?i(t):Rx(t)?e.check(yb,a,i)(t):(e.consume(t),r)}function i(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function a(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},yb={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),qx(e,i,"linePrefix")};function i(i){if(null===i||Rx(i))return n(i);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&"linePrefix"===a[1].type&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}};function vb(e,t,n,r,i,a,o,s,A){const l=A||Number.POSITIVE_INFINITY;let c=0;return function(t){if(60===t)return e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),u;if(null===t||32===t||41===t||Dx(t))return n(t);return e.enter(r),e.enter(o),e.enter(s),e.enter("chunkString",{contentType:"string"}),p(t)};function u(n){return 62===n?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),d(n))}function d(t){return 62===t?(e.exit("chunkString"),e.exit(s),u(t)):null===t||60===t||Rx(t)?n(t):(e.consume(t),92===t?h:d)}function h(t){return 60===t||62===t||92===t?(e.consume(t),d):d(t)}function p(i){return c||null!==i&&41!==i&&!Kx(i)?c<l&&40===i?(e.consume(i),c++,p):41===i?(e.consume(i),c--,p):null===i||32===i||40===i||Dx(i)?n(i):(e.consume(i),92===i?f:p):(e.exit("chunkString"),e.exit(s),e.exit(o),e.exit(r),t(i))}function f(t){return 40===t||41===t||92===t?(e.consume(t),p):p(t)}}function wb(e,t,n,r,i,a){const o=this;let s,A=0;return function(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),l};function l(u){return A>999||null===u||91===u||93===u&&!s||94===u&&!A&&"_hiddenFootnoteSupport"in o.parser.constructs?n(u):93===u?(e.exit(a),e.enter(i),e.consume(u),e.exit(i),e.exit(r),t):Rx(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),l):(e.enter("chunkString",{contentType:"string"}),c(u))}function c(t){return null===t||91===t||93===t||Rx(t)||A++>999?(e.exit("chunkString"),l(t)):(e.consume(t),s||(s=!zx(t)),92===t?u:c)}function u(t){return 91===t||92===t||93===t?(e.consume(t),A++,c):c(t)}}function xb(e,t,n,r,i,a){let o;return function(t){if(34===t||39===t||40===t)return e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=40===t?41:t,s;return n(t)};function s(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),A(n))}function A(t){return t===o?(e.exit(a),s(o)):null===t?n(t):Rx(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),qx(e,A,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),l(t))}function l(t){return t===o||null===t||Rx(t)?(e.exit("chunkString"),A(t)):(e.consume(t),92===t?c:l)}function c(t){return t===o||92===t?(e.consume(t),l):l(t)}}function bb(e,t){let n;return function r(i){if(Rx(i))return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r;if(zx(i))return qx(e,r,n?"linePrefix":"lineSuffix")(i);return t(i)}}const Bb={name:"definition",tokenize:function(e,t,n){const r=this;let i;return function(t){return e.enter("definition"),function(t){return wb.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function a(t){return i=Ix(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),o):n(t)}function o(t){return Kx(t)?bb(e,s)(t):s(t)}function s(t){return vb(e,A,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function A(t){return e.attempt(Cb,l,l)(t)}function l(t){return zx(t)?qx(e,c,"whitespace")(t):c(t)}function c(a){return null===a||Rx(a)?(e.exit("definition"),r.parser.defined.push(i),t(a)):n(a)}}},Cb={partial:!0,tokenize:function(e,t,n){return function(t){return Kx(t)?bb(e,r)(t):n(t)};function r(t){return xb(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function i(t){return zx(t)?qx(e,a,"whitespace")(t):a(t)}function a(e){return null===e||Rx(e)?t(e):n(e)}}};const Eb={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return Rx(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}};const kb={name:"headingAtx",resolve:function(e,t){let n,r,i=e.length-2,a=3;"whitespace"===e[a][1].type&&(a+=2);i-2>a&&"whitespace"===e[i][1].type&&(i-=2);"atxHeadingSequence"===e[i][1].type&&(a===i-1||i-4>a&&"whitespace"===e[i-2][1].type)&&(i-=a+1===i?2:4);i>a&&(n={type:"atxHeadingText",start:e[a][1].start,end:e[i][1].end},r={type:"chunkText",start:e[a][1].start,end:e[i][1].end,contentType:"text"},Sx(e,a,i-a+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]]));return e},tokenize:function(e,t,n){let r=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),i(t)}(t)};function i(t){return 35===t&&r++<6?(e.consume(t),i):null===t||Kx(t)?(e.exit("atxHeadingSequence"),a(t)):n(t)}function a(n){return 35===n?(e.enter("atxHeadingSequence"),o(n)):null===n||Rx(n)?(e.exit("atxHeading"),t(n)):zx(n)?qx(e,a,"whitespace")(n):(e.enter("atxHeadingText"),s(n))}function o(t){return 35===t?(e.consume(t),o):(e.exit("atxHeadingSequence"),a(t))}function s(t){return null===t||35===t||Kx(t)?(e.exit("atxHeadingText"),a(t)):(e.consume(t),s)}}};const Sb=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Fb=["pre","script","style","textarea"],Qb={concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2));return e},tokenize:function(e,t,n){const r=this;let i,a,o,s,A;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),l}(t)};function l(s){return 33===s?(e.consume(s),c):47===s?(e.consume(s),a=!0,h):63===s?(e.consume(s),i=3,r.interrupt?t:I):Tx(s)?(e.consume(s),o=String.fromCharCode(s),p):n(s)}function c(a){return 45===a?(e.consume(a),i=2,u):91===a?(e.consume(a),i=5,s=0,d):Tx(a)?(e.consume(a),i=4,r.interrupt?t:I):n(a)}function u(i){return 45===i?(e.consume(i),r.interrupt?t:I):n(i)}function d(i){const a="CDATA[";return i===a.charCodeAt(s++)?(e.consume(i),6===s?r.interrupt?t:k:d):n(i)}function h(t){return Tx(t)?(e.consume(t),o=String.fromCharCode(t),p):n(t)}function p(s){if(null===s||47===s||62===s||Kx(s)){const A=47===s,l=o.toLowerCase();return A||a||!Fb.includes(l)?Sb.includes(o.toLowerCase())?(i=6,A?(e.consume(s),f):r.interrupt?t(s):k(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?m(s):g(s)):(i=1,r.interrupt?t(s):k(s))}return 45===s||Px(s)?(e.consume(s),o+=String.fromCharCode(s),p):n(s)}function f(i){return 62===i?(e.consume(i),r.interrupt?t:k):n(i)}function m(t){return zx(t)?(e.consume(t),m):C(t)}function g(t){return 47===t?(e.consume(t),C):58===t||95===t||Tx(t)?(e.consume(t),y):zx(t)?(e.consume(t),g):C(t)}function y(t){return 45===t||46===t||58===t||95===t||Px(t)?(e.consume(t),y):v(t)}function v(t){return 61===t?(e.consume(t),w):zx(t)?(e.consume(t),v):g(t)}function w(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),A=t,x):zx(t)?(e.consume(t),w):b(t)}function x(t){return t===A?(e.consume(t),A=null,B):null===t||Rx(t)?n(t):(e.consume(t),x)}function b(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||Kx(t)?v(t):(e.consume(t),b)}function B(e){return 47===e||62===e||zx(e)?g(e):n(e)}function C(t){return 62===t?(e.consume(t),E):n(t)}function E(t){return null===t||Rx(t)?k(t):zx(t)?(e.consume(t),E):n(t)}function k(t){return 45===t&&2===i?(e.consume(t),j):60===t&&1===i?(e.consume(t),U):62===t&&4===i?(e.consume(t),T):63===t&&3===i?(e.consume(t),I):93===t&&5===i?(e.consume(t),N):!Rx(t)||6!==i&&7!==i?null===t||Rx(t)?(e.exit("htmlFlowData"),S(t)):(e.consume(t),k):(e.exit("htmlFlowData"),e.check(jb,P,S)(t))}function S(t){return e.check(Ub,F,P)(t)}function F(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Q}function Q(t){return null===t||Rx(t)?S(t):(e.enter("htmlFlowData"),k(t))}function j(t){return 45===t?(e.consume(t),I):k(t)}function U(t){return 47===t?(e.consume(t),o="",O):k(t)}function O(t){if(62===t){const n=o.toLowerCase();return Fb.includes(n)?(e.consume(t),T):k(t)}return Tx(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),O):k(t)}function N(t){return 93===t?(e.consume(t),I):k(t)}function I(t){return 62===t?(e.consume(t),T):45===t&&2===i?(e.consume(t),I):k(t)}function T(t){return null===t||Rx(t)?(e.exit("htmlFlowData"),P(t)):(e.consume(t),T)}function P(n){return e.exit("htmlFlow"),t(n)}}},jb={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(ib,t,n)}}},Ub={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(Rx(t))return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i;return n(t)};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}};const Ob={name:"htmlText",tokenize:function(e,t,n){const r=this;let i,a,o;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),s};function s(t){return 33===t?(e.consume(t),A):47===t?(e.consume(t),w):63===t?(e.consume(t),y):Tx(t)?(e.consume(t),B):n(t)}function A(t){return 45===t?(e.consume(t),l):91===t?(e.consume(t),a=0,h):Tx(t)?(e.consume(t),g):n(t)}function l(t){return 45===t?(e.consume(t),d):n(t)}function c(t){return null===t?n(t):45===t?(e.consume(t),u):Rx(t)?(o=c,O(t)):(e.consume(t),c)}function u(t){return 45===t?(e.consume(t),d):c(t)}function d(e){return 62===e?U(e):45===e?u(e):c(e)}function h(t){const r="CDATA[";return t===r.charCodeAt(a++)?(e.consume(t),6===a?p:h):n(t)}function p(t){return null===t?n(t):93===t?(e.consume(t),f):Rx(t)?(o=p,O(t)):(e.consume(t),p)}function f(t){return 93===t?(e.consume(t),m):p(t)}function m(t){return 62===t?U(t):93===t?(e.consume(t),m):p(t)}function g(t){return null===t||62===t?U(t):Rx(t)?(o=g,O(t)):(e.consume(t),g)}function y(t){return null===t?n(t):63===t?(e.consume(t),v):Rx(t)?(o=y,O(t)):(e.consume(t),y)}function v(e){return 62===e?U(e):y(e)}function w(t){return Tx(t)?(e.consume(t),x):n(t)}function x(t){return 45===t||Px(t)?(e.consume(t),x):b(t)}function b(t){return Rx(t)?(o=b,O(t)):zx(t)?(e.consume(t),b):U(t)}function B(t){return 45===t||Px(t)?(e.consume(t),B):47===t||62===t||Kx(t)?C(t):n(t)}function C(t){return 47===t?(e.consume(t),U):58===t||95===t||Tx(t)?(e.consume(t),E):Rx(t)?(o=C,O(t)):zx(t)?(e.consume(t),C):U(t)}function E(t){return 45===t||46===t||58===t||95===t||Px(t)?(e.consume(t),E):k(t)}function k(t){return 61===t?(e.consume(t),S):Rx(t)?(o=k,O(t)):zx(t)?(e.consume(t),k):C(t)}function S(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),i=t,F):Rx(t)?(o=S,O(t)):zx(t)?(e.consume(t),S):(e.consume(t),Q)}function F(t){return t===i?(e.consume(t),i=void 0,j):null===t?n(t):Rx(t)?(o=F,O(t)):(e.consume(t),F)}function Q(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||Kx(t)?C(t):(e.consume(t),Q)}function j(e){return 47===e||62===e||Kx(e)?C(e):n(e)}function U(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function O(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),N}function N(t){return zx(t)?qx(e,I,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):I(t)}function I(t){return e.enter("htmlTextData"),o(t)}}};const Nb={name:"labelEnd",resolveAll:function(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),"labelImage"===r.type||"labelLink"===r.type||"labelEnd"===r.type){const e="labelImage"===r.type?4:2;r.type="data",t+=e}}e.length!==n.length&&Sx(e,0,e.length,n);return e},resolveTo:function(e,t){let n,r,i,a,o=e.length,s=0;for(;o--;)if(n=e[o][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[o][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(i){if("enter"===e[o][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=o,"labelLink"!==n.type)){s=2;break}}else"labelEnd"===n.type&&(i=o);const A={type:"labelLink"===e[r][1].type?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},l={type:"label",start:{...e[r][1].start},end:{...e[i][1].end}},c={type:"labelText",start:{...e[r+s+2][1].end},end:{...e[i-2][1].start}};return a=[["enter",A,t],["enter",l,t]],a=Fx(a,e.slice(r+1,r+s+3)),a=Fx(a,[["enter",c,t]]),a=Fx(a,eb(t.parser.constructs.insideSpan.null,e.slice(r+s+4,i-3),t)),a=Fx(a,[["exit",c,t],e[i-2],e[i-1],["exit",l,t]]),a=Fx(a,e.slice(i+1)),a=Fx(a,[["exit",A,t]]),Sx(e,r,e.length,a),e},tokenize:function(e,t,n){const r=this;let i,a,o=r.events.length;for(;o--;)if(("labelImage"===r.events[o][1].type||"labelLink"===r.events[o][1].type)&&!r.events[o][1]._balanced){i=r.events[o][1];break}return function(t){if(!i)return n(t);if(i._inactive)return c(t);return a=r.parser.defined.includes(Ix(r.sliceSerialize({start:i.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),s};function s(t){return 40===t?e.attempt(Ib,l,a?l:c)(t):91===t?e.attempt(Tb,l,a?A:c)(t):a?l(t):c(t)}function A(t){return e.attempt(Pb,l,c)(t)}function l(e){return t(e)}function c(e){return i._balanced=!0,n(e)}}},Ib={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return Kx(t)?bb(e,i)(t):i(t)}function i(t){return 41===t?l(t):vb(e,a,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function a(t){return Kx(t)?bb(e,s)(t):l(t)}function o(e){return n(e)}function s(t){return 34===t||39===t||40===t?xb(e,A,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):l(t)}function A(t){return Kx(t)?bb(e,l)(t):l(t)}function l(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},Tb={tokenize:function(e,t,n){const r=this;return function(t){return wb.call(r,e,i,a,"reference","referenceMarker","referenceString")(t)};function i(e){return r.parser.defined.includes(Ix(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function a(e){return n(e)}}},Pb={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}};const Mb={name:"labelStartImage",resolveAll:Nb.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),i};function i(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),a):n(t)}function a(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const Db={name:"labelStartLink",resolveAll:Nb.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),i};function i(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const Lb={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),qx(e,t,"linePrefix")}}};const Hb={name:"thematicBreak",tokenize:function(e,t,n){let r,i=0;return function(t){return e.enter("thematicBreak"),function(e){return r=e,a(e)}(t)};function a(a){return a===r?(e.enter("thematicBreakSequence"),o(a)):i>=3&&(null===a||Rx(a))?(e.exit("thematicBreak"),t(a)):n(a)}function o(t){return t===r?(e.consume(t),i++,o):(e.exit("thematicBreakSequence"),zx(t)?qx(e,a,"whitespace")(t):a(t))}}};const _b={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ib,function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,qx(e,t,"listItemIndent",r.containerState.size+1)(n)},function(n){if(r.containerState.furtherBlankLines||!zx(n))return r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,i(n);return r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Kb,t,i)(n)});function i(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,qx(e,e.attempt(_b,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&"linePrefix"===i[1].type?i[2].sliceSerialize(i[1],!0).length:0,o=0;return function(t){const i=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===i?!r.containerState.marker||t===r.containerState.marker:Lx(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),"listUnordered"===i)return e.enter("listItemPrefix"),42===t||45===t?e.check(Hb,n,A)(t):A(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(t)}return n(t)};function s(t){return Lx(t)&&++o<10?(e.consume(t),s):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),A(t)):n(t)}function A(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(ib,r.interrupt?n:l,e.attempt(Rb,u,c))}function l(e){return r.containerState.initialBlankLine=!0,a++,u(e)}function c(t){return zx(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),u):n(t)}function u(n){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},Rb={partial:!0,tokenize:function(e,t,n){const r=this;return qx(e,function(e){const i=r.events[r.events.length-1];return!zx(e)&&i&&"listItemPrefixWhitespace"===i[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},Kb={partial:!0,tokenize:function(e,t,n){const r=this;return qx(e,function(e){const i=r.events[r.events.length-1];return i&&"listItemIndent"===i[1].type&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)},"listItemIndent",r.containerState.size+1)}};const zb={name:"setextUnderline",resolveTo:function(e,t){let n,r,i,a=e.length;for(;a--;)if("enter"===e[a][0]){if("content"===e[a][1].type){n=a;break}"paragraph"===e[a][1].type&&(r=a)}else"content"===e[a][1].type&&e.splice(a,1),i||"definition"!==e[a][1].type||(i=a);const o={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};e[r][1].type="setextHeadingText",i?(e.splice(r,0,["enter",o,t]),e.splice(i+1,0,["exit",e[n][1],t]),e[n][1].end={...e[i][1].end}):e[n][1]=o;return e.push(["exit",o,t]),e},tokenize:function(e,t,n){const r=this;let i;return function(t){let o,s=r.events.length;for(;s--;)if("lineEnding"!==r.events[s][1].type&&"linePrefix"!==r.events[s][1].type&&"content"!==r.events[s][1].type){o="paragraph"===r.events[s][1].type;break}if(!r.parser.lazy[r.now().line]&&(r.interrupt||o))return e.enter("setextHeadingLine"),i=t,function(t){return e.enter("setextHeadingLineSequence"),a(t)}(t);return n(t)};function a(t){return t===i?(e.consume(t),a):(e.exit("setextHeadingLineSequence"),zx(t)?qx(e,o,"lineSuffix")(t):o(t))}function o(r){return null===r||Rx(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};const Vb={tokenize:function(e){const t=this,n=e.attempt(ib,function(r){if(null===r)return void e.consume(r);return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n},e.attempt(this.parser.constructs.flowInitial,r,qx(e,e.attempt(this.parser.constructs.flow,r,e.attempt(gb,r)),"linePrefix")));return n;function r(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}}};const $b={resolveAll:Xb()},Wb=qb("string"),Gb=qb("text");function qb(e){return{resolveAll:Xb("text"===e?Yb:void 0),tokenize:function(t){const n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return A(e)?i(e):o(e)}function o(e){if(null!==e)return t.enter("data"),t.consume(e),s;t.consume(e)}function s(e){return A(e)?(t.exit("data"),i(e)):(t.consume(e),s)}function A(e){if(null===e)return!0;const t=r[e];let i=-1;if(t)for(;++i<t.length;){const e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function Xb(e){return function(t,n){let r,i=-1;for(;++i<=t.length;)void 0===r?t[i]&&"data"===t[i][1].type&&(r=i,i++):t[i]&&"data"===t[i][1].type||(i!==r+2&&(t[r][1].end=t[i-1][1].end,t.splice(r+2,i-r-2),i=r+2),r=void 0);return e?e(t,n):t}}function Yb(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){const r=e[n-1][1],i=t.sliceStream(r);let a,o=i.length,s=-1,A=0;for(;o--;){const e=i[o];if("string"==typeof e){for(s=e.length;32===e.charCodeAt(s-1);)A++,s--;if(s)break;s=-1}else if(-2===e)a=!0,A++;else if(-1!==e){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(A=0),A){const i={type:n===e.length||a||A<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?s:r.start._bufferIndex+s,_index:r.start._index+o,line:r.end.line,column:r.end.column-A,offset:r.end.offset-A},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,["enter",i,t],["exit",i,t]),n+=2)}n++}return e}const Jb={42:_b,43:_b,45:_b,48:_b,49:_b,50:_b,51:_b,52:_b,53:_b,54:_b,55:_b,56:_b,57:_b,62:ab},Zb={91:Bb},eB={[-2]:cb,[-1]:cb,32:cb},tB={35:kb,42:Hb,45:[zb,Hb],60:Qb,61:zb,95:Hb,96:lb,126:lb},nB={38:sb,92:ob},rB={[-5]:Lb,[-4]:Lb,[-3]:Lb,33:Mb,38:sb,42:tb,60:[rb,Ob],91:Db,92:[Eb,ob],93:Nb,95:tb,96:db},iB={null:[tb,$b]},aB=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:Zb,disable:{null:[]},document:Jb,flow:tB,flowInitial:eB,insideSpan:iB,string:nB,text:rB},Symbol.toStringTag,{value:"Module"}));function oB(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},a=[];let o=[],s=[];const A={attempt:m(function(e,t){g(e,t.from)}),check:m(f),consume:function(e){Rx(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,y()):-1!==e&&(r.column++,r.offset++);r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++));l.previous=e},enter:function(e,t){const n=t||{};return n.type=e,n.start=d(),l.events.push(["enter",n,l]),s.push(n),n},exit:function(e){const t=s.pop();return t.end=d(),l.events.push(["exit",t,l]),t},interrupt:m(f,{interrupt:!0})},l={code:null,containerState:{},defineSkip:function(e){i[e.line]=e.column,y()},events:[],now:d,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let o;if("string"==typeof a)o=a;else switch(a){case-5:o="\r";break;case-4:o="\n";break;case-3:o="\r\n";break;case-2:o=t?" ":"\t";break;case-1:if(!t&&i)continue;o=" ";break;default:o=String.fromCharCode(a)}i=-2===a,r.push(o)}return r.join("")}(u(e),t)},sliceStream:u,write:function(e){if(o=Fx(o,e),h(),null!==o[o.length-1])return[];return g(t,0),l.events=eb(a,l.events,l),l.events}};let c=t.tokenize.call(l,A);return t.resolveAll&&a.push(t),l;function u(e){return function(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){const e=o[0];"string"==typeof e?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}(o,e)}function d(){const{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(){let e;for(;r._index<o.length;){const t=o[r._index];if("string"==typeof t)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)p(t.charCodeAt(r._bufferIndex));else p(t)}}function p(e){c=c(e)}function f(e,t){t.restore()}function m(e,t){return function(n,i,a){let o,c,u,h;return Array.isArray(n)?p(n):"tokenize"in n?p([n]):function(e){return t;function t(t){const n=null!==t&&e[t],r=null!==t&&e.null;return p([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}(n);function p(e){return o=e,c=0,0===e.length?a:f(e[c])}function f(e){return function(n){h=function(){const e=d(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,y()}}(),u=e,e.partial||(l.currentConstruct=e);if(e.name&&l.parser.constructs.disable.null.includes(e.name))return g();return e.tokenize.call(t?Object.assign(Object.create(l),t):l,A,m,g)(n)}}function m(t){return e(u,h),i}function g(e){return h.restore(),++c<o.length?f(o[c]):a}}}function g(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&Sx(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function y(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}const sB=/[\0\t\n\r]/g;const AB=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function lB(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return Nx(n.slice(t?2:1),t?16:10)}return kx(n)||e}const cB={}.hasOwnProperty;function uB(e,t,n){return"string"!=typeof t&&(n=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(te),autolinkProtocol:E,autolinkEmail:E,atxHeading:a(Y),blockQuote:a($),characterEscape:E,characterReference:E,codeFenced:a(W),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(W,o),codeText:a(G,o),codeTextData:E,data:E,codeFlowValue:E,definition:a(q),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(X),hardBreakEscape:a(J),hardBreakTrailing:a(J),htmlFlow:a(Z,o),htmlFlowData:E,htmlText:a(Z,o),htmlTextData:E,image:a(ee),label:o,link:a(te),listItem:a(re),listItemValue:d,listOrdered:a(ne,u),listUnordered:a(ne),paragraph:a(ie),reference:L,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(Y),strong:a(ae),thematicBreak:a(se)},exit:{atxHeading:A(),atxHeadingSequence:x,autolink:A(),autolinkEmail:V,autolinkProtocol:z,blockQuote:A(),characterEscapeValue:k,characterReferenceMarkerHexadecimal:_,characterReferenceMarkerNumeric:_,characterReferenceValue:R,characterReference:K,codeFenced:A(m),codeFencedFence:f,codeFencedFenceInfo:h,codeFencedFenceMeta:p,codeFlowValue:k,codeIndented:A(g),codeText:A(U),codeTextData:k,data:k,definition:A(),definitionDestinationString:w,definitionLabelString:y,definitionTitleString:v,emphasis:A(),hardBreakEscape:A(F),hardBreakTrailing:A(F),htmlFlow:A(Q),htmlFlowData:k,htmlText:A(j),htmlTextData:k,image:A(N),label:T,labelText:I,lineEnding:S,link:A(O),listItem:A(),listOrdered:A(),listUnordered:A(),paragraph:A(),referenceString:H,resourceDestinationString:P,resourceTitleString:M,resource:D,setextHeading:A(C),setextHeadingLineSequence:B,setextHeadingText:b,strong:A(),thematicBreak:A()}};hB(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(e){let r={type:"root",children:[]};const a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:c,data:n},A=[];let u=-1;for(;++u<e.length;)if("listOrdered"===e[u][1].type||"listUnordered"===e[u][1].type)if("enter"===e[u][0])A.push(u);else{u=i(e,A.pop(),u)}for(u=-1;++u<e.length;){const n=t[e[u][0]];cB.call(n,e[u][1].type)&&n[e[u][1].type].call(Object.assign({sliceSerialize:e[u][2].sliceSerialize},a),e[u][1])}if(a.tokenStack.length>0){const e=a.tokenStack[a.tokenStack.length-1];(e[1]||fB).call(a,void 0,e[0])}for(r.position={start:dB(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:dB(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},u=-1;++u<t.transforms.length;)r=t.transforms[u](r)||r;return r}function i(e,t,n){let r,i,a,o,s=t-1,A=-1,l=!1;for(;++s<=n;){const t=e[s];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?A++:A--,o=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||o||A||a||(a=s),o=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:o=void 0}if(!A&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===A&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let o=s;for(i=void 0;o--;){const t=e[o];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;i&&(e[i][1].type="lineEndingBlank",l=!0),t[1].type="lineEnding",i=o}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}a&&(!i||a<i)&&(r._spread=!0),r.end=Object.assign({},i?e[i][1].start:t[1].end),e.splice(i||s,0,["exit",r,t[2]]),s++,n++}if("listItemPrefix"===t[1].type){const i={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=i,e.splice(s,0,["enter",i,t[2]]),s++,n++,a=void 0,o=!0}}}return e[t][1]._spread=l,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:"fragment",children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:dB(t.start),end:void 0}}function A(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+Zw({start:e.start,end:e.end})+"): it’s not open");if(r[0].type!==e.type)if(t)t.call(this,e,r[0]);else{(r[1]||fB).call(this,e,r[0])}n.position.end=dB(e.end)}function c(){return bx(this.stack.pop())}function u(){this.data.expectingFirstListItemValue=!0}function d(e){if(this.data.expectingFirstListItemValue){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function h(){const e=this.resume();this.stack[this.stack.length-1].lang=e}function p(){const e=this.resume();this.stack[this.stack.length-1].meta=e}function f(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function m(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function g(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function y(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Ix(this.sliceSerialize(e)).toLowerCase()}function v(){const e=this.resume();this.stack[this.stack.length-1].title=e}function w(){const e=this.resume();this.stack[this.stack.length-1].url=e}function x(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}}function b(){this.data.setextHeadingSlurpLineEnding=!0}function B(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2}function C(){this.data.setextHeadingSlurpLineEnding=void 0}function E(e){const t=this.stack[this.stack.length-1].children;let n=t[t.length-1];n&&"text"===n.type||(n=oe(),n.position={start:dB(e.start),end:void 0},t.push(n)),this.stack.push(n)}function k(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=dB(e.end)}function S(e){const n=this.stack[this.stack.length-1];if(this.data.atHardBreak){return n.children[n.children.length-1].position.end=dB(e.end),void(this.data.atHardBreak=void 0)}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(E.call(this,e),k.call(this,e))}function F(){this.data.atHardBreak=!0}function Q(){const e=this.resume();this.stack[this.stack.length-1].value=e}function j(){const e=this.resume();this.stack[this.stack.length-1].value=e}function U(){const e=this.resume();this.stack[this.stack.length-1].value=e}function O(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function N(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function I(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=function(e){return e.replace(AB,lB)}(t),n.identifier=Ix(t).toLowerCase()}function T(){const e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];if(this.data.inReference=!0,"link"===n.type){const t=e.children;n.children=t}else n.alt=t}function P(){const e=this.resume();this.stack[this.stack.length-1].url=e}function M(){const e=this.resume();this.stack[this.stack.length-1].title=e}function D(){this.data.inReference=void 0}function L(){this.data.referenceType="collapsed"}function H(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Ix(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"}function _(e){this.data.characterReferenceType=e.type}function R(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let r;if(n)r=Nx(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0;else{r=kx(t)}this.stack[this.stack.length-1].value+=r}function K(e){this.stack.pop().position.end=dB(e.end)}function z(e){k.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function V(e){k.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function $(){return{type:"blockquote",children:[]}}function W(){return{type:"code",lang:null,meta:null,value:""}}function G(){return{type:"inlineCode",value:""}}function q(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function X(){return{type:"emphasis",children:[]}}function Y(){return{type:"heading",depth:0,children:[]}}function J(){return{type:"break"}}function Z(){return{type:"html",value:""}}function ee(){return{type:"image",title:null,url:"",alt:null}}function te(){return{type:"link",title:null,url:"",children:[]}}function ne(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function re(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function ie(){return{type:"paragraph",children:[]}}function ae(){return{type:"strong",children:[]}}function oe(){return{type:"text",value:""}}function se(){return{type:"thematicBreak"}}}(n)(function(e){for(;!fb(e););return e}(function(e){const t={constructs:jx([aB,...(e||{}).extensions||[]]),content:n(Xx),defined:[],document:n(Yx),flow:n(Vb),lazy:{},string:n(Wb),text:n(Gb)};return t;function n(e){return function(n){return oB(t,e,n)}}}(n).document().write(function(){let e,t=1,n="",r=!0;return function(i,a,o){const s=[];let A,l,c,u,d;for(i=n+("string"==typeof i?i.toString():new TextDecoder(a||void 0).decode(i)),c=0,n="",r&&(65279===i.charCodeAt(0)&&c++,r=void 0);c<i.length;){if(sB.lastIndex=c,A=sB.exec(i),u=A&&void 0!==A.index?A.index:i.length,d=i.charCodeAt(u),!A){n=i.slice(c);break}if(10===d&&c===u&&e)s.push(-3),e=void 0;else switch(e&&(s.push(-5),e=void 0),c<u&&(s.push(i.slice(c,u)),t+=u-c),d){case 0:s.push(65533),t++;break;case 9:for(l=4*Math.ceil(t/4),s.push(-2);t++<l;)s.push(-1);break;case 10:s.push(-4),t=1;break;default:e=!0,t=1}c=u+1}return o&&(e&&s.push(-5),n&&s.push(n),s.push(null)),s}}()(e,t,!0))))}function dB(e){return{line:e.line,column:e.column,offset:e.offset}}function hB(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?hB(e,r):pB(e,r)}}function pB(e,t){let n;for(n in t)if(cB.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function fB(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Zw({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Zw({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Zw({start:t.start,end:t.end})+") is still open")}function mB(e){const t=this;t.parser=function(n){return uB(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function gB(e,t){const n=t.referenceType;let r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),a=i[0];a&&"text"===a.type?a.value="["+a.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&"text"===o.type?o.value+=r:i.push({type:"text",value:r}),i}function yB(e){const t=e.spread;return null==t?e.children.length>1:t}function vB(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const a=[];for(;r;)a.push(wB(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(wB(t.slice(i),i>0,!1)),a.join("")}function wB(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;9===t||32===t;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}const xB={blockquote:function(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)},break:function(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){const n=t.value?t.value+"\n":"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a},delete:function(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:function(e,t){const n="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Gx(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let o,s=e.footnoteCounts.get(r);void 0===s?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);const A={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,A);const l={type:"element",tagName:"sup",properties:{},children:[A]};return e.patch(t,l),e.applyData(t,l)},heading:function(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return gB(e,t);const i={src:Gx(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)},image:function(e,t){const n={src:Gx(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)},linkReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return gB(e,t);const i={href:Gx(r.url||"")};null!==r.title&&void 0!==r.title&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)},link:function(e,t){const n={href:Gx(t.url)};null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},listItem:function(e,t,n){const r=e.all(t),i=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=yB(n[r])}return t}(n):yB(t),a={},o=[];if("boolean"==typeof t.checked){const e=r[0];let n;e&&"element"===e.type&&"p"===e.tagName?n=e:(n={type:"element",tagName:"p",properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:"text",value:" "}),n.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const e=r[s];(i||0!==s||"element"!==e.type||"p"!==e.tagName)&&o.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||i?o.push(e):o.push(...e.children)}const A=r[r.length-1];A&&(i||"element"!==A.type||"p"!==A.tagName)&&o.push({type:"text",value:"\n"});const l={type:"element",tagName:"li",properties:a,children:o};return e.patch(t,l),e.applyData(t,l)},list:function(e,t){const n={},r=e.all(t);let i=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++i<r.length;){const e=r[i];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)},paragraph:function(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){const r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=Yw(t.children[1]),o=Xw(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)},tableCell:function(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){const r=n?n.children:void 0,i=0===(r?r.indexOf(t):1)?"th":"td",a=n&&"table"===n.type?n.align:void 0,o=a?a.length:t.children.length;let s=-1;const A=[];for(;++s<o;){const n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:"element",tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),A.push(l)}const l={type:"element",tagName:"tr",properties:{},children:e.wrap(A,!0)};return e.patch(t,l),e.applyData(t,l)},text:function(e,t){const n={type:"text",value:vB(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:bB,yaml:bB,definition:bB,footnoteDefinition:bB};function bB(){}const BB="object"==typeof self?self:globalThis,CB=e=>((e,t)=>{const n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);const[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{const e=n([],i);for(const t of o)e.push(r(t));return e}case 2:{const e=n({},i);for(const[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{const{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{const e=n(new Map,i);for(const[t,n]of o)e.set(r(t),r(n));return e}case 6:{const e=n(new Set,i);for(const t of o)e.add(r(t));return e}case 7:{const{name:e,message:t}=o;return n(new BB[e](t),i)}case 8:return n(BigInt(o),i);case"BigInt":return n(Object(BigInt(o)),i);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(new BB[a](o),i)};return r})(new Map,e)(0),EB="",{toString:kB}={},{keys:SB}=Object,FB=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=kB.call(e).slice(8,-1);switch(n){case"Array":return[1,EB];case"Object":return[2,EB];case"Date":return[3,EB];case"RegExp":return[4,EB];case"Map":return[5,EB];case"Set":return[6,EB];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},QB=([e,t])=>0===e&&("function"===t||"symbol"===t),jB=(e,{json:t,lossy:n}={})=>{const r=[];return((e,t,n,r)=>{const i=(e,t)=>{const i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=FB(r);switch(o){case 0:{let t=r;switch(s){case"bigint":o=8,t=r.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+s);t=null;break;case"undefined":return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return"DataView"===s?e=new Uint8Array(r.buffer):"ArrayBuffer"===s&&(e=new Uint8Array(r)),i([s,[...e]],r)}const e=[],t=i([o,e],r);for(const n of r)e.push(a(n));return t}case 2:{if(s)switch(s){case"BigInt":return i([s,r.toString()],r);case"Boolean":case"Number":case"String":return i([s,r.valueOf()],r)}if(t&&"toJSON"in r)return a(r.toJSON());const n=[],A=i([o,n],r);for(const t of SB(r))!e&&QB(FB(r[t]))||n.push([a(t),a(r[t])]);return A}case 3:return i([o,r.toISOString()],r);case 4:{const{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{const t=[],n=i([o,t],r);for(const[i,o]of r)(e||!QB(FB(i))&&!QB(FB(o)))&&t.push([a(i),a(o)]);return n}case 6:{const t=[],n=i([o,t],r);for(const i of r)!e&&QB(FB(i))||t.push(a(i));return n}}const{message:A}=r;return i([o,{name:s,message:A}],r)};return a})(!(t||n),!!t,new Map,r)(e),r},UB="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?CB(jB(e,t)):structuredClone(e):(e,t)=>CB(jB(e,t));function OB(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function NB(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const IB=function(e){if(null==e)return PB;if("function"==typeof e)return TB(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=IB(e[n]);return TB(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}(e):function(e){const t=e;return TB(n);function n(n){const r=n;let i;for(i in e)if(r[i]!==t[i])return!1;return!0}}(e);if("string"==typeof e)return function(e){return TB(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function TB(e){return function(t,n,r){return Boolean(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function PB(){return!0}const MB=[],DB=!0,LB=!1;function HB(e,t,n,r){let i;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):i=t;const a=IB(i),o=r?-1:1;!function e(i,s,A){const l=i&&"object"==typeof i?i:{};if("string"==typeof l.type){const e="string"==typeof l.tagName?l.tagName:"string"==typeof l.name?l.name:void 0;Object.defineProperty(c,"name",{value:"node ("+i.type+(e?"<"+e+">":"")+")"})}return c;function c(){let l,c,u,d=MB;if((!t||a(i,s,A[A.length-1]||void 0))&&(d=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[DB,e];return null==e?MB:[e]}(n(i,A)),d[0]===LB))return d;if("children"in i&&i.children){const t=i;if(t.children&&"skip"!==d[0])for(c=(r?t.children.length:-1)+o,u=A.concat(t);c>-1&&c<t.children.length;){const n=t.children[c];if(l=e(n,c,u)(),l[0]===LB)return l;c="number"==typeof l[1]?l[1]:c+o}}return d}}(e,void 0,[])()}function _B(e,t,n,r){let i,a,o;"function"==typeof t&&"function"!=typeof n?(a=void 0,o=t,i=n):(a=t,o=n,i=r),HB(e,a,function(e,t){const n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)},i)}const RB={}.hasOwnProperty,KB={};function zB(e,t){e.position&&(t.position=function(e){const t=Yw(e),n=Xw(e);if(t&&n)return{start:t,end:n}}(e))}function VB(e,t){let n=t;if(e&&e.data){const t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;if("string"==typeof t)if("element"===n.type)n.tagName=t;else{n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}}"element"===n.type&&i&&Object.assign(n.properties,UB(i)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function $B(e,t){const n=t.data||{},r=!("value"in t)||RB.call(n,"hProperties")||RB.call(n,"hChildren")?{type:"element",tagName:"div",properties:{},children:e.all(t)}:{type:"text",value:t.value};return e.patch(t,r),e.applyData(t,r)}function WB(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function GB(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function qB(e,t){const n=function(e,t){const n=t||KB,r=new Map,i=new Map,a=new Map,o={...xB,...n.handlers},s={all:function(e){const t=[];if("children"in e){const n=e.children;let r=-1;for(;++r<n.length;){const i=s.one(n[r],e);if(i){if(r&&"break"===n[r-1].type&&(Array.isArray(i)||"text"!==i.type||(i.value=GB(i.value)),!Array.isArray(i)&&"element"===i.type)){const e=i.children[0];e&&"text"===e.type&&(e.value=GB(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t},applyData:VB,definitionById:r,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:o,one:function(e,t){const n=e.type,r=s.handlers[n];if(RB.call(s.handlers,n)&&r)return r(s,e,t);if(s.options.passThrough&&s.options.passThrough.includes(n)){if("children"in e){const{children:t,...n}=e,r=UB(n);return r.children=s.all(e),r}return UB(e)}return(s.options.unknownHandler||$B)(s,e,t)},options:n,patch:zB,wrap:WB};return _B(e,function(e){if("definition"===e.type||"footnoteDefinition"===e.type){const t="definition"===e.type?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),s}(e,t),r=n.one(e,void 0),i=function(e){const t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||OB,r=e.options.footnoteBackLabel||NB,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let A=-1;for(;++A<e.footnoteOrder.length;){const i=e.footnoteById.get(e.footnoteOrder[A]);if(!i)continue;const a=e.all(i),o=String(i.identifier).toUpperCase(),l=Gx(o.toLowerCase());let c=0;const u=[],d=e.footnoteCounts.get(o);for(;void 0!==d&&++c<=d;){u.length>0&&u.push({type:"text",value:" "});let e="string"==typeof n?n:n(A,c);"string"==typeof e&&(e={type:"text",value:e}),u.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+l+(c>1?"-"+c:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(A,c),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const h=a[a.length-1];if(h&&"element"===h.type&&"p"===h.tagName){const e=h.children[h.children.length-1];e&&"text"===e.type?e.value+=" ":h.children.push({type:"text",value:" "}),h.children.push(...u)}else a.push(...u);const p={type:"element",tagName:"li",properties:{id:t+"fn-"+l},children:e.wrap(a,!0)};e.patch(i,p),s.push(p)}if(0!==s.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...UB(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:"\n"}]}}(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:"\n"},i),a}function XB(e,t){return e&&"run"in e?async function(n,r){const i=qB(n,{file:r,...t});await e.run(i,r)}:function(n,r){return qB(n,{file:r,...e||t})}}function YB(e){if(e)throw e}var JB,ZB;var eC=function(){if(ZB)return JB;ZB=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},a=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,i=e.call(n,"constructor"),a=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!i&&!a)return!1;for(r in n);return void 0===r||e.call(n,r)},o=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},s=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return JB=function e(){var t,n,r,A,l,c,u=arguments[0],d=1,h=arguments.length,p=!1;for("boolean"==typeof u&&(p=u,u=arguments[1]||{},d=2),(null==u||"object"!=typeof u&&"function"!=typeof u)&&(u={});d<h;++d)if(null!=(t=arguments[d]))for(n in t)r=s(u,n),u!==(A=s(t,n))&&(p&&A&&(a(A)||(l=i(A)))?(l?(l=!1,c=r&&i(r)?r:[]):c=r&&a(r)?r:{},o(u,{name:n,newValue:e(p,c,A)})):void 0!==A&&o(u,{name:n,newValue:A}));return u},JB}();const tC=ry(eC);function nC(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function rC(){const e=[],t={run:function(...t){let n=-1;const r=t.pop();if("function"!=typeof r)throw new TypeError("Expected function as last argument, not "+r);!function i(a,...o){const s=e[++n];let A=-1;if(a)r(a);else{for(;++A<t.length;)null!==o[A]&&void 0!==o[A]||(o[A]=t[A]);t=o,s?function(e,t){let n;return r;function r(...t){const r=e.length>t.length;let s;r&&t.push(i);try{s=e.apply(this,t)}catch(a){if(r&&n)throw a;return i(a)}r||(s&&s.then&&"function"==typeof s.then?s.then(o,i):s instanceof Error?i(s):o(s))}function i(e,...r){n||(n=!0,t(e,...r))}function o(e){i(null,e)}}(s,i)(...o):r(null,...o)}}(null,...t)},use:function(n){if("function"!=typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}const iC={basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');aC(e);let n,r=0,i=-1,a=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;a--;)if(47===e.codePointAt(a)){if(n){r=a+1;break}}else i<0&&(n=!0,i=a+1);return i<0?"":e.slice(r,i)}if(t===e)return"";let o=-1,s=t.length-1;for(;a--;)if(47===e.codePointAt(a)){if(n){r=a+1;break}}else o<0&&(n=!0,o=a+1),s>-1&&(e.codePointAt(a)===t.codePointAt(s--)?s<0&&(i=a):(s=-1,i=o));r===i?i=o:i<0&&(i=e.length);return e.slice(r,i)},dirname:function(e){if(aC(e),0===e.length)return".";let t,n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},extname:function(e){aC(e);let t,n=e.length,r=-1,i=0,a=-1,o=0;for(;n--;){const s=e.codePointAt(n);if(47!==s)r<0&&(t=!0,r=n+1),46===s?a<0?a=n:1!==o&&(o=1):a>-1&&(o=-1);else if(t){i=n+1;break}}if(a<0||r<0||0===o||1===o&&a===r-1&&a===i+1)return"";return e.slice(a,r)},join:function(...e){let t,n=-1;for(;++n<e.length;)aC(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){aC(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,r,i="",a=0,o=-1,s=0,A=-1;for(;++A<=e.length;){if(A<e.length)n=e.codePointAt(A);else{if(47===n)break;n=47}if(47===n){if(o===A-1||1===s);else if(o!==A-1&&2===s){if(i.length<2||2!==a||46!==i.codePointAt(i.length-1)||46!==i.codePointAt(i.length-2))if(i.length>2){if(r=i.lastIndexOf("/"),r!==i.length-1){r<0?(i="",a=0):(i=i.slice(0,r),a=i.length-1-i.lastIndexOf("/")),o=A,s=0;continue}}else if(i.length>0){i="",a=0,o=A,s=0;continue}t&&(i=i.length>0?i+"/..":"..",a=2)}else i.length>0?i+="/"+e.slice(o+1,A):i=e.slice(o+1,A),a=A-o-1;o=A,s=0}else 46===n&&s>-1?s++:s=-1}return i}(e,!t);0!==n.length||t||(n=".");n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/");return t?"/"+n:n}(t)},sep:"/"};function aC(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const oC={cwd:function(){return"/"}};function sC(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function AC(e){if("string"==typeof e)e=new URL(e);else if(!sC(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){const e=t.codePointAt(n+2);if(70===e||102===e){const e=new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}const lC=["history","path","basename","stem","extname","dirname"];class cC{constructor(e){let t;t=e?sC(e)?{path:e}:"string"==typeof e||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in t?"":oC.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n,r=-1;for(;++r<lC.length;){const e=lC[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)lC.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?iC.basename(this.path):void 0}set basename(e){dC(e,"basename"),uC(e,"basename"),this.path=iC.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?iC.dirname(this.path):void 0}set dirname(e){hC(this.basename,"dirname"),this.path=iC.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?iC.extname(this.path):void 0}set extname(e){if(uC(e,"extname"),hC(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=iC.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){sC(e)&&(e=AC(e)),dC(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?iC.basename(this.path,this.extname):void 0}set stem(e){dC(e,"stem"),uC(e,"stem"),this.path=iC.join(this.dirname||"",e+(this.extname||""))}fail(e,t,n){const r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){const r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){const r=new rx(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){if(void 0===this.value)return"";if("string"==typeof this.value)return this.value;return new TextDecoder(e||void 0).decode(this.value)}}function uC(e,t){if(e&&e.includes(iC.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+iC.sep+"`")}function dC(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function hC(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const pC=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},fC={}.hasOwnProperty;class mC extends pC{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=rC()}copy(){const e=new mC;let t=-1;for(;++t<this.attachers.length;){const n=this.attachers[t];e.use(...n)}return e.data(tC(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2===arguments.length?(wC("data",this.frozen),this.namespace[e]=t,this):fC.call(this.namespace,e)&&this.namespace[e]||void 0:e?(wC("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...n]=this.attachers[this.freezeIndex];if(!1===n[0])continue;!0===n[0]&&(n[0]=void 0);const r=t.call(e,...n);"function"==typeof r&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const t=BC(e),n=this.parser||this.Parser;return yC("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),yC("process",this.parser||this.Parser),vC("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){const a=BC(e),o=n.parse(a);function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);const i=t,a=n.stringify(i,r);var o;"string"==typeof(o=a)||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(o)?r.value=a:r.result=a,s(e,r)})}}processSync(e){let t,n=!1;return this.freeze(),yC("processSync",this.parser||this.Parser),vC("processSync",this.compiler||this.Compiler),this.process(e,function(e,r){n=!0,YB(e),t=r}),bC("processSync","process",n),t}run(e,t,n){xC(e),this.freeze();const r=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){const o=BC(t);r.run(e,o,function(t,r,o){const s=r||e;t?a(t):i?i(s):n(void 0,s,o)})}}runSync(e,t){let n,r=!1;return this.run(e,t,function(e,t){YB(e),n=t,r=!0}),bC("runSync","run",r),n}stringify(e,t){this.freeze();const n=BC(t),r=this.compiler||this.Compiler;return vC("stringify",r),xC(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(wC("use",this.frozen),null==e);else if("function"==typeof e)s(e,t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?o(e):a(e)}return this;function i(e){if("function"==typeof e)s(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;s(t,n)}else a(e)}}function a(e){if(!("plugins"in e)&&!("settings"in e))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=tC(!0,r.settings,e.settings))}function o(e){let t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;){i(e[t])}}}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(-1===i)n.push([e,...t]);else if(t.length>0){let[r,...a]=t;const o=n[i][1];nC(o)&&nC(r)&&(r=tC(!0,o,r)),n[i]=[e,r,...a]}}}}const gC=(new mC).freeze();function yC(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function vC(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function wC(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function xC(e){if(!nC(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function bC(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function BC(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new cC(e)}const CC=[],EC={allowDangerousHtml:!0},kC=/^(https?|ircs?|mailto|xmpp)$/i,SC=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function FC(e){const t=function(e){const t=e.rehypePlugins||CC,n=e.remarkPlugins||CC,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...EC}:EC,i=gC().use(mB).use(n).use(XB,r).use(t);return i}(e),n=function(e){const t=e.children||"",n=new cC;"string"==typeof t&&(n.value=t);return n}(e);return function(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,A=t.urlTransform||QC;for(const c of SC)Object.hasOwn(t,c.from)&&Jv((c.from,c.to&&c.to,c.id));return _B(e,l),cx(e,{Fragment:Ie.Fragment,components:i,ignoreInvalidStyle:!0,jsx:Ie.jsx,jsxs:Ie.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if("raw"===e.type&&i&&"number"==typeof t)return o?i.children.splice(t,1):i.children[t]={type:"text",value:e.value},t;if("element"===e.type){let t;for(t in wx)if(Object.hasOwn(wx,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=wx[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=A(String(n||""),t,e))}}if("element"===e.type){let o=n?!n.includes(e.tagName):!!a&&a.includes(e.tagName);if(!o&&r&&"number"==typeof t&&(o=!r(e,t,i)),o&&i&&"number"==typeof t)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}(t.runSync(t.parse(n),n),e)}function QC(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return-1===t||-1!==i&&t>i||-1!==n&&t>n||-1!==r&&t>r||kC.test(e.slice(0,t))?e:""}function jC(e,t){const n=String(e);if("string"!=typeof t)throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;-1!==i;)r++,i=n.indexOf(t,i+t.length);return r}function UC(e,t,n){const r=IB((n||{}).ignore||[]),i=function(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const e=n[r];t.push([OC(e[0]),NC(e[1])])}return t}(t);let a=-1;for(;++a<i.length;)HB(e,"text",o);function o(e,t){let n,o=-1;for(;++o<t.length;){const e=t[o],i=n?n.children:void 0;if(r(e,i?i.indexOf(e):void 0,n))return;n=e}if(n)return function(e,t){const n=t[t.length-1],r=i[a][0],o=i[a][1];let s=0;const A=n.children.indexOf(e);let l=!1,c=[];r.lastIndex=0;let u=r.exec(e.value);for(;u;){const n=u.index,i={index:u.index,input:u.input,stack:[...t,e]};let a=o(...u,i);if("string"==typeof a&&(a=a.length>0?{type:"text",value:a}:void 0),!1===a?r.lastIndex=n+1:(s!==n&&c.push({type:"text",value:e.value.slice(s,n)}),Array.isArray(a)?c.push(...a):a&&c.push(a),s=n+u[0].length,l=!0),!r.global)break;u=r.exec(e.value)}l?(s<e.value.length&&c.push({type:"text",value:e.value.slice(s)}),n.children.splice(A,1,...c)):c=[e];return A+c.length}(e,t)}}function OC(e){return"string"==typeof e?new RegExp(function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e),"g"):e}function NC(e){return"function"==typeof e?e:function(){return e}}const IC="phrasing",TC=["autolink","link","image","label"];function PC(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function MC(e){this.config.enter.autolinkProtocol.call(this,e)}function DC(e){this.config.exit.autolinkProtocol.call(this,e)}function LC(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function HC(e){this.config.exit.autolinkEmail.call(this,e)}function _C(e){this.exit(e)}function RC(e){UC(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,KC],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),zC]],{ignore:["link","linkReference"]})}function KC(e,t,n,r,i){let a="";if(!VC(i))return!1;if(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!function(e){const t=e.split(".");if(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))return!1;return!0}(n))return!1;const o=function(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=jC(e,"(");let a=jC(e,")");for(;-1!==r&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}(n+r);if(!o[0])return!1;const s={type:"link",title:null,url:a+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[s,{type:"text",value:o[1]}]:s}function zC(e,t,n,r){return!(!VC(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function VC(e,t){const n=e.input.charCodeAt(e.index-1);return(0===e.index||$x(n)||Vx(n))&&(!t||47!==n)}function $C(){this.buffer()}function WC(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function GC(){this.buffer()}function qC(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function XC(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ix(this.sliceSerialize(e)).toLowerCase(),n.label=t}function YC(e){this.exit(e)}function JC(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ix(this.sliceSerialize(e)).toLowerCase(),n.label=t}function ZC(e){this.exit(e)}function eE(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const o=n.enter("footnoteReference"),s=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{after:"]",before:a})),s(),o(),a+=i.move("]"),a}function tE(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:function(e,n,r,i){const a=r.createTracker(i);let o=a.move("[^");const s=r.enter("footnoteDefinition"),A=r.enter("label");o+=a.move(r.safe(r.associationId(e),{before:o,after:"]"})),A(),o+=a.move("]:"),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?"\n":" ")+r.indentLines(r.containerFlow(e,a.current()),t?rE:nE)));return s(),o},footnoteReference:eE},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}}function nE(e,t,n){return 0===t?e:rE(e,t,n)}function rE(e,t,n){return(n?"":" ")+e}eE.peek=function(){return"["};const iE=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function aE(e){this.enter({type:"delete",children:[]},e)}function oE(e){this.exit(e)}function sE(e,t,n,r){const i=n.createTracker(r),a=n.enter("strikethrough");let o=i.move("~~");return o+=n.containerPhrasing(e,{...i.current(),before:o,after:"~"}),o+=i.move("~~"),a(),o}function AE(e){return e.length}function lE(e){return null==e?"":String(e)}function cE(e){const t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:82===t||114===t?114:0}function uE(e,t,n){return">"+(n?"":" ")+e}function dE(e,t){return hE(e,t.inConstruct,!0)&&!hE(e,t.notInConstruct,!1)}function hE(e,t,n){if("string"==typeof t&&(t=[t]),!t||0===t.length)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function pE(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if("\n"===n.unsafe[i].character&&dE(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return"\\\n"}function fE(e,t,n){return(n?"":" ")+e}function mE(e){const t=e.options.quote||'"';if('"'!==t&&"'"!==t)throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function gE(e){return"&#x"+e.toString(16).toUpperCase()+";"}function yE(e,t,n){const r=Zx(e),i=Zx(t);return void 0===r?void 0===i?"_"===n?{inside:!0,outside:!0}:{inside:!1,outside:!1}:1===i?{inside:!0,outside:!0}:{inside:!1,outside:!0}:1===r?void 0===i?{inside:!1,outside:!1}:1===i?{inside:!0,outside:!0}:{inside:!1,outside:!1}:void 0===i?{inside:!1,outside:!1}:1===i?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function vE(e,t,n,r){const i=function(e){const t=e.options.emphasis||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}(n),a=n.enter("emphasis"),o=n.createTracker(r),s=o.move(i);let A=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()}));const l=A.charCodeAt(0),c=yE(r.before.charCodeAt(r.before.length-1),l,i);c.inside&&(A=gE(l)+A.slice(1));const u=A.charCodeAt(A.length-1),d=yE(r.after.charCodeAt(0),u,i);d.inside&&(A=A.slice(0,-1)+gE(u));const h=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:d.outside,before:c.outside},s+A+h}function wE(e){return e.value||""}function xE(e,t,n,r){const i=mE(n),a='"'===i?"Quote":"Apostrophe",o=n.enter("image");let s=n.enter("label");const A=n.createTracker(r);let l=A.move("![");return l+=A.move(n.safe(e.alt,{before:l,after:"]",...A.current()})),l+=A.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),l+=A.move("<"),l+=A.move(n.safe(e.url,{before:l,after:">",...A.current()})),l+=A.move(">")):(s=n.enter("destinationRaw"),l+=A.move(n.safe(e.url,{before:l,after:e.title?" ":")",...A.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=A.move(" "+i),l+=A.move(n.safe(e.title,{before:l,after:i,...A.current()})),l+=A.move(i),s()),l+=A.move(")"),o(),l}function bE(e,t,n,r){const i=e.referenceType,a=n.enter("imageReference");let o=n.enter("label");const s=n.createTracker(r);let A=s.move("![");const l=n.safe(e.alt,{before:A,after:"]",...s.current()});A+=s.move(l+"]["),o();const c=n.stack;n.stack=[],o=n.enter("reference");const u=n.safe(n.associationId(e),{before:A,after:"]",...s.current()});return o(),n.stack=c,a(),"full"!==i&&l&&l===u?"shortcut"===i?A=A.slice(0,-1):A+=s.move("]"):A+=s.move(u+"]"),A}function BE(e,t,n){let r=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const e=n.unsafe[a],t=n.compilePattern(e);let i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;10===r.charCodeAt(e)&&13===r.charCodeAt(e-1)&&e--,r=r.slice(0,e)+" "+r.slice(i.index+1)}}return i+r+i}function CE(e,t){const n=bx(e);return Boolean(!t.options.resourceLink&&e.url&&!e.title&&e.children&&1===e.children.length&&"text"===e.children[0].type&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}function EE(e,t,n,r){const i=mE(n),a='"'===i?"Quote":"Apostrophe",o=n.createTracker(r);let s,A;if(CE(e,n)){const t=n.stack;n.stack=[],s=n.enter("autolink");let r=o.move("<");return r+=o.move(n.containerPhrasing(e,{before:r,after:">",...o.current()})),r+=o.move(">"),s(),n.stack=t,r}s=n.enter("link"),A=n.enter("label");let l=o.move("[");return l+=o.move(n.containerPhrasing(e,{before:l,after:"](",...o.current()})),l+=o.move("]("),A(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(A=n.enter("destinationLiteral"),l+=o.move("<"),l+=o.move(n.safe(e.url,{before:l,after:">",...o.current()})),l+=o.move(">")):(A=n.enter("destinationRaw"),l+=o.move(n.safe(e.url,{before:l,after:e.title?" ":")",...o.current()}))),A(),e.title&&(A=n.enter(`title${a}`),l+=o.move(" "+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),A()),l+=o.move(")"),s(),l}function kE(e,t,n,r){const i=e.referenceType,a=n.enter("linkReference");let o=n.enter("label");const s=n.createTracker(r);let A=s.move("[");const l=n.containerPhrasing(e,{before:A,after:"]",...s.current()});A+=s.move(l+"]["),o();const c=n.stack;n.stack=[],o=n.enter("reference");const u=n.safe(n.associationId(e),{before:A,after:"]",...s.current()});return o(),n.stack=c,a(),"full"!==i&&l&&l===u?"shortcut"===i?A=A.slice(0,-1):A+=s.move("]"):A+=s.move(u+"]"),A}function SE(e){const t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function FE(e){const t=e.options.rule||"*";if("*"!==t&&"-"!==t&&"_"!==t)throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}sE.peek=function(){return"~"},vE.peek=function(e,t,n){return n.options.emphasis||"*"},wE.peek=function(){return"<"},xE.peek=function(){return"!"},bE.peek=function(){return"!"},BE.peek=function(){return"`"},EE.peek=function(e,t,n){return CE(e,n)?"<":"["},kE.peek=function(){return"["};const QE=IB(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function jE(e,t,n,r){const i=function(e){const t=e.options.strong||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}(n),a=n.enter("strong"),o=n.createTracker(r),s=o.move(i+i);let A=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()}));const l=A.charCodeAt(0),c=yE(r.before.charCodeAt(r.before.length-1),l,i);c.inside&&(A=gE(l)+A.slice(1));const u=A.charCodeAt(A.length-1),d=yE(r.after.charCodeAt(0),u,i);d.inside&&(A=A.slice(0,-1)+gE(u));const h=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:d.outside,before:c.outside},s+A+h}jE.peek=function(e,t,n){return n.options.strong||"*"};const UE={blockquote:function(e,t,n,r){const i=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const o=n.indentLines(n.containerFlow(e,a.current()),uE);return i(),o},break:pE,code:function(e,t,n,r){const i=function(e){const t=e.options.fence||"`";if("`"!==t&&"~"!==t)throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}(n),a=e.value||"",o="`"===i?"GraveAccent":"Tilde";if(function(e,t){return Boolean(!1===t.options.fences&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}(e,n)){const e=n.enter("codeIndented"),t=n.indentLines(a,fE);return e(),t}const s=n.createTracker(r),A=i.repeat(Math.max(function(e,t){const n=String(e);let r=n.indexOf(t),i=r,a=0,o=0;if("string"!=typeof t)throw new TypeError("Expected substring");for(;-1!==r;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}(a,i)+1,3)),l=n.enter("codeFenced");let c=s.move(A);if(e.lang){const t=n.enter(`codeFencedLang${o}`);c+=s.move(n.safe(e.lang,{before:c,after:" ",encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){const t=n.enter(`codeFencedMeta${o}`);c+=s.move(" "),c+=s.move(n.safe(e.meta,{before:c,after:"\n",encode:["`"],...s.current()})),t()}return c+=s.move("\n"),a&&(c+=s.move(a+"\n")),c+=s.move(A),l(),c},definition:function(e,t,n,r){const i=mE(n),a='"'===i?"Quote":"Apostrophe",o=n.enter("definition");let s=n.enter("label");const A=n.createTracker(r);let l=A.move("[");return l+=A.move(n.safe(n.associationId(e),{before:l,after:"]",...A.current()})),l+=A.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),l+=A.move("<"),l+=A.move(n.safe(e.url,{before:l,after:">",...A.current()})),l+=A.move(">")):(s=n.enter("destinationRaw"),l+=A.move(n.safe(e.url,{before:l,after:e.title?" ":"\n",...A.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=A.move(" "+i),l+=A.move(n.safe(e.title,{before:l,after:i,...A.current()})),l+=A.move(i),s()),o(),l},emphasis:vE,hardBreak:pE,heading:function(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(function(e,t){let n=!1;return _B(e,function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return n=!0,LB}),Boolean((!e.depth||e.depth<3)&&bx(e)&&(t.options.setext||n))}(e,n)){const t=n.enter("headingSetext"),r=n.enter("phrasing"),o=n.containerPhrasing(e,{...a.current(),before:"\n",after:"\n"});return r(),t(),o+"\n"+(1===i?"=":"-").repeat(o.length-(Math.max(o.lastIndexOf("\r"),o.lastIndexOf("\n"))+1))}const o="#".repeat(i),s=n.enter("headingAtx"),A=n.enter("phrasing");a.move(o+" ");let l=n.containerPhrasing(e,{before:"# ",after:"\n",...a.current()});return/^[\t ]/.test(l)&&(l=gE(l.charCodeAt(0))+l.slice(1)),l=l?o+" "+l:o,n.options.closeAtx&&(l+=" "+o),A(),s(),l},html:wE,image:xE,imageReference:bE,inlineCode:BE,link:EE,linkReference:kE,list:function(e,t,n,r){const i=n.enter("list"),a=n.bulletCurrent;let o=e.ordered?function(e){const t=e.options.bulletOrdered||".";if("."!==t&&")"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}(n):SE(n);const s=e.ordered?"."===o?")":".":function(e){const t=SE(e),n=e.options.bulletOther;if(!n)return"*"===t?"-":"*";if("*"!==n&&"+"!==n&&"-"!==n)throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}(n);let A=!(!t||!n.bulletLastUsed)&&o===n.bulletLastUsed;if(!e.ordered){const t=e.children?e.children[0]:void 0;if("*"!==o&&"-"!==o||!t||t.children&&t.children[0]||"list"!==n.stack[n.stack.length-1]||"listItem"!==n.stack[n.stack.length-2]||"list"!==n.stack[n.stack.length-3]||"listItem"!==n.stack[n.stack.length-4]||0!==n.indexStack[n.indexStack.length-1]||0!==n.indexStack[n.indexStack.length-2]||0!==n.indexStack[n.indexStack.length-3]||(A=!0),FE(n)===o&&t){let t=-1;for(;++t<e.children.length;){const n=e.children[t];if(n&&"listItem"===n.type&&n.children&&n.children[0]&&"thematicBreak"===n.children[0].type){A=!0;break}}}}A&&(o=s),n.bulletCurrent=o;const l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l},listItem:function(e,t,n,r){const i=function(e){const t=e.options.listItemIndent||"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(n);let a=n.bulletCurrent||SE(n);t&&"list"===t.type&&t.ordered&&(a=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+a);let o=a.length+1;("tab"===i||"mixed"===i&&(t&&"list"===t.type&&t.spread||e.spread))&&(o=4*Math.ceil(o/4));const s=n.createTracker(r);s.move(a+" ".repeat(o-a.length)),s.shift(o);const A=n.enter("listItem"),l=n.indentLines(n.containerFlow(e,s.current()),function(e,t,n){if(t)return(n?"":" ".repeat(o))+e;return(n?a:a+" ".repeat(o-a.length))+e});return A(),l},paragraph:function(e,t,n,r){const i=n.enter("paragraph"),a=n.enter("phrasing"),o=n.containerPhrasing(e,r);return a(),i(),o},root:function(e,t,n,r){return(e.children.some(function(e){return QE(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)},strong:jE,text:function(e,t,n,r){return n.safe(e.value,r)},thematicBreak:function(e,t,n){const r=(FE(n)+(n.options.ruleSpaces?" ":"")).repeat(function(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}(n));return n.options.ruleSpaces?r.slice(0,-1):r}};function OE(e){const t=e._align;this.enter({type:"table",align:t.map(function(e){return"none"===e?null:e}),children:[]},e),this.data.inTable=!0}function NE(e){this.exit(e),this.data.inTable=void 0}function IE(e){this.enter({type:"tableRow",children:[]},e)}function TE(e){this.exit(e)}function PE(e){this.enter({type:"tableCell",children:[]},e)}function ME(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,DE));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function DE(e,t){return"|"===t?t:e}function LE(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,n){let r=UE.inlineCode(e,t,n);n.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&"));return r},table:function(e,t,n,r){return s(function(e,t,n){const r=e.children;let i=-1;const a=[],o=t.enter("table");for(;++i<r.length;)a[i]=A(r[i],t,n);return o(),a}(e,n,r),e.align)},tableCell:o,tableRow:function(e,t,n,r){const i=s([A(e,n,r)]);return i.slice(0,i.indexOf("\n"))}}};function o(e,t,n,r){const i=n.enter("tableCell"),o=n.enter("phrasing"),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function s(e,t){return function(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||AE,a=[],o=[],s=[],A=[];let l=0,c=-1;for(;++c<e.length;){const t=[],r=[];let a=-1;for(e[c].length>l&&(l=e[c].length);++a<e[c].length;){const o=lE(e[c][a]);if(!1!==n.alignDelimiters){const e=i(o);r[a]=e,(void 0===A[a]||e>A[a])&&(A[a]=e)}t.push(o)}o[c]=t,s[c]=r}let u=-1;if("object"==typeof r&&"length"in r)for(;++u<l;)a[u]=cE(r[u]);else{const e=cE(r);for(;++u<l;)a[u]=e}u=-1;const d=[],h=[];for(;++u<l;){const e=a[u];let t="",r="";99===e?(t=":",r=":"):108===e?t=":":114===e&&(r=":");let i=!1===n.alignDelimiters?1:Math.max(1,A[u]-t.length-r.length);const o=t+"-".repeat(i)+r;!1!==n.alignDelimiters&&(i=t.length+i+r.length,i>A[u]&&(A[u]=i),h[u]=i),d[u]=o}o.splice(1,0,d),s.splice(1,0,h),c=-1;const p=[];for(;++c<o.length;){const e=o[c],t=s[c];u=-1;const r=[];for(;++u<l;){const i=e[u]||"";let o="",s="";if(!1!==n.alignDelimiters){const e=A[u]-(t[u]||0),n=a[u];114===n?o=" ".repeat(e):99===n?e%2?(o=" ".repeat(e/2+.5),s=" ".repeat(e/2-.5)):(o=" ".repeat(e/2),s=o):s=" ".repeat(e)}!1===n.delimiterStart||u||r.push("|"),!1===n.padding||!1===n.alignDelimiters&&""===i||!1===n.delimiterStart&&!u||r.push(" "),!1!==n.alignDelimiters&&r.push(o),r.push(i),!1!==n.alignDelimiters&&r.push(s),!1!==n.padding&&r.push(" "),!1===n.delimiterEnd&&u===l-1||r.push("|")}p.push(!1===n.delimiterEnd?r.join("").replace(/ +$/,""):r.join(""))}return p.join("\n")}(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function A(e,t,n){const r=e.children;let i=-1;const a=[],s=t.enter("tableRow");for(;++i<r.length;)a[i]=o(r[i],0,t,n);return s(),a}}function HE(e){const t=this.stack[this.stack.length-2];t.type,t.checked="taskListCheckValueChecked"===e.type}function _E(e){const t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){const e=this.stack[this.stack.length-1];e.type;const n=e.children[0];if(n&&"text"===n.type){const r=t.children;let i,a=-1;for(;++a<r.length;){const e=r[a];if("paragraph"===e.type){i=e;break}}i===e&&(n.value=n.value.slice(1),0===n.value.length?e.children.shift():e.position&&n.position&&"number"==typeof n.position.start.offset&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function RE(e,t,n,r){const i=e.children[0],a="boolean"==typeof e.checked&&i&&"paragraph"===i.type,o="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);a&&s.move(o);let A=UE.listItem(e,t,n,{...r,...s.current()});return a&&(A=A.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,function(e){return e+o})),A}const KE={tokenize:function(e,t,n){let r=0;return function t(a){if((87===a||119===a)&&r<3)return r++,e.consume(a),t;if(46===a&&3===r)return e.consume(a),i;return n(a)};function i(e){return null===e?n(e):t(e)}},partial:!0},zE={tokenize:function(e,t,n){let r,i,a;return o;function o(t){return 46===t||95===t?e.check($E,A,s)(t):null===t||Kx(t)||$x(t)||45!==t&&Vx(t)?A(t):(a=!0,e.consume(t),o)}function s(t){return 95===t?r=!0:(i=r,r=void 0),e.consume(t),o}function A(e){return i||r||!a?n(e):t(e)}},partial:!0},VE={tokenize:function(e,t){let n=0,r=0;return i;function i(o){return 40===o?(n++,e.consume(o),i):41===o&&r<n?a(o):33===o||34===o||38===o||39===o||41===o||42===o||44===o||46===o||58===o||59===o||60===o||63===o||93===o||95===o||126===o?e.check($E,t,a)(o):null===o||Kx(o)||$x(o)?t(o):(e.consume(o),i)}function a(t){return 41===t&&r++,e.consume(t),i}},partial:!0},$E={tokenize:function(e,t,n){return r;function r(o){return 33===o||34===o||39===o||41===o||42===o||44===o||46===o||58===o||59===o||63===o||95===o||126===o?(e.consume(o),r):38===o?(e.consume(o),a):93===o?(e.consume(o),i):60===o||null===o||Kx(o)||$x(o)?t(o):n(o)}function i(e){return null===e||40===e||91===e||Kx(e)||$x(e)?t(e):r(e)}function a(e){return Tx(e)?o(e):n(e)}function o(t){return 59===t?(e.consume(t),r):Tx(t)?(e.consume(t),o):n(t)}},partial:!0},WE={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return Px(e)?n(e):t(e)}},partial:!0},GE={name:"wwwAutolink",tokenize:function(e,t,n){const r=this;return function(t){if(87!==t&&119!==t||!ZE.call(r,r.previous)||rk(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(KE,e.attempt(zE,e.attempt(VE,i),n),n)(t)};function i(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:ZE},qE={name:"protocolAutolink",tokenize:function(e,t,n){const r=this;let i="",a=!1;return function(t){if((72===t||104===t)&&ek.call(r,r.previous)&&!rk(r.events))return e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(t),e.consume(t),o;return n(t)};function o(t){if(Tx(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),o;if(58===t){const n=i.toLowerCase();if("http"===n||"https"===n)return e.consume(t),s}return n(t)}function s(t){return 47===t?(e.consume(t),a?A:(a=!0,s)):n(t)}function A(t){return null===t||Dx(t)||Kx(t)||$x(t)||Vx(t)?n(t):e.attempt(zE,e.attempt(VE,l),n)(t)}function l(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:ek},XE={name:"emailAutolink",tokenize:function(e,t,n){const r=this;let i,a;return function(t){if(!nk(t)||!tk.call(r,r.previous)||rk(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(t)};function o(t){return nk(t)?(e.consume(t),o):64===t?(e.consume(t),s):n(t)}function s(t){return 46===t?e.check(WE,l,A)(t):45===t||95===t||Px(t)?(a=!0,e.consume(t),s):l(t)}function A(t){return e.consume(t),i=!0,s}function l(o){return a&&i&&Tx(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(o)):n(o)}},previous:tk},YE={};let JE=48;for(;JE<123;)YE[JE]=XE,JE++,58===JE?JE=65:91===JE&&(JE=97);function ZE(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||Kx(e)}function ek(e){return!Tx(e)}function tk(e){return!(47===e||nk(e))}function nk(e){return 43===e||45===e||46===e||95===e||Px(e)}function rk(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if(("labelLink"===r.type||"labelImage"===r.type)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}YE[43]=XE,YE[45]=XE,YE[46]=XE,YE[95]=XE,YE[72]=[XE,qE],YE[104]=[XE,qE],YE[87]=[XE,GE],YE[119]=[XE,GE];const ik={tokenize:function(e,t,n){const r=this;return qx(e,function(e){const i=r.events[r.events.length-1];return i&&"gfmFootnoteDefinitionIndent"===i[1].type&&4===i[2].sliceSerialize(i[1],!0).length?t(e):n(e)},"gfmFootnoteDefinitionIndent",5)},partial:!0};function ak(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;i--;){const e=r.events[i][1];if("labelImage"===e.type){o=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(i){if(!o||!o._balanced)return n(i);const s=Ix(r.sliceSerialize({start:o.end,end:r.now()}));if(94!==s.codePointAt(0)||!a.includes(s.slice(1)))return n(i);return e.enter("gfmFootnoteCallLabelMarker"),e.consume(i),e.exit("gfmFootnoteCallLabelMarker"),t(i)}}function ok(e,t){let n=e.length;for(;n--;)if("labelImage"===e[n][1].type&&"enter"===e[n][0]){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",o,t],["exit",o,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function sk(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,o=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),s};function s(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",A)}function A(s){if(o>999||93===s&&!a||null===s||91===s||Kx(s))return n(s);if(93===s){e.exit("chunkString");const a=e.exit("gfmFootnoteCallString");return i.includes(Ix(r.sliceSerialize(a)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(s)}return Kx(s)||(a=!0),o++,e.consume(s),92===s?l:A}function l(t){return 91===t||92===t||93===t?(e.consume(t),o++,A):A(t)}}function Ak(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,o,s=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),A};function A(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",l):n(t)}function l(t){if(s>999||93===t&&!o||null===t||91===t||Kx(t))return n(t);if(93===t){e.exit("chunkString");const n=e.exit("gfmFootnoteDefinitionLabelString");return a=Ix(r.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),u}return Kx(t)||(o=!0),s++,e.consume(t),92===t?c:l}function c(t){return 91===t||92===t||93===t?(e.consume(t),s++,l):l(t)}function u(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),i.includes(a)||i.push(a),qx(e,d,"gfmFootnoteDefinitionWhitespace")):n(t)}function d(e){return t(e)}}function lk(e,t,n){return e.check(ib,t,e.attempt(ik,t,n))}function ck(e){e.exit("gfmFootnoteDefinition")}function uk(e){let t=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:function(e,n,r){const i=this.previous,a=this.events;let o=0;return function(t){if(126===i&&"characterEscape"!==a[a.length-1][1].type)return r(t);return e.enter("strikethroughSequenceTemporary"),s(t)};function s(a){const A=Zx(i);if(126===a)return o>1?r(a):(e.consume(a),o++,s);if(o<2&&!t)return r(a);const l=e.exit("strikethroughSequenceTemporary"),c=Zx(a);return l._open=!c||2===c&&Boolean(A),l._close=!A||2===A&&Boolean(c),n(a)}},resolveAll:function(e,t){let n=-1;for(;++n<e.length;)if("enter"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._close){let r=n;for(;r--;)if("exit"===e[r][0]&&"strikethroughSequenceTemporary"===e[r][1].type&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type="strikethroughSequence",e[r][1].type="strikethroughSequence";const i={type:"strikethrough",start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:"strikethroughText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[["enter",i,t],["enter",e[r][1],t],["exit",e[r][1],t],["enter",a,t]],s=t.parser.constructs.insideSpan.null;s&&Sx(o,o.length,0,eb(s,e.slice(r+1,n),t)),Sx(o,o.length,0,[["exit",a,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",i,t]]),Sx(e,r-1,n-r+3,o),n=r+o.length-2;break}}n=-1;for(;++n<e.length;)"strikethroughSequenceTemporary"===e[n][1].type&&(e[n][1].type="data");return e}};return null==t&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}}}class dk{constructor(){this.map=[]}add(e,t,n){!function(e,t,n,r){let i=0;if(0===n&&0===r.length)return;for(;i<e.map.length;){if(e.map[i][0]===t)return e.map[i][1]+=n,void e.map[i][2].push(...r);i+=1}e.map.push([t,n,r])}(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),0===this.map.length)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(const t of r)e.push(t);r=n.pop()}this.map.length=0}}function hk(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if("enter"===i[0])"tableContent"===i[1].type&&r.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===i[1].type){if("tableDelimiterMarker"===e[t-1][1].type){const e=r.length-1;r[e]="left"===r[e]?"center":"right"}}else if("tableDelimiterRow"===i[1].type)break}else"enter"===i[0]&&"tableDelimiterRow"===i[1].type&&(n=!0);t+=1}return r}function pk(e,t,n){const r=this;let i,a=0,o=0;return function(e){let t=r.events.length-1;for(;t>-1;){const e=r.events[t][1].type;if("lineEnding"!==e&&"linePrefix"!==e)break;t--}const i=t>-1?r.events[t][1].type:null,a="tableHead"===i||"tableRow"===i?w:s;if(a===w&&r.parser.lazy[r.now().line])return n(e);return a(e)};function s(t){return e.enter("tableHead"),e.enter("tableRow"),function(e){if(124===e)return A(e);return i=!0,o+=1,A(e)}(t)}function A(t){return null===t?n(t):Rx(t)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),u):n(t):zx(t)?qx(e,A,"whitespace")(t):(o+=1,i&&(i=!1,a+=1),124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),i=!0,A):(e.enter("data"),l(t)))}function l(t){return null===t||124===t||Kx(t)?(e.exit("data"),A(t)):(e.consume(t),92===t?c:l)}function c(t){return 92===t||124===t?(e.consume(t),l):l(t)}function u(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter("tableDelimiterRow"),i=!1,zx(t)?qx(e,d,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):d(t))}function d(t){return 45===t||58===t?p(t):124===t?(i=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),h):v(t)}function h(t){return zx(t)?qx(e,p,"whitespace")(t):p(t)}function p(t){return 58===t?(o+=1,i=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),f):45===t?(o+=1,f(t)):null===t||Rx(t)?y(t):v(t)}function f(t){return 45===t?(e.enter("tableDelimiterFiller"),m(t)):v(t)}function m(t){return 45===t?(e.consume(t),m):58===t?(i=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),g):(e.exit("tableDelimiterFiller"),g(t))}function g(t){return zx(t)?qx(e,y,"whitespace")(t):y(t)}function y(n){return 124===n?d(n):(null===n||Rx(n))&&i&&a===o?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(n)):v(n)}function v(e){return n(e)}function w(t){return e.enter("tableRow"),x(t)}function x(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),x):null===n||Rx(n)?(e.exit("tableRow"),t(n)):zx(n)?qx(e,x,"whitespace")(n):(e.enter("data"),b(n))}function b(t){return null===t||124===t||Kx(t)?(e.exit("data"),x(t)):(e.consume(t),92===t?B:b)}function B(t){return 92===t||124===t?(e.consume(t),b):b(t)}}function fk(e,t){let n,r,i,a=-1,o=!0,s=0,A=[0,0,0,0],l=[0,0,0,0],c=!1,u=0;const d=new dk;for(;++a<e.length;){const h=e[a],p=h[1];"enter"===h[0]?"tableHead"===p.type?(c=!1,0!==u&&(gk(d,t,u,n,r),r=void 0,u=0),n={type:"table",start:Object.assign({},p.start),end:Object.assign({},p.end)},d.add(a,0,[["enter",n,t]])):"tableRow"===p.type||"tableDelimiterRow"===p.type?(o=!0,i=void 0,A=[0,0,0,0],l=[0,a+1,0,0],c&&(c=!1,r={type:"tableBody",start:Object.assign({},p.start),end:Object.assign({},p.end)},d.add(a,0,[["enter",r,t]])),s="tableDelimiterRow"===p.type?2:r?3:1):!s||"data"!==p.type&&"tableDelimiterMarker"!==p.type&&"tableDelimiterFiller"!==p.type?"tableCellDivider"===p.type&&(o?o=!1:(0!==A[1]&&(l[0]=l[1],i=mk(d,t,A,s,void 0,i)),A=l,l=[A[1],a,0,0])):(o=!1,0===l[2]&&(0!==A[1]&&(l[0]=l[1],i=mk(d,t,A,s,void 0,i),A=[0,0,0,0]),l[2]=a)):"tableHead"===p.type?(c=!0,u=a):"tableRow"===p.type||"tableDelimiterRow"===p.type?(u=a,0!==A[1]?(l[0]=l[1],i=mk(d,t,A,s,a,i)):0!==l[1]&&(i=mk(d,t,l,s,a,i)),s=0):!s||"data"!==p.type&&"tableDelimiterMarker"!==p.type&&"tableDelimiterFiller"!==p.type||(l[3]=a)}for(0!==u&&gk(d,t,u,n,r),d.consume(t.events),a=-1;++a<t.events.length;){const e=t.events[a];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=hk(t.events,a))}return e}function mk(e,t,n,r,i,a){const o=1===r?"tableHeader":2===r?"tableDelimiter":"tableData";0!==n[0]&&(a.end=Object.assign({},yk(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const s=yk(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[["enter",a,t]]),0!==n[2]){const i=yk(t.events,n[2]),a=yk(t.events,n[3]),o={type:"tableContent",start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[["enter",o,t]]),2!==r){const r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type="chunkText",r[1].contentType="text",n[3]>n[2]+1){const t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[["exit",o,t]])}return void 0!==i&&(a.end=Object.assign({},yk(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function gk(e,t,n,r,i){const a=[],o=yk(t.events,n);i&&(i.end=Object.assign({},o),a.push(["exit",i,t])),r.end=Object.assign({},o),a.push(["exit",r,t]),e.add(n+1,0,a)}function yk(e,t){const n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}const vk={name:"tasklistCheck",tokenize:function(e,t,n){const r=this;return function(t){if(null!==r.previous||!r._gfmTasklistFirstContentOfListItem)return n(t);return e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),i};function i(t){return Kx(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),a):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),a):n(t)}function a(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):n(t)}function o(r){return Rx(r)?t(r):zx(r)?e.check({tokenize:wk},t,n)(r):n(r)}}};function wk(e,t,n){return qx(e,function(e){return null===e?n(e):t(e)},"whitespace")}const xk={};function bk(e){const t=e||xk,n=this.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),i=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),a=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push(function(e){return jx([{text:YE},{document:{91:{name:"gfmFootnoteDefinition",tokenize:Ak,continuation:{tokenize:lk},exit:ck}},text:{91:{name:"gfmFootnoteCall",tokenize:sk},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:ak,resolveTo:ok}}},uk(e),{flow:{null:{name:"table",tokenize:pk,resolveAll:fk}}},{text:{91:vk}}])}(t)),i.push([{transforms:[RC],enter:{literalAutolink:PC,literalAutolinkEmail:MC,literalAutolinkHttp:MC,literalAutolinkWww:MC},exit:{literalAutolink:_C,literalAutolinkEmail:HC,literalAutolinkHttp:DC,literalAutolinkWww:LC}},{enter:{gfmFootnoteCallString:$C,gfmFootnoteCall:WC,gfmFootnoteDefinitionLabelString:GC,gfmFootnoteDefinition:qC},exit:{gfmFootnoteCallString:XC,gfmFootnoteCall:YC,gfmFootnoteDefinitionLabelString:JC,gfmFootnoteDefinition:ZC}},{canContainEols:["delete"],enter:{strikethrough:aE},exit:{strikethrough:oE}},{enter:{table:OE,tableData:PE,tableHeader:PE,tableRow:IE},exit:{codeText:ME,table:NE,tableData:TE,tableHeader:TE,tableRow:TE}},{exit:{taskListCheckValueChecked:HE,taskListCheckValueUnchecked:HE,paragraph:_E}}]),a.push(function(e){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:IC,notInConstruct:TC},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:IC,notInConstruct:TC},{character:":",before:"[ps]",after:"\\/",inConstruct:IC,notInConstruct:TC}]},tE(e),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:iE}],handlers:{delete:sE}},LE(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:RE}}]}}(t))}const Bk=({answer:e})=>Ie.jsx("div",{className:"ai-answer-container w-full max-w-full",children:Ie.jsx(FC,{remarkPlugins:[bk],components:{h3:({children:e})=>Ie.jsx("h3",{className:"text-lg font-semibold mt-4 mb-2",children:e}),p:({children:e})=>Ie.jsx("p",{className:"text-sm mb-2",children:e}),table:({children:e})=>Ie.jsx("table",{className:"border-collapse min-w-full w-full",children:e}),th:({children:e})=>Ie.jsx("th",{className:"border px-3 py-2 bg-gray-100 text-left text-sm font-medium break-words",children:e}),td:({children:e})=>Ie.jsx("td",{className:"border px-3 py-2 text-sm break-words",children:e}),hr:()=>Ie.jsx("hr",{className:"my-4 border-gray-300"}),strong:({children:e})=>Ie.jsx("strong",{className:"font-semibold text-gray-900",children:e}),em:({children:e})=>Ie.jsx("em",{className:"italic ",children:e})},children:e})});function Ck({message:e,onFeedback:t,primaryColor:n}){const[r,i]=Te.useState(!1),a="user"===e.role,o=e.isLoading;return Ie.jsxs(ch.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},className:"flex gap-3 "+(a?"flex-row-reverse":"flex-row"),children:[Ie.jsx("div",{className:"flex-shrink-0 w-9 h-9 rounded-xl flex items-center justify-center shadow-sm "+(a?"bg-gradient-to-br from-gray-100 to-gray-200":""),style:a?void 0:{background:`linear-gradient(135deg, ${n}20, ${n}35)`},children:a?Ie.jsx(fm,{className:"w-4 h-4 text-gray-600"}):Ie.jsx(tf,{className:"w-4 h-4",style:{color:n}})}),Ie.jsxs("div",{className:"flex flex-col max-w-[85%] "+(a?"items-end":"items-start"),children:[Ie.jsx("div",{className:"px-4 py-3 rounded-2xl shadow-sm "+(a?"rounded-tr-md text-white":"rounded-tl-md bg-white border border-gray-100 text-gray-800"),style:a?{background:`linear-gradient(135deg, ${n}, ${n}dd)`}:void 0,children:o?Ie.jsxs("div",{className:"flex items-center gap-3 py-1",children:[Ie.jsxs("div",{className:"flex gap-1",children:[Ie.jsx(ch.div,{className:"w-2 h-2 rounded-full bg-gray-400",animate:{scale:[1,1.2,1]},transition:{duration:.6,repeat:1/0,delay:0}}),Ie.jsx(ch.div,{className:"w-2 h-2 rounded-full bg-gray-400",animate:{scale:[1,1.2,1]},transition:{duration:.6,repeat:1/0,delay:.2}}),Ie.jsx(ch.div,{className:"w-2 h-2 rounded-full bg-gray-400",animate:{scale:[1,1.2,1]},transition:{duration:.6,repeat:1/0,delay:.4}})]}),Ie.jsx("span",{className:"text-sm text-gray-500",children:"Thinking..."})]}):Ie.jsx(Bk,{answer:e.content})}),!a&&!o&&Ie.jsxs("div",{className:"flex items-center gap-0.5 mt-1.5 px-1",children:[Ie.jsx("button",{onClick:async()=>{try{await navigator.clipboard.writeText(e.content||""),i(!0),setTimeout(()=>i(!1),2e3)}catch(t){console.error("Failed to copy:",t)}},className:"p-1.5 rounded-lg text-gray-400 hover:text-gray-600 hover:bg-gray-100 transition-all duration-200",title:"Copy response",children:r?Ie.jsx(lf,{className:"w-3.5 h-3.5 text-green-500"}):Ie.jsx(wf,{className:"w-3.5 h-3.5"})}),Ie.jsx("div",{className:"w-px h-3 bg-gray-200 mx-1"}),Ie.jsx("button",{onClick:()=>t("positive"),className:"p-1.5 rounded-lg transition-all duration-200 "+("positive"===e.feedback?"bg-green-100 text-green-600":"text-gray-400 hover:text-green-600 hover:bg-green-50"),title:"Helpful",children:Ie.jsx(lm,{className:"w-3.5 h-3.5"})}),Ie.jsx("button",{onClick:()=>t("negative"),className:"p-1.5 rounded-lg transition-all duration-200 "+("negative"===e.feedback?"bg-red-100 text-red-600":"text-gray-400 hover:text-red-600 hover:bg-red-50"),title:"Not helpful",children:Ie.jsx(Am,{className:"w-3.5 h-3.5"})})]})]})]})}function Ek({question:e,onClick:t,primaryColor:n,index:r}){return Ie.jsx(ch.button,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.1*r},onClick:t,className:"group text-left p-3 rounded-xl border border-gray-200 bg-white hover:border-transparent hover:shadow-md transition-all duration-200",style:{"--hover-bg":`${n}08`},onMouseEnter:e=>{e.currentTarget.style.borderColor=n,e.currentTarget.style.backgroundColor=`${n}08`},onMouseLeave:e=>{e.currentTarget.style.borderColor="#e5e7eb",e.currentTarget.style.backgroundColor="white"},children:Ie.jsx("p",{className:"text-sm text-gray-700 group-hover:text-gray-900 line-clamp-2",children:e})})}function kk({onSelectQuestion:e,primaryColor:t}){return Ie.jsxs("div",{className:"flex flex-col items-center justify-center h-full px-4 py-6 overflow-y-auto",children:[Ie.jsxs(ch.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.4},className:"flex flex-col items-center mb-8",children:[Ie.jsxs(ch.div,{className:"relative w-20 h-20 mb-5",initial:{rotate:-10},animate:{rotate:0},transition:{duration:.5,type:"spring"},children:[Ie.jsx("div",{className:"absolute inset-0 rounded-2xl shadow-xl",style:{background:`linear-gradient(135deg, ${t}, ${t}cc)`}}),Ie.jsx("div",{className:"absolute inset-0 rounded-2xl opacity-50",style:{background:`linear-gradient(135deg, transparent, ${t}40)`}}),Ie.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:Ie.jsx(xm,{className:"w-10 h-10 text-white drop-shadow-lg"})})]}),Ie.jsx(ch.h2,{className:"text-2xl font-bold text-gray-900 mb-2",initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.2},children:"Ask Ultra"}),Ie.jsx(ch.p,{className:"text-sm text-gray-500 text-center max-w-xs leading-relaxed",initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.3},children:"Your AI-powered assistant for real-time logistics insights and data queries"})]}),Ie.jsxs("div",{className:"w-full max-w-md",children:[Ie.jsxs(ch.div,{className:"flex items-center gap-2 mb-4",initial:{opacity:0},animate:{opacity:1},transition:{delay:.4},children:[Ie.jsx("div",{className:"w-6 h-6 rounded-lg flex items-center justify-center",style:{backgroundColor:"#fef3c7"},children:Ie.jsx(om,{className:"w-3.5 h-3.5 text-amber-500"})}),Ie.jsx("span",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wider",children:"Try asking"})]}),Ie.jsx("div",{className:"grid grid-cols-1 gap-3",children:Gv.map((n,r)=>Ie.jsx(Ek,{question:n.text,onClick:()=>e(n.text),primaryColor:t,index:r},n.id))})]})]})}function Sk({value:e,onChange:t,onSend:n,isSending:r,primaryColor:i,placeholder:a="Ask me anything about your data..."}){const o=Te.useRef(null);return Te.useEffect(()=>{(()=>{const e=o.current;e&&(e.style.height="auto",e.style.height=`${Math.min(e.scrollHeight,120)}px`)})()},[e]),Te.useEffect(()=>{o.current&&o.current.focus()},[]),Ie.jsxs("div",{className:"border-t bg-gradient-to-t from-gray-50 to-white p-4",children:[Ie.jsxs("div",{className:"flex items-end gap-2 p-2 rounded-2xl border border-gray-200 bg-white shadow-sm focus-within:shadow-md focus-within:border-gray-300 transition-all duration-200",children:[Ie.jsx("textarea",{ref:o,value:e,onChange:e=>t(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),n())},placeholder:a,rows:1,className:"flex-1 bg-transparent border-none outline-none resize-none text-sm text-gray-800 placeholder-gray-400 min-h-[36px] max-h-[120px] py-2 px-1",disabled:r}),Ie.jsx(ch.button,{onClick:n,disabled:!e.trim()||r,className:"flex-shrink-0 w-10 h-10 rounded-xl flex items-center justify-center text-white transition-all duration-200 disabled:opacity-40 disabled:cursor-not-allowed shadow-sm hover:shadow-md",style:{background:e.trim()&&!r?`linear-gradient(135deg, ${i}, ${i}dd)`:"#d1d5db"},whileHover:e.trim()&&!r?{scale:1.05}:{},whileTap:e.trim()&&!r?{scale:.95}:{},children:r?Ie.jsx(Nf,{className:"w-4 h-4 animate-spin"}):Ie.jsx(tm,{className:"w-4 h-4"})})]}),Ie.jsxs("p",{className:"text-xs text-gray-400 text-center mt-2",children:["Press ",Ie.jsx("kbd",{className:"px-1.5 py-0.5 bg-gray-100 rounded text-gray-500 font-mono text-[10px]",children:"Enter"})," to send, ",Ie.jsx("kbd",{className:"px-1.5 py-0.5 bg-gray-100 rounded text-gray-500 font-mono text-[10px]",children:"Shift + Enter"})," for new line"]})]})}function Fk(e){const t=new Date(e),n=(new Date).getTime()-t.getTime(),r=Math.floor(n/6e4),i=Math.floor(n/36e5),a=Math.floor(n/864e5);return r<1?"Just now":r<60?`${r}m ago`:i<24?`${i}h ago`:a<7?`${a}d ago`:t.toLocaleDateString("en-US",{month:"short",day:"numeric"})}function Qk(e){const t=e.messages.find(e=>"user"===e.role);return t?t.content.length>50?t.content.substring(0,50)+"...":t.content:"New conversation"}function jk({conversation:e,isActive:t,onSelect:n,onDelete:r,primaryColor:i}){const[a,o]=Te.useState(!1);return Ie.jsx(ch.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},exit:{opacity:0,x:-10},className:"group relative p-3 rounded-xl cursor-pointer transition-all duration-200 "+(t?"bg-white shadow-sm border border-gray-200":"hover:bg-white/60"),onClick:n,onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),style:t?{borderColor:`${i}40`}:void 0,children:Ie.jsxs("div",{className:"flex items-start gap-3",children:[Ie.jsx("div",{className:"flex-shrink-0 w-8 h-8 rounded-lg flex items-center justify-center "+(t?"":"bg-gray-100"),style:t?{backgroundColor:`${i}15`}:void 0,children:Ie.jsx(Lf,{className:"w-4 h-4",style:{color:t?i:"#6b7280"}})}),Ie.jsxs("div",{className:"flex-1 min-w-0",children:[Ie.jsx("p",{className:"text-sm font-medium truncate "+(t?"text-gray-900":"text-gray-700"),children:Qk(e)}),Ie.jsxs("div",{className:"flex items-center gap-1.5 mt-1",children:[Ie.jsx(yf,{className:"w-3 h-3 text-gray-400"}),Ie.jsx("span",{className:"text-xs text-gray-400",children:Fk(e.updatedAt)}),Ie.jsx("span",{className:"text-xs text-gray-300",children:"•"}),Ie.jsxs("span",{className:"text-xs text-gray-400",children:[e.messages.length," messages"]})]})]}),Ie.jsx(hl,{children:a&&Ie.jsx(ch.button,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},onClick:e=>{e.stopPropagation(),r()},className:"absolute right-2 top-1/2 -translate-y-1/2 p-2 rounded-lg text-gray-400 hover:text-red-500 hover:bg-red-50 transition-colors",title:"Delete conversation",children:Ie.jsx(cm,{className:"w-4 h-4"})})})]})})}function Uk({isOpen:e,onClose:t,conversations:n,isLoading:r,currentConversationId:i,onSelectConversation:a,onDeleteConversation:o,onNewConversation:s,primaryColor:A}){return Ie.jsx(hl,{children:e&&Ie.jsxs(Ie.Fragment,{children:[Ie.jsx(ch.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"absolute inset-0 bg-black/10 z-10",onClick:t}),Ie.jsxs(ch.div,{initial:{x:"-100%",opacity:0},animate:{x:0,opacity:1},exit:{x:"-100%",opacity:0},transition:{type:"spring",damping:25,stiffness:300},className:"absolute left-0 top-0 bottom-0 w-72 bg-gradient-to-b from-gray-50 to-white border-r border-gray-200 z-20 flex flex-col shadow-xl",children:[Ie.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-gray-100",children:[Ie.jsx("h3",{className:"font-semibold text-gray-900",children:"Chat History"}),Ie.jsx("button",{onClick:t,className:"p-1.5 rounded-lg text-gray-400 hover:text-gray-600 hover:bg-gray-100 transition-colors",children:Ie.jsx(wm,{className:"w-5 h-5"})})]}),Ie.jsx("div",{className:"p-3 border-b border-gray-100",children:Ie.jsxs(ch.button,{onClick:s,className:"w-full flex items-center justify-center gap-2 px-4 py-2.5 rounded-xl text-white font-medium shadow-sm hover:shadow-md transition-all",style:{background:`linear-gradient(135deg, ${A}, ${A}dd)`},whileHover:{scale:1.02},whileTap:{scale:.98},children:[Ie.jsx(Wf,{className:"w-4 h-4"}),"New Conversation"]})}),Ie.jsx("div",{className:"flex-1 overflow-y-auto p-2",children:r?Ie.jsx("div",{className:"flex items-center justify-center py-8",children:Ie.jsx(Nf,{className:"w-6 h-6 animate-spin text-gray-400"})}):0===n.length?Ie.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[Ie.jsx("div",{className:"w-12 h-12 rounded-full bg-gray-100 flex items-center justify-center mb-3",children:Ie.jsx(Lf,{className:"w-6 h-6 text-gray-400"})}),Ie.jsx("p",{className:"text-sm text-gray-500",children:"No conversations yet"}),Ie.jsx("p",{className:"text-xs text-gray-400 mt-1",children:"Start a new conversation to begin"})]}):Ie.jsx("div",{className:"space-y-1",children:n.map(e=>Ie.jsx(jk,{conversation:e,isActive:e.id===i,onSelect:()=>a(e.id),onDelete:()=>o(e.id),primaryColor:A},e.id))})})]})]})})}function Ok({primaryColor:e,hasMessages:t,onToggleHistory:n,onNewConversation:r}){return Ie.jsx("div",{className:"px-4 py-3 flex items-center justify-end",children:Ie.jsxs("div",{className:"flex items-center gap-1 justify-end",children:[Ie.jsx(ch.button,{onClick:n,className:"p-2 rounded-lg text-gray-500 hover:text-gray-700 hover:bg-gray-100 transition-colors",title:"Chat history",whileHover:{scale:1.05},whileTap:{scale:.95},children:Ie.jsx(Qf,{className:"w-5 h-5"})}),t&&Ie.jsx(ch.button,{onClick:r,className:"p-2 rounded-lg text-gray-500 hover:text-gray-700 hover:bg-gray-100 transition-colors",title:"New conversation",whileHover:{scale:1.05},whileTap:{scale:.95},children:Ie.jsx(Jf,{className:"w-5 h-5"})})]})})}function Nk(){const{theme:e}=ea(),t=Te.useRef(null),{messages:n,inputValue:r,isSending:i,isLoading:a,error:o,conversations:s,isLoadingHistory:A,showHistory:l,conversationId:c,setInputValue:u,sendMessage:d,submitFeedback:h,toggleHistory:p,loadConversation:f,deleteConversation:m,startNewConversation:g,fetchConversations:y}=Xv(),v=e.primaryColor||"#1e40af",w=n.length>0;Te.useEffect(()=>{y()},[y]),Te.useEffect(()=>{t.current&&t.current.scrollIntoView({behavior:"smooth"})},[n]);const x=Te.useCallback(()=>{r.trim()&&d(r)},[r,d]),b=Te.useCallback(e=>{d(e)},[d]),B=Te.useCallback((e,t)=>{h(e,t)},[h]);return Ie.jsxs("div",{className:"relative flex flex-col h-full bg-gradient-to-b from-gray-50 to-white overflow-hidden",style:{fontFamily:e.fontFamily},children:[Ie.jsx(Uk,{isOpen:l,onClose:p,conversations:s,isLoading:A,currentConversationId:c,onSelectConversation:f,onDeleteConversation:m,onNewConversation:g,primaryColor:v}),Ie.jsx(Ok,{primaryColor:v,hasMessages:w,onToggleHistory:p,onNewConversation:g}),Ie.jsx(hl,{children:o&&Ie.jsx(ch.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"mx-4 mt-3 p-3 bg-red-50 border border-red-200 rounded-xl",children:Ie.jsx("p",{className:"text-sm text-red-600",children:o})})}),Ie.jsx(hl,{children:a&&Ie.jsx(ch.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"absolute inset-0 bg-white/80 z-30 flex items-center justify-center",children:Ie.jsxs("div",{className:"flex flex-col items-center gap-3",children:[Ie.jsx(Nf,{className:"w-8 h-8 animate-spin",style:{color:v}}),Ie.jsx("p",{className:"text-sm text-gray-500",children:"Loading conversation..."})]})})}),Ie.jsx("div",{className:"flex-1 overflow-hidden",children:w?Ie.jsxs("div",{className:"h-full overflow-y-auto px-4 py-4",children:[Ie.jsx("div",{className:"space-y-4 max-w-2xl mx-auto",children:Ie.jsx(hl,{initial:!1,children:n.map(e=>Ie.jsx(Ck,{message:e,onFeedback:t=>B(e.id,t),primaryColor:v},e.id))})}),Ie.jsx("div",{ref:t,className:"h-4"})]}):Ie.jsx(kk,{onSelectQuestion:b,primaryColor:v})}),Ie.jsx(Sk,{value:r,onChange:u,onSend:x,isSending:i,primaryColor:v})]})}function Ik(e){return{id:e.id,chatSessionId:e.chat_session_id,title:e.chat_title,createdAt:e.chat_created_date_with_time_stamp,updatedAt:e.chat_updated_date_with_time_stamp,totalTurns:e.total_turns}}function Tk(e){const t=[];return t.push({id:`${e.turn_id}-user`,turnId:e.turn_id,content:e.user_prompt,role:"user",timestamp:e.turn_creation_date_time_stamp,feedback:null}),null!==e.agent_response_markdown&&void 0!==e.agent_response_markdown&&t.push({id:`${e.turn_id}-assistant`,turnId:e.turn_id,content:e.agent_response_markdown,role:"assistant",timestamp:e.turn_creation_date_time_stamp,feedback:e.feedback?e.feedback.type:null,responseType:e.response_type,serialData:e.serial_data,imageUrl:e.image_url,generatedSql:e.generated_sql,metaData:e.meta_data}),t}function Pk(e){return e&&"object"==typeof e&&"success"in e&&"data"in e?e.data:e}class Mk{static async getSessions(e=20,t=0){var n,r,i;try{const n=Pk((await Vi.get("/crm/agents/public/data/chat_sessions/",{params:{limit:e,offset:t}})).data)||[];return{sessions:n.map(Ik),raw:n}}catch(a){if(console.error("DataAgentServiceV2.getSessions error:",a),401===(null==(n=a.response)?void 0:n.status))throw new Error("Unauthorized. Please login again.");if(null==(i=null==(r=a.response)?void 0:r.data)?void 0:i.detail)throw new Error(a.response.data.detail);throw new Error("Failed to fetch chat sessions.")}}static async getTurns(e,t=20,n){var r,i,a,o;try{const r={page_size:t};n&&(r.cursor=n);const i=Pk((await Vi.get(`/crm/agents/public/data/chat_sessions/${e}/turns`,{params:r})).data),a=i.turns||[],o=[];for(const e of a)o.push(...Tk(e));return{messages:o,nextCursor:i.next_cursor??null,rawTurns:a}}catch(s){if(console.error("DataAgentServiceV2.getTurns error:",s),401===(null==(r=s.response)?void 0:r.status))throw new Error("Unauthorized. Please login again.");if(404===(null==(i=s.response)?void 0:i.status))throw new Error("Chat session not found.");if(null==(o=null==(a=s.response)?void 0:a.data)?void 0:o.detail)throw new Error(s.response.data.detail);throw new Error("Failed to fetch chat turns.")}}static async sendPrompt(e,t,n=!1){var r,i,a,o,s;try{const r={prompt:e};t&&(r.conversation_id=t),n&&(r.mock=!0);const i=await Vi.post("/crm/agents/public/data/chat/prompt",r),a=Pk(i.data);console.log("[DataAgentV2] sendPrompt raw:",i.data),console.log("[DataAgentV2] sendPrompt unwrapped turn:",a);return{messages:Tk(a),chatSessionId:a.chat_session_id,turnId:a.turn_id,rawTurn:a}}catch(A){if(console.error("DataAgentServiceV2.sendPrompt error:",A),401===(null==(r=A.response)?void 0:r.status))throw new Error("Unauthorized. Please login again.");if(400===(null==(i=A.response)?void 0:i.status))throw new Error("Bad request. Please check your message.");if(429===(null==(a=A.response)?void 0:a.status))throw new Error("Too many requests. Please wait a moment.");if(null==(s=null==(o=A.response)?void 0:o.data)?void 0:s.detail)throw new Error(A.response.data.detail);throw new Error("Failed to get response. Please try again.")}}static async submitFeedback(e,t){var n;try{return{success:(null==(n=(await Vi.post("/crm/agents/public/data/chat/feedback",{turn_id:e,feedback:t})).data)?void 0:n.success)??!0}}catch(r){return console.error("DataAgentServiceV2.submitFeedback error:",r),{success:!1}}}}const Dk=[{id:"sq-1",text:"Show me the draft loads created today."},{id:"sq-2",text:"How much total revenue have my loads generated?"},{id:"sq-3",text:"Show a visualization of the top 10 loads by shipper rate."},{id:"sq-4",text:"Which routes generate the highest revenue by city?"},{id:"sq-5",text:"Show the loads grouped by status for each month."}],Lk={messages:[],conversationId:null,sessions:[],isLoadingHistory:!1,showHistory:!1,nextCursor:null,isLoadingOlderTurns:!1,hasOlderTurns:!1,isLoading:!1,isSending:!1,error:null,inputValue:""},Hk=Tp()(Pp((e,t)=>({...Lk,setInputValue:t=>{e({inputValue:t})},sendMessage:async n=>{const r=t();if(!n.trim()||r.isSending)return;const i=`tmp-${Date.now()}-user`,a=`tmp-${Date.now()}-loading`,o={id:i,turnId:"",content:n.trim(),role:"user",timestamp:(new Date).toISOString(),feedback:null},s={id:a,turnId:"",content:"",role:"assistant",timestamp:(new Date).toISOString(),feedback:null,isLoading:!0};e({messages:[...r.messages,o,s],isSending:!0,error:null,inputValue:""});try{const o=await Mk.sendPrompt(n.trim(),r.conversationId||void 0);e(e=>({messages:[...e.messages.filter(e=>e.id!==i&&e.id!==a),...o.messages],conversationId:o.chatSessionId,isSending:!1})),t().fetchSessions()}catch(A){e(e=>({messages:e.messages.filter(e=>e.id!==a),isSending:!1,error:A.message||"Failed to get response"}))}},submitFeedback:async(n,r)=>{if(!r)return;const i=t().messages.find(e=>e.id===n);if(i){e(e=>({messages:e.messages.map(e=>e.id===n?{...e,feedback:r}:e)}));try{await Mk.submitFeedback(i.turnId,r)}catch{e(e=>({messages:e.messages.map(e=>e.id===n?{...e,feedback:null}:e)}))}}},clearConversation:()=>{e({messages:[],conversationId:null,error:null,nextCursor:null,hasOlderTurns:!1})},fetchSessions:async()=>{e({isLoadingHistory:!0});try{const{sessions:t}=await Mk.getSessions(30,0);e({sessions:t,isLoadingHistory:!1})}catch(t){console.error("Failed to fetch sessions:",t),e({isLoadingHistory:!1})}},loadSession:async t=>{e({isLoading:!0,showHistory:!1,error:null,messages:[],conversationId:t});try{const{messages:n,nextCursor:r}=await Mk.getTurns(t);e({messages:n,conversationId:t,nextCursor:r,hasOlderTurns:null!==r,isLoading:!1})}catch(n){e({isLoading:!1,error:n.message||"Failed to load conversation"})}},loadOlderTurns:async()=>{const n=t();if(n.conversationId&&n.nextCursor&&!n.isLoadingOlderTurns){e({isLoadingOlderTurns:!0});try{const{messages:t,nextCursor:r}=await Mk.getTurns(n.conversationId,20,n.nextCursor);e(e=>({messages:[...t,...e.messages],nextCursor:r,hasOlderTurns:null!==r,isLoadingOlderTurns:!1}))}catch(r){console.error("Failed to load older turns:",r),e({isLoadingOlderTurns:!1})}}},deleteSession:async t=>{e(e=>({sessions:e.sessions.filter(e=>e.chatSessionId!==t),...e.conversationId===t?{messages:[],conversationId:null,nextCursor:null,hasOlderTurns:!1}:{}}))},toggleHistory:()=>{const n=!t().showHistory;e({showHistory:n}),n&&t().fetchSessions()},startNewConversation:()=>{e({messages:[],conversationId:null,error:null,showHistory:!1,inputValue:"",nextCursor:null,hasOlderTurns:!1})},reset:()=>{e({...Lk,sessions:[],messages:[]})}}))),_k=Te.memo(({answer:e})=>Ie.jsx("div",{className:"ai-answer-container w-full max-w-full",children:Ie.jsx(FC,{remarkPlugins:[bk],components:{h3:({children:e})=>Ie.jsx("h3",{className:"text-lg font-semibold mt-4 mb-2",children:e}),p:({children:e})=>Ie.jsx("p",{className:"text-sm mb-2",children:e}),table:({children:e})=>Ie.jsx("table",{className:"border-collapse min-w-full w-full",children:e}),th:({children:e})=>Ie.jsx("th",{className:"border px-3 py-2 bg-gray-100 text-left text-sm font-medium break-words",children:e}),td:({children:e})=>Ie.jsx("td",{className:"border px-3 py-2 text-sm break-words",children:e}),hr:()=>Ie.jsx("hr",{className:"my-4 border-gray-300"}),strong:({children:e})=>Ie.jsx("strong",{className:"font-semibold text-gray-900",children:e}),em:({children:e})=>Ie.jsx("em",{className:"italic ",children:e})},children:e})}));_k.displayName="AIAnswerRenderer";var Rk=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function Kk(e){return"string"==typeof e&&Rk.includes(e)}var zk=new Set(["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"]);function Vk(e){return"string"==typeof e&&zk.has(e)}function $k(e){return"string"==typeof e&&e.startsWith("data-")}function Wk(e){if("object"!=typeof e||null===e)return{};var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(Vk(n)||$k(n))&&(t[n]=e[n]);return t}function Gk(e){return null==e?null:Te.isValidElement(e)&&"object"==typeof e.props&&null!==e.props?Wk(e.props):"object"!=typeof e||Array.isArray(e)?null:Wk(e)}function qk(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(Vk(n)||$k(n)||Kk(n))&&(t[n]=e[n]);return t}var Xk=["children","width","height","viewBox","className","style","title","desc"];function Yk(){return Yk=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},Yk.apply(null,arguments)}var Jk=Te.forwardRef((e,t)=>{var{children:n,width:r,height:i,viewBox:a,className:o,style:s,title:A,desc:l}=e,c=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,Xk),u=a||{width:r,height:i,x:0,y:0},d=yh("recharts-surface",o);return De.createElement("svg",Yk({},qk(c),{className:d,width:r,height:i,style:s,viewBox:"".concat(u.x," ").concat(u.y," ").concat(u.width," ").concat(u.height),ref:t}),De.createElement("title",null,A),De.createElement("desc",null,l),n)}),Zk=["children","className"];function eS(){return eS=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},eS.apply(null,arguments)}var tS=De.forwardRef((e,t)=>{var{children:n,className:r}=e,i=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,Zk),a=yh("recharts-layer",r);return De.createElement("g",eS({className:a},qk(i),{ref:t}),n)}),nS=Te.createContext(null);function rS(e){return function(){return e}}const iS=Math.cos,aS=Math.sin,oS=Math.sqrt,sS=Math.PI,AS=2*sS,lS=Math.PI,cS=2*lS,uS=1e-6,dS=cS-uS;function hS(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}class pS{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?hS:function(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return hS;const n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,(i=+i)<0)throw new Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,A=r-t,l=a-e,c=o-t,u=l*l+c*c;if(null===this._x1)this._append`M${this._x1=e},${this._y1=t}`;else if(u>uS)if(Math.abs(c*s-A*l)>uS&&i){let d=n-a,h=r-o,p=s*s+A*A,f=d*d+h*h,m=Math.sqrt(p),g=Math.sqrt(u),y=i*Math.tan((lS-Math.acos((p+u-f)/(2*m*g)))/2),v=y/g,w=y/m;Math.abs(v-1)>uS&&this._append`L${e+v*l},${t+v*c}`,this._append`A${i},${i},0,0,${+(c*d>l*h)},${this._x1=e+w*s},${this._y1=t+w*A}`}else this._append`L${this._x1=e},${this._y1=t}`;else;}arc(e,t,n,r,i,a){if(e=+e,t=+t,a=!!a,(n=+n)<0)throw new Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),A=e+o,l=t+s,c=1^a,u=a?r-i:i-r;null===this._x1?this._append`M${A},${l}`:(Math.abs(this._x1-A)>uS||Math.abs(this._y1-l)>uS)&&this._append`L${A},${l}`,n&&(u<0&&(u=u%cS+cS),u>dS?this._append`A${n},${n},0,1,${c},${e-o},${t-s}A${n},${n},0,1,${c},${this._x1=A},${this._y1=l}`:u>uS&&this._append`A${n},${n},0,${+(u>=lS)},${c},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function fS(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(null==n)t=null;else{const e=Math.floor(n);if(!(e>=0))throw new RangeError(`invalid digits: ${n}`);t=e}return e},()=>new pS(t)}function mS(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function gS(e){this._context=e}function yS(e){return new gS(e)}function vS(e){return e[0]}function wS(e){return e[1]}function xS(e,t){var n=rS(!0),r=null,i=yS,a=null,o=fS(s);function s(s){var A,l,c,u=(s=mS(s)).length,d=!1;for(null==r&&(a=i(c=o())),A=0;A<=u;++A)!(A<u&&n(l=s[A],A,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(l,A,s),+t(l,A,s));if(c)return a=null,c+""||null}return e="function"==typeof e?e:void 0===e?vS:rS(e),t="function"==typeof t?t:void 0===t?wS:rS(t),s.x=function(t){return arguments.length?(e="function"==typeof t?t:rS(+t),s):e},s.y=function(e){return arguments.length?(t="function"==typeof e?e:rS(+e),s):t},s.defined=function(e){return arguments.length?(n="function"==typeof e?e:rS(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,null!=r&&(a=i(r)),s):i},s.context=function(e){return arguments.length?(null==e?r=a=null:a=i(r=e),s):r},s}function bS(e,t,n){var r=null,i=rS(!0),a=null,o=yS,s=null,A=fS(l);function l(l){var c,u,d,h,p,f=(l=mS(l)).length,m=!1,g=new Array(f),y=new Array(f);for(null==a&&(s=o(p=A())),c=0;c<=f;++c){if(!(c<f&&i(h=l[c],c,l))===m)if(m=!m)u=c,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),d=c-1;d>=u;--d)s.point(g[d],y[d]);s.lineEnd(),s.areaEnd()}m&&(g[c]=+e(h,c,l),y[c]=+t(h,c,l),s.point(r?+r(h,c,l):g[c],n?+n(h,c,l):y[c]))}if(p)return s=null,p+""||null}function c(){return xS().defined(i).curve(o).context(a)}return e="function"==typeof e?e:void 0===e?vS:rS(+e),t="function"==typeof t?t:rS(void 0===t?0:+t),n="function"==typeof n?n:void 0===n?wS:rS(+n),l.x=function(t){return arguments.length?(e="function"==typeof t?t:rS(+t),r=null,l):e},l.x0=function(t){return arguments.length?(e="function"==typeof t?t:rS(+t),l):e},l.x1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:rS(+e),l):r},l.y=function(e){return arguments.length?(t="function"==typeof e?e:rS(+e),n=null,l):t},l.y0=function(e){return arguments.length?(t="function"==typeof e?e:rS(+e),l):t},l.y1=function(e){return arguments.length?(n=null==e?null:"function"==typeof e?e:rS(+e),l):n},l.lineX0=l.lineY0=function(){return c().x(e).y(t)},l.lineY1=function(){return c().x(e).y(n)},l.lineX1=function(){return c().x(r).y(t)},l.defined=function(e){return arguments.length?(i="function"==typeof e?e:rS(!!e),l):i},l.curve=function(e){return arguments.length?(o=e,null!=a&&(s=o(a)),l):o},l.context=function(e){return arguments.length?(null==e?a=s=null:s=o(a=e),l):a},l}gS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};class BS{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}}const CS={draw(e,t){const n=oS(t/sS);e.moveTo(n,0),e.arc(0,0,n,0,AS)}},ES={draw(e,t){const n=oS(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},kS=oS(1/3),SS=2*kS,FS={draw(e,t){const n=oS(t/SS),r=n*kS;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},QS={draw(e,t){const n=oS(t),r=-n/2;e.rect(r,r,n,n)}},jS=aS(sS/10)/aS(7*sS/10),US=aS(AS/10)*jS,OS=-iS(AS/10)*jS,NS={draw(e,t){const n=oS(.8908130915292852*t),r=US*n,i=OS*n;e.moveTo(0,-n),e.lineTo(r,i);for(let a=1;a<5;++a){const t=AS*a/5,o=iS(t),s=aS(t);e.lineTo(s*n,-o*n),e.lineTo(o*r-s*i,s*r+o*i)}e.closePath()}},IS=oS(3),TS={draw(e,t){const n=-oS(t/(3*IS));e.moveTo(0,2*n),e.lineTo(-IS*n,-n),e.lineTo(IS*n,-n),e.closePath()}},PS=-.5,MS=oS(3)/2,DS=1/oS(12),LS=3*(DS/2+1),HS={draw(e,t){const n=oS(t/LS),r=n/2,i=n*DS,a=r,o=n*DS+n,s=-a,A=o;e.moveTo(r,i),e.lineTo(a,o),e.lineTo(s,A),e.lineTo(PS*r-MS*i,MS*r+PS*i),e.lineTo(PS*a-MS*o,MS*a+PS*o),e.lineTo(PS*s-MS*A,MS*s+PS*A),e.lineTo(PS*r+MS*i,PS*i-MS*r),e.lineTo(PS*a+MS*o,PS*o-MS*a),e.lineTo(PS*s+MS*A,PS*A-MS*s),e.closePath()}};function _S(){}function RS(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function KS(e){this._context=e}function zS(e){this._context=e}function VS(e){this._context=e}function $S(e){this._context=e}function WS(e){return e<0?-1:1}function GS(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(WS(a)+WS(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function qS(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function XS(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function YS(e){this._context=e}function JS(e){this._context=new ZS(e)}function ZS(e){this._context=e}function eF(e){this._context=e}function tF(e){var t,n,r=e.length-1,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/a[t-1],a[t]-=n,o[t]-=n*o[t-1];for(i[r-1]=o[r-1]/a[r-1],t=r-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function nF(e,t){this._context=e,this._t=t}function rF(e,t){if((i=e.length)>1)for(var n,r,i,a=1,o=e[t[0]],s=o.length;a<i;++a)for(r=o,o=e[t[a]],n=0;n<s;++n)o[n][1]+=o[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function iF(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function aF(e,t){return e[t]}function oF(e){const t=[];return t.key=e,t}KS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:RS(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:RS(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},zS.prototype={areaStart:_S,areaEnd:_S,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:RS(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},VS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:RS(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},$S.prototype={areaStart:_S,areaEnd:_S,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}},YS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:XS(this,this._t0,qS(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(t=+t,(e=+e)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,XS(this,qS(this,n=GS(this,e,t)),n);break;default:XS(this,this._t0,n=GS(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(JS.prototype=Object.create(YS.prototype)).point=function(e,t){YS.prototype.point.call(this,t,e)},ZS.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}},eF.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===n)this._context.lineTo(e[1],t[1]);else for(var r=tF(e),i=tF(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}},nF.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};var sF,AF={},lF={};function cF(){return sF||(sF=1,e=lF,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isUnsafeProperty=function(e){return"__proto__"===e}),lF;var e}var uF,dF={};function hF(){return uF||(uF=1,e=dF,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isDeepKey=function(e){switch(typeof e){case"number":case"symbol":return!1;case"string":return e.includes(".")||e.includes("[")||e.includes("]")}}),dF;var e}var pF,fF={};function mF(){return pF||(pF=1,e=fF,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.toKey=function(e){var t;return"string"==typeof e||"symbol"==typeof e?e:Object.is(null==(t=null==e?void 0:e.valueOf)?void 0:t.call(e),-0)?"-0":String(e)}),fF;var e}var gF,yF,vF,wF,xF,bF={},BF={};function CF(){return gF||(gF=1,e=BF,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.toString=function e(t){if(null==t)return"";if("string"==typeof t)return t;if(Array.isArray(t))return t.map(e).join(",");const n=String(t);return"0"===n&&Object.is(Number(t),-0)?"-0":n}),BF;var e}function EF(){return yF||(yF=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=CF(),n=mF();e.toPath=function(e){if(Array.isArray(e))return e.map(n.toKey);if("symbol"==typeof e)return[e];const r=[],i=(e=t.toString(e)).length;if(0===i)return r;let a=0,o="",s="",A=!1;for(46===e.charCodeAt(0)&&(r.push(""),a++);a<i;){const t=e[a];s?"\\"===t&&a+1<i?(a++,o+=e[a]):t===s?s="":o+=t:A?'"'===t||"'"===t?s=t:"]"===t?(A=!1,r.push(o),o=""):o+=t:"["===t?(A=!0,o&&(r.push(o),o="")):"."===t?o&&(r.push(o),o=""):o+=t,a++}return o&&r.push(o),r}}(bF)),bF}function kF(){return vF||(vF=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=cF(),n=hF(),r=mF(),i=EF();e.get=function e(a,o,s){if(null==a)return s;switch(typeof o){case"string":{if(t.isUnsafeProperty(o))return s;const r=a[o];return void 0===r?n.isDeepKey(o)?e(a,i.toPath(o),s):s:r}case"number":case"symbol":{"number"==typeof o&&(o=r.toKey(o));const e=a[o];return void 0===e?s:e}default:{if(Array.isArray(o))return function(e,n,r){if(0===n.length)return r;let i=e;for(let a=0;a<n.length;a++){if(null==i)return r;if(t.isUnsafeProperty(n[a]))return r;i=i[n[a]]}if(void 0===i)return r;return i}(a,o,s);if(o=Object.is(null==o?void 0:o.valueOf(),-0)?"-0":String(o),t.isUnsafeProperty(o))return s;const e=a[o];return void 0===e?s:e}}}}(AF)),AF}function SF(){return xF?wF:(xF=1,wF=kF().get)}const FF=ry(SF());function QF(e){var t=10**(arguments.length>1&&void 0!==arguments[1]?arguments[1]:4),n=Math.round(e*t)/t;return Object.is(n,-0)?0:n}function jF(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.reduce((e,t,r)=>{var i=n[r-1];return"string"==typeof i?e+i+t:void 0!==i?e+QF(i)+t:e+t},"")}var UF=e=>0===e?0:e>0?1:-1,OF=e=>"number"==typeof e&&e!=+e,NF=e=>"string"==typeof e&&e.indexOf("%")===e.length-1,IF=e=>("number"==typeof e||e instanceof Number)&&!OF(e),TF=e=>IF(e)||"string"==typeof e,PF=0,MF=e=>{var t=++PF;return"".concat(e||"").concat(t)},DF=function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!IF(e)&&"string"!=typeof e)return r;if(NF(e)){if(null==t)return r;var a=e.indexOf("%");n=t*parseFloat(e.slice(0,a))/100}else n=+e;return OF(n)&&(n=r),i&&null!=t&&n>t&&(n=t),n},LF=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++){if(n[String(e[r])])return!0;n[String(e[r])]=!0}return!1};function HF(e,t,n){return IF(e)&&IF(t)?QF(e+n*(t-e)):t}function _F(e,t,n){if(e&&e.length)return e.find(e=>e&&("function"==typeof t?t(e):FF(e,t))===n)}var RF=e=>null==e,KF=e=>RF(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function zF(e){return null!=e}function VF(){}var $F=["type","size","sizeType"];function WF(){return WF=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},WF.apply(null,arguments)}function GF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function qF(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?GF(Object(n),!0).forEach(function(t){XF(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GF(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function XF(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var YF={symbolCircle:CS,symbolCross:ES,symbolDiamond:FS,symbolSquare:QS,symbolStar:NS,symbolTriangle:TS,symbolWye:HS},JF=Math.PI/180,ZF=e=>{var{type:t="circle",size:n=64,sizeType:r="area"}=e,i=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,$F),a=qF(qF({},i),{},{type:t,size:n,sizeType:r}),o="circle";"string"==typeof t&&(o=t);var{className:s,cx:A,cy:l}=a,c=qk(a);return IF(A)&&IF(l)&&IF(n)?De.createElement("path",WF({},c,{className:yh("recharts-symbols",s),transform:"translate(".concat(A,", ").concat(l,")"),d:(()=>{var e=(e=>{var t="symbol".concat(KF(e));return YF[t]||CS})(o),t=function(e,t){let n=null,r=fS(i);function i(){let i;if(n||(n=i=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+""||null}return e="function"==typeof e?e:rS(e||CS),t="function"==typeof t?t:rS(void 0===t?64:+t),i.type=function(t){return arguments.length?(e="function"==typeof t?t:rS(t),i):e},i.size=function(e){return arguments.length?(t="function"==typeof e?e:rS(+e),i):t},i.context=function(e){return arguments.length?(n=null==e?null:e,i):n},i}().type(e).size(((e,t,n)=>{if("area"===t)return e;switch(n){case"cross":return 5*e*e/9;case"diamond":return.5*e*e/Math.sqrt(3);case"square":return e*e;case"star":var r=18*JF;return 1.25*e*e*(Math.tan(r)-Math.tan(2*r)*Math.tan(r)**2);case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}})(n,r,o)),i=t();if(null!==i)return i})()})):null};ZF.registerSymbol=(e,t)=>{YF["symbol".concat(KF(e))]=t};var eQ=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,tQ=(e,t)=>{if(!e||"function"==typeof e||"boolean"==typeof e)return null;var n=e;if(Te.isValidElement(e)&&(n=e.props),"object"!=typeof n&&"function"!=typeof n)return null;var r={};return Object.keys(n).forEach(e=>{Kk(e)&&(r[e]=t=>n[e](n,t))}),r},nQ=(e,t,n)=>{if(null===e||"object"!=typeof e&&"function"!=typeof e)return null;var r=null;return Object.keys(e).forEach(i=>{var a=e[i];Kk(i)&&"function"==typeof a&&(r||(r={}),r[i]=((e,t,n)=>r=>(e(t,n,r),null))(a,t,n))}),r};function rQ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function iQ(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aQ(e,t){var n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rQ(Object(n),!0).forEach(function(t){iQ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rQ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},e),r=t;return Object.keys(t).reduce((e,t)=>(void 0===e[t]&&void 0!==r[t]&&(e[t]=r[t]),e),n)}function oQ(){return oQ=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},oQ.apply(null,arguments)}function sQ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function AQ(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var lQ=32,cQ={align:"center",iconSize:14,inactiveColor:"#ccc",layout:"horizontal",verticalAlign:"middle"};function uQ(e){var t,{data:n,iconType:r,inactiveColor:i}=e,a=16,o=lQ/6,s=lQ/3,A=n.inactive?i:n.color,l=null!=r?r:n.type;if("none"===l)return null;if("plainline"===l)return De.createElement("line",{strokeWidth:4,fill:"none",stroke:A,strokeDasharray:null===(t=n.payload)||void 0===t?void 0:t.strokeDasharray,x1:0,y1:a,x2:lQ,y2:a,className:"recharts-legend-icon"});if("line"===l)return De.createElement("path",{strokeWidth:4,fill:"none",stroke:A,d:"M0,".concat(a,"h").concat(s,"\n A").concat(o,",").concat(o,",0,1,1,").concat(2*s,",").concat(a,"\n H").concat(lQ,"M").concat(2*s,",").concat(a,"\n A").concat(o,",").concat(o,",0,1,1,").concat(s,",").concat(a),className:"recharts-legend-icon"});if("rect"===l)return De.createElement("path",{stroke:"none",fill:A,d:"M0,".concat(4,"h").concat(lQ,"v").concat(24,"h").concat(-32,"z"),className:"recharts-legend-icon"});if(De.isValidElement(n.legendIcon)){var c=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sQ(Object(n),!0).forEach(function(t){AQ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sQ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},n);return delete c.legendIcon,De.cloneElement(n.legendIcon,c)}return De.createElement(ZF,{fill:A,cx:a,cy:a,size:lQ,sizeType:"diameter",type:l})}function dQ(e){var{payload:t,iconSize:n,layout:r,formatter:i,inactiveColor:a,iconType:o}=e,s={x:0,y:0,width:lQ,height:lQ},A={display:"horizontal"===r?"inline-block":"block",marginRight:10},l={display:"inline-block",verticalAlign:"middle",marginRight:4};return t.map((t,r)=>{var c=t.formatter||i,u=yh({"recharts-legend-item":!0,["legend-item-".concat(r)]:!0,inactive:t.inactive});if("none"===t.type)return null;var d=t.inactive?a:t.color,h=c?c(t.value,t,r):t.value;return De.createElement("li",oQ({className:u,style:A,key:"legend-item-".concat(r)},nQ(e,t,r)),De.createElement(Jk,{width:n,height:n,viewBox:s,style:l,"aria-label":"".concat(h," legend icon")},De.createElement(uQ,{data:t,iconType:o,inactiveColor:a})),De.createElement("span",{className:"recharts-legend-item-text",style:{color:d}},h))})}var hQ,pQ=e=>{var t=aQ(e,cQ),{payload:n,layout:r,align:i}=t;if(!n||!n.length)return null;var a={padding:0,margin:0,textAlign:"horizontal"===r?i:"left"};return De.createElement("ul",{className:"recharts-default-legend",style:a},De.createElement(dQ,oQ({},t,{payload:n})))},fQ={},mQ={};function gQ(){return hQ||(hQ=1,e=mQ,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.uniqBy=function(e,t){const n=new Map;for(let r=0;r<e.length;r++){const i=e[r],a=t(i,r,e);n.has(a)||n.set(a,i)}return Array.from(n.values())}),mQ;var e}var yQ,vQ={};function wQ(){return yQ||(yQ=1,e=vQ,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.ary=function(e,t){return function(...n){return e.apply(this,n.slice(0,t))}}),vQ;var e}var xQ,bQ={};function BQ(){return xQ||(xQ=1,e=bQ,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.identity=function(e){return e}),bQ;var e}var CQ,EQ,kQ={},SQ={},FQ={};function QQ(){return CQ||(CQ=1,e=FQ,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isLength=function(e){return Number.isSafeInteger(e)&&e>=0}),FQ;var e}function jQ(){return EQ||(EQ=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=QQ();e.isArrayLike=function(e){return null!=e&&"function"!=typeof e&&t.isLength(e.length)}}(SQ)),SQ}var UQ,OQ,NQ={};function IQ(){return UQ||(UQ=1,e=NQ,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isObjectLike=function(e){return"object"==typeof e&&null!==e}),NQ;var e}function TQ(){return OQ||(OQ=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=jQ(),n=IQ();e.isArrayLikeObject=function(e){return n.isObjectLike(e)&&t.isArrayLike(e)}}(kQ)),kQ}var PQ,MQ={},DQ={};function LQ(){return PQ||(PQ=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=kF();e.property=function(e){return function(n){return t.get(n,e)}}}(DQ)),DQ}var HQ,_Q={},RQ={},KQ={},zQ={};function VQ(){return HQ||(HQ=1,e=zQ,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isObject=function(e){return null!==e&&("object"==typeof e||"function"==typeof e)}),zQ;var e}var $Q,WQ={};function GQ(){return $Q||($Q=1,e=WQ,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isPrimitive=function(e){return null==e||"object"!=typeof e&&"function"!=typeof e}),WQ;var e}var qQ,XQ,YQ,JQ={};function ZQ(){return qQ||(qQ=1,e=JQ,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isEqualsSameValueZero=function(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}),JQ;var e}function ej(){return XQ||(XQ=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=VQ(),n=GQ(),r=ZQ();function i(e,s,A,l){if(s===e)return!0;switch(typeof s){case"object":return function(e,t,r,i){if(null==t)return!0;if(Array.isArray(t))return a(e,t,r,i);if(t instanceof Map)return function(e,t,n,r){if(0===t.size)return!0;if(!(e instanceof Map))return!1;for(const[i,a]of t.entries()){if(!1===n(e.get(i),a,i,e,t,r))return!1}return!0}(e,t,r,i);if(t instanceof Set)return o(e,t,r,i);const s=Object.keys(t);if(null==e||n.isPrimitive(e))return 0===s.length;if(0===s.length)return!0;if(null==i?void 0:i.has(t))return i.get(t)===e;null==i||i.set(t,e);try{for(let a=0;a<s.length;a++){const o=s[a];if(!n.isPrimitive(e)&&!(o in e))return!1;if(void 0===t[o]&&void 0!==e[o])return!1;if(null===t[o]&&null!==e[o])return!1;if(!r(e[o],t[o],o,e,t,i))return!1}return!0}finally{null==i||i.delete(t)}}(e,s,A,l);case"function":return Object.keys(s).length>0?i(e,{...s},A,l):r.isEqualsSameValueZero(e,s);default:return t.isObject(e)?"string"!=typeof s||""===s:r.isEqualsSameValueZero(e,s)}}function a(e,t,n,r){if(0===t.length)return!0;if(!Array.isArray(e))return!1;const i=new Set;for(let a=0;a<t.length;a++){const o=t[a];let s=!1;for(let A=0;A<e.length;A++){if(i.has(A))continue;let l=!1;if(n(e[A],o,a,e,t,r)&&(l=!0),l){i.add(A),s=!0;break}}if(!s)return!1}return!0}function o(e,t,n,r){return 0===t.size||e instanceof Set&&a([...e],[...t],n,r)}e.isMatchWith=function e(t,n,r){return"function"!=typeof r?e(t,n,()=>{}):i(t,n,function e(t,n,a,o,s,A){const l=r(t,n,a,o,s,A);return void 0!==l?Boolean(l):i(t,n,e,A)},new Map)},e.isSetMatch=o}(KQ)),KQ}function tj(){return YQ||(YQ=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ej();e.isMatch=function(e,n){return t.isMatchWith(e,n,()=>{})}}(RQ)),RQ}var nj,rj={},ij={},aj={};function oj(){return nj||(nj=1,e=aj,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.getSymbols=function(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}),aj;var e}var sj,Aj={};function lj(){return sj||(sj=1,e=Aj,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.getTag=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}),Aj;var e}var cj,uj={};function dj(){return cj||(cj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});e.argumentsTag="[object Arguments]",e.arrayBufferTag="[object ArrayBuffer]",e.arrayTag="[object Array]",e.bigInt64ArrayTag="[object BigInt64Array]",e.bigUint64ArrayTag="[object BigUint64Array]",e.booleanTag="[object Boolean]",e.dataViewTag="[object DataView]",e.dateTag="[object Date]",e.errorTag="[object Error]",e.float32ArrayTag="[object Float32Array]",e.float64ArrayTag="[object Float64Array]",e.functionTag="[object Function]",e.int16ArrayTag="[object Int16Array]",e.int32ArrayTag="[object Int32Array]",e.int8ArrayTag="[object Int8Array]",e.mapTag="[object Map]",e.numberTag="[object Number]",e.objectTag="[object Object]",e.regexpTag="[object RegExp]",e.setTag="[object Set]",e.stringTag="[object String]",e.symbolTag="[object Symbol]",e.uint16ArrayTag="[object Uint16Array]",e.uint32ArrayTag="[object Uint32Array]",e.uint8ArrayTag="[object Uint8Array]",e.uint8ClampedArrayTag="[object Uint8ClampedArray]"}(uj)),uj}var hj,pj,fj,mj,gj={};function yj(){return hj||(hj=1,e=gj,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isTypedArray=function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}),gj;var e}function vj(){return pj||(pj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=oj(),n=lj(),r=dj(),i=GQ(),a=yj();function o(e,t,A,l=new Map,c=void 0){const u=null==c?void 0:c(e,t,A,l);if(void 0!==u)return u;if(i.isPrimitive(e))return e;if(l.has(e))return l.get(e);if(Array.isArray(e)){const t=new Array(e.length);l.set(e,t);for(let n=0;n<e.length;n++)t[n]=o(e[n],n,A,l,c);return Object.hasOwn(e,"index")&&(t.index=e.index),Object.hasOwn(e,"input")&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){const t=new Map;l.set(e,t);for(const[n,r]of e)t.set(n,o(r,n,A,l,c));return t}if(e instanceof Set){const t=new Set;l.set(e,t);for(const n of e)t.add(o(n,void 0,A,l,c));return t}if("undefined"!=typeof Buffer&&Buffer.isBuffer(e))return e.subarray();if(a.isTypedArray(e)){const t=new(Object.getPrototypeOf(e).constructor)(e.length);l.set(e,t);for(let n=0;n<e.length;n++)t[n]=o(e[n],n,A,l,c);return t}if(e instanceof ArrayBuffer||"undefined"!=typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return l.set(e,t),s(t,e,A,l,c),t}if("undefined"!=typeof File&&e instanceof File){const t=new File([e],e.name,{type:e.type});return l.set(e,t),s(t,e,A,l,c),t}if("undefined"!=typeof Blob&&e instanceof Blob){const t=new Blob([e],{type:e.type});return l.set(e,t),s(t,e,A,l,c),t}if(e instanceof Error){const t=new e.constructor;return l.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,s(t,e,A,l,c),t}if(e instanceof Boolean){const t=new Boolean(e.valueOf());return l.set(e,t),s(t,e,A,l,c),t}if(e instanceof Number){const t=new Number(e.valueOf());return l.set(e,t),s(t,e,A,l,c),t}if(e instanceof String){const t=new String(e.valueOf());return l.set(e,t),s(t,e,A,l,c),t}if("object"==typeof e&&function(e){switch(n.getTag(e)){case r.argumentsTag:case r.arrayTag:case r.arrayBufferTag:case r.dataViewTag:case r.booleanTag:case r.dateTag:case r.float32ArrayTag:case r.float64ArrayTag:case r.int8ArrayTag:case r.int16ArrayTag:case r.int32ArrayTag:case r.mapTag:case r.numberTag:case r.objectTag:case r.regexpTag:case r.setTag:case r.stringTag:case r.symbolTag:case r.uint8ArrayTag:case r.uint8ClampedArrayTag:case r.uint16ArrayTag:case r.uint32ArrayTag:return!0;default:return!1}}(e)){const t=Object.create(Object.getPrototypeOf(e));return l.set(e,t),s(t,e,A,l,c),t}return e}function s(e,n,r=e,i,a){const s=[...Object.keys(n),...t.getSymbols(n)];for(let t=0;t<s.length;t++){const A=s[t],l=Object.getOwnPropertyDescriptor(e,A);(null==l||l.writable)&&(e[A]=o(n[A],A,r,i,a))}}e.cloneDeepWith=function(e,t){return o(e,void 0,e,new Map,t)},e.cloneDeepWithImpl=o,e.copyProperties=s}(ij)),ij}function wj(){return fj||(fj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=vj();e.cloneDeep=function(e){return t.cloneDeepWithImpl(e,void 0,e,new Map,void 0)}}(rj)),rj}function xj(){return mj||(mj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=tj(),n=wj();e.matches=function(e){return e=n.cloneDeep(e),n=>t.isMatch(n,e)}}(_Q)),_Q}var bj,Bj,Cj={},Ej={},kj={};function Sj(){return bj||(bj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=vj(),n=lj(),r=dj();e.cloneDeepWith=function(e,i){return t.cloneDeepWith(e,(a,o,s,A)=>{const l=null==i?void 0:i(a,o,s,A);if(void 0!==l)return l;if("object"==typeof e){if(n.getTag(e)===r.objectTag&&"function"!=typeof e.constructor){const n={};return A.set(e,n),t.copyProperties(n,e,s,A),n}switch(Object.prototype.toString.call(e)){case r.numberTag:case r.stringTag:case r.booleanTag:{const n=new e.constructor(null==e?void 0:e.valueOf());return t.copyProperties(n,e),n}case r.argumentsTag:{const n={};return t.copyProperties(n,e),n.length=e.length,n[Symbol.iterator]=e[Symbol.iterator],n}default:return}}})}}(kj)),kj}function Fj(){return Bj||(Bj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Sj();e.cloneDeep=function(e){return t.cloneDeepWith(e)}}(Ej)),Ej}var Qj,jj={},Uj={};function Oj(){return Qj||(Qj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=/^(?:0|[1-9]\d*)$/;e.isIndex=function(e,n=Number.MAX_SAFE_INTEGER){switch(typeof e){case"number":return Number.isInteger(e)&&e>=0&&e<n;case"symbol":return!1;case"string":return t.test(e)}}}(Uj)),Uj}var Nj,Ij,Tj,Pj,Mj,Dj,Lj,Hj={};function _j(){return Nj||(Nj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=lj();e.isArguments=function(e){return null!==e&&"object"==typeof e&&"[object Arguments]"===t.getTag(e)}}(Hj)),Hj}function Rj(){return Ij||(Ij=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=hF(),n=Oj(),r=_j(),i=EF();e.has=function(e,a){let o;if(o=Array.isArray(a)?a:"string"==typeof a&&t.isDeepKey(a)&&null==(null==e?void 0:e[a])?i.toPath(a):[a],0===o.length)return!1;let s=e;for(let t=0;t<o.length;t++){const e=o[t];if(null==s||!Object.hasOwn(s,e)){if(!((Array.isArray(s)||r.isArguments(s))&&n.isIndex(e)&&e<s.length))return!1}s=s[e]}return!0}}(jj)),jj}function Kj(){return Tj||(Tj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=tj(),n=mF(),r=Fj(),i=kF(),a=Rj();e.matchesProperty=function(e,o){switch(typeof e){case"object":Object.is(null==e?void 0:e.valueOf(),-0)&&(e="-0");break;case"number":e=n.toKey(e)}return o=r.cloneDeep(o),function(n){const r=i.get(n,e);return void 0===r?a.has(n,e):void 0===o?void 0===r:t.isMatch(r,o)}}}(Cj)),Cj}function zj(){return Pj||(Pj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=BQ(),n=LQ(),r=xj(),i=Kj();e.iteratee=function(e){if(null==e)return t.identity;switch(typeof e){case"function":return e;case"object":return Array.isArray(e)&&2===e.length?i.matchesProperty(e[0],e[1]):r.matches(e);case"string":case"symbol":case"number":return n.property(e)}}}(MQ)),MQ}function Vj(){return Lj?Dj:(Lj=1,Dj=(Mj||(Mj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=gQ(),n=wQ(),r=BQ(),i=TQ(),a=zj();e.uniqBy=function(e,o=r.identity){return i.isArrayLikeObject(e)?t.uniqBy(Array.from(e),n.ary(a.iteratee(o),1)):[]}}(fQ)),fQ).uniqBy)}const $j=ry(Vj());function Wj(e,t,n){return!0===t?$j(e,n):"function"==typeof t?$j(e,t):e}var Gj,qj={exports:{}},Xj={},Yj={exports:{}},Jj={};var Zj,eU,tU,nU={};
|
|
46
|
+
/**
|
|
47
|
+
* @license React
|
|
48
|
+
* use-sync-external-store-shim.development.js
|
|
49
|
+
*
|
|
50
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
51
|
+
*
|
|
52
|
+
* This source code is licensed under the MIT license found in the
|
|
53
|
+
* LICENSE file in the root directory of this source tree.
|
|
54
|
+
*/function rU(){return eU||(eU=1,"production"===process.env.NODE_ENV?Yj.exports=function(){if(Gj)return Jj;Gj=1;var e=Te,t="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},n=e.useState,r=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function o(e){var n=e.getSnapshot;e=e.value;try{var r=n();return!t(e,r)}catch(i){return!0}}var s="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var s=t(),A=n({inst:{value:s,getSnapshot:t}}),l=A[0].inst,c=A[1];return i(function(){l.value=s,l.getSnapshot=t,o(l)&&c({inst:l})},[e,s,t]),r(function(){return o(l)&&c({inst:l}),e(function(){o(l)&&c({inst:l})})},[e]),a(s),s};return Jj.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:s,Jj}():Yj.exports=(Zj||(Zj=1,"production"!==process.env.NODE_ENV&&function(){function e(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!n(e,r)}catch(i){return!0}}"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=Te,n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=t.useState,i=t.useEffect,a=t.useLayoutEffect,o=t.useDebugValue,s=!1,A=!1,l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(l,c){s||void 0===t.startTransition||(s=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var u=c();if(!A){var d=c();n(u,d)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),A=!0)}var h=(d=r({inst:{value:u,getSnapshot:c}}))[0].inst,p=d[1];return a(function(){h.value=u,h.getSnapshot=c,e(h)&&p({inst:h})},[l,u,c]),i(function(){return e(h)&&p({inst:h}),l(function(){e(h)&&p({inst:h})})},[l]),o(u),u};nU.useSyncExternalStore=void 0!==t.useSyncExternalStore?t.useSyncExternalStore:l,"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),nU)),Yj.exports}
|
|
55
|
+
/**
|
|
56
|
+
* @license React
|
|
57
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
58
|
+
*
|
|
59
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
60
|
+
*
|
|
61
|
+
* This source code is licensed under the MIT license found in the
|
|
62
|
+
* LICENSE file in the root directory of this source tree.
|
|
63
|
+
*/var iU,aU,oU={};
|
|
64
|
+
/**
|
|
65
|
+
* @license React
|
|
66
|
+
* use-sync-external-store-shim/with-selector.development.js
|
|
67
|
+
*
|
|
68
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
69
|
+
*
|
|
70
|
+
* This source code is licensed under the MIT license found in the
|
|
71
|
+
* LICENSE file in the root directory of this source tree.
|
|
72
|
+
*/var sU=(aU||(aU=1,"production"===process.env.NODE_ENV?qj.exports=function(){if(tU)return Xj;tU=1;var e=Te,t=rU(),n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=t.useSyncExternalStore,i=e.useRef,a=e.useEffect,o=e.useMemo,s=e.useDebugValue;return Xj.useSyncExternalStoreWithSelector=function(e,t,A,l,c){var u=i(null);if(null===u.current){var d={hasValue:!1,value:null};u.current=d}else d=u.current;u=o(function(){function e(e){if(!a){if(a=!0,r=e,e=l(e),void 0!==c&&d.hasValue){var t=d.value;if(c(t,e))return i=t}return i=e}if(t=i,n(r,e))return t;var o=l(e);return void 0!==c&&c(t,o)?(r=e,t):(r=e,i=o)}var r,i,a=!1,o=void 0===A?null:A;return[function(){return e(t())},null===o?void 0:function(){return e(o())}]},[t,A,l,c]);var h=r(e,u[0],u[1]);return a(function(){d.hasValue=!0,d.value=h},[h]),s(h),h},Xj}():qj.exports=(iU||(iU=1,"production"!==process.env.NODE_ENV&&function(){"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var e=Te,t=rU(),n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=t.useSyncExternalStore,i=e.useRef,a=e.useEffect,o=e.useMemo,s=e.useDebugValue;oU.useSyncExternalStoreWithSelector=function(e,t,A,l,c){var u=i(null);if(null===u.current){var d={hasValue:!1,value:null};u.current=d}else d=u.current;u=o(function(){function e(e){if(!a){if(a=!0,r=e,e=l(e),void 0!==c&&d.hasValue){var t=d.value;if(c(t,e))return i=t}return i=e}if(t=i,n(r,e))return t;var o=l(e);return void 0!==c&&c(t,o)?(r=e,t):(r=e,i=o)}var r,i,a=!1,o=void 0===A?null:A;return[function(){return e(t())},null===o?void 0:function(){return e(o())}]},[t,A,l,c]);var h=r(e,u[0],u[1]);return a(function(){d.hasValue=!0,d.value=h},[h]),s(h),h},"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),oU)),qj.exports),AU=Te.createContext(null),lU=e=>e,cU=()=>{var e=Te.useContext(AU);return e?e.store.dispatch:lU},uU=()=>{},dU=()=>uU,hU=(e,t)=>e===t;function pU(e){var t=Te.useContext(AU),n=Te.useMemo(()=>t?t=>{if(null!=t)return e(t)}:uU,[t,e]);return sU.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:dU,t?t.store.getState:uU,t?t.store.getState:uU,n,hU)}var fU=(e,t,n)=>{if(1===t.length&&t[0]===n){let t=!1;try{const n={};e(n)===n&&(t=!0)}catch{}if(t){let e;try{throw new Error}catch(qX){({stack:e}=qX)}console.warn("The result function returned its own inputs without modification. e.g\n`createSelector([state => state.todos], todos => todos)`\nThis could lead to inefficient memoization and unnecessary re-renders.\nEnsure transformation logic is in the result function, and extraction logic is in the input selectors.",{stack:e})}}},mU=(e,t,n)=>{const{memoize:r,memoizeOptions:i}=t,{inputSelectorResults:a,inputSelectorResultsCopy:o}=e,s=r(()=>({}),...i);if(!(s.apply(null,a)===s.apply(null,o))){let e;try{throw new Error}catch(qX){({stack:e}=qX)}console.warn("An input selector returned a different result when passed same arguments.\nThis means your output selector will likely run more frequently than intended.\nAvoid returning a new reference inside your input selector, e.g.\n`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)`",{arguments:n,firstInputs:a,secondInputs:o,stack:e})}},gU={inputStabilityCheck:"once",identityFunctionCheck:"once"};var yU=e=>Array.isArray(e)?e:[e];function vU(e){const t=Array.isArray(e[0])?e[0]:e;return function(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(e=>"function"==typeof e)){const n=e.map(e=>"function"==typeof e?`function ${e.name||"unnamed"}()`:typeof e).join(", ");throw new TypeError(`${t}[${n}]`)}}(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function wU(e,t){const n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}var xU="undefined"!=typeof WeakRef?WeakRef:class{constructor(e){this.value=e}deref(){return this.value}};function bU(){return{s:0,v:void 0,o:null,p:null}}function BU(e,t={}){let n={s:0,v:void 0,o:null,p:null};const{resultEqualityCheck:r}=t;let i,a=0;function o(){var t;let o=n;const{length:s}=arguments;for(let e=0,n=s;e<n;e++){const t=arguments[e];if("function"==typeof t||"object"==typeof t&&null!==t){let e=o.o;null===e&&(o.o=e=new WeakMap);const n=e.get(t);void 0===n?(o=bU(),e.set(t,o)):o=n}else{let e=o.p;null===e&&(o.p=e=new Map);const n=e.get(t);void 0===n?(o=bU(),e.set(t,o)):o=n}}const A=o;let l;if(1===o.s)l=o.v;else if(l=e.apply(null,arguments),a++,r){const e=(null==(t=null==i?void 0:i.deref)?void 0:t.call(i))??i;null!=e&&r(e,l)&&(l=e,0!==a&&a--);i="object"==typeof l&&null!==l||"function"==typeof l?new xU(l):l}return A.s=1,A.v=l,l}return o.clearCache=()=>{n={s:0,v:void 0,o:null,p:null},o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function CU(e,...t){const n="function"==typeof e?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t,r=0,i=0,a={},o=e.pop();"object"==typeof o&&(a=o,o=e.pop()),function(e,t="expected a function, instead received "+typeof e){if("function"!=typeof e)throw new TypeError(t)}(o,`createSelector expects an output function after the inputs, but received: [${typeof o}]`);const s={...n,...a},{memoize:A,memoizeOptions:l=[],argsMemoize:c=BU,argsMemoizeOptions:u=[],devModeChecks:d={}}=s,h=yU(l),p=yU(u),f=vU(e),m=A(function(){return r++,o.apply(null,arguments)},...h);let g=!0;const y=c(function(){i++;const e=wU(f,arguments);if(t=m.apply(null,e),"production"!==process.env.NODE_ENV){const{identityFunctionCheck:n,inputStabilityCheck:r}=((e,t)=>{const{identityFunctionCheck:n,inputStabilityCheck:r}={...gU,...t};return{identityFunctionCheck:{shouldRun:"always"===n||"once"===n&&e,run:fU},inputStabilityCheck:{shouldRun:"always"===r||"once"===r&&e,run:mU}}})(g,d);if(n.shouldRun&&n.run(o,e,t),r.shouldRun){const t=wU(f,arguments);r.run({inputSelectorResults:e,inputSelectorResultsCopy:t},{memoize:A,memoizeOptions:h},arguments)}g&&(g=!1)}return t},...p);return Object.assign(y,{resultFunc:o,memoizedResultFunc:m,dependencies:f,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>t,recomputations:()=>r,resetRecomputations:()=>{r=0},memoize:A,argsMemoize:c})};return Object.assign(r,{withTypes:()=>r}),r}var EU,kU=CU(BU),SU=Object.assign((e,t=kU)=>{!function(e,t="expected an object, instead received "+typeof e){if("object"!=typeof e)throw new TypeError(t)}(e,"createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+typeof e);const n=Object.keys(e);return t(n.map(t=>e[t]),(...e)=>e.reduce((e,t,r)=>(e[n[r]]=t,e),{}))},{withTypes:()=>SU}),FU={},QU={},jU={};function UU(){return EU||(EU=1,function(e){function t(e){return"symbol"==typeof e?1:null===e?2:void 0===e?3:e!=e?4:0}Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});e.compareValues=(e,n,r)=>{if(e!==n){const i=t(e),a=t(n);if(i===a&&0===i){if(e<n)return"desc"===r?1:-1;if(e>n)return"desc"===r?-1:1}return"desc"===r?a-i:i-a}return 0}}(jU)),jU}var OU,NU,IU,TU={},PU={};function MU(){return OU||(OU=1,e=PU,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isSymbol=function(e){return"symbol"==typeof e||e instanceof Symbol}),PU;var e}function DU(){return NU||(NU=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=MU(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;e.isKey=function(e,i){return!Array.isArray(e)&&(!("number"!=typeof e&&"boolean"!=typeof e&&null!=e&&!t.isSymbol(e))||("string"==typeof e&&(r.test(e)||!n.test(e))||null!=i&&Object.hasOwn(i,e)))}}(TU)),TU}function LU(){return IU||(IU=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=UU(),n=DU(),r=EF();e.orderBy=function(e,i,a,o){if(null==e)return[];a=o?void 0:a,Array.isArray(e)||(e=Object.values(e)),Array.isArray(i)||(i=null==i?[null]:[i]),0===i.length&&(i=[null]),Array.isArray(a)||(a=null==a?[]:[a]),a=a.map(e=>String(e));const s=(e,t)=>{let n=e;for(let r=0;r<t.length&&null!=n;++r)n=n[t[r]];return n},A=i.map(e=>(Array.isArray(e)&&1===e.length&&(e=e[0]),null==e||"function"==typeof e||Array.isArray(e)||n.isKey(e)?e:{key:e,path:r.toPath(e)}));return e.map(e=>({original:e,criteria:A.map(t=>((e,t)=>null==t||null==e?t:"object"==typeof e&&"key"in e?Object.hasOwn(t,e.key)?t[e.key]:s(t,e.path):"function"==typeof e?e(t):Array.isArray(e)?s(t,e):"object"==typeof t?t[e]:t)(t,e))})).slice().sort((e,n)=>{for(let r=0;r<A.length;r++){const i=t.compareValues(e.criteria[r],n.criteria[r],a[r]);if(0!==i)return i}return 0}).map(e=>e.original)}}(QU)),QU}var HU,_U={};function RU(){return HU||(HU=1,e=_U,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.flatten=function(e,t=1){const n=[],r=Math.floor(t),i=(e,t)=>{for(let a=0;a<e.length;a++){const o=e[a];Array.isArray(o)&&t<r?i(o,t+1):n.push(o)}};return i(e,0),n}),_U;var e}var KU,zU,VU,$U,WU={};function GU(){return KU||(KU=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Oj(),n=jQ(),r=VQ(),i=ZQ();e.isIterateeCall=function(e,a,o){return!!r.isObject(o)&&(!!("number"==typeof a&&n.isArrayLike(o)&&t.isIndex(a)&&a<o.length||"string"==typeof a&&a in o)&&i.isEqualsSameValueZero(o[a],e))}}(WU)),WU}function qU(){return $U?VU:($U=1,VU=(zU||(zU=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=LU(),n=RU(),r=GU();e.sortBy=function(e,...i){const a=i.length;return a>1&&r.isIterateeCall(e,i[0],i[1])?i=[]:a>2&&r.isIterateeCall(i[0],i[1],i[2])&&(i=[i[0]]),t.orderBy(e,n.flatten(i),["asc"])}}(FU)),FU).sortBy)}const XU=ry(qU());var YU=e=>e.legend.settings,JU=kU([e=>e.legend.payload,YU],(e,t)=>{var{itemSorter:n}=t,r=e.flat(1);return n?XU(r,n):r});function ZU(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],[t,n]=Te.useState({height:0,left:0,top:0,width:0}),r=Te.useCallback(e=>{if(null!=e){var r=e.getBoundingClientRect(),i={height:r.height,left:r.left,top:r.top,width:r.width};(Math.abs(i.height-t.height)>1||Math.abs(i.left-t.left)>1||Math.abs(i.top-t.top)>1||Math.abs(i.width-t.width)>1)&&n({height:i.height,left:i.left,top:i.top,width:i.width})}},[t.width,t.height,t.top,t.left,...e]);return[t,r]}function eO(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var tO=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),nO=()=>Math.random().toString(36).substring(7).split("").join("."),rO={INIT:`@@redux/INIT${nO()}`,REPLACE:`@@redux/REPLACE${nO()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${nO()}`};function iO(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function aO(e){if(void 0===e)return"undefined";if(null===e)return"null";const t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if(function(e){return e instanceof Date||"function"==typeof e.toDateString&&"function"==typeof e.getDate&&"function"==typeof e.setDate}(e))return"date";if(function(e){return e instanceof Error||"string"==typeof e.message&&e.constructor&&"number"==typeof e.constructor.stackTraceLimit}(e))return"error";const n=function(e){return"function"==typeof e.constructor?e.constructor.name:null}(e);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return Object.prototype.toString.call(e).slice(8,-1).toLowerCase().replace(/\s/g,"")}function oO(e){let t=typeof e;return"production"!==process.env.NODE_ENV&&(t=aO(e)),t}function sO(e,t,n){if("function"!=typeof e)throw new Error("production"===process.env.NODE_ENV?eO(2):`Expected the root reducer to be a function. Instead, received: '${oO(e)}'`);if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error("production"===process.env.NODE_ENV?eO(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error("production"===process.env.NODE_ENV?eO(1):`Expected the enhancer to be a function. Instead, received: '${oO(n)}'`);return n(sO)(e,t)}let r=e,i=t,a=new Map,o=a,s=0,A=!1;function l(){o===a&&(o=new Map,a.forEach((e,t)=>{o.set(t,e)}))}function c(){if(A)throw new Error("production"===process.env.NODE_ENV?eO(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return i}function u(e){if("function"!=typeof e)throw new Error("production"===process.env.NODE_ENV?eO(4):`Expected the listener to be a function. Instead, received: '${oO(e)}'`);if(A)throw new Error("production"===process.env.NODE_ENV?eO(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");let t=!0;l();const n=s++;return o.set(n,e),function(){if(t){if(A)throw new Error("production"===process.env.NODE_ENV?eO(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");t=!1,l(),o.delete(n),a=null}}}function d(e){if(!iO(e))throw new Error("production"===process.env.NODE_ENV?eO(7):`Actions must be plain objects. Instead, the actual type was: '${oO(e)}'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.`);if(void 0===e.type)throw new Error("production"===process.env.NODE_ENV?eO(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if("string"!=typeof e.type)throw new Error("production"===process.env.NODE_ENV?eO(17):`Action "type" property must be a string. Instead, the actual type was: '${oO(e.type)}'. Value was: '${e.type}' (stringified)`);if(A)throw new Error("production"===process.env.NODE_ENV?eO(9):"Reducers may not dispatch actions.");try{A=!0,i=r(i,e)}finally{A=!1}return(a=o).forEach(e=>{e()}),e}d({type:rO.INIT});return{dispatch:d,subscribe:u,getState:c,replaceReducer:function(e){if("function"!=typeof e)throw new Error("production"===process.env.NODE_ENV?eO(10):`Expected the nextReducer to be a function. Instead, received: '${oO(e)}`);r=e,d({type:rO.REPLACE})},[tO]:function(){const e=u;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error("production"===process.env.NODE_ENV?eO(11):`Expected the observer to be an object. Instead, received: '${oO(t)}'`);function n(){const e=t;e.next&&e.next(c())}n();return{unsubscribe:e(n)}},[tO](){return this}}}}}function AO(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e);try{throw new Error(e)}catch(qX){}}function lO(e){const t=Object.keys(e),n={};for(let o=0;o<t.length;o++){const r=t[o];"production"!==process.env.NODE_ENV&&void 0===e[r]&&AO(`No reducer provided for key "${r}"`),"function"==typeof e[r]&&(n[r]=e[r])}const r=Object.keys(n);let i,a;"production"!==process.env.NODE_ENV&&(i={});try{!function(e){Object.keys(e).forEach(t=>{const n=e[t];if(void 0===n(void 0,{type:rO.INIT}))throw new Error("production"===process.env.NODE_ENV?eO(12):`The slice reducer for key "${t}" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(void 0===n(void 0,{type:rO.PROBE_UNKNOWN_ACTION()}))throw new Error("production"===process.env.NODE_ENV?eO(13):`The slice reducer for key "${t}" returned undefined when probed with a random type. Don't try to handle '${rO.INIT}' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.`)})}(n)}catch(qX){a=qX}return function(e={},t){if(a)throw a;if("production"!==process.env.NODE_ENV){const r=function(e,t,n,r){const i=Object.keys(t),a=n&&n.type===rO.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(0===i.length)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!iO(e))return`The ${a} has unexpected type of "${oO(e)}". Expected argument to be an object with the following keys: "${i.join('", "')}"`;const o=Object.keys(e).filter(e=>!t.hasOwnProperty(e)&&!r[e]);return o.forEach(e=>{r[e]=!0}),n&&n.type===rO.REPLACE?void 0:o.length>0?`Unexpected ${o.length>1?"keys":"key"} "${o.join('", "')}" found in ${a}. Expected to find one of the known reducer keys instead: "${i.join('", "')}". Unexpected keys will be ignored.`:void 0}(e,n,t,i);r&&AO(r)}let o=!1;const s={};for(let i=0;i<r.length;i++){const a=r[i],A=n[a],l=e[a],c=A(l,t);if(void 0===c){const e=t&&t.type;throw new Error("production"===process.env.NODE_ENV?eO(14):`When called with an action of type ${e?`"${String(e)}"`:"(unknown type)"}, the slice reducer for key "${a}" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.`)}s[a]=c,o=o||c!==l}return o=o||r.length!==Object.keys(e).length,o?s:e}}function cO(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce((e,t)=>(...n)=>e(t(...n)))}function uO(e){return iO(e)&&"type"in e&&"string"==typeof e.type}var dO=Symbol.for("immer-nothing"),hO=Symbol.for("immer-draftable"),pO=Symbol.for("immer-state"),fO="production"!==process.env.NODE_ENV?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function mO(e,...t){if("production"!==process.env.NODE_ENV){const n=fO[e],r=LO(n)?n.apply(null,t):n;throw new Error(`[Immer] ${r}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var gO=Object,yO=gO.getPrototypeOf,vO="constructor",wO="prototype",xO="configurable",bO="enumerable",BO="writable",CO="value",EO=e=>!!e&&!!e[pO];function kO(e){var t;return!!e&&(QO(e)||TO(e)||!!e[hO]||!!(null==(t=e[vO])?void 0:t[hO])||PO(e)||MO(e))}var SO=gO[wO][vO].toString(),FO=new WeakMap;function QO(e){if(!e||!DO(e))return!1;const t=yO(e);if(null===t||t===gO[wO])return!0;const n=gO.hasOwnProperty.call(t,vO)&&t[vO];if(n===Object)return!0;if(!LO(n))return!1;let r=FO.get(n);return void 0===r&&(r=Function.toString.call(n),FO.set(n,r)),r===SO}function jO(e,t,n=!0){if(0===UO(e)){(n?Reflect.ownKeys(e):gO.keys(e)).forEach(n=>{t(n,e[n],e)})}else e.forEach((n,r)=>t(r,n,e))}function UO(e){const t=e[pO];return t?t.type_:TO(e)?1:PO(e)?2:MO(e)?3:0}var OO=(e,t,n=UO(e))=>2===n?e.has(t):gO[wO].hasOwnProperty.call(e,t),NO=(e,t,n=UO(e))=>2===n?e.get(t):e[t],IO=(e,t,n,r=UO(e))=>{2===r?e.set(t,n):3===r?e.add(n):e[t]=n};var TO=Array.isArray,PO=e=>e instanceof Map,MO=e=>e instanceof Set,DO=e=>"object"==typeof e,LO=e=>"function"==typeof e,HO=e=>"boolean"==typeof e;var _O=e=>e.copy_||e.base_,RO=e=>e.modified_?e.copy_:e.base_;function KO(e,t){if(PO(e))return new Map(e);if(MO(e))return new Set(e);if(TO(e))return Array[wO].slice.call(e);const n=QO(e);if(!0===t||"class_only"===t&&!n){const t=gO.getOwnPropertyDescriptors(e);delete t[pO];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){const i=n[r],a=t[i];!1===a[BO]&&(a[BO]=!0,a[xO]=!0),(a.get||a.set)&&(t[i]={[xO]:!0,[BO]:!0,[bO]:a[bO],[CO]:e[i]})}return gO.create(yO(e),t)}{const t=yO(e);if(null!==t&&n)return{...e};const r=gO.create(t);return gO.assign(r,e)}}function zO(e,t=!1){return $O(e)||EO(e)||!kO(e)||(UO(e)>1&&gO.defineProperties(e,{set:VO,add:VO,clear:VO,delete:VO}),gO.freeze(e),t&&jO(e,(e,t)=>{zO(t,!0)},!1)),e}var VO={[CO]:function(){mO(2)}};function $O(e){return null===e||!DO(e)||gO.isFrozen(e)}var WO="MapSet",GO="Patches",qO="ArrayMethods",XO={};function YO(e){const t=XO[e];return t||mO(0,e),t}var JO,ZO=e=>!!XO[e],eN=()=>JO;function tN(e,t){t&&(e.patchPlugin_=YO(GO),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function nN(e){rN(e),e.drafts_.forEach(aN),e.drafts_=null}function rN(e){e===JO&&(JO=e.parent_)}var iN=e=>JO={drafts_:[],parent_:JO,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:ZO(WO)?YO(WO):void 0,arrayMethodsPlugin_:ZO(qO)?YO(qO):void 0};function aN(e){const t=e[pO];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function oN(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(void 0!==e&&e!==n){n[pO].modified_&&(nN(t),mO(4)),kO(e)&&(e=sN(t,e));const{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[pO].base_,e,t)}else e=sN(t,n);return function(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&zO(t,n)}(t,e,!0),nN(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==dO?e:void 0}function sN(e,t){if($O(t))return t;const n=t[pO];if(!n){return hN(t,e.handledSet_,e)}if(!lN(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:t}=n;if(t)for(;t.length>0;){t.pop()(e)}dN(n,e)}return n.copy_}function AN(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var lN=(e,t)=>e.scope_===t,cN=[];function uN(e,t,n,r){const i=_O(e),a=e.type_;if(void 0!==r){if(NO(i,r,a)===t)return void IO(i,r,n,a)}if(!e.draftLocations_){const t=e.draftLocations_=new Map;jO(i,(e,n)=>{if(EO(n)){const r=t.get(n)||[];r.push(e),t.set(n,r)}})}const o=e.draftLocations_.get(t)??cN;for(const s of o)IO(i,s,n,a)}function dN(e,t){var n;if(e.modified_&&!e.finalized_&&(3===e.type_||1===e.type_&&e.allIndicesReassigned_||((null==(n=e.assigned_)?void 0:n.size)??0)>0)){const{patchPlugin_:n}=t;if(n){const r=n.getPath(e);r&&n.generatePatches_(e,r,t)}AN(e)}}function hN(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||EO(e)||t.has(e)||!kO(e)||$O(e)||(t.add(e),jO(e,(r,i)=>{if(EO(i)){const t=i[pO];if(lN(t,n)){const n=RO(t);IO(e,r,n,e.type_),AN(t)}}else kO(i)&&hN(i,t,n)})),e}var pN={get(e,t){if(t===pO)return e;let n=e.scope_.arrayMethodsPlugin_;const r=1===e.type_&&"string"==typeof t;if(r&&(null==n?void 0:n.isArrayOperationMethod(t)))return n.createMethodInterceptor(e,t);const i=_O(e);if(!OO(i,t,e.type_))return function(e,t,n){var r;const i=gN(t,n);return i?CO in i?i[CO]:null==(r=i.get)?void 0:r.call(e.draft_):void 0}(e,i,t);const a=i[t];if(e.finalized_||!kO(a))return a;if(r&&e.operationMethod&&(null==n?void 0:n.isMutatingArrayMethod(e.operationMethod))&&function(e){const t=+e;return Number.isInteger(t)&&String(t)===e}(t))return a;if(a===mN(e.base_,t)){vN(e);const n=1===e.type_?+t:t,r=wN(e.scope_,a,e,n);return e.copy_[n]=r}return a},has:(e,t)=>t in _O(e),ownKeys:e=>Reflect.ownKeys(_O(e)),set(e,t,n){const r=gN(_O(e),t);if(null==r?void 0:r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=mN(_O(e),t),o=null==r?void 0:r[pO];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(((i=n)===(a=r)?0!==i||1/i==1/a:i!=i&&a!=a)&&(void 0!==n||OO(e.base_,t,e.type_)))return!0;vN(e),yN(e)}var i,a;return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),function(e,t,n){const{scope_:r}=e;if(EO(n)){const i=n[pO];lN(i,r)&&i.callbacks_.push(function(){vN(e);const r=RO(i);uN(e,n,r,t)})}else kO(n)&&e.callbacks_.push(function(){const i=_O(e);3===e.type_?i.has(n)&&hN(n,r.handledSet_,r):NO(i,t,e.type_)===n&&r.drafts_.length>1&&!0===(e.assigned_.get(t)??!1)&&e.copy_&&hN(NO(e.copy_,t,e.type_),r.handledSet_,r)})}(e,t,n)),!0},deleteProperty:(e,t)=>(vN(e),void 0!==mN(e.base_,t)||t in e.base_?(e.assigned_.set(t,!1),yN(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=_O(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{[BO]:!0,[xO]:1!==e.type_||"length"!==t,[bO]:r[bO],[CO]:n[t]}:r},defineProperty(){mO(11)},getPrototypeOf:e=>yO(e.base_),setPrototypeOf(){mO(12)}},fN={};for(let Uae in pN){let e=pN[Uae];fN[Uae]=function(){const t=arguments;return t[0]=t[0][0],e.apply(this,t)}}function mN(e,t){const n=e[pO];return(n?_O(n):e)[t]}function gN(e,t){if(!(t in e))return;let n=yO(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=yO(n)}}function yN(e){e.modified_||(e.modified_=!0,e.parent_&&yN(e.parent_))}function vN(e){e.copy_||(e.assigned_=new Map,e.copy_=KO(e.base_,e.scope_.immer_.useStrictShallowCopy_))}fN.deleteProperty=function(e,t){return"production"!==process.env.NODE_ENV&&isNaN(parseInt(t))&&mO(13),fN.set.call(this,e,t,void 0)},fN.set=function(e,t,n){return"production"!==process.env.NODE_ENV&&"length"!==t&&isNaN(parseInt(t))&&mO(14),pN.set.call(this,e[0],t,n,e[0])};function wN(e,t,n,r){const[i,a]=PO(t)?YO(WO).proxyMap_(t,n):MO(t)?YO(WO).proxySet_(t,n):function(e,t){const n=TO(e),r={type_:n?1:0,scope_:t?t.scope_:eN(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let i=r,a=pN;n&&(i=[r],a=fN);const{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}(t,n);return((null==n?void 0:n.scope_)??eN()).drafts_.push(i),a.callbacks_=(null==n?void 0:n.callbacks_)??[],a.key_=r,n&&void 0!==r?function(e,t,n){e.callbacks_.push(function(r){var i;const a=t;if(!a||!lN(a,r))return;null==(i=r.mapSetPlugin_)||i.fixSetContents(a);const o=RO(a);uN(e,a.draft_??a,o,n),dN(a,r)})}(n,a,r):a.callbacks_.push(function(e){var t;null==(t=e.mapSetPlugin_)||t.fixSetContents(a);const{patchPlugin_:n}=e;a.modified_&&n&&n.generatePatches_(a,[],e)}),i}function xN(e){return EO(e)||mO(10,e),bN(e)}function bN(e){if(!kO(e)||$O(e))return e;const t=e[pO];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=KO(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=KO(e,!0);return jO(n,(e,t)=>{IO(n,e,bN(t))},r),t&&(t.finalized_=!1),n}var BN=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(LO(e)&&!LO(t)){const n=t;t=e;const r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}let r;if(LO(t)||mO(6),void 0===n||LO(n)||mO(7),kO(e)){const i=iN(this),a=wN(i,e,void 0);let o=!0;try{r=t(a),o=!1}finally{o?nN(i):rN(i)}return tN(i,n),oN(r,i)}if(!e||!DO(e)){if(r=t(e),void 0===r&&(r=e),r===dO&&(r=void 0),this.autoFreeze_&&zO(r,!0),n){const t=[],i=[];YO(GO).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}mO(1,e)},this.produceWithPatches=(e,t)=>{if(LO(e))return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},HO(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),HO(null==e?void 0:e.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),HO(null==e?void 0:e.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){kO(e)||mO(8),EO(e)&&(e=xN(e));const t=iN(this),n=wN(t,e,void 0);return n[pO].isManual_=!0,rN(t),n}finishDraft(e,t){const n=e&&e[pO];n&&n.isManual_||mO(9);const{scope_:r}=n;return tN(r,t),oN(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));const r=YO(GO).applyPatches_;return EO(e)?r(e,t):this.produce(e,e=>r(e,t))}},CN=BN.produce;function EN(e){return({dispatch:t,getState:n})=>r=>i=>"function"==typeof i?i(t,n,e):r(i)}var kN=EN(),SN=EN,FN="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?cO:cO.apply(null,arguments)};function QN(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw new Error("production"===process.env.NODE_ENV?II(0):"prepareAction did not return an object");return{type:e,payload:r.payload,..."meta"in r&&{meta:r.meta},..."error"in r&&{error:r.error}}}return{type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>uO(t)&&t.type===e,n}function jN(e){return"function"==typeof e&&"type"in e&&((t=e)&&"function"==typeof t.match);var t}function UN(e,t){let n=0;return{measureTime(e){const t=Date.now();try{return e()}finally{const e=Date.now();n+=e-t}},warnIfExceeded(){n>e&&console.warn(`${t} took ${n}ms, which is more than the warning threshold of ${e}ms. \nIf your state or actions are very large, you may want to disable the middleware as it might cause too much of a slowdown in development mode. See https://redux-toolkit.js.org/api/getDefaultMiddleware for instructions.\nIt is disabled in production builds, so you don't need to worry about that.`)}}}var ON=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return 1===t.length&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}};function NN(e){return kO(e)?CN(e,()=>{}):e}function IN(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function TN(e){return"object"!=typeof e||null==e||Object.isFrozen(e)}function PN(e,t,n){const r=MN(e,t,n);return{detectMutations:()=>DN(e,t,r,n)}}function MN(e,t=[],n,r="",i=new Set){const a={value:n};if(!e(n)&&!i.has(n)){i.add(n),a.children={};const o=t.length>0;for(const i in n){const s=r?r+"."+i:i;if(o){if(t.some(e=>e instanceof RegExp?e.test(s):s===e))continue}a.children[i]=MN(e,t,n[i],s)}}return a}function DN(e,t=[],n,r,i=!1,a=""){const o=n?n.value:void 0,s=o===r;if(i&&!s&&!Number.isNaN(r))return{wasMutated:!0,path:a};if(e(o)||e(r))return{wasMutated:!1};const A={};for(let c in n.children)A[c]=!0;for(let c in r)A[c]=!0;const l=t.length>0;for(let c in A){const i=a?a+"."+c:c;if(l){if(t.some(e=>e instanceof RegExp?e.test(i):i===e))continue}const o=DN(e,t,n.children[c],r[c],s,i);if(o.wasMutated)return o}return{wasMutated:!1}}function LN(e){const t=typeof e;return null==e||"string"===t||"boolean"===t||"number"===t||Array.isArray(e)||iO(e)}function HN(e,t="",n=LN,r,i=[],a){let o;if(!n(e))return{keyPath:t||"<root>",value:e};if("object"!=typeof e||null===e)return!1;if(null==a?void 0:a.has(e))return!1;const s=null!=r?r(e):Object.entries(e),A=i.length>0;for(const[l,c]of s){const e=t?t+"."+l:l;if(A){if(i.some(t=>t instanceof RegExp?t.test(e):e===t))continue}if(!n(c))return{keyPath:e,value:c};if("object"==typeof c&&(o=HN(c,e,n,r,i,a),o))return o}return a&&_N(e)&&a.add(e),!1}function _N(e){if(!Object.isFrozen(e))return!1;for(const t of Object.values(e))if("object"==typeof t&&null!==t&&!_N(t))return!1;return!0}function RN(e){return"boolean"==typeof e}var KN=()=>function(e){const{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0,actionCreatorCheck:i=!0}=e??{};let a=new ON;if(t&&(RN(t)?a.push(kN):a.push(SN(t.extraArgument))),"production"!==process.env.NODE_ENV){if(n){let e={};RN(n)||(e=n),a.unshift(function(e={}){if("production"===process.env.NODE_ENV)return()=>e=>t=>e(t);{let t=function(e,t,r,i){return JSON.stringify(e,n(t,i),r)},n=function(e,t){let n=[],r=[];return t||(t=function(e,t){return n[0]===t?"[Circular ~]":"[Circular ~."+r.slice(0,n.indexOf(t)).join(".")+"]"}),function(i,a){if(n.length>0){var o=n.indexOf(this);~o?n.splice(o+1):n.push(this),~o?r.splice(o,1/0,i):r.push(i),~n.indexOf(a)&&(a=t.call(this,i,a))}else n.push(a);return null==e?a:e.call(this,i,a)}},{isImmutable:r=TN,ignoredPaths:i,warnAfter:a=32}=e;const o=PN.bind(null,r,i);return({getState:e})=>{let n,r=e(),i=o(r);return s=>A=>{const l=UN(a,"ImmutableStateInvariantMiddleware");l.measureTime(()=>{if(r=e(),n=i.detectMutations(),i=o(r),n.wasMutated)throw new Error("production"===process.env.NODE_ENV?II(19):`A state mutation was detected between dispatches, in the path '${n.path||""}'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)});const c=s(A);return l.measureTime(()=>{if(r=e(),n=i.detectMutations(),i=o(r),n.wasMutated)throw new Error("production"===process.env.NODE_ENV?II(20):`A state mutation was detected inside a dispatch, in the path: ${n.path||""}. Take a look at the reducer(s) handling the action ${t(A)}. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)}),l.warnIfExceeded(),c}}}}(e))}if(r){let e={};RN(r)||(e=r),a.push(function(e={}){if("production"===process.env.NODE_ENV)return()=>e=>t=>e(t);{const{isSerializable:t=LN,getEntries:n,ignoredActions:r=[],ignoredActionPaths:i=["meta.arg","meta.baseQueryMeta"],ignoredPaths:a=[],warnAfter:o=32,ignoreState:s=!1,ignoreActions:A=!1,disableCache:l=!1}=e,c=!l&&WeakSet?new WeakSet:void 0;return e=>l=>u=>{if(!uO(u))return l(u);const d=l(u),h=UN(o,"SerializableStateInvariantMiddleware");return A||r.length&&-1!==r.indexOf(u.type)||h.measureTime(()=>{const e=HN(u,"",t,n,i,c);if(e){const{keyPath:t,value:n}=e;console.error(`A non-serializable value was detected in an action, in the path: \`${t}\`. Value:`,n,"\nTake a look at the logic that dispatched this action: ",u,"\n(See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)","\n(To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)")}}),s||(h.measureTime(()=>{const r=HN(e.getState(),"",t,n,a,c);if(r){const{keyPath:e,value:t}=r;console.error(`A non-serializable value was detected in the state, in the path: \`${e}\`. Value:`,t,`\nTake a look at the reducer(s) handling this action type: ${u.type}.\n(See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`)}}),h.warnIfExceeded()),d}}}(e))}if(i){let e={};RN(i)||(e=i),a.unshift(function(e={}){if("production"===process.env.NODE_ENV)return()=>e=>t=>e(t);const{isActionCreator:t=jN}=e;return()=>e=>n=>(t(n)&&console.warn(function(e){const t=e?`${e}`.split("/"):[],n=t[t.length-1]||"actionCreator";return`Detected an action creator with type "${e||"unknown"}" being dispatched. \nMake sure you're calling the action creator before dispatching, i.e. \`dispatch(${n}())\` instead of \`dispatch(${n})\`. This is necessary even if the action has no payload.`}(n.type)),e(n))}(e))}}return a},zN="RTK_autoBatch",VN=()=>e=>({payload:e,meta:{[zN]:!0}}),$N=e=>t=>{setTimeout(t,e)},WN=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,a=!1,o=!1;const s=new Set,A="tick"===e.type?queueMicrotask:"raf"===e.type?"undefined"!=typeof window&&window.requestAnimationFrame?window.requestAnimationFrame:$N(10):"callback"===e.type?e.queueNotification:$N(e.timeout),l=()=>{o=!1,a&&(a=!1,s.forEach(e=>e()))};return Object.assign({},r,{subscribe(e){const t=r.subscribe(()=>i&&e());return s.add(e),()=>{t(),s.delete(e)}},dispatch(e){var t;try{return i=!(null==(t=null==e?void 0:e.meta)?void 0:t[zN]),a=!i,a&&(o||(o=!0,A(l))),r.dispatch(e)}finally{i=!0}}})};function GN(e){const t=KN(),{reducer:n,middleware:r,devTools:i=!0,duplicateMiddlewareCheck:a=!0,preloadedState:o,enhancers:s}=e||{};let A,l;if("function"==typeof n)A=n;else{if(!iO(n))throw new Error("production"===process.env.NODE_ENV?II(1):"`reducer` is a required argument, and must be a function or an object of functions that can be passed to combineReducers");A=lO(n)}if("production"!==process.env.NODE_ENV&&r&&"function"!=typeof r)throw new Error("production"===process.env.NODE_ENV?II(2):"`middleware` field must be a callback");if("function"==typeof r){if(l=r(t),"production"!==process.env.NODE_ENV&&!Array.isArray(l))throw new Error("production"===process.env.NODE_ENV?II(3):"when using a middleware builder function, an array of middleware must be returned")}else l=t();if("production"!==process.env.NODE_ENV&&l.some(e=>"function"!=typeof e))throw new Error("production"===process.env.NODE_ENV?II(4):"each middleware provided to configureStore must be a function");if("production"!==process.env.NODE_ENV&&a){let e=new Set;l.forEach(t=>{if(e.has(t))throw new Error("production"===process.env.NODE_ENV?II(42):"Duplicate middleware references found when creating the store. Ensure that each middleware is only included once.");e.add(t)})}let c=cO;i&&(c=FN({trace:"production"!==process.env.NODE_ENV,..."object"==typeof i&&i}));const u=function(...e){return t=>(n,r)=>{const i=t(n,r);let a=()=>{throw new Error("production"===process.env.NODE_ENV?eO(15):"Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")};const o={getState:i.getState,dispatch:(e,...t)=>a(e,...t)},s=e.map(e=>e(o));return a=cO(...s)(i.dispatch),{...i,dispatch:a}}}(...l),d=(e=>function(t){const{autoBatch:n=!0}=t??{};let r=new ON(e);return n&&r.push(WN("object"==typeof n?n:void 0)),r})(u);if("production"!==process.env.NODE_ENV&&s&&"function"!=typeof s)throw new Error("production"===process.env.NODE_ENV?II(5):"`enhancers` field must be a callback");let h="function"==typeof s?s(d):d();if("production"!==process.env.NODE_ENV&&!Array.isArray(h))throw new Error("production"===process.env.NODE_ENV?II(6):"`enhancers` callback must return an array");if("production"!==process.env.NODE_ENV&&h.some(e=>"function"!=typeof e))throw new Error("production"===process.env.NODE_ENV?II(7):"each enhancer provided to configureStore must be a function");"production"!==process.env.NODE_ENV&&l.length&&!h.includes(u)&&console.error("middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`");return sO(A,o,c(...h))}function qN(e){const t={},n=[];let r;const i={addCase(e,a){if("production"!==process.env.NODE_ENV){if(n.length>0)throw new Error("production"===process.env.NODE_ENV?II(26):"`builder.addCase` should only be called before calling `builder.addMatcher`");if(r)throw new Error("production"===process.env.NODE_ENV?II(27):"`builder.addCase` should only be called before calling `builder.addDefaultCase`")}const o="string"==typeof e?e:e.type;if(!o)throw new Error("production"===process.env.NODE_ENV?II(28):"`builder.addCase` cannot be called with an empty action type");if(o in t)throw new Error("production"===process.env.NODE_ENV?II(29):`\`builder.addCase\` cannot be called with two reducers for the same action type '${o}'`);return t[o]=a,i},addAsyncThunk(e,a){if("production"!==process.env.NODE_ENV&&r)throw new Error("production"===process.env.NODE_ENV?II(43):"`builder.addAsyncThunk` should only be called before calling `builder.addDefaultCase`");return a.pending&&(t[e.pending.type]=a.pending),a.rejected&&(t[e.rejected.type]=a.rejected),a.fulfilled&&(t[e.fulfilled.type]=a.fulfilled),a.settled&&n.push({matcher:e.settled,reducer:a.settled}),i},addMatcher(e,t){if("production"!==process.env.NODE_ENV&&r)throw new Error("production"===process.env.NODE_ENV?II(30):"`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");return n.push({matcher:e,reducer:t}),i},addDefaultCase(e){if("production"!==process.env.NODE_ENV&&r)throw new Error("production"===process.env.NODE_ENV?II(31):"`builder.addDefaultCase` can only be called once");return r=e,i}};return e(i),[t,n,r]}var XN=(e=21)=>{let t="",n=e;for(;n--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t},YN=Symbol.for("rtk-slice-createasyncthunk");function JN(e,t){return`${e}/${t}`}function ZN({creators:e}={}){var t;const n=null==(t=null==e?void 0:e.asyncThunk)?void 0:t[YN];return function(e){const{name:t,reducerPath:r=t}=e;if(!t)throw new Error("production"===process.env.NODE_ENV?II(11):"`name` is a required option for createSlice");"undefined"!=typeof process&&"development"===process.env.NODE_ENV&&void 0===e.initialState&&console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`");const i=("function"==typeof e.reducers?e.reducers(function(){function e(e,t){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer:e=>Object.assign({[e.name]:(...t)=>e(...t)}[e.name],{_reducerDefinitionType:"reducer"}),preparedReducer:(e,t)=>({_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:t}),asyncThunk:e}}()):e.reducers)||{},a=Object.keys(i),o={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(e,t){const n="string"==typeof e?e:e.type;if(!n)throw new Error("production"===process.env.NODE_ENV?II(12):"`context.addCase` cannot be called with an empty action type");if(n in o.sliceCaseReducersByType)throw new Error("production"===process.env.NODE_ENV?II(13):"`context.addCase` cannot be called with two reducers for the same action type: "+n);return o.sliceCaseReducersByType[n]=t,s},addMatcher:(e,t)=>(o.sliceMatchers.push({matcher:e,reducer:t}),s),exposeAction:(e,t)=>(o.actionCreators[e]=t,s),exposeCaseReducer:(e,t)=>(o.sliceCaseReducersByName[e]=t,s)};function A(){if("production"!==process.env.NODE_ENV&&"object"==typeof e.extraReducers)throw new Error("production"===process.env.NODE_ENV?II(14):"The object notation for `createSlice.extraReducers` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice");const[t={},n=[],r]="function"==typeof e.extraReducers?qN(e.extraReducers):[e.extraReducers],i={...t,...o.sliceCaseReducersByType};return function(e,t){if("production"!==process.env.NODE_ENV&&"object"==typeof t)throw new Error("production"===process.env.NODE_ENV?II(8):"The object notation for `createReducer` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer");let n,[r,i,a]=qN(t);if("function"==typeof e)n=()=>NN(e());else{const t=NN(e);n=()=>t}function o(e=n(),t){let o=[r[t.type],...i.filter(({matcher:e})=>e(t)).map(({reducer:e})=>e)];return 0===o.filter(e=>!!e).length&&(o=[a]),o.reduce((e,n)=>{if(n){if(EO(e)){const r=n(e,t);return void 0===r?e:r}if(kO(e))return CN(e,e=>n(e,t));{const r=n(e,t);if(void 0===r){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return r}}return e},e)}return o.getInitialState=n,o}(e.initialState,e=>{for(let t in i)e.addCase(t,i[t]);for(let t of o.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of n)e.addMatcher(t.matcher,t.reducer);r&&e.addDefaultCase(r)})}a.forEach(r=>{const a=i[r],o={reducerName:r,type:JN(t,r),createNotation:"function"==typeof e.reducers};!function(e){return"asyncThunk"===e._reducerDefinitionType}(a)?function({type:e,reducerName:t,createNotation:n},r,i){let a,o;if("reducer"in r){if(n&&!function(e){return"reducerWithPrepare"===e._reducerDefinitionType}(r))throw new Error("production"===process.env.NODE_ENV?II(17):"Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.");a=r.reducer,o=r.prepare}else a=r;i.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,o?QN(e,o):QN(e))}(o,a,s):function({type:e,reducerName:t},n,r,i){if(!i)throw new Error("production"===process.env.NODE_ENV?II(18):"Cannot use `create.asyncThunk` in the built-in `createSlice`. Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`.");const{payloadCreator:a,fulfilled:o,pending:s,rejected:A,settled:l,options:c}=n,u=i(e,a,c);r.exposeAction(t,u),o&&r.addCase(u.fulfilled,o);s&&r.addCase(u.pending,s);A&&r.addCase(u.rejected,A);l&&r.addMatcher(u.settled,l);r.exposeCaseReducer(t,{fulfilled:o||nI,pending:s||nI,rejected:A||nI,settled:l||nI})}(o,a,s,n)});const l=e=>e,c=new Map,u=new WeakMap;let d;function h(e,t){return d||(d=A()),d(e,t)}function p(){return d||(d=A()),d.getInitialState()}function f(t,n=!1){function r(e){let i=e[t];if(void 0===i)if(n)i=IN(u,r,p);else if("production"!==process.env.NODE_ENV)throw new Error("production"===process.env.NODE_ENV?II(15):"selectSlice returned undefined for an uninjected slice reducer");return i}function i(t=l){const r=IN(c,n,()=>new WeakMap);return IN(r,t,()=>{const r={};for(const[i,a]of Object.entries(e.selectors??{}))r[i]=eI(a,t,()=>IN(u,t,p),n);return r})}return{reducerPath:t,getSelectors:i,get selectors(){return i(r)},selectSlice:r}}const m={name:t,reducer:h,actions:o.actionCreators,caseReducers:o.sliceCaseReducersByName,getInitialState:p,...f(r),injectInto(e,{reducerPath:t,...n}={}){const i=t??r;return e.inject({reducerPath:i,reducer:h},n),{...m,...f(i,!0)}}};return m}}function eI(e,t,n,r){function i(i,...a){let o=t(i);if(void 0===o)if(r)o=n();else if("production"!==process.env.NODE_ENV)throw new Error("production"===process.env.NODE_ENV?II(16):"selectState returned undefined for an uninjected slice reducer");return e(o,...a)}return i.unwrapped=e,i}var tI=ZN();function nI(){}var rI="listener",iI="completed",aI="cancelled",oI=`task-${aI}`,sI=`task-${iI}`,AI=`${rI}-${aI}`,lI=`${rI}-${iI}`,cI=class{constructor(e){Se(this,"name","TaskAbortError"),Se(this,"message"),this.code=e,this.message=`task ${aI} (reason: ${e})`}},uI=(e,t)=>{if("function"!=typeof e)throw new TypeError("production"===process.env.NODE_ENV?II(32):`${t} is not a function`)},dI=()=>{},hI=(e,t=dI)=>(e.catch(t),e),pI=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),fI=e=>{if(e.aborted)throw new cI(e.reason)};function mI(e,t){let n=dI;return new Promise((r,i)=>{const a=()=>i(new cI(e.reason));e.aborted?a():(n=pI(e,a),t.finally(()=>n()).then(r,i))}).finally(()=>{n=dI})}var gI=e=>t=>hI(mI(e,t).then(t=>(fI(e),t))),yI=e=>{const t=gI(e);return e=>t(new Promise(t=>setTimeout(t,e)))},{assign:vI}=Object,wI={},xI="listenerMiddleware",bI=(e,t)=>(n,r)=>{uI(n,"taskExecutor");const i=new AbortController;var a;a=i,pI(e,()=>a.abort(e.reason));const o=(async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(n){return{status:n instanceof cI?"cancelled":"rejected",error:n}}finally{null==t||t()}})(async()=>{fI(e),fI(i.signal);const t=await n({pause:gI(i.signal),delay:yI(i.signal),signal:i.signal});return fI(i.signal),t},()=>i.abort(sI));return(null==r?void 0:r.autoJoin)&&t.push(o.catch(dI)),{result:gI(e)(o),cancel(){i.abort(oI)}}},BI=(e,t)=>(n,r)=>hI((async(n,r)=>{fI(t);let i=()=>{};const a=[new Promise((t,r)=>{let a=e({predicate:n,effect:(e,n)=>{n.unsubscribe(),t([e,n.getState(),n.getOriginalState()])}});i=()=>{a(),r()}})];null!=r&&a.push(new Promise(e=>setTimeout(e,r,null)));try{const e=await mI(t,Promise.race(a));return fI(t),e}finally{i()}})(n,r)),CI=e=>{let{type:t,actionCreator:n,matcher:r,predicate:i,effect:a}=e;if(t)i=QN(t).match;else if(n)t=n.type,i=n.match;else if(r)i=r;else if(!i)throw new Error("production"===process.env.NODE_ENV?II(21):"Creating or removing a listener requires one of the known fields for matching an action");return uI(a,"options.listener"),{predicate:i,type:t,effect:a}},EI=vI(e=>{const{type:t,predicate:n,effect:r}=CI(e);return{id:XN(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error("production"===process.env.NODE_ENV?II(22):"Unsubscribe not initialized")}}},{withTypes:()=>EI}),kI=(e,t)=>{const{type:n,effect:r,predicate:i}=CI(t);return Array.from(e.values()).find(e=>("string"==typeof n?e.type===n:e.predicate===i)&&e.effect===r)},SI=e=>{e.pending.forEach(e=>{e.abort(AI)})},FI=(e,t,n)=>{try{e(t,n)}catch(r){setTimeout(()=>{throw r},0)}},QI=vI(QN(`${xI}/add`),{withTypes:()=>QI}),jI=QN(`${xI}/removeAll`),UI=vI(QN(`${xI}/remove`),{withTypes:()=>UI}),OI=(...e)=>{console.error(`${xI}/error`,...e)},NI=(e={})=>{const t=new Map,n=new Map,{extra:r,onError:i=OI}=e;uI(i,"onError");const a=e=>(e=>(e.unsubscribe=()=>t.delete(e.id),t.set(e.id,e),t=>{e.unsubscribe(),(null==t?void 0:t.cancelActive)&&SI(e)}))(kI(t,e)??EI(e));vI(a,{withTypes:()=>a});const o=e=>{const n=kI(t,e);return n&&(n.unsubscribe(),e.cancelActive&&SI(n)),!!n};vI(o,{withTypes:()=>o});const s=async(e,o,s,A)=>{const l=new AbortController,c=BI(a,l.signal),u=[];try{e.pending.add(l),(e=>{const t=n.get(e)??0;n.set(e,t+1)})(e),await Promise.resolve(e.effect(o,vI({},s,{getOriginalState:A,condition:(e,t)=>c(e,t).then(Boolean),take:c,delay:yI(l.signal),pause:gI(l.signal),extra:r,signal:l.signal,fork:bI(l.signal,u),unsubscribe:e.unsubscribe,subscribe:()=>{t.set(e.id,e)},cancelActiveListeners:()=>{e.pending.forEach((e,t,n)=>{e!==l&&(e.abort(AI),n.delete(e))})},cancel:()=>{l.abort(AI),e.pending.delete(l)},throwIfCancelled:()=>{fI(l.signal)}})))}catch(d){d instanceof cI||FI(i,d,{raisedBy:"effect"})}finally{await Promise.all(u),l.abort(lI),(e=>{const t=n.get(e)??1;1===t?n.delete(e):n.set(e,t-1)})(e),e.pending.delete(l)}},A=((e,t)=>()=>{for(const e of t.keys())SI(e);e.clear()})(t,n);return{middleware:e=>n=>r=>{if(!uO(r))return n(r);if(QI.match(r))return a(r.payload);if(jI.match(r))return void A();if(UI.match(r))return o(r.payload);let l=e.getState();const c=()=>{if(l===wI)throw new Error("production"===process.env.NODE_ENV?II(23):`${xI}: getOriginalState can only be called synchronously`);return l};let u;try{if(u=n(r),t.size>0){const n=e.getState(),a=Array.from(t.values());for(const t of a){let a=!1;try{a=t.predicate(r,n,l)}catch(d){a=!1,FI(i,d,{raisedBy:"predicate"})}a&&s(t,r,e,c)}}}finally{l=wI}return u},startListening:a,stopListening:o,clearListeners:A}};function II(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var TI=tI({name:"chartLayout",initialState:{layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var n,r,i,a;e.margin.top=null!==(n=t.payload.top)&&void 0!==n?n:0,e.margin.right=null!==(r=t.payload.right)&&void 0!==r?r:0,e.margin.bottom=null!==(i=t.payload.bottom)&&void 0!==i?i:0,e.margin.left=null!==(a=t.payload.left)&&void 0!==a?a:0},setScale(e,t){e.scale=t.payload}}}),{setMargin:PI,setLayout:MI,setChartSize:DI,setScale:LI}=TI.actions,HI=TI.reducer;function _I(e,t,n){return Array.isArray(e)&&e&&t+n!==0?e.slice(t,n+1):e}function RI(e){return Number.isFinite(e)}function KI(e){return"number"==typeof e&&e>0&&Number.isFinite(e)}function zI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function VI(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zI(Object(n),!0).forEach(function(t){$I(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zI(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function $I(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WI(e,t,n){return RF(e)||RF(t)?n:TF(t)?FF(e,t,n):"function"==typeof t?t(e):n}var GI=(e,t)=>"horizontal"===e&&"xAxis"===t||"vertical"===e&&"yAxis"===t||"centric"===e&&"angleAxis"===t||"radial"===e&&"radiusAxis"===t,qI=(e,t,n,r)=>{if(r)return e.map(e=>e.coordinate);var i,a,o=e.map(e=>(e.coordinate===t&&(i=!0),e.coordinate===n&&(a=!0),e.coordinate));return i||o.push(t),a||o.push(n),o},XI=(e,t,n)=>{if(!e)return null;var{duplicateDomain:r,type:i,range:a,scale:o,realScaleType:s,isCategorical:A,categoricalDomain:l,tickCount:c,ticks:u,niceTicks:d,axisType:h}=e;if(!o)return null;var p="scaleBand"===s&&o.bandwidth?o.bandwidth()/2:2,f="category"===i&&o.bandwidth?o.bandwidth()/p:0;return f="angleAxis"===h&&a&&a.length>=2?2*UF(a[0]-a[1])*f:f,u||d?(u||d||[]).map((e,t)=>{var n=r?r.indexOf(e):e,i=o.map(n);return RI(i)?{coordinate:i+f,value:e,offset:f,index:t}:null}).filter(zF):A&&l?l.map((e,t)=>{var n=o.map(e);return RI(n)?{coordinate:n+f,value:e,index:t,offset:f}:null}).filter(zF):o.ticks&&null!=c?o.ticks(c).map((e,t)=>{var n=o.map(e);return RI(n)?{coordinate:n+f,value:e,index:t,offset:f}:null}).filter(zF):o.domain().map((e,t)=>{var n=o.map(e);return RI(n)?{coordinate:n+f,value:r?r[e]:e,index:t,offset:f}:null}).filter(zF)},YI={sign:e=>{var t,n=e.length;if(!(n<=0)){var r=null===(t=e[0])||void 0===t?void 0:t.length;if(!(null==r||r<=0))for(var i=0;i<r;++i)for(var a=0,o=0,s=0;s<n;++s){var A=e[s],l=null==A?void 0:A[i];if(null!=l){var c=l[1],u=l[0],d=OF(c)?u:c;d>=0?(l[0]=a,a+=d,l[1]=a):(l[0]=o,o+=d,l[1]=o)}}}},expand:function(e,t){if((r=e.length)>0){for(var n,r,i,a=0,o=e[0].length;a<o;++a){for(i=n=0;n<r;++n)i+=e[n][a][1]||0;if(i)for(n=0;n<r;++n)e[n][a][1]/=i}rF(e,t)}},none:rF,silhouette:function(e,t){if((n=e.length)>0){for(var n,r=0,i=e[t[0]],a=i.length;r<a;++r){for(var o=0,s=0;o<n;++o)s+=e[o][r][1]||0;i[r][1]+=i[r][0]=-s/2}rF(e,t)}},wiggle:function(e,t){if((i=e.length)>0&&(r=(n=e[t[0]]).length)>0){for(var n,r,i,a=0,o=1;o<r;++o){for(var s=0,A=0,l=0;s<i;++s){for(var c=e[t[s]],u=c[o][1]||0,d=(u-(c[o-1][1]||0))/2,h=0;h<s;++h){var p=e[t[h]];d+=(p[o][1]||0)-(p[o-1][1]||0)}A+=u,l+=d*u}n[o-1][1]+=n[o-1][0]=a,A&&(a-=l/A)}n[o-1][1]+=n[o-1][0]=a,rF(e,t)}},positive:e=>{var t,n=e.length;if(!(n<=0)){var r=null===(t=e[0])||void 0===t?void 0:t.length;if(!(null==r||r<=0))for(var i=0;i<r;++i)for(var a=0,o=0;o<n;++o){var s=e[o],A=null==s?void 0:s[i];if(null!=A){var l=OF(A[1])?A[0]:A[1];l>=0?(A[0]=a,a+=l,A[1]=a):(A[0]=0,A[1]=0)}}}}},JI=(e,t,n)=>{var r,i=null!==(r=YI[n])&&void 0!==r?r:rF,a=function(){var e=rS([]),t=iF,n=rF,r=aF;function i(i){var a,o,s=Array.from(e.apply(this,arguments),oF),A=s.length,l=-1;for(const e of i)for(a=0,++l;a<A;++a)(s[a][l]=[0,+r(e,s[a].key,l,i)]).data=e;for(a=0,o=mS(t(s));a<A;++a)s[o[a]].index=a;return n(s,o),s}return i.keys=function(t){return arguments.length?(e="function"==typeof t?t:rS(Array.from(t)),i):e},i.value=function(e){return arguments.length?(r="function"==typeof e?e:rS(+e),i):r},i.order=function(e){return arguments.length?(t=null==e?iF:"function"==typeof e?e:rS(Array.from(e)),i):t},i.offset=function(e){return arguments.length?(n=null==e?rF:e,i):n},i}().keys(t).value((e,t)=>Number(WI(e,t,0))).order(iF).offset(i),o=a(e);return o.forEach((n,r)=>{n.forEach((n,i)=>{var a=WI(e[i],t[r],0);Array.isArray(a)&&2===a.length&&IF(a[0])&&IF(a[1])&&(n[0]=a[0],n[1]=a[1])})}),o};function ZI(e){var{axis:t,ticks:n,bandSize:r,entry:i,index:a,dataKey:o}=e;if("category"===t.type){if(!t.allowDuplicatedCategory&&t.dataKey&&!RF(i[t.dataKey])){var s=_F(n,"value",i[t.dataKey]);if(s)return s.coordinate+r/2}return null!=n&&n[a]?n[a].coordinate+r/2:null}var A=WI(i,RF(o)?t.dataKey:o),l=t.scale.map(A);return IF(l)?l:null}var eT=e=>{var{axis:t,ticks:n,offset:r,bandSize:i,entry:a,index:o}=e;if("category"===t.type)return n[o]?n[o].coordinate+r:null;var s=WI(a,t.dataKey,t.scale.domain()[o]);if(RF(s))return null;var A=t.scale.map(s);return IF(A)?A-i/2+r:null},tT=(e,t,n)=>{var r;if(null!=e)return[(r=Object.keys(e).reduce((r,i)=>{var a=e[i];if(!a)return r;var{stackedData:o}=a,s=o.reduce((e,r)=>{var i,a=_I(r,t,n),o=(i=a.flat(2).filter(IF),[Math.min(...i),Math.max(...i)]);return RI(o[0])&&RI(o[1])?[Math.min(e[0],o[0]),Math.max(e[1],o[1])]:e},[1/0,-1/0]);return[Math.min(s[0],r[0]),Math.max(s[1],r[1])]},[1/0,-1/0]))[0]===1/0?0:r[0],r[1]===-1/0?0:r[1]]},nT=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,rT=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,iT=(e,t,n)=>{if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var i=XU(t,e=>e.coordinate),a=1/0,o=1,s=i.length;o<s;o++){var A=i[o],l=i[o-1];a=Math.min(((null==A?void 0:A.coordinate)||0)-((null==l?void 0:l.coordinate)||0),a)}return a===1/0?0:a}return n?void 0:0};function aT(e){var{tooltipEntrySettings:t,dataKey:n,payload:r,value:i,name:a}=e;return VI(VI({},t),{},{dataKey:n,payload:r,value:i,name:a})}function oT(e,t){return e?String(e):"string"==typeof t?t:void 0}var sT=e=>e.layout.width,AT=e=>e.layout.height,lT=e=>e.layout.scale,cT=e=>e.layout.margin,uT=kU(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),dT=kU(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),hT="data-recharts-item-index",pT="data-recharts-item-id";function fT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function mT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fT(Object(n),!0).forEach(function(t){gT(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fT(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function gT(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var yT,vT,wT,xT,bT,BT=kU([sT,AT,cT,e=>e.brush.height,function(e){return dT(e).reduce((e,t)=>"left"!==t.orientation||t.mirror||t.hide?e:e+("number"==typeof t.width?t.width:60),0)},function(e){return dT(e).reduce((e,t)=>"right"!==t.orientation||t.mirror||t.hide?e:e+("number"==typeof t.width?t.width:60),0)},function(e){return uT(e).reduce((e,t)=>"top"!==t.orientation||t.mirror||t.hide?e:e+t.height,0)},function(e){return uT(e).reduce((e,t)=>"bottom"!==t.orientation||t.mirror||t.hide?e:e+t.height,0)},YU,e=>e.legend.size],(e,t,n,r,i,a,o,s,A,l)=>{var c={left:(n.left||0)+i,right:(n.right||0)+a},u=mT(mT({},{top:(n.top||0)+o,bottom:(n.bottom||0)+s}),c),d=u.bottom;u.bottom+=r,u=((e,t,n)=>{if(t&&n){var{width:r,height:i}=n,{align:a,verticalAlign:o,layout:s}=t;if(("vertical"===s||"horizontal"===s&&"middle"===o)&&"center"!==a&&IF(e[a]))return VI(VI({},e),{},{[a]:e[a]+(r||0)});if(("horizontal"===s||"vertical"===s&&"center"===a)&&"middle"!==o&&IF(e[o]))return VI(VI({},e),{},{[o]:e[o]+(i||0)})}return e})(u,A,l);var h=e-u.left-u.right,p=t-u.top-u.bottom;return mT(mT({brushBottom:d},u),{},{width:Math.max(h,0),height:Math.max(p,0)})}),CT=kU(BT,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),ET=kU(sT,AT,(e,t)=>({x:0,y:0,width:e,height:t})),kT=Te.createContext(null),ST=()=>null!=Te.useContext(kT),FT=e=>{var{children:t}=e;return De.createElement(kT.Provider,{value:!0},t)},QT=e=>e.brush,jT=kU([QT,BT,cT],(e,t,n)=>({height:e.height,x:IF(e.x)?e.x:t.left,y:IF(e.y)?e.y:t.top+t.height+t.brushBottom-((null==n?void 0:n.bottom)||0),width:IF(e.width)?e.width:t.width})),UT={},OT={},NT={};function IT(){return yT||(yT=1,e=NT,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.debounce=function(e,t,{signal:n,edges:r}={}){let i,a=null;const o=null!=r&&r.includes("leading"),s=null==r||r.includes("trailing"),A=()=>{null!==a&&(e.apply(i,a),i=void 0,a=null)};let l=null;const c=()=>{null!=l&&clearTimeout(l),l=setTimeout(()=>{l=null,s&&A(),u()},t)},u=()=>{null!==l&&(clearTimeout(l),l=null),i=void 0,a=null},d=function(...e){if(null==n?void 0:n.aborted)return;i=this,a=e;const t=null==l;c(),o&&t&&A()};return d.schedule=c,d.cancel=u,d.flush=()=>{A()},null==n||n.addEventListener("abort",u,{once:!0}),d}),NT;var e}function TT(){return vT||(vT=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=IT();e.debounce=function(e,n=0,r={}){"object"!=typeof r&&(r={});const{leading:i=!1,trailing:a=!0,maxWait:o}=r,s=Array(2);let A;i&&(s[0]="leading"),a&&(s[1]="trailing");let l=null;const c=t.debounce(function(...t){A=e.apply(this,t),l=null},n,{edges:s}),u=function(...t){return null!=o&&(null===l&&(l=Date.now()),Date.now()-l>=o)?(A=e.apply(this,t),l=Date.now(),c.cancel(),c.schedule(),A):(c.apply(this,t),A)};return u.cancel=c.cancel,u.flush=()=>(c.flush(),A),u}}(OT)),OT}function PT(){return bT?xT:(bT=1,xT=(wT||(wT=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=TT();e.throttle=function(e,n=0,r={}){const{leading:i=!0,trailing:a=!0}=r;return t.debounce(e,n,{leading:i,maxWait:n,trailing:a})}}(UT)),UT).throttle)}const MT=ry(PT());var DT=function(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];if("undefined"!=typeof console&&console.warn&&(void 0===t&&console.warn("LogUtils requires an error message argument"),!e))if(void 0===t)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var a=0;console.warn(t.replace(/%s/g,()=>r[a++]))}},LT={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},HT=(e,t,n)=>{var{width:r=LT.width,height:i=LT.height,aspect:a,maxHeight:o}=n,s=NF(r)?e:Number(r),A=NF(i)?t:Number(i);return a&&a>0&&(s?A=s/a:A&&(s=A*a),o&&null!=A&&A>o&&(A=o)),{calculatedWidth:s,calculatedHeight:A}},_T={width:0,height:0,overflow:"visible"},RT={width:0,overflowX:"visible"},KT={height:0,overflowY:"visible"},zT={},VT=e=>{var{width:t,height:n}=e,r=NF(t),i=NF(n);return r&&i?_T:r?RT:i?KT:zT};function $T(){return $T=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},$T.apply(null,arguments)}function WT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function GT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?WT(Object(n),!0).forEach(function(t){qT(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WT(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function qT(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var XT=Te.createContext(LT.initialDimension);function YT(e){var{children:t,width:n,height:r}=e,i=Te.useMemo(()=>({width:n,height:r}),[n,r]);return function(e){return KI(e.width)&&KI(e.height)}(i)?De.createElement(XT.Provider,{value:i},t):null}var JT=()=>Te.useContext(XT),ZT=Te.forwardRef((e,t)=>{var{aspect:n,initialDimension:r=LT.initialDimension,width:i,height:a,minWidth:o=LT.minWidth,minHeight:s,maxHeight:A,children:l,debounce:c=LT.debounce,id:u,className:d,onResize:h,style:p={}}=e,f=Te.useRef(null),m=Te.useRef();m.current=h,Te.useImperativeHandle(t,()=>f.current);var[g,y]=Te.useState({containerWidth:r.width,containerHeight:r.height}),v=Te.useCallback((e,t)=>{y(n=>{var r=Math.round(e),i=Math.round(t);return n.containerWidth===r&&n.containerHeight===i?n:{containerWidth:r,containerHeight:i}})},[]);Te.useEffect(()=>{if(null==f.current||"undefined"==typeof ResizeObserver)return VF;var e=e=>{var t,n=e[0];if(null!=n){var{width:r,height:i}=n.contentRect;v(r,i),null===(t=m.current)||void 0===t||t.call(m,r,i)}};c>0&&(e=MT(e,c,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),{width:n,height:r}=f.current.getBoundingClientRect();return v(n,r),t.observe(f.current),()=>{t.disconnect()}},[v,c]);var{containerWidth:w,containerHeight:x}=g;DT(!n||n>0,"The aspect(%s) must be greater than zero.",n);var{calculatedWidth:b,calculatedHeight:B}=HT(w,x,{width:i,height:a,aspect:n,maxHeight:A});return DT(null!=b&&b>0||null!=B&&B>0,"The width(%s) and height(%s) of chart should be greater than 0,\n please check the style of container, or the props width(%s) and height(%s),\n or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the\n height and width.",b,B,i,a,o,s,n),De.createElement("div",{id:u?"".concat(u):void 0,className:yh("recharts-responsive-container",d),style:GT(GT({},p),{},{width:i,height:a,minWidth:o,minHeight:s,maxHeight:A}),ref:f},De.createElement("div",{style:VT({width:i,height:a})},De.createElement(YT,{width:b,height:B},l)))}),eP=Te.forwardRef((e,t)=>{var n=JT();if(KI(n.width)&&KI(n.height))return e.children;var{width:r,height:i}=function(e){var{width:t,height:n,aspect:r}=e,i=t,a=n;return void 0===i&&void 0===a?(i=LT.width,a=LT.height):void 0===i?i=r&&r>0?void 0:LT.width:void 0===a&&(a=r&&r>0?void 0:LT.height),{width:i,height:a}}({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:a,calculatedHeight:o}=HT(void 0,void 0,{width:r,height:i,aspect:e.aspect,maxHeight:e.maxHeight});return IF(a)&&IF(o)?De.createElement(YT,{width:a,height:o},e.children):De.createElement(ZT,$T({},e,{width:r,height:i,ref:t}))});function tP(e){if(e)return{x:e.x,y:e.y,upperWidth:"upperWidth"in e?e.upperWidth:e.width,lowerWidth:"lowerWidth"in e?e.lowerWidth:e.width,width:e.width,height:e.height}}var nP=()=>{var e,t=ST(),n=pU(CT),r=pU(jT),i=null===(e=pU(QT))||void 0===e?void 0:e.padding;return t&&r&&i?{width:r.width-i.left-i.right,height:r.height-i.top-i.bottom,x:i.left,y:i.top}:n},rP={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},iP=()=>{var e;return null!==(e=pU(BT))&&void 0!==e?e:rP},aP=()=>pU(sT),oP=()=>pU(AT),sP=e=>e.layout.layoutType,AP=()=>pU(sP),lP=()=>{var e=AP();if("horizontal"===e||"vertical"===e)return e},cP=e=>{var t=e.layout.layoutType;if("centric"===t||"radial"===t)return t},uP=e=>{var t=cU(),n=ST(),{width:r,height:i}=e,a=JT(),o=r,s=i;return a&&(o=a.width>0?a.width:r,s=a.height>0?a.height:i),Te.useEffect(()=>{!n&&KI(o)&&KI(s)&&t(DI({width:o,height:s}))},[t,n,o,s]),null},dP=Symbol.for("immer-nothing"),hP=Symbol.for("immer-draftable"),pP=Symbol.for("immer-state"),fP="production"!==process.env.NODE_ENV?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function mP(e,...t){if("production"!==process.env.NODE_ENV){const n=fP[e],r="function"==typeof n?n.apply(null,t):n;throw new Error(`[Immer] ${r}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var gP=Object.getPrototypeOf;function yP(e){return!!e&&!!e[pP]}function vP(e){var t;return!!e&&(bP(e)||Array.isArray(e)||!!e[hP]||!!(null==(t=e.constructor)?void 0:t[hP])||SP(e)||FP(e))}var wP=Object.prototype.constructor.toString(),xP=new WeakMap;function bP(e){if(!e||"object"!=typeof e)return!1;const t=Object.getPrototypeOf(e);if(null===t||t===Object.prototype)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(n===Object)return!0;if("function"!=typeof n)return!1;let r=xP.get(n);return void 0===r&&(r=Function.toString.call(n),xP.set(n,r)),r===wP}function BP(e,t,n=!0){if(0===CP(e)){(n?Reflect.ownKeys(e):Object.keys(e)).forEach(n=>{t(n,e[n],e)})}else e.forEach((n,r)=>t(r,n,e))}function CP(e){const t=e[pP];return t?t.type_:Array.isArray(e)?1:SP(e)?2:FP(e)?3:0}function EP(e,t){return 2===CP(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function kP(e,t,n){const r=CP(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function SP(e){return e instanceof Map}function FP(e){return e instanceof Set}function QP(e){return e.copy_||e.base_}function jP(e,t){if(SP(e))return new Map(e);if(FP(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=bP(e);if(!0===t||"class_only"===t&&!n){const t=Object.getOwnPropertyDescriptors(e);delete t[pP];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){const i=n[r],a=t[i];!1===a.writable&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(t[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[i]})}return Object.create(gP(e),t)}{const t=gP(e);if(null!==t&&n)return{...e};const r=Object.create(t);return Object.assign(r,e)}}function UP(e,t=!1){return NP(e)||yP(e)||!vP(e)||(CP(e)>1&&Object.defineProperties(e,{set:OP,add:OP,clear:OP,delete:OP}),Object.freeze(e),t&&Object.values(e).forEach(e=>UP(e,!0))),e}var OP={value:function(){mP(2)}};function NP(e){return null===e||"object"!=typeof e||Object.isFrozen(e)}var IP,TP={};function PP(e){const t=TP[e];return t||mP(0,e),t}function MP(){return IP}function DP(e,t){t&&(PP("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function LP(e){HP(e),e.drafts_.forEach(RP),e.drafts_=null}function HP(e){e===IP&&(IP=e.parent_)}function _P(e){return IP={drafts_:[],parent_:IP,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function RP(e){const t=e[pP];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function KP(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return void 0!==e&&e!==n?(n[pP].modified_&&(LP(t),mP(4)),vP(e)&&(e=zP(t,e),t.parent_||$P(t,e)),t.patches_&&PP("Patches").generateReplacementPatches_(n[pP].base_,e,t.patches_,t.inversePatches_)):e=zP(t,n,[]),LP(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==dP?e:void 0}function zP(e,t,n){if(NP(t))return t;const r=e.immer_.shouldUseStrictIteration(),i=t[pP];if(!i)return BP(t,(r,a)=>VP(e,i,t,r,a,n),r),t;if(i.scope_!==e)return t;if(!i.modified_)return $P(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const t=i.copy_;let a=t,o=!1;3===i.type_&&(a=new Set(t),t.clear(),o=!0),BP(a,(r,a)=>VP(e,i,t,r,a,n,o),r),$P(e,t,!1),n&&e.patches_&&PP("Patches").generatePatches_(i,n,e.patches_,e.inversePatches_)}return i.copy_}function VP(e,t,n,r,i,a,o){if(null==i)return;if("object"!=typeof i&&!o)return;const s=NP(i);if(!s||o){if("production"!==process.env.NODE_ENV&&i===n&&mP(5),yP(i)){const o=zP(e,i,a&&t&&3!==t.type_&&!EP(t.assigned_,r)?a.concat(r):void 0);if(kP(n,r,o),!yP(o))return;e.canAutoFreeze_=!1}else o&&n.add(i);if(vP(i)&&!s){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;if(t&&t.base_&&t.base_[r]===i&&s)return;zP(e,i),t&&t.scope_.parent_||"symbol"==typeof r||!(SP(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))||$P(e,i)}}}function $P(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&UP(t,n)}var WP={get(e,t){if(t===pP)return e;const n=QP(e);if(!EP(n,t))return function(e,t,n){var r;const i=XP(t,n);return i?"value"in i?i.value:null==(r=i.get)?void 0:r.call(e.draft_):void 0}(e,n,t);const r=n[t];return e.finalized_||!vP(r)?r:r===qP(e.base_,t)?(JP(e),e.copy_[t]=ZP(r,e)):r},has:(e,t)=>t in QP(e),ownKeys:e=>Reflect.ownKeys(QP(e)),set(e,t,n){const r=XP(QP(e),t);if(null==r?void 0:r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=qP(QP(e),t),o=null==r?void 0:r[pP];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(((i=n)===(a=r)?0!==i||1/i==1/a:i!=i&&a!=a)&&(void 0!==n||EP(e.base_,t)))return!0;JP(e),YP(e)}var i,a;return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==qP(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,JP(e),YP(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=QP(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty(){mP(11)},getPrototypeOf:e=>gP(e.base_),setPrototypeOf(){mP(12)}},GP={};function qP(e,t){const n=e[pP];return(n?QP(n):e)[t]}function XP(e,t){if(!(t in e))return;let n=gP(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=gP(n)}}function YP(e){e.modified_||(e.modified_=!0,e.parent_&&YP(e.parent_))}function JP(e){e.copy_||(e.copy_=jP(e.base_,e.scope_.immer_.useStrictShallowCopy_))}BP(WP,(e,t)=>{GP[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),GP.deleteProperty=function(e,t){return"production"!==process.env.NODE_ENV&&isNaN(parseInt(t))&&mP(13),GP.set.call(this,e,t,void 0)},GP.set=function(e,t,n){return"production"!==process.env.NODE_ENV&&"length"!==t&&isNaN(parseInt(t))&&mP(14),WP.set.call(this,e[0],t,n,e[0])};function ZP(e,t){const n=SP(e)?PP("MapSet").proxyMap_(e,t):FP(e)?PP("MapSet").proxySet_(e,t):function(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:MP(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,a=WP;n&&(i=[r],a=GP);const{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,s}(e,t);return(t?t.scope_:MP()).drafts_.push(n),n}function eM(e){if(!vP(e)||NP(e))return e;const t=e[pP];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=jP(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=jP(e,!0);return BP(n,(e,t)=>{kP(n,e,eM(t))},r),t&&(t.finalized_=!1),n}var tM=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(e,t,n)=>{if("function"==typeof e&&"function"!=typeof t){const n=t;t=e;const r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}let r;if("function"!=typeof t&&mP(6),void 0!==n&&"function"!=typeof n&&mP(7),vP(e)){const i=_P(this),a=ZP(e,void 0);let o=!0;try{r=t(a),o=!1}finally{o?LP(i):HP(i)}return DP(i,n),KP(r,i)}if(!e||"object"!=typeof e){if(r=t(e),void 0===r&&(r=e),r===dP&&(r=void 0),this.autoFreeze_&&UP(r,!0),n){const t=[],i=[];PP("Patches").generateReplacementPatches_(e,r,t,i),n(t,i)}return r}mP(1,e)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof(null==e?void 0:e.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),"boolean"==typeof(null==e?void 0:e.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){vP(e)||mP(8),yP(e)&&(e=function(e){yP(e)||mP(10,e);return eM(e)}(e));const t=_P(this),n=ZP(e,void 0);return n[pP].isManual_=!0,HP(t),n}finishDraft(e,t){const n=e&&e[pP];n&&n.isManual_||mP(9);const{scope_:r}=n;return DP(r,t),KP(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));const r=PP("Patches").applyPatches_;return yP(e)?r(e,t):this.produce(e,e=>r(e,t))}};tM.produce;var nM=tI({name:"legend",initialState:{settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter},addLegendPayload:{reducer(e,t){e.payload.push(t.payload)},prepare:VN()},replaceLegendPayload:{reducer(e,t){var{prev:n,next:r}=t.payload,i=xN(e).payload.indexOf(n);i>-1&&(e.payload[i]=r)},prepare:VN()},removeLegendPayload:{reducer(e,t){var n=xN(e).payload.indexOf(t.payload);n>-1&&e.payload.splice(n,1)},prepare:VN()}}}),{setLegendSize:rM,setLegendSettings:iM,addLegendPayload:aM,replaceLegendPayload:oM,removeLegendPayload:sM}=nM.actions,AM=nM.reducer,lM=["contextPayload"];function cM(){return cM=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},cM.apply(null,arguments)}function uM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function dM(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uM(Object(n),!0).forEach(function(t){hM(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uM(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function hM(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pM(e){return e.value}function fM(e){var{contextPayload:t}=e,n=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,lM),r=Wj(t,e.payloadUniqBy,pM),i=dM(dM({},n),{},{payload:r});return De.isValidElement(e.content)?De.cloneElement(e.content,i):"function"==typeof e.content?De.createElement(e.content,i):De.createElement(pQ,i)}function mM(e){var t=cU();return Te.useEffect(()=>{t(iM(e))},[t,e]),null}function gM(e){var t=cU();return Te.useEffect(()=>(t(rM(e)),()=>{t(rM({width:0,height:0}))}),[t,e]),null}var yM={align:"center",iconSize:14,inactiveColor:"#ccc",itemSorter:"value",layout:"horizontal",verticalAlign:"bottom"};function vM(e){var t=aQ(e,yM),n=pU(JU),r=Te.useContext(nS),i=pU(e=>e.layout.margin),{width:a,height:o,wrapperStyle:s,portal:A}=t,[l,c]=ZU([n]),u=aP(),d=oP();if(null==u||null==d)return null;var h=u-((null==i?void 0:i.left)||0)-((null==i?void 0:i.right)||0),p=function(e,t,n,r){return"vertical"===e&&null!=t?{height:t}:"horizontal"===e?{width:n||r}:null}(t.layout,o,a,h),f=A?s:dM(dM({position:"absolute",width:(null==p?void 0:p.width)||a||"auto",height:(null==p?void 0:p.height)||o||"auto"},function(e,t,n,r,i,a){var o,s,{layout:A,align:l,verticalAlign:c}=t;return e&&(void 0!==e.left&&null!==e.left||void 0!==e.right&&null!==e.right)||(o="center"===l&&"vertical"===A?{left:((r||0)-a.width)/2}:"right"===l?{right:n&&n.right||0}:{left:n&&n.left||0}),e&&(void 0!==e.top&&null!==e.top||void 0!==e.bottom&&null!==e.bottom)||(s="middle"===c?{top:((i||0)-a.height)/2}:"bottom"===c?{bottom:n&&n.bottom||0}:{top:n&&n.top||0}),dM(dM({},o),s)}(s,t,i,u,d,l)),s),m=null!=A?A:r;if(null==m||null==n)return null;var g=De.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:c},De.createElement(mM,{layout:t.layout,align:t.align,verticalAlign:t.verticalAlign,itemSorter:t.itemSorter}),!A&&De.createElement(gM,{width:l.width,height:l.height}),De.createElement(fM,cM({},t,p,{margin:i,chartWidth:u,chartHeight:d,contextPayload:n})));return Pe.createPortal(g,m)}function wM(){return wM=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},wM.apply(null,arguments)}function xM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function bM(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xM(Object(n),!0).forEach(function(t){BM(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xM(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function BM(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function CM(e){return Array.isArray(e)&&TF(e[0])&&TF(e[1])?e.join(" ~ "):e}vM.displayName="Legend";var EM={separator:" : ",contentStyle:{margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},itemStyle:{display:"block",paddingTop:4,paddingBottom:4,color:"#000"},labelStyle:{},accessibilityLayer:!1},kM=e=>{var{separator:t=EM.separator,contentStyle:n,itemStyle:r,labelStyle:i=EM.labelStyle,payload:a,formatter:o,itemSorter:s,wrapperClassName:A,labelClassName:l,label:c,labelFormatter:u,accessibilityLayer:d=EM.accessibilityLayer}=e,h=bM(bM({},EM.contentStyle),n),p=bM({margin:0},i),f=!RF(c),m=f?c:"",g=yh("recharts-default-tooltip",A),y=yh("recharts-tooltip-label",l);f&&u&&null!=a&&(m=u(c,a));var v=d?{role:"status","aria-live":"assertive"}:{};return De.createElement("div",wM({className:g,style:h},v),De.createElement("p",{className:y,style:p},De.isValidElement(m)?m:"".concat(m)),(()=>{if(a&&a.length){var e=(s?XU(a,s):a).map((e,n)=>{if("none"===e.type)return null;var i=e.formatter||o||CM,{value:s,name:A}=e,l=s,c=A;if(i){var u=i(s,A,e,n,a);if(Array.isArray(u))[l,c]=u;else{if(null==u)return null;l=u}}var d=bM(bM({},EM.itemStyle),{},{color:e.color||EM.itemStyle.color},r);return De.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(n),style:d},TF(c)?De.createElement("span",{className:"recharts-tooltip-item-name"},c):null,TF(c)?De.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,De.createElement("span",{className:"recharts-tooltip-item-value"},l),De.createElement("span",{className:"recharts-tooltip-item-unit"},e.unit||""))});return De.createElement("ul",{className:"recharts-tooltip-item-list",style:{padding:0,margin:0}},e)}return null})())},SM="recharts-tooltip-wrapper",FM={visibility:"hidden"};function QM(e){var{coordinate:t,translateX:n,translateY:r}=e;return yh(SM,{["".concat(SM,"-right")]:IF(n)&&t&&IF(t.x)&&n>=t.x,["".concat(SM,"-left")]:IF(n)&&t&&IF(t.x)&&n<t.x,["".concat(SM,"-bottom")]:IF(r)&&t&&IF(t.y)&&r>=t.y,["".concat(SM,"-top")]:IF(r)&&t&&IF(t.y)&&r<t.y})}function jM(e){var{allowEscapeViewBox:t,coordinate:n,key:r,offset:i,position:a,reverseDirection:o,tooltipDimension:s,viewBox:A,viewBoxDimension:l}=e;if(a&&IF(a[r]))return a[r];var c=n[r]-s-(i>0?i:0),u=n[r]+i;if(t[r])return o[r]?c:u;var d=A[r];return null==d?0:o[r]?c<d?Math.max(u,d):Math.max(c,d):null==l?0:u+s>d+l?Math.max(c,d):Math.max(u,d)}function UM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function OM(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?UM(Object(n),!0).forEach(function(t){NM(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UM(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function NM(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class IM extends Te.PureComponent{constructor(){super(...arguments),NM(this,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}),NM(this,"handleKeyDown",e=>{var t,n,r,i;"Escape"===e.key&&this.setState({dismissed:!0,dismissedAtCoordinate:{x:null!==(t=null===(n=this.props.coordinate)||void 0===n?void 0:n.x)&&void 0!==t?t:0,y:null!==(r=null===(i=this.props.coordinate)||void 0===i?void 0:i.y)&&void 0!==r?r:0}})})}componentDidMount(){document.addEventListener("keydown",this.handleKeyDown)}componentWillUnmount(){document.removeEventListener("keydown",this.handleKeyDown)}componentDidUpdate(){var e,t;this.state.dismissed&&((null===(e=this.props.coordinate)||void 0===e?void 0:e.x)===this.state.dismissedAtCoordinate.x&&(null===(t=this.props.coordinate)||void 0===t?void 0:t.y)===this.state.dismissedAtCoordinate.y||(this.state.dismissed=!1))}render(){var{active:e,allowEscapeViewBox:t,animationDuration:n,animationEasing:r,children:i,coordinate:a,hasPayload:o,isAnimationActive:s,offset:A,position:l,reverseDirection:c,useTranslate3d:u,viewBox:d,wrapperStyle:h,lastBoundingBox:p,innerRef:f,hasPortalFromProps:m}=this.props,g="number"==typeof A?A:A.x,y="number"==typeof A?A:A.y,{cssClasses:v,cssProperties:w}=function(e){var t,n,r,{allowEscapeViewBox:i,coordinate:a,offsetTop:o,offsetLeft:s,position:A,reverseDirection:l,tooltipBox:c,useTranslate3d:u,viewBox:d}=e;return t=c.height>0&&c.width>0&&a?function(e){var{translateX:t,translateY:n,useTranslate3d:r}=e;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}({translateX:n=jM({allowEscapeViewBox:i,coordinate:a,key:"x",offset:s,position:A,reverseDirection:l,tooltipDimension:c.width,viewBox:d,viewBoxDimension:d.width}),translateY:r=jM({allowEscapeViewBox:i,coordinate:a,key:"y",offset:o,position:A,reverseDirection:l,tooltipDimension:c.height,viewBox:d,viewBoxDimension:d.height}),useTranslate3d:u}):FM,{cssProperties:t,cssClasses:QM({translateX:n,translateY:r,coordinate:a})}}({allowEscapeViewBox:t,coordinate:a,offsetLeft:g,offsetTop:y,position:l,reverseDirection:c,tooltipBox:{height:p.height,width:p.width},useTranslate3d:u,viewBox:d}),x=m?{}:OM(OM({transition:s&&e?"transform ".concat(n,"ms ").concat(r):void 0},w),{},{pointerEvents:"none",visibility:!this.state.dismissed&&e&&o?"visible":"hidden",position:"absolute",top:0,left:0}),b=OM(OM({},x),{},{visibility:!this.state.dismissed&&e&&o?"visible":"hidden"},h);return De.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:v,style:b,ref:f},i)}}var TM=()=>{var e;return null===(e=pU(e=>e.rootProps.accessibilityLayer))||void 0===e||e};function PM(){return PM=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},PM.apply(null,arguments)}function MM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function DM(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?MM(Object(n),!0).forEach(function(t){LM(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):MM(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function LM(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var HM={curveBasisClosed:function(e){return new zS(e)},curveBasisOpen:function(e){return new VS(e)},curveBasis:function(e){return new KS(e)},curveBumpX:function(e){return new BS(e,!0)},curveBumpY:function(e){return new BS(e,!1)},curveLinearClosed:function(e){return new $S(e)},curveLinear:yS,curveMonotoneX:function(e){return new YS(e)},curveMonotoneY:function(e){return new JS(e)},curveNatural:function(e){return new eF(e)},curveStep:function(e){return new nF(e,.5)},curveStepAfter:function(e){return new nF(e,1)},curveStepBefore:function(e){return new nF(e,0)}},_M=e=>RI(e.x)&&RI(e.y),RM=e=>null!=e.base&&_M(e.base)&&_M(e),KM=e=>e.x,zM=e=>e.y,VM={connectNulls:!1,type:"linear"},$M=e=>{var{type:t=VM.type,points:n=[],baseLine:r,layout:i,connectNulls:a=VM.connectNulls}=e,o=((e,t)=>{if("function"==typeof e)return e;var n="curve".concat(KF(e));if(("curveMonotone"===n||"curveBump"===n)&&t){var r=HM["".concat(n).concat("vertical"===t?"Y":"X")];if(r)return r}return HM[n]||yS})(t,i),s=a?n.filter(_M):n;if(Array.isArray(r)){var A=n.map((e,t)=>DM(DM({},e),{},{base:r[t]}));return("vertical"===i?bS().y(zM).x1(KM).x0(e=>e.base.x):bS().x(KM).y1(zM).y0(e=>e.base.y)).defined(RM).curve(o)(a?A.filter(RM):A)}return("vertical"===i&&IF(r)?bS().y(zM).x1(KM).x0(r):IF(r)?bS().x(KM).y1(zM).y0(r):xS().x(KM).y(zM)).defined(_M).curve(o)(s)},WM=e=>{var{className:t,points:n,path:r,pathRef:i}=e,a=AP();if(!(n&&n.length||r))return null;var o={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||a,connectNulls:e.connectNulls},s=n&&n.length?$M(o):r;return De.createElement("path",PM({},Wk(e),tQ(e),{className:yh("recharts-curve",t),d:null===s?void 0:s,ref:i}))},GM=["x","y","top","left","width","height","className"];function qM(){return qM=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},qM.apply(null,arguments)}function XM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function YM(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var JM=(e,t,n,r,i,a)=>"M".concat(e,",").concat(i,"v").concat(r,"M").concat(a,",").concat(t,"h").concat(n),ZM=e=>{var{x:t=0,y:n=0,top:r=0,left:i=0,width:a=0,height:o=0,className:s}=e,A=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,GM),l=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?XM(Object(n),!0).forEach(function(t){YM(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XM(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({x:t,y:n,top:r,left:i,width:a,height:o},A);return IF(t)&&IF(n)&&IF(a)&&IF(o)&&IF(r)&&IF(i)?De.createElement("path",qM({},qk(l),{className:yh("recharts-cross",s),d:JM(t,n,a,o,r,i)})):null};function eD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function tD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eD(Object(n),!0).forEach(function(t){nD(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eD(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function nD(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var rD=(e,t,n)=>e.map(e=>{return"".concat((r=e,r.replace(/([A-Z])/g,e=>"-".concat(e.toLowerCase())))," ").concat(t,"ms ").concat(n);var r}).join(","),iD=(e,t)=>Object.keys(t).reduce((n,r)=>tD(tD({},n),{},{[r]:e(r,t[r])}),{});function aD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function oD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?aD(Object(n),!0).forEach(function(t){sD(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aD(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function sD(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var AD=(e,t,n)=>e+(t-e)*n,lD=e=>{var{from:t,to:n}=e;return t!==n},cD=(e,t,n)=>{var r=iD((t,n)=>{if(lD(n)){var[r,i]=e(n.from,n.to,n.velocity);return oD(oD({},n),{},{from:r,velocity:i})}return n},t);return n<1?iD((e,t)=>lD(t)&&null!=r[e]?oD(oD({},t),{},{velocity:AD(t.velocity,r[e].velocity,n),from:AD(t.from,r[e].from,n)}):t,t):cD(e,r,n-1)};function uD(e,t,n,r,i,a){var o,s=r.reduce((n,r)=>oD(oD({},n),{},{[r]:{from:e[r],velocity:0,to:t[r]}}),{}),A=null,l=r=>{o||(o=r);var c=(r-o)/n.dt;s=cD(n,s,c),i(oD(oD(oD({},e),t),iD((e,t)=>t.from,s))),o=r,Object.values(s).filter(lD).length&&(A=a.setTimeout(l))};return()=>(A=a.setTimeout(l),()=>{var e;null===(e=A)||void 0===e||e()})}const dD=(e,t,n,r,i,a)=>{var o,s,A=(o=e,s=t,[Object.keys(o),Object.keys(s)].reduce((e,t)=>e.filter(e=>t.includes(e))));return null==n?()=>(i(oD(oD({},e),t)),()=>{}):!0===n.isStepper?uD(e,t,n,A,i,a):function(e,t,n,r,i,a,o){var s,A=null,l=i.reduce((n,r)=>{var i=e[r],a=t[r];return null==i||null==a?n:oD(oD({},n),{},{[r]:[i,a]})},{}),c=i=>{s||(s=i);var u=(i-s)/r,d=iD((e,t)=>AD(...t,n(u)),l);if(a(oD(oD(oD({},e),t),d)),u<1)A=o.setTimeout(c);else{var h=iD((e,t)=>AD(...t,n(1)),l);a(oD(oD(oD({},e),t),h))}};return()=>(A=o.setTimeout(c),()=>{var e;null===(e=A)||void 0===e||e()})}(e,t,n,r,A,i,a)};var hD=1e-4,pD=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],fD=(e,t)=>e.map((e,n)=>e*t**n).reduce((e,t)=>e+t),mD=(e,t)=>n=>{var r=pD(e,t);return fD(r,n)},gD=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(1===t.length)switch(t[0]){case"linear":return[0,0,1,1];case"ease":return[.25,.1,.25,1];case"ease-in":return[.42,0,1,1];case"ease-out":return[.42,0,.58,1];case"ease-in-out":return[0,0,.58,1];default:var r=(e=>{var t,n=e.split("(");if(2!==n.length||"cubic-bezier"!==n[0])return null;var r=null===(t=n[1])||void 0===t||null===(t=t.split(")")[0])||void 0===t?void 0:t.split(",");if(null==r||4!==r.length)return null;var i=r.map(e=>parseFloat(e));return[i[0],i[1],i[2],i[3]]})(t[0]);if(r)return r}return 4===t.length?t:[0,0,1,1]},yD=(e,t,n,r)=>{var i,a,o=mD(e,n),s=mD(t,r),A=(i=e,a=n,e=>{var t=[...pD(i,a).map((e,t)=>e*t).slice(1),0];return fD(t,e)}),l=e=>e>1?1:e<0?0:e,c=e=>{for(var t=e>1?1:e,n=t,r=0;r<8;++r){var i=o(n)-t,a=A(n);if(Math.abs(i-t)<hD||a<hD)return s(n);n=l(n-i/a)}return s(n)};return c.isStepper=!1,c},vD=function(){return yD(...gD(...arguments))},wD=e=>{if("string"==typeof e)switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return vD(e);case"spring":return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{stiff:t=100,damping:n=8,dt:r=17}=e,i=(e,i,a)=>{var o=a+(-(e-i)*t-a*n)*r/1e3,s=a*r/1e3+e;return Math.abs(s-i)<hD&&Math.abs(o)<hD?[i,0]:[s,o]};return i.isStepper=!0,i.dt=r,i}();default:if("cubic-bezier"===e.split("(")[0])return vD(e)}return"function"==typeof e?e:null};class xD{setTimeout(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=performance.now(),r=null,i=a=>{a-n>=t?e(a):"function"==typeof requestAnimationFrame&&(r=requestAnimationFrame(i))};return r=requestAnimationFrame(i),()=>{null!=r&&cancelAnimationFrame(r)}}}function bD(){return e=new xD,t=()=>null,n=!1,r=null,i=a=>{if(!n){if(Array.isArray(a)){if(!a.length)return;var o=a,[s,...A]=o;return"number"==typeof s?void(r=e.setTimeout(i.bind(null,A),s)):(i(s),void(r=e.setTimeout(i.bind(null,A))))}"string"==typeof a&&t(a),"object"==typeof a&&t(a),"function"==typeof a&&a()}},{stop:()=>{n=!0},start:e=>{n=!1,r&&(r(),r=null),i(e)},subscribe:e=>(t=e,()=>{t=()=>null}),getTimeoutController:()=>e};var e,t,n,r,i}var BD=Te.createContext(bD);var CD=!("undefined"!=typeof window&&window.document&&Boolean(window.document.createElement)&&window.setTimeout),ED={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},kD={t:0},SD={t:1};function FD(e){var t,n,r,i=aQ(e,ED),{isActive:a,canBegin:o,duration:s,easing:A,begin:l,onAnimationEnd:c,onAnimationStart:u,children:d}=i,h="auto"===a?!CD:a,p=(t=i.animationId,n=i.animationManager,r=Te.useContext(BD),Te.useMemo(()=>null!=n?n:r(t),[t,n,r])),[f,m]=Te.useState(h?kD:SD),g=Te.useRef(null);return Te.useEffect(()=>{h||m(SD)},[h]),Te.useEffect(()=>{if(!h||!o)return VF;var e=dD(kD,SD,wD(A),s,m,p.getTimeoutController());return p.start([u,l,()=>{g.current=e()},s,c]),()=>{p.stop(),g.current&&g.current(),c()}},[h,o,s,A,l,u,c,p]),d(f.t)}function QD(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"animation-",n=Te.useRef(MF(t)),r=Te.useRef(e);return r.current!==e&&(n.current=MF(t),r.current=e),n.current}var jD,UD,OD,ND,ID,TD,PD,MD,DD,LD,HD=["radius"],_D=["radius"];function RD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function KD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?RD(Object(n),!0).forEach(function(t){zD(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RD(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function zD(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VD(){return VD=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},VD.apply(null,arguments)}function $D(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function WD(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var GD=(e,t,n,r,i)=>{var a,o=QF(n),s=QF(r),A=Math.min(Math.abs(o)/2,Math.abs(s)/2),l=s>=0?1:-1,c=o>=0?1:-1,u=s>=0&&o>=0||s<0&&o<0?1:0;if(A>0&&Array.isArray(i)){for(var d=[0,0,0,0],h=0;h<4;h++){var p,f=null!==(p=i[h])&&void 0!==p?p:0;d[h]=f>A?A:f}a=jF(jD||(jD=WD(["M",",",""])),e,t+l*d[0]),d[0]>0&&(a+=jF(UD||(UD=WD(["A ",",",",0,0,",",",",",""])),d[0],d[0],u,e+c*d[0],t)),a+=jF(OD||(OD=WD(["L ",",",""])),e+n-c*d[1],t),d[1]>0&&(a+=jF(ND||(ND=WD(["A ",",",",0,0,",",\n ",",",""])),d[1],d[1],u,e+n,t+l*d[1])),a+=jF(ID||(ID=WD(["L ",",",""])),e+n,t+r-l*d[2]),d[2]>0&&(a+=jF(TD||(TD=WD(["A ",",",",0,0,",",\n ",",",""])),d[2],d[2],u,e+n-c*d[2],t+r)),a+=jF(PD||(PD=WD(["L ",",",""])),e+c*d[3],t+r),d[3]>0&&(a+=jF(MD||(MD=WD(["A ",",",",0,0,",",\n ",",",""])),d[3],d[3],u,e,t+r-l*d[3])),a+="Z"}else if(A>0&&i===+i&&i>0){var m=Math.min(A,i);a=jF(DD||(DD=WD(["M ",",","\n A ",",",",0,0,",",",",","\n L ",",","\n A ",",",",0,0,",",",",","\n L ",",","\n A ",",",",0,0,",",",",","\n L ",",","\n A ",",",",0,0,",",",","," Z"])),e,t+l*m,m,m,u,e+c*m,t,e+n-c*m,t,m,m,u,e+n,t+l*m,e+n,t+r-l*m,m,m,u,e+n-c*m,t+r,e+c*m,t+r,m,m,u,e,t+r-l*m)}else a=jF(LD||(LD=WD(["M ",","," h "," v "," h "," Z"])),e,t,n,r,-n);return a},qD={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},XD=e=>{var t=aQ(e,qD),n=Te.useRef(null),[r,i]=Te.useState(-1);Te.useEffect(()=>{if(n.current&&n.current.getTotalLength)try{var e=n.current.getTotalLength();e&&i(e)}catch(t){}},[]);var{x:a,y:o,width:s,height:A,radius:l,className:c}=t,{animationEasing:u,animationDuration:d,animationBegin:h,isAnimationActive:p,isUpdateAnimationActive:f}=t,m=Te.useRef(s),g=Te.useRef(A),y=Te.useRef(a),v=Te.useRef(o),w=QD(Te.useMemo(()=>({x:a,y:o,width:s,height:A,radius:l}),[a,o,s,A,l]),"rectangle-");if(a!==+a||o!==+o||s!==+s||A!==+A||0===s||0===A)return null;var x=yh("recharts-rectangle",c);if(!f){var b=qk(t),{radius:B}=b,C=$D(b,HD);return De.createElement("path",VD({},C,{x:QF(a),y:QF(o),width:QF(s),height:QF(A),radius:"number"==typeof l?l:void 0,className:x,d:GD(a,o,s,A,l)}))}var E=m.current,k=g.current,S=y.current,F=v.current,Q="0px ".concat(-1===r?1:r,"px"),j="".concat(r,"px 0px"),U=rD(["strokeDasharray"],d,"string"==typeof u?u:qD.animationEasing);return De.createElement(FD,{animationId:w,key:w,canBegin:r>0,duration:d,easing:u,isActive:f,begin:h},e=>{var r,i=HF(E,s,e),c=HF(k,A,e),u=HF(S,a,e),d=HF(F,o,e);n.current&&(m.current=i,g.current=c,y.current=u,v.current=d),r=p?e>0?{transition:U,strokeDasharray:j}:{strokeDasharray:Q}:{strokeDasharray:j};var h=qk(t),{radius:f}=h,w=$D(h,_D);return De.createElement("path",VD({},w,{radius:"number"==typeof l?l:void 0,className:x,d:GD(u,d,i,c,l),ref:n,style:KD(KD({},r),t.style)}))})};function YD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function JD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?YD(Object(n),!0).forEach(function(t){ZD(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YD(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ZD(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var eL,tL,nL,rL,iL,aL,oL,sL=Math.PI/180,AL=e=>180*e/Math.PI,lL=(e,t,n,r)=>({x:e+Math.cos(-sL*r)*n,y:t+Math.sin(-sL*r)*n}),cL=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(e-(n.left||0)-(n.right||0)),Math.abs(t-(n.top||0)-(n.bottom||0)))/2},uL=(e,t)=>{var{x:n,y:r}=e,{cx:i,cy:a}=t,o=((e,t)=>{var{x:n,y:r}=e,{x:i,y:a}=t;return Math.sqrt((n-i)**2+(r-a)**2)})({x:n,y:r},{x:i,y:a});if(o<=0)return{radius:o,angle:0};var s=(n-i)/o,A=Math.acos(s);return r>a&&(A=2*Math.PI-A),{radius:o,angle:AL(A),angleInRadian:A}},dL=(e,t)=>{var{startAngle:n,endAngle:r}=t,i=Math.floor(n/360),a=Math.floor(r/360);return e+360*Math.min(i,a)},hL=(e,t)=>{var{chartX:n,chartY:r}=e,{radius:i,angle:a}=uL({x:n,y:r},t),{innerRadius:o,outerRadius:s}=t;if(i<o||i>s)return null;if(0===i)return null;var A,{startAngle:l,endAngle:c}=(e=>{var{startAngle:t,endAngle:n}=e,r=Math.floor(t/360),i=Math.floor(n/360),a=Math.min(r,i);return{startAngle:t-360*a,endAngle:n-360*a}})(t),u=a;if(l<=c){for(;u>c;)u-=360;for(;u<l;)u+=360;A=u>=l&&u<=c}else{for(;u>l;)u-=360;for(;u<c;)u+=360;A=u>=c&&u<=l}return A?JD(JD({},t),{},{radius:i,angle:dL(u,t)}):null};function pL(e){var{cx:t,cy:n,radius:r,startAngle:i,endAngle:a}=e;return{points:[lL(t,n,r,i),lL(t,n,r,a)],cx:t,cy:n,radius:r,startAngle:i,endAngle:a}}function fL(){return fL=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},fL.apply(null,arguments)}function mL(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var gL=e=>{var{cx:t,cy:n,radius:r,angle:i,sign:a,isExternal:o,cornerRadius:s,cornerIsExternal:A}=e,l=s*(o?1:-1)+r,c=Math.asin(s/l)/sL,u=A?i:i+a*c,d=A?i-a*c:i;return{center:lL(t,n,l,u),circleTangency:lL(t,n,r,u),lineTangency:lL(t,n,l*Math.cos(c*sL),d),theta:c}},yL=e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:i,startAngle:a,endAngle:o}=e,s=((e,t)=>UF(t-e)*Math.min(Math.abs(t-e),359.999))(a,o),A=a+s,l=lL(t,n,i,a),c=lL(t,n,i,A),u=jF(eL||(eL=mL(["M ",",","\n A ",",",",0,\n ",",",",\n ",",","\n "])),l.x,l.y,i,i,+(Math.abs(s)>180),+(a>A),c.x,c.y);if(r>0){var d=lL(t,n,r,a),h=lL(t,n,r,A);u+=jF(tL||(tL=mL(["L ",",","\n A ",",",",0,\n ",",",",\n ",","," Z"])),h.x,h.y,r,r,+(Math.abs(s)>180),+(a<=A),d.x,d.y)}else u+=jF(nL||(nL=mL(["L ",","," Z"])),t,n);return u},vL={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},wL=e=>{var t=aQ(e,vL),{cx:n,cy:r,innerRadius:i,outerRadius:a,cornerRadius:o,forceCornerRadius:s,cornerIsExternal:A,startAngle:l,endAngle:c,className:u}=t;if(a<i||l===c)return null;var d,h=yh("recharts-sector",u),p=a-i,f=DF(o,p,0,!0);return d=f>0&&Math.abs(l-c)<360?(e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:i,cornerRadius:a,forceCornerRadius:o,cornerIsExternal:s,startAngle:A,endAngle:l}=e,c=UF(l-A),{circleTangency:u,lineTangency:d,theta:h}=gL({cx:t,cy:n,radius:i,angle:A,sign:c,cornerRadius:a,cornerIsExternal:s}),{circleTangency:p,lineTangency:f,theta:m}=gL({cx:t,cy:n,radius:i,angle:l,sign:-c,cornerRadius:a,cornerIsExternal:s}),g=s?Math.abs(A-l):Math.abs(A-l)-h-m;if(g<0)return o?jF(rL||(rL=mL(["M ",",","\n a",",",",0,0,1,",",0\n a",",",",0,0,1,",",0\n "])),d.x,d.y,a,a,2*a,a,a,2*-a):yL({cx:t,cy:n,innerRadius:r,outerRadius:i,startAngle:A,endAngle:l});var y=jF(iL||(iL=mL(["M ",",","\n A",",",",0,0,",",",",","\n A",",",",0,",",",",",",","\n A",",",",0,0,",",",",","\n "])),d.x,d.y,a,a,+(c<0),u.x,u.y,i,i,+(g>180),+(c<0),p.x,p.y,a,a,+(c<0),f.x,f.y);if(r>0){var{circleTangency:v,lineTangency:w,theta:x}=gL({cx:t,cy:n,radius:r,angle:A,sign:c,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),{circleTangency:b,lineTangency:B,theta:C}=gL({cx:t,cy:n,radius:r,angle:l,sign:-c,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),E=s?Math.abs(A-l):Math.abs(A-l)-x-C;if(E<0&&0===a)return"".concat(y,"L").concat(t,",").concat(n,"Z");y+=jF(aL||(aL=mL(["L",",","\n A",",",",0,0,",",",",","\n A",",",",0,",",",",",",","\n A",",",",0,0,",",",",","Z"])),B.x,B.y,a,a,+(c<0),b.x,b.y,r,r,+(E>180),+(c>0),v.x,v.y,a,a,+(c<0),w.x,w.y)}else y+=jF(oL||(oL=mL(["L",",","Z"])),t,n);return y})({cx:n,cy:r,innerRadius:i,outerRadius:a,cornerRadius:Math.min(f,p/2),forceCornerRadius:s,cornerIsExternal:A,startAngle:l,endAngle:c}):yL({cx:n,cy:r,innerRadius:i,outerRadius:a,startAngle:l,endAngle:c}),De.createElement("path",fL({},qk(t),{className:h,d:d}))};function xL(e,t,n){if("horizontal"===e)return[{x:t.x,y:n.top},{x:t.x,y:n.top+n.height}];if("vertical"===e)return[{x:n.left,y:t.y},{x:n.left+n.width,y:t.y}];if(eQ(t)){if("centric"===e){var{cx:r,cy:i,innerRadius:a,outerRadius:o,angle:s}=t,A=lL(r,i,a,s),l=lL(r,i,o,s);return[{x:A.x,y:A.y},{x:l.x,y:l.y}]}return pL(t)}}var bL,BL,CL,EL,kL,SL={},FL={},QL={};function jL(){return bL||(bL=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=MU();e.toNumber=function(e){return t.isSymbol(e)?NaN:Number(e)}}(QL)),QL}function UL(){return BL||(BL=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=jL();e.toFinite=function(e){if(!e)return 0===e?e:0;if((e=t.toNumber(e))===1/0||e===-1/0){return(e<0?-1:1)*Number.MAX_VALUE}return e==e?e:0}}(FL)),FL}function OL(){return kL?EL:(kL=1,EL=(CL||(CL=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=GU(),n=UL();e.range=function(e,r,i){i&&"number"!=typeof i&&t.isIterateeCall(e,r,i)&&(r=i=void 0),e=n.toFinite(e),void 0===r?(r=e,e=0):r=n.toFinite(r),i=void 0===i?e<r?1:-1:n.toFinite(i);const a=Math.max(Math.ceil((r-e)/(i||1)),0),o=new Array(a);for(let t=0;t<a;t++)o[t]=e,e+=i;return o}}(SL)),SL).range)}const NL=ry(OL());function IL(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function TL(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function PL(e){let t,n,r;function i(e,r,i=0,a=e.length){if(i<a){if(0!==t(r,r))return a;do{const t=i+a>>>1;n(e[t],r)<0?i=t+1:a=t}while(i<a)}return i}return 2!==e.length?(t=IL,n=(t,n)=>IL(e(t),n),r=(t,n)=>e(t)-n):(t=e===IL||e===TL?e:ML,n=e,r=e),{left:i,center:function(e,t,n=0,a=e.length){const o=i(e,t,n,a-1);return o>n&&r(e[o-1],t)>-r(e[o],t)?o-1:o},right:function(e,r,i=0,a=e.length){if(i<a){if(0!==t(r,r))return a;do{const t=i+a>>>1;n(e[t],r)<=0?i=t+1:a=t}while(i<a)}return i}}}function ML(){return 0}function DL(e){return null===e?NaN:+e}const LL=PL(IL).right;PL(DL).center;class HL extends Map{constructor(e,t=RL){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[n,r]of e)this.set(n,r)}get(e){return super.get(_L(this,e))}has(e){return super.has(_L(this,e))}set(e,t){return super.set(function({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}(this,e),t)}delete(e){return super.delete(function({_intern:e,_key:t},n){const r=t(n);e.has(r)&&(n=e.get(r),e.delete(r));return n}(this,e))}}function _L({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function RL(e){return null!==e&&"object"==typeof e?e.valueOf():e}function KL(e,t){return(null==e||!(e>=e))-(null==t||!(t>=t))||(e<t?-1:e>t?1:0)}const zL=Math.sqrt(50),VL=Math.sqrt(10),$L=Math.sqrt(2);function WL(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),o=a>=zL?10:a>=VL?5:a>=$L?2:1;let s,A,l;return i<0?(l=Math.pow(10,-i)/o,s=Math.round(e*l),A=Math.round(t*l),s/l<e&&++s,A/l>t&&--A,l=-l):(l=Math.pow(10,i)*o,s=Math.round(e/l),A=Math.round(t/l),s*l<e&&++s,A*l>t&&--A),A<s&&.5<=n&&n<2?WL(e,t,2*n):[s,A,l]}function GL(e,t,n){if(!((n=+n)>0))return[];if((e=+e)===(t=+t))return[e];const r=t<e,[i,a,o]=r?WL(t,e,n):WL(e,t,n);if(!(a>=i))return[];const s=a-i+1,A=new Array(s);if(r)if(o<0)for(let l=0;l<s;++l)A[l]=(a-l)/-o;else for(let l=0;l<s;++l)A[l]=(a-l)*o;else if(o<0)for(let l=0;l<s;++l)A[l]=(i+l)/-o;else for(let l=0;l<s;++l)A[l]=(i+l)*o;return A}function qL(e,t,n){return WL(e=+e,t=+t,n=+n)[2]}function XL(e,t,n){n=+n;const r=(t=+t)<(e=+e),i=r?qL(t,e,n):qL(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function YL(e,t){let n;for(const r of e)null!=r&&(n<r||void 0===n&&r>=r)&&(n=r);return n}function JL(e,t){let n;for(const r of e)null!=r&&(n>r||void 0===n&&r>=r)&&(n=r);return n}function ZL(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=void 0===i?KL:function(e=IL){if(e===IL)return KL;if("function"!=typeof e)throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||0===r?r:(0===e(n,n))-(0===e(t,t))}}(i);r>n;){if(r-n>600){const a=r-n+1,o=t-n+1,s=Math.log(a),A=.5*Math.exp(2*s/3),l=.5*Math.sqrt(s*A*(a-A)/a)*(o-a/2<0?-1:1);ZL(e,t,Math.max(n,Math.floor(t-o*A/a+l)),Math.min(r,Math.floor(t+(a-o)*A/a+l)),i)}const a=e[t];let o=n,s=r;for(eH(e,n,t),i(e[r],a)>0&&eH(e,n,r);o<s;){for(eH(e,o,s),++o,--s;i(e[o],a)<0;)++o;for(;i(e[s],a)>0;)--s}0===i(e[n],a)?eH(e,n,s):(++s,eH(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function eH(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function tH(e,t,n=DL){if((r=e.length)&&!isNaN(t=+t)){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,a=Math.floor(i),o=+n(e[a],a,e);return o+(+n(e[a+1],a+1,e)-o)*(i-a)}}function nH(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function rH(e,t){switch(arguments.length){case 0:break;case 1:"function"==typeof e?this.interpolator(e):this.range(e);break;default:this.domain(e),"function"==typeof t?this.interpolator(t):this.range(t)}return this}const iH=Symbol("implicit");function aH(){var e=new HL,t=[],n=[],r=iH;function i(i){let a=e.get(i);if(void 0===a){if(r!==iH)return r;e.set(i,a=t.push(i)-1)}return n[a%n.length]}return i.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new HL;for(const r of n)e.has(r)||e.set(r,t.push(r)-1);return i},i.range=function(e){return arguments.length?(n=Array.from(e),i):n.slice()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return aH(t,n).unknown(r)},nH.apply(i,arguments),i}function oH(){var e,t,n=aH().unknown(void 0),r=n.domain,i=n.range,a=0,o=1,s=!1,A=0,l=0,c=.5;function u(){var n=r().length,u=o<a,d=u?o:a,h=u?a:o;e=(h-d)/Math.max(1,n-A+2*l),s&&(e=Math.floor(e)),d+=(h-d-e*(n-A))*c,t=e*(1-A),s&&(d=Math.round(d),t=Math.round(t));var p=function(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((t-e)/n)),a=new Array(i);++r<i;)a[r]=e+r*n;return a}(n).map(function(t){return d+e*t});return i(u?p.reverse():p)}return delete n.unknown,n.domain=function(e){return arguments.length?(r(e),u()):r()},n.range=function(e){return arguments.length?([a,o]=e,a=+a,o=+o,u()):[a,o]},n.rangeRound=function(e){return[a,o]=e,a=+a,o=+o,s=!0,u()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(s=!!e,u()):s},n.padding=function(e){return arguments.length?(A=Math.min(1,l=+e),u()):A},n.paddingInner=function(e){return arguments.length?(A=Math.min(1,e),u()):A},n.paddingOuter=function(e){return arguments.length?(l=+e,u()):l},n.align=function(e){return arguments.length?(c=Math.max(0,Math.min(1,e)),u()):c},n.copy=function(){return oH(r(),[a,o]).round(s).paddingInner(A).paddingOuter(l).align(c)},nH.apply(u(),arguments)}function sH(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return sH(t())},e}function AH(){return sH(oH.apply(null,arguments).paddingInner(1))}function lH(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function cH(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function uH(){}var dH=.7,hH=1/dH,pH="\\s*([+-]?\\d+)\\s*",fH="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",mH="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",gH=/^#([0-9a-f]{3,8})$/,yH=new RegExp(`^rgb\\(${pH},${pH},${pH}\\)$`),vH=new RegExp(`^rgb\\(${mH},${mH},${mH}\\)$`),wH=new RegExp(`^rgba\\(${pH},${pH},${pH},${fH}\\)$`),xH=new RegExp(`^rgba\\(${mH},${mH},${mH},${fH}\\)$`),bH=new RegExp(`^hsl\\(${fH},${mH},${mH}\\)$`),BH=new RegExp(`^hsla\\(${fH},${mH},${mH},${fH}\\)$`),CH={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function EH(){return this.rgb().formatHex()}function kH(){return this.rgb().formatRgb()}function SH(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=gH.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?FH(t):3===n?new UH(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?QH(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?QH(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=yH.exec(e))?new UH(t[1],t[2],t[3],1):(t=vH.exec(e))?new UH(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=wH.exec(e))?QH(t[1],t[2],t[3],t[4]):(t=xH.exec(e))?QH(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=bH.exec(e))?MH(t[1],t[2]/100,t[3]/100,1):(t=BH.exec(e))?MH(t[1],t[2]/100,t[3]/100,t[4]):CH.hasOwnProperty(e)?FH(CH[e]):"transparent"===e?new UH(NaN,NaN,NaN,0):null}function FH(e){return new UH(e>>16&255,e>>8&255,255&e,1)}function QH(e,t,n,r){return r<=0&&(e=t=n=NaN),new UH(e,t,n,r)}function jH(e,t,n,r){return 1===arguments.length?((i=e)instanceof uH||(i=SH(i)),i?new UH((i=i.rgb()).r,i.g,i.b,i.opacity):new UH):new UH(e,t,n,null==r?1:r);var i}function UH(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function OH(){return`#${PH(this.r)}${PH(this.g)}${PH(this.b)}`}function NH(){const e=IH(this.opacity);return`${1===e?"rgb(":"rgba("}${TH(this.r)}, ${TH(this.g)}, ${TH(this.b)}${1===e?")":`, ${e})`}`}function IH(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function TH(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function PH(e){return((e=TH(e))<16?"0":"")+e.toString(16)}function MH(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new LH(e,t,n,r)}function DH(e){if(e instanceof LH)return new LH(e.h,e.s,e.l,e.opacity);if(e instanceof uH||(e=SH(e)),!e)return new LH;if(e instanceof LH)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,A=(a+i)/2;return s?(o=t===a?(n-r)/s+6*(n<r):n===a?(r-t)/s+2:(t-n)/s+4,s/=A<.5?a+i:2-a-i,o*=60):s=A>0&&A<1?0:o,new LH(o,s,A,e.opacity)}function LH(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function HH(e){return(e=(e||0)%360)<0?e+360:e}function _H(e){return Math.max(0,Math.min(1,e||0))}function RH(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}lH(uH,SH,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:EH,formatHex:EH,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return DH(this).formatHsl()},formatRgb:kH,toString:kH}),lH(UH,jH,cH(uH,{brighter(e){return e=null==e?hH:Math.pow(hH,e),new UH(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?dH:Math.pow(dH,e),new UH(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new UH(TH(this.r),TH(this.g),TH(this.b),IH(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:OH,formatHex:OH,formatHex8:function(){return`#${PH(this.r)}${PH(this.g)}${PH(this.b)}${PH(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:NH,toString:NH})),lH(LH,function(e,t,n,r){return 1===arguments.length?DH(e):new LH(e,t,n,null==r?1:r)},cH(uH,{brighter(e){return e=null==e?hH:Math.pow(hH,e),new LH(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?dH:Math.pow(dH,e),new LH(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new UH(RH(e>=240?e-240:e+120,i,r),RH(e,i,r),RH(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new LH(HH(this.h),_H(this.s),_H(this.l),IH(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=IH(this.opacity);return`${1===e?"hsl(":"hsla("}${HH(this.h)}, ${100*_H(this.s)}%, ${100*_H(this.l)}%${1===e?")":`, ${e})`}`}}));const KH=e=>()=>e;function zH(e){return 1===(e=+e)?VH:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):KH(isNaN(t)?n:t)}}function VH(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):KH(isNaN(e)?t:e)}const $H=function e(t){var n=zH(t);function r(e,t){var r=n((e=jH(e)).r,(t=jH(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=VH(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+""}}return r.gamma=e,r}(1);function WH(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,i=t.slice();return function(a){for(n=0;n<r;++n)i[n]=e[n]*(1-a)+t[n]*a;return i}}function GH(e,t){var n,r=t?t.length:0,i=e?Math.min(r,e.length):0,a=new Array(i),o=new Array(r);for(n=0;n<i;++n)a[n]=t_(e[n],t[n]);for(;n<r;++n)o[n]=t[n];return function(e){for(n=0;n<i;++n)o[n]=a[n](e);return o}}function qH(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function XH(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function YH(e,t){var n,r={},i={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=t_(e[n],t[n]):i[n]=t[n];return function(e){for(n in r)i[n]=r[n](e);return i}}var JH=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ZH=new RegExp(JH.source,"g");function e_(e,t){var n,r,i,a=JH.lastIndex=ZH.lastIndex=0,o=-1,s=[],A=[];for(e+="",t+="";(n=JH.exec(e))&&(r=ZH.exec(t));)(i=r.index)>a&&(i=t.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,A.push({i:o,x:XH(n,r)})),a=ZH.lastIndex;return a<t.length&&(i=t.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length<2?A[0]?function(e){return function(t){return e(t)+""}}(A[0].x):function(e){return function(){return e}}(t):(t=A.length,function(e){for(var n,r=0;r<t;++r)s[(n=A[r]).i]=n.x(e);return s.join("")})}function t_(e,t){var n,r,i=typeof t;return null==t||"boolean"===i?KH(t):("number"===i?XH:"string"===i?(n=SH(t))?(t=n,$H):e_:t instanceof SH?$H:t instanceof Date?qH:(r=t,!ArrayBuffer.isView(r)||r instanceof DataView?Array.isArray(t)?GH:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?YH:XH:WH))(e,t)}function n_(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function r_(e){return+e}var i_=[0,1];function a_(e){return e}function o_(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:(n=isNaN(t)?NaN:.5,function(){return n});var n}function s_(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=o_(i,r),a=n(o,a)):(r=o_(r,i),a=n(a,o)),function(e){return a(r(e))}}function A_(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),a=new Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=o_(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(t){var n=LL(e,t,1,r)-1;return a[n](i[n](t))}}function l_(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function c_(){var e,t,n,r,i,a,o=i_,s=i_,A=t_,l=a_;function c(){var e,t,n,A=Math.min(o.length,s.length);return l!==a_&&(e=o[0],t=o[A-1],e>t&&(n=e,e=t,t=n),l=function(n){return Math.max(e,Math.min(t,n))}),r=A>2?A_:s_,i=a=null,u}function u(t){return null==t||isNaN(t=+t)?n:(i||(i=r(o.map(e),s,A)))(e(l(t)))}return u.invert=function(n){return l(t((a||(a=r(s,o.map(e),XH)))(n)))},u.domain=function(e){return arguments.length?(o=Array.from(e,r_),c()):o.slice()},u.range=function(e){return arguments.length?(s=Array.from(e),c()):s.slice()},u.rangeRound=function(e){return s=Array.from(e),A=n_,c()},u.clamp=function(e){return arguments.length?(l=!!e||a_,c()):l!==a_},u.interpolate=function(e){return arguments.length?(A=e,c()):A},u.unknown=function(e){return arguments.length?(n=e,u):n},function(n,r){return e=n,t=r,c()}}function u_(){return c_()(a_,a_)}function d_(e,t){if(!isFinite(e)||0===e)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function h_(e){return(e=d_(Math.abs(e)))?e[1]:NaN}var p_,f_=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function m_(e){if(!(t=f_.exec(e)))throw new Error("invalid format: "+e);var t;return new g_({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function g_(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function y_(e,t){var n=d_(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}m_.prototype=g_.prototype,g_.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const v_={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>y_(100*e,t),r:y_,s:function(e,t){var n=d_(e,t);if(!n)return p_=void 0,e.toPrecision(t);var r=n[0],i=n[1],a=i-(p_=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+d_(e,Math.max(0,t+a-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function w_(e){return e}var x_,b_,B_,C_=Array.prototype.map,E_=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function k_(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?w_:(t=C_.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var i=e.length,a=[],o=0,s=t[0],A=0;i>0&&s>0&&(A+s+1>r&&(s=Math.max(1,r-A)),a.push(e.substring(i-=s,i+s)),!((A+=s+1)>r));)s=t[o=(o+1)%t.length];return a.reverse().join(n)}),i=void 0===e.currency?"":e.currency[0]+"",a=void 0===e.currency?"":e.currency[1]+"",o=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?w_:function(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}(C_.call(e.numerals,String)),A=void 0===e.percent?"%":e.percent+"",l=void 0===e.minus?"−":e.minus+"",c=void 0===e.nan?"NaN":e.nan+"";function u(e,t){var n=(e=m_(e)).fill,u=e.align,d=e.sign,h=e.symbol,p=e.zero,f=e.width,m=e.comma,g=e.precision,y=e.trim,v=e.type;"n"===v?(m=!0,v="g"):v_[v]||(void 0===g&&(g=12),y=!0,v="g"),(p||"0"===n&&"="===u)&&(p=!0,n="0",u="=");var w=(t&&void 0!==t.prefix?t.prefix:"")+("$"===h?i:"#"===h&&/[boxX]/.test(v)?"0"+v.toLowerCase():""),x=("$"===h?a:/[%p]/.test(v)?A:"")+(t&&void 0!==t.suffix?t.suffix:""),b=v_[v],B=/[defgprs%]/.test(v);function C(e){var t,i,a,A=w,h=x;if("c"===v)h=b(e)+h,e="";else{var C=(e=+e)<0||1/e<0;if(e=isNaN(e)?c:b(Math.abs(e),g),y&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r<n;++r)switch(e[r]){case".":i=t=r;break;case"0":0===i&&(i=r),t=r;break;default:if(!+e[r])break e;i>0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),C&&0===+e&&"+"!==d&&(C=!1),A=(C?"("===d?d:l:"-"===d||"("===d?"":d)+A,h=("s"!==v||isNaN(e)||void 0===p_?"":E_[8+p_/3])+h+(C&&"("===d?")":""),B)for(t=-1,i=e.length;++t<i;)if(48>(a=e.charCodeAt(t))||a>57){h=(46===a?o+e.slice(t+1):e.slice(t))+h,e=e.slice(0,t);break}}m&&!p&&(e=r(e,1/0));var E=A.length+e.length+h.length,k=E<f?new Array(f-E+1).join(n):"";switch(m&&p&&(e=r(k+e,k.length?f-h.length:1/0),k=""),u){case"<":e=A+e+h+k;break;case"=":e=A+k+e+h;break;case"^":e=k.slice(0,E=k.length>>1)+A+e+h+k.slice(E);break;default:e=k+A+e+h}return s(e)}return g=void 0===g?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),C.toString=function(){return e+""},C}return{format:u,formatPrefix:function(e,t){var n=3*Math.max(-8,Math.min(8,Math.floor(h_(t)/3))),r=Math.pow(10,-n),i=u(((e=m_(e)).type="f",e),{suffix:E_[8+n/3]});return function(e){return i(r*e)}}}}function S_(e,t,n,r){var i,a=XL(e,t,n);switch((r=m_(null==r?",f":r)).type){case"s":var o=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(i=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(h_(t)/3)))-h_(Math.abs(e)))}(a,o))||(r.precision=i),B_(r,o);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,h_(t)-h_(e))+1}(a,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(e){return Math.max(0,-h_(Math.abs(e)))}(a))||(r.precision=i-2*("%"===r.type))}return b_(r)}function F_(e){var t=e.domain;return e.ticks=function(e){var n=t();return GL(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return S_(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,i,a=t(),o=0,s=a.length-1,A=a[o],l=a[s],c=10;for(l<A&&(i=A,A=l,l=i,i=o,o=s,s=i);c-- >0;){if((i=qL(A,l,n))===r)return a[o]=A,a[s]=l,t(a);if(i>0)A=Math.floor(A/i)*i,l=Math.ceil(l/i)*i;else{if(!(i<0))break;A=Math.ceil(A*i)/i,l=Math.floor(l*i)/i}r=i}return e},e}function Q_(e,t){var n,r=0,i=(e=e.slice()).length-1,a=e[r],o=e[i];return o<a&&(n=r,r=i,i=n,n=a,a=o,o=n),e[r]=t.floor(a),e[i]=t.ceil(o),e}function j_(e){return Math.log(e)}function U_(e){return Math.exp(e)}function O_(e){return-Math.log(-e)}function N_(e){return-Math.exp(-e)}function I_(e){return isFinite(e)?+("1e"+e):e<0?0:e}function T_(e){return(t,n)=>-e(-t,n)}function P_(e){const t=e(j_,U_),n=t.domain;let r,i,a=10;function o(){return r=function(e){return e===Math.E?Math.log:10===e&&Math.log10||2===e&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}(a),i=function(e){return 10===e?I_:e===Math.E?Math.exp:t=>Math.pow(e,t)}(a),n()[0]<0?(r=T_(r),i=T_(i),e(O_,N_)):e(j_,U_),t}return t.base=function(e){return arguments.length?(a=+e,o()):a},t.domain=function(e){return arguments.length?(n(e),o()):n()},t.ticks=e=>{const t=n();let o=t[0],s=t[t.length-1];const A=s<o;A&&([o,s]=[s,o]);let l,c,u=r(o),d=r(s);const h=null==e?10:+e;let p=[];if(!(a%1)&&d-u<h){if(u=Math.floor(u),d=Math.ceil(d),o>0){for(;u<=d;++u)for(l=1;l<a;++l)if(c=u<0?l/i(-u):l*i(u),!(c<o)){if(c>s)break;p.push(c)}}else for(;u<=d;++u)for(l=a-1;l>=1;--l)if(c=u>0?l/i(-u):l*i(u),!(c<o)){if(c>s)break;p.push(c)}2*p.length<h&&(p=GL(o,s,h))}else p=GL(u,d,Math.min(d-u,h)).map(i);return A?p.reverse():p},t.tickFormat=(e,n)=>{if(null==e&&(e=10),null==n&&(n=10===a?"s":","),"function"!=typeof n&&(a%1||null!=(n=m_(n)).precision||(n.trim=!0),n=b_(n)),e===1/0)return n;const o=Math.max(1,a*e/t.ticks().length);return e=>{let t=e/i(Math.round(r(e)));return t*a<a-.5&&(t*=a),t<=o?n(e):""}},t.nice=()=>n(Q_(n(),{floor:e=>i(Math.floor(r(e))),ceil:e=>i(Math.ceil(r(e)))})),t}function M_(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function D_(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function L_(e){var t=1,n=e(M_(t),D_(t));return n.constant=function(n){return arguments.length?e(M_(t=+n),D_(t)):t},F_(n)}function H_(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function __(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function R_(e){return e<0?-e*e:e*e}function K_(e){var t=e(a_,a_),n=1;return t.exponent=function(t){return arguments.length?1===(n=+t)?e(a_,a_):.5===n?e(__,R_):e(H_(n),H_(1/n)):n},F_(t)}function z_(){var e=K_(c_());return e.copy=function(){return l_(e,z_()).exponent(e.exponent())},nH.apply(e,arguments),e}function V_(e){return Math.sign(e)*e*e}x_=k_({thousands:",",grouping:[3],currency:["$",""]}),b_=x_.format,B_=x_.formatPrefix;const $_=new Date,W_=new Date;function G_(e,t,n,r){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{const t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),null==n?1:Math.floor(n)),e),i.range=(n,r,a)=>{const o=[];if(n=i.ceil(n),a=null==a?1:Math.floor(a),!(n<r&&a>0))return o;let s;do{o.push(s=new Date(+n)),t(n,a),e(n)}while(s<n&&n<r);return o},i.filter=n=>G_(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}),n&&(i.count=(t,r)=>($_.setTime(+t),W_.setTime(+r),e($_),e(W_),Math.floor(n($_,W_))),i.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?t=>r(t)%e===0:t=>i.count(0,t)%e===0):i:null)),i}const q_=G_(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);q_.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?G_(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):q_:null),q_.range;const X_=1e3,Y_=6e4,J_=36e5,Z_=864e5,eR=6048e5,tR=2592e6,nR=31536e6,rR=G_(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*X_)},(e,t)=>(t-e)/X_,e=>e.getUTCSeconds());rR.range;const iR=G_(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*X_)},(e,t)=>{e.setTime(+e+t*Y_)},(e,t)=>(t-e)/Y_,e=>e.getMinutes());iR.range;const aR=G_(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Y_)},(e,t)=>(t-e)/Y_,e=>e.getUTCMinutes());aR.range;const oR=G_(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*X_-e.getMinutes()*Y_)},(e,t)=>{e.setTime(+e+t*J_)},(e,t)=>(t-e)/J_,e=>e.getHours());oR.range;const sR=G_(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*J_)},(e,t)=>(t-e)/J_,e=>e.getUTCHours());sR.range;const AR=G_(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Y_)/Z_,e=>e.getDate()-1);AR.range;const lR=G_(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Z_,e=>e.getUTCDate()-1);lR.range;const cR=G_(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Z_,e=>Math.floor(e/Z_));function uR(e){return G_(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+7*t)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Y_)/eR)}cR.range;const dR=uR(0),hR=uR(1),pR=uR(2),fR=uR(3),mR=uR(4),gR=uR(5),yR=uR(6);function vR(e){return G_(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)},(e,t)=>(t-e)/eR)}dR.range,hR.range,pR.range,fR.range,mR.range,gR.range,yR.range;const wR=vR(0),xR=vR(1),bR=vR(2),BR=vR(3),CR=vR(4),ER=vR(5),kR=vR(6);wR.range,xR.range,bR.range,BR.range,CR.range,ER.range,kR.range;const SR=G_(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear()),e=>e.getMonth());SR.range;const FR=G_(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear()),e=>e.getUTCMonth());FR.range;const QR=G_(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());QR.every=e=>isFinite(e=Math.floor(e))&&e>0?G_(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}):null,QR.range;const jR=G_(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());function UR(e,t,n,r,i,a){const o=[[rR,1,X_],[rR,5,5e3],[rR,15,15e3],[rR,30,3e4],[a,1,Y_],[a,5,3e5],[a,15,9e5],[a,30,18e5],[i,1,J_],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,Z_],[r,2,1728e5],[n,1,eR],[t,1,tR],[t,3,7776e6],[e,1,nR]];function s(t,n,r){const i=Math.abs(n-t)/r,a=PL(([,,e])=>e).right(o,i);if(a===o.length)return e.every(XL(t/nR,n/nR,r));if(0===a)return q_.every(Math.max(XL(t,n,r),1));const[s,A]=o[i/o[a-1][2]<o[a][2]/i?a-1:a];return s.every(A)}return[function(e,t,n){const r=t<e;r&&([e,t]=[t,e]);const i=n&&"function"==typeof n.range?n:s(e,t,n),a=i?i.range(e,+t+1):[];return r?a.reverse():a},s]}jR.every=e=>isFinite(e=Math.floor(e))&&e>0?G_(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}):null,jR.range;const[OR,NR]=UR(jR,FR,wR,cR,sR,aR),[IR,TR]=UR(QR,SR,dR,AR,oR,iR);function PR(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function MR(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function DR(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}var LR,HR,_R,RR={"-":"",_:" ",0:"0"},KR=/^\s*\d+/,zR=/^%/,VR=/[\\^$*+?|[\]().{}]/g;function $R(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(t)+i:i)}function WR(e){return e.replace(VR,"\\$&")}function GR(e){return new RegExp("^(?:"+e.map(WR).join("|")+")","i")}function qR(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function XR(e,t,n){var r=KR.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function YR(e,t,n){var r=KR.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function JR(e,t,n){var r=KR.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function ZR(e,t,n){var r=KR.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function eK(e,t,n){var r=KR.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function tK(e,t,n){var r=KR.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function nK(e,t,n){var r=KR.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function rK(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function iK(e,t,n){var r=KR.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function aK(e,t,n){var r=KR.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function oK(e,t,n){var r=KR.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function sK(e,t,n){var r=KR.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function AK(e,t,n){var r=KR.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function lK(e,t,n){var r=KR.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function cK(e,t,n){var r=KR.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function uK(e,t,n){var r=KR.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function dK(e,t,n){var r=KR.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function hK(e,t,n){var r=zR.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function pK(e,t,n){var r=KR.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function fK(e,t,n){var r=KR.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function mK(e,t){return $R(e.getDate(),t,2)}function gK(e,t){return $R(e.getHours(),t,2)}function yK(e,t){return $R(e.getHours()%12||12,t,2)}function vK(e,t){return $R(1+AR.count(QR(e),e),t,3)}function wK(e,t){return $R(e.getMilliseconds(),t,3)}function xK(e,t){return wK(e,t)+"000"}function bK(e,t){return $R(e.getMonth()+1,t,2)}function BK(e,t){return $R(e.getMinutes(),t,2)}function CK(e,t){return $R(e.getSeconds(),t,2)}function EK(e){var t=e.getDay();return 0===t?7:t}function kK(e,t){return $R(dR.count(QR(e)-1,e),t,2)}function SK(e){var t=e.getDay();return t>=4||0===t?mR(e):mR.ceil(e)}function FK(e,t){return e=SK(e),$R(mR.count(QR(e),e)+(4===QR(e).getDay()),t,2)}function QK(e){return e.getDay()}function jK(e,t){return $R(hR.count(QR(e)-1,e),t,2)}function UK(e,t){return $R(e.getFullYear()%100,t,2)}function OK(e,t){return $R((e=SK(e)).getFullYear()%100,t,2)}function NK(e,t){return $R(e.getFullYear()%1e4,t,4)}function IK(e,t){var n=e.getDay();return $R((e=n>=4||0===n?mR(e):mR.ceil(e)).getFullYear()%1e4,t,4)}function TK(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+$R(t/60|0,"0",2)+$R(t%60,"0",2)}function PK(e,t){return $R(e.getUTCDate(),t,2)}function MK(e,t){return $R(e.getUTCHours(),t,2)}function DK(e,t){return $R(e.getUTCHours()%12||12,t,2)}function LK(e,t){return $R(1+lR.count(jR(e),e),t,3)}function HK(e,t){return $R(e.getUTCMilliseconds(),t,3)}function _K(e,t){return HK(e,t)+"000"}function RK(e,t){return $R(e.getUTCMonth()+1,t,2)}function KK(e,t){return $R(e.getUTCMinutes(),t,2)}function zK(e,t){return $R(e.getUTCSeconds(),t,2)}function VK(e){var t=e.getUTCDay();return 0===t?7:t}function $K(e,t){return $R(wR.count(jR(e)-1,e),t,2)}function WK(e){var t=e.getUTCDay();return t>=4||0===t?CR(e):CR.ceil(e)}function GK(e,t){return e=WK(e),$R(CR.count(jR(e),e)+(4===jR(e).getUTCDay()),t,2)}function qK(e){return e.getUTCDay()}function XK(e,t){return $R(xR.count(jR(e)-1,e),t,2)}function YK(e,t){return $R(e.getUTCFullYear()%100,t,2)}function JK(e,t){return $R((e=WK(e)).getUTCFullYear()%100,t,2)}function ZK(e,t){return $R(e.getUTCFullYear()%1e4,t,4)}function ez(e,t){var n=e.getUTCDay();return $R((e=n>=4||0===n?CR(e):CR.ceil(e)).getUTCFullYear()%1e4,t,4)}function tz(){return"+0000"}function nz(){return"%"}function rz(e){return+e}function iz(e){return Math.floor(+e/1e3)}function az(e){return new Date(e)}function oz(e){return e instanceof Date?+e:+new Date(+e)}function sz(e,t,n,r,i,a,o,s,A,l){var c=u_(),u=c.invert,d=c.domain,h=l(".%L"),p=l(":%S"),f=l("%I:%M"),m=l("%I %p"),g=l("%a %d"),y=l("%b %d"),v=l("%B"),w=l("%Y");function x(e){return(A(e)<e?h:s(e)<e?p:o(e)<e?f:a(e)<e?m:r(e)<e?i(e)<e?g:y:n(e)<e?v:w)(e)}return c.invert=function(e){return new Date(u(e))},c.domain=function(e){return arguments.length?d(Array.from(e,oz)):d().map(az)},c.ticks=function(t){var n=d();return e(n[0],n[n.length-1],null==t?10:t)},c.tickFormat=function(e,t){return null==t?x:l(t)},c.nice=function(e){var n=d();return e&&"function"==typeof e.range||(e=t(n[0],n[n.length-1],null==e?10:e)),e?d(Q_(n,e)):c},c.copy=function(){return l_(c,sz(e,t,n,r,i,a,o,s,A,l))},c}function Az(){var e,t,n,r,i,a=0,o=1,s=a_,A=!1;function l(t){return null==t||isNaN(t=+t)?i:s(0===n?.5:(t=(r(t)-e)*n,A?Math.max(0,Math.min(1,t)):t))}function c(e){return function(t){var n,r;return arguments.length?([n,r]=t,s=e(n,r),l):[s(0),s(1)]}}return l.domain=function(i){return arguments.length?([a,o]=i,e=r(a=+a),t=r(o=+o),n=e===t?0:1/(t-e),l):[a,o]},l.clamp=function(e){return arguments.length?(A=!!e,l):A},l.interpolator=function(e){return arguments.length?(s=e,l):s},l.range=c(t_),l.rangeRound=c(n_),l.unknown=function(e){return arguments.length?(i=e,l):i},function(i){return r=i,e=i(a),t=i(o),n=e===t?0:1/(t-e),l}}function lz(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function cz(){var e=K_(Az());return e.copy=function(){return lz(e,cz()).exponent(e.exponent())},rH.apply(e,arguments)}function uz(){var e,t,n,r,i,a,o,s=0,A=.5,l=1,c=1,u=a_,d=!1;function h(e){return isNaN(e=+e)?o:(e=.5+((e=+a(e))-t)*(c*e<c*t?r:i),u(d?Math.max(0,Math.min(1,e)):e))}function p(e){return function(t){var n,r,i;return arguments.length?([n,r,i]=t,u=function(e,t){void 0===t&&(t=e,e=t_);for(var n=0,r=t.length-1,i=t[0],a=new Array(r<0?0:r);n<r;)a[n]=e(i,i=t[++n]);return function(e){var t=Math.max(0,Math.min(r-1,Math.floor(e*=r)));return a[t](e-t)}}(e,[n,r,i]),h):[u(0),u(.5),u(1)]}}return h.domain=function(o){return arguments.length?([s,A,l]=o,e=a(s=+s),t=a(A=+A),n=a(l=+l),r=e===t?0:.5/(t-e),i=t===n?0:.5/(n-t),c=t<e?-1:1,h):[s,A,l]},h.clamp=function(e){return arguments.length?(d=!!e,h):d},h.interpolator=function(e){return arguments.length?(u=e,h):u},h.range=p(t_),h.rangeRound=p(n_),h.unknown=function(e){return arguments.length?(o=e,h):o},function(o){return a=o,e=o(s),t=o(A),n=o(l),r=e===t?0:.5/(t-e),i=t===n?0:.5/(n-t),c=t<e?-1:1,h}}function dz(){var e=K_(uz());return e.copy=function(){return lz(e,dz()).exponent(e.exponent())},rH.apply(e,arguments)}!function(e){LR=function(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,A=e.shortMonths,l=GR(i),c=qR(i),u=GR(a),d=qR(a),h=GR(o),p=qR(o),f=GR(s),m=qR(s),g=GR(A),y=qR(A),v={a:function(e){return o[e.getDay()]},A:function(e){return a[e.getDay()]},b:function(e){return A[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:mK,e:mK,f:xK,g:OK,G:IK,H:gK,I:yK,j:vK,L:wK,m:bK,M:BK,p:function(e){return i[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:rz,s:iz,S:CK,u:EK,U:kK,V:FK,w:QK,W:jK,x:null,X:null,y:UK,Y:NK,Z:TK,"%":nz},w={a:function(e){return o[e.getUTCDay()]},A:function(e){return a[e.getUTCDay()]},b:function(e){return A[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:PK,e:PK,f:_K,g:JK,G:ez,H:MK,I:DK,j:LK,L:HK,m:RK,M:KK,p:function(e){return i[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:rz,s:iz,S:zK,u:VK,U:$K,V:GK,w:qK,W:XK,x:null,X:null,y:YK,Y:ZK,Z:tz,"%":nz},x={a:function(e,t,n){var r=h.exec(t.slice(n));return r?(e.w=p.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){var r=u.exec(t.slice(n));return r?(e.w=d.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){var r=g.exec(t.slice(n));return r?(e.m=y.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){var r=f.exec(t.slice(n));return r?(e.m=m.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,n,r){return C(e,t,n,r)},d:oK,e:oK,f:dK,g:nK,G:tK,H:AK,I:AK,j:sK,L:uK,m:aK,M:lK,p:function(e,t,n){var r=l.exec(t.slice(n));return r?(e.p=c.get(r[0].toLowerCase()),n+r[0].length):-1},q:iK,Q:pK,s:fK,S:cK,u:YR,U:JR,V:ZR,w:XR,W:eK,x:function(e,t,r){return C(e,n,t,r)},X:function(e,t,n){return C(e,r,t,n)},y:nK,Y:tK,Z:rK,"%":hK};function b(e,t){return function(n){var r,i,a,o=[],s=-1,A=0,l=e.length;for(n instanceof Date||(n=new Date(+n));++s<l;)37===e.charCodeAt(s)&&(o.push(e.slice(A,s)),null!=(i=RR[r=e.charAt(++s)])?r=e.charAt(++s):i="e"===r?" ":"0",(a=t[r])&&(r=a(n,i)),o.push(r),A=s+1);return o.push(e.slice(A,s)),o.join("")}}function B(e,t){return function(n){var r,i,a=DR(1900,void 0,1);if(C(a,e,n+="",0)!=n.length)return null;if("Q"in a)return new Date(a.Q);if("s"in a)return new Date(1e3*a.s+("L"in a?a.L:0));if(t&&!("Z"in a)&&(a.Z=0),"p"in a&&(a.H=a.H%12+12*a.p),void 0===a.m&&(a.m="q"in a?a.q:0),"V"in a){if(a.V<1||a.V>53)return null;"w"in a||(a.w=1),"Z"in a?(i=(r=MR(DR(a.y,0,1))).getUTCDay(),r=i>4||0===i?xR.ceil(r):xR(r),r=lR.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(i=(r=PR(DR(a.y,0,1))).getDay(),r=i>4||0===i?hR.ceil(r):hR(r),r=AR.offset(r,7*(a.V-1)),a.y=r.getFullYear(),a.m=r.getMonth(),a.d=r.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),i="Z"in a?MR(DR(a.y,0,1)).getUTCDay():PR(DR(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(i+5)%7:a.w+7*a.U-(i+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,MR(a)):PR(a)}}function C(e,t,n,r){for(var i,a,o=0,s=t.length,A=n.length;o<s;){if(r>=A)return-1;if(37===(i=t.charCodeAt(o++))){if(i=t.charAt(o++),!(a=x[i in RR?t.charAt(o++):i])||(r=a(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return v.x=b(n,v),v.X=b(r,v),v.c=b(t,v),w.x=b(n,w),w.X=b(r,w),w.c=b(t,w),{format:function(e){var t=b(e+="",v);return t.toString=function(){return e},t},parse:function(e){var t=B(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=b(e+="",w);return t.toString=function(){return e},t},utcParse:function(e){var t=B(e+="",!0);return t.toString=function(){return e},t}}}(e),HR=LR.format,LR.parse,_R=LR.utcFormat,LR.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});const hz=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:oH,scaleDiverging:function e(){var t=F_(uz()(a_));return t.copy=function(){return lz(t,e())},rH.apply(t,arguments)},scaleDivergingLog:function e(){var t=P_(uz()).domain([.1,1,10]);return t.copy=function(){return lz(t,e()).base(t.base())},rH.apply(t,arguments)},scaleDivergingPow:dz,scaleDivergingSqrt:function(){return dz.apply(null,arguments).exponent(.5)},scaleDivergingSymlog:function e(){var t=L_(uz());return t.copy=function(){return lz(t,e()).constant(t.constant())},rH.apply(t,arguments)},scaleIdentity:function e(t){var n;function r(e){return null==e||isNaN(e=+e)?n:e}return r.invert=r,r.domain=r.range=function(e){return arguments.length?(t=Array.from(e,r_),r):t.slice()},r.unknown=function(e){return arguments.length?(n=e,r):n},r.copy=function(){return e(t).unknown(n)},t=arguments.length?Array.from(t,r_):[0,1],F_(r)},scaleImplicit:iH,scaleLinear:function e(){var t=u_();return t.copy=function(){return l_(t,e())},nH.apply(t,arguments),F_(t)},scaleLog:function e(){const t=P_(c_()).domain([1,10]);return t.copy=()=>l_(t,e()).base(t.base()),nH.apply(t,arguments),t},scaleOrdinal:aH,scalePoint:AH,scalePow:z_,scaleQuantile:function e(){var t,n=[],r=[],i=[];function a(){var e=0,t=Math.max(1,r.length);for(i=new Array(t-1);++e<t;)i[e-1]=tH(n,e/t);return o}function o(e){return null==e||isNaN(e=+e)?t:r[LL(i,e)]}return o.invertExtent=function(e){var t=r.indexOf(e);return t<0?[NaN,NaN]:[t>0?i[t-1]:n[0],t<i.length?i[t]:n[n.length-1]]},o.domain=function(e){if(!arguments.length)return n.slice();n=[];for(let t of e)null==t||isNaN(t=+t)||n.push(t);return n.sort(IL),a()},o.range=function(e){return arguments.length?(r=Array.from(e),a()):r.slice()},o.unknown=function(e){return arguments.length?(t=e,o):t},o.quantiles=function(){return i.slice()},o.copy=function(){return e().domain(n).range(r).unknown(t)},nH.apply(o,arguments)},scaleQuantize:function e(){var t,n=0,r=1,i=1,a=[.5],o=[0,1];function s(e){return null!=e&&e<=e?o[LL(a,e,0,i)]:t}function A(){var e=-1;for(a=new Array(i);++e<i;)a[e]=((e+1)*r-(e-i)*n)/(i+1);return s}return s.domain=function(e){return arguments.length?([n,r]=e,n=+n,r=+r,A()):[n,r]},s.range=function(e){return arguments.length?(i=(o=Array.from(e)).length-1,A()):o.slice()},s.invertExtent=function(e){var t=o.indexOf(e);return t<0?[NaN,NaN]:t<1?[n,a[0]]:t>=i?[a[i-1],r]:[a[t-1],a[t]]},s.unknown=function(e){return arguments.length?(t=e,s):s},s.thresholds=function(){return a.slice()},s.copy=function(){return e().domain([n,r]).range(o).unknown(t)},nH.apply(F_(s),arguments)},scaleRadial:function e(){var t,n=u_(),r=[0,1],i=!1;function a(e){var r=function(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}(n(e));return isNaN(r)?t:i?Math.round(r):r}return a.invert=function(e){return n.invert(V_(e))},a.domain=function(e){return arguments.length?(n.domain(e),a):n.domain()},a.range=function(e){return arguments.length?(n.range((r=Array.from(e,r_)).map(V_)),a):r.slice()},a.rangeRound=function(e){return a.range(e).round(!0)},a.round=function(e){return arguments.length?(i=!!e,a):i},a.clamp=function(e){return arguments.length?(n.clamp(e),a):n.clamp()},a.unknown=function(e){return arguments.length?(t=e,a):t},a.copy=function(){return e(n.domain(),r).round(i).clamp(n.clamp()).unknown(t)},nH.apply(a,arguments),F_(a)},scaleSequential:function e(){var t=F_(Az()(a_));return t.copy=function(){return lz(t,e())},rH.apply(t,arguments)},scaleSequentialLog:function e(){var t=P_(Az()).domain([1,10]);return t.copy=function(){return lz(t,e()).base(t.base())},rH.apply(t,arguments)},scaleSequentialPow:cz,scaleSequentialQuantile:function e(){var t=[],n=a_;function r(e){if(null!=e&&!isNaN(e=+e))return n((LL(t,e,1)-1)/(t.length-1))}return r.domain=function(e){if(!arguments.length)return t.slice();t=[];for(let n of e)null==n||isNaN(n=+n)||t.push(n);return t.sort(IL),r},r.interpolator=function(e){return arguments.length?(n=e,r):n},r.range=function(){return t.map((e,r)=>n(r/(t.length-1)))},r.quantiles=function(e){return Array.from({length:e+1},(n,r)=>function(e,t){if((n=(e=Float64Array.from(function*(e){for(let t of e)null!=t&&(t=+t)>=t&&(yield t)}(e))).length)&&!isNaN(t=+t)){if(t<=0||n<2)return JL(e);if(t>=1)return YL(e);var n,r=(n-1)*t,i=Math.floor(r),a=YL(ZL(e,i).subarray(0,i+1));return a+(JL(e.subarray(i+1))-a)*(r-i)}}(t,r/e))},r.copy=function(){return e(n).domain(t)},rH.apply(r,arguments)},scaleSequentialSqrt:function(){return cz.apply(null,arguments).exponent(.5)},scaleSequentialSymlog:function e(){var t=L_(Az());return t.copy=function(){return lz(t,e()).constant(t.constant())},rH.apply(t,arguments)},scaleSqrt:function(){return z_.apply(null,arguments).exponent(.5)},scaleSymlog:function e(){var t=L_(c_());return t.copy=function(){return l_(t,e()).constant(t.constant())},nH.apply(t,arguments)},scaleThreshold:function e(){var t,n=[.5],r=[0,1],i=1;function a(e){return null!=e&&e<=e?r[LL(n,e,0,i)]:t}return a.domain=function(e){return arguments.length?(n=Array.from(e),i=Math.min(n.length,r.length-1),a):n.slice()},a.range=function(e){return arguments.length?(r=Array.from(e),i=Math.min(n.length,r.length-1),a):r.slice()},a.invertExtent=function(e){var t=r.indexOf(e);return[n[t-1],n[t]]},a.unknown=function(e){return arguments.length?(t=e,a):t},a.copy=function(){return e().domain(n).range(r).unknown(t)},nH.apply(a,arguments)},scaleTime:function(){return nH.apply(sz(IR,TR,QR,SR,dR,AR,oR,iR,rR,HR).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)},scaleUtc:function(){return nH.apply(sz(OR,NR,jR,FR,wR,lR,sR,aR,rR,_R).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)},tickFormat:S_},Symbol.toStringTag,{value:"Module"}));var pz=e=>e.chartData,fz=kU([pz],e=>{var t=null!=e.chartData?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),mz=(e,t,n,r)=>r?fz(e):pz(e);function gz(e){if(Array.isArray(e)&&2===e.length){var[t,n]=e;if(RI(t)&&RI(n))return!0}return!1}function yz(e,t,n){return n?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function vz(e,t){if(t&&"function"!=typeof e&&Array.isArray(e)&&2===e.length){var n,r,[i,a]=e;if(RI(i))n=i;else if("function"==typeof i)return;if(RI(a))r=a;else if("function"==typeof a)return;var o=[n,r];if(gz(o))return o}}var wz,xz=1e9,bz=!0,Bz="[DecimalError] ",Cz=Bz+"Invalid argument: ",Ez=Bz+"Exponent out of range: ",kz=Math.floor,Sz=Math.pow,Fz=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Qz=1e7,jz=9007199254740991,Uz=kz(1286742750677284.5),Oz={};function Nz(e,t){var n,r,i,a,o,s,A,l,c=e.constructor,u=c.precision;if(!e.s||!t.s)return t.s||(t=new c(e)),bz?Kz(t,u):t;if(A=e.d,l=t.d,o=e.e,i=t.e,A=A.slice(),a=o-i){for(a<0?(r=A,a=-a,s=l.length):(r=l,i=o,s=A.length),a>(s=(o=Math.ceil(u/7))>s?o+1:s+1)&&(a=s,r.length=1),r.reverse();a--;)r.push(0);r.reverse()}for((s=A.length)-(a=l.length)<0&&(a=s,r=l,l=A,A=r),n=0;a;)n=(A[--a]=A[a]+l[a]+n)/Qz|0,A[a]%=Qz;for(n&&(A.unshift(n),++i),s=A.length;0==A[--s];)A.pop();return t.d=A,t.e=i,bz?Kz(t,u):t}function Iz(e,t,n){if(e!==~~e||e<t||e>n)throw Error(Cz+e)}function Tz(e){var t,n,r,i=e.length-1,a="",o=e[0];if(i>0){for(a+=o,t=1;t<i;t++)(n=7-(r=e[t]+"").length)&&(a+=Hz(n)),a+=r;(n=7-(r=(o=e[t])+"").length)&&(a+=Hz(n))}else if(0===o)return"0";for(;o%10==0;)o/=10;return a+o}Oz.absoluteValue=Oz.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e},Oz.comparedTo=Oz.cmp=function(e){var t,n,r,i,a=this;if(e=new a.constructor(e),a.s!==e.s)return a.s||-e.s;if(a.e!==e.e)return a.e>e.e^a.s<0?1:-1;for(t=0,n=(r=a.d.length)<(i=e.d.length)?r:i;t<n;++t)if(a.d[t]!==e.d[t])return a.d[t]>e.d[t]^a.s<0?1:-1;return r===i?0:r>i^a.s<0?1:-1},Oz.decimalPlaces=Oz.dp=function(){var e=this,t=e.d.length-1,n=7*(t-e.e);if(t=e.d[t])for(;t%10==0;t/=10)n--;return n<0?0:n},Oz.dividedBy=Oz.div=function(e){return Pz(this,new this.constructor(e))},Oz.dividedToIntegerBy=Oz.idiv=function(e){var t=this.constructor;return Kz(Pz(this,new t(e),0,1),t.precision)},Oz.equals=Oz.eq=function(e){return!this.cmp(e)},Oz.exponent=function(){return Dz(this)},Oz.greaterThan=Oz.gt=function(e){return this.cmp(e)>0},Oz.greaterThanOrEqualTo=Oz.gte=function(e){return this.cmp(e)>=0},Oz.isInteger=Oz.isint=function(){return this.e>this.d.length-2},Oz.isNegative=Oz.isneg=function(){return this.s<0},Oz.isPositive=Oz.ispos=function(){return this.s>0},Oz.isZero=function(){return 0===this.s},Oz.lessThan=Oz.lt=function(e){return this.cmp(e)<0},Oz.lessThanOrEqualTo=Oz.lte=function(e){return this.cmp(e)<1},Oz.logarithm=Oz.log=function(e){var t,n=this,r=n.constructor,i=r.precision,a=i+5;if(void 0===e)e=new r(10);else if((e=new r(e)).s<1||e.eq(wz))throw Error(Bz+"NaN");if(n.s<1)throw Error(Bz+(n.s?"NaN":"-Infinity"));return n.eq(wz)?new r(0):(bz=!1,t=Pz(_z(n,a),_z(e,a),a),bz=!0,Kz(t,i))},Oz.minus=Oz.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?zz(t,e):Nz(t,(e.s=-e.s,e))},Oz.modulo=Oz.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(!(e=new r(e)).s)throw Error(Bz+"NaN");return n.s?(bz=!1,t=Pz(n,e,0,1).times(e),bz=!0,n.minus(t)):Kz(new r(n),i)},Oz.naturalExponential=Oz.exp=function(){return Mz(this)},Oz.naturalLogarithm=Oz.ln=function(){return _z(this)},Oz.negated=Oz.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},Oz.plus=Oz.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Nz(t,e):zz(t,(e.s=-e.s,e))},Oz.precision=Oz.sd=function(e){var t,n,r,i=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(Cz+e);if(t=Dz(i)+1,n=7*(r=i.d.length-1)+1,r=i.d[r]){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n},Oz.squareRoot=Oz.sqrt=function(){var e,t,n,r,i,a,o,s=this,A=s.constructor;if(s.s<1){if(!s.s)return new A(0);throw Error(Bz+"NaN")}for(e=Dz(s),bz=!1,0==(i=Math.sqrt(+s))||i==1/0?(((t=Tz(s.d)).length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=kz((e+1)/2)-(e<0||e%2),r=new A(t=i==1/0?"5e"+e:(t=i.toExponential()).slice(0,t.indexOf("e")+1)+e)):r=new A(i.toString()),i=o=(n=A.precision)+3;;)if(r=(a=r).plus(Pz(s,a,o+2)).times(.5),Tz(a.d).slice(0,o)===(t=Tz(r.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&"4999"==t){if(Kz(a,n+1,0),a.times(a).eq(s)){r=a;break}}else if("9999"!=t)break;o+=4}return bz=!0,Kz(r,n)},Oz.times=Oz.mul=function(e){var t,n,r,i,a,o,s,A,l,c=this,u=c.constructor,d=c.d,h=(e=new u(e)).d;if(!c.s||!e.s)return new u(0);for(e.s*=c.s,n=c.e+e.e,(A=d.length)<(l=h.length)&&(a=d,d=h,h=a,o=A,A=l,l=o),a=[],r=o=A+l;r--;)a.push(0);for(r=l;--r>=0;){for(t=0,i=A+r;i>r;)s=a[i]+h[r]*d[i-r-1]+t,a[i--]=s%Qz|0,t=s/Qz|0;a[i]=(a[i]+t)%Qz|0}for(;!a[--o];)a.pop();return t?++n:a.shift(),e.d=a,e.e=n,bz?Kz(e,u.precision):e},Oz.toDecimalPlaces=Oz.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),void 0===e?n:(Iz(e,0,xz),void 0===t?t=r.rounding:Iz(t,0,8),Kz(n,e+Dz(n)+1,t))},Oz.toExponential=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=Vz(r,!0):(Iz(e,0,xz),void 0===t?t=i.rounding:Iz(t,0,8),n=Vz(r=Kz(new i(r),e+1,t),!0,e+1)),n},Oz.toFixed=function(e,t){var n,r,i=this,a=i.constructor;return void 0===e?Vz(i):(Iz(e,0,xz),void 0===t?t=a.rounding:Iz(t,0,8),n=Vz((r=Kz(new a(i),e+Dz(i)+1,t)).abs(),!1,e+Dz(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)},Oz.toInteger=Oz.toint=function(){var e=this,t=e.constructor;return Kz(new t(e),Dz(e)+1,t.rounding)},Oz.toNumber=function(){return+this},Oz.toPower=Oz.pow=function(e){var t,n,r,i,a,o,s=this,A=s.constructor,l=+(e=new A(e));if(!e.s)return new A(wz);if(!(s=new A(s)).s){if(e.s<1)throw Error(Bz+"Infinity");return s}if(s.eq(wz))return s;if(r=A.precision,e.eq(wz))return Kz(s,r);if(o=(t=e.e)>=(n=e.d.length-1),a=s.s,o){if((n=l<0?-l:l)<=jz){for(i=new A(wz),t=Math.ceil(r/7+4),bz=!1;n%2&&$z((i=i.times(s)).d,t),0!==(n=kz(n/2));)$z((s=s.times(s)).d,t);return bz=!0,e.s<0?new A(wz).div(i):Kz(i,r)}}else if(a<0)throw Error(Bz+"NaN");return a=a<0&&1&e.d[Math.max(t,n)]?-1:1,s.s=1,bz=!1,i=e.times(_z(s,r+12)),bz=!0,(i=Mz(i)).s=a,i},Oz.toPrecision=function(e,t){var n,r,i=this,a=i.constructor;return void 0===e?r=Vz(i,(n=Dz(i))<=a.toExpNeg||n>=a.toExpPos):(Iz(e,1,xz),void 0===t?t=a.rounding:Iz(t,0,8),r=Vz(i=Kz(new a(i),e,t),e<=(n=Dz(i))||n<=a.toExpNeg,e)),r},Oz.toSignificantDigits=Oz.tosd=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(Iz(e,1,xz),void 0===t?t=n.rounding:Iz(t,0,8)),Kz(new n(this),e,t)},Oz.toString=Oz.valueOf=Oz.val=Oz.toJSON=Oz[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Dz(e),n=e.constructor;return Vz(e,t<=n.toExpNeg||t>=n.toExpPos)};var Pz=function(){function e(e,t){var n,r=0,i=e.length;for(e=e.slice();i--;)n=e[i]*t+r,e[i]=n%Qz|0,r=n/Qz|0;return r&&e.unshift(r),e}function t(e,t,n,r){var i,a;if(n!=r)a=n>r?1:-1;else for(i=a=0;i<n;i++)if(e[i]!=t[i]){a=e[i]>t[i]?1:-1;break}return a}function n(e,t,n){for(var r=0;n--;)e[n]-=r,r=e[n]<t[n]?1:0,e[n]=r*Qz+e[n]-t[n];for(;!e[0]&&e.length>1;)e.shift()}return function(r,i,a,o){var s,A,l,c,u,d,h,p,f,m,g,y,v,w,x,b,B,C,E=r.constructor,k=r.s==i.s?1:-1,S=r.d,F=i.d;if(!r.s)return new E(r);if(!i.s)throw Error(Bz+"Division by zero");for(A=r.e-i.e,B=F.length,x=S.length,p=(h=new E(k)).d=[],l=0;F[l]==(S[l]||0);)++l;if(F[l]>(S[l]||0)&&--A,(y=null==a?a=E.precision:o?a+(Dz(r)-Dz(i))+1:a)<0)return new E(0);if(y=y/7+2|0,l=0,1==B)for(c=0,F=F[0],y++;(l<x||c)&&y--;l++)v=c*Qz+(S[l]||0),p[l]=v/F|0,c=v%F|0;else{for((c=Qz/(F[0]+1)|0)>1&&(F=e(F,c),S=e(S,c),B=F.length,x=S.length),w=B,m=(f=S.slice(0,B)).length;m<B;)f[m++]=0;(C=F.slice()).unshift(0),b=F[0],F[1]>=Qz/2&&++b;do{c=0,(s=t(F,f,B,m))<0?(g=f[0],B!=m&&(g=g*Qz+(f[1]||0)),(c=g/b|0)>1?(c>=Qz&&(c=Qz-1),1==(s=t(u=e(F,c),f,d=u.length,m=f.length))&&(c--,n(u,B<d?C:F,d))):(0==c&&(s=c=1),u=F.slice()),(d=u.length)<m&&u.unshift(0),n(f,u,m),-1==s&&(s=t(F,f,B,m=f.length))<1&&(c++,n(f,B<m?C:F,m)),m=f.length):0===s&&(c++,f=[0]),p[l++]=c,s&&f[0]?f[m++]=S[w]||0:(f=[S[w]],m=1)}while((w++<x||void 0!==f[0])&&y--)}return p[0]||p.shift(),h.e=A,Kz(h,o?a+Dz(h)+1:a)}}();function Mz(e,t){var n,r,i,a,o,s=0,A=0,l=e.constructor,c=l.precision;if(Dz(e)>16)throw Error(Ez+Dz(e));if(!e.s)return new l(wz);for(bz=!1,o=c,a=new l(.03125);e.abs().gte(.1);)e=e.times(a),A+=5;for(o+=Math.log(Sz(2,A))/Math.LN10*2+5|0,n=r=i=new l(wz),l.precision=o;;){if(r=Kz(r.times(e),o),n=n.times(++s),Tz((a=i.plus(Pz(r,n,o))).d).slice(0,o)===Tz(i.d).slice(0,o)){for(;A--;)i=Kz(i.times(i),o);return l.precision=c,null==t?(bz=!0,Kz(i,c)):i}i=a}}function Dz(e){for(var t=7*e.e,n=e.d[0];n>=10;n/=10)t++;return t}function Lz(e,t,n){if(t>e.LN10.sd())throw bz=!0,n&&(e.precision=n),Error(Bz+"LN10 precision limit exceeded");return Kz(new e(e.LN10),t)}function Hz(e){for(var t="";e--;)t+="0";return t}function _z(e,t){var n,r,i,a,o,s,A,l,c,u=1,d=e,h=d.d,p=d.constructor,f=p.precision;if(d.s<1)throw Error(Bz+(d.s?"NaN":"-Infinity"));if(d.eq(wz))return new p(0);if(null==t?(bz=!1,l=f):l=t,d.eq(10))return null==t&&(bz=!0),Lz(p,l);if(l+=10,p.precision=l,r=(n=Tz(h)).charAt(0),a=Dz(d),!(Math.abs(a)<15e14))return A=Lz(p,l+2,f).times(a+""),d=_z(new p(r+"."+n.slice(1)),l-10).plus(A),p.precision=f,null==t?(bz=!0,Kz(d,f)):d;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=Tz((d=d.times(e)).d)).charAt(0),u++;for(a=Dz(d),r>1?(d=new p("0."+n),a++):d=new p(r+"."+n.slice(1)),s=o=d=Pz(d.minus(wz),d.plus(wz),l),c=Kz(d.times(d),l),i=3;;){if(o=Kz(o.times(c),l),Tz((A=s.plus(Pz(o,new p(i),l))).d).slice(0,l)===Tz(s.d).slice(0,l))return s=s.times(2),0!==a&&(s=s.plus(Lz(p,l+2,f).times(a+""))),s=Pz(s,new p(u),l),p.precision=f,null==t?(bz=!0,Kz(s,f)):s;s=A,i+=2}}function Rz(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;48===t.charCodeAt(r);)++r;for(i=t.length;48===t.charCodeAt(i-1);)--i;if(t=t.slice(r,i)){if(i-=r,n=n-r-1,e.e=kz(n/7),e.d=[],r=(n+1)%7,n<0&&(r+=7),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=7;r<i;)e.d.push(+t.slice(r,r+=7));r=7-(t=t.slice(r)).length}else r-=i;for(;r--;)t+="0";if(e.d.push(+t),bz&&(e.e>Uz||e.e<-Uz))throw Error(Ez+n)}else e.s=0,e.e=0,e.d=[0];return e}function Kz(e,t,n){var r,i,a,o,s,A,l,c,u=e.d;for(o=1,a=u[0];a>=10;a/=10)o++;if((r=t-o)<0)r+=7,i=t,l=u[c=0];else{if((c=Math.ceil((r+1)/7))>=(a=u.length))return e;for(l=a=u[c],o=1;a>=10;a/=10)o++;i=(r%=7)-7+o}if(void 0!==n&&(s=l/(a=Sz(10,o-i-1))%10|0,A=t<0||void 0!==u[c+1]||l%a,A=n<4?(s||A)&&(0==n||n==(e.s<0?3:2)):s>5||5==s&&(4==n||A||6==n&&(r>0?i>0?l/Sz(10,o-i):0:u[c-1])%10&1||n==(e.s<0?8:7))),t<1||!u[0])return A?(a=Dz(e),u.length=1,t=t-a-1,u[0]=Sz(10,(7-t%7)%7),e.e=kz(-t/7)||0):(u.length=1,u[0]=e.e=e.s=0),e;if(0==r?(u.length=c,a=1,c--):(u.length=c+1,a=Sz(10,7-r),u[c]=i>0?(l/Sz(10,o-i)%Sz(10,i)|0)*a:0),A)for(;;){if(0==c){(u[0]+=a)==Qz&&(u[0]=1,++e.e);break}if(u[c]+=a,u[c]!=Qz)break;u[c--]=0,a=1}for(r=u.length;0===u[--r];)u.pop();if(bz&&(e.e>Uz||e.e<-Uz))throw Error(Ez+Dz(e));return e}function zz(e,t){var n,r,i,a,o,s,A,l,c,u,d=e.constructor,h=d.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new d(e),bz?Kz(t,h):t;if(A=e.d,u=t.d,r=t.e,l=e.e,A=A.slice(),o=l-r){for((c=o<0)?(n=A,o=-o,s=u.length):(n=u,r=l,s=A.length),o>(i=Math.max(Math.ceil(h/7),s)+2)&&(o=i,n.length=1),n.reverse(),i=o;i--;)n.push(0);n.reverse()}else{for((c=(i=A.length)<(s=u.length))&&(s=i),i=0;i<s;i++)if(A[i]!=u[i]){c=A[i]<u[i];break}o=0}for(c&&(n=A,A=u,u=n,t.s=-t.s),s=A.length,i=u.length-s;i>0;--i)A[s++]=0;for(i=u.length;i>o;){if(A[--i]<u[i]){for(a=i;a&&0===A[--a];)A[a]=Qz-1;--A[a],A[i]+=Qz}A[i]-=u[i]}for(;0===A[--s];)A.pop();for(;0===A[0];A.shift())--r;return A[0]?(t.d=A,t.e=r,bz?Kz(t,h):t):new d(0)}function Vz(e,t,n){var r,i=Dz(e),a=Tz(e.d),o=a.length;return t?(n&&(r=n-o)>0?a=a.charAt(0)+"."+a.slice(1)+Hz(r):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+Hz(-i-1)+a,n&&(r=n-o)>0&&(a+=Hz(r))):i>=o?(a+=Hz(i+1-o),n&&(r=n-i-1)>0&&(a=a+"."+Hz(r))):((r=i+1)<o&&(a=a.slice(0,r)+"."+a.slice(r)),n&&(r=n-o)>0&&(i+1===o&&(a+="."),a+=Hz(r))),e.s<0?"-"+a:a}function $z(e,t){if(e.length>t)return e.length=t,!0}function Wz(e){if(!e||"object"!=typeof e)throw Error(Bz+"Object expected");var t,n,r,i=["precision",1,xz,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if(void 0!==(r=e[n=i[t]])){if(!(kz(r)===r&&r>=i[t+1]&&r<=i[t+2]))throw Error(Cz+n+": "+r);this[n]=r}if(void 0!==(r=e[n="LN10"])){if(r!=Math.LN10)throw Error(Cz+n+": "+r);this[n]=new this(r)}return this}var Gz=function e(t){var n,r,i;function a(e){var t=this;if(!(t instanceof a))return new a(e);if(t.constructor=a,e instanceof a)return t.s=e.s,t.e=e.e,void(t.d=(e=e.d)?e.slice():e);if("number"==typeof e){if(0*e!=0)throw Error(Cz+e);if(e>0)t.s=1;else{if(!(e<0))return t.s=0,t.e=0,void(t.d=[0]);e=-e,t.s=-1}return e===~~e&&e<1e7?(t.e=0,void(t.d=[e])):Rz(t,e.toString())}if("string"!=typeof e)throw Error(Cz+e);if(45===e.charCodeAt(0)?(e=e.slice(1),t.s=-1):t.s=1,!Fz.test(e))throw Error(Cz+e);Rz(t,e)}if(a.prototype=Oz,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.clone=e,a.config=a.set=Wz,void 0===t&&(t={}),t)for(i=["precision","rounding","toExpNeg","toExpPos","LN10"],n=0;n<i.length;)t.hasOwnProperty(r=i[n++])||(t[r]=this[r]);return a.config(t),a}({precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"});wz=new Gz(1);const qz=Gz;function Xz(e){return 0===e?1:Math.floor(new qz(e).abs().log(10).toNumber())+1}function Yz(e,t,n){for(var r=new qz(e),i=0,a=[];r.lt(t)&&i<1e5;)a.push(r.toNumber()),r=r.add(n),i++;return a}var Jz=e=>{var[t,n]=e,[r,i]=[t,n];return t>n&&([r,i]=[n,t]),[r,i]},Zz=(e,t,n)=>{if(e.lte(0))return new qz(0);var r=Xz(e.toNumber()),i=new qz(10).pow(r),a=e.div(i),o=1!==r?.05:.1,s=new qz(Math.ceil(a.div(o).toNumber())).add(n).mul(o).mul(i);return new qz(t?s.toNumber():Math.ceil(s.toNumber()))},eV=function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new qz(0),tickMin:new qz(0),tickMax:new qz(0)};var a,o=Zz(new qz(t).sub(e).div(n-1),r,i);a=e<=0&&t>=0?new qz(0):(a=new qz(e).add(t).div(2)).sub(new qz(a).mod(o));var s=Math.ceil(a.sub(e).div(o).toNumber()),A=Math.ceil(new qz(t).sub(a).div(o).toNumber()),l=s+A+1;return l>n?eV(e,t,n,r,i+1):(l<n&&(A=t>0?A+(n-l):A,s=t>0?s:s+(n-l)),{step:o,tickMin:a.sub(new qz(s).mul(o)),tickMax:a.add(new qz(A).mul(o))})},tV=function(e){var[t,n]=e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=Math.max(r,2),[o,s]=Jz([t,n]);if(o===-1/0||s===1/0){var A=s===1/0?[o,...Array(r-1).fill(1/0)]:[...Array(r-1).fill(-1/0),s];return t>n?A.reverse():A}if(o===s)return((e,t,n)=>{var r=new qz(1),i=new qz(e);if(!i.isint()&&n){var a=Math.abs(e);a<1?(r=new qz(10).pow(Xz(e)-1),i=new qz(Math.floor(i.div(r).toNumber())).mul(r)):a>1&&(i=new qz(Math.floor(e)))}else 0===e?i=new qz(Math.floor((t-1)/2)):n||(i=new qz(Math.floor(e)));for(var o=Math.floor((t-1)/2),s=[],A=0;A<t;A++)s.push(i.add(new qz(A-o).mul(r)).toNumber());return s})(o,r,i);var{step:l,tickMin:c,tickMax:u}=eV(o,s,a,i,0),d=Yz(c,u.add(new qz(.1).mul(l)),l);return t>n?d.reverse():d},nV=e=>e.rootProps.maxBarSize,rV=e=>e.rootProps.barCategoryGap,iV=e=>e.rootProps.stackOffset,aV=e=>e.rootProps.reverseStackOrder,oV=e=>e.options.chartName,sV=e=>e.rootProps.syncId,AV=e=>e.rootProps.syncMethod,lV=e=>e.options.eventEmitter,cV={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},uV=(e,t)=>{if(e&&t)return null!=e&&e.reversed?[t[1],t[0]]:t};function dV(e,t,n){return"auto"!==n?n:null!=e?GI(e,t)?"category":"number":void 0}function hV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function pV(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hV(Object(n),!0).forEach(function(t){fV(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hV(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function fV(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var mV={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:0,includeHidden:!1,name:void 0,reversed:!1,scale:"auto",tick:!0,tickCount:void 0,ticks:void 0,type:"auto",unit:void 0},gV={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,dataKey:void 0,domain:void 0,id:0,includeHidden:!1,name:void 0,reversed:!1,scale:"auto",tick:!0,tickCount:5,ticks:void 0,type:"auto",unit:void 0},yV=kU([(e,t)=>{if(null!=t)return e.polarAxis.angleAxis[t]},cP],(e,t)=>{var n;if(null!=e)return e;var r=null!==(n=dV(t,"angleAxis",mV.type))&&void 0!==n?n:"category";return pV(pV({},mV),{},{type:r})}),vV=kU([(e,t)=>e.polarAxis.radiusAxis[t],cP],(e,t)=>{var n;if(null!=e)return e;var r=null!==(n=dV(t,"radiusAxis",gV.type))&&void 0!==n?n:"category";return pV(pV({},gV),{},{type:r})}),wV=e=>e.polarOptions,xV=kU([sT,AT,BT],cL),bV=kU([wV,xV],(e,t)=>{if(null!=e)return DF(e.innerRadius,t,0)}),BV=kU([wV,xV],(e,t)=>{if(null!=e)return DF(e.outerRadius,t,.8*t)}),CV=kU([wV],e=>{if(null==e)return[0,0];var{startAngle:t,endAngle:n}=e;return[t,n]});kU([yV,CV],uV);var EV=kU([xV,bV,BV],(e,t,n)=>{if(null!=e&&null!=t&&null!=n)return[t,n]});kU([vV,EV],uV);var kV=kU([sP,wV,bV,BV,sT,AT],(e,t,n,r,i,a)=>{if(("centric"===e||"radial"===e)&&null!=t&&null!=n&&null!=r){var{cx:o,cy:s,startAngle:A,endAngle:l}=t;return{cx:DF(o,i,i/2),cy:DF(s,a,a/2),innerRadius:n,outerRadius:r,startAngle:A,endAngle:l,clockWise:!1}}}),SV=(e,t)=>t,FV=(e,t,n)=>n;function QV(e){return null==e?void 0:e.id}function jV(e,t,n){var{chartData:r=[]}=t,{allowDuplicatedCategory:i,dataKey:a}=n,o=new Map;return e.forEach(e=>{var t,n=null!==(t=e.data)&&void 0!==t?t:r;if(null!=n&&0!==n.length){var s=QV(e);n.forEach((t,n)=>{var r,A=null==a||i?n:String(WI(t,a,null)),l=WI(t,e.dataKey,0);r=o.has(A)?o.get(A):{},Object.assign(r,{[s]:l}),o.set(A,r)})}}),Array.from(o.values())}function UV(e){return"stackId"in e&&null!=e.stackId&&null!=e.dataKey}var OV=(e,t)=>e===t||null!=e&&null!=t&&(e[0]===t[0]&&e[1]===t[1]);function NV(e,t){return!(!Array.isArray(e)||!Array.isArray(t)||0!==e.length||0!==t.length)||e===t}var IV=e=>{var t=sP(e);return"horizontal"===t?"xAxis":"vertical"===t?"yAxis":"centric"===t?"angleAxis":"radiusAxis"},TV=e=>e.tooltip.settings.axisId;function PV(e){var t=e.ticks,n=e.bandwidth,r=e.range(),i=[Math.min(...r),Math.max(...r)];return{domain:()=>e.domain(),range:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(()=>i),rangeMin:()=>i[0],rangeMax:()=>i[1],isInRange(e){var t=i[0],n=i[1];return t<=n?e>=t&&e<=n:e>=n&&e<=t},bandwidth:n?()=>n.call(e):void 0,ticks:t?n=>t.call(e,n):void 0,map:(t,n)=>{var r=e(t);if(null!=r){if(e.bandwidth&&null!=n&&n.position){var i=e.bandwidth();switch(n.position){case"middle":r+=i/2;break;case"end":r+=i}}return r}}}}function MV(e,t,n){if("function"==typeof e)return PV(e.copy().domain(t).range(n));if(null!=e){var r=function(e){if(e in hz)return hz[e]();var t="scale".concat(KF(e));return t in hz?hz[t]():void 0}(e);if(null!=r)return r.domain(t).range(n),PV(r)}}var DV=(e,t)=>{if(null!=t){if("linear"===e){if(!gz(t)){for(var n,r,i=0;i<t.length;i++){var a=t[i];RI(a)&&((void 0===n||a<n)&&(n=a),(void 0===r||a>r)&&(r=a))}return void 0!==n&&void 0!==r?[n,r]:void 0}return t}return t}};function LV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function HV(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?LV(Object(n),!0).forEach(function(t){_V(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LV(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _V(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var RV=[0,"auto"],KV={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"bottom",padding:{left:0,right:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"category",unit:void 0},zV=(e,t)=>e.cartesianAxis.xAxis[t],VV=(e,t)=>{var n=zV(e,t);return null==n?KV:n},$V={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:RV,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,width:60},WV=(e,t)=>e.cartesianAxis.yAxis[t],GV=(e,t)=>{var n=WV(e,t);return null==n?$V:n},qV={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},XV=(e,t)=>{var n=e.cartesianAxis.zAxis[t];return null==n?qV:n},YV=(e,t,n)=>{switch(t){case"xAxis":return VV(e,n);case"yAxis":return GV(e,n);case"zAxis":return XV(e,n);case"angleAxis":return yV(e,n);case"radiusAxis":return vV(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},JV=(e,t,n)=>{switch(t){case"xAxis":return VV(e,n);case"yAxis":return GV(e,n);case"angleAxis":return yV(e,n);case"radiusAxis":return vV(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},ZV=e=>e.graphicalItems.cartesianItems.some(e=>"bar"===e.type)||e.graphicalItems.polarItems.some(e=>"radialBar"===e.type);function e$(e,t){return n=>{switch(e){case"xAxis":return"xAxisId"in n&&n.xAxisId===t;case"yAxis":return"yAxisId"in n&&n.yAxisId===t;case"zAxis":return"zAxisId"in n&&n.zAxisId===t;case"angleAxis":return"angleAxisId"in n&&n.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in n&&n.radiusAxisId===t;default:return!1}}}var t$=e=>e.graphicalItems.cartesianItems,n$=kU([SV,FV],e$),r$=(e,t,n)=>e.filter(n).filter(e=>!0===(null==t?void 0:t.includeHidden)||!e.hide),i$=kU([t$,YV,n$],r$,{memoizeOptions:{resultEqualityCheck:NV}}),a$=kU([i$],e=>e.filter(e=>"area"===e.type||"bar"===e.type).filter(UV)),o$=e=>e.filter(e=>!("stackId"in e)||void 0===e.stackId),s$=kU([i$],o$),A$=e=>e.map(e=>e.data).filter(Boolean).flat(1),l$=kU([i$],A$,{memoizeOptions:{resultEqualityCheck:NV}}),c$=(e,t)=>{var{chartData:n=[],dataStartIndex:r,dataEndIndex:i}=t;return e.length>0?e:n.slice(r,i+1)},u$=kU([l$,mz],c$),d$=(e,t,n)=>null!=(null==t?void 0:t.dataKey)?e.map(e=>({value:WI(e,t.dataKey)})):n.length>0?n.map(e=>e.dataKey).flatMap(t=>e.map(e=>({value:WI(e,t)}))):e.map(e=>({value:e})),h$=kU([u$,YV,i$],d$);function p$(e,t){switch(e){case"xAxis":return"x"===t.direction;case"yAxis":return"y"===t.direction;default:return!1}}function f$(e){if(TF(e)||e instanceof Date){var t=Number(e);if(RI(t))return t}}function m$(e){if(Array.isArray(e)){var t=[f$(e[0]),f$(e[1])];return gz(t)?t:void 0}var n=f$(e);if(null!=n)return[n,n]}function g$(e){return e.map(f$).filter(zF)}var y$=e=>{var t=IV(e),n=TV(e);return JV(e,t,n)},v$=kU([y$],e=>null==e?void 0:e.dataKey),w$=kU([a$,mz,y$],jV),x$=(e,t,n,r)=>{var i=t.reduce((e,t)=>{if(null==t.stackId)return e;var n=e[t.stackId];return null==n&&(n=[]),n.push(t),e[t.stackId]=n,e},{});return Object.fromEntries(Object.entries(i).map(t=>{var[i,a]=t,o=r?[...a].reverse():a,s=o.map(QV);return[i,{stackedData:JI(e,s,n),graphicalItems:o}]}))},b$=kU([w$,a$,iV,aV],x$),B$=(e,t,n,r)=>{var{dataStartIndex:i,dataEndIndex:a}=t;if(null==r&&"zAxis"!==n){var o=tT(e,i,a);if(null==o||0!==o[0]||0!==o[1])return o}},C$=kU([YV],e=>e.allowDataOverflow),E$=e=>{var t;if(null==e||!("domain"in e))return RV;if(null!=e.domain)return e.domain;if("ticks"in e&&null!=e.ticks){if("number"===e.type){var n=g$(e.ticks);return[Math.min(...n),Math.max(...n)]}if("category"===e.type)return e.ticks.map(String)}return null!==(t=null==e?void 0:e.domain)&&void 0!==t?t:RV},k$=kU([YV],E$),S$=kU([k$,C$],vz),F$=kU([b$,pz,SV,S$],B$,{memoizeOptions:{resultEqualityCheck:OV}}),Q$=e=>e.errorBars,j$=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.filter(Boolean);if(0!==r.length){var i=r.flat();return[Math.min(...i),Math.max(...i)]}},U$=(e,t,n,r,i)=>{var a,o;if(n.length>0&&e.forEach(e=>{n.forEach(n=>{var s,A,l=null===(s=r[n.id])||void 0===s?void 0:s.filter(e=>p$(i,e)),c=WI(e,null!==(A=t.dataKey)&&void 0!==A?A:n.dataKey),u=function(e,t,n){return!n||"number"!=typeof t||OF(t)?[]:n.length?g$(n.flatMap(n=>{var r,i,a=WI(e,n.dataKey);if(Array.isArray(a)?[r,i]=a:r=i=a,RI(r)&&RI(i))return[t-r,t+i]})):[]}(e,c,l);if(u.length>=2){var d=Math.min(...u),h=Math.max(...u);(null==a||d<a)&&(a=d),(null==o||h>o)&&(o=h)}var p=m$(c);null!=p&&(a=null==a?p[0]:Math.min(a,p[0]),o=null==o?p[1]:Math.max(o,p[1]))})}),null!=(null==t?void 0:t.dataKey)&&e.forEach(e=>{var n=m$(WI(e,t.dataKey));null!=n&&(a=null==a?n[0]:Math.min(a,n[0]),o=null==o?n[1]:Math.max(o,n[1]))}),RI(a)&&RI(o))return[a,o]},O$=kU([u$,YV,s$,Q$,SV],U$,{memoizeOptions:{resultEqualityCheck:OV}});function N$(e){var{value:t}=e;if(TF(t)||t instanceof Date)return t}var I$=e=>e.referenceElements.dots,T$=(e,t,n)=>e.filter(e=>"extendDomain"===e.ifOverflow).filter(e=>"xAxis"===t?e.xAxisId===n:e.yAxisId===n),P$=kU([I$,SV,FV],T$),M$=e=>e.referenceElements.areas,D$=kU([M$,SV,FV],T$),L$=e=>e.referenceElements.lines,H$=kU([L$,SV,FV],T$),_$=(e,t)=>{if(null!=e){var n=g$(e.map(e=>"xAxis"===t?e.x:e.y));if(0!==n.length)return[Math.min(...n),Math.max(...n)]}},R$=kU(P$,SV,_$),K$=(e,t)=>{if(null!=e){var n=g$(e.flatMap(e=>["xAxis"===t?e.x1:e.y1,"xAxis"===t?e.x2:e.y2]));if(0!==n.length)return[Math.min(...n),Math.max(...n)]}},z$=kU([D$,SV],K$);var V$=(e,t)=>{if(null!=e){var n=e.flatMap(e=>"xAxis"===t?function(e){var t;if(null!=e.x)return g$([e.x]);var n=null===(t=e.segment)||void 0===t?void 0:t.map(e=>e.x);return null==n||0===n.length?[]:g$(n)}(e):function(e){var t;if(null!=e.y)return g$([e.y]);var n=null===(t=e.segment)||void 0===t?void 0:t.map(e=>e.y);return null==n||0===n.length?[]:g$(n)}(e));if(0!==n.length)return[Math.min(...n),Math.max(...n)]}},$$=kU([H$,SV],V$),W$=kU(R$,$$,z$,(e,t,n)=>j$(e,n,t)),G$=(e,t,n,r,i,a,o,s)=>null!=n?n:function(e,t,n){if(n||null!=t){if("function"==typeof e&&null!=t)try{var r=e(t,n);if(gz(r))return yz(r,t,n)}catch(h){}if(Array.isArray(e)&&2===e.length){var i,a,[o,s]=e;if("auto"===o)null!=t&&(i=Math.min(...t));else if(IF(o))i=o;else if("function"==typeof o)try{null!=t&&(i=o(null==t?void 0:t[0]))}catch(p){}else if("string"==typeof o&&nT.test(o)){var A=nT.exec(o);if(null==A||null==A[1]||null==t)i=void 0;else{var l=+A[1];i=t[0]-l}}else i=null==t?void 0:t[0];if("auto"===s)null!=t&&(a=Math.max(...t));else if(IF(s))a=s;else if("function"==typeof s)try{null!=t&&(a=s(null==t?void 0:t[1]))}catch(f){}else if("string"==typeof s&&rT.test(s)){var c=rT.exec(s);if(null==c||null==c[1]||null==t)a=void 0;else{var u=+c[1];a=t[1]+u}}else a=null==t?void 0:t[1];var d=[i,a];if(gz(d))return null==t?d:yz(d,t,n)}}}(t,"vertical"===o&&"xAxis"===s||"horizontal"===o&&"yAxis"===s?j$(r,a,i):j$(a,i),e.allowDataOverflow),q$=kU([YV,k$,S$,F$,O$,W$,sP,SV],G$,{memoizeOptions:{resultEqualityCheck:OV}}),X$=[0,1],Y$=(e,t,n,r,i,a,o)=>{if(null!=e&&null!=n&&0!==n.length||void 0!==o){var s,{dataKey:A,type:l}=e,c=GI(t,a);return c&&null==A?NL(0,null!==(s=null==n?void 0:n.length)&&void 0!==s?s:0):"category"===l?((e,t,n)=>{var r=e.map(N$).filter(e=>null!=e);return n&&(null==t.dataKey||t.allowDuplicatedCategory&&LF(r))?NL(0,e.length):t.allowDuplicatedCategory?r:Array.from(new Set(r))})(r,e,c):"expand"===i?X$:o}},J$=kU([YV,sP,u$,h$,iV,SV,q$],Y$);var Z$=(e,t,n)=>{if(null!=e){var{scale:r,type:i}=e;if("auto"===r)return"category"===i&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!t)?"point":"category"===i?"band":"linear";if("string"==typeof r){var a="scale".concat(KF(r));return function(e){return e in hz}(a)?a:"point"}}},eW=kU([YV,ZV,oV],Z$);function tW(e,t,n,r){if(null!=n&&null!=r)return"function"==typeof e.scale?MV(e.scale,n,r):MV(t,n,r)}var nW=(e,t,n)=>{var r=E$(t);if("auto"===n||"linear"===n)return null!=t&&t.tickCount&&Array.isArray(r)&&("auto"===r[0]||"auto"===r[1])&&gz(e)?tV(e,t.tickCount,t.allowDecimals):null!=t&&t.tickCount&&"number"===t.type&&gz(e)?function(e,t){var[n,r]=e,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],[a,o]=Jz([n,r]);if(a===-1/0||o===1/0)return[n,r];if(a===o)return[a];var s=Math.max(t,2),A=Zz(new qz(o).sub(a).div(s-1),i,0),l=[...Yz(new qz(a),new qz(o),A),o];return!1===i&&(l=l.map(e=>Math.round(e))),n>r?l.reverse():l}(e,t.tickCount,t.allowDecimals):void 0},rW=kU([J$,JV,eW],nW),iW=(e,t,n,r)=>{if("angleAxis"!==r&&"number"===(null==e?void 0:e.type)&&gz(t)&&Array.isArray(n)&&n.length>0){var i,a,o=t[0],s=null!==(i=n[0])&&void 0!==i?i:0,A=t[1],l=null!==(a=n[n.length-1])&&void 0!==a?a:0;return[Math.min(o,s),Math.max(A,l)]}return t},aW=kU([YV,J$,rW,SV],iW),oW=kU(h$,YV,(e,t)=>{if(t&&"number"===t.type){var n=1/0,r=Array.from(g$(e.map(e=>e.value))).sort((e,t)=>e-t),i=r[0],a=r[r.length-1];if(null==i||null==a)return 1/0;var o=a-i;if(0===o)return 1/0;for(var s=0;s<r.length-1;s++){var A=r[s],l=r[s+1];if(null!=A&&null!=l){var c=l-A;n=Math.min(n,c)}}return n/o}}),sW=kU(oW,sP,rV,BT,(e,t,n,r,i)=>i,(e,t,n,r,i)=>{if(!RI(e))return 0;var a="vertical"===t?r.height:r.width;if("gap"===i)return e*a/2;if("no-gap"===i){var o=DF(n,e*a),s=e*a/2;return s-o-(s-o)/a*o}return 0}),AW=kU(VV,(e,t,n)=>{var r=VV(e,t);return null==r||"string"!=typeof r.padding?0:sW(e,"xAxis",t,n,r.padding)},(e,t)=>{var n,r;if(null==e)return{left:0,right:0};var{padding:i}=e;return"string"==typeof i?{left:t,right:t}:{left:(null!==(n=i.left)&&void 0!==n?n:0)+t,right:(null!==(r=i.right)&&void 0!==r?r:0)+t}}),lW=kU(GV,(e,t,n)=>{var r=GV(e,t);return null==r||"string"!=typeof r.padding?0:sW(e,"yAxis",t,n,r.padding)},(e,t)=>{var n,r;if(null==e)return{top:0,bottom:0};var{padding:i}=e;return"string"==typeof i?{top:t,bottom:t}:{top:(null!==(n=i.top)&&void 0!==n?n:0)+t,bottom:(null!==(r=i.bottom)&&void 0!==r?r:0)+t}}),cW=kU([BT,AW,jT,QT,(e,t,n)=>n],(e,t,n,r,i)=>{var{padding:a}=r;return i?[a.left,n.width-a.right]:[e.left+t.left,e.left+e.width-t.right]}),uW=kU([BT,sP,lW,jT,QT,(e,t,n)=>n],(e,t,n,r,i,a)=>{var{padding:o}=i;return a?[r.height-o.bottom,o.top]:"horizontal"===t?[e.top+e.height-n.bottom,e.top+n.top]:[e.top+n.top,e.top+e.height-n.bottom]}),dW=(e,t,n,r)=>{var i;switch(t){case"xAxis":return cW(e,n,r);case"yAxis":return uW(e,n,r);case"zAxis":return null===(i=XV(e,n))||void 0===i?void 0:i.range;case"angleAxis":return CV(e);case"radiusAxis":return EV(e,n);default:return}},hW=kU([YV,dW],uV),pW=kU([eW,aW],DV),fW=kU([YV,eW,pW,hW],tW);function mW(e,t){return e.id<t.id?-1:e.id>t.id?1:0}kU([i$,Q$,SV],(e,t,n)=>e.flatMap(e=>t[e.id]).filter(Boolean).filter(e=>p$(n,e)));var gW=(e,t)=>t,yW=(e,t,n)=>n,vW=kU(uT,gW,yW,(e,t,n)=>e.filter(e=>e.orientation===t).filter(e=>e.mirror===n).sort(mW)),wW=kU(dT,gW,yW,(e,t,n)=>e.filter(e=>e.orientation===t).filter(e=>e.mirror===n).sort(mW)),xW=(e,t)=>({width:e.width,height:t.height}),bW=kU(BT,VV,xW),BW=kU(AT,BT,vW,gW,yW,(e,t,n,r,i)=>{var a,o={};return n.forEach(n=>{var s=xW(t,n);null==a&&(a=((e,t,n)=>{switch(t){case"top":return e.top;case"bottom":return n-e.bottom;default:return 0}})(t,r,e));var A="top"===r&&!i||"bottom"===r&&i;o[n.id]=a-Number(A)*s.height,a+=(A?-1:1)*s.height}),o}),CW=kU(sT,BT,wW,gW,yW,(e,t,n,r,i)=>{var a,o={};return n.forEach(n=>{var s=((e,t)=>({width:"number"==typeof t.width?t.width:60,height:e.height}))(t,n);null==a&&(a=((e,t,n)=>{switch(t){case"left":return e.left;case"right":return n-e.right;default:return 0}})(t,r,e));var A="left"===r&&!i||"right"===r&&i;o[n.id]=a-Number(A)*s.width,a+=(A?-1:1)*s.width}),o}),EW=kU([BT,VV,(e,t)=>{var n=VV(e,t);if(null!=n)return BW(e,n.orientation,n.mirror)},(e,t)=>t],(e,t,n,r)=>{if(null!=t){var i=null==n?void 0:n[r];return null==i?{x:e.left,y:0}:{x:e.left,y:i}}}),kW=kU([BT,GV,(e,t)=>{var n=GV(e,t);if(null!=n)return CW(e,n.orientation,n.mirror)},(e,t)=>t],(e,t,n,r)=>{if(null!=t){var i=null==n?void 0:n[r];return null==i?{x:0,y:e.top}:{x:i,y:e.top}}}),SW=kU(BT,GV,(e,t)=>({width:"number"==typeof t.width?t.width:60,height:e.height})),FW=(e,t,n)=>{switch(t){case"xAxis":return bW(e,n).width;case"yAxis":return SW(e,n).height;default:return}},QW=(e,t,n,r)=>{if(null!=n){var{allowDuplicatedCategory:i,type:a,dataKey:o}=n,s=GI(e,r),A=t.map(e=>e.value);return o&&s&&"category"===a&&i&&LF(A)?A:void 0}},jW=kU([sP,h$,YV,SV],QW),UW=(e,t,n,r)=>{if(null!=n&&null!=n.dataKey){var{type:i,scale:a}=n;return!GI(e,r)||"number"!==i&&"auto"===a?void 0:t.map(e=>e.value)}},OW=kU([sP,h$,JV,SV],UW),NW=kU([sP,(e,t,n)=>{switch(t){case"xAxis":return VV(e,n);case"yAxis":return GV(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},eW,fW,jW,OW,dW,rW,SV],(e,t,n,r,i,a,o,s,A)=>{if(null!=t){var l=GI(e,A);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:A,categoricalDomain:a,duplicateDomain:i,isCategorical:l,niceTicks:s,range:o,realScaleType:n,scale:r}}}),IW=kU([sP,JV,eW,fW,rW,dW,jW,OW,SV],(e,t,n,r,i,a,o,s,A)=>{if(null!=t&&null!=r){var l=GI(e,A),{type:c,ticks:u,tickCount:d}=t,h="scaleBand"===n&&"function"==typeof r.bandwidth?r.bandwidth()/2:2,p="category"===c&&r.bandwidth?r.bandwidth()/h:0;p="angleAxis"===A&&null!=a&&a.length>=2?2*UF(a[0]-a[1])*p:p;var f=u||i;return f?f.map((e,t)=>{var n=o?o.indexOf(e):e,i=r.map(n);return RI(i)?{index:t,coordinate:i+p,value:e,offset:p}:null}).filter(zF):l&&s?s.map((e,t)=>{var n=r.map(e);return RI(n)?{coordinate:n+p,value:e,index:t,offset:p}:null}).filter(zF):r.ticks?r.ticks(d).map((e,t)=>{var n=r.map(e);return RI(n)?{coordinate:n+p,value:e,index:t,offset:p}:null}).filter(zF):r.domain().map((e,t)=>{var n=r.map(e);return RI(n)?{coordinate:n+p,value:o?o[e]:e,index:t,offset:p}:null}).filter(zF)}}),TW=kU([sP,JV,fW,dW,jW,OW,SV],(e,t,n,r,i,a,o)=>{if(null!=t&&null!=n&&null!=r&&r[0]!==r[1]){var s=GI(e,o),{tickCount:A}=t,l=0;return l="angleAxis"===o&&(null==r?void 0:r.length)>=2?2*UF(r[0]-r[1])*l:l,s&&a?a.map((e,t)=>{var r=n.map(e);return RI(r)?{coordinate:r+l,value:e,index:t,offset:l}:null}).filter(zF):n.ticks?n.ticks(A).map((e,t)=>{var r=n.map(e);return RI(r)?{coordinate:r+l,value:e,index:t,offset:l}:null}).filter(zF):n.domain().map((e,t)=>{var r=n.map(e);return RI(r)?{coordinate:r+l,value:i?i[e]:e,index:t,offset:l}:null}).filter(zF)}}),PW=kU(YV,fW,(e,t)=>{if(null!=e&&null!=t)return HV(HV({},e),{},{scale:t})}),MW=kU([YV,eW,J$,hW],tW),DW=kU((e,t,n)=>XV(e,n),MW,(e,t)=>{if(null!=e&&null!=t)return HV(HV({},e),{},{scale:t})}),LW=kU([sP,uT,dT],(e,t,n)=>{switch(e){case"horizontal":return t.some(e=>e.reversed)?"right-to-left":"left-to-right";case"vertical":return n.some(e=>e.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),HW=e=>e.options.defaultTooltipEventType,_W=e=>e.options.validateTooltipEventTypes;function RW(e,t,n){if(null==e)return t;var r=e?"axis":"item";return null==n?t:n.includes(r)?r:t}function KW(e,t){return RW(t,HW(e),_W(e))}var zW=(e,t)=>{var n,r=Number(t);if(!OF(r)&&null!=t)return r>=0?null==e||null===(n=e[r])||void 0===n?void 0:n.value:void 0},VW={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},$W=tI({name:"tooltip",initialState:{itemInteraction:{click:VW,hover:VW},axisInteraction:{click:VW,hover:VW},keyboardInteraction:VW,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0,graphicalItemId:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:VN()},replaceTooltipEntrySettings:{reducer(e,t){var{prev:n,next:r}=t.payload,i=xN(e).tooltipItemPayloads.indexOf(n);i>-1&&(e.tooltipItemPayloads[i]=r)},prepare:VN()},removeTooltipEntrySettings:{reducer(e,t){var n=xN(e).tooltipItemPayloads.indexOf(t.payload);n>-1&&e.tooltipItemPayloads.splice(n,1)},prepare:VN()},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate}}}),{addTooltipEntrySettings:WW,replaceTooltipEntrySettings:GW,removeTooltipEntrySettings:qW,setTooltipSettingsState:XW,setActiveMouseOverItemIndex:YW,mouseLeaveItem:JW,mouseLeaveChart:ZW,setActiveClickItemIndex:eG,setMouseOverAxisIndex:tG,setMouseClickAxisIndex:nG,setSyncInteraction:rG,setKeyboardInteraction:iG}=$W.actions,aG=$W.reducer;function oG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function sG(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oG(Object(n),!0).forEach(function(t){AG(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oG(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function AG(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var lG=(e,t,n,r)=>{if(null==t)return VW;var i=function(e,t,n){return"axis"===t?"click"===n?e.axisInteraction.click:e.axisInteraction.hover:"click"===n?e.itemInteraction.click:e.itemInteraction.hover}(e,t,n);if(null==i)return VW;if(i.active)return i;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&null!=e.syncInteraction.index)return e.syncInteraction;var a=!0===e.settings.active;if(null!=i.index){if(a)return sG(sG({},i),{},{active:!0})}else if(null!=r)return{active:!0,coordinate:void 0,dataKey:void 0,index:r,graphicalItemId:void 0};return sG(sG({},VW),{},{coordinate:i.coordinate})};function cG(e,t){var n=function(e){if("number"==typeof e)return Number.isFinite(e)?e:void 0;if(e instanceof Date){var t=e.valueOf();return Number.isFinite(t)?t:void 0}var n=Number(e);return Number.isFinite(n)?n:void 0}(e),r=t[0],i=t[1];if(void 0===n)return!1;var a=Math.min(r,i),o=Math.max(r,i);return n>=a&&n<=o}var uG=(e,t,n,r)=>{var i=null==e?void 0:e.index;if(null==i)return null;var a=Number(i);if(!RI(a))return i;var o=1/0;t.length>0&&(o=t.length-1);var s=Math.max(0,Math.min(a,o)),A=t[s];return null==A||function(e,t,n){if(null==n||null==t)return!0;var r=WI(e,t);return null==r||!gz(n)||cG(r,n)}(A,n,r)?String(s):null},dG=(e,t,n,r,i,a,o)=>{if(null!=a){var s=o[0],A=null==s?void 0:s.getPosition(a);if(null!=A)return A;var l=null==i?void 0:i[Number(a)];if(l)return"horizontal"===n?{x:l.coordinate,y:(r.top+t)/2}:{x:(r.left+e)/2,y:l.coordinate}}},hG=(e,t,n,r)=>{if("axis"===t)return e.tooltipItemPayloads;if(0===e.tooltipItemPayloads.length)return[];var i;if(null==(i="hover"===n?e.itemInteraction.hover.graphicalItemId:e.itemInteraction.click.graphicalItemId)&&null!=r){var a=e.tooltipItemPayloads[0];return null!=a?[a]:[]}return e.tooltipItemPayloads.filter(e=>{var t;return(null===(t=e.settings)||void 0===t?void 0:t.graphicalItemId)===i})},pG=e=>e.options.tooltipPayloadSearcher,fG=e=>e.tooltip;function mG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function gG(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mG(Object(n),!0).forEach(function(t){yG(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mG(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function yG(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var vG=(e,t,n,r,i,a,o)=>{if(null!=t&&null!=a){var{chartData:s,computedData:A,dataStartIndex:l,dataEndIndex:c}=n;return e.reduce((e,n)=>{var u,d,h,{dataDefinedOnItem:p,settings:f}=n,m=function(e,t){return null!=e?e:t}(p,s),g=Array.isArray(m)?_I(m,l,c):m,y=null!==(u=null==f?void 0:f.dataKey)&&void 0!==u?u:r,v=null==f?void 0:f.nameKey;(d=r&&Array.isArray(g)&&!Array.isArray(g[0])&&"axis"===o?_F(g,r,i):a(g,t,A,v),Array.isArray(d))?d.forEach(t=>{var n=gG(gG({},f),{},{name:t.name,unit:t.unit,color:void 0,fill:void 0});e.push(aT({tooltipEntrySettings:n,dataKey:t.dataKey,payload:t.payload,value:WI(t.payload,t.dataKey),name:t.name}))}):e.push(aT({tooltipEntrySettings:f,dataKey:y,payload:d,value:WI(d,y),name:null!==(h=WI(d,v))&&void 0!==h?h:null==f?void 0:f.name}));return e},[])}},wG=kU([y$,ZV,oV],Z$),xG=kU([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),bG=kU([IV,TV],e$),BG=kU([xG,y$,bG],r$,{memoizeOptions:{resultEqualityCheck:NV}}),CG=kU([BG],e=>e.filter(UV)),EG=kU([BG],A$,{memoizeOptions:{resultEqualityCheck:NV}}),kG=kU([EG,pz],c$),SG=kU([CG,pz,y$],jV),FG=kU([kG,y$,BG],d$),QG=kU([y$],E$),jG=kU([y$],e=>e.allowDataOverflow),UG=kU([QG,jG],vz),OG=kU([BG],e=>e.filter(UV)),NG=kU([SG,OG,iV,aV],x$),IG=kU([NG,pz,IV,UG],B$),TG=kU([BG],o$),PG=kU([kG,y$,TG,Q$,IV],U$,{memoizeOptions:{resultEqualityCheck:OV}}),MG=kU([I$,IV,TV],T$),DG=kU([MG,IV],_$),LG=kU([M$,IV,TV],T$),HG=kU([LG,IV],K$),_G=kU([L$,IV,TV],T$),RG=kU([_G,IV],V$),KG=kU([DG,RG,HG],j$),zG=kU([y$,QG,UG,IG,PG,KG,sP,IV],G$),VG=kU([y$,sP,kG,FG,iV,IV,zG],Y$),$G=kU([VG,y$,wG],nW),WG=kU([y$,VG,$G,IV],iW),GG=e=>{var t=IV(e),n=TV(e);return dW(e,t,n,!1)},qG=kU([y$,GG],uV),XG=kU([y$,wG,WG,qG],tW),YG=kU([sP,FG,y$,IV],QW),JG=kU([sP,FG,y$,IV],UW),ZG=kU([sP,y$,wG,XG,GG,YG,JG,IV],(e,t,n,r,i,a,o,s)=>{if(t){var{type:A}=t,l=GI(e,s);if(r){var c="scaleBand"===n&&r.bandwidth?r.bandwidth()/2:2,u="category"===A&&r.bandwidth?r.bandwidth()/c:0;return u="angleAxis"===s&&null!=i&&(null==i?void 0:i.length)>=2?2*UF(i[0]-i[1])*u:u,l&&o?o.map((e,t)=>{var n=r.map(e);return RI(n)?{coordinate:n+u,value:e,index:t,offset:u}:null}).filter(zF):r.domain().map((e,t)=>{var n=r.map(e);return RI(n)?{coordinate:n+u,value:a?a[e]:e,index:t,offset:u}:null}).filter(zF)}}}),eq=kU([HW,_W,e=>e.tooltip.settings],(e,t,n)=>RW(n.shared,e,t)),tq=e=>e.tooltip.settings.trigger,nq=e=>e.tooltip.settings.defaultIndex,rq=kU([fG,eq,tq,nq],lG),iq=kU([rq,kG,v$,VG],uG),aq=kU([ZG,iq],zW),oq=kU([rq],e=>{if(e)return e.dataKey}),sq=kU([rq],e=>{if(e)return e.graphicalItemId}),Aq=kU([fG,eq,tq,nq],hG),lq=kU([sT,AT,sP,BT,ZG,nq,Aq],dG),cq=kU([rq,lq],(e,t)=>null!=e&&e.coordinate?e.coordinate:t),uq=kU([rq],e=>{var t;return null!==(t=null==e?void 0:e.active)&&void 0!==t&&t}),dq=kU([Aq,iq,pz,v$,aq,pG,eq],vG),hq=kU([dq],e=>{if(null!=e){var t=e.map(e=>e.payload).filter(e=>null!=e);return Array.from(new Set(t))}});function pq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function fq(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pq(Object(n),!0).forEach(function(t){mq(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pq(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function mq(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var gq=()=>{var e=pU(y$),t=pU(ZG),n=pU(XG);return iT(e&&n?fq(fq({},e),{},{scale:n}):void 0,t)};function yq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function vq(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yq(Object(n),!0).forEach(function(t){wq(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yq(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function wq(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var xq=(e,t,n,r,i)=>{var a,o=null!==(a=null==t?void 0:t.length)&&void 0!==a?a:0;if(o<=1||null==e)return 0;if("angleAxis"===r&&null!=i&&Math.abs(Math.abs(i[1]-i[0])-360)<=1e-6)for(var s=0;s<o;s++){var A,l,c,u,d,h=s>0?null===(A=n[s-1])||void 0===A?void 0:A.coordinate:null===(l=n[o-1])||void 0===l?void 0:l.coordinate,p=null===(c=n[s])||void 0===c?void 0:c.coordinate,f=s>=o-1?null===(u=n[0])||void 0===u?void 0:u.coordinate:null===(d=n[s+1])||void 0===d?void 0:d.coordinate,m=void 0;if(null!=h&&null!=p&&null!=f)if(UF(p-h)!==UF(f-p)){var g=[];if(UF(f-p)===UF(i[1]-i[0])){m=f;var y=p+i[1]-i[0];g[0]=Math.min(y,(y+h)/2),g[1]=Math.max(y,(y+h)/2)}else{m=h;var v=f+i[1]-i[0];g[0]=Math.min(p,(v+p)/2),g[1]=Math.max(p,(v+p)/2)}var w,x=[Math.min(p,(m+p)/2),Math.max(p,(m+p)/2)];if(e>x[0]&&e<=x[1]||e>=g[0]&&e<=g[1])return null===(w=n[s])||void 0===w?void 0:w.index}else{var b,B=Math.min(h,f),C=Math.max(h,f);if(e>(B+p)/2&&e<=(C+p)/2)return null===(b=n[s])||void 0===b?void 0:b.index}}else if(t)for(var E=0;E<o;E++){var k=t[E];if(null!=k){var S=t[E+1],F=t[E-1];if(0===E&&null!=S&&e<=(k.coordinate+S.coordinate)/2)return k.index;if(E===o-1&&null!=F&&e>(k.coordinate+F.coordinate)/2)return k.index;if(E>0&&E<o-1&&null!=F&&null!=S&&e>(k.coordinate+F.coordinate)/2&&e<=(k.coordinate+S.coordinate)/2)return k.index}}return-1},bq=(e,t)=>t,Bq=(e,t,n)=>n,Cq=(e,t,n,r)=>r,Eq=kU(ZG,e=>XU(e,e=>e.coordinate)),kq=kU([fG,bq,Bq,Cq],lG),Sq=kU([kq,kG,v$,VG],uG),Fq=kU([fG,bq,Bq,Cq],hG),Qq=kU([sT,AT,sP,BT,ZG,Cq,Fq],dG),jq=kU([kq,Qq],(e,t)=>{var n;return null!==(n=e.coordinate)&&void 0!==n?n:t}),Uq=kU([ZG,Sq],zW),Oq=kU([Fq,Sq,pz,v$,Uq,pG,bq],vG),Nq=kU([kq,Sq],(e,t)=>({isActive:e.active&&null!=t,activeIndex:t})),Iq=(e,t,n,r,i,a,o)=>{if(e&&r&&i&&a&&n){var s=hL(e,n);if(s){var A=((e,t)=>"centric"===t?e.angle:e.radius)(s,t),l=xq(A,o,a,r,i),c=((e,t,n,r)=>{var i=t.find(e=>e&&e.index===n);if(i){if("centric"===e){var a=i.coordinate,{radius:o}=r;return vq(vq(vq({},r),lL(r.cx,r.cy,o,a)),{},{angle:a,radius:o})}var s=i.coordinate,{angle:A}=r;return vq(vq(vq({},r),lL(r.cx,r.cy,s,A)),{},{angle:A,radius:s})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}})(t,a,l,s);return{activeIndex:String(l),activeCoordinate:c}}}},Tq=kU(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,n)=>n,(e,t,n)=>{if(null!=t){var r=e[t];if(null!=r)return n?r.panoramaElement:r.element}}),Pq=kU(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(e=>parseInt(e,10)).concat(Object.values(cV));return Array.from(new Set(t)).sort((e,t)=>e-t)},{memoizeOptions:{resultEqualityCheck:function(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return!1}}});function Mq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Dq(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Mq(Object(n),!0).forEach(function(t){Lq(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mq(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Lq(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Hq={zIndexMap:Object.values(cV).reduce((e,t)=>Dq(Dq({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),{})},_q=new Set(Object.values(cV));var Rq=tI({name:"zIndex",initialState:Hq,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]?e.zIndexMap[n].consumers+=1:e.zIndexMap[n]={consumers:1,element:void 0,panoramaElement:void 0}},prepare:VN()},unregisterZIndexPortal:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]&&(e.zIndexMap[n].consumers-=1,e.zIndexMap[n].consumers<=0&&!function(e){return _q.has(e)}(n)&&delete e.zIndexMap[n])},prepare:VN()},registerZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:n,element:r,isPanorama:i}=t.payload;e.zIndexMap[n]?i?e.zIndexMap[n].panoramaElement=r:e.zIndexMap[n].element=r:e.zIndexMap[n]={consumers:0,element:i?void 0:r,panoramaElement:i?r:void 0}},prepare:VN()},unregisterZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]&&(t.payload.isPanorama?e.zIndexMap[n].panoramaElement=void 0:e.zIndexMap[n].element=void 0)},prepare:VN()}}}),{registerZIndexPortal:Kq,unregisterZIndexPortal:zq,registerZIndexPortalElement:Vq,unregisterZIndexPortalElement:$q}=Rq.actions,Wq=Rq.reducer;function Gq(e){var{zIndex:t,children:n}=e,r=void 0!==AP()&&void 0!==t&&0!==t,i=ST(),a=cU();Te.useLayoutEffect(()=>r?(a(Kq({zIndex:t})),()=>{a(zq({zIndex:t}))}):VF,[a,t,r]);var o=pU(e=>Tq(e,t,i));return r?o?Pe.createPortal(n,o):null:n}function qq(){return qq=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},qq.apply(null,arguments)}function Xq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Yq(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Xq(Object(n),!0).forEach(function(t){Jq(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xq(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Jq(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zq(e){var{cursor:t,cursorComp:n,cursorProps:r}=e;return Te.isValidElement(t)?Te.cloneElement(t,r):Te.createElement(n,r)}function eX(e){var t,n,r,i,{coordinate:a,payload:o,index:s,offset:A,tooltipAxisBandSize:l,layout:c,cursor:u,tooltipEventType:d,chartName:h}=e,p=a,f=o,m=s;if(!u||!p||"ScatterChart"!==h&&"axis"!==d)return null;if("ScatterChart"===h)n=p,r=ZM,i=cV.cursorLine;else if("BarChart"===h)n=function(e,t,n,r){var i=r/2;return{stroke:"none",fill:"#ccc",x:"horizontal"===e?t.x-i:n.left+.5,y:"horizontal"===e?n.top+.5:t.y-i,width:"horizontal"===e?r:n.width-1,height:"horizontal"===e?n.height-1:r}}(c,p,A,l),r=XD,i=cV.cursorRectangle;else if("radial"===c&&eQ(p)){var{cx:g,cy:y,radius:v,startAngle:w,endAngle:x}=pL(p);n={cx:g,cy:y,startAngle:w,endAngle:x,innerRadius:v,outerRadius:v},r=wL,i=cV.cursorLine}else n={points:xL(c,p,A)},r=WM,i=cV.cursorLine;var b="object"==typeof u&&"className"in u?u.className:void 0,B=Yq(Yq(Yq(Yq({stroke:"#ccc",pointerEvents:"none"},A),n),Gk(u)),{},{payload:f,payloadIndex:m,className:yh("recharts-tooltip-cursor",b)});return De.createElement(Gq,{zIndex:null!==(t=e.zIndex)&&void 0!==t?t:i},De.createElement(Zq,{cursor:u,cursorComp:r,cursorProps:B}))}function tX(e){var t=gq(),n=iP(),r=AP(),i=pU(oV);return null==t||null==n||null==r||null==i?null:De.createElement(eX,qq({},e,{offset:n,layout:r,tooltipAxisBandSize:t,chartName:i}))}var nX,rX=Te.createContext(null),iX={exports:{}};var aX=(nX||(nX=1,function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function a(e,t,r,a,o){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new i(r,a||e,o),A=n?n+t:t;return e._events[A]?e._events[A].fn?e._events[A]=[e._events[A],s]:e._events[A].push(s):(e._events[A]=s,e._eventsCount++),e}function o(e,t){0===--e._eventsCount?e._events=new r:delete e._events[t]}function s(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},s.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,a=r.length,o=new Array(a);i<a;i++)o[i]=r[i].fn;return o},s.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},s.prototype.emit=function(e,t,r,i,a,o){var s=n?n+e:e;if(!this._events[s])return!1;var A,l,c=this._events[s],u=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),u){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,r),!0;case 4:return c.fn.call(c.context,t,r,i),!0;case 5:return c.fn.call(c.context,t,r,i,a),!0;case 6:return c.fn.call(c.context,t,r,i,a,o),!0}for(l=1,A=new Array(u-1);l<u;l++)A[l-1]=arguments[l];c.fn.apply(c.context,A)}else{var d,h=c.length;for(l=0;l<h;l++)switch(c[l].once&&this.removeListener(e,c[l].fn,void 0,!0),u){case 1:c[l].fn.call(c[l].context);break;case 2:c[l].fn.call(c[l].context,t);break;case 3:c[l].fn.call(c[l].context,t,r);break;case 4:c[l].fn.call(c[l].context,t,r,i);break;default:if(!A)for(d=1,A=new Array(u-1);d<u;d++)A[d-1]=arguments[d];c[l].fn.apply(c[l].context,A)}}return!0},s.prototype.on=function(e,t,n){return a(this,e,t,n,!1)},s.prototype.once=function(e,t,n){return a(this,e,t,n,!0)},s.prototype.removeListener=function(e,t,r,i){var a=n?n+e:e;if(!this._events[a])return this;if(!t)return o(this,a),this;var s=this._events[a];if(s.fn)s.fn!==t||i&&!s.once||r&&s.context!==r||o(this,a);else{for(var A=0,l=[],c=s.length;A<c;A++)(s[A].fn!==t||i&&!s[A].once||r&&s[A].context!==r)&&l.push(s[A]);l.length?this._events[a]=1===l.length?l[0]:l:o(this,a)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&o(this,t)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s}(iX)),iX.exports);var oX=new(ry(aX)),sX="recharts.syncEvent.tooltip",AX="recharts.syncEvent.brush",lX=(e,t)=>{if(t&&Array.isArray(e)){var n=Number.parseInt(t,10);if(!OF(n))return e[n]}},cX=tI({name:"options",initialState:{chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},reducers:{createEventEmitter:e=>{null==e.eventEmitter&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),uX=cX.reducer,{createEventEmitter:dX}=cX.actions;function hX(e){return e.tooltip.syncInteraction}var pX=tI({name:"chartData",initialState:{chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},reducers:{setChartData(e,t){if(e.chartData=t.payload,null==t.payload)return e.dataStartIndex=0,void(e.dataEndIndex=0);t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var{startIndex:n,endIndex:r}=t.payload;null!=n&&(e.dataStartIndex=n),null!=r&&(e.dataEndIndex=r)}}}),{setChartData:fX,setDataStartEndIndexes:mX,setComputedData:gX}=pX.actions,yX=pX.reducer,vX=["x","y"];function wX(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function xX(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wX(Object(n),!0).forEach(function(t){bX(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wX(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function bX(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function BX(){var e=pU(sV),t=pU(lV),n=cU(),r=pU(AV),i=pU(ZG),a=AP(),o=nP(),s=pU(e=>e.rootProps.className);Te.useEffect(()=>{if(null==e)return VF;var s=(s,A,l)=>{var c;if(t!==l&&e===s)if("index"!==r){if(null!=i){var u;if("function"==typeof r){var d={activeTooltipIndex:null==A.payload.index?void 0:Number(A.payload.index),isTooltipActive:A.payload.active,activeIndex:null==A.payload.index?void 0:Number(A.payload.index),activeLabel:A.payload.label,activeDataKey:A.payload.dataKey,activeCoordinate:A.payload.coordinate},h=r(i,d);u=i[h]}else"value"===r&&(u=i.find(e=>String(e.value)===A.payload.label));var{coordinate:p}=A.payload;if(null!=u&&!1!==A.payload.active&&null!=p&&null!=o){var{x:f,y:m}=p,g=Math.min(f,o.x+o.width),y=Math.min(m,o.y+o.height),v={x:"horizontal"===a?u.coordinate:g,y:"horizontal"===a?y:u.coordinate},w=rG({active:A.payload.active,coordinate:v,dataKey:A.payload.dataKey,index:String(u.index),label:A.payload.label,sourceViewBox:A.payload.sourceViewBox,graphicalItemId:A.payload.graphicalItemId});n(w)}else n(rG({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}))}}else if(o&&null!=A&&null!==(c=A.payload)&&void 0!==c&&c.coordinate&&A.payload.sourceViewBox){var x=A.payload.coordinate,{x:b,y:B}=x,C=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(x,vX),{x:E,y:k,width:S,height:F}=A.payload.sourceViewBox,Q=xX(xX({},C),{},{x:o.x+(S?(b-E)/S:0)*o.width,y:o.y+(F?(B-k)/F:0)*o.height});n(xX(xX({},A),{},{payload:xX(xX({},A.payload),{},{coordinate:Q})}))}else n(A)};return oX.on(sX,s),()=>{oX.off(sX,s)}},[s,n,t,e,r,i,a,o])}function CX(){var e=cU();Te.useEffect(()=>{e(dX())},[e]),BX(),function(){var e=pU(sV),t=pU(lV),n=cU();Te.useEffect(()=>{if(null==e)return VF;var r=(r,i,a)=>{t!==a&&e===r&&n(mX(i))};return oX.on(AX,r),()=>{oX.off(AX,r)}},[n,t,e])}()}function EX(e,t,n,r,i,a){var o=pU(n=>((e,t,n)=>{if(null!=t){var r=fG(e);return"axis"===t?"hover"===n?r.axisInteraction.hover.dataKey:r.axisInteraction.click.dataKey:"hover"===n?r.itemInteraction.hover.dataKey:r.itemInteraction.click.dataKey}})(n,e,t)),s=pU(lV),A=pU(sV),l=pU(AV),c=pU(hX),u=null==c?void 0:c.active,d=nP();Te.useEffect(()=>{if(!u&&null!=A&&null!=s){var e=rG({active:a,coordinate:n,dataKey:o,index:i,label:"number"==typeof r?String(r):r,sourceViewBox:d,graphicalItemId:void 0});oX.emit(sX,A,e,s)}},[u,n,o,i,r,s,A,l,a,d])}function kX(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function SX(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kX(Object(n),!0).forEach(function(t){FX(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kX(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function FX(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QX(e){return e.dataKey}var jX=[],UX={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,includeHidden:!1,isAnimationActive:"auto",itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function OX(e){var t,n,r=aQ(e,UX),{active:i,allowEscapeViewBox:a,animationDuration:o,animationEasing:s,content:A,filterNull:l,isAnimationActive:c,offset:u,payloadUniqBy:d,position:h,reverseDirection:p,useTranslate3d:f,wrapperStyle:m,cursor:g,shared:y,trigger:v,defaultIndex:w,portal:x,axisId:b}=r,B=cU(),C="number"==typeof w?String(w):w;Te.useEffect(()=>{B(XW({shared:y,trigger:v,axisId:b,active:i,defaultIndex:C}))},[B,y,v,b,i,C]);var E=nP(),k=TM(),S=function(e){return pU(t=>KW(t,e))}(y),{activeIndex:F,isActive:Q}=null!==(t=pU(e=>Nq(e,S,v,C)))&&void 0!==t?t:{},j=pU(e=>Oq(e,S,v,C)),U=pU(e=>Uq(e,S,v,C)),O=pU(e=>jq(e,S,v,C)),N=j,I=Te.useContext(rX),T=null!==(n=null!=i?i:Q)&&void 0!==n&&n,[P,M]=ZU([N,T]),D="axis"===S?U:void 0;EX(S,v,O,D,F,T);var L=null!=x?x:I;if(null==L||null==E||null==S)return null;var H=null!=N?N:jX;T||(H=jX),l&&H.length&&(H=Wj(H.filter(e=>null!=e.value&&(!0!==e.hide||r.includeHidden)),d,QX));var _=H.length>0,R=De.createElement(IM,{allowEscapeViewBox:a,animationDuration:o,animationEasing:s,isAnimationActive:c,active:T,coordinate:O,hasPayload:_,offset:u,position:h,reverseDirection:p,useTranslate3d:f,viewBox:E,wrapperStyle:m,lastBoundingBox:P,innerRef:M,hasPortalFromProps:Boolean(x)},function(e,t){return De.isValidElement(e)?De.cloneElement(e,t):"function"==typeof e?De.createElement(e,t):De.createElement(kM,t)}(A,SX(SX({},r),{},{payload:H,label:D,active:T,activeIndex:F,coordinate:O,accessibilityLayer:k})));return De.createElement(De.Fragment,null,Pe.createPortal(R,L),T&&De.createElement(tX,{cursor:g,tooltipEventType:S,coordinate:O,payload:H,index:F}))}var NX=e=>null;function IX(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}NX.displayName="Cell";function TX(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function PX(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var MX=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?TX(Object(n),!0).forEach(function(t){PX(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TX(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},{cacheSize:2e3,enableCache:!0}),DX=new class{constructor(e){IX(this,"cache",new Map),this.maxSize=e}get(e){var t=this.cache.get(e);return void 0!==t&&(this.cache.delete(e),this.cache.set(e,t)),t}set(e,t){if(this.cache.has(e))this.cache.delete(e);else if(this.cache.size>=this.maxSize){var n=this.cache.keys().next().value;null!=n&&this.cache.delete(n)}this.cache.set(e,t)}clear(){this.cache.clear()}size(){return this.cache.size}}(MX.cacheSize),LX={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},HX="recharts_measurement_span";var _X=(e,t)=>{try{var n=document.getElementById(HX);n||((n=document.createElement("span")).setAttribute("id",HX),n.setAttribute("aria-hidden","true"),document.body.appendChild(n)),Object.assign(n.style,LX,t),n.textContent="".concat(e);var r=n.getBoundingClientRect();return{width:r.width,height:r.height}}catch(i){return{width:0,height:0}}},RX=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==e||CD)return{width:0,height:0};if(!MX.enableCache)return _X(e,t);var n=function(e,t){var n=t.fontSize||"",r=t.fontFamily||"",i=t.fontWeight||"",a=t.fontStyle||"",o=t.letterSpacing||"",s=t.textTransform||"";return"".concat(e,"|").concat(n,"|").concat(r,"|").concat(i,"|").concat(a,"|").concat(o,"|").concat(s)}(e,t),r=DX.get(n);if(r)return r;var i=_X(e,t);return DX.set(n,i),i};var KX=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,zX=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,VX=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,$X=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,WX={cm:96/2.54,mm:96/25.4,pt:96/72,pc:16,in:96,Q:96/101.6,px:1},GX=["cm","mm","pt","pc","in","Q","px"];var qX,XX,YX,JX="NaN";class ZX{static parse(e){var t,[,n,r]=null!==(t=$X.exec(e))&&void 0!==t?t:[];return null==n?ZX.NaN:new ZX(parseFloat(n),null!=r?r:"")}constructor(e,t){this.num=e,this.unit=t,this.num=e,this.unit=t,OF(e)&&(this.unit=""),""===t||VX.test(t)||(this.num=NaN,this.unit=""),function(e){return GX.includes(e)}(t)&&(this.num=function(e,t){return e*WX[t]}(e,t),this.unit="px")}add(e){return this.unit!==e.unit?new ZX(NaN,""):new ZX(this.num+e.num,this.unit)}subtract(e){return this.unit!==e.unit?new ZX(NaN,""):new ZX(this.num-e.num,this.unit)}multiply(e){return""!==this.unit&&""!==e.unit&&this.unit!==e.unit?new ZX(NaN,""):new ZX(this.num*e.num,this.unit||e.unit)}divide(e){return""!==this.unit&&""!==e.unit&&this.unit!==e.unit?new ZX(NaN,""):new ZX(this.num/e.num,this.unit||e.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return OF(this.num)}}function eY(e){if(null==e||e.includes(JX))return JX;for(var t=e;t.includes("*")||t.includes("/");){var n,[,r,i,a]=null!==(n=KX.exec(t))&&void 0!==n?n:[],o=ZX.parse(null!=r?r:""),s=ZX.parse(null!=a?a:""),A="*"===i?o.multiply(s):o.divide(s);if(A.isNaN())return JX;t=t.replace(KX,A.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var l,[,c,u,d]=null!==(l=zX.exec(t))&&void 0!==l?l:[],h=ZX.parse(null!=c?c:""),p=ZX.parse(null!=d?d:""),f="+"===u?h.add(p):h.subtract(p);if(f.isNaN())return JX;t=t.replace(zX,f.toString())}return t}qX=ZX,XX="NaN",YX=new ZX(NaN,""),(XX=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(XX))in qX?Object.defineProperty(qX,XX,{value:YX,enumerable:!0,configurable:!0,writable:!0}):qX[XX]=YX;var tY=/\(([^()]*)\)/;function nY(e){var t=e.replace(/\s+/g,"");return t=function(e){for(var t,n=e;null!=(t=tY.exec(n));){var[,r]=t;n=n.replace(tY,eY(r))}return n}(t),t=eY(t)}function rY(e){var t=function(e){try{return nY(e)}catch(t){return JX}}(e.slice(5,-1));return t===JX?"":t}var iY=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],aY=["dx","dy","angle","className","breakAll"];function oY(){return oY=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},oY.apply(null,arguments)}function sY(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var AY=/[ \f\n\r\t\v\u2028\u2029]+/,lY=e=>{var{children:t,breakAll:n,style:r}=e;try{var i=[];return RF(t)||(i=n?t.toString().split(""):t.toString().split(AY)),{wordsWithComputedWidth:i.map(e=>({word:e,width:RX(e,r).width})),spaceWidth:n?0:RX(" ",r).width}}catch(a){return null}};function cY(e){return"start"===e||"middle"===e||"end"===e||"inherit"===e}var uY=(e,t,n,r)=>e.reduce((e,i)=>{var{word:a,width:o}=i,s=e[e.length-1];if(s&&null!=o&&(null==t||r||s.width+o+n<Number(t)))s.words.push(a),s.width+=o+n;else{var A={words:[a],width:o};e.push(A)}return e},[]),dY=e=>e.reduce((e,t)=>e.width>t.width?e:t),hY=(e,t,n,r,i,a,o,s)=>{var A=e.slice(0,t),l=lY({breakAll:n,style:r,children:A+"…"});if(!l)return[!1,[]];var c=uY(l.wordsWithComputedWidth,a,o,s);return[c.length>i||dY(c).width>Number(a),c]},pY=e=>[{words:RF(e)?[]:e.toString().split(AY),width:void 0}],fY=e=>{var{width:t,scaleToFit:n,children:r,style:i,breakAll:a,maxLines:o}=e;if((t||n)&&!CD){var s=lY({breakAll:a,children:r,style:i});if(!s)return pY(r);var{wordsWithComputedWidth:A,spaceWidth:l}=s;return((e,t,n,r,i)=>{var{maxLines:a,children:o,style:s,breakAll:A}=e,l=IF(a),c=String(o),u=uY(t,r,n,i);if(!l||i)return u;if(!(u.length>a||dY(u).width>Number(r)))return u;for(var d,h=0,p=c.length-1,f=0;h<=p&&f<=c.length-1;){var m=Math.floor((h+p)/2),g=m-1,[y,v]=hY(c,g,A,s,a,r,n,i),[w]=hY(c,m,A,s,a,r,n,i);if(y||w||(h=m+1),y&&w&&(p=m-1),!y&&w){d=v;break}f++}return d||u})({breakAll:a,children:r,maxLines:o,style:i},A,l,t,Boolean(n))}return pY(r)},mY="#808080",gY={angle:0,breakAll:!1,capHeight:"0.71em",fill:mY,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},yY=Te.forwardRef((e,t)=>{var n=aQ(e,gY),{x:r,y:i,lineHeight:a,capHeight:o,fill:s,scaleToFit:A,textAnchor:l,verticalAnchor:c}=n,u=sY(n,iY),d=Te.useMemo(()=>fY({breakAll:u.breakAll,children:u.children,maxLines:u.maxLines,scaleToFit:A,style:u.style,width:u.width}),[u.breakAll,u.children,u.maxLines,A,u.style,u.width]),{dx:h,dy:p,angle:f,className:m,breakAll:g}=u,y=sY(u,aY);if(!TF(r)||!TF(i)||0===d.length)return null;var v,w=Number(r)+(IF(h)?h:0),x=Number(i)+(IF(p)?p:0);if(!RI(w)||!RI(x))return null;switch(c){case"start":v=rY("calc(".concat(o,")"));break;case"middle":v=rY("calc(".concat((d.length-1)/2," * -").concat(a," + (").concat(o," / 2))"));break;default:v=rY("calc(".concat(d.length-1," * -").concat(a,")"))}var b=[],B=d[0];if(A&&null!=B){var C=B.width,{width:E}=u;b.push("scale(".concat(IF(E)&&IF(C)?E/C:1,")"))}return f&&b.push("rotate(".concat(f,", ").concat(w,", ").concat(x,")")),b.length&&(y.transform=b.join(" ")),De.createElement("text",oY({},qk(y),{ref:t,x:w,y:x,className:yh("recharts-text",m),textAnchor:l,fill:s.includes("url")?mY:s}),d.map((e,t)=>{var n=e.words.join(g?"":" ");return De.createElement("tspan",{x:w,dy:0===t?v:a,key:"".concat(n,"-").concat(t)},n)}))});function vY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function wY(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vY(Object(n),!0).forEach(function(t){xY(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vY(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function xY(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}yY.displayName="Text";var bY=["labelRef"],BY=["content"];function CY(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function EY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function kY(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?EY(Object(n),!0).forEach(function(t){SY(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):EY(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function SY(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function FY(){return FY=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},FY.apply(null,arguments)}var QY=Te.createContext(null),jY=e=>{var{x:t,y:n,upperWidth:r,lowerWidth:i,width:a,height:o,children:s}=e,A=Te.useMemo(()=>({x:t,y:n,upperWidth:r,lowerWidth:i,width:a,height:o}),[t,n,r,i,a,o]);return De.createElement(QY.Provider,{value:A},s)},UY=()=>{var e=Te.useContext(QY),t=nP();return e||(t?tP(t):void 0)},OY=Te.createContext(null),NY=e=>null!=e&&"function"==typeof e,IY=(e,t,n,r,i)=>{var a,o,{offset:s,className:A}=e,{cx:l,cy:c,innerRadius:u,outerRadius:d,startAngle:h,endAngle:p,clockWise:f}=i,m=(u+d)/2,g=((e,t)=>UF(t-e)*Math.min(Math.abs(t-e),360))(h,p),y=g>=0?1:-1;switch(t){case"insideStart":a=h+y*s,o=f;break;case"insideEnd":a=p-y*s,o=!f;break;case"end":a=p+y*s,o=f;break;default:throw new Error("Unsupported position ".concat(t))}o=g<=0?o:!o;var v=lL(l,c,m,a),w=lL(l,c,m,a+359*(o?1:-1)),x="M".concat(v.x,",").concat(v.y,"\n A").concat(m,",").concat(m,",0,1,").concat(o?0:1,",\n ").concat(w.x,",").concat(w.y),b=RF(e.id)?MF("recharts-radial-line-"):e.id;return De.createElement("text",FY({},r,{dominantBaseline:"central",className:yh("recharts-radial-bar-label",A)}),De.createElement("defs",null,De.createElement("path",{id:b,d:x})),De.createElement("textPath",{xlinkHref:"#".concat(b)},n))},TY=e=>null!=e&&"cx"in e&&IF(e.cx),PY={angle:0,offset:5,zIndex:cV.label,position:"middle",textBreakAll:!1};function MY(e){var t,n,r,i,a,o=aQ(e,PY),{viewBox:s,parentViewBox:A,position:l,value:c,children:u,content:d,className:h="",textBreakAll:p,labelRef:f}=o,m=(t=Te.useContext(OY),n=pU(kV),t||n),g=UY(),y=function(e){if(!TY(e))return e;var{cx:t,cy:n,outerRadius:r}=e,i=2*r;return{x:t-r,y:n-r,width:i,upperWidth:i,lowerWidth:i,height:i}}(r=null==s?"center"===l?g:null!=m?m:g:TY(s)?s:tP(s));if(!r||RF(c)&&RF(u)&&!Te.isValidElement(d)&&"function"!=typeof d)return null;var v=kY(kY({},o),{},{viewBox:r});if(Te.isValidElement(d)){var{labelRef:w}=v,x=CY(v,bY);return Te.cloneElement(d,x)}if("function"==typeof d){var{content:b}=v,B=CY(v,BY);if(i=Te.createElement(d,B),Te.isValidElement(i))return i}else i=(e=>{var{value:t,formatter:n}=e,r=RF(e.children)?t:e.children;return"function"==typeof n?n(r):r})(o);var C=qk(o);if(TY(r)){if("insideStart"===l||"insideEnd"===l||"end"===l)return IY(o,l,i,C,r);a=((e,t,n)=>{var{cx:r,cy:i,innerRadius:a,outerRadius:o,startAngle:s,endAngle:A}=e,l=(s+A)/2;if("outside"===n){var{x:c,y:u}=lL(r,i,o+t,l);return{x:c,y:u,textAnchor:c>=r?"start":"end",verticalAnchor:"middle"}}if("center"===n)return{x:r,y:i,textAnchor:"middle",verticalAnchor:"middle"};if("centerTop"===n)return{x:r,y:i,textAnchor:"middle",verticalAnchor:"start"};if("centerBottom"===n)return{x:r,y:i,textAnchor:"middle",verticalAnchor:"end"};var d=(a+o)/2,{x:h,y:p}=lL(r,i,d,l);return{x:h,y:p,textAnchor:"middle",verticalAnchor:"middle"}})(r,o.offset,o.position)}else{if(!y)return null;var E=(e=>{var{viewBox:t,position:n,offset:r=0,parentViewBox:i}=e,{x:a,y:o,height:s,upperWidth:A,lowerWidth:l}=tP(t),c=a,u=a+(A-l)/2,d=(c+u)/2,h=(A+l)/2,p=c+A/2,f=s>=0?1:-1,m=f*r,g=f>0?"end":"start",y=f>0?"start":"end",v=A>=0?1:-1,w=v*r,x=v>0?"end":"start",b=v>0?"start":"end",B=i;if("top"===n){var C={x:c+A/2,y:o-m,horizontalAnchor:"middle",verticalAnchor:g};return B&&(C.height=Math.max(o-B.y,0),C.width=A),C}if("bottom"===n){var E={x:u+l/2,y:o+s+m,horizontalAnchor:"middle",verticalAnchor:y};return B&&(E.height=Math.max(B.y+B.height-(o+s),0),E.width=l),E}if("left"===n){var k={x:d-w,y:o+s/2,horizontalAnchor:x,verticalAnchor:"middle"};return B&&(k.width=Math.max(k.x-B.x,0),k.height=s),k}if("right"===n){var S={x:d+h+w,y:o+s/2,horizontalAnchor:b,verticalAnchor:"middle"};return B&&(S.width=Math.max(B.x+B.width-S.x,0),S.height=s),S}var F=B?{width:h,height:s}:{};return"insideLeft"===n?wY({x:d+w,y:o+s/2,horizontalAnchor:b,verticalAnchor:"middle"},F):"insideRight"===n?wY({x:d+h-w,y:o+s/2,horizontalAnchor:x,verticalAnchor:"middle"},F):"insideTop"===n?wY({x:c+A/2,y:o+m,horizontalAnchor:"middle",verticalAnchor:y},F):"insideBottom"===n?wY({x:u+l/2,y:o+s-m,horizontalAnchor:"middle",verticalAnchor:g},F):"insideTopLeft"===n?wY({x:c+w,y:o+m,horizontalAnchor:b,verticalAnchor:y},F):"insideTopRight"===n?wY({x:c+A-w,y:o+m,horizontalAnchor:x,verticalAnchor:y},F):"insideBottomLeft"===n?wY({x:u+w,y:o+s-m,horizontalAnchor:b,verticalAnchor:g},F):"insideBottomRight"===n?wY({x:u+l-w,y:o+s-m,horizontalAnchor:x,verticalAnchor:g},F):n&&"object"==typeof n&&(IF(n.x)||NF(n.x))&&(IF(n.y)||NF(n.y))?wY({x:a+DF(n.x,h),y:o+DF(n.y,s),horizontalAnchor:"end",verticalAnchor:"end"},F):wY({x:p,y:o+s/2,horizontalAnchor:"middle",verticalAnchor:"middle"},F)})({viewBox:y,position:l,offset:o.offset,parentViewBox:TY(A)?void 0:A});a=kY(kY({x:E.x,y:E.y,textAnchor:E.horizontalAnchor,verticalAnchor:E.verticalAnchor},void 0!==E.width?{width:E.width}:{}),void 0!==E.height?{height:E.height}:{})}return De.createElement(Gq,{zIndex:o.zIndex},De.createElement(yY,FY({ref:f,className:yh("recharts-label",h)},C,a,{textAnchor:cY(C.textAnchor)?C.textAnchor:a.textAnchor,breakAll:p}),i))}MY.displayName="Label";function DY(e){var{label:t,labelRef:n}=e;return((e,t,n)=>{if(!e)return null;var r={viewBox:t,labelRef:n};return!0===e?De.createElement(MY,FY({key:"label-implicit"},r)):TF(e)?De.createElement(MY,FY({key:"label-implicit",value:e},r)):Te.isValidElement(e)?e.type===MY?Te.cloneElement(e,kY({key:"label-implicit"},r)):De.createElement(MY,FY({key:"label-implicit",content:e},r)):NY(e)?De.createElement(MY,FY({key:"label-implicit",content:e},r)):e&&"object"==typeof e?De.createElement(MY,FY({},e,{key:"label-implicit"},r)):null})(t,UY(),n)||null}var LY,HY={},_Y={};function RY(){return LY||(LY=1,e=_Y,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.last=function(e){return e[e.length-1]}),_Y;var e}var KY,zY,VY,$Y,WY={};function GY(){return KY||(KY=1,e=WY,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.toArray=function(e){return Array.isArray(e)?e:Array.from(e)}),WY;var e}function qY(){return $Y?VY:($Y=1,VY=(zY||(zY=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=RY(),n=GY(),r=jQ();e.last=function(e){if(r.isArrayLike(e))return t.last(n.toArray(e))}}(HY)),HY).last)}const XY=ry(qY());var YY=["valueAccessor"],JY=["dataKey","clockWise","id","textBreakAll","zIndex"];function ZY(){return ZY=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},ZY.apply(null,arguments)}function eJ(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var tJ=e=>Array.isArray(e.value)?XY(e.value):e.value,nJ=Te.createContext(void 0),rJ=nJ.Provider,iJ=Te.createContext(void 0),aJ=iJ.Provider;function oJ(e){var{valueAccessor:t=tJ}=e,n=eJ(e,YY),{dataKey:r,clockWise:i,id:a,textBreakAll:o,zIndex:s}=n,A=eJ(n,JY),l=Te.useContext(nJ),c=Te.useContext(iJ),u=l||c;return u&&u.length?De.createElement(Gq,{zIndex:null!=s?s:cV.label},De.createElement(tS,{className:"recharts-label-list"},u.map((e,i)=>{var s,l=RF(r)?t(e,i):WI(e.payload,r),c=RF(a)?{}:{id:"".concat(a,"-").concat(i)};return De.createElement(MY,ZY({key:"label-".concat(i)},qk(e),A,c,{fill:null!==(s=n.fill)&&void 0!==s?s:e.fill,parentViewBox:e.parentViewBox,value:l,textBreakAll:o,viewBox:e.viewBox,index:i,zIndex:0}))}))):null}function sJ(e){var{label:t}=e;return t?!0===t?De.createElement(oJ,{key:"labelList-implicit"}):De.isValidElement(t)||NY(t)?De.createElement(oJ,{key:"labelList-implicit",content:t}):"object"==typeof t?De.createElement(oJ,ZY({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function AJ(){return AJ=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},AJ.apply(null,arguments)}oJ.displayName="LabelList";var lJ=e=>{var{cx:t,cy:n,r:r,className:i}=e,a=yh("recharts-dot",i);return IF(t)&&IF(n)&&IF(r)?De.createElement("circle",AJ({},Wk(e),tQ(e),{className:a,cx:t,cy:n,r:r})):null},cJ=e=>e.graphicalItems.polarItems,uJ=kU([SV,FV],e$),dJ=kU([cJ,YV,uJ],r$),hJ=kU([dJ],A$),pJ=kU([hJ,fz],c$),fJ=kU([pJ,YV,dJ],d$);kU([pJ,YV,dJ],(e,t,n)=>n.length>0?e.flatMap(e=>n.flatMap(n=>{var r;return{value:WI(e,null!==(r=t.dataKey)&&void 0!==r?r:n.dataKey),errorDomain:[]}})).filter(Boolean):null!=(null==t?void 0:t.dataKey)?e.map(e=>({value:WI(e,t.dataKey),errorDomain:[]})):e.map(e=>({value:e,errorDomain:[]})));var mJ=()=>{},gJ=kU([pJ,YV,dJ,Q$,SV],U$),yJ=kU([YV,k$,S$,mJ,gJ,mJ,sP,SV],G$),vJ=kU([YV,sP,pJ,fJ,iV,SV,yJ],Y$),wJ=kU([vJ,JV,eW],nW),xJ=kU([YV,vJ,wJ,SV],iW);kU([eW,xJ],DV);var bJ=tI({name:"polarAxis",initialState:{radiusAxis:{},angleAxis:{}},reducers:{addRadiusAxis(e,t){e.radiusAxis[t.payload.id]=t.payload},removeRadiusAxis(e,t){delete e.radiusAxis[t.payload.id]},addAngleAxis(e,t){e.angleAxis[t.payload.id]=t.payload},removeAngleAxis(e,t){delete e.angleAxis[t.payload.id]}}}),{addRadiusAxis:BJ,removeRadiusAxis:CJ,addAngleAxis:EJ,removeAngleAxis:kJ}=bJ.actions,SJ=bJ.reducer;function FJ(e){return e&&"object"==typeof e&&"className"in e&&"string"==typeof e.className?e.className:""}function QJ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function jJ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?QJ(Object(n),!0).forEach(function(t){UJ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QJ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function UJ(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var OJ,NJ=kU([cJ,(e,t)=>t],(e,t)=>e.filter(e=>"pie"===e.type).find(e=>e.id===t)),IJ=[],TJ=(e,t,n)=>0===(null==n?void 0:n.length)?IJ:n,PJ=kU([fz,NJ,TJ],(e,t,n)=>{var r,{chartData:i}=e;if(null!=t&&((r=null!=(null==t?void 0:t.data)&&t.data.length>0?t.data:i)&&r.length||null==n||(r=n.map(e=>jJ(jJ({},t.presentationProps),e.props))),null!=r))return r}),MJ=kU([PJ,NJ,TJ],(e,t,n)=>{if(null!=e&&null!=t)return e.map((e,r)=>{var i,a,o=WI(e,t.nameKey,t.name);return a=null!=n&&null!==(i=n[r])&&void 0!==i&&null!==(i=i.props)&&void 0!==i&&i.fill?n[r].props.fill:"object"==typeof e&&null!=e&&"fill"in e?e.fill:t.fill,{value:oT(o,t.dataKey),color:a,payload:e,type:t.legendType}})}),DJ=kU([PJ,NJ,TJ,BT],(e,t,n,r)=>{if(null!=t&&null!=e)return function(e){var t,n,r,{pieSettings:i,displayedData:a,cells:o,offset:s}=e,{cornerRadius:A,startAngle:l,endAngle:c,dataKey:u,nameKey:d,tooltipType:h}=i,p=Math.abs(i.minAngle),f=e0(l,c),m=Math.abs(f),g=a.length<=1?0:null!==(t=i.paddingAngle)&&void 0!==t?t:0,y=a.filter(e=>0!==WI(e,u,0)).length,v=m-y*p-(m>=360?y:y-1)*g,w=a.reduce((e,t)=>{var n=WI(t,u,0);return e+(IF(n)?n:0)},0);w>0&&(n=a.map((e,t)=>{var n,a=WI(e,u,0),c=WI(e,d,t),m=ZZ(i,s,e),y=(IF(a)?a:0)/w,x=WZ(WZ({},e),o&&o[t]&&o[t].props),b=(n=t?r.endAngle+UF(f)*g*(0!==a?1:0):l)+UF(f)*((0!==a?p:0)+y*v),B=(n+b)/2,C=(m.innerRadius+m.outerRadius)/2,E=[{name:c,value:a,payload:x,dataKey:u,type:h,graphicalItemId:i.id}],k=lL(m.cx,m.cy,C,B);return r=WZ(WZ(WZ(WZ({},i.presentationProps),{},{percent:y,cornerRadius:"string"==typeof A?parseFloat(A):A,name:c,tooltipPayload:E,midAngle:B,middleRadius:C,tooltipPosition:k},x),m),{},{value:a,dataKey:u,startAngle:n,endAngle:b,payload:x,paddingAngle:UF(f)*g})}));return n}({offset:r,pieSettings:t,displayedData:e,cells:n})}),LJ={exports:{}},HJ={};var _J,RJ,KJ={};
|
|
73
|
+
/** @license React v17.0.2
|
|
74
|
+
* react-is.development.js
|
|
75
|
+
*
|
|
76
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
77
|
+
*
|
|
78
|
+
* This source code is licensed under the MIT license found in the
|
|
79
|
+
* LICENSE file in the root directory of this source tree.
|
|
80
|
+
*/var zJ=(RJ||(RJ=1,"production"===process.env.NODE_ENV?LJ.exports=function(){if(OJ)return HJ;OJ=1;var e=60103,t=60106,n=60107,r=60108,i=60114,a=60109,o=60110,s=60112,A=60113,l=60120,c=60115,u=60116,d=60121,h=60122,p=60117,f=60129,m=60131;if("function"==typeof Symbol&&Symbol.for){var g=Symbol.for;e=g("react.element"),t=g("react.portal"),n=g("react.fragment"),r=g("react.strict_mode"),i=g("react.profiler"),a=g("react.provider"),o=g("react.context"),s=g("react.forward_ref"),A=g("react.suspense"),l=g("react.suspense_list"),c=g("react.memo"),u=g("react.lazy"),d=g("react.block"),h=g("react.server.block"),p=g("react.fundamental"),f=g("react.debug_trace_mode"),m=g("react.legacy_hidden")}function y(d){if("object"==typeof d&&null!==d){var h=d.$$typeof;switch(h){case e:switch(d=d.type){case n:case i:case r:case A:case l:return d;default:switch(d=d&&d.$$typeof){case o:case s:case u:case c:case a:return d;default:return h}}case t:return h}}}var v=a,w=e,x=s,b=n,B=u,C=c,E=t,k=i,S=r,F=A;return HJ.ContextConsumer=o,HJ.ContextProvider=v,HJ.Element=w,HJ.ForwardRef=x,HJ.Fragment=b,HJ.Lazy=B,HJ.Memo=C,HJ.Portal=E,HJ.Profiler=k,HJ.StrictMode=S,HJ.Suspense=F,HJ.isAsyncMode=function(){return!1},HJ.isConcurrentMode=function(){return!1},HJ.isContextConsumer=function(e){return y(e)===o},HJ.isContextProvider=function(e){return y(e)===a},HJ.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===e},HJ.isForwardRef=function(e){return y(e)===s},HJ.isFragment=function(e){return y(e)===n},HJ.isLazy=function(e){return y(e)===u},HJ.isMemo=function(e){return y(e)===c},HJ.isPortal=function(e){return y(e)===t},HJ.isProfiler=function(e){return y(e)===i},HJ.isStrictMode=function(e){return y(e)===r},HJ.isSuspense=function(e){return y(e)===A},HJ.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===n||e===i||e===f||e===r||e===A||e===l||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===u||e.$$typeof===c||e.$$typeof===a||e.$$typeof===o||e.$$typeof===s||e.$$typeof===p||e.$$typeof===d||e[0]===h)},HJ.typeOf=y,HJ}():LJ.exports=(_J||(_J=1,"production"!==process.env.NODE_ENV&&function(){var e=60103,t=60106,n=60107,r=60108,i=60114,a=60109,o=60110,s=60112,A=60113,l=60120,c=60115,u=60116,d=60121,h=60122,p=60117,f=60129,m=60131;if("function"==typeof Symbol&&Symbol.for){var g=Symbol.for;e=g("react.element"),t=g("react.portal"),n=g("react.fragment"),r=g("react.strict_mode"),i=g("react.profiler"),a=g("react.provider"),o=g("react.context"),s=g("react.forward_ref"),A=g("react.suspense"),l=g("react.suspense_list"),c=g("react.memo"),u=g("react.lazy"),d=g("react.block"),h=g("react.server.block"),p=g("react.fundamental"),g("react.scope"),g("react.opaque.id"),f=g("react.debug_trace_mode"),g("react.offscreen"),m=g("react.legacy_hidden")}function y(d){if("object"==typeof d&&null!==d){var h=d.$$typeof;switch(h){case e:var p=d.type;switch(p){case n:case i:case r:case A:case l:return p;default:var f=p&&p.$$typeof;switch(f){case o:case s:case u:case c:case a:return f;default:return h}}case t:return h}}}var v=o,w=a,x=e,b=s,B=n,C=u,E=c,k=t,S=i,F=r,Q=A,j=!1,U=!1;KJ.ContextConsumer=v,KJ.ContextProvider=w,KJ.Element=x,KJ.ForwardRef=b,KJ.Fragment=B,KJ.Lazy=C,KJ.Memo=E,KJ.Portal=k,KJ.Profiler=S,KJ.StrictMode=F,KJ.Suspense=Q,KJ.isAsyncMode=function(e){return j||(j=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1},KJ.isConcurrentMode=function(e){return U||(U=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1},KJ.isContextConsumer=function(e){return y(e)===o},KJ.isContextProvider=function(e){return y(e)===a},KJ.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===e},KJ.isForwardRef=function(e){return y(e)===s},KJ.isFragment=function(e){return y(e)===n},KJ.isLazy=function(e){return y(e)===u},KJ.isMemo=function(e){return y(e)===c},KJ.isPortal=function(e){return y(e)===t},KJ.isProfiler=function(e){return y(e)===i},KJ.isStrictMode=function(e){return y(e)===r},KJ.isSuspense=function(e){return y(e)===A},KJ.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===n||e===i||e===f||e===r||e===A||e===l||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===u||e.$$typeof===c||e.$$typeof===a||e.$$typeof===o||e.$$typeof===s||e.$$typeof===p||e.$$typeof===d||e[0]===h)},KJ.typeOf=y}()),KJ)),LJ.exports),VJ=e=>"string"==typeof e?e:e?e.displayName||e.name||"Component":"",$J=null,WJ=null,GJ=e=>{if(e===$J&&Array.isArray(WJ))return WJ;var t=[];return Te.Children.forEach(e,e=>{RF(e)||(zJ.isFragment(e)?t=t.concat(GJ(e.props.children)):t.push(e))}),WJ=t,$J=e,t};function qJ(e,t){var n=[],r=[];return r=Array.isArray(t)?t.map(e=>VJ(e)):[VJ(t)],GJ(e).forEach(e=>{var t=FF(e,"type.displayName")||FF(e,"type.name");t&&-1!==r.indexOf(t)&&n.push(e)}),n}var XJ,YJ,JJ,ZJ=e=>!e||"object"!=typeof e||!("clipDot"in e)||Boolean(e.clipDot),eZ={};function tZ(){return JJ?YJ:(JJ=1,YJ=(XJ||(XJ=1,e=eZ,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isPlainObject=function(e){var t;if("object"!=typeof e)return!1;if(null==e)return!1;if(null===Object.getPrototypeOf(e))return!0;if("[object Object]"!==Object.prototype.toString.call(e)){const n=e[Symbol.toStringTag];return null!=n&&!!(null==(t=Object.getOwnPropertyDescriptor(e,Symbol.toStringTag))?void 0:t.writable)&&e.toString()===`[object ${n}]`}let n=e;for(;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(e)===n}),eZ).isPlainObject);var e}const nZ=ry(tZ());var rZ,iZ,aZ,oZ,sZ;function AZ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function lZ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?AZ(Object(n),!0).forEach(function(t){cZ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AZ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function cZ(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uZ(){return uZ=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},uZ.apply(null,arguments)}function dZ(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var hZ=(e,t,n,r,i)=>{var a,o=n-r;return a=jF(rZ||(rZ=dZ(["M ",",",""])),e,t),a+=jF(iZ||(iZ=dZ(["L ",",",""])),e+n,t),a+=jF(aZ||(aZ=dZ(["L ",",",""])),e+n-o/2,t+i),a+=jF(oZ||(oZ=dZ(["L ",",",""])),e+n-o/2-r,t+i),a+=jF(sZ||(sZ=dZ(["L ",","," Z"])),e,t)},pZ={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},fZ=e=>{var t=aQ(e,pZ),{x:n,y:r,upperWidth:i,lowerWidth:a,height:o,className:s}=t,{animationEasing:A,animationDuration:l,animationBegin:c,isUpdateAnimationActive:u}=t,d=Te.useRef(null),[h,p]=Te.useState(-1),f=Te.useRef(i),m=Te.useRef(a),g=Te.useRef(o),y=Te.useRef(n),v=Te.useRef(r),w=QD(e,"trapezoid-");if(Te.useEffect(()=>{if(d.current&&d.current.getTotalLength)try{var e=d.current.getTotalLength();e&&p(e)}catch(t){}},[]),n!==+n||r!==+r||i!==+i||a!==+a||o!==+o||0===i&&0===a||0===o)return null;var x=yh("recharts-trapezoid",s);if(!u)return De.createElement("g",null,De.createElement("path",uZ({},qk(t),{className:x,d:hZ(n,r,i,a,o)})));var b=f.current,B=m.current,C=g.current,E=y.current,k=v.current,S="0px ".concat(-1===h?1:h,"px"),F="".concat(h,"px 0px"),Q=rD(["strokeDasharray"],l,A);return De.createElement(FD,{animationId:w,key:w,canBegin:h>0,duration:l,easing:A,isActive:u,begin:c},e=>{var s=HF(b,i,e),A=HF(B,a,e),l=HF(C,o,e),c=HF(E,n,e),u=HF(k,r,e);d.current&&(f.current=s,m.current=A,g.current=l,y.current=c,v.current=u);var h=e>0?{transition:Q,strokeDasharray:F}:{strokeDasharray:S};return De.createElement("path",uZ({},qk(t),{className:x,d:hZ(c,u,s,A,l),ref:d,style:lZ(lZ({},h),t.style)}))})},mZ=["option","shapeType","activeClassName"];function gZ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function yZ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gZ(Object(n),!0).forEach(function(t){vZ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gZ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function vZ(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wZ(e){var{shapeType:t,elementProps:n}=e;switch(t){case"rectangle":return De.createElement(XD,n);case"trapezoid":return De.createElement(fZ,n);case"sector":return De.createElement(wL,n);case"symbols":if(function(e){return"symbols"===e}(t))return De.createElement(ZF,n);break;case"curve":return De.createElement(WM,n);default:return null}}function xZ(e){var t,{option:n,shapeType:r,activeClassName:i="recharts-active-shape"}=e,a=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,mZ);if(Te.isValidElement(n))t=Te.cloneElement(n,yZ(yZ({},a),function(e){return Te.isValidElement(e)?e.props:e}(n)));else if("function"==typeof n)t=n(a,a.index);else if(nZ(n)&&"boolean"!=typeof n){var o=function(e,t){return yZ(yZ({},t),e)}(n,a);t=De.createElement(wZ,{shapeType:r,elementProps:o})}else{var s=a;t=De.createElement(wZ,{shapeType:r,elementProps:s})}return a.isActive?De.createElement(tS,{className:i},t):t}var bZ,BZ=(e,t,n)=>{var r=cU();return(i,a)=>o=>{null==e||e(i,a,o),r(YW({activeIndex:String(a),activeDataKey:t,activeCoordinate:i.tooltipPosition,activeGraphicalItemId:n}))}},CZ=e=>{var t=cU();return(n,r)=>i=>{null==e||e(n,r,i),t(JW())}},EZ=(e,t,n)=>{var r=cU();return(i,a)=>o=>{null==e||e(i,a,o),r(eG({activeIndex:String(a),activeDataKey:t,activeCoordinate:i.tooltipPosition,activeGraphicalItemId:n}))}};function kZ(e){var{tooltipEntrySettings:t}=e,n=cU(),r=ST(),i=Te.useRef(null);return Te.useLayoutEffect(()=>{r||(null===i.current?n(WW(t)):i.current!==t&&n(GW({prev:i.current,next:t})),i.current=t)},[t,n,r]),Te.useLayoutEffect(()=>()=>{i.current&&(n(qW(i.current)),i.current=null)},[n]),null}function SZ(e){var{legendPayload:t}=e,n=cU(),r=ST(),i=Te.useRef(null);return Te.useLayoutEffect(()=>{r||(null===i.current?n(aM(t)):i.current!==t&&n(oM({prev:i.current,next:t})),i.current=t)},[n,r,t]),Te.useLayoutEffect(()=>()=>{i.current&&(n(sM(i.current)),i.current=null)},[n]),null}function FZ(e){var{legendPayload:t}=e,n=cU(),r=pU(sP),i=Te.useRef(null);return Te.useLayoutEffect(()=>{"centric"!==r&&"radial"!==r||(null===i.current?n(aM(t)):i.current!==t&&n(oM({prev:i.current,next:t})),i.current=t)},[n,r,t]),Te.useLayoutEffect(()=>()=>{i.current&&(n(sM(i.current)),i.current=null)},[n]),null}var QZ=null!==(bZ=De["useId".toString()])&&void 0!==bZ?bZ:()=>{var[e]=De.useState(()=>MF("uid-"));return e};var jZ=Te.createContext(void 0),UZ=e=>{var t,n,r,{id:i,type:a,children:o}=e,s=(t="recharts-".concat(a),n=i,r=QZ(),n||(t?"".concat(t,"-").concat(r):r));return De.createElement(jZ.Provider,{value:s},o(s))},OZ=tI({name:"graphicalItems",initialState:{cartesianItems:[],polarItems:[]},reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:VN()},replaceCartesianGraphicalItem:{reducer(e,t){var{prev:n,next:r}=t.payload,i=xN(e).cartesianItems.indexOf(n);i>-1&&(e.cartesianItems[i]=r)},prepare:VN()},removeCartesianGraphicalItem:{reducer(e,t){var n=xN(e).cartesianItems.indexOf(t.payload);n>-1&&e.cartesianItems.splice(n,1)},prepare:VN()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:VN()},removePolarGraphicalItem:{reducer(e,t){var n=xN(e).polarItems.indexOf(t.payload);n>-1&&e.polarItems.splice(n,1)},prepare:VN()}}}),{addCartesianGraphicalItem:NZ,replaceCartesianGraphicalItem:IZ,removeCartesianGraphicalItem:TZ,addPolarGraphicalItem:PZ,removePolarGraphicalItem:MZ}=OZ.actions,DZ=OZ.reducer,LZ=e=>{var t=cU(),n=Te.useRef(null);return Te.useLayoutEffect(()=>{null===n.current?t(NZ(e)):n.current!==e&&t(IZ({prev:n.current,next:e})),n.current=e},[t,e]),Te.useLayoutEffect(()=>()=>{n.current&&(t(TZ(n.current)),n.current=null)},[t]),null},HZ=Te.memo(LZ);function _Z(e){var t=cU();return Te.useLayoutEffect(()=>(t(PZ(e)),()=>{t(MZ(e))}),[t,e]),null}var RZ=["key"],KZ=["onMouseEnter","onClick","onMouseLeave"],zZ=["id"],VZ=["id"];function $Z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function WZ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$Z(Object(n),!0).forEach(function(t){GZ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$Z(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function GZ(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qZ(){return qZ=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},qZ.apply(null,arguments)}function XZ(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function YZ(e){var t=Te.useMemo(()=>qJ(e.children,NX),[e.children]),n=pU(n=>MJ(n,e.id,t));return null==n?null:De.createElement(FZ,{legendPayload:n})}var JZ=De.memo(e=>{var{dataKey:t,nameKey:n,sectors:r,stroke:i,strokeWidth:a,fill:o,name:s,hide:A,tooltipType:l,id:c}=e,u={dataDefinedOnItem:r.map(e=>e.tooltipPayload),getPosition:e=>{var t;return null===(t=r[Number(e)])||void 0===t?void 0:t.tooltipPosition},settings:{stroke:i,strokeWidth:a,fill:o,dataKey:t,nameKey:n,name:oT(s,t),hide:A,type:l,color:o,unit:"",graphicalItemId:c}};return De.createElement(kZ,{tooltipEntrySettings:u})}),ZZ=(e,t,n)=>{var{top:r,left:i,width:a,height:o}=t,s=cL(a,o),A=i+DF(e.cx,a,a/2),l=r+DF(e.cy,o,o/2),c=DF(e.innerRadius,s,0),u=((e,t,n)=>DF("function"==typeof t?t(e):t,n,.8*n))(n,e.outerRadius,s);return{cx:A,cy:l,innerRadius:c,outerRadius:u,maxRadius:e.maxRadius||Math.sqrt(a*a+o*o)/2}},e0=(e,t)=>UF(t-e)*Math.min(Math.abs(t-e),360);function t0(e){var{sectors:t,props:n,showLabels:r}=e,{label:i,labelLine:a,dataKey:o}=n;if(!r||!i||!t)return null;var s=Wk(n),A=Gk(i),l=Gk(a),c="object"==typeof i&&"offsetRadius"in i&&"number"==typeof i.offsetRadius&&i.offsetRadius||20,u=t.map((e,t)=>{var n,r,u=(e.startAngle+e.endAngle)/2,d=lL(e.cx,e.cy,e.outerRadius+c,u),h=WZ(WZ(WZ(WZ({},s),e),{},{stroke:"none"},A),{},{index:t,textAnchor:(n=d.x,r=e.cx,n>r?"start":n<r?"end":"middle")},d),p=WZ(WZ(WZ(WZ({},s),e),{},{fill:"none",stroke:e.fill},l),{},{index:t,points:[lL(e.cx,e.cy,e.outerRadius,u),d],key:"line"});return De.createElement(Gq,{zIndex:cV.label,key:"label-".concat(e.startAngle,"-").concat(e.endAngle,"-").concat(e.midAngle,"-").concat(t)},De.createElement(tS,null,a&&((e,t)=>{if(De.isValidElement(e))return De.cloneElement(e,t);if("function"==typeof e)return e(t);var n=yh("recharts-pie-label-line","boolean"!=typeof e?e.className:""),{key:r}=t,i=XZ(t,RZ);return De.createElement(WM,qZ({},i,{type:"linear",className:n}))})(a,p),((e,t,n)=>{if(De.isValidElement(e))return De.cloneElement(e,t);var r=n;if("function"==typeof e&&(r=e(t),De.isValidElement(r)))return r;var i=yh("recharts-pie-label-text",FJ(e));return De.createElement(yY,qZ({},t,{alignmentBaseline:"middle",className:i}),r)})(i,h,WI(e,o))))});return De.createElement(tS,{className:"recharts-pie-labels"},u)}function n0(e){var{sectors:t,props:n,showLabels:r}=e,{label:i}=n;return"object"==typeof i&&null!=i&&"position"in i?De.createElement(sJ,{label:i}):De.createElement(t0,{sectors:t,props:n,showLabels:r})}function r0(e){var{sectors:t,activeShape:n,inactiveShape:r,allOtherPieProps:i,shape:a,id:o}=e,s=pU(iq),A=pU(oq),l=pU(sq),{onMouseEnter:c,onClick:u,onMouseLeave:d}=i,h=XZ(i,KZ),p=BZ(c,i.dataKey,o),f=CZ(d),m=EZ(u,i.dataKey,o);return null==t||0===t.length?null:De.createElement(De.Fragment,null,t.map((e,c)=>{if(0===(null==e?void 0:e.startAngle)&&0===(null==e?void 0:e.endAngle)&&1!==t.length)return null;var u=null==l||l===o,d=String(c)===s&&(null==A||i.dataKey===A)&&u,g=n&&d?n:s?r:null,y=WZ(WZ({},e),{},{stroke:e.stroke,tabIndex:-1,[hT]:c,[pT]:o});return De.createElement(tS,qZ({key:"sector-".concat(null==e?void 0:e.startAngle,"-").concat(null==e?void 0:e.endAngle,"-").concat(e.midAngle,"-").concat(c),tabIndex:-1,className:"recharts-pie-sector"},nQ(h,e,c),{onMouseEnter:p(e,c),onMouseLeave:f(e,c),onClick:m(e,c)}),De.createElement(xZ,qZ({option:null!=a?a:g,index:c,shapeType:"sector",isActive:d},y)))}))}function i0(e){var{showLabels:t,sectors:n,children:r}=e,i=Te.useMemo(()=>t&&n?n.map(e=>({value:e.value,payload:e.payload,clockWise:!1,parentViewBox:void 0,viewBox:{cx:e.cx,cy:e.cy,innerRadius:e.innerRadius,outerRadius:e.outerRadius,startAngle:e.startAngle,endAngle:e.endAngle,clockWise:!1},fill:e.fill})):[],[n,t]);return De.createElement(aJ,{value:t?i:void 0},r)}function a0(e){var{props:t,previousSectorsRef:n,id:r}=e,{sectors:i,isAnimationActive:a,animationBegin:o,animationDuration:s,animationEasing:A,activeShape:l,inactiveShape:c,onAnimationStart:u,onAnimationEnd:d}=t,h=QD(t,"recharts-pie-"),p=n.current,[f,m]=Te.useState(!1),g=Te.useCallback(()=>{"function"==typeof d&&d(),m(!1)},[d]),y=Te.useCallback(()=>{"function"==typeof u&&u(),m(!0)},[u]);return De.createElement(i0,{showLabels:!f,sectors:i},De.createElement(FD,{animationId:h,begin:o,duration:s,isActive:a,easing:A,onAnimationStart:y,onAnimationEnd:g,key:h},e=>{var a,o=[],s=i&&i[0],A=null!==(a=null==s?void 0:s.startAngle)&&void 0!==a?a:0;return null==i||i.forEach((t,n)=>{var r=p&&p[n],i=n>0?FF(t,"paddingAngle",0):0;if(r){var a=HF(r.endAngle-r.startAngle,t.endAngle-t.startAngle,e),s=WZ(WZ({},t),{},{startAngle:A+i,endAngle:A+a+i});o.push(s),A=s.endAngle}else{var{endAngle:l,startAngle:c}=t,u=HF(0,l-c,e),d=WZ(WZ({},t),{},{startAngle:A+i,endAngle:A+u+i});o.push(d),A=d.endAngle}}),n.current=o,De.createElement(tS,null,De.createElement(r0,{sectors:o,activeShape:l,inactiveShape:c,allOtherPieProps:t,shape:t.shape,id:r}))}),De.createElement(n0,{showLabels:!f,sectors:i,props:t}),t.children)}var o0={animationBegin:400,animationDuration:1500,animationEasing:"ease",cx:"50%",cy:"50%",dataKey:"value",endAngle:360,fill:"#808080",hide:!1,innerRadius:0,isAnimationActive:"auto",label:!1,labelLine:!0,legendType:"rect",minAngle:0,nameKey:"name",outerRadius:"80%",paddingAngle:0,rootTabIndex:0,startAngle:0,stroke:"#fff",zIndex:cV.area};function s0(e){var{id:t}=e,n=XZ(e,zZ),{hide:r,className:i,rootTabIndex:a}=e,o=Te.useMemo(()=>qJ(e.children,NX),[e.children]),s=pU(e=>DJ(e,t,o)),A=Te.useRef(null),l=yh("recharts-pie",i);return r||null==s?(A.current=null,De.createElement(tS,{tabIndex:a,className:l})):De.createElement(Gq,{zIndex:e.zIndex},De.createElement(JZ,{dataKey:e.dataKey,nameKey:e.nameKey,sectors:s,stroke:e.stroke,strokeWidth:e.strokeWidth,fill:e.fill,name:e.name,hide:e.hide,tooltipType:e.tooltipType,id:t}),De.createElement(tS,{tabIndex:a,className:l},De.createElement(a0,{props:WZ(WZ({},n),{},{sectors:s}),previousSectorsRef:A,id:t})))}function A0(e){var t=aQ(e,o0),{id:n}=t,r=XZ(t,VZ),i=Wk(r);return De.createElement(UZ,{id:n,type:"pie"},e=>De.createElement(De.Fragment,null,De.createElement(_Z,{type:"pie",id:e,data:r.data,dataKey:r.dataKey,hide:r.hide,angleAxisId:0,radiusAxisId:0,name:r.name,nameKey:r.nameKey,tooltipType:r.tooltipType,legendType:r.legendType,fill:r.fill,cx:r.cx,cy:r.cy,startAngle:r.startAngle,endAngle:r.endAngle,paddingAngle:r.paddingAngle,minAngle:r.minAngle,innerRadius:r.innerRadius,outerRadius:r.outerRadius,cornerRadius:r.cornerRadius,presentationProps:i,maxRadius:t.maxRadius}),De.createElement(YZ,qZ({},r,{id:e})),De.createElement(s0,qZ({},r,{id:e}))))}A0.displayName="Pie";var l0=["points"];function c0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function u0(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c0(Object(n),!0).forEach(function(t){d0(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c0(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function d0(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h0(){return h0=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},h0.apply(null,arguments)}function p0(e){var{option:t,dotProps:n,className:r}=e;if(Te.isValidElement(t))return Te.cloneElement(t,n);if("function"==typeof t)return t(n);var i=yh(r,"boolean"!=typeof t?t.className:""),a=null!=n?n:{},{points:o}=a,s=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(a,l0);return De.createElement(lJ,h0({},s,{className:i}))}function f0(e){var{points:t,dot:n,className:r,dotClassName:i,dataKey:a,baseProps:o,needClip:s,clipPathId:A,zIndex:l=cV.scatter}=e;if(!function(e,t){return null!=e&&(!!t||1===e.length)}(t,n))return null;var c,u=ZJ(n),d=null==(c=n)?null:Te.isValidElement(c)?qk(c.props):"object"!=typeof c||Array.isArray(c)?null:qk(c),h=t.map((e,r)=>{var s,A,l=u0(u0(u0({r:3},o),d),{},{index:r,cx:null!==(s=e.x)&&void 0!==s?s:void 0,cy:null!==(A=e.y)&&void 0!==A?A:void 0,dataKey:a,value:e.value,payload:e.payload,points:t});return De.createElement(p0,{key:"dot-".concat(r),option:n,dotProps:l,className:i})}),p={};return s&&null!=A&&(p.clipPath="url(#clipPath-".concat(u?"":"dots-").concat(A,")")),De.createElement(Gq,{zIndex:l},De.createElement(tS,h0({className:r},p),h))}function m0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function g0(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m0(Object(n),!0).forEach(function(t){y0(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m0(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function y0(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var v0=tI({name:"cartesianAxis",initialState:{xAxis:{},yAxis:{},zAxis:{}},reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=t.payload},prepare:VN()},replaceXAxis:{reducer(e,t){var{prev:n,next:r}=t.payload;void 0!==e.xAxis[n.id]&&(n.id!==r.id&&delete e.xAxis[n.id],e.xAxis[r.id]=r)},prepare:VN()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:VN()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=t.payload},prepare:VN()},replaceYAxis:{reducer(e,t){var{prev:n,next:r}=t.payload;void 0!==e.yAxis[n.id]&&(n.id!==r.id&&delete e.yAxis[n.id],e.yAxis[r.id]=r)},prepare:VN()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:VN()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=t.payload},prepare:VN()},replaceZAxis:{reducer(e,t){var{prev:n,next:r}=t.payload;void 0!==e.zAxis[n.id]&&(n.id!==r.id&&delete e.zAxis[n.id],e.zAxis[r.id]=r)},prepare:VN()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:VN()},updateYAxisWidth(e,t){var{id:n,width:r}=t.payload,i=e.yAxis[n];if(i){var a,o=i.widthHistory||[];if(3===o.length&&o[0]===o[2]&&r===o[1]&&r!==i.width&&Math.abs(r-(null!==(a=o[0])&&void 0!==a?a:0))<=1)return;var s=[...o,r].slice(-3);e.yAxis[n]=g0(g0({},i),{},{width:r,widthHistory:s})}}}}),{addXAxis:w0,replaceXAxis:x0,removeXAxis:b0,addYAxis:B0,replaceYAxis:C0,removeYAxis:E0,addZAxis:k0,replaceZAxis:S0,removeZAxis:F0,updateYAxisWidth:Q0}=v0.actions,j0=v0.reducer,U0=kU([BT],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),O0=kU([U0,sT,AT],(e,t,n)=>{if(e&&null!=t&&null!=n)return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,n-e.top-e.bottom)}}),N0=()=>pU(O0);function I0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function T0(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?I0(Object(n),!0).forEach(function(t){P0(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I0(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function P0(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var M0=e=>{var{point:t,childIndex:n,mainColor:r,activeDot:i,dataKey:a,clipPath:o}=e;if(!1===i||null==t.x||null==t.y)return null;var s,A=T0(T0(T0({},{index:n,dataKey:a,cx:t.x,cy:t.y,r:4,fill:null!=r?r:"none",strokeWidth:2,stroke:"#fff",payload:t.payload,value:t.value}),Gk(i)),tQ(i));return s=Te.isValidElement(i)?Te.cloneElement(i,A):"function"==typeof i?i(A):De.createElement(lJ,A),De.createElement(tS,{className:"recharts-active-dot",clipPath:o},s)};function D0(e){var{points:t,mainColor:n,activeDot:r,itemDataKey:i,clipPath:a,zIndex:o=cV.activeDot}=e,s=pU(iq),A=pU(hq);if(null==t||null==A)return null;var l=t.find(e=>A.includes(e.payload));return RF(l)?null:De.createElement(Gq,{zIndex:o},De.createElement(M0,{point:l,childIndex:Number(s),mainColor:n,dataKey:i,activeDot:r,clipPath:a}))}var L0=(e,t,n)=>{var r=null!=n?n:e;if(!RF(r))return DF(r,t,0)};function H0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _0(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?H0(Object(n),!0).forEach(function(t){R0(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H0(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function R0(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function K0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function z0(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?K0(Object(n),!0).forEach(function(t){V0(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):K0(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function V0(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var $0=["Webkit","Moz","O","ms"],W0=e=>{var{chartData:t}=e,n=cU(),r=ST();return Te.useEffect(()=>r?()=>{}:(n(fX(t)),()=>{n(fX(void 0))}),[t,n,r]),null},G0=e=>e.chartData.chartData,q0=e=>{var{dataStartIndex:t,dataEndIndex:n}=e.chartData;return{startIndex:t,endIndex:n}},X0=Te.createContext(()=>{}),Y0={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},J0=tI({name:"brush",initialState:Y0,reducers:{setBrushSettings:(e,t)=>null==t.payload?Y0:t.payload}}),{setBrushSettings:Z0}=J0.actions,e1=J0.reducer;function t1(){return t1=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},t1.apply(null,arguments)}function n1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function r1(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?n1(Object(n),!0).forEach(function(t){i1(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):n1(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function i1(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a1(e){var{x:t,y:n,width:r,height:i,stroke:a}=e,o=Math.floor(n+i/2)-1;return De.createElement(De.Fragment,null,De.createElement("rect",{x:t,y:n,width:r,height:i,fill:a,stroke:"none"}),De.createElement("line",{x1:t+1,y1:o,x2:t+r-1,y2:o,fill:"none",stroke:"#fff"}),De.createElement("line",{x1:t+1,y1:o+2,x2:t+r-1,y2:o+2,fill:"none",stroke:"#fff"}))}function o1(e){var{travellerProps:t,travellerType:n}=e;return De.isValidElement(n)?De.cloneElement(n,t):"function"==typeof n?n(t):De.createElement(a1,t)}function s1(e){if(zF(e)&&"object"==typeof e&&"name"in e&&"string"==typeof e.name)return e.name}function A1(e){var{otherProps:t,travellerX:n,id:r,onMouseEnter:i,onMouseLeave:a,onMouseDown:o,onTouchStart:s,onTravellerMoveKeyboard:A,onFocus:l,onBlur:c}=e,{y:u,x:d,travellerWidth:h,height:p,traveller:f,ariaLabel:m,data:g,startIndex:y,endIndex:v}=t,w=Math.max(n,d),x=r1(r1({},Wk(t)),{},{x:w,y:u,width:h,height:p}),b=m||function(e,t,n){var r=s1(e[t]),i=s1(e[n]);return"Min value: ".concat(r,", Max value: ").concat(i)}(g,y,v);return De.createElement(tS,{tabIndex:0,role:"slider","aria-label":b,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:i,onMouseLeave:a,onMouseDown:o,onTouchStart:s,onKeyDown:e=>{["ArrowLeft","ArrowRight"].includes(e.key)&&(e.preventDefault(),e.stopPropagation(),A("ArrowRight"===e.key?1:-1,r))},onFocus:l,onBlur:c,style:{cursor:"col-resize"}},De.createElement(o1,{travellerType:f,travellerProps:x}))}function l1(e){var{index:t,data:n,tickFormatter:r,dataKey:i}=e,a=WI(n[t],i,t);return"function"==typeof r?r(a,t):a}function c1(e,t){for(var n=0,r=e.length-1;r-n>1;){var i=Math.floor((n+r)/2),a=e[i];null!=a&&a>t?r=i:n=i}var o=e[r];return null!=o&&t>=o?r:n}function u1(e){var{startX:t,endX:n,scaleValues:r,gap:i,data:a}=e,o=a.length-1,s=Math.min(t,n),A=Math.max(t,n),l=c1(r,s),c=c1(r,A);return{startIndex:l-l%i,endIndex:c===o?o:c-c%i}}function d1(e){var{x:t,y:n,width:r,height:i,fill:a,stroke:o}=e;return De.createElement("rect",{stroke:o,fill:a,x:t,y:n,width:r,height:i})}function h1(e){var{startIndex:t,endIndex:n,y:r,height:i,travellerWidth:a,stroke:o,tickFormatter:s,dataKey:A,data:l,startX:c,endX:u}=e,d={pointerEvents:"none",fill:o};return De.createElement(tS,{className:"recharts-brush-texts"},De.createElement(yY,t1({textAnchor:"end",verticalAnchor:"middle",x:Math.min(c,u)-5,y:r+i/2},d),l1({index:t,tickFormatter:s,dataKey:A,data:l})),De.createElement(yY,t1({textAnchor:"start",verticalAnchor:"middle",x:Math.max(c,u)+a+5,y:r+i/2},d),l1({index:n,tickFormatter:s,dataKey:A,data:l})))}function p1(e){var{y:t,height:n,stroke:r,travellerWidth:i,startX:a,endX:o,onMouseEnter:s,onMouseLeave:A,onMouseDown:l,onTouchStart:c}=e,u=Math.min(a,o)+i,d=Math.max(Math.abs(o-a)-i,0);return De.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:s,onMouseLeave:A,onMouseDown:l,onTouchStart:c,style:{cursor:"move"},stroke:"none",fill:r,fillOpacity:.2,x:u,y:t,width:d,height:n})}function f1(e){var{x:t,y:n,width:r,height:i,data:a,children:o,padding:s}=e;if(!(1===De.Children.count(o)))return null;var A=Te.Children.only(o);return A?De.cloneElement(A,{x:t,y:n,width:r,height:i,margin:s,compact:!0,data:a}):null}var m1=e=>e.changedTouches&&!!e.changedTouches.length;class g1 extends Te.PureComponent{constructor(e){super(e),i1(this,"handleDrag",e=>{this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.state.isTravellerMoving?this.handleTravellerMove(e):this.state.isSlideMoving&&this.handleSlideDrag(e)}),i1(this,"handleTouchMove",e=>{var t,n=null===(t=e.changedTouches)||void 0===t?void 0:t[0];null!=n&&this.handleDrag(n)}),i1(this,"handleDragEnd",()=>{this.setState({isTravellerMoving:!1,isSlideMoving:!1},()=>{var{endIndex:e,onDragEnd:t,startIndex:n}=this.props;null==t||t({endIndex:e,startIndex:n})}),this.detachDragEndListener()}),i1(this,"handleLeaveWrapper",()=>{(this.state.isTravellerMoving||this.state.isSlideMoving)&&(this.leaveTimer=window.setTimeout(this.handleDragEnd,this.props.leaveTimeOut))}),i1(this,"handleEnterSlideOrTraveller",()=>{this.setState({isTextActive:!0})}),i1(this,"handleLeaveSlideOrTraveller",()=>{this.setState({isTextActive:!1})}),i1(this,"handleSlideDragStart",e=>{var t=m1(e)?e.changedTouches[0]:e;null!=t&&(this.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:t.pageX}),this.attachDragEndListener())}),i1(this,"handleTravellerMoveKeyboard",(e,t)=>{var{data:n,gap:r,startIndex:i,endIndex:a}=this.props,{scaleValues:o,startX:s,endX:A}=this.state;if(null!=o){var l=-1;if("startX"===t?l=i:"endX"===t&&(l=a),!(l<0||l>=n.length)){var c=l+e;if(!(-1===c||c>=o.length)){var u=o[c];null!=u&&("startX"===t&&u>=A||"endX"===t&&u<=s||this.setState({[t]:u},()=>{this.props.onChange(u1({startX:this.state.startX,endX:this.state.endX,data:n,gap:r,scaleValues:o}))}))}}}}),this.travellerDragStartHandlers={startX:this.handleTravellerDragStart.bind(this,"startX"),endX:this.handleTravellerDragStart.bind(this,"endX")},this.state={brushMoveStartX:0,movingTravellerId:void 0,endX:0,startX:0,slideMoveStartX:0}}static getDerivedStateFromProps(e,t){var{data:n,width:r,x:i,travellerWidth:a,startIndex:o,endIndex:s,startIndexControlledFromProps:A,endIndexControlledFromProps:l}=e;if(n!==t.prevData)return r1({prevData:n,prevTravellerWidth:a,prevX:i,prevWidth:r},n&&n.length?(e=>{var{data:t,startIndex:n,endIndex:r,x:i,width:a,travellerWidth:o}=e;if(!t||!t.length)return{};var s=t.length,A=AH().domain(NL(0,s)).range([i,i+a-o]),l=A.domain().map(e=>A(e)).filter(zF);return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:A(n),endX:A(r),scale:A,scaleValues:l}})({data:n,width:r,x:i,travellerWidth:a,startIndex:o,endIndex:s}):{scale:void 0,scaleValues:void 0});var c=t.scale;if(c&&(r!==t.prevWidth||i!==t.prevX||a!==t.prevTravellerWidth)){c.range([i,i+r-a]);var u=c.domain().map(e=>c(e)).filter(e=>null!=e);return{prevData:n,prevTravellerWidth:a,prevX:i,prevWidth:r,startX:c(e.startIndex),endX:c(e.endIndex),scaleValues:u}}if(t.scale&&!t.isSlideMoving&&!t.isTravellerMoving&&!t.isTravellerFocused&&!t.isTextActive){if(null!=A&&t.prevStartIndexControlledFromProps!==A)return{startX:t.scale(A),prevStartIndexControlledFromProps:A};if(null!=l&&t.prevEndIndexControlledFromProps!==l)return{endX:t.scale(l),prevEndIndexControlledFromProps:l}}return null}componentWillUnmount(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}attachDragEndListener(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}detachDragEndListener(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}handleSlideDrag(e){var{slideMoveStartX:t,startX:n,endX:r,scaleValues:i}=this.state;if(null!=i){var{x:a,width:o,travellerWidth:s,startIndex:A,endIndex:l,onChange:c,data:u,gap:d}=this.props,h=e.pageX-t;h>0?h=Math.min(h,a+o-s-r,a+o-s-n):h<0&&(h=Math.max(h,a-n,a-r));var p=u1({startX:n+h,endX:r+h,data:u,gap:d,scaleValues:i});p.startIndex===A&&p.endIndex===l||!c||c(p),this.setState({startX:n+h,endX:r+h,slideMoveStartX:e.pageX})}}handleTravellerDragStart(e,t){var n=m1(t)?t.changedTouches[0]:t;null!=n&&(this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:e,brushMoveStartX:n.pageX}),this.attachDragEndListener())}handleTravellerMove(e){var{brushMoveStartX:t,movingTravellerId:n,endX:r,startX:i,scaleValues:a}=this.state;if(null!=n&&null!=a){var o=this.state[n],{x:s,width:A,travellerWidth:l,onChange:c,gap:u,data:d}=this.props,h={startX:this.state.startX,endX:this.state.endX,data:d,gap:u,scaleValues:a},p=e.pageX-t;p>0?p=Math.min(p,s+A-l-o):p<0&&(p=Math.max(p,s-o)),h[n]=o+p;var f=u1(h),{startIndex:m,endIndex:g}=f;this.setState({[n]:o+p,brushMoveStartX:e.pageX},()=>{var e;c&&(e=d.length-1,("startX"===n&&(r>i?m%u===0:g%u===0)||r<i&&g===e||"endX"===n&&(r>i?g%u===0:m%u===0)||r>i&&g===e)&&c(f))})}}render(){var{data:e,className:t,children:n,x:r,y:i,dy:a,width:o,height:s,alwaysShowText:A,fill:l,stroke:c,startIndex:u,endIndex:d,travellerWidth:h,tickFormatter:p,dataKey:f,padding:m}=this.props,{startX:g,endX:y,isTextActive:v,isSlideMoving:w,isTravellerMoving:x,isTravellerFocused:b}=this.state;if(!e||!e.length||!IF(r)||!IF(i)||!IF(o)||!IF(s)||o<=0||s<=0)return null;var B,C,E,k,S=yh("recharts-brush",t),F=(C="none",E=(B="userSelect").replace(/(\w)/,e=>e.toUpperCase()),(k=$0.reduce((e,t)=>z0(z0({},e),{},{[t+E]:C}),{}))[B]=C,k),Q=i+(null!=a?a:0);return De.createElement(tS,{className:S,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:F},De.createElement(d1,{x:r,y:Q,width:o,height:s,fill:l,stroke:c}),De.createElement(FT,null,De.createElement(f1,{x:r,y:Q,width:o,height:s,data:e,padding:m},n)),De.createElement(p1,{y:Q,height:s,stroke:c,travellerWidth:h,startX:g,endX:y,onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart}),De.createElement(A1,{travellerX:g,id:"startX",otherProps:r1(r1({},this.props),{},{y:Q}),onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers.startX,onTouchStart:this.travellerDragStartHandlers.startX,onTravellerMoveKeyboard:this.handleTravellerMoveKeyboard,onFocus:()=>{this.setState({isTravellerFocused:!0})},onBlur:()=>{this.setState({isTravellerFocused:!1})}}),De.createElement(A1,{travellerX:y,id:"endX",otherProps:r1(r1({},this.props),{},{y:Q}),onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers.endX,onTouchStart:this.travellerDragStartHandlers.endX,onTravellerMoveKeyboard:this.handleTravellerMoveKeyboard,onFocus:()=>{this.setState({isTravellerFocused:!0})},onBlur:()=>{this.setState({isTravellerFocused:!1})}}),(v||w||x||b||A)&&De.createElement(h1,{startIndex:u,endIndex:d,y:Q,height:s,travellerWidth:h,stroke:c,tickFormatter:p,dataKey:f,data:e,startX:g,endX:y}))}}function y1(e){var t,n,r,i,a=cU(),o=pU(G0),s=pU(q0),A=Te.useContext(X0),l=e.onChange,{startIndex:c,endIndex:u}=e;Te.useEffect(()=>{a(mX({startIndex:c,endIndex:u}))},[a,u,c]),t=pU(sV),n=pU(lV),r=pU(e=>e.chartData.dataStartIndex),i=pU(e=>e.chartData.dataEndIndex),Te.useEffect(()=>{if(null!=t&&null!=r&&null!=i&&null!=n){var e={startIndex:r,endIndex:i};oX.emit(AX,t,e,n)}},[i,r,n,t]);var d=Te.useCallback(e=>{if(null!=s){var{startIndex:t,endIndex:n}=s;e.startIndex===t&&e.endIndex===n||(null==A||A(e),null==l||l(e),a(mX(e)))}},[l,A,a,s]),h=pU(jT);if(null==h||null==s||null==o||!o.length)return null;var{startIndex:p,endIndex:f}=s,{x:m,y:g,width:y}=h,v={data:o,x:m,y:g,width:y,startIndex:p,endIndex:f,onChange:d};return De.createElement(g1,t1({},e,v,{startIndexControlledFromProps:null!=c?c:void 0,endIndexControlledFromProps:null!=u?u:void 0}))}function v1(e){var t=cU();return Te.useEffect(()=>(t(Z0(e)),()=>{t(Z0(null))}),[t,e]),null}var w1={height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1};function x1(e){var t=aQ(e,w1);return De.createElement(De.Fragment,null,De.createElement(v1,{height:t.height,x:t.x,y:t.y,width:t.width,padding:t.padding}),De.createElement(y1,t))}x1.displayName="Brush";var b1=tI({name:"referenceElements",initialState:{dots:[],areas:[],lines:[]},reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var n=xN(e).dots.findIndex(e=>e===t.payload);-1!==n&&e.dots.splice(n,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var n=xN(e).areas.findIndex(e=>e===t.payload);-1!==n&&e.areas.splice(n,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var n=xN(e).lines.findIndex(e=>e===t.payload);-1!==n&&e.lines.splice(n,1)}}}),{addDot:B1,removeDot:C1,addArea:E1,removeArea:k1,addLine:S1,removeLine:F1}=b1.actions,Q1=b1.reducer,j1=Te.createContext(void 0),U1=e=>{var{children:t}=e,[n]=Te.useState("".concat(MF("recharts"),"-clip")),r=N0();if(null==r)return null;var{x:i,y:a,width:o,height:s}=r;return De.createElement(j1.Provider,{value:n},De.createElement("defs",null,De.createElement("clipPath",{id:n},De.createElement("rect",{x:i,y:a,height:s,width:o}))),t)};function O1(e,t){if(t<1)return[];if(1===t)return e;for(var n=[],r=0;r<e.length;r+=t){var i=e[r];void 0!==i&&n.push(i)}return n}function N1(e,t,n){return function(e){var{width:t,height:n}=e,r=function(e){return(e%180+180)%180}(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0),i=r*Math.PI/180,a=Math.atan(n/t),o=i>a&&i<Math.PI-a?n/Math.sin(i):t/Math.cos(i);return Math.abs(o)}({width:e.width+t.width,height:e.height+t.height},n)}function I1(e,t,n,r,i){if(e*t<e*r||e*t>e*i)return!1;var a=n();return e*(t-e*a/2-r)>=0&&e*(t+e*a/2-i)<=0}function T1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function P1(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?T1(Object(n),!0).forEach(function(t){M1(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T1(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function M1(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D1(e,t,n){var r,{tick:i,ticks:a,viewBox:o,minTickGap:s,orientation:A,interval:l,tickFormatter:c,unit:u,angle:d}=e;if(!a||!a.length||!i)return[];if(IF(l)||CD)return null!==(r=function(e,t){return O1(e,t+1)}(a,IF(l)?l:0))&&void 0!==r?r:[];var h=[],p="top"===A||"bottom"===A?"width":"height",f=u&&"width"===p?RX(u,{fontSize:t,letterSpacing:n}):{width:0,height:0},m=(e,r)=>{var i="function"==typeof c?c(e.value,r):e.value;return"width"===p?N1(RX(i,{fontSize:t,letterSpacing:n}),f,d):RX(i,{fontSize:t,letterSpacing:n})[p]},g=a[0],y=a[1],v=a.length>=2&&null!=g&&null!=y?UF(y.coordinate-g.coordinate):1,w=function(e,t,n){var r="width"===n,{x:i,y:a,width:o,height:s}=e;return 1===t?{start:r?i:a,end:r?i+o:a+s}:{start:r?i+o:a+s,end:r?i:a}}(o,v,p);return"equidistantPreserveStart"===l?function(e,t,n,r,i){for(var a,o=(r||[]).slice(),{start:s,end:A}=t,l=0,c=1,u=s,d=function(){var t=null==r?void 0:r[l];if(void 0===t)return{v:O1(r,c)};var a,o=l,d=()=>(void 0===a&&(a=n(t,o)),a),h=t.coordinate,p=0===l||I1(e,h,d,u,A);p||(l=0,u=s,c+=1),p&&(u=h+e*(d()/2+i),l+=c)};c<=o.length;)if(a=d())return a.v;return[]}(v,w,m,a,s):"equidistantPreserveEnd"===l?function(e,t,n,r,i){var a=(r||[]).slice().length;if(0===a)return[];for(var{start:o,end:s}=t,A=1;A<=a;A++){for(var l,c=(a-1)%A,u=o,d=!0,h=function(){var t=r[p];if(null==t)return 0;var a,o=p,A=()=>(void 0===a&&(a=n(t,o)),a),l=t.coordinate,h=p===c||I1(e,l,A,u,s);if(!h)return d=!1,1;h&&(u=l+e*(A()/2+i))},p=c;p<a&&(0===(l=h())||1!==l);p+=A);if(d){for(var f=[],m=c;m<a;m+=A){var g=r[m];null!=g&&f.push(g)}return f}}return[]}(v,w,m,a,s):(h="preserveStart"===l||"preserveStartEnd"===l?function(e,t,n,r,i,a){var o=(r||[]).slice(),s=o.length,{start:A,end:l}=t;if(a){var c=r[s-1];if(null!=c){var u=n(c,s-1),d=e*(c.coordinate+e*u/2-l);o[s-1]=c=P1(P1({},c),{},{tickCoord:d>0?c.coordinate-d*e:c.coordinate}),null!=c.tickCoord&&I1(e,c.tickCoord,()=>u,A,l)&&(l=c.tickCoord-e*(u/2+i),o[s-1]=P1(P1({},c),{},{isShow:!0}))}}for(var h=a?s-1:s,p=function(t){var r=o[t];if(null==r)return 1;var a,s=r,c=()=>(void 0===a&&(a=n(r,t)),a);if(0===t){var u=e*(s.coordinate-e*c()/2-A);o[t]=s=P1(P1({},s),{},{tickCoord:u<0?s.coordinate-u*e:s.coordinate})}else o[t]=s=P1(P1({},s),{},{tickCoord:s.coordinate});null!=s.tickCoord&&I1(e,s.tickCoord,c,A,l)&&(A=s.tickCoord+e*(c()/2+i),o[t]=P1(P1({},s),{},{isShow:!0}))},f=0;f<h;f++)p(f);return o}(v,w,m,a,s,"preserveStartEnd"===l):function(e,t,n,r,i){for(var a=(r||[]).slice(),o=a.length,{start:s}=t,{end:A}=t,l=function(t){var r=a[t];if(null==r)return 1;var l,c=r,u=()=>(void 0===l&&(l=n(r,t)),l);if(t===o-1){var d=e*(c.coordinate+e*u()/2-A);a[t]=c=P1(P1({},c),{},{tickCoord:d>0?c.coordinate-d*e:c.coordinate})}else a[t]=c=P1(P1({},c),{},{tickCoord:c.coordinate});null!=c.tickCoord&&I1(e,c.tickCoord,u,s,A)&&(A=c.tickCoord-e*(u()/2+i),a[t]=P1(P1({},c),{},{isShow:!0}))},c=o-1;c>=0;c--)l(c);return a}(v,w,m,a,s),h.filter(e=>e.isShow))}var L1=["axisLine","width","height","className","hide","ticks","axisType"];function H1(){return H1=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},H1.apply(null,arguments)}function _1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function R1(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_1(Object(n),!0).forEach(function(t){K1(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_1(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function K1(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var z1={x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd",zIndex:cV.axis};function V1(e){var{x:t,y:n,width:r,height:i,orientation:a,mirror:o,axisLine:s,otherSvgProps:A}=e;if(!s)return null;var l=R1(R1(R1({},A),Wk(s)),{},{fill:"none"});if("top"===a||"bottom"===a){var c=+("top"===a&&!o||"bottom"===a&&o);l=R1(R1({},l),{},{x1:t,y1:n+c*i,x2:t+r,y2:n+c*i})}else{var u=+("left"===a&&!o||"right"===a&&o);l=R1(R1({},l),{},{x1:t+u*r,y1:n,x2:t+u*r,y2:n+i})}return De.createElement("line",H1({},l,{className:yh("recharts-cartesian-axis-line",FF(s,"className"))}))}function $1(e){var t,{option:n,tickProps:r,value:i}=e,a=yh(r.className,"recharts-cartesian-axis-tick-value");if(De.isValidElement(n))t=De.cloneElement(n,R1(R1({},r),{},{className:a}));else if("function"==typeof n)t=n(R1(R1({},r),{},{className:a}));else{var o="recharts-cartesian-axis-tick-value";"boolean"!=typeof n&&(o=yh(o,FJ(n))),t=De.createElement(yY,H1({},r,{className:o}),i)}return t}var W1=Te.forwardRef((e,t)=>{var{ticks:n=[],tick:r,tickLine:i,stroke:a,tickFormatter:o,unit:s,padding:A,tickTextProps:l,orientation:c,mirror:u,x:d,y:h,width:p,height:f,tickSize:m,tickMargin:g,fontSize:y,letterSpacing:v,getTicksConfig:w,events:x,axisType:b}=e,B=D1(R1(R1({},w),{},{ticks:n}),y,v),C=function(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}(c,u),E=function(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}(c,u),k=Wk(w),S=Gk(r),F={};"object"==typeof i&&(F=i);var Q=R1(R1({},k),{},{fill:"none"},F),j=B.map(e=>R1({entry:e},function(e,t,n,r,i,a,o,s,A){var l,c,u,d,h,p,f=s?-1:1,m=e.tickSize||o,g=IF(e.tickCoord)?e.tickCoord:e.coordinate;switch(a){case"top":l=c=e.coordinate,p=(u=(d=n+ +!s*i)-f*m)-f*A,h=g;break;case"left":u=d=e.coordinate,h=(l=(c=t+ +!s*r)-f*m)-f*A,p=g;break;case"right":u=d=e.coordinate,h=(l=(c=t+ +s*r)+f*m)+f*A,p=g;break;default:l=c=e.coordinate,p=(u=(d=n+ +s*i)+f*m)+f*A,h=g}return{line:{x1:l,y1:u,x2:c,y2:d},tick:{x:h,y:p}}}(e,d,h,p,f,c,m,u,g))),U=j.map(e=>{var{entry:t,line:n}=e;return De.createElement(tS,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(t.value,"-").concat(t.coordinate,"-").concat(t.tickCoord)},i&&De.createElement("line",H1({},Q,n,{className:yh("recharts-cartesian-axis-tick-line",FF(i,"className"))})))}),O=j.map((e,t)=>{var n,i,{entry:c,tick:u}=e,d=R1(R1(R1(R1({verticalAnchor:E},k),{},{textAnchor:C,stroke:"none",fill:a},u),{},{index:t,payload:c,visibleTicksCount:B.length,tickFormatter:o,padding:A},l),{},{angle:null!==(n=null!==(i=null==l?void 0:l.angle)&&void 0!==i?i:k.angle)&&void 0!==n?n:0}),h=R1(R1({},d),S);return De.createElement(tS,H1({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(c.value,"-").concat(c.coordinate,"-").concat(c.tickCoord)},nQ(x,c,t)),r&&De.createElement($1,{option:r,tickProps:h,value:"".concat("function"==typeof o?o(c.value,t):c.value).concat(s||"")}))});return De.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(b,"-ticks")},O.length>0&&De.createElement(Gq,{zIndex:cV.label},De.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(b,"-tick-labels"),ref:t},O)),U.length>0&&De.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(b,"-tick-lines")},U))}),G1=Te.forwardRef((e,t)=>{var{axisLine:n,width:r,height:i,className:a,hide:o,ticks:s,axisType:A}=e,l=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,L1),[c,u]=Te.useState(""),[d,h]=Te.useState(""),p=Te.useRef(null);Te.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var t;return(e=>{var{ticks:t,label:n,labelGapWithTick:r=5,tickSize:i=0,tickMargin:a=0}=e,o=0;if(t){Array.from(t).forEach(e=>{if(e){var t=e.getBoundingClientRect();t.width>o&&(o=t.width)}});var s=n?n.getBoundingClientRect().width:0,A=o+(i+a)+s+(n?r:0);return Math.round(A)}return 0})({ticks:p.current,label:null===(t=e.labelRef)||void 0===t?void 0:t.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var f=Te.useCallback(e=>{if(e){var t=e.getElementsByClassName("recharts-cartesian-axis-tick-value");p.current=t;var n=t[0];if(n){var r=window.getComputedStyle(n),i=r.fontSize,a=r.letterSpacing;i===c&&a===d||(u(i),h(a))}}},[c,d]);return o||null!=r&&r<=0||null!=i&&i<=0?null:De.createElement(Gq,{zIndex:e.zIndex},De.createElement(tS,{className:yh("recharts-cartesian-axis",a)},De.createElement(V1,{x:e.x,y:e.y,width:r,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:n,otherSvgProps:Wk(e)}),De.createElement(W1,{ref:f,axisType:A,events:l,fontSize:c,getTicksConfig:e,height:e.height,letterSpacing:d,mirror:e.mirror,orientation:e.orientation,padding:e.padding,stroke:e.stroke,tick:e.tick,tickFormatter:e.tickFormatter,tickLine:e.tickLine,tickMargin:e.tickMargin,tickSize:e.tickSize,tickTextProps:e.tickTextProps,ticks:s,unit:e.unit,width:e.width,x:e.x,y:e.y}),De.createElement(jY,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},De.createElement(DY,{label:e.label,labelRef:e.labelRef}),e.children)))}),q1=De.forwardRef((e,t)=>{var n=aQ(e,z1);return De.createElement(G1,H1({},n,{ref:t}))});q1.displayName="CartesianAxis";var X1=["x1","y1","x2","y2","key"],Y1=["offset"],J1=["xAxisId","yAxisId"],Z1=["xAxisId","yAxisId"];function e2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function t2(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?e2(Object(n),!0).forEach(function(t){n2(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):e2(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function n2(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r2(){return r2=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},r2.apply(null,arguments)}function i2(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var a2=e=>{var{fill:t}=e;if(!t||"none"===t)return null;var{fillOpacity:n,x:r,y:i,width:a,height:o,ry:s}=e;return De.createElement("rect",{x:r,y:i,ry:s,width:a,height:o,stroke:"none",fill:t,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function o2(e){var t,{option:n,lineItemProps:r}=e;if(De.isValidElement(n))t=De.cloneElement(n,r);else if("function"==typeof n)t=n(r);else{var i,{x1:a,y1:o,x2:s,y2:A,key:l}=r,c=null!==(i=Wk(i2(r,X1)))&&void 0!==i?i:{},{offset:u}=c,d=i2(c,Y1);t=De.createElement("line",r2({},d,{x1:a,y1:o,x2:s,y2:A,fill:"none",key:l}))}return t}function s2(e){var{x:t,width:n,horizontal:r=!0,horizontalPoints:i}=e;if(!r||!i||!i.length)return null;var{xAxisId:a,yAxisId:o}=e,s=i2(e,J1),A=i.map((e,i)=>{var a=t2(t2({},s),{},{x1:t,y1:e,x2:t+n,y2:e,key:"line-".concat(i),index:i});return De.createElement(o2,{key:"line-".concat(i),option:r,lineItemProps:a})});return De.createElement("g",{className:"recharts-cartesian-grid-horizontal"},A)}function A2(e){var{y:t,height:n,vertical:r=!0,verticalPoints:i}=e;if(!r||!i||!i.length)return null;var{xAxisId:a,yAxisId:o}=e,s=i2(e,Z1),A=i.map((e,i)=>{var a=t2(t2({},s),{},{x1:e,y1:t,x2:e,y2:t+n,key:"line-".concat(i),index:i});return De.createElement(o2,{option:r,lineItemProps:a,key:"line-".concat(i)})});return De.createElement("g",{className:"recharts-cartesian-grid-vertical"},A)}function l2(e){var{horizontalFill:t,fillOpacity:n,x:r,y:i,width:a,height:o,horizontalPoints:s,horizontal:A=!0}=e;if(!A||!t||!t.length||null==s)return null;var l=s.map(e=>Math.round(e+i-i)).sort((e,t)=>e-t);i!==l[0]&&l.unshift(0);var c=l.map((e,s)=>{var A=l[s+1],c=null==A?i+o-e:A-e;if(c<=0)return null;var u=s%t.length;return De.createElement("rect",{key:"react-".concat(s),y:e,x:r,height:c,width:a,stroke:"none",fill:t[u],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return De.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},c)}function c2(e){var{vertical:t=!0,verticalFill:n,fillOpacity:r,x:i,y:a,width:o,height:s,verticalPoints:A}=e;if(!t||!n||!n.length)return null;var l=A.map(e=>Math.round(e+i-i)).sort((e,t)=>e-t);i!==l[0]&&l.unshift(0);var c=l.map((e,t)=>{var A=l[t+1],c=null==A?i+o-e:A-e;if(c<=0)return null;var u=t%n.length;return De.createElement("rect",{key:"react-".concat(t),x:e,y:a,width:c,height:s,stroke:"none",fill:n[u],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return De.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},c)}var u2=(e,t)=>{var{xAxis:n,width:r,height:i,offset:a}=e;return qI(D1(t2(t2(t2({},z1),n),{},{ticks:XI(n),viewBox:{x:0,y:0,width:r,height:i}})),a.left,a.left+a.width,t)},d2=(e,t)=>{var{yAxis:n,width:r,height:i,offset:a}=e;return qI(D1(t2(t2(t2({},z1),n),{},{ticks:XI(n),viewBox:{x:0,y:0,width:r,height:i}})),a.top,a.top+a.height,t)},h2={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:cV.grid};function p2(e){var t=aP(),n=oP(),r=iP(),i=t2(t2({},aQ(e,h2)),{},{x:IF(e.x)?e.x:r.left,y:IF(e.y)?e.y:r.top,width:IF(e.width)?e.width:r.width,height:IF(e.height)?e.height:r.height}),{xAxisId:a,yAxisId:o,x:s,y:A,width:l,height:c,syncWithTicks:u,horizontalValues:d,verticalValues:h}=i,p=ST(),f=pU(e=>NW(e,"xAxis",a,p)),m=pU(e=>NW(e,"yAxis",o,p));if(!(KI(l)&&KI(c)&&IF(s)&&IF(A)))return null;var g=i.verticalCoordinatesGenerator||u2,y=i.horizontalCoordinatesGenerator||d2,{horizontalPoints:v,verticalPoints:w}=i;if(!(v&&v.length||"function"!=typeof y)){var x=d&&d.length,b=y({yAxis:m?t2(t2({},m),{},{ticks:x?d:m.ticks}):void 0,width:null!=t?t:l,height:null!=n?n:c,offset:r},!!x||u);DT(Array.isArray(b),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof b,"]")),Array.isArray(b)&&(v=b)}if(!(w&&w.length||"function"!=typeof g)){var B=h&&h.length,C=g({xAxis:f?t2(t2({},f),{},{ticks:B?h:f.ticks}):void 0,width:null!=t?t:l,height:null!=n?n:c,offset:r},!!B||u);DT(Array.isArray(C),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof C,"]")),Array.isArray(C)&&(w=C)}return De.createElement(Gq,{zIndex:i.zIndex},De.createElement("g",{className:"recharts-cartesian-grid"},De.createElement(a2,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),De.createElement(l2,r2({},i,{horizontalPoints:v})),De.createElement(c2,r2({},i,{verticalPoints:w})),De.createElement(s2,r2({},i,{offset:r,horizontalPoints:v,xAxis:f,yAxis:m})),De.createElement(A2,r2({},i,{offset:r,verticalPoints:w,xAxis:f,yAxis:m}))))}p2.displayName="CartesianGrid";var f2=tI({name:"errorBars",initialState:{},reducers:{addErrorBar:(e,t)=>{var{itemId:n,errorBar:r}=t.payload;e[n]||(e[n]=[]),e[n].push(r)},replaceErrorBar:(e,t)=>{var{itemId:n,prev:r,next:i}=t.payload;e[n]&&(e[n]=e[n].map(e=>e.dataKey===r.dataKey&&e.direction===r.direction?i:e))},removeErrorBar:(e,t)=>{var{itemId:n,errorBar:r}=t.payload;e[n]&&(e[n]=e[n].filter(e=>e.dataKey!==r.dataKey||e.direction!==r.direction))}}}),{addErrorBar:m2,replaceErrorBar:g2,removeErrorBar:y2}=f2.actions,v2=f2.reducer,w2=["children"];var x2={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},b2=Te.createContext(x2);function B2(e){var{children:t}=e,n=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,w2);return De.createElement(b2.Provider,{value:n},t)}function C2(e,t){var n,r,i=pU(t=>VV(t,e)),a=pU(e=>GV(e,t)),o=null!==(n=null==i?void 0:i.allowDataOverflow)&&void 0!==n?n:KV.allowDataOverflow,s=null!==(r=null==a?void 0:a.allowDataOverflow)&&void 0!==r?r:$V.allowDataOverflow;return{needClip:o||s,needClipX:o,needClipY:s}}function E2(e){var{xAxisId:t,yAxisId:n,clipPathId:r}=e,i=N0(),{needClipX:a,needClipY:o,needClip:s}=C2(t,n);if(!s||!i)return null;var{x:A,y:l,width:c,height:u}=i;return De.createElement("clipPath",{id:"clipPath-".concat(r)},De.createElement("rect",{x:a?A:A-c/2,y:o?l:l-u/2,width:a?c:2*c,height:o?u:2*u}))}var k2=(e,t,n,r)=>PW(e,"xAxis",t,r),S2=(e,t,n,r)=>TW(e,"xAxis",t,r),F2=(e,t,n,r)=>PW(e,"yAxis",n,r),Q2=(e,t,n,r)=>TW(e,"yAxis",n,r),j2=kU([sP,k2,F2,S2,Q2],(e,t,n,r,i)=>GI(e,"xAxis")?iT(t,r,!1):iT(n,i,!1));function U2(e){return"line"===e.type}var O2=kU([t$,(e,t,n,r,i)=>i],(e,t)=>e.filter(U2).find(e=>e.id===t)),N2=kU([sP,k2,F2,S2,Q2,O2,j2,mz],(e,t,n,r,i,a,o,s)=>{var{chartData:A,dataStartIndex:l,dataEndIndex:c}=s;if(null!=a&&null!=t&&null!=n&&null!=r&&null!=i&&0!==r.length&&0!==i.length&&null!=o&&("horizontal"===e||"vertical"===e)){var u,{dataKey:d,data:h}=a;if(null!=(u=null!=h&&h.length>0?h:null==A?void 0:A.slice(l,c+1)))return function(e){var{layout:t,xAxis:n,yAxis:r,xAxisTicks:i,yAxisTicks:a,dataKey:o,bandSize:s,displayedData:A}=e;return A.map((e,A)=>{var l=WI(e,o);if("horizontal"===t){var c=ZI({axis:n,ticks:i,bandSize:s,entry:e,index:A}),u=RF(l)?null:r.scale.map(l);return{x:c,y:null!=u?u:null,value:l,payload:e}}var d=RF(l)?null:n.scale.map(l),h=ZI({axis:r,ticks:a,bandSize:s,entry:e,index:A});return null==d||null==h?null:{x:d,y:h,value:l,payload:e}}).filter(Boolean)}({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataKey:d,bandSize:o,displayedData:u})}});var I2,T2={exports:{}},P2={};var M2,D2,L2={};
|
|
81
|
+
/**
|
|
82
|
+
* @license React
|
|
83
|
+
* use-sync-external-store-with-selector.development.js
|
|
84
|
+
*
|
|
85
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
86
|
+
*
|
|
87
|
+
* This source code is licensed under the MIT license found in the
|
|
88
|
+
* LICENSE file in the root directory of this source tree.
|
|
89
|
+
*/D2||(D2=1,"production"===process.env.NODE_ENV?T2.exports=function(){if(I2)return P2;I2=1;var e=Te,t="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},n=e.useSyncExternalStore,r=e.useRef,i=e.useEffect,a=e.useMemo,o=e.useDebugValue;return P2.useSyncExternalStoreWithSelector=function(e,s,A,l,c){var u=r(null);if(null===u.current){var d={hasValue:!1,value:null};u.current=d}else d=u.current;u=a(function(){function e(e){if(!i){if(i=!0,n=e,e=l(e),void 0!==c&&d.hasValue){var a=d.value;if(c(a,e))return r=a}return r=e}if(a=r,t(n,e))return a;var o=l(e);return void 0!==c&&c(a,o)?(n=e,a):(n=e,r=o)}var n,r,i=!1,a=void 0===A?null:A;return[function(){return e(s())},null===a?void 0:function(){return e(a())}]},[s,A,l,c]);var h=n(e,u[0],u[1]);return i(function(){d.hasValue=!0,d.value=h},[h]),o(h),h},P2}():T2.exports=(M2||(M2=1,"production"!==process.env.NODE_ENV&&function(){"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var e=Te,t="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},n=e.useSyncExternalStore,r=e.useRef,i=e.useEffect,a=e.useMemo,o=e.useDebugValue;L2.useSyncExternalStoreWithSelector=function(e,s,A,l,c){var u=r(null);if(null===u.current){var d={hasValue:!1,value:null};u.current=d}else d=u.current;u=a(function(){function e(e){if(!i){if(i=!0,n=e,e=l(e),void 0!==c&&d.hasValue){var a=d.value;if(c(a,e))return r=a}return r=e}if(a=r,t(n,e))return a;var o=l(e);return void 0!==c&&c(a,o)?(n=e,a):(n=e,r=o)}var n,r,i=!1,a=void 0===A?null:A;return[function(){return e(s())},null===a?void 0:function(){return e(a())}]},[s,A,l,c]);var h=n(e,u[0],u[1]);return i(function(){d.hasValue=!0,d.value=h},[h]),o(h),h},"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),L2)),T2.exports;var H2={notify(){},get:()=>[]};var _2=(()=>!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement))(),R2=(()=>"undefined"!=typeof navigator&&"ReactNative"===navigator.product)(),K2=(()=>_2||R2?De.useLayoutEffect:De.useEffect)();function z2(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function V2(e,t){if(z2(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(t,n[i])||!z2(e[n[i]],t[n[i]]))return!1;return!0}var $2=Symbol.for("react-redux-context"),W2="undefined"!=typeof globalThis?globalThis:{};function G2(){if(!De.createContext)return{};const e=W2[$2]??(W2[$2]=new Map);let t=e.get(De.createContext);return t||(t=De.createContext(null),"production"!==process.env.NODE_ENV&&(t.displayName="ReactRedux"),e.set(De.createContext,t)),t}var q2=G2();var X2=function(e){const{children:t,context:n,serverState:r,store:i}=e,a=De.useMemo(()=>{const t=function(e){let t,n=H2,r=0,i=!1;function a(){A.onStateChange&&A.onStateChange()}function o(){r++,t||(t=e.subscribe(a),n=function(){let e=null,t=null;return{clear(){e=null,t=null},notify(){(()=>{let t=e;for(;t;)t.callback(),t=t.next})()},get(){const t=[];let n=e;for(;n;)t.push(n),n=n.next;return t},subscribe(n){let r=!0;const i=t={callback:n,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){r&&null!==e&&(r=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}())}function s(){r--,t&&0===r&&(t(),t=void 0,n.clear(),n=H2)}const A={addNestedSub:function(e){o();const t=n.subscribe(e);let r=!1;return()=>{r||(r=!0,t(),s())}},notifyNestedSubs:function(){n.notify()},handleChangeWrapper:a,isSubscribed:function(){return i},trySubscribe:function(){i||(i=!0,o())},tryUnsubscribe:function(){i&&(i=!1,s())},getListeners:()=>n};return A}(i),n={store:i,subscription:t,getServerState:r?()=>r:void 0};if("production"===process.env.NODE_ENV)return n;{const{identityFunctionCheck:t="once",stabilityCheck:r="once"}=e;return Object.assign(n,{stabilityCheck:r,identityFunctionCheck:t})}},[i,r]),o=De.useMemo(()=>i.getState(),[i]);K2(()=>{const{subscription:e}=a;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),o!==i.getState()&&e.notifyNestedSubs(),()=>{e.tryUnsubscribe(),e.onStateChange=void 0}},[a,o]);const s=n||q2;return De.createElement(s.Provider,{value:a},t)},Y2=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius"]);function J2(e,t){return null==e&&null==t||("number"==typeof e&&"number"==typeof t?e===t||e!=e&&t!=t:e===t)}function Z2(e,t){var n=new Set([...Object.keys(e),...Object.keys(t)]);for(var r of n)if(Y2.has(r)){if(null==e[r]&&null==t[r])continue;if(!V2(e[r],t[r]))return!1}else if(!J2(e[r],t[r]))return!1;return!0}var e4=["id"],t4=["type","layout","connectNulls","needClip","shape"],n4=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function r4(){return r4=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},r4.apply(null,arguments)}function i4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function a4(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i4(Object(n),!0).forEach(function(t){o4(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i4(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function o4(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s4(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var A4=e=>{var{dataKey:t,name:n,stroke:r,legendType:i,hide:a}=e;return[{inactive:a,dataKey:t,type:i,color:r,value:oT(n,t),payload:e}]},l4=De.memo(e=>{var{dataKey:t,data:n,stroke:r,strokeWidth:i,fill:a,name:o,hide:s,unit:A,tooltipType:l,id:c}=e,u={dataDefinedOnItem:n,getPosition:VF,settings:{stroke:r,strokeWidth:i,fill:a,dataKey:t,nameKey:void 0,name:oT(o,t),hide:s,type:l,color:r,unit:A,graphicalItemId:c}};return De.createElement(kZ,{tooltipEntrySettings:u})}),c4=(e,t)=>"".concat(t,"px ").concat(e-t,"px");function u4(e,t){for(var n=e.length%2!=0?[...e,0]:e,r=[],i=0;i<t;++i)r=[...r,...n];return r}function d4(e){var{clipPathId:t,points:n,props:r}=e,{dot:i,dataKey:a,needClip:o}=r,{id:s}=r,A=Wk(s4(r,e4));return De.createElement(f0,{points:n,dot:i,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:a,baseProps:A,needClip:o,clipPathId:t})}function h4(e){var{showLabels:t,children:n,points:r}=e,i=Te.useMemo(()=>null==r?void 0:r.map(e=>{var t,n,r={x:null!==(t=e.x)&&void 0!==t?t:0,y:null!==(n=e.y)&&void 0!==n?n:0,width:0,lowerWidth:0,upperWidth:0,height:0};return a4(a4({},r),{},{value:e.value,payload:e.payload,viewBox:r,parentViewBox:void 0,fill:void 0})}),[r]);return De.createElement(rJ,{value:t?i:void 0},n)}function p4(e){var{clipPathId:t,pathRef:n,points:r,strokeDasharray:i,props:a}=e,{type:o,layout:s,connectNulls:A,needClip:l,shape:c}=a,u=a4(a4({},qk(s4(a,t4))),{},{fill:"none",className:"recharts-line-curve",clipPath:l?"url(#clipPath-".concat(t,")"):void 0,points:r,type:o,layout:s,connectNulls:A,strokeDasharray:null!=i?i:a.strokeDasharray});return De.createElement(De.Fragment,null,(null==r?void 0:r.length)>1&&De.createElement(xZ,r4({shapeType:"curve",option:c},u,{pathRef:n})),De.createElement(d4,{points:r,clipPathId:t,props:a}))}function f4(e){var{clipPathId:t,props:n,pathRef:r,previousPointsRef:i,longestAnimatedLengthRef:a}=e,{points:o,strokeDasharray:s,isAnimationActive:A,animationBegin:l,animationDuration:c,animationEasing:u,animateNewValues:d,width:h,height:p,onAnimationEnd:f,onAnimationStart:m}=n,g=i.current,y=QD(o,"recharts-line-"),v=Te.useRef(y),[w,x]=Te.useState(!1),b=!w,B=Te.useCallback(()=>{"function"==typeof f&&f(),x(!1)},[f]),C=Te.useCallback(()=>{"function"==typeof m&&m(),x(!0)},[m]),E=function(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch(t){return 0}}(r.current),k=Te.useRef(0);v.current!==y&&(k.current=a.current,v.current=y);var S=k.current;return De.createElement(h4,{points:o,showLabels:b},n.children,De.createElement(FD,{animationId:y,begin:l,duration:c,isActive:A,easing:u,onAnimationEnd:B,onAnimationStart:C,key:y},e=>{var l,c=HF(S,E+S,e),u=Math.min(c,E);if(A)if(s){var f="".concat(s).split(/[,\s]+/gim).map(e=>parseFloat(e));l=((e,t,n)=>{var r=n.reduce((e,t)=>e+t);if(!r)return c4(t,e);for(var i=Math.floor(e/r),a=e%r,o=t-e,s=[],A=0,l=0;A<n.length;l+=null!==(c=n[A])&&void 0!==c?c:0,++A){var c,u=n[A];if(null!=u&&l+u>a){s=[...n.slice(0,A),a-l];break}}var d=s.length%2==0?[0,o]:[o];return[...u4(n,i),...s,...d].map(e=>"".concat(e,"px")).join(", ")})(u,E,f)}else l=c4(E,u);else l=null==s?void 0:String(s);if(e>0&&E>0&&(i.current=o,a.current=Math.max(a.current,u)),g){var m=g.length/o.length,y=1===e?o:o.map((t,n)=>{var r=Math.floor(n*m);if(g[r]){var i=g[r];return a4(a4({},t),{},{x:HF(i.x,t.x,e),y:HF(i.y,t.y,e)})}return a4(a4({},t),{},d?{x:HF(2*h,t.x,e),y:HF(p/2,t.y,e)}:{x:t.x,y:t.y})});return i.current=y,De.createElement(p4,{props:n,points:y,clipPathId:t,pathRef:r,strokeDasharray:l})}return De.createElement(p4,{props:n,points:o,clipPathId:t,pathRef:r,strokeDasharray:l})}),De.createElement(sJ,{label:n.label}))}function m4(e){var{clipPathId:t,props:n}=e,r=Te.useRef(null),i=Te.useRef(0),a=Te.useRef(null);return De.createElement(f4,{props:n,clipPathId:t,previousPointsRef:r,longestAnimatedLengthRef:i,pathRef:a})}var g4=(e,t)=>{var n,r;return{x:null!==(n=e.x)&&void 0!==n?n:void 0,y:null!==(r=e.y)&&void 0!==r?r:void 0,value:e.value,errorVal:WI(e.payload,t)}};class y4 extends Te.Component{render(){var{hide:e,dot:t,points:n,className:r,xAxisId:i,yAxisId:a,top:o,left:s,width:A,height:l,id:c,needClip:u,zIndex:d}=this.props;if(e)return null;var h=yh("recharts-line",r),p=c,{r:f,strokeWidth:m}=function(e){var t=Gk(e);if(null!=t){var{r:n,strokeWidth:r}=t,i=Number(n),a=Number(r);return(Number.isNaN(i)||i<0)&&(i=3),(Number.isNaN(a)||a<0)&&(a=2),{r:i,strokeWidth:a}}return{r:3,strokeWidth:2}}(t),g=ZJ(t),y=2*f+m,v=u?"url(#clipPath-".concat(g?"":"dots-").concat(p,")"):void 0;return De.createElement(Gq,{zIndex:d},De.createElement(tS,{className:h},u&&De.createElement("defs",null,De.createElement(E2,{clipPathId:p,xAxisId:i,yAxisId:a}),!g&&De.createElement("clipPath",{id:"clipPath-dots-".concat(p)},De.createElement("rect",{x:s-y/2,y:o-y/2,width:A+y,height:l+y}))),De.createElement(B2,{xAxisId:i,yAxisId:a,data:n,dataPointFormatter:g4,errorBarOffset:0},De.createElement(m4,{props:this.props,clipPathId:p}))),De.createElement(D0,{activeDot:this.props.activeDot,points:n,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:v}))}}var v4={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:"auto",label:!1,legendType:"line",stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0,zIndex:cV.line,type:"linear"};function w4(e){var t=aQ(e,v4),{activeDot:n,animateNewValues:r,animationBegin:i,animationDuration:a,animationEasing:o,connectNulls:s,dot:A,hide:l,isAnimationActive:c,label:u,legendType:d,xAxisId:h,yAxisId:p,id:f}=t,m=s4(t,n4),{needClip:g}=C2(h,p),y=N0(),v=AP(),w=ST(),x=pU(e=>N2(e,h,p,w,f));if("horizontal"!==v&&"vertical"!==v||null==x||null==y)return null;var{height:b,width:B,x:C,y:E}=y;return De.createElement(y4,r4({},m,{id:f,connectNulls:s,dot:A,activeDot:n,animateNewValues:r,animationBegin:i,animationDuration:a,animationEasing:o,isAnimationActive:c,hide:l,label:u,legendType:d,xAxisId:h,yAxisId:p,points:x,layout:v,height:b,width:B,left:C,top:E,needClip:g}))}function x4(e){var t=aQ(e,v4),n=ST();return De.createElement(UZ,{id:t.id,type:"line"},e=>De.createElement(De.Fragment,null,De.createElement(SZ,{legendPayload:A4(t)}),De.createElement(l4,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:e}),De.createElement(HZ,{type:"line",id:e,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:n}),De.createElement(w4,r4({},t,{id:e}))))}var b4=De.memo(x4,Z2);function B4(e,t){var n,r;return null!==(n=null===(r=e.graphicalItems.cartesianItems.find(e=>e.id===t))||void 0===r?void 0:r.xAxisId)&&void 0!==n?n:0}function C4(e,t){var n,r;return null!==(n=null===(r=e.graphicalItems.cartesianItems.find(e=>e.id===t))||void 0===r?void 0:r.yAxisId)&&void 0!==n?n:0}b4.displayName="Line";var E4="production"===process.env.NODE_ENV,k4="Invariant failed";function S4(){return S4=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},S4.apply(null,arguments)}function F4(e){return De.createElement(xZ,S4({shapeType:"rectangle",activeClassName:"recharts-active-bar"},e))}var Q4=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(n,r)=>{if(IF(e))return e;var i=IF(n)||RF(n);return i?e(n,r):(i||function(e,t){if(E4)throw new Error(k4);var n="function"==typeof t?t():t,r=n?"".concat(k4,": ").concat(n):k4;throw new Error(r)}(0,"minPointSize callback function received a value with type of ".concat(typeof n,". Currently only numbers or null/undefined are supported.")),t)}},j4=kU([t$,(e,t)=>t],(e,t)=>e.filter(e=>"bar"===e.type).find(e=>e.id===t)),U4=kU([j4],e=>null==e?void 0:e.maxBarSize),O4=kU([sP,t$,B4,C4,(e,t,n)=>n],(e,t,n,r,i)=>t.filter(t=>"horizontal"===e?t.xAxisId===n:t.yAxisId===r).filter(e=>e.isPanorama===i).filter(e=>!1===e.hide).filter(e=>"bar"===e.type)),N4=kU([O4,e=>e.rootProps.barSize,(e,t)=>{var n=sP(e),r=B4(e,t),i=C4(e,t);if(null!=r&&null!=i)return"horizontal"===n?FW(e,"xAxis",r):FW(e,"yAxis",i)}],(e,t,n)=>{var r=e.filter(UV),i=e.filter(e=>null==e.stackId),a=r.reduce((e,t)=>{var n=e[t.stackId];return null==n&&(n=[]),n.push(t),e[t.stackId]=n,e},{});return[...Object.entries(a).map(e=>{var r,[i,a]=e;return{stackId:i,dataKeys:a.map(e=>e.dataKey),barSize:L0(t,n,null===(r=a[0])||void 0===r?void 0:r.barSize)}}),...i.map(e=>({stackId:void 0,dataKeys:[e.dataKey].filter(e=>null!=e),barSize:L0(t,n,e.barSize)}))]}),I4=(e,t,n)=>{var r,i,a=sP(e),o=B4(e,t),s=C4(e,t);if(null!=o&&null!=s)return"horizontal"===a?(r=PW(e,"xAxis",o,n),i=TW(e,"xAxis",o,n)):(r=PW(e,"yAxis",s,n),i=TW(e,"yAxis",s,n)),iT(r,i)},T4=kU([N4,nV,e=>e.rootProps.barGap,rV,(e,t,n)=>{var r,i,a=j4(e,t);if(null==a)return 0;var o=B4(e,t),s=C4(e,t);if(null==o||null==s)return 0;var A,l,c=sP(e),u=nV(e),{maxBarSize:d}=a,h=RF(d)?u:d;return"horizontal"===c?(A=PW(e,"xAxis",o,n),l=TW(e,"xAxis",o,n)):(A=PW(e,"yAxis",s,n),l=TW(e,"yAxis",s,n)),null!==(r=null!==(i=iT(A,l,!0))&&void 0!==i?i:h)&&void 0!==r?r:0},I4,U4],(e,t,n,r,i,a,o)=>{var s=RF(o)?t:o,A=function(e,t,n,r,i){var a,o=r.length;if(!(o<1)){var s,A=DF(e,n,0,!0),l=[];if(RI(null===(a=r[0])||void 0===a?void 0:a.barSize)){var c=!1,u=n/o,d=r.reduce((e,t)=>e+(t.barSize||0),0);(d+=(o-1)*A)>=n&&(d-=(o-1)*A,A=0),d>=n&&u>0&&(c=!0,d=o*(u*=.9));var h={offset:((n-d)/2|0)-A,size:0};s=r.reduce((e,t)=>{var n,r={stackId:t.stackId,dataKeys:t.dataKeys,position:{offset:h.offset+h.size+A,size:c?u:null!==(n=t.barSize)&&void 0!==n?n:0}},i=[...e,r];return h=r.position,i},l)}else{var p=DF(t,n,0,!0);n-2*p-(o-1)*A<=0&&(A=0);var f=(n-2*p-(o-1)*A)/o;f>1&&(f>>=0);var m=RI(i)?Math.min(f,i):f;s=r.reduce((e,t,n)=>[...e,{stackId:t.stackId,dataKeys:t.dataKeys,position:{offset:p+(f+A)*n+(f-m)/2,size:m}}],l)}return s}}(n,r,i!==a?i:a,e,s);return i!==a&&null!=A&&(A=A.map(e=>_0(_0({},e),{},{position:_0(_0({},e.position),{},{offset:e.position.offset-i/2})}))),A}),P4=kU([T4,j4],(e,t)=>{if(null!=e&&null!=t){var n=e.find(e=>e.stackId===t.stackId&&null!=t.dataKey&&e.dataKeys.includes(t.dataKey));if(null!=n)return n.position}}),M4=kU([(e,t,n)=>{var r=sP(e),i=B4(e,t),a=C4(e,t);if(null!=i&&null!=a)return"horizontal"===r?b$(e,"yAxis",a,n):b$(e,"xAxis",i,n)},j4],(e,t)=>{var n=QV(t);if(e&&null!=n&&null!=t){var{stackId:r}=t;if(null!=r){var i=e[r];if(i){var{stackedData:a}=i;if(a)return a.find(e=>e.key===n)}}}}),D4=kU([BT,ET,(e,t,n)=>{var r=B4(e,t);if(null!=r)return PW(e,"xAxis",r,n)},(e,t,n)=>{var r=C4(e,t);if(null!=r)return PW(e,"yAxis",r,n)},(e,t,n)=>{var r=B4(e,t);if(null!=r)return TW(e,"xAxis",r,n)},(e,t,n)=>{var r=C4(e,t);if(null!=r)return TW(e,"yAxis",r,n)},P4,sP,(e,t,n)=>n?fz(e):pz(e),I4,M4,j4,(e,t,n,r)=>r],(e,t,n,r,i,a,o,s,A,l,c,u,d)=>{var{chartData:h,dataStartIndex:p,dataEndIndex:f}=A;if(null!=u&&null!=o&&null!=t&&("horizontal"===s||"vertical"===s)&&null!=n&&null!=r&&null!=i&&null!=a&&null!=l){var m,{data:g}=u;if(null!=(m=null!=g&&g.length>0?g:null==h?void 0:h.slice(p,f+1)))return function(e){var{layout:t,barSettings:{dataKey:n,minPointSize:r},pos:i,bandSize:a,xAxis:o,yAxis:s,xAxisTicks:A,yAxisTicks:l,stackedData:c,displayedData:u,offset:d,cells:h,parentViewBox:p,dataStartIndex:f}=e,m="horizontal"===t?s:o,g=c?m.scale.domain():null,y=(e=>{var{numericAxis:t}=e,n=t.scale.domain();if("number"===t.type){var r=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]);return r<=0&&i>=0?0:i<0?i:r}return n[0]})({numericAxis:m}),v=m.scale.map(y);return u.map((e,u)=>{var m,w,x,b,B,C;if(c){var E=c[u+f];if(null==E)return null;m=((e,t)=>{if(!t||2!==t.length||!IF(t[0])||!IF(t[1]))return e;var n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]),i=[e[0],e[1]];return(!IF(e[0])||e[0]<n)&&(i[0]=n),(!IF(e[1])||e[1]>r)&&(i[1]=r),i[0]>r&&(i[0]=r),i[1]<n&&(i[1]=n),i})(E,g)}else m=WI(e,n),Array.isArray(m)||(m=[y,m]);var k=Q4(r,A5)(m[1],u);if("horizontal"===t){var S,F=s.scale.map(m[0]),Q=s.scale.map(m[1]);if(null==F||null==Q)return null;w=eT({axis:o,ticks:A,bandSize:a,offset:i.offset,entry:e,index:u}),x=null!==(S=null!=Q?Q:F)&&void 0!==S?S:void 0,b=i.size;var j=F-Q;if(B=OF(j)?0:j,C={x:w,y:d.top,width:b,height:d.height},Math.abs(k)>0&&Math.abs(B)<Math.abs(k)){var U=UF(B||k)*(Math.abs(k)-Math.abs(B));x-=U,B+=U}}else{var O=o.scale.map(m[0]),N=o.scale.map(m[1]);if(null==O||null==N)return null;if(w=O,x=eT({axis:s,ticks:l,bandSize:a,offset:i.offset,entry:e,index:u}),b=N-O,B=i.size,C={x:d.left,y:x,width:d.width,height:B},Math.abs(k)>0&&Math.abs(b)<Math.abs(k))b+=UF(b||k)*(Math.abs(k)-Math.abs(b))}return null==w||null==x||null==b||null==B?null:X4(X4({},e),{},{stackedBarStart:v,x:w,y:x,width:b,height:B,value:c?m:m[1],payload:e,background:C,tooltipPosition:{x:w+b/2,y:x+B/2},parentViewBox:p},h&&h[u]&&h[u].props)}).filter(Boolean)}({layout:s,barSettings:u,pos:o,parentViewBox:t,bandSize:l,xAxis:n,yAxis:r,xAxisTicks:i,yAxisTicks:a,stackedData:c,displayedData:m,offset:e,cells:d,dataStartIndex:p})}}),L4=["index"];function H4(){return H4=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},H4.apply(null,arguments)}var _4=Te.createContext(void 0),R4=e=>{var t,n=Te.useContext(_4);return null!=n?n.stackId:null!=e?null==(t=e)?void 0:String(t):void 0},K4=e=>{var{index:t}=e,n=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,L4),r=(e=>{var t=Te.useContext(_4);if(null!=t){var{stackId:n}=t;return"url(#".concat(((e,t)=>"recharts-bar-stack-clip-path-".concat(e,"-").concat(t))(n,e),")")}})(t);return De.createElement(tS,H4({className:"recharts-bar-stack-layer",clipPath:r},n))},z4=["onMouseEnter","onMouseLeave","onClick"],V4=["value","background","tooltipPosition"],$4=["id"],W4=["onMouseEnter","onClick","onMouseLeave"];function G4(){return G4=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},G4.apply(null,arguments)}function q4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function X4(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?q4(Object(n),!0).forEach(function(t){Y4(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q4(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Y4(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function J4(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var Z4=e=>{var{dataKey:t,name:n,fill:r,legendType:i,hide:a}=e;return[{inactive:a,dataKey:t,type:i,color:r,value:oT(n,t),payload:e}]},e5=De.memo(e=>{var{dataKey:t,stroke:n,strokeWidth:r,fill:i,name:a,hide:o,unit:s,tooltipType:A,id:l}=e,c={dataDefinedOnItem:void 0,getPosition:VF,settings:{stroke:n,strokeWidth:r,fill:i,dataKey:t,nameKey:void 0,name:oT(a,t),hide:o,type:A,color:i,unit:s,graphicalItemId:l}};return De.createElement(kZ,{tooltipEntrySettings:c})});function t5(e){var t=pU(iq),{data:n,dataKey:r,background:i,allOtherBarProps:a}=e,{onMouseEnter:o,onMouseLeave:s,onClick:A}=a,l=J4(a,z4),c=BZ(o,r,a.id),u=CZ(s),d=EZ(A,r,a.id);if(!i||null==n)return null;var h,p,f=Gk(i);return De.createElement(Gq,{zIndex:(h=i,p=cV.barBackground,h&&"object"==typeof h&&"zIndex"in h&&"number"==typeof h.zIndex&&RI(h.zIndex)?h.zIndex:p)},n.map((e,n)=>{var{value:a,background:o,tooltipPosition:s}=e,A=J4(e,V4);if(!o)return null;var h=c(e,n),p=u(e,n),m=d(e,n),g=X4(X4(X4(X4(X4({option:i,isActive:String(n)===t},A),{},{fill:"#eee"},o),f),nQ(l,e,n)),{},{onMouseEnter:h,onMouseLeave:p,onClick:m,dataKey:r,index:n,className:"recharts-bar-background-rectangle"});return De.createElement(F4,G4({key:"background-bar-".concat(n)},g))}))}function n5(e){var{showLabels:t,children:n,rects:r}=e,i=null==r?void 0:r.map(e=>{var t={x:e.x,y:e.y,width:e.width,lowerWidth:e.width,upperWidth:e.width,height:e.height};return X4(X4({},t),{},{value:e.value,payload:e.payload,parentViewBox:e.parentViewBox,viewBox:t,fill:e.fill})});return De.createElement(rJ,{value:t?i:void 0},n)}function r5(e){var{shape:t,activeBar:n,baseProps:r,entry:i,index:a,dataKey:o}=e,s=pU(iq),A=pU(oq),l=n&&String(a)===s&&(null==A||o===A),c=l?n:t;return l?De.createElement(Gq,{zIndex:cV.activeBar},De.createElement(K4,{index:a},De.createElement(F4,G4({},r,{name:String(r.name)},i,{isActive:l,option:c,index:a,dataKey:o})))):De.createElement(F4,G4({},r,{name:String(r.name)},i,{isActive:l,option:c,index:a,dataKey:o}))}function i5(e){var{shape:t,baseProps:n,entry:r,index:i,dataKey:a}=e;return De.createElement(F4,G4({},n,{name:String(n.name)},r,{isActive:!1,option:t,index:i,dataKey:a}))}function a5(e){var t,{data:n,props:r}=e,i=null!==(t=Wk(r))&&void 0!==t?t:{},{id:a}=i,o=J4(i,$4),{shape:s,dataKey:A,activeBar:l}=r,{onMouseEnter:c,onClick:u,onMouseLeave:d}=r,h=J4(r,W4),p=BZ(c,A,a),f=CZ(d),m=EZ(u,A,a);return n?De.createElement(De.Fragment,null,n.map((e,t)=>De.createElement(K4,G4({index:t,key:"rectangle-".concat(null==e?void 0:e.x,"-").concat(null==e?void 0:e.y,"-").concat(null==e?void 0:e.value,"-").concat(t),className:"recharts-bar-rectangle"},nQ(h,e,t),{onMouseEnter:p(e,t),onMouseLeave:f(e,t),onClick:m(e,t)}),l?De.createElement(r5,{shape:s,activeBar:l,baseProps:o,entry:e,index:t,dataKey:A}):De.createElement(i5,{shape:s,baseProps:o,entry:e,index:t,dataKey:A})))):null}function o5(e){var{props:t,previousRectanglesRef:n}=e,{data:r,layout:i,isAnimationActive:a,animationBegin:o,animationDuration:s,animationEasing:A,onAnimationEnd:l,onAnimationStart:c}=t,u=n.current,d=QD(t,"recharts-bar-"),[h,p]=Te.useState(!1),f=!h,m=Te.useCallback(()=>{"function"==typeof l&&l(),p(!1)},[l]),g=Te.useCallback(()=>{"function"==typeof c&&c(),p(!0)},[c]);return De.createElement(n5,{showLabels:f,rects:r},De.createElement(FD,{animationId:d,begin:o,duration:s,isActive:a,easing:A,onAnimationEnd:m,onAnimationStart:g,key:d},e=>{var a=1===e?r:null==r?void 0:r.map((t,n)=>{var r=u&&u[n];if(r)return X4(X4({},t),{},{x:HF(r.x,t.x,e),y:HF(r.y,t.y,e),width:HF(r.width,t.width,e),height:HF(r.height,t.height,e)});if("horizontal"===i){var a=HF(0,t.height,e),o=HF(t.stackedBarStart,t.y,e);return X4(X4({},t),{},{y:o,height:a})}var s=HF(0,t.width,e),A=HF(t.stackedBarStart,t.x,e);return X4(X4({},t),{},{width:s,x:A})});return e>0&&(n.current=null!=a?a:null),null==a?null:De.createElement(tS,null,De.createElement(a5,{props:t,data:a}))}),De.createElement(sJ,{label:t.label}),t.children)}function s5(e){var t=Te.useRef(null);return De.createElement(o5,{previousRectanglesRef:t,props:e})}var A5=0,l5=(e,t)=>{var n=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:n,errorVal:WI(e,t)}};class c5 extends Te.PureComponent{render(){var{hide:e,data:t,dataKey:n,className:r,xAxisId:i,yAxisId:a,needClip:o,background:s,id:A}=this.props;if(e||null==t)return null;var l=yh("recharts-bar",r),c=A;return De.createElement(tS,{className:l,id:A},o&&De.createElement("defs",null,De.createElement(E2,{clipPathId:c,xAxisId:i,yAxisId:a})),De.createElement(tS,{className:"recharts-bar-rectangles",clipPath:o?"url(#clipPath-".concat(c,")"):void 0},De.createElement(t5,{data:t,dataKey:n,background:s,allOtherBarProps:this.props}),De.createElement(s5,this.props)))}}var u5={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",background:!1,hide:!1,isAnimationActive:"auto",label:!1,legendType:"rect",minPointSize:A5,xAxisId:0,yAxisId:0,zIndex:cV.bar};function d5(e){var t,{xAxisId:n,yAxisId:r,hide:i,legendType:a,minPointSize:o,activeBar:s,animationBegin:A,animationDuration:l,animationEasing:c,isAnimationActive:u}=e,{needClip:d}=C2(n,r),h=AP(),p=ST(),f=qJ(e.children,NX),m=pU(t=>D4(t,e.id,p,f));if("vertical"!==h&&"horizontal"!==h)return null;var g=null==m?void 0:m[0];return t=null==g||null==g.height||null==g.width?0:"vertical"===h?g.height/2:g.width/2,De.createElement(B2,{xAxisId:n,yAxisId:r,data:m,dataPointFormatter:l5,errorBarOffset:t},De.createElement(c5,G4({},e,{layout:h,needClip:d,data:m,xAxisId:n,yAxisId:r,hide:i,legendType:a,minPointSize:o,activeBar:s,animationBegin:A,animationDuration:l,animationEasing:c,isAnimationActive:u})))}function h5(e){var t=aQ(e,u5),n=R4(t.stackId),r=ST();return De.createElement(UZ,{id:t.id,type:"bar"},e=>De.createElement(De.Fragment,null,De.createElement(SZ,{legendPayload:Z4(t)}),De.createElement(e5,{dataKey:t.dataKey,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:e}),De.createElement(HZ,{type:"bar",id:e,data:void 0,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,stackId:n,hide:t.hide,barSize:t.barSize,minPointSize:t.minPointSize,maxBarSize:t.maxBarSize,isPanorama:r}),De.createElement(Gq,{zIndex:t.zIndex},De.createElement(d5,G4({},t,{id:e})))))}var p5=De.memo(h5,Z2);p5.displayName="Bar";var f5=["option","isActive"];function m5(){return m5=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},m5.apply(null,arguments)}function g5(e){var{option:t,isActive:n}=e,r=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,f5);return"string"==typeof t?De.createElement(xZ,m5({option:De.createElement(ZF,m5({type:t},r)),isActive:n,shapeType:"symbols"},r)):De.createElement(xZ,m5({option:t,isActive:n,shapeType:"symbols"},r))}var y5=kU([t$,(e,t,n,r,i)=>i],(e,t)=>e.filter(e=>"scatter"===e.type).find(e=>e.id===t)),v5=kU([(e,t,n,r,i,a,o)=>mz(e,0,0,o),(e,t,n,r,i,a,o)=>PW(e,"xAxis",t,o),(e,t,n,r,i,a,o)=>TW(e,"xAxis",t,o),(e,t,n,r,i,a,o)=>PW(e,"yAxis",n,o),(e,t,n,r,i,a,o)=>TW(e,"yAxis",n,o),(e,t,n,r)=>DW(e,"zAxis",r,!1),y5,(e,t,n,r,i,a)=>a],(e,t,n,r,i,a,o,s)=>{var A,{chartData:l,dataStartIndex:c,dataEndIndex:u}=e;if(null!=o&&(null!=(A=null!=(null==o?void 0:o.data)&&o.data.length>0?o.data:null==l?void 0:l.slice(c,u+1))&&null!=t&&null!=r&&null!=n&&null!=i&&0!==(null==n?void 0:n.length)&&0!==(null==i?void 0:i.length)))return function(e){var{displayedData:t,xAxis:n,yAxis:r,zAxis:i,scatterSettings:a,xAxisTicks:o,yAxisTicks:s,cells:A}=e,l=RF(n.dataKey)?a.dataKey:n.dataKey,c=RF(r.dataKey)?a.dataKey:r.dataKey,u=i&&i.dataKey,d=i?i.range:qV.range,h=d&&d[0],p=n.scale.bandwidth?n.scale.bandwidth():0,f=r.scale.bandwidth?r.scale.bandwidth():0;return t.map((e,t)=>{var d=WI(e,l),m=WI(e,c),g=!RF(u)&&WI(e,u)||"-",y=[{name:RF(n.dataKey)?a.name:n.name||String(n.dataKey),unit:n.unit||"",value:d,payload:e,dataKey:l,type:a.tooltipType},{name:RF(r.dataKey)?a.name:r.name||String(r.dataKey),unit:r.unit||"",value:m,payload:e,dataKey:c,type:a.tooltipType}];"-"!==g&&null!=i&&y.push({name:i.name||i.dataKey,unit:i.unit||"",value:g,payload:e,dataKey:u,type:a.tooltipType});var v=ZI({axis:n,ticks:o,bandSize:p,entry:e,index:t,dataKey:l}),w=ZI({axis:r,ticks:s,bandSize:f,entry:e,index:t,dataKey:c}),x="-"!==g&&null!=i?i.scale.map(g):h,b=null==x?0:Math.sqrt(Math.max(x,0)/Math.PI);return k5(k5({},e),{},{cx:v,cy:w,x:null==v?void 0:v-b,y:null==w?void 0:w-b,width:2*b,height:2*b,size:x,node:{x:d,y:m,z:g},tooltipPayload:y,tooltipPosition:{x:v,y:w},payload:e},A&&A[t]&&A[t].props)})}({displayedData:A,xAxis:t,yAxis:r,zAxis:a,scatterSettings:o,xAxisTicks:n,yAxisTicks:i,cells:s})}),w5=["id"],x5=["onMouseEnter","onClick","onMouseLeave"],b5=["animationBegin","animationDuration","animationEasing","hide","isAnimationActive","legendType","lineJointType","lineType","shape","xAxisId","yAxisId","zAxisId"];function B5(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function C5(){return C5=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},C5.apply(null,arguments)}function E5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function k5(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?E5(Object(n),!0).forEach(function(t){S5(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E5(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function S5(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var F5=e=>{var{dataKey:t,name:n,fill:r,legendType:i,hide:a}=e;return[{inactive:a,dataKey:t,type:i,color:r,value:oT(n,t),payload:e}]},Q5=De.memo(e=>{var{dataKey:t,points:n,stroke:r,strokeWidth:i,fill:a,name:o,hide:s,tooltipType:A,id:l}=e,c={dataDefinedOnItem:null==n?void 0:n.map(e=>e.tooltipPayload),getPosition:e=>{var t;return null==n||null===(t=n[Number(e)])||void 0===t?void 0:t.tooltipPosition},settings:{stroke:r,strokeWidth:i,fill:a,nameKey:void 0,dataKey:t,name:oT(o,t),hide:s,type:A,color:a,unit:"",graphicalItemId:l}};return De.createElement(kZ,{tooltipEntrySettings:c})});function j5(e){var{points:t,props:n}=e,{line:r,lineType:i,lineJointType:a}=n;if(!r)return null;var o,s,A=Wk(n),l=Gk(r);if("joint"===i)o=t.map(e=>{var t,n;return{x:null!==(t=e.cx)&&void 0!==t?t:null,y:null!==(n=e.cy)&&void 0!==n?n:null}});else if("fitting"===i){var{xmin:c,xmax:u,a:d,b:h}=(e=>{for(var t=e.length,n=0,r=0,i=0,a=0,o=1/0,s=-1/0,A=0,l=0,c=0;c<t;c++){var u,d;n+=A=(null===(u=e[c])||void 0===u?void 0:u.cx)||0,r+=l=(null===(d=e[c])||void 0===d?void 0:d.cy)||0,i+=A*l,a+=A*A,o=Math.min(o,A),s=Math.max(s,A)}var h=t*a!==n*n?(t*i-n*r)/(t*a-n*n):0;return{xmin:o,xmax:s,a:h,b:(r-h*n)/t}})(t),p=e=>d*e+h;o=[{x:c,y:p(c)},{x:u,y:p(u)}]}var f=k5(k5(k5({},A),{},{fill:"none",stroke:A&&A.fill},l),{},{points:o});return s=De.isValidElement(r)?De.cloneElement(r,f):"function"==typeof r?r(f):De.createElement(WM,C5({},f,{type:a})),De.createElement(tS,{className:"recharts-scatter-line",key:"recharts-scatter-line"},s)}function U5(e){var{showLabels:t,points:n,children:r}=e,i=nP(),a=Te.useMemo(()=>null==n?void 0:n.map(e=>{var t,n,r={x:null!==(t=e.x)&&void 0!==t?t:0,y:null!==(n=e.y)&&void 0!==n?n:0,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width};return k5(k5({},r),{},{value:void 0,payload:e.payload,viewBox:r,parentViewBox:i,fill:void 0})}),[i,n]);return De.createElement(rJ,{value:t?a:void 0},r)}function O5(e){var t,{points:n,allOtherScatterProps:r}=e,{shape:i,activeShape:a,dataKey:o}=r,{id:s}=r,A=B5(r,w5),l=pU(iq),{onMouseEnter:c,onClick:u,onMouseLeave:d}=r,h=B5(r,x5),p=BZ(c,o,s),f=CZ(d),m=EZ(u,o,s);if(t=n,!(Array.isArray(t)&&t.length>0))return null;var g=Wk(A);return De.createElement(De.Fragment,null,De.createElement(j5,{points:n,props:A}),n.map((e,t)=>{var n=null!=a&&!1!==a,r=n&&l===String(t),o=n&&r?a:i,A=k5(k5(k5({},g),e),{},{index:t,[pT]:String(s)});return De.createElement(Gq,{key:"symbol-".concat(null==e?void 0:e.cx,"-").concat(null==e?void 0:e.cy,"-").concat(null==e?void 0:e.size,"-").concat(t),zIndex:r?cV.activeDot:void 0},De.createElement(tS,C5({className:"recharts-scatter-symbol"},nQ(h,e,t),{onMouseEnter:p(e,t),onMouseLeave:f(e,t),onClick:m(e,t)}),De.createElement(g5,C5({option:o,isActive:r},A))))}))}function N5(e){var{previousPointsRef:t,props:n}=e,{points:r,isAnimationActive:i,animationBegin:a,animationDuration:o,animationEasing:s}=n,A=t.current,l=QD(n,"recharts-scatter-"),[c,u]=Te.useState(!1),d=Te.useCallback(()=>{u(!1)},[]),h=Te.useCallback(()=>{u(!0)},[]),p=!c;return De.createElement(U5,{showLabels:p,points:r},n.children,De.createElement(FD,{animationId:l,begin:a,duration:o,isActive:i,easing:s,onAnimationEnd:d,onAnimationStart:h,key:l},e=>{var i=1===e?r:null==r?void 0:r.map((t,n)=>{var r=A&&A[n];return k5(k5({},t),{},r?{cx:null==t.cx?void 0:HF(r.cx,t.cx,e),cy:null==t.cy?void 0:HF(r.cy,t.cy,e),size:HF(r.size,t.size,e)}:{size:HF(0,t.size,e)})});return e>0&&(t.current=i),De.createElement(tS,null,De.createElement(O5,{points:i,allOtherScatterProps:n,showLabels:p}))}),De.createElement(sJ,{label:n.label}))}var I5=(e,t,n)=>({x:e.cx,y:e.cy,value:Number("x"===n?e.node.x:e.node.y),errorVal:WI(e,t)});function T5(e){var{hide:t,points:n,className:r,needClip:i,xAxisId:a,yAxisId:o,id:s}=e,A=Te.useRef(null);if(t)return null;var l=yh("recharts-scatter",r),c=s;return De.createElement(Gq,{zIndex:e.zIndex},De.createElement(tS,{className:l,clipPath:i?"url(#clipPath-".concat(c,")"):void 0,id:s},i&&De.createElement("defs",null,De.createElement(E2,{clipPathId:c,xAxisId:a,yAxisId:o})),De.createElement(B2,{xAxisId:a,yAxisId:o,data:n,dataPointFormatter:I5,errorBarOffset:0},De.createElement(tS,{key:"recharts-scatter-symbols"},De.createElement(N5,{props:e,previousPointsRef:A})))))}var P5={xAxisId:0,yAxisId:0,zAxisId:0,label:!1,line:!1,legendType:"circle",lineType:"joint",lineJointType:"linear",shape:"circle",hide:!1,isAnimationActive:"auto",animationBegin:0,animationDuration:400,animationEasing:"linear",zIndex:cV.scatter};function M5(e){var t=aQ(e,P5),{animationBegin:n,animationDuration:r,animationEasing:i,hide:a,isAnimationActive:o,legendType:s,lineJointType:A,lineType:l,shape:c,xAxisId:u,yAxisId:d,zAxisId:h}=t,p=B5(t,b5),{needClip:f}=C2(u,d),m=Te.useMemo(()=>qJ(e.children,NX),[e.children]),g=ST(),y=pU(t=>v5(t,u,d,h,e.id,m,g));return null==f||null==y?null:De.createElement(De.Fragment,null,De.createElement(Q5,{dataKey:e.dataKey,points:y,stroke:e.stroke,strokeWidth:e.strokeWidth,fill:e.fill,name:e.name,hide:e.hide,tooltipType:e.tooltipType,id:e.id}),De.createElement(T5,C5({},p,{xAxisId:u,yAxisId:d,zAxisId:h,lineType:l,lineJointType:A,legendType:s,shape:c,hide:a,isAnimationActive:o,animationBegin:n,animationDuration:r,animationEasing:i,points:y,needClip:f})))}function D5(e){var t=aQ(e,P5),n=ST();return De.createElement(UZ,{id:t.id,type:"scatter"},e=>De.createElement(De.Fragment,null,De.createElement(SZ,{legendPayload:F5(t)}),De.createElement(HZ,{type:"scatter",id:e,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:t.zAxisId,dataKey:t.dataKey,hide:t.hide,name:t.name,tooltipType:t.tooltipType,isPanorama:n}),De.createElement(M5,C5({},t,{id:e}))))}var L5=De.memo(D5,Z2);L5.displayName="Scatter";var H5=["domain","range"],_5=["domain","range"];function R5(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function K5(e,t){return e===t||!(!Array.isArray(e)||2!==e.length||!Array.isArray(t)||2!==t.length)&&(e[0]===t[0]&&e[1]===t[1])}function z5(e,t){if(e===t)return!0;var{domain:n,range:r}=e,i=R5(e,H5),{domain:a,range:o}=t,s=R5(t,_5);return!!K5(n,a)&&(!!K5(r,o)&&Z2(i,s))}var V5=["type"],$5=["dangerouslySetInnerHTML","ticks","scale"],W5=["id","scale"];function G5(){return G5=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},G5.apply(null,arguments)}function q5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function X5(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?q5(Object(n),!0).forEach(function(t){Y5(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q5(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Y5(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function J5(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Z5(e){var t=cU(),n=Te.useRef(null),r=lP(),{type:i}=e,a=J5(e,V5),o=dV(r,"xAxis",i),s=Te.useMemo(()=>{if(null!=o)return X5(X5({},a),{},{type:o})},[a,o]);return Te.useLayoutEffect(()=>{null!=s&&(null===n.current?t(w0(s)):n.current!==s&&t(x0({prev:n.current,next:s})),n.current=s)},[s,t]),Te.useLayoutEffect(()=>()=>{n.current&&(t(b0(n.current)),n.current=null)},[t]),null}var e3=e=>{var{xAxisId:t,className:n}=e,r=pU(ET),i=ST(),a="xAxis",o=pU(e=>IW(e,a,t,i)),s=pU(e=>bW(e,t)),A=pU(e=>EW(e,t)),l=pU(e=>zV(e,t));if(null==s||null==A||null==l)return null;var{dangerouslySetInnerHTML:c,ticks:u,scale:d}=e,h=J5(e,$5),{id:p,scale:f}=l,m=J5(l,W5);return De.createElement(q1,G5({},h,m,{x:A.x,y:A.y,width:s.width,height:s.height,className:yh("recharts-".concat(a," ").concat(a),n),viewBox:r,ticks:o,axisType:a}))},t3={allowDataOverflow:KV.allowDataOverflow,allowDecimals:KV.allowDecimals,allowDuplicatedCategory:KV.allowDuplicatedCategory,angle:KV.angle,axisLine:z1.axisLine,height:KV.height,hide:!1,includeHidden:KV.includeHidden,interval:KV.interval,label:!1,minTickGap:KV.minTickGap,mirror:KV.mirror,orientation:KV.orientation,padding:KV.padding,reversed:KV.reversed,scale:KV.scale,tick:KV.tick,tickCount:KV.tickCount,tickLine:z1.tickLine,tickSize:z1.tickSize,type:KV.type,xAxisId:0},n3=e=>{var t=aQ(e,t3);return De.createElement(De.Fragment,null,De.createElement(Z5,{allowDataOverflow:t.allowDataOverflow,allowDecimals:t.allowDecimals,allowDuplicatedCategory:t.allowDuplicatedCategory,angle:t.angle,dataKey:t.dataKey,domain:t.domain,height:t.height,hide:t.hide,id:t.xAxisId,includeHidden:t.includeHidden,interval:t.interval,minTickGap:t.minTickGap,mirror:t.mirror,name:t.name,orientation:t.orientation,padding:t.padding,reversed:t.reversed,scale:t.scale,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit}),De.createElement(e3,t))},r3=De.memo(n3,z5);r3.displayName="XAxis";var i3=["type"],a3=["dangerouslySetInnerHTML","ticks","scale"],o3=["id","scale"];function s3(){return s3=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},s3.apply(null,arguments)}function A3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function l3(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?A3(Object(n),!0).forEach(function(t){c3(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A3(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function c3(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u3(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function d3(e){var t=cU(),n=Te.useRef(null),r=lP(),{type:i}=e,a=u3(e,i3),o=dV(r,"yAxis",i),s=Te.useMemo(()=>{if(null!=o)return l3(l3({},a),{},{type:o})},[o,a]);return Te.useLayoutEffect(()=>{null!=s&&(null===n.current?t(B0(s)):n.current!==s&&t(C0({prev:n.current,next:s})),n.current=s)},[s,t]),Te.useLayoutEffect(()=>()=>{n.current&&(t(E0(n.current)),n.current=null)},[t]),null}function h3(e){var{yAxisId:t,className:n,width:r,label:i}=e,a=Te.useRef(null),o=Te.useRef(null),s=pU(ET),A=ST(),l=cU(),c="yAxis",u=pU(e=>SW(e,t)),d=pU(e=>kW(e,t)),h=pU(e=>IW(e,c,t,A)),p=pU(e=>WV(e,t));if(Te.useLayoutEffect(()=>{if("auto"===r&&u&&!NY(i)&&!Te.isValidElement(i)&&null!=p){var e=a.current;if(e){var n=e.getCalculatedWidth();Math.round(u.width)!==Math.round(n)&&l(Q0({id:t,width:n}))}}},[h,u,l,i,t,r,p]),null==u||null==d||null==p)return null;var{dangerouslySetInnerHTML:f,ticks:m,scale:g}=e,y=u3(e,a3),{id:v,scale:w}=p,x=u3(p,o3);return De.createElement(q1,s3({},y,x,{ref:a,labelRef:o,x:d.x,y:d.y,tickTextProps:"auto"===r?{width:void 0}:{width:r},width:u.width,height:u.height,className:yh("recharts-".concat(c," ").concat(c),n),viewBox:s,ticks:h,axisType:c}))}var p3={allowDataOverflow:$V.allowDataOverflow,allowDecimals:$V.allowDecimals,allowDuplicatedCategory:$V.allowDuplicatedCategory,angle:$V.angle,axisLine:z1.axisLine,hide:!1,includeHidden:$V.includeHidden,interval:$V.interval,label:!1,minTickGap:$V.minTickGap,mirror:$V.mirror,orientation:$V.orientation,padding:$V.padding,reversed:$V.reversed,scale:$V.scale,tick:$V.tick,tickCount:$V.tickCount,tickLine:z1.tickLine,tickSize:z1.tickSize,type:$V.type,width:$V.width,yAxisId:0},f3=e=>{var t=aQ(e,p3);return De.createElement(De.Fragment,null,De.createElement(d3,{interval:t.interval,id:t.yAxisId,scale:t.scale,type:t.type,domain:t.domain,allowDataOverflow:t.allowDataOverflow,dataKey:t.dataKey,allowDuplicatedCategory:t.allowDuplicatedCategory,allowDecimals:t.allowDecimals,tickCount:t.tickCount,padding:t.padding,includeHidden:t.includeHidden,reversed:t.reversed,ticks:t.ticks,width:t.width,orientation:t.orientation,mirror:t.mirror,hide:t.hide,unit:t.unit,name:t.name,angle:t.angle,minTickGap:t.minTickGap,tick:t.tick,tickFormatter:t.tickFormatter}),De.createElement(h3,t))},m3=De.memo(f3,z5);m3.displayName="YAxis";var g3=kU([(e,t)=>t,sP,kV,IV,qG,ZG,Eq,BT],(e,t,n,r,i,a,o,s)=>{if(e&&t&&r&&i&&a)return"horizontal"===t||"vertical"===t?((e,t,n,r,i,a,o)=>{if(e&&n&&r&&i&&function(e,t){var{chartX:n,chartY:r}=e;return n>=t.left&&n<=t.left+t.width&&r>=t.top&&r<=t.top+t.height}(e,o)){var s=((e,t)=>"horizontal"===t?e.chartX:"vertical"===t?e.chartY:void 0)(e,t),A=xq(s,a,i,n,r),l=((e,t,n,r)=>{var i=t.find(e=>e&&e.index===n);if(i){if("horizontal"===e)return{x:i.coordinate,y:r.chartY};if("vertical"===e)return{x:r.chartX,y:i.coordinate}}return{x:0,y:0}})(t,i,A,e);return{activeIndex:String(A),activeCoordinate:l}}})(e,t,r,i,a,o,s):Iq(e,t,n,r,i,a,o)}),y3=e=>{var t=e.currentTarget.getBoundingClientRect(),n=t.width/e.currentTarget.offsetWidth,r=t.height/e.currentTarget.offsetHeight;return{chartX:Math.round((e.clientX-t.left)/n),chartY:Math.round((e.clientY-t.top)/r)}},v3=QN("mouseClick"),w3=NI();w3.startListening({actionCreator:v3,effect:(e,t)=>{var n=e.payload,r=g3(t.getState(),y3(n));null!=(null==r?void 0:r.activeIndex)&&t.dispatch(nG({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate}))}});var x3=QN("mouseMove"),b3=NI(),B3=null;function C3(e,t){return t instanceof HTMLElement?"HTMLElement <".concat(t.tagName,' class="').concat(t.className,'">'):t===window?"global.window":"children"===e&&"object"==typeof t&&null!==t?"<<CHILDREN>>":t}b3.startListening({actionCreator:x3,effect:(e,t)=>{var n=e.payload;null!==B3&&cancelAnimationFrame(B3);var r=y3(n);B3=requestAnimationFrame(()=>{var e=t.getState();if("axis"===KW(e,e.tooltip.settings.shared)){var n=g3(e,r);null!=(null==n?void 0:n.activeIndex)?t.dispatch(tG({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate})):t.dispatch(ZW())}B3=null})}});var E3={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index",baseValue:void 0,reverseStackOrder:!1},k3=tI({name:"rootProps",initialState:E3,reducers:{updateOptions:(e,t)=>{var n;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=null!==(n=t.payload.barGap)&&void 0!==n?n:E3.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className,e.baseValue=t.payload.baseValue,e.reverseStackOrder=t.payload.reverseStackOrder}}}),S3=k3.reducer,{updateOptions:F3}=k3.actions,Q3=tI({name:"polarOptions",initialState:null,reducers:{updatePolarOptions:(e,t)=>t.payload}}),{updatePolarOptions:j3}=Q3.actions,U3=Q3.reducer,O3=QN("keyDown"),N3=QN("focus"),I3=NI();I3.startListening({actionCreator:O3,effect:(e,t)=>{var n=t.getState();if(!1!==n.rootProps.accessibilityLayer){var{keyboardInteraction:r}=n.tooltip,i=e.payload;if("ArrowRight"===i||"ArrowLeft"===i||"Enter"===i){var a=uG(r,kG(n),v$(n),VG(n)),o=null==a?-1:Number(a);if(Number.isFinite(o)&&!(o<0)){var s=ZG(n);if("Enter"!==i){var A=o+("ArrowRight"===i?1:-1)*("left-to-right"===LW(n)?1:-1);if(!(null==s||A>=s.length||A<0)){var l=Qq(n,"axis","hover",String(A));t.dispatch(iG({active:!0,activeIndex:A.toString(),activeCoordinate:l}))}}else{var c=Qq(n,"axis","hover",String(r.index));t.dispatch(iG({active:!r.active,activeIndex:r.index,activeCoordinate:c}))}}}}}}),I3.startListening({actionCreator:N3,effect:(e,t)=>{var n=t.getState();if(!1!==n.rootProps.accessibilityLayer){var{keyboardInteraction:r}=n.tooltip;if(!r.active&&null==r.index){var i=Qq(n,"axis","hover",String("0"));t.dispatch(iG({active:!0,activeIndex:"0",activeCoordinate:i}))}}}});var T3=QN("externalEvent"),P3=NI(),M3=new Map;P3.startListening({actionCreator:T3,effect:(e,t)=>{var{handler:n,reactEvent:r}=e.payload;if(null!=n){r.persist();var i=r.type,a=M3.get(i);void 0!==a&&cancelAnimationFrame(a);var o=requestAnimationFrame(()=>{try{var e=t.getState(),a={activeCoordinate:cq(e),activeDataKey:oq(e),activeIndex:iq(e),activeLabel:aq(e),activeTooltipIndex:iq(e),isTooltipActive:uq(e)};n(a,r)}finally{M3.delete(i)}});M3.set(i,o)}}});var D3=kU([fG],e=>e.tooltipItemPayloads),L3=kU([D3,(e,t)=>t,(e,t,n)=>n],(e,t,n)=>{if(null!=t){var r=e.find(e=>e.settings.graphicalItemId===n);if(null!=r){var{getPosition:i}=r;if(null!=i)return i(t)}}}),H3=QN("touchMove"),_3=NI();_3.startListening({actionCreator:H3,effect:(e,t)=>{var n=e.payload;if(null!=n.touches&&0!==n.touches.length){var r=t.getState(),i=KW(r,r.tooltip.settings.shared);if("axis"===i){var a=n.touches[0];if(null==a)return;var o=g3(r,y3({clientX:a.clientX,clientY:a.clientY,currentTarget:n.currentTarget}));null!=(null==o?void 0:o.activeIndex)&&t.dispatch(tG({activeIndex:o.activeIndex,activeDataKey:void 0,activeCoordinate:o.activeCoordinate}))}else if("item"===i){var s,A=n.touches[0];if(null==document.elementFromPoint||null==A)return;var l=document.elementFromPoint(A.clientX,A.clientY);if(!l||!l.getAttribute)return;var c=l.getAttribute(hT),u=null!==(s=l.getAttribute(pT))&&void 0!==s?s:void 0,d=BG(r).find(e=>e.id===u);if(null==c||null==d||null==u)return;var{dataKey:h}=d,p=L3(r,c,u);t.dispatch(YW({activeDataKey:h,activeIndex:c,activeCoordinate:p,activeGraphicalItemId:u}))}}}});var R3=lO({brush:e1,cartesianAxis:j0,chartData:yX,errorBars:v2,graphicalItems:DZ,layout:HI,legend:AM,options:uX,polarAxis:SJ,polarOptions:U3,referenceElements:Q1,rootProps:S3,tooltip:aG,zIndex:Wq});function K3(e){var{preloadedState:t,children:n,reduxStoreName:r}=e,i=ST(),a=Te.useRef(null);if(i)return n;null==a.current&&(a.current=function(e){return GN({reducer:R3,preloadedState:e,middleware:e=>e({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes("es6")}).concat([w3.middleware,b3.middleware,I3.middleware,P3.middleware,_3.middleware]),enhancers:e=>{var t=e;return"function"==typeof e&&(t=e()),t.concat(WN({type:"raf"}))},devTools:{serialize:{replacer:C3},name:"recharts-".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Chart")}})}(t,r));var o=AU;return De.createElement(X2,{context:o,store:a.current},n)}function z3(e){var{layout:t,margin:n}=e,r=cU(),i=ST();return Te.useEffect(()=>{i||(r(MI(t)),r(PI(n)))},[r,i,t,n]),null}var V3=Te.memo(z3,Z2);function $3(e){var t=cU();return Te.useEffect(()=>{t(F3(e))},[t,e]),null}function W3(e){var{zIndex:t,isPanorama:n}=e,r=Te.useRef(null),i=cU();return Te.useLayoutEffect(()=>(r.current&&i(Vq({zIndex:t,element:r.current,isPanorama:n})),()=>{i($q({zIndex:t,isPanorama:n}))}),[i,t,n]),De.createElement("g",{tabIndex:-1,ref:r})}function G3(e){var{children:t,isPanorama:n}=e,r=pU(Pq);if(!r||0===r.length)return t;var i=r.filter(e=>e<0),a=r.filter(e=>e>0);return De.createElement(De.Fragment,null,i.map(e=>De.createElement(W3,{key:e,zIndex:e,isPanorama:n})),t,a.map(e=>De.createElement(W3,{key:e,zIndex:e,isPanorama:n})))}var q3=["children"];function X3(){return X3=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},X3.apply(null,arguments)}var Y3={width:"100%",height:"100%",display:"block"},J3=Te.forwardRef((e,t)=>{var n=aP(),r=oP(),i=TM();if(!KI(n)||!KI(r))return null;var a,o,{children:s,otherAttributes:A,title:l,desc:c}=e;return null!=A&&(a="number"==typeof A.tabIndex?A.tabIndex:i?0:void 0,o="string"==typeof A.role?A.role:i?"application":void 0),De.createElement(Jk,X3({},A,{title:l,desc:c,role:o,tabIndex:a,width:n,height:r,style:Y3,ref:t}),s)}),Z3=e=>{var{children:t}=e,n=pU(jT);if(!n)return null;var{width:r,height:i,y:a,x:o}=n;return De.createElement(Jk,{width:r,height:i,x:o,y:a},t)},e6=Te.forwardRef((e,t)=>{var{children:n}=e,r=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,q3);return ST()?De.createElement(Z3,null,De.createElement(G3,{isPanorama:!0},n)):De.createElement(J3,X3({ref:t},r),De.createElement(G3,{isPanorama:!1},n))});function t6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function n6(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?t6(Object(n),!0).forEach(function(t){r6(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t6(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function r6(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i6(){return i6=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},i6.apply(null,arguments)}var a6=()=>(CX(),null);function o6(e){if("number"==typeof e)return e;if("string"==typeof e){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var s6=Te.forwardRef((e,t)=>{var n,r,i=Te.useRef(null),[a,o]=Te.useState({containerWidth:o6(null===(n=e.style)||void 0===n?void 0:n.width),containerHeight:o6(null===(r=e.style)||void 0===r?void 0:r.height)}),s=Te.useCallback((e,t)=>{o(n=>{var r=Math.round(e),i=Math.round(t);return n.containerWidth===r&&n.containerHeight===i?n:{containerWidth:r,containerHeight:i}})},[]),A=Te.useCallback(e=>{if("function"==typeof t&&t(e),null!=e&&"undefined"!=typeof ResizeObserver){var{width:n,height:r}=e.getBoundingClientRect();s(n,r);var a=new ResizeObserver(e=>{var t=e[0];if(null!=t){var{width:n,height:r}=t.contentRect;s(n,r)}});a.observe(e),i.current=a}},[t,s]);return Te.useEffect(()=>()=>{var e=i.current;null!=e&&e.disconnect()},[s]),De.createElement(De.Fragment,null,De.createElement(uP,{width:a.containerWidth,height:a.containerHeight}),De.createElement("div",i6({ref:A},e)))}),A6=Te.forwardRef((e,t)=>{var{width:n,height:r}=e,[i,a]=Te.useState({containerWidth:o6(n),containerHeight:o6(r)}),o=Te.useCallback((e,t)=>{a(n=>{var r=Math.round(e),i=Math.round(t);return n.containerWidth===r&&n.containerHeight===i?n:{containerWidth:r,containerHeight:i}})},[]),s=Te.useCallback(e=>{if("function"==typeof t&&t(e),null!=e){var{width:n,height:r}=e.getBoundingClientRect();o(n,r)}},[t,o]);return De.createElement(De.Fragment,null,De.createElement(uP,{width:i.containerWidth,height:i.containerHeight}),De.createElement("div",i6({ref:s},e)))}),l6=Te.forwardRef((e,t)=>{var{width:n,height:r}=e;return De.createElement(De.Fragment,null,De.createElement(uP,{width:n,height:r}),De.createElement("div",i6({ref:t},e)))}),c6=Te.forwardRef((e,t)=>{var{width:n,height:r}=e;return"string"==typeof n||"string"==typeof r?De.createElement(A6,i6({},e,{ref:t})):"number"==typeof n&&"number"==typeof r?De.createElement(l6,i6({},e,{width:n,height:r,ref:t})):De.createElement(De.Fragment,null,De.createElement(uP,{width:n,height:r}),De.createElement("div",i6({ref:t},e)))});var u6=Te.forwardRef((e,t)=>{var{children:n,className:r,height:i,onClick:a,onContextMenu:o,onDoubleClick:s,onMouseDown:A,onMouseEnter:l,onMouseLeave:c,onMouseMove:u,onMouseUp:d,onTouchEnd:h,onTouchMove:p,onTouchStart:f,style:m,width:g,responsive:y,dispatchTouchEvents:v=!0}=e,w=Te.useRef(null),x=cU(),[b,B]=Te.useState(null),[C,E]=Te.useState(null),k=function(){var e=cU(),[t,n]=Te.useState(null),r=pU(lT);return Te.useEffect(()=>{if(null!=t){var n=t.getBoundingClientRect().width/t.offsetWidth;RI(n)&&n!==r&&e(LI(n))}},[t,e,r]),n}(),S=JT(),F=(null==S?void 0:S.width)>0?S.width:g,Q=(null==S?void 0:S.height)>0?S.height:i,j=Te.useCallback(e=>{k(e),"function"==typeof t&&t(e),B(e),E(e),null!=e&&(w.current=e)},[k,t,B,E]),U=Te.useCallback(e=>{x(v3(e)),x(T3({handler:a,reactEvent:e}))},[x,a]),O=Te.useCallback(e=>{x(x3(e)),x(T3({handler:l,reactEvent:e}))},[x,l]),N=Te.useCallback(e=>{x(ZW()),x(T3({handler:c,reactEvent:e}))},[x,c]),I=Te.useCallback(e=>{x(x3(e)),x(T3({handler:u,reactEvent:e}))},[x,u]),T=Te.useCallback(()=>{x(N3())},[x]),P=Te.useCallback(e=>{x(O3(e.key))},[x]),M=Te.useCallback(e=>{x(T3({handler:o,reactEvent:e}))},[x,o]),D=Te.useCallback(e=>{x(T3({handler:s,reactEvent:e}))},[x,s]),L=Te.useCallback(e=>{x(T3({handler:A,reactEvent:e}))},[x,A]),H=Te.useCallback(e=>{x(T3({handler:d,reactEvent:e}))},[x,d]),_=Te.useCallback(e=>{x(T3({handler:f,reactEvent:e}))},[x,f]),R=Te.useCallback(e=>{v&&x(H3(e)),x(T3({handler:p,reactEvent:e}))},[x,v,p]),K=Te.useCallback(e=>{x(T3({handler:h,reactEvent:e}))},[x,h]),z=function(e){return e?s6:c6}(y);return De.createElement(rX.Provider,{value:b},De.createElement(nS.Provider,{value:C},De.createElement(z,{width:null!=F?F:null==m?void 0:m.width,height:null!=Q?Q:null==m?void 0:m.height,className:yh("recharts-wrapper",r),style:n6({position:"relative",cursor:"default",width:F,height:Q},m),onClick:U,onContextMenu:M,onDoubleClick:D,onFocus:T,onKeyDown:P,onMouseDown:L,onMouseEnter:O,onMouseLeave:N,onMouseMove:I,onMouseUp:H,onTouchEnd:K,onTouchMove:R,onTouchStart:_,ref:j},De.createElement(a6,null),n)))}),d6=["width","height","responsive","children","className","style","compact","title","desc"];var h6=Te.forwardRef((e,t)=>{var{width:n,height:r,responsive:i,children:a,className:o,style:s,compact:A,title:l,desc:c}=e,u=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,d6),d=Wk(u);return A?De.createElement(De.Fragment,null,De.createElement(uP,{width:n,height:r}),De.createElement(e6,{otherAttributes:d,title:l,desc:c},a)):De.createElement(u6,{className:o,style:s,width:n,height:r,responsive:null!=i&&i,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},De.createElement(e6,{otherAttributes:d,title:l,desc:c,ref:t},De.createElement(U1,null,a)))});function p6(){return p6=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},p6.apply(null,arguments)}var f6={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:{top:5,right:5,bottom:5,left:5},responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},m6=Te.forwardRef(function(e,t){var n,r=aQ(e.categoricalChartProps,f6),{chartName:i,defaultTooltipEventType:a,validateTooltipEventTypes:o,tooltipPayloadSearcher:s,categoricalChartProps:A}=e,l={chartName:i,defaultTooltipEventType:a,validateTooltipEventTypes:o,tooltipPayloadSearcher:s,eventEmitter:void 0};return De.createElement(K3,{preloadedState:{options:l},reduxStoreName:null!==(n=A.id)&&void 0!==n?n:i},De.createElement(W0,{chartData:A.data}),De.createElement(V3,{layout:r.layout,margin:r.margin}),De.createElement($3,{baseValue:r.baseValue,accessibilityLayer:r.accessibilityLayer,barCategoryGap:r.barCategoryGap,maxBarSize:r.maxBarSize,stackOffset:r.stackOffset,barGap:r.barGap,barSize:r.barSize,syncId:r.syncId,syncMethod:r.syncMethod,className:r.className,reverseStackOrder:r.reverseStackOrder}),De.createElement(h6,p6({},r,{ref:t})))}),g6=["axis"],y6=Te.forwardRef((e,t)=>De.createElement(m6,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:g6,tooltipPayloadSearcher:lX,categoricalChartProps:e,ref:t})),v6=["axis","item"],w6=Te.forwardRef((e,t)=>De.createElement(m6,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:v6,tooltipPayloadSearcher:lX,categoricalChartProps:e,ref:t}));function x6(e){var t=cU();return Te.useEffect(()=>{t(j3(e))},[t,e]),null}var b6=["layout"];function B6(){return B6=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},B6.apply(null,arguments)}var C6={accessibilityLayer:!0,stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index",layout:"radial",responsive:!1,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"},E6=Te.forwardRef(function(e,t){var n,r=aQ(e.categoricalChartProps,C6),{layout:i}=r,a=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(r,b6),{chartName:o,defaultTooltipEventType:s,validateTooltipEventTypes:A,tooltipPayloadSearcher:l}=e,c={chartName:o,defaultTooltipEventType:s,validateTooltipEventTypes:A,tooltipPayloadSearcher:l,eventEmitter:void 0};return De.createElement(K3,{preloadedState:{options:c},reduxStoreName:null!==(n=r.id)&&void 0!==n?n:o},De.createElement(W0,{chartData:r.data}),De.createElement(V3,{layout:i,margin:r.margin}),De.createElement($3,{baseValue:void 0,accessibilityLayer:r.accessibilityLayer,barCategoryGap:r.barCategoryGap,maxBarSize:r.maxBarSize,stackOffset:r.stackOffset,barGap:r.barGap,barSize:r.barSize,syncId:r.syncId,syncMethod:r.syncMethod,className:r.className,reverseStackOrder:r.reverseStackOrder}),De.createElement(x6,{cx:r.cx,cy:r.cy,startAngle:r.startAngle,endAngle:r.endAngle,innerRadius:r.innerRadius,outerRadius:r.outerRadius}),De.createElement(h6,B6({},a,{ref:t})))});function k6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function S6(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k6(Object(n),!0).forEach(function(t){F6(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k6(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function F6(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Q6=["item"],j6=S6(S6({},C6),{},{layout:"centric",startAngle:0,endAngle:360}),U6=Te.forwardRef((e,t)=>{var n=aQ(e,j6);return De.createElement(E6,{chartName:"PieChart",defaultTooltipEventType:"item",validateTooltipEventTypes:Q6,tooltipPayloadSearcher:lX,categoricalChartProps:n,ref:t})}),O6=["item"],N6=Te.forwardRef((e,t)=>De.createElement(m6,{chartName:"ScatterChart",defaultTooltipEventType:"item",validateTooltipEventTypes:O6,tooltipPayloadSearcher:lX,categoricalChartProps:e,ref:t})),I6=function(e,t){return(I6=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function T6(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}I6(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var P6=function(){return P6=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},P6.apply(this,arguments)};function M6(e,t,n,r){return new(n||(n=Promise))(function(t,i){function a(e){try{s(r.next(e))}catch(qX){i(qX)}}function o(e){try{s(r.throw(e))}catch(qX){i(qX)}}function s(e){var r;e.done?t(e.value):(r=e.value,r instanceof n?r:new n(function(e){e(r)})).then(a,o)}s((r=r.apply(e,[])).next())})}function D6(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(qX){a=[6,qX],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}function L6(e,t,n){if(2===arguments.length)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||t)}for(var H6=function(){function e(e,t,n,r){this.left=e,this.top=t,this.width=n,this.height=r}return e.prototype.add=function(t,n,r,i){return new e(this.left+t,this.top+n,this.width+r,this.height+i)},e.fromClientRect=function(t,n){return new e(n.left+t.windowBounds.left,n.top+t.windowBounds.top,n.width,n.height)},e.fromDOMRectList=function(t,n){var r=Array.from(n).find(function(e){return 0!==e.width});return r?new e(r.left+t.windowBounds.left,r.top+t.windowBounds.top,r.width,r.height):e.EMPTY},e.EMPTY=new e(0,0,0,0),e}(),_6=function(e,t){return H6.fromClientRect(e,t.getBoundingClientRect())},R6=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){var a=e.charCodeAt(n++);56320==(64512&a)?t.push(((1023&i)<<10)+(1023&a)+65536):(t.push(i),n--)}else t.push(i)}return t},K6=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(String.fromCodePoint)return String.fromCodePoint.apply(String,e);var n=e.length;if(!n)return"";for(var r=[],i=-1,a="";++i<n;){var o=e[i];o<=65535?r.push(o):(o-=65536,r.push(55296+(o>>10),o%1024+56320)),(i+1===n||r.length>16384)&&(a+=String.fromCharCode.apply(String,r),r.length=0)}return a},z6="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",V6="undefined"==typeof Uint8Array?[]:new Uint8Array(256),$6=0;$6<64;$6++)V6[z6.charCodeAt($6)]=$6;for(var W6="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",G6="undefined"==typeof Uint8Array?[]:new Uint8Array(256),q6=0;q6<64;q6++)G6[W6.charCodeAt(q6)]=q6;for(var X6=function(e,t,n){return e.slice?e.slice(t,n):new Uint16Array(Array.prototype.slice.call(e,t,n))},Y6=function(){function e(e,t,n,r,i,a){this.initialValue=e,this.errorValue=t,this.highStart=n,this.highValueIndex=r,this.index=i,this.data=a}return e.prototype.get=function(e){var t;if(e>=0){if(e<55296||e>56319&&e<=65535)return t=((t=this.index[e>>5])<<2)+(31&e),this.data[t];if(e<=65535)return t=((t=this.index[2048+(e-55296>>5)])<<2)+(31&e),this.data[t];if(e<this.highStart)return t=2080+(e>>11),t=this.index[t],t+=e>>5&63,t=((t=this.index[t])<<2)+(31&e),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},e}(),J6="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Z6="undefined"==typeof Uint8Array?[]:new Uint8Array(256),e8=0;e8<64;e8++)Z6[J6.charCodeAt(e8)]=e8;var t8,n8,r8,i8,a8,o8,s8,A8,l8=10,c8=13,u8=15,d8=17,h8=18,p8=19,f8=20,m8=21,g8=22,y8=24,v8=25,w8=26,x8=27,b8=28,B8=30,C8=32,E8=33,k8=34,S8=35,F8=37,Q8=38,j8=39,U8=40,O8=42,N8=[9001,65288],I8="×",T8="÷",P8=(i8=function(e){var t,n,r,i,a,o=.75*e.length,s=e.length,A=0;"="===e[e.length-1]&&(o--,"="===e[e.length-2]&&o--);var l="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&void 0!==Uint8Array.prototype.slice?new ArrayBuffer(o):new Array(o),c=Array.isArray(l)?l:new Uint8Array(l);for(t=0;t<s;t+=4)n=G6[e.charCodeAt(t)],r=G6[e.charCodeAt(t+1)],i=G6[e.charCodeAt(t+2)],a=G6[e.charCodeAt(t+3)],c[A++]=n<<2|r>>4,c[A++]=(15&r)<<4|i>>2,c[A++]=(3&i)<<6|63&a;return l}("KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZAiECKQIxAjgCQAJGAk4CVgJeAmQCbAJ0AnwCgQKJApECmQKgAqgCsAK4ArwCxAIwAMwC0wLbAjAA4wLrAvMC+AIAAwcDDwMwABcDHQMlAy0DNQN1AD0DQQNJA0kDSQNRA1EDVwNZA1kDdQB1AGEDdQBpA20DdQN1AHsDdQCBA4kDkQN1AHUAmQOhA3UAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AKYDrgN1AHUAtgO+A8YDzgPWAxcD3gPjA+sD8wN1AHUA+wMDBAkEdQANBBUEHQQlBCoEFwMyBDgEYABABBcDSARQBFgEYARoBDAAcAQzAXgEgASIBJAEdQCXBHUAnwSnBK4EtgS6BMIEyAR1AHUAdQB1AHUAdQCVANAEYABgAGAAYABgAGAAYABgANgEYADcBOQEYADsBPQE/AQEBQwFFAUcBSQFLAU0BWQEPAVEBUsFUwVbBWAAYgVgAGoFcgV6BYIFigWRBWAAmQWfBaYFYABgAGAAYABgAKoFYACxBbAFuQW6BcEFwQXHBcEFwQXPBdMF2wXjBeoF8gX6BQIGCgYSBhoGIgYqBjIGOgZgAD4GRgZMBmAAUwZaBmAAYABgAGAAYABgAGAAYABgAGAAYABgAGIGYABpBnAGYABgAGAAYABgAGAAYABgAGAAYAB4Bn8GhQZgAGAAYAB1AHcDFQSLBmAAYABgAJMGdQA9A3UAmwajBqsGqwaVALMGuwbDBjAAywbSBtIG1QbSBtIG0gbSBtIG0gbdBuMG6wbzBvsGAwcLBxMHAwcbByMHJwcsBywHMQcsB9IGOAdAB0gHTgfSBkgHVgfSBtIG0gbSBtIG0gbSBtIG0gbSBiwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdbB2MHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB2kH0gZwB64EdQB1AHUAdQB1AHUAdQB1AHUHfQdgAIUHjQd1AHUAlQedB2AAYAClB6sHYACzB7YHvgfGB3UAzgfWBzMB3gfmB1EB7gf1B/0HlQENAQUIDQh1ABUIHQglCBcDLQg1CD0IRQhNCEEDUwh1AHUAdQBbCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIcAh3CHoIMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIgggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB9cPKwkyCToJMAB1AHUAdQBCCUoJTQl1AFUJXAljCWcJawkwADAAMAAwAHMJdQB2CX4JdQCECYoJjgmWCXUAngkwAGAAYABxAHUApgn3A64JtAl1ALkJdQDACTAAMAAwADAAdQB1AHUAdQB1AHUAdQB1AHUAowYNBMUIMAAwADAAMADICcsJ0wnZCRUE4QkwAOkJ8An4CTAAMAB1AAAKvwh1AAgKDwoXCh8KdQAwACcKLgp1ADYKqAmICT4KRgowADAAdQB1AE4KMAB1AFYKdQBeCnUAZQowADAAMAAwADAAMAAwADAAMAAVBHUAbQowADAAdQC5CXUKMAAwAHwBxAijBogEMgF9CoQKiASMCpQKmgqIBKIKqgquCogEDQG2Cr4KxgrLCjAAMADTCtsKCgHjCusK8Qr5CgELMAAwADAAMAB1AIsECQsRC3UANAEZCzAAMAAwADAAMAB1ACELKQswAHUANAExCzkLdQBBC0kLMABRC1kLMAAwADAAMAAwADAAdQBhCzAAMAAwAGAAYABpC3ELdwt/CzAAMACHC4sLkwubC58Lpwt1AK4Ltgt1APsDMAAwADAAMAAwADAAMAAwAL4LwwvLC9IL1wvdCzAAMADlC+kL8Qv5C/8LSQswADAAMAAwADAAMAAwADAAMAAHDDAAMAAwADAAMAAODBYMHgx1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1ACYMMAAwADAAdQB1AHUALgx1AHUAdQB1AHUAdQA2DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AD4MdQBGDHUAdQB1AHUAdQB1AEkMdQB1AHUAdQB1AFAMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQBYDHUAdQB1AF8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUA+wMVBGcMMAAwAHwBbwx1AHcMfwyHDI8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAYABgAJcMMAAwADAAdQB1AJ8MlQClDDAAMACtDCwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB7UMLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAnw2nDTAAMAAwADAAMAAwAHUArw23DTAAMAAwADAAMAAwADAAMAAwADAAMAB1AL8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQDHDTAAYABgAM8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA1w11ANwNMAAwAD0B5A0wADAAMAAwADAAMADsDfQN/A0EDgwOFA4wABsOMAAwADAAMAAwADAAMAAwANIG0gbSBtIG0gbSBtIG0gYjDigOwQUuDsEFMw7SBjoO0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGQg5KDlIOVg7SBtIGXg5lDm0OdQ7SBtIGfQ6EDooOjQ6UDtIGmg6hDtIG0gaoDqwO0ga0DrwO0gZgAGAAYADEDmAAYAAkBtIGzA5gANIOYADaDokO0gbSBt8O5w7SBu8O0gb1DvwO0gZgAGAAxA7SBtIG0gbSBtIGYABgAGAAYAAED2AAsAUMD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHJA8sBywHLAcsBywHLAccDywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywPLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAc0D9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHPA/SBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gYUD0QPlQCVAJUAMAAwADAAMACVAJUAlQCVAJUAlQCVAEwPMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA//8EAAQABAAEAAQABAAEAAQABAANAAMAAQABAAIABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACgATABcAHgAbABoAHgAXABYAEgAeABsAGAAPABgAHABLAEsASwBLAEsASwBLAEsASwBLABgAGAAeAB4AHgATAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAGwASAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWAA0AEQAeAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAFAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJABYAGgAbABsAGwAeAB0AHQAeAE8AFwAeAA0AHgAeABoAGwBPAE8ADgBQAB0AHQAdAE8ATwAXAE8ATwBPABYAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAAQAUABQAFAAUABQAFAABABQAFAABAAEAAQAUAArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQACsAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQACsAKwAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQACsAHgAeAB4AHgAeAB4AHgAOAB4AKwANAA0ADQANAA0ADQANAAkADQANAA0ACAAEAAsABAAEAA0ACQANAA0ADAAdAB0AHgAXABcAFgAXABcAFwAWABcAHQAdAB4AHgAUABQAFAANAAEAAQAEAAQABAAEAAQACQAaABoAGgAaABoAGgAaABoAHgAXABcAHQAVABUAHgAeAB4AHgAeAB4AGAAWABEAFQAVABUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ADQAeAA0ADQANAA0AHgANAA0ADQAHAB4AHgAeAB4AKwAEAAQABAAEAAQABAAEAAQABAAEAFAAUAArACsATwBQAFAAUABQAFAAHgAeAB4AFgARAE8AUABPAE8ATwBPAFAAUABQAFAAUAAeAB4AHgAWABEAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArABsAGwAbABsAGwAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGgAbABsAGwAbABoAGwAbABoAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAFAAGgAeAB0AHgBQAB4AGgAeAB4AHgAeAB4AHgAeAB4AHgBPAB4AUAAbAB4AHgBQAFAAUABQAFAAHgAeAB4AHQAdAB4AUAAeAFAAHgBQAB4AUABPAFAAUAAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgBQAFAAUABQAE8ATwBQAFAAUABQAFAATwBQAFAATwBQAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAUABQAFAATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABPAB4AHgArACsAKwArAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAdAB4AHgAeAB0AHQAeAB4AHQAeAB4AHgAdAB4AHQAbABsAHgAdAB4AHgAeAB4AHQAeAB4AHQAdAB0AHQAeAB4AHQAeAB0AHgAdAB0AHQAdAB0AHQAeAB0AHgAeAB4AHgAeAB0AHQAdAB0AHgAeAB4AHgAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB0AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAdAB0AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHQAdAB0AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHQAdAB4AHgAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AJQAlAB0AHQAlAB4AJQAlACUAIAAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAeAB0AJQAdAB0AHgAdAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAdAB0AHQAdACUAHgAlACUAJQAdACUAJQAdAB0AHQAlACUAHQAdACUAHQAdACUAJQAlAB4AHQAeAB4AHgAeAB0AHQAlAB0AHQAdAB0AHQAdACUAJQAlACUAJQAdACUAJQAgACUAHQAdACUAJQAlACUAJQAlACUAJQAeAB4AHgAlACUAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AFwAXABcAFwAXABcAHgATABMAJQAeAB4AHgAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARABYAEQAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwAlACUAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACsAKwArACsAKwArACsAKwArACsAKwArAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBPAE8ATwBPAE8ATwBPAE8AJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQAHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAKwArAFAAKwArAFAAUAArACsAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAHgAeAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeACsAKwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACAAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABcAFwAXABUAFQAVAB4AHgAeAB4AJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAgACUAJQAgACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAIAAgACUAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACAAIAAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACAAIAAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA=="),a8=Array.isArray(i8)?function(e){for(var t=e.length,n=[],r=0;r<t;r+=4)n.push(e[r+3]<<24|e[r+2]<<16|e[r+1]<<8|e[r]);return n}(i8):new Uint32Array(i8),o8=Array.isArray(i8)?function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n.push(e[r+1]<<8|e[r]);return n}(i8):new Uint16Array(i8),s8=X6(o8,12,a8[4]/2),A8=2===a8[5]?X6(o8,(24+a8[4])/2):(t8=a8,n8=Math.ceil((24+a8[4])/4),t8.slice?t8.slice(n8,r8):new Uint32Array(Array.prototype.slice.call(t8,n8,r8))),new Y6(a8[0],a8[1],a8[2],a8[3],s8,A8)),M8=[B8,36],D8=[1,2,3,5],L8=[l8,8],H8=[x8,w8],_8=D8.concat(L8),R8=[Q8,j8,U8,k8,S8],K8=[u8,c8],z8=function(e,t,n,r){var i=r[n];if(Array.isArray(e)?-1!==e.indexOf(i):e===i)for(var a=n;a<=r.length;){if((A=r[++a])===t)return!0;if(A!==l8)break}if(i===l8)for(a=n;a>0;){var o=r[--a];if(Array.isArray(e)?-1!==e.indexOf(o):e===o)for(var s=n;s<=r.length;){var A;if((A=r[++s])===t)return!0;if(A!==l8)break}if(o!==l8)break}return!1},V8=function(e,t){for(var n=e;n>=0;){var r=t[n];if(r!==l8)return r;n--}return 0},$8=function(e,t,n,r,i){if(0===n[r])return I8;var a=r-1;if(Array.isArray(i)&&!0===i[a])return I8;var o=a-1,s=a+1,A=t[a],l=o>=0?t[o]:0,c=t[s];if(2===A&&3===c)return I8;if(-1!==D8.indexOf(A))return"!";if(-1!==D8.indexOf(c))return I8;if(-1!==L8.indexOf(c))return I8;if(8===V8(a,t))return T8;if(11===P8.get(e[a]))return I8;if((A===C8||A===E8)&&11===P8.get(e[s]))return I8;if(7===A||7===c)return I8;if(9===A)return I8;if(-1===[l8,c8,u8].indexOf(A)&&9===c)return I8;if(-1!==[d8,h8,p8,y8,b8].indexOf(c))return I8;if(V8(a,t)===g8)return I8;if(z8(23,g8,a,t))return I8;if(z8([d8,h8],m8,a,t))return I8;if(z8(12,12,a,t))return I8;if(A===l8)return T8;if(23===A||23===c)return I8;if(16===c||16===A)return T8;if(-1!==[c8,u8,m8].indexOf(c)||14===A)return I8;if(36===l&&-1!==K8.indexOf(A))return I8;if(A===b8&&36===c)return I8;if(c===f8)return I8;if(-1!==M8.indexOf(c)&&A===v8||-1!==M8.indexOf(A)&&c===v8)return I8;if(A===x8&&-1!==[F8,C8,E8].indexOf(c)||-1!==[F8,C8,E8].indexOf(A)&&c===w8)return I8;if(-1!==M8.indexOf(A)&&-1!==H8.indexOf(c)||-1!==H8.indexOf(A)&&-1!==M8.indexOf(c))return I8;if(-1!==[x8,w8].indexOf(A)&&(c===v8||-1!==[g8,u8].indexOf(c)&&t[s+1]===v8)||-1!==[g8,u8].indexOf(A)&&c===v8||A===v8&&-1!==[v8,b8,y8].indexOf(c))return I8;if(-1!==[v8,b8,y8,d8,h8].indexOf(c))for(var u=a;u>=0;){if((d=t[u])===v8)return I8;if(-1===[b8,y8].indexOf(d))break;u--}if(-1!==[x8,w8].indexOf(c))for(u=-1!==[d8,h8].indexOf(A)?o:a;u>=0;){var d;if((d=t[u])===v8)return I8;if(-1===[b8,y8].indexOf(d))break;u--}if(Q8===A&&-1!==[Q8,j8,k8,S8].indexOf(c)||-1!==[j8,k8].indexOf(A)&&-1!==[j8,U8].indexOf(c)||-1!==[U8,S8].indexOf(A)&&c===U8)return I8;if(-1!==R8.indexOf(A)&&-1!==[f8,w8].indexOf(c)||-1!==R8.indexOf(c)&&A===x8)return I8;if(-1!==M8.indexOf(A)&&-1!==M8.indexOf(c))return I8;if(A===y8&&-1!==M8.indexOf(c))return I8;if(-1!==M8.concat(v8).indexOf(A)&&c===g8&&-1===N8.indexOf(e[s])||-1!==M8.concat(v8).indexOf(c)&&A===h8)return I8;if(41===A&&41===c){for(var h=n[a],p=1;h>0&&41===t[--h];)p++;if(p%2!=0)return I8}return A===C8&&c===E8?I8:T8},W8=function(e,t){t||(t={lineBreak:"normal",wordBreak:"normal"});var n=function(e,t){void 0===t&&(t="strict");var n=[],r=[],i=[];return e.forEach(function(e,a){var o=P8.get(e);if(o>50?(i.push(!0),o-=50):i.push(!1),-1!==["normal","auto","loose"].indexOf(t)&&-1!==[8208,8211,12316,12448].indexOf(e))return r.push(a),n.push(16);if(4===o||11===o){if(0===a)return r.push(a),n.push(B8);var s=n[a-1];return-1===_8.indexOf(s)?(r.push(r[a-1]),n.push(s)):(r.push(a),n.push(B8))}return r.push(a),31===o?n.push("strict"===t?m8:F8):o===O8||29===o?n.push(B8):43===o?e>=131072&&e<=196605||e>=196608&&e<=262141?n.push(F8):n.push(B8):void n.push(o)}),[r,n,i]}(e,t.lineBreak),r=n[0],i=n[1],a=n[2];"break-all"!==t.wordBreak&&"break-word"!==t.wordBreak||(i=i.map(function(e){return-1!==[v8,B8,O8].indexOf(e)?F8:e}));var o="keep-all"===t.wordBreak?a.map(function(t,n){return t&&e[n]>=19968&&e[n]<=40959}):void 0;return[r,i,o]},G8=function(){function e(e,t,n,r){this.codePoints=e,this.required="!"===t,this.start=n,this.end=r}return e.prototype.slice=function(){return K6.apply(void 0,this.codePoints.slice(this.start,this.end))},e}(),q8=45,X8=43,Y8=-1,J8=function(e){return e>=48&&e<=57},Z8=function(e){return J8(e)||e>=65&&e<=70||e>=97&&e<=102},e9=function(e){return 10===e||9===e||32===e},t9=function(e){return function(e){return function(e){return e>=97&&e<=122}(e)||function(e){return e>=65&&e<=90}(e)}(e)||function(e){return e>=128}(e)||95===e},n9=function(e){return t9(e)||J8(e)||e===q8},r9=function(e){return e>=0&&e<=8||11===e||e>=14&&e<=31||127===e},i9=function(e,t){return 92===e&&10!==t},a9=function(e,t,n){return e===q8?t9(t)||i9(t,n):!!t9(e)||!(92!==e||!i9(e,t))},o9=function(e,t,n){return e===X8||e===q8?!!J8(t)||46===t&&J8(n):J8(46===e?t:e)},s9=function(e){var t=0,n=1;e[t]!==X8&&e[t]!==q8||(e[t]===q8&&(n=-1),t++);for(var r=[];J8(e[t]);)r.push(e[t++]);var i=r.length?parseInt(K6.apply(void 0,r),10):0;46===e[t]&&t++;for(var a=[];J8(e[t]);)a.push(e[t++]);var o=a.length,s=o?parseInt(K6.apply(void 0,a),10):0;69!==e[t]&&101!==e[t]||t++;var A=1;e[t]!==X8&&e[t]!==q8||(e[t]===q8&&(A=-1),t++);for(var l=[];J8(e[t]);)l.push(e[t++]);var c=l.length?parseInt(K6.apply(void 0,l),10):0;return n*(i+s*Math.pow(10,-o))*Math.pow(10,A*c)},A9={type:2},l9={type:3},c9={type:4},u9={type:13},d9={type:8},h9={type:21},p9={type:9},f9={type:10},m9={type:11},g9={type:12},y9={type:14},v9={type:23},w9={type:1},x9={type:25},b9={type:24},B9={type:26},C9={type:27},E9={type:28},k9={type:29},S9={type:31},F9={type:32},Q9=function(){function e(){this._value=[]}return e.prototype.write=function(e){this._value=this._value.concat(R6(e))},e.prototype.read=function(){for(var e=[],t=this.consumeToken();t!==F9;)e.push(t),t=this.consumeToken();return e},e.prototype.consumeToken=function(){var e=this.consumeCodePoint();switch(e){case 34:return this.consumeStringToken(34);case 35:var t=this.peekCodePoint(0),n=this.peekCodePoint(1),r=this.peekCodePoint(2);if(n9(t)||i9(n,r)){var i=a9(t,n,r)?2:1;return{type:5,value:this.consumeName(),flags:i}}break;case 36:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),u9;break;case 39:return this.consumeStringToken(39);case 40:return A9;case 41:return l9;case 42:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),y9;break;case X8:if(o9(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case 44:return c9;case q8:var a=e,o=this.peekCodePoint(0),s=this.peekCodePoint(1);if(o9(a,o,s))return this.reconsumeCodePoint(e),this.consumeNumericToken();if(a9(a,o,s))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();if(o===q8&&62===s)return this.consumeCodePoint(),this.consumeCodePoint(),b9;break;case 46:if(o9(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case 47:if(42===this.peekCodePoint(0))for(this.consumeCodePoint();;){var A=this.consumeCodePoint();if(42===A&&47===(A=this.consumeCodePoint()))return this.consumeToken();if(A===Y8)return this.consumeToken()}break;case 58:return B9;case 59:return C9;case 60:if(33===this.peekCodePoint(0)&&this.peekCodePoint(1)===q8&&this.peekCodePoint(2)===q8)return this.consumeCodePoint(),this.consumeCodePoint(),x9;break;case 64:var l=this.peekCodePoint(0),c=this.peekCodePoint(1),u=this.peekCodePoint(2);if(a9(l,c,u))return{type:7,value:this.consumeName()};break;case 91:return E9;case 92:if(i9(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();break;case 93:return k9;case 61:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),d9;break;case 123:return m9;case 125:return g9;case 117:case 85:var d=this.peekCodePoint(0),h=this.peekCodePoint(1);return d!==X8||!Z8(h)&&63!==h||(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(e),this.consumeIdentLikeToken();case 124:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),p9;if(124===this.peekCodePoint(0))return this.consumeCodePoint(),h9;break;case 126:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),f9;break;case Y8:return F9}return e9(e)?(this.consumeWhiteSpace(),S9):J8(e)?(this.reconsumeCodePoint(e),this.consumeNumericToken()):t9(e)?(this.reconsumeCodePoint(e),this.consumeIdentLikeToken()):{type:6,value:K6(e)}},e.prototype.consumeCodePoint=function(){var e=this._value.shift();return void 0===e?-1:e},e.prototype.reconsumeCodePoint=function(e){this._value.unshift(e)},e.prototype.peekCodePoint=function(e){return e>=this._value.length?-1:this._value[e]},e.prototype.consumeUnicodeRangeToken=function(){for(var e=[],t=this.consumeCodePoint();Z8(t)&&e.length<6;)e.push(t),t=this.consumeCodePoint();for(var n=!1;63===t&&e.length<6;)e.push(t),t=this.consumeCodePoint(),n=!0;if(n)return{type:30,start:parseInt(K6.apply(void 0,e.map(function(e){return 63===e?48:e})),16),end:parseInt(K6.apply(void 0,e.map(function(e){return 63===e?70:e})),16)};var r=parseInt(K6.apply(void 0,e),16);if(this.peekCodePoint(0)===q8&&Z8(this.peekCodePoint(1))){this.consumeCodePoint(),t=this.consumeCodePoint();for(var i=[];Z8(t)&&i.length<6;)i.push(t),t=this.consumeCodePoint();return{type:30,start:r,end:parseInt(K6.apply(void 0,i),16)}}return{type:30,start:r,end:r}},e.prototype.consumeIdentLikeToken=function(){var e=this.consumeName();return"url"===e.toLowerCase()&&40===this.peekCodePoint(0)?(this.consumeCodePoint(),this.consumeUrlToken()):40===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:19,value:e}):{type:20,value:e}},e.prototype.consumeUrlToken=function(){var e=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===Y8)return{type:22,value:""};var t=this.peekCodePoint(0);if(39===t||34===t){var n=this.consumeStringToken(this.consumeCodePoint());return 0===n.type&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===Y8||41===this.peekCodePoint(0))?(this.consumeCodePoint(),{type:22,value:n.value}):(this.consumeBadUrlRemnants(),v9)}for(;;){var r=this.consumeCodePoint();if(r===Y8||41===r)return{type:22,value:K6.apply(void 0,e)};if(e9(r))return this.consumeWhiteSpace(),this.peekCodePoint(0)===Y8||41===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:22,value:K6.apply(void 0,e)}):(this.consumeBadUrlRemnants(),v9);if(34===r||39===r||40===r||r9(r))return this.consumeBadUrlRemnants(),v9;if(92===r){if(!i9(r,this.peekCodePoint(0)))return this.consumeBadUrlRemnants(),v9;e.push(this.consumeEscapedCodePoint())}else e.push(r)}},e.prototype.consumeWhiteSpace=function(){for(;e9(this.peekCodePoint(0));)this.consumeCodePoint()},e.prototype.consumeBadUrlRemnants=function(){for(;;){var e=this.consumeCodePoint();if(41===e||e===Y8)return;i9(e,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},e.prototype.consumeStringSlice=function(e){for(var t="";e>0;){var n=Math.min(5e4,e);t+=K6.apply(void 0,this._value.splice(0,n)),e-=n}return this._value.shift(),t},e.prototype.consumeStringToken=function(e){for(var t="",n=0;;){var r=this._value[n];if(r===Y8||void 0===r||r===e)return{type:0,value:t+=this.consumeStringSlice(n)};if(10===r)return this._value.splice(0,n),w9;if(92===r){var i=this._value[n+1];i!==Y8&&void 0!==i&&(10===i?(t+=this.consumeStringSlice(n),n=-1,this._value.shift()):i9(r,i)&&(t+=this.consumeStringSlice(n),t+=K6(this.consumeEscapedCodePoint()),n=-1))}n++}},e.prototype.consumeNumber=function(){var e=[],t=4,n=this.peekCodePoint(0);for(n!==X8&&n!==q8||e.push(this.consumeCodePoint());J8(this.peekCodePoint(0));)e.push(this.consumeCodePoint());n=this.peekCodePoint(0);var r=this.peekCodePoint(1);if(46===n&&J8(r))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=8;J8(this.peekCodePoint(0));)e.push(this.consumeCodePoint());n=this.peekCodePoint(0),r=this.peekCodePoint(1);var i=this.peekCodePoint(2);if((69===n||101===n)&&((r===X8||r===q8)&&J8(i)||J8(r)))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=8;J8(this.peekCodePoint(0));)e.push(this.consumeCodePoint());return[s9(e),t]},e.prototype.consumeNumericToken=function(){var e=this.consumeNumber(),t=e[0],n=e[1],r=this.peekCodePoint(0),i=this.peekCodePoint(1),a=this.peekCodePoint(2);return a9(r,i,a)?{type:15,number:t,flags:n,unit:this.consumeName()}:37===r?(this.consumeCodePoint(),{type:16,number:t,flags:n}):{type:17,number:t,flags:n}},e.prototype.consumeEscapedCodePoint=function(){var e=this.consumeCodePoint();if(Z8(e)){for(var t=K6(e);Z8(this.peekCodePoint(0))&&t.length<6;)t+=K6(this.consumeCodePoint());e9(this.peekCodePoint(0))&&this.consumeCodePoint();var n=parseInt(t,16);return 0===n||function(e){return e>=55296&&e<=57343}(n)||n>1114111?65533:n}return e===Y8?65533:e},e.prototype.consumeName=function(){for(var e="";;){var t=this.consumeCodePoint();if(n9(t))e+=K6(t);else{if(!i9(t,this.peekCodePoint(0)))return this.reconsumeCodePoint(t),e;e+=K6(this.consumeEscapedCodePoint())}}},e}(),j9=function(){function e(e){this._tokens=e}return e.create=function(t){var n=new Q9;return n.write(t),new e(n.read())},e.parseValue=function(t){return e.create(t).parseComponentValue()},e.parseValues=function(t){return e.create(t).parseComponentValues()},e.prototype.parseComponentValue=function(){for(var e=this.consumeToken();31===e.type;)e=this.consumeToken();if(32===e.type)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(e);var t=this.consumeComponentValue();do{e=this.consumeToken()}while(31===e.type);if(32===e.type)return t;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},e.prototype.parseComponentValues=function(){for(var e=[];;){var t=this.consumeComponentValue();if(32===t.type)return e;e.push(t),e.push()}},e.prototype.consumeComponentValue=function(){var e=this.consumeToken();switch(e.type){case 11:case 28:case 2:return this.consumeSimpleBlock(e.type);case 19:return this.consumeFunction(e)}return e},e.prototype.consumeSimpleBlock=function(e){for(var t={type:e,values:[]},n=this.consumeToken();;){if(32===n.type||L9(n,e))return t;this.reconsumeToken(n),t.values.push(this.consumeComponentValue()),n=this.consumeToken()}},e.prototype.consumeFunction=function(e){for(var t={name:e.value,values:[],type:18};;){var n=this.consumeToken();if(32===n.type||3===n.type)return t;this.reconsumeToken(n),t.values.push(this.consumeComponentValue())}},e.prototype.consumeToken=function(){var e=this._tokens.shift();return void 0===e?F9:e},e.prototype.reconsumeToken=function(e){this._tokens.unshift(e)},e}(),U9=function(e){return 15===e.type},O9=function(e){return 17===e.type},N9=function(e){return 20===e.type},I9=function(e){return 0===e.type},T9=function(e,t){return N9(e)&&e.value===t},P9=function(e){return 31!==e.type},M9=function(e){return 31!==e.type&&4!==e.type},D9=function(e){var t=[],n=[];return e.forEach(function(e){if(4===e.type){if(0===n.length)throw new Error("Error parsing function args, zero tokens for arg");return t.push(n),void(n=[])}31!==e.type&&n.push(e)}),n.length&&t.push(n),t},L9=function(e,t){return 11===t&&12===e.type||(28===t&&29===e.type||2===t&&3===e.type)},H9=function(e){return 17===e.type||15===e.type},_9=function(e){return 16===e.type||H9(e)},R9=function(e){return e.length>1?[e[0],e[1]]:[e[0]]},K9={type:17,number:0,flags:4},z9={type:16,number:50,flags:4},V9={type:16,number:100,flags:4},$9=function(e,t,n){var r=e[0],i=e[1];return[W9(r,t),W9(void 0!==i?i:r,n)]},W9=function(e,t){if(16===e.type)return e.number/100*t;if(U9(e))switch(e.unit){case"rem":case"em":return 16*e.number;default:return e.number}return e.number},G9="grad",q9="turn",X9=function(e,t){if(15===t.type)switch(t.unit){case"deg":return Math.PI*t.number/180;case G9:return Math.PI/200*t.number;case"rad":return t.number;case q9:return 2*Math.PI*t.number}throw new Error("Unsupported angle type")},Y9=function(e){return 15===e.type&&("deg"===e.unit||e.unit===G9||"rad"===e.unit||e.unit===q9)},J9=function(e){switch(e.filter(N9).map(function(e){return e.value}).join(" ")){case"to bottom right":case"to right bottom":case"left top":case"top left":return[K9,K9];case"to top":case"bottom":return Z9(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[K9,V9];case"to right":case"left":return Z9(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[V9,V9];case"to bottom":case"top":return Z9(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[V9,K9];case"to left":case"right":return Z9(270)}return 0},Z9=function(e){return Math.PI*e/180},e7=function(e,t){if(18===t.type){var n=A7[t.name];if(void 0===n)throw new Error('Attempting to parse an unsupported color function "'+t.name+'"');return n(e,t.values)}if(5===t.type){if(3===t.value.length){var r=t.value.substring(0,1),i=t.value.substring(1,2),a=t.value.substring(2,3);return r7(parseInt(r+r,16),parseInt(i+i,16),parseInt(a+a,16),1)}if(4===t.value.length){r=t.value.substring(0,1),i=t.value.substring(1,2),a=t.value.substring(2,3);var o=t.value.substring(3,4);return r7(parseInt(r+r,16),parseInt(i+i,16),parseInt(a+a,16),parseInt(o+o,16)/255)}if(6===t.value.length){r=t.value.substring(0,2),i=t.value.substring(2,4),a=t.value.substring(4,6);return r7(parseInt(r,16),parseInt(i,16),parseInt(a,16),1)}if(8===t.value.length){r=t.value.substring(0,2),i=t.value.substring(2,4),a=t.value.substring(4,6),o=t.value.substring(6,8);return r7(parseInt(r,16),parseInt(i,16),parseInt(a,16),parseInt(o,16)/255)}}if(20===t.type){var s=c7[t.value.toUpperCase()];if(void 0!==s)return s}return c7.TRANSPARENT},t7=function(e){return!(255&e)},n7=function(e){var t=255&e,n=255&e>>8,r=255&e>>16,i=255&e>>24;return t<255?"rgba("+i+","+r+","+n+","+t/255+")":"rgb("+i+","+r+","+n+")"},r7=function(e,t,n,r){return(e<<24|t<<16|n<<8|Math.round(255*r))>>>0},i7=function(e,t){if(17===e.type)return e.number;if(16===e.type){var n=3===t?1:255;return 3===t?e.number/100*n:Math.round(e.number/100*n)}return 0},a7=function(e,t){var n=t.filter(M9);if(3===n.length){var r=n.map(i7),i=r[0],a=r[1],o=r[2];return r7(i,a,o,1)}if(4===n.length){var s=n.map(i7),A=(i=s[0],a=s[1],o=s[2],s[3]);return r7(i,a,o,A)}return 0};function o7(e,t,n){return n<0&&(n+=1),n>=1&&(n-=1),n<1/6?(t-e)*n*6+e:n<.5?t:n<2/3?6*(t-e)*(2/3-n)+e:e}var s7=function(e,t){var n=t.filter(M9),r=n[0],i=n[1],a=n[2],o=n[3],s=(17===r.type?Z9(r.number):X9(e,r))/(2*Math.PI),A=_9(i)?i.number/100:0,l=_9(a)?a.number/100:0,c=void 0!==o&&_9(o)?W9(o,1):1;if(0===A)return r7(255*l,255*l,255*l,1);var u=l<=.5?l*(A+1):l+A-l*A,d=2*l-u,h=o7(d,u,s+1/3),p=o7(d,u,s),f=o7(d,u,s-1/3);return r7(255*h,255*p,255*f,c)},A7={hsl:s7,hsla:s7,rgb:a7,rgba:a7},l7=function(e,t){return e7(e,j9.create(t).parseComponentValue())},c7={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},u7={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(e,t){return t.map(function(e){if(N9(e))switch(e.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},d7={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},h7=function(e,t){var n=e7(e,t[0]),r=t[1];return r&&_9(r)?{color:n,stop:r}:{color:n,stop:null}},p7=function(e,t){var n=e[0],r=e[e.length-1];null===n.stop&&(n.stop=K9),null===r.stop&&(r.stop=V9);for(var i=[],a=0,o=0;o<e.length;o++){var s=e[o].stop;if(null!==s){var A=W9(s,t);A>a?i.push(A):i.push(a),a=A}else i.push(null)}var l=null;for(o=0;o<i.length;o++){var c=i[o];if(null===c)null===l&&(l=o);else if(null!==l){for(var u=o-l,d=(c-i[l-1])/(u+1),h=1;h<=u;h++)i[l+h-1]=d*h;l=null}}return e.map(function(e,n){return{color:e.color,stop:Math.max(Math.min(1,i[n]/t),0)}})},f7=function(e,t,n){var r="number"==typeof e?e:function(e,t,n){var r=t/2,i=n/2,a=W9(e[0],t)-r,o=i-W9(e[1],n);return(Math.atan2(o,a)+2*Math.PI)%(2*Math.PI)}(e,t,n),i=Math.abs(t*Math.sin(r))+Math.abs(n*Math.cos(r)),a=t/2,o=n/2,s=i/2,A=Math.sin(r-Math.PI/2)*s,l=Math.cos(r-Math.PI/2)*s;return[i,a-l,a+l,o-A,o+A]},m7=function(e,t){return Math.sqrt(e*e+t*t)},g7=function(e,t,n,r,i){return[[0,0],[0,t],[e,0],[e,t]].reduce(function(e,t){var a=t[0],o=t[1],s=m7(n-a,r-o);return(i?s<e.optimumDistance:s>e.optimumDistance)?{optimumCorner:t,optimumDistance:s}:e},{optimumDistance:i?1/0:-1/0,optimumCorner:null}).optimumCorner},y7=function(e,t){var n=Z9(180),r=[];return D9(t).forEach(function(t,i){if(0===i){var a=t[0];if(20===a.type&&-1!==["top","left","right","bottom"].indexOf(a.value))return void(n=J9(t));if(Y9(a))return void(n=(X9(e,a)+Z9(270))%Z9(360))}var o=h7(e,t);r.push(o)}),{angle:n,stops:r,type:1}},v7="closest-side",w7="farthest-side",x7="closest-corner",b7="farthest-corner",B7="circle",C7="ellipse",E7="cover",k7="contain",S7=function(e,t){var n=0,r=3,i=[],a=[];return D9(t).forEach(function(t,o){var s=!0;if(0===o?s=t.reduce(function(e,t){if(N9(t))switch(t.value){case"center":return a.push(z9),!1;case"top":case"left":return a.push(K9),!1;case"right":case"bottom":return a.push(V9),!1}else if(_9(t)||H9(t))return a.push(t),!1;return e},s):1===o&&(s=t.reduce(function(e,t){if(N9(t))switch(t.value){case B7:return n=0,!1;case C7:return n=1,!1;case k7:case v7:return r=0,!1;case w7:return r=1,!1;case x7:return r=2,!1;case E7:case b7:return r=3,!1}else if(H9(t)||_9(t))return Array.isArray(r)||(r=[]),r.push(t),!1;return e},s)),s){var A=h7(e,t);i.push(A)}}),{size:r,shape:n,stops:i,position:a,type:2}},F7=function(e,t){if(22===t.type){var n={url:t.value,type:0};return e.cache.addImage(t.value),n}if(18===t.type){var r=U7[t.name];if(void 0===r)throw new Error('Attempting to parse an unsupported image function "'+t.name+'"');return r(e,t.values)}throw new Error("Unsupported image type "+t.type)};var Q7,j7,U7={"linear-gradient":function(e,t){var n=Z9(180),r=[];return D9(t).forEach(function(t,i){if(0===i){var a=t[0];if(20===a.type&&"to"===a.value)return void(n=J9(t));if(Y9(a))return void(n=X9(e,a))}var o=h7(e,t);r.push(o)}),{angle:n,stops:r,type:1}},"-moz-linear-gradient":y7,"-ms-linear-gradient":y7,"-o-linear-gradient":y7,"-webkit-linear-gradient":y7,"radial-gradient":function(e,t){var n=0,r=3,i=[],a=[];return D9(t).forEach(function(t,o){var s=!0;if(0===o){var A=!1;s=t.reduce(function(e,t){if(A)if(N9(t))switch(t.value){case"center":return a.push(z9),e;case"top":case"left":return a.push(K9),e;case"right":case"bottom":return a.push(V9),e}else(_9(t)||H9(t))&&a.push(t);else if(N9(t))switch(t.value){case B7:return n=0,!1;case C7:return n=1,!1;case"at":return A=!0,!1;case v7:return r=0,!1;case E7:case w7:return r=1,!1;case k7:case x7:return r=2,!1;case b7:return r=3,!1}else if(H9(t)||_9(t))return Array.isArray(r)||(r=[]),r.push(t),!1;return e},s)}if(s){var l=h7(e,t);i.push(l)}}),{size:r,shape:n,stops:i,position:a,type:2}},"-moz-radial-gradient":S7,"-ms-radial-gradient":S7,"-o-radial-gradient":S7,"-webkit-radial-gradient":S7,"-webkit-gradient":function(e,t){var n=Z9(180),r=[],i=1;return D9(t).forEach(function(t,n){var a=t[0];if(0===n){if(N9(a)&&"linear"===a.value)return void(i=1);if(N9(a)&&"radial"===a.value)return void(i=2)}if(18===a.type)if("from"===a.name){var o=e7(e,a.values[0]);r.push({stop:K9,color:o})}else if("to"===a.name){o=e7(e,a.values[0]);r.push({stop:V9,color:o})}else if("color-stop"===a.name){var s=a.values.filter(M9);if(2===s.length){o=e7(e,s[1]);var A=s[0];O9(A)&&r.push({stop:{type:16,number:100*A.number,flags:A.flags},color:o})}}}),1===i?{angle:(n+Z9(180))%Z9(360),stops:r,type:i}:{size:3,shape:0,stops:r,position:[],type:i}}},O7={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(e,t){if(0===t.length)return[];var n=t[0];return 20===n.type&&"none"===n.value?[]:t.filter(function(e){return M9(e)&&function(e){return!(20===e.type&&"none"===e.value||18===e.type&&!U7[e.name])}(e)}).map(function(t){return F7(e,t)})}},N7={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(e,t){return t.map(function(e){if(N9(e))switch(e.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},I7={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(e,t){return D9(t).map(function(e){return e.filter(_9)}).map(R9)}},T7={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(e,t){return D9(t).map(function(e){return e.filter(N9).map(function(e){return e.value}).join(" ")}).map(P7)}},P7=function(e){switch(e){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;default:return 0}};(j7=Q7||(Q7={})).AUTO="auto",j7.CONTAIN="contain",j7.COVER="cover";var M7,D7,L7={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(e,t){return D9(t).map(function(e){return e.filter(H7)})}},H7=function(e){return N9(e)||_9(e)},_7=function(e){return{name:"border-"+e+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},R7=_7("top"),K7=_7("right"),z7=_7("bottom"),V7=_7("left"),$7=function(e){return{name:"border-radius-"+e,initialValue:"0 0",prefix:!1,type:1,parse:function(e,t){return R9(t.filter(_9))}}},W7=$7("top-left"),G7=$7("top-right"),q7=$7("bottom-right"),X7=$7("bottom-left"),Y7=function(e){return{name:"border-"+e+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(e,t){switch(t){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},J7=Y7("top"),Z7=Y7("right"),eee=Y7("bottom"),tee=Y7("left"),nee=function(e){return{name:"border-"+e+"-width",initialValue:"0",type:0,prefix:!1,parse:function(e,t){return U9(t)?t.number:0}}},ree=nee("top"),iee=nee("right"),aee=nee("bottom"),oee=nee("left"),see={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Aee={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(e,t){return"rtl"===t?1:0}},lee={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(e,t){return t.filter(N9).reduce(function(e,t){return e|cee(t.value)},0)}},cee=function(e){switch(e){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},uee={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},dee={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(e,t){return 20===t.type&&"normal"===t.value?0:17===t.type||15===t.type?t.number:0}};(D7=M7||(M7={})).NORMAL="normal",D7.STRICT="strict";var hee,pee,fee={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){return"strict"===t?M7.STRICT:M7.NORMAL}},mee={name:"line-height",initialValue:"normal",prefix:!1,type:4},gee=function(e,t){return N9(e)&&"normal"===e.value?1.2*t:17===e.type?t*e.number:_9(e)?W9(e,t):t},yee={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(e,t){return 20===t.type&&"none"===t.value?null:F7(e,t)}},vee={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(e,t){return"inside"===t?0:1}},wee={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;default:return-1}}},xee=function(e){return{name:"margin-"+e,initialValue:"0",prefix:!1,type:4}},bee=xee("top"),Bee=xee("right"),Cee=xee("bottom"),Eee=xee("left"),kee={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(e,t){return t.filter(N9).map(function(e){switch(e.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;default:return 0}})}},See={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){return"break-word"===t?"break-word":"normal"}},Fee=function(e){return{name:"padding-"+e,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},Qee=Fee("top"),jee=Fee("right"),Uee=Fee("bottom"),Oee=Fee("left"),Nee={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(e,t){switch(t){case"right":return 2;case"center":case"justify":return 1;default:return 0}}},Iee={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(e,t){switch(t){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},Tee={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(e,t){return 1===t.length&&T9(t[0],"none")?[]:D9(t).map(function(t){for(var n={color:c7.TRANSPARENT,offsetX:K9,offsetY:K9,blur:K9},r=0,i=0;i<t.length;i++){var a=t[i];H9(a)?(0===r?n.offsetX=a:1===r?n.offsetY=a:n.blur=a,r++):n.color=e7(e,a)}return n})}},Pee={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},Mee={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(e,t){if(20===t.type&&"none"===t.value)return null;if(18===t.type){var n=Dee[t.name];if(void 0===n)throw new Error('Attempting to parse an unsupported transform function "'+t.name+'"');return n(t.values)}return null}},Dee={matrix:function(e){var t=e.filter(function(e){return 17===e.type}).map(function(e){return e.number});return 6===t.length?t:null},matrix3d:function(e){var t=e.filter(function(e){return 17===e.type}).map(function(e){return e.number}),n=t[0],r=t[1];t[2],t[3];var i=t[4],a=t[5];t[6],t[7],t[8],t[9],t[10],t[11];var o=t[12],s=t[13];return t[14],t[15],16===t.length?[n,r,i,a,o,s]:null}},Lee={type:16,number:50,flags:4},Hee=[Lee,Lee],_ee={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(e,t){var n=t.filter(_9);return 2!==n.length?Hee:[n[0],n[1]]}},Ree={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"hidden":return 1;case"collapse":return 2;default:return 0}}};(pee=hee||(hee={})).NORMAL="normal",pee.BREAK_ALL="break-all",pee.KEEP_ALL="keep-all";for(var Kee={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){switch(t){case"break-all":return hee.BREAK_ALL;case"keep-all":return hee.KEEP_ALL;default:return hee.NORMAL}}},zee={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(e,t){if(20===t.type)return{auto:!0,order:0};if(O9(t))return{auto:!1,order:t.number};throw new Error("Invalid z-index number parsed")}},Vee=function(e,t){if(15===t.type)switch(t.unit.toLowerCase()){case"s":return 1e3*t.number;case"ms":return t.number}throw new Error("Unsupported time type")},$ee={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(e,t){return O9(t)?t.number:1}},Wee={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Gee={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(e,t){return t.filter(N9).map(function(e){switch(e.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(e){return 0!==e})}},qee={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(e,t){var n=[],r=[];return t.forEach(function(e){switch(e.type){case 20:case 0:n.push(e.value);break;case 17:n.push(e.number.toString());break;case 4:r.push(n.join(" ")),n.length=0}}),n.length&&r.push(n.join(" ")),r.map(function(e){return-1===e.indexOf(" ")?e:"'"+e+"'"})}},Xee={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},Yee={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(e,t){return O9(t)?t.number:N9(t)&&"bold"===t.value?700:400}},Jee={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(e,t){return t.filter(N9).map(function(e){return e.value})}},Zee={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){switch(t){case"oblique":return"oblique";case"italic":return"italic";default:return"normal"}}},ete=function(e,t){return 0!==(e&t)},tte={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(e,t){if(0===t.length)return[];var n=t[0];return 20===n.type&&"none"===n.value?[]:t}},nte={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(e,t){if(0===t.length)return null;var n=t[0];if(20===n.type&&"none"===n.value)return null;for(var r=[],i=t.filter(P9),a=0;a<i.length;a++){var o=i[a],s=i[a+1];if(20===o.type){var A=s&&O9(s)?s.number:1;r.push({counter:o.value,increment:A})}}return r}},rte={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(e,t){if(0===t.length)return[];for(var n=[],r=t.filter(P9),i=0;i<r.length;i++){var a=r[i],o=r[i+1];if(N9(a)&&"none"!==a.value){var s=o&&O9(o)?o.number:0;n.push({counter:a.value,reset:s})}}return n}},ite={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(e,t){return t.filter(U9).map(function(t){return Vee(e,t)})}},ate={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(e,t){if(0===t.length)return null;var n=t[0];if(20===n.type&&"none"===n.value)return null;var r=[],i=t.filter(I9);if(i.length%2!=0)return null;for(var a=0;a<i.length;a+=2){var o=i[a].value,s=i[a+1].value;r.push({open:o,close:s})}return r}},ote=function(e,t,n){if(!e)return"";var r=e[Math.min(t,e.length-1)];return r?n?r.open:r.close:""},ste={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(e,t){return 1===t.length&&T9(t[0],"none")?[]:D9(t).map(function(t){for(var n={color:255,offsetX:K9,offsetY:K9,blur:K9,spread:K9,inset:!1},r=0,i=0;i<t.length;i++){var a=t[i];T9(a,"inset")?n.inset=!0:H9(a)?(0===r?n.offsetX=a:1===r?n.offsetY=a:2===r?n.blur=a:n.spread=a,r++):n.color=e7(e,a)}return n})}},Ate={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(e,t){var n=[];return t.filter(N9).forEach(function(e){switch(e.value){case"stroke":n.push(1);break;case"fill":n.push(0);break;case"markers":n.push(2)}}),[0,1,2].forEach(function(e){-1===n.indexOf(e)&&n.push(e)}),n}},lte={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},cte={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(e,t){return U9(t)?t.number:0}},ute=function(){function e(e,t){var n,r;this.animationDuration=pte(e,ite,t.animationDuration),this.backgroundClip=pte(e,u7,t.backgroundClip),this.backgroundColor=pte(e,d7,t.backgroundColor),this.backgroundImage=pte(e,O7,t.backgroundImage),this.backgroundOrigin=pte(e,N7,t.backgroundOrigin),this.backgroundPosition=pte(e,I7,t.backgroundPosition),this.backgroundRepeat=pte(e,T7,t.backgroundRepeat),this.backgroundSize=pte(e,L7,t.backgroundSize),this.borderTopColor=pte(e,R7,t.borderTopColor),this.borderRightColor=pte(e,K7,t.borderRightColor),this.borderBottomColor=pte(e,z7,t.borderBottomColor),this.borderLeftColor=pte(e,V7,t.borderLeftColor),this.borderTopLeftRadius=pte(e,W7,t.borderTopLeftRadius),this.borderTopRightRadius=pte(e,G7,t.borderTopRightRadius),this.borderBottomRightRadius=pte(e,q7,t.borderBottomRightRadius),this.borderBottomLeftRadius=pte(e,X7,t.borderBottomLeftRadius),this.borderTopStyle=pte(e,J7,t.borderTopStyle),this.borderRightStyle=pte(e,Z7,t.borderRightStyle),this.borderBottomStyle=pte(e,eee,t.borderBottomStyle),this.borderLeftStyle=pte(e,tee,t.borderLeftStyle),this.borderTopWidth=pte(e,ree,t.borderTopWidth),this.borderRightWidth=pte(e,iee,t.borderRightWidth),this.borderBottomWidth=pte(e,aee,t.borderBottomWidth),this.borderLeftWidth=pte(e,oee,t.borderLeftWidth),this.boxShadow=pte(e,ste,t.boxShadow),this.color=pte(e,see,t.color),this.direction=pte(e,Aee,t.direction),this.display=pte(e,lee,t.display),this.float=pte(e,uee,t.cssFloat),this.fontFamily=pte(e,qee,t.fontFamily),this.fontSize=pte(e,Xee,t.fontSize),this.fontStyle=pte(e,Zee,t.fontStyle),this.fontVariant=pte(e,Jee,t.fontVariant),this.fontWeight=pte(e,Yee,t.fontWeight),this.letterSpacing=pte(e,dee,t.letterSpacing),this.lineBreak=pte(e,fee,t.lineBreak),this.lineHeight=pte(e,mee,t.lineHeight),this.listStyleImage=pte(e,yee,t.listStyleImage),this.listStylePosition=pte(e,vee,t.listStylePosition),this.listStyleType=pte(e,wee,t.listStyleType),this.marginTop=pte(e,bee,t.marginTop),this.marginRight=pte(e,Bee,t.marginRight),this.marginBottom=pte(e,Cee,t.marginBottom),this.marginLeft=pte(e,Eee,t.marginLeft),this.opacity=pte(e,$ee,t.opacity);var i=pte(e,kee,t.overflow);this.overflowX=i[0],this.overflowY=i[i.length>1?1:0],this.overflowWrap=pte(e,See,t.overflowWrap),this.paddingTop=pte(e,Qee,t.paddingTop),this.paddingRight=pte(e,jee,t.paddingRight),this.paddingBottom=pte(e,Uee,t.paddingBottom),this.paddingLeft=pte(e,Oee,t.paddingLeft),this.paintOrder=pte(e,Ate,t.paintOrder),this.position=pte(e,Iee,t.position),this.textAlign=pte(e,Nee,t.textAlign),this.textDecorationColor=pte(e,Wee,null!==(n=t.textDecorationColor)&&void 0!==n?n:t.color),this.textDecorationLine=pte(e,Gee,null!==(r=t.textDecorationLine)&&void 0!==r?r:t.textDecoration),this.textShadow=pte(e,Tee,t.textShadow),this.textTransform=pte(e,Pee,t.textTransform),this.transform=pte(e,Mee,t.transform),this.transformOrigin=pte(e,_ee,t.transformOrigin),this.visibility=pte(e,Ree,t.visibility),this.webkitTextStrokeColor=pte(e,lte,t.webkitTextStrokeColor),this.webkitTextStrokeWidth=pte(e,cte,t.webkitTextStrokeWidth),this.wordBreak=pte(e,Kee,t.wordBreak),this.zIndex=pte(e,zee,t.zIndex)}return e.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&0===this.visibility},e.prototype.isTransparent=function(){return t7(this.backgroundColor)},e.prototype.isTransformed=function(){return null!==this.transform},e.prototype.isPositioned=function(){return 0!==this.position},e.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},e.prototype.isFloating=function(){return 0!==this.float},e.prototype.isInlineLevel=function(){return ete(this.display,4)||ete(this.display,33554432)||ete(this.display,268435456)||ete(this.display,536870912)||ete(this.display,67108864)||ete(this.display,134217728)},e}(),dte=function(){return function(e,t){this.content=pte(e,tte,t.content),this.quotes=pte(e,ate,t.quotes)}}(),hte=function(){return function(e,t){this.counterIncrement=pte(e,nte,t.counterIncrement),this.counterReset=pte(e,rte,t.counterReset)}}(),pte=function(e,t,n){var r=new Q9,i=null!=n?n.toString():t.initialValue;r.write(i);var a=new j9(r.read());switch(t.type){case 2:var o=a.parseComponentValue();return t.parse(e,N9(o)?o.value:t.initialValue);case 0:return t.parse(e,a.parseComponentValue());case 1:return t.parse(e,a.parseComponentValues());case 4:return a.parseComponentValue();case 3:switch(t.format){case"angle":return X9(e,a.parseComponentValue());case"color":return e7(e,a.parseComponentValue());case"image":return F7(e,a.parseComponentValue());case"length":var s=a.parseComponentValue();return H9(s)?s:K9;case"length-percentage":var A=a.parseComponentValue();return _9(A)?A:K9;case"time":return Vee(e,a.parseComponentValue())}}},fte=function(e,t){var n=function(e){switch(e.getAttribute("data-html2canvas-debug")){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}}(e);return 1===n||t===n},mte=function(){return function(e,t){this.context=e,this.textNodes=[],this.elements=[],this.flags=0,fte(t,3),this.styles=new ute(e,window.getComputedStyle(t,null)),xne(t)&&(this.styles.animationDuration.some(function(e){return e>0})&&(t.style.animationDuration="0s"),null!==this.styles.transform&&(t.style.transform="none")),this.bounds=_6(this.context,t),fte(t,4)&&(this.flags|=16)}}(),gte="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",yte="undefined"==typeof Uint8Array?[]:new Uint8Array(256),vte=0;vte<64;vte++)yte[gte.charCodeAt(vte)]=vte;for(var wte=function(e,t,n){return e.slice?e.slice(t,n):new Uint16Array(Array.prototype.slice.call(e,t,n))},xte=function(){function e(e,t,n,r,i,a){this.initialValue=e,this.errorValue=t,this.highStart=n,this.highValueIndex=r,this.index=i,this.data=a}return e.prototype.get=function(e){var t;if(e>=0){if(e<55296||e>56319&&e<=65535)return t=((t=this.index[e>>5])<<2)+(31&e),this.data[t];if(e<=65535)return t=((t=this.index[2048+(e-55296>>5)])<<2)+(31&e),this.data[t];if(e<this.highStart)return t=2080+(e>>11),t=this.index[t],t+=e>>5&63,t=((t=this.index[t])<<2)+(31&e),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},e}(),bte="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Bte="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Cte=0;Cte<64;Cte++)Bte[bte.charCodeAt(Cte)]=Cte;var Ete,kte,Ste=8,Fte=9,Qte=11,jte=12,Ute=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(String.fromCodePoint)return String.fromCodePoint.apply(String,e);var n=e.length;if(!n)return"";for(var r=[],i=-1,a="";++i<n;){var o=e[i];o<=65535?r.push(o):(o-=65536,r.push(55296+(o>>10),o%1024+56320)),(i+1===n||r.length>16384)&&(a+=String.fromCharCode.apply(String,r),r.length=0)}return a},Ote=function(e){var t=function(e){var t,n,r,i,a,o=.75*e.length,s=e.length,A=0;"="===e[e.length-1]&&(o--,"="===e[e.length-2]&&o--);var l="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&void 0!==Uint8Array.prototype.slice?new ArrayBuffer(o):new Array(o),c=Array.isArray(l)?l:new Uint8Array(l);for(t=0;t<s;t+=4)n=yte[e.charCodeAt(t)],r=yte[e.charCodeAt(t+1)],i=yte[e.charCodeAt(t+2)],a=yte[e.charCodeAt(t+3)],c[A++]=n<<2|r>>4,c[A++]=(15&r)<<4|i>>2,c[A++]=(3&i)<<6|63&a;return l}(e),n=Array.isArray(t)?function(e){for(var t=e.length,n=[],r=0;r<t;r+=4)n.push(e[r+3]<<24|e[r+2]<<16|e[r+1]<<8|e[r]);return n}(t):new Uint32Array(t),r=Array.isArray(t)?function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n.push(e[r+1]<<8|e[r]);return n}(t):new Uint16Array(t),i=wte(r,12,n[4]/2),a=2===n[5]?wte(r,(24+n[4])/2):function(e,t,n){return e.slice?e.slice(t,n):new Uint32Array(Array.prototype.slice.call(e,t,n))}(n,Math.ceil((24+n[4])/4));return new xte(n[0],n[1],n[2],n[3],i,a)}("AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA="),Nte="×",Ite=function(e){return Ote.get(e)},Tte=function(e,t,n){var r=n-2,i=t[r],a=t[n-1],o=t[n];if(2===a&&3===o)return Nte;if(2===a||3===a||4===a)return"÷";if(2===o||3===o||4===o)return"÷";if(a===Ste&&-1!==[Ste,Fte,Qte,jte].indexOf(o))return Nte;if(!(a!==Qte&&a!==Fte||o!==Fte&&10!==o))return Nte;if((a===jte||10===a)&&10===o)return Nte;if(13===o||5===o)return Nte;if(7===o)return Nte;if(1===a)return Nte;if(13===a&&14===o){for(;5===i;)i=t[--r];if(14===i)return Nte}if(15===a&&15===o){for(var s=0;15===i;)s++,i=t[--r];if(s%2==0)return Nte}return"÷"},Pte=function(e){var t=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){var a=e.charCodeAt(n++);56320==(64512&a)?t.push(((1023&i)<<10)+(1023&a)+65536):(t.push(i),n--)}else t.push(i)}return t}(e),n=t.length,r=0,i=0,a=t.map(Ite);return{next:function(){if(r>=n)return{done:!0,value:null};for(var e=Nte;r<n&&(e=Tte(0,a,++r))===Nte;);if(e!==Nte||r===n){var o=Ute.apply(null,t.slice(i,r));return i=r,{value:o,done:!1}}return{done:!0,value:null}}}},Mte=function(e){return 0===e[0]&&255===e[1]&&0===e[2]&&255===e[3]},Dte=function(e,t,n,r,i){var a="http://www.w3.org/2000/svg",o=document.createElementNS(a,"svg"),s=document.createElementNS(a,"foreignObject");return o.setAttributeNS(null,"width",e.toString()),o.setAttributeNS(null,"height",t.toString()),s.setAttributeNS(null,"width","100%"),s.setAttributeNS(null,"height","100%"),s.setAttributeNS(null,"x",n.toString()),s.setAttributeNS(null,"y",r.toString()),s.setAttributeNS(null,"externalResourcesRequired","true"),o.appendChild(s),s.appendChild(i),o},Lte=function(e){return new Promise(function(t,n){var r=new Image;r.onload=function(){return t(r)},r.onerror=n,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent((new XMLSerializer).serializeToString(e))})},Hte={get SUPPORT_RANGE_BOUNDS(){var e=function(e){if(e.createRange){var t=e.createRange();if(t.getBoundingClientRect){var n=e.createElement("boundtest");n.style.height="123px",n.style.display="block",e.body.appendChild(n),t.selectNode(n);var r=t.getBoundingClientRect(),i=Math.round(r.height);if(e.body.removeChild(n),123===i)return!0}}return!1}(document);return Object.defineProperty(Hte,"SUPPORT_RANGE_BOUNDS",{value:e}),e},get SUPPORT_WORD_BREAKING(){var e=Hte.SUPPORT_RANGE_BOUNDS&&function(e){var t=e.createElement("boundtest");t.style.width="50px",t.style.display="block",t.style.fontSize="12px",t.style.letterSpacing="0px",t.style.wordSpacing="0px",e.body.appendChild(t);var n=e.createRange();t.innerHTML="function"==typeof"".repeat?"👨".repeat(10):"";var r=t.firstChild,i=R6(r.data).map(function(e){return K6(e)}),a=0,o={},s=i.every(function(e,t){n.setStart(r,a),n.setEnd(r,a+e.length);var i=n.getBoundingClientRect();a+=e.length;var s=i.x>o.x||i.y>o.y;return o=i,0===t||s});return e.body.removeChild(t),s}(document);return Object.defineProperty(Hte,"SUPPORT_WORD_BREAKING",{value:e}),e},get SUPPORT_SVG_DRAWING(){var e=function(e){var t=new Image,n=e.createElement("canvas"),r=n.getContext("2d");if(!r)return!1;t.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{r.drawImage(t,0,0),n.toDataURL()}catch(qX){return!1}return!0}(document);return Object.defineProperty(Hte,"SUPPORT_SVG_DRAWING",{value:e}),e},get SUPPORT_FOREIGNOBJECT_DRAWING(){var e="function"==typeof Array.from&&"function"==typeof window.fetch?function(e){var t=e.createElement("canvas"),n=100;t.width=n,t.height=n;var r=t.getContext("2d");if(!r)return Promise.reject(!1);r.fillStyle="rgb(0, 255, 0)",r.fillRect(0,0,n,n);var i=new Image,a=t.toDataURL();i.src=a;var o=Dte(n,n,0,0,i);return r.fillStyle="red",r.fillRect(0,0,n,n),Lte(o).then(function(t){r.drawImage(t,0,0);var i=r.getImageData(0,0,n,n).data;r.fillStyle="red",r.fillRect(0,0,n,n);var o=e.createElement("div");return o.style.backgroundImage="url("+a+")",o.style.height=n+"px",Mte(i)?Lte(Dte(n,n,0,0,o)):Promise.reject(!1)}).then(function(e){return r.drawImage(e,0,0),Mte(r.getImageData(0,0,n,n).data)}).catch(function(){return!1})}(document):Promise.resolve(!1);return Object.defineProperty(Hte,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:e}),e},get SUPPORT_CORS_IMAGES(){var e=void 0!==(new Image).crossOrigin;return Object.defineProperty(Hte,"SUPPORT_CORS_IMAGES",{value:e}),e},get SUPPORT_RESPONSE_TYPE(){var e="string"==typeof(new XMLHttpRequest).responseType;return Object.defineProperty(Hte,"SUPPORT_RESPONSE_TYPE",{value:e}),e},get SUPPORT_CORS_XHR(){var e="withCredentials"in new XMLHttpRequest;return Object.defineProperty(Hte,"SUPPORT_CORS_XHR",{value:e}),e},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var e=!("undefined"==typeof Intl||!Intl.Segmenter);return Object.defineProperty(Hte,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:e}),e}},_te=function(){return function(e,t){this.text=e,this.bounds=t}}(),Rte=function(e,t){var n=t.ownerDocument;if(n){var r=n.createElement("html2canvaswrapper");r.appendChild(t.cloneNode(!0));var i=t.parentNode;if(i){i.replaceChild(r,t);var a=_6(e,r);return r.firstChild&&i.replaceChild(r.firstChild,r),a}}return H6.EMPTY},Kte=function(e,t,n){var r=e.ownerDocument;if(!r)throw new Error("Node has no owner document");var i=r.createRange();return i.setStart(e,t),i.setEnd(e,t+n),i},zte=function(e){if(Hte.SUPPORT_NATIVE_TEXT_SEGMENTATION){var t=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(t.segment(e)).map(function(e){return e.segment})}return function(e){for(var t,n=Pte(e),r=[];!(t=n.next()).done;)t.value&&r.push(t.value.slice());return r}(e)},Vte=function(e,t){return 0!==t.letterSpacing?zte(e):function(e,t){if(Hte.SUPPORT_NATIVE_TEXT_SEGMENTATION){var n=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(n.segment(e)).map(function(e){return e.segment})}return Wte(e,t)}(e,t)},$te=[32,160,4961,65792,65793,4153,4241],Wte=function(e,t){for(var n,r=function(e,t){var n=R6(e),r=W8(n,t),i=r[0],a=r[1],o=r[2],s=n.length,A=0,l=0;return{next:function(){if(l>=s)return{done:!0,value:null};for(var e=I8;l<s&&(e=$8(n,a,i,++l,o))===I8;);if(e!==I8||l===s){var t=new G8(n,e,A,l);return A=l,{value:t,done:!1}}return{done:!0,value:null}}}}(e,{lineBreak:t.lineBreak,wordBreak:"break-word"===t.overflowWrap?"break-word":t.wordBreak}),i=[],a=function(){if(n.value){var e=n.value.slice(),t=R6(e),r="";t.forEach(function(e){-1===$te.indexOf(e)?r+=K6(e):(r.length&&i.push(r),i.push(K6(e)),r="")}),r.length&&i.push(r)}};!(n=r.next()).done;)a();return i},Gte=function(){return function(e,t,n){this.text=qte(t.data,n.textTransform),this.textBounds=function(e,t,n,r){var i=Vte(t,n),a=[],o=0;return i.forEach(function(t){if(n.textDecorationLine.length||t.trim().length>0)if(Hte.SUPPORT_RANGE_BOUNDS){var i=Kte(r,o,t.length).getClientRects();if(i.length>1){var s=zte(t),A=0;s.forEach(function(t){a.push(new _te(t,H6.fromDOMRectList(e,Kte(r,A+o,t.length).getClientRects()))),A+=t.length})}else a.push(new _te(t,H6.fromDOMRectList(e,i)))}else{var l=r.splitText(t.length);a.push(new _te(t,Rte(e,r))),r=l}else Hte.SUPPORT_RANGE_BOUNDS||(r=r.splitText(t.length));o+=t.length}),a}(e,this.text,n,t)}}(),qte=function(e,t){switch(t){case 1:return e.toLowerCase();case 3:return e.replace(Xte,Yte);case 2:return e.toUpperCase();default:return e}},Xte=/(^|\s|:|-|\(|\))([a-z])/g,Yte=function(e,t,n){return e.length>0?t+n.toUpperCase():e},Jte=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.src=n.currentSrc||n.src,r.intrinsicWidth=n.naturalWidth,r.intrinsicHeight=n.naturalHeight,r.context.cache.addImage(r.src),r}return T6(t,e),t}(mte),Zte=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.canvas=n,r.intrinsicWidth=n.width,r.intrinsicHeight=n.height,r}return T6(t,e),t}(mte),ene=function(e){function t(t,n){var r=e.call(this,t,n)||this,i=new XMLSerializer,a=_6(t,n);return n.setAttribute("width",a.width+"px"),n.setAttribute("height",a.height+"px"),r.svg="data:image/svg+xml,"+encodeURIComponent(i.serializeToString(n)),r.intrinsicWidth=n.width.baseVal.value,r.intrinsicHeight=n.height.baseVal.value,r.context.cache.addImage(r.svg),r}return T6(t,e),t}(mte),tne=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.value=n.value,r}return T6(t,e),t}(mte),nne=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.start=n.start,r.reversed="boolean"==typeof n.reversed&&!0===n.reversed,r}return T6(t,e),t}(mte),rne=[{type:15,flags:0,unit:"px",number:3}],ine=[{type:16,flags:0,number:50}],ane="checkbox",one="radio",sne="password",Ane=707406591,lne=function(e){function t(t,n){var r,i,a,o=e.call(this,t,n)||this;switch(o.type=n.type.toLowerCase(),o.checked=n.checked,o.value=0===(i=(r=n).type===sne?new Array(r.value.length+1).join("•"):r.value).length?r.placeholder||"":i,o.type!==ane&&o.type!==one||(o.styles.backgroundColor=3739148031,o.styles.borderTopColor=o.styles.borderRightColor=o.styles.borderBottomColor=o.styles.borderLeftColor=2779096575,o.styles.borderTopWidth=o.styles.borderRightWidth=o.styles.borderBottomWidth=o.styles.borderLeftWidth=1,o.styles.borderTopStyle=o.styles.borderRightStyle=o.styles.borderBottomStyle=o.styles.borderLeftStyle=1,o.styles.backgroundClip=[0],o.styles.backgroundOrigin=[0],o.bounds=(a=o.bounds).width>a.height?new H6(a.left+(a.width-a.height)/2,a.top,a.height,a.height):a.width<a.height?new H6(a.left,a.top+(a.height-a.width)/2,a.width,a.width):a),o.type){case ane:o.styles.borderTopRightRadius=o.styles.borderTopLeftRadius=o.styles.borderBottomRightRadius=o.styles.borderBottomLeftRadius=rne;break;case one:o.styles.borderTopRightRadius=o.styles.borderTopLeftRadius=o.styles.borderBottomRightRadius=o.styles.borderBottomLeftRadius=ine}return o}return T6(t,e),t}(mte),cne=function(e){function t(t,n){var r=e.call(this,t,n)||this,i=n.options[n.selectedIndex||0];return r.value=i&&i.text||"",r}return T6(t,e),t}(mte),une=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.value=n.value,r}return T6(t,e),t}(mte),dne=function(e){function t(t,n){var r=e.call(this,t,n)||this;r.src=n.src,r.width=parseInt(n.width,10)||0,r.height=parseInt(n.height,10)||0,r.backgroundColor=r.styles.backgroundColor;try{if(n.contentWindow&&n.contentWindow.document&&n.contentWindow.document.documentElement){r.tree=mne(t,n.contentWindow.document.documentElement);var i=n.contentWindow.document.documentElement?l7(t,getComputedStyle(n.contentWindow.document.documentElement).backgroundColor):c7.TRANSPARENT,a=n.contentWindow.document.body?l7(t,getComputedStyle(n.contentWindow.document.body).backgroundColor):c7.TRANSPARENT;r.backgroundColor=t7(i)?t7(a)?r.styles.backgroundColor:a:i}}catch(qX){}return r}return T6(t,e),t}(mte),hne=["OL","UL","MENU"],pne=function(e,t,n,r){for(var i=t.firstChild,a=void 0;i;i=a)if(a=i.nextSibling,vne(i)&&i.data.trim().length>0)n.textNodes.push(new Gte(e,i,n.styles));else if(wne(i))if(Tne(i)&&i.assignedNodes)i.assignedNodes().forEach(function(t){return pne(e,t,n,r)});else{var o=fne(e,i);o.styles.isVisible()&&(gne(i,o,r)?o.flags|=4:yne(o.styles)&&(o.flags|=2),-1!==hne.indexOf(i.tagName)&&(o.flags|=8),n.elements.push(o),i.slot,i.shadowRoot?pne(e,i.shadowRoot,o,r):Nne(i)||kne(i)||Ine(i)||pne(e,i,o,r))}},fne=function(e,t){return jne(t)?new Jte(e,t):Fne(t)?new Zte(e,t):kne(t)?new ene(e,t):Bne(t)?new tne(e,t):Cne(t)?new nne(e,t):Ene(t)?new lne(e,t):Ine(t)?new cne(e,t):Nne(t)?new une(e,t):Une(t)?new dne(e,t):new mte(e,t)},mne=function(e,t){var n=fne(e,t);return n.flags|=4,pne(e,t,n,n),n},gne=function(e,t,n){return t.styles.isPositionedWithZIndex()||t.styles.opacity<1||t.styles.isTransformed()||Sne(e)&&n.styles.isTransparent()},yne=function(e){return e.isPositioned()||e.isFloating()},vne=function(e){return e.nodeType===Node.TEXT_NODE},wne=function(e){return e.nodeType===Node.ELEMENT_NODE},xne=function(e){return wne(e)&&void 0!==e.style&&!bne(e)},bne=function(e){return"object"==typeof e.className},Bne=function(e){return"LI"===e.tagName},Cne=function(e){return"OL"===e.tagName},Ene=function(e){return"INPUT"===e.tagName},kne=function(e){return"svg"===e.tagName},Sne=function(e){return"BODY"===e.tagName},Fne=function(e){return"CANVAS"===e.tagName},Qne=function(e){return"VIDEO"===e.tagName},jne=function(e){return"IMG"===e.tagName},Une=function(e){return"IFRAME"===e.tagName},One=function(e){return"STYLE"===e.tagName},Nne=function(e){return"TEXTAREA"===e.tagName},Ine=function(e){return"SELECT"===e.tagName},Tne=function(e){return"SLOT"===e.tagName},Pne=function(e){return e.tagName.indexOf("-")>0},Mne=function(){function e(){this.counters={}}return e.prototype.getCounterValue=function(e){var t=this.counters[e];return t&&t.length?t[t.length-1]:1},e.prototype.getCounterValues=function(e){var t=this.counters[e];return t||[]},e.prototype.pop=function(e){var t=this;e.forEach(function(e){return t.counters[e].pop()})},e.prototype.parse=function(e){var t=this,n=e.counterIncrement,r=e.counterReset,i=!0;null!==n&&n.forEach(function(e){var n=t.counters[e.counter];n&&0!==e.increment&&(i=!1,n.length||n.push(1),n[Math.max(0,n.length-1)]+=e.increment)});var a=[];return i&&r.forEach(function(e){var n=t.counters[e.counter];a.push(e.counter),n||(n=t.counters[e.counter]=[]),n.push(e.reset)}),a},e}(),Dne={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},Lne={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},Hne={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},_ne={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},Rne=function(e,t,n,r,i,a){return e<t||e>n?Yne(e,i,a.length>0):r.integers.reduce(function(t,n,i){for(;e>=n;)e-=n,t+=r.values[i];return t},"")+a},Kne=function(e,t,n,r){var i="";do{n||e--,i=r(e)+i,e/=t}while(e*t>=t);return i},zne=function(e,t,n,r,i){var a=n-t+1;return(e<0?"-":"")+(Kne(Math.abs(e),a,r,function(e){return K6(Math.floor(e%a)+t)})+i)},Vne=function(e,t,n){void 0===n&&(n=". ");var r=t.length;return Kne(Math.abs(e),r,!1,function(e){return t[Math.floor(e%r)]})+n},$ne=function(e,t,n,r,i,a){if(e<-9999||e>9999)return Yne(e,4,i.length>0);var o=Math.abs(e),s=i;if(0===o)return t[0]+s;for(var A=0;o>0&&A<=4;A++){var l=o%10;0===l&&ete(a,1)&&""!==s?s=t[l]+s:l>1||1===l&&0===A||1===l&&1===A&&ete(a,2)||1===l&&1===A&&ete(a,4)&&e>100||1===l&&A>1&&ete(a,8)?s=t[l]+(A>0?n[A-1]:"")+s:1===l&&A>0&&(s=n[A-1]+s),o=Math.floor(o/10)}return(e<0?r:"")+s},Wne="十百千萬",Gne="拾佰仟萬",qne="マイナス",Xne="마이너스",Yne=function(e,t,n){var r=n?". ":"",i=n?"、":"",a=n?", ":"",o=n?" ":"";switch(t){case 0:return"•"+o;case 1:return"◦"+o;case 2:return"◾"+o;case 5:var s=zne(e,48,57,!0,r);return s.length<4?"0"+s:s;case 4:return Vne(e,"〇一二三四五六七八九",i);case 6:return Rne(e,1,3999,Dne,3,r).toLowerCase();case 7:return Rne(e,1,3999,Dne,3,r);case 8:return zne(e,945,969,!1,r);case 9:return zne(e,97,122,!1,r);case 10:return zne(e,65,90,!1,r);case 11:return zne(e,1632,1641,!0,r);case 12:case 49:return Rne(e,1,9999,Lne,3,r);case 35:return Rne(e,1,9999,Lne,3,r).toLowerCase();case 13:return zne(e,2534,2543,!0,r);case 14:case 30:return zne(e,6112,6121,!0,r);case 15:return Vne(e,"子丑寅卯辰巳午未申酉戌亥",i);case 16:return Vne(e,"甲乙丙丁戊己庚辛壬癸",i);case 17:case 48:return $ne(e,"零一二三四五六七八九",Wne,"負",i,14);case 47:return $ne(e,"零壹貳參肆伍陸柒捌玖",Gne,"負",i,15);case 42:return $ne(e,"零一二三四五六七八九",Wne,"负",i,14);case 41:return $ne(e,"零壹贰叁肆伍陆柒捌玖",Gne,"负",i,15);case 26:return $ne(e,"〇一二三四五六七八九","十百千万",qne,i,0);case 25:return $ne(e,"零壱弐参四伍六七八九","拾百千万",qne,i,7);case 31:return $ne(e,"영일이삼사오육칠팔구","십백천만",Xne,a,7);case 33:return $ne(e,"零一二三四五六七八九","十百千萬",Xne,a,0);case 32:return $ne(e,"零壹貳參四五六七八九","拾百千",Xne,a,7);case 18:return zne(e,2406,2415,!0,r);case 20:return Rne(e,1,19999,_ne,3,r);case 21:return zne(e,2790,2799,!0,r);case 22:return zne(e,2662,2671,!0,r);case 22:return Rne(e,1,10999,Hne,3,r);case 23:return Vne(e,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case 24:return Vne(e,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case 27:return zne(e,3302,3311,!0,r);case 28:return Vne(e,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",i);case 29:return Vne(e,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",i);case 34:return zne(e,3792,3801,!0,r);case 37:return zne(e,6160,6169,!0,r);case 38:return zne(e,4160,4169,!0,r);case 39:return zne(e,2918,2927,!0,r);case 40:return zne(e,1776,1785,!0,r);case 43:return zne(e,3046,3055,!0,r);case 44:return zne(e,3174,3183,!0,r);case 45:return zne(e,3664,3673,!0,r);case 46:return zne(e,3872,3881,!0,r);default:return zne(e,48,57,!0,r)}},Jne="data-html2canvas-ignore",Zne=function(){function e(e,t,n){if(this.context=e,this.options=n,this.scrolledElements=[],this.referenceElement=t,this.counters=new Mne,this.quoteDepth=0,!t.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(t.ownerDocument.documentElement,!1)}return e.prototype.toIFrame=function(e,t){var n=this,r=nre(e,t);if(!r.contentWindow)return Promise.reject("Unable to find iframe window");var i=e.defaultView.pageXOffset,a=e.defaultView.pageYOffset,o=r.contentWindow,s=o.document,A=are(r).then(function(){return M6(n,0,void 0,function(){var e,n;return D6(this,function(i){switch(i.label){case 0:return this.scrolledElements.forEach(cre),o&&(o.scrollTo(t.left,t.top),!/(iPad|iPhone|iPod)/g.test(navigator.userAgent)||o.scrollY===t.top&&o.scrollX===t.left||(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(o.scrollX-t.left,o.scrollY-t.top,0,0))),e=this.options.onclone,void 0===(n=this.clonedReferenceElement)?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:s.fonts&&s.fonts.ready?[4,s.fonts.ready]:[3,2];case 1:i.sent(),i.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,ire(s)]:[3,4];case 3:i.sent(),i.label=4;case 4:return"function"==typeof e?[2,Promise.resolve().then(function(){return e(s,n)}).then(function(){return r})]:[2,r]}})})});return s.open(),s.write(Are(document.doctype)+"<html></html>"),lre(this.referenceElement.ownerDocument,i,a),s.replaceChild(s.adoptNode(this.documentElement),s.documentElement),s.close(),A},e.prototype.createElementClone=function(e){if(fte(e,2),Fne(e))return this.createCanvasClone(e);if(Qne(e))return this.createVideoClone(e);if(One(e))return this.createStyleClone(e);var t=e.cloneNode(!1);return jne(t)&&(jne(e)&&e.currentSrc&&e.currentSrc!==e.src&&(t.src=e.currentSrc,t.srcset=""),"lazy"===t.loading&&(t.loading="eager")),Pne(t)?this.createCustomElementClone(t):t},e.prototype.createCustomElementClone=function(e){var t=document.createElement("html2canvascustomelement");return sre(e.style,t),t},e.prototype.createStyleClone=function(e){try{var t=e.sheet;if(t&&t.cssRules){var n=[].slice.call(t.cssRules,0).reduce(function(e,t){return t&&"string"==typeof t.cssText?e+t.cssText:e},""),r=e.cloneNode(!1);return r.textContent=n,r}}catch(qX){if(this.context.logger.error("Unable to access cssRules property",qX),"SecurityError"!==qX.name)throw qX}return e.cloneNode(!1)},e.prototype.createCanvasClone=function(e){var t;if(this.options.inlineImages&&e.ownerDocument){var n=e.ownerDocument.createElement("img");try{return n.src=e.toDataURL(),n}catch(qX){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",e)}}var r=e.cloneNode(!1);try{r.width=e.width,r.height=e.height;var i=e.getContext("2d"),a=r.getContext("2d");if(a)if(!this.options.allowTaint&&i)a.putImageData(i.getImageData(0,0,e.width,e.height),0,0);else{var o=null!==(t=e.getContext("webgl2"))&&void 0!==t?t:e.getContext("webgl");if(o){var s=o.getContextAttributes();!1===(null==s?void 0:s.preserveDrawingBuffer)&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",e)}a.drawImage(e,0,0)}return r}catch(qX){this.context.logger.info("Unable to clone canvas as it is tainted",e)}return r},e.prototype.createVideoClone=function(e){var t=e.ownerDocument.createElement("canvas");t.width=e.offsetWidth,t.height=e.offsetHeight;var n=t.getContext("2d");try{return n&&(n.drawImage(e,0,0,t.width,t.height),this.options.allowTaint||n.getImageData(0,0,t.width,t.height)),t}catch(qX){this.context.logger.info("Unable to clone video as it is tainted",e)}var r=e.ownerDocument.createElement("canvas");return r.width=e.offsetWidth,r.height=e.offsetHeight,r},e.prototype.appendChildNode=function(e,t,n){wne(t)&&("SCRIPT"===t.tagName||t.hasAttribute(Jne)||"function"==typeof this.options.ignoreElements&&this.options.ignoreElements(t))||this.options.copyStyles&&wne(t)&&One(t)||e.appendChild(this.cloneNode(t,n))},e.prototype.cloneChildNodes=function(e,t,n){for(var r=this,i=e.shadowRoot?e.shadowRoot.firstChild:e.firstChild;i;i=i.nextSibling)if(wne(i)&&Tne(i)&&"function"==typeof i.assignedNodes){var a=i.assignedNodes();a.length&&a.forEach(function(e){return r.appendChildNode(t,e,n)})}else this.appendChildNode(t,i,n)},e.prototype.cloneNode=function(e,t){if(vne(e))return document.createTextNode(e.data);if(!e.ownerDocument)return e.cloneNode(!1);var n=e.ownerDocument.defaultView;if(n&&wne(e)&&(xne(e)||bne(e))){var r=this.createElementClone(e);r.style.transitionProperty="none";var i=n.getComputedStyle(e),a=n.getComputedStyle(e,":before"),o=n.getComputedStyle(e,":after");this.referenceElement===e&&xne(r)&&(this.clonedReferenceElement=r),Sne(r)&&pre(r);var s=this.counters.parse(new hte(this.context,i)),A=this.resolvePseudoContent(e,r,a,Ete.BEFORE);Pne(e)&&(t=!0),Qne(e)||this.cloneChildNodes(e,r,t),A&&r.insertBefore(A,r.firstChild);var l=this.resolvePseudoContent(e,r,o,Ete.AFTER);return l&&r.appendChild(l),this.counters.pop(s),(i&&(this.options.copyStyles||bne(e))&&!Une(e)||t)&&sre(i,r),0===e.scrollTop&&0===e.scrollLeft||this.scrolledElements.push([r,e.scrollLeft,e.scrollTop]),(Nne(e)||Ine(e))&&(Nne(r)||Ine(r))&&(r.value=e.value),r}return e.cloneNode(!1)},e.prototype.resolvePseudoContent=function(e,t,n,r){var i=this;if(n){var a=n.content,o=t.ownerDocument;if(o&&a&&"none"!==a&&"-moz-alt-content"!==a&&"none"!==n.display){this.counters.parse(new hte(this.context,n));var s=new dte(this.context,n),A=o.createElement("html2canvaspseudoelement");sre(n,A),s.content.forEach(function(t){if(0===t.type)A.appendChild(o.createTextNode(t.value));else if(22===t.type){var n=o.createElement("img");n.src=t.value,n.style.opacity="1",A.appendChild(n)}else if(18===t.type){if("attr"===t.name){var r=t.values.filter(N9);r.length&&A.appendChild(o.createTextNode(e.getAttribute(r[0].value)||""))}else if("counter"===t.name){var a=t.values.filter(M9),l=a[0],c=a[1];if(l&&N9(l)){var u=i.counters.getCounterValue(l.value),d=c&&N9(c)?wee.parse(i.context,c.value):3;A.appendChild(o.createTextNode(Yne(u,d,!1)))}}else if("counters"===t.name){var h=t.values.filter(M9),p=(l=h[0],h[1]);c=h[2];if(l&&N9(l)){var f=i.counters.getCounterValues(l.value),m=c&&N9(c)?wee.parse(i.context,c.value):3,g=p&&0===p.type?p.value:"",y=f.map(function(e){return Yne(e,m,!1)}).join(g);A.appendChild(o.createTextNode(y))}}}else if(20===t.type)switch(t.value){case"open-quote":A.appendChild(o.createTextNode(ote(s.quotes,i.quoteDepth++,!0)));break;case"close-quote":A.appendChild(o.createTextNode(ote(s.quotes,--i.quoteDepth,!1)));break;default:A.appendChild(o.createTextNode(t.value))}}),A.className=ure+" "+dre;var l=r===Ete.BEFORE?" "+ure:" "+dre;return bne(t)?t.className.baseValue+=l:t.className+=l,A}}},e.destroy=function(e){return!!e.parentNode&&(e.parentNode.removeChild(e),!0)},e}();(kte=Ete||(Ete={}))[kte.BEFORE=0]="BEFORE",kte[kte.AFTER=1]="AFTER";var ere,tre,nre=function(e,t){var n=e.createElement("iframe");return n.className="html2canvas-container",n.style.visibility="hidden",n.style.position="fixed",n.style.left="-10000px",n.style.top="0px",n.style.border="0",n.width=t.width.toString(),n.height=t.height.toString(),n.scrolling="no",n.setAttribute(Jne,"true"),e.body.appendChild(n),n},rre=function(e){return new Promise(function(t){e.complete?t():e.src?(e.onload=t,e.onerror=t):t()})},ire=function(e){return Promise.all([].slice.call(e.images,0).map(rre))},are=function(e){return new Promise(function(t,n){var r=e.contentWindow;if(!r)return n("No window assigned for iframe");var i=r.document;r.onload=e.onload=function(){r.onload=e.onload=null;var n=setInterval(function(){i.body.childNodes.length>0&&"complete"===i.readyState&&(clearInterval(n),t(e))},50)}})},ore=["all","d","content"],sre=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e.item(n);-1===ore.indexOf(r)&&t.style.setProperty(r,e.getPropertyValue(r))}return t},Are=function(e){var t="";return e&&(t+="<!DOCTYPE ",e.name&&(t+=e.name),e.internalSubset&&(t+=e.internalSubset),e.publicId&&(t+='"'+e.publicId+'"'),e.systemId&&(t+='"'+e.systemId+'"'),t+=">"),t},lre=function(e,t,n){e&&e.defaultView&&(t!==e.defaultView.pageXOffset||n!==e.defaultView.pageYOffset)&&e.defaultView.scrollTo(t,n)},cre=function(e){var t=e[0],n=e[1],r=e[2];t.scrollLeft=n,t.scrollTop=r},ure="___html2canvas___pseudoelement_before",dre="___html2canvas___pseudoelement_after",hre='{\n content: "" !important;\n display: none !important;\n}',pre=function(e){fre(e,"."+ure+":before"+hre+"\n ."+dre+":after"+hre)},fre=function(e,t){var n=e.ownerDocument;if(n){var r=n.createElement("style");r.textContent=t,e.appendChild(r)}},mre=function(){function e(){}return e.getOrigin=function(t){var n=e._link;return n?(n.href=t,n.href=n.href,n.protocol+n.hostname+n.port):"about:blank"},e.isSameOrigin=function(t){return e.getOrigin(t)===e._origin},e.setContext=function(t){e._link=t.document.createElement("a"),e._origin=e.getOrigin(t.location.href)},e._origin="about:blank",e}(),gre=function(){function e(e,t){this.context=e,this._options=t,this._cache={}}return e.prototype.addImage=function(e){var t=Promise.resolve();return this.has(e)?t:Cre(e)||xre(e)?((this._cache[e]=this.loadImage(e)).catch(function(){}),t):t},e.prototype.match=function(e){return this._cache[e]},e.prototype.loadImage=function(e){return M6(this,0,void 0,function(){var t,n,r,i,a=this;return D6(this,function(o){switch(o.label){case 0:return t=mre.isSameOrigin(e),n=!bre(e)&&!0===this._options.useCORS&&Hte.SUPPORT_CORS_IMAGES&&!t,r=!bre(e)&&!t&&!Cre(e)&&"string"==typeof this._options.proxy&&Hte.SUPPORT_CORS_XHR&&!n,t||!1!==this._options.allowTaint||bre(e)||Cre(e)||r||n?(i=e,r?[4,this.proxy(i)]:[3,2]):[2];case 1:i=o.sent(),o.label=2;case 2:return this.context.logger.debug("Added image "+e.substring(0,256)),[4,new Promise(function(e,t){var r=new Image;r.onload=function(){return e(r)},r.onerror=t,(Bre(i)||n)&&(r.crossOrigin="anonymous"),r.src=i,!0===r.complete&&setTimeout(function(){return e(r)},500),a._options.imageTimeout>0&&setTimeout(function(){return t("Timed out ("+a._options.imageTimeout+"ms) loading image")},a._options.imageTimeout)})];case 3:return[2,o.sent()]}})})},e.prototype.has=function(e){return void 0!==this._cache[e]},e.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},e.prototype.proxy=function(e){var t=this,n=this._options.proxy;if(!n)throw new Error("No proxy defined");var r=e.substring(0,256);return new Promise(function(i,a){var o=Hte.SUPPORT_RESPONSE_TYPE?"blob":"text",s=new XMLHttpRequest;s.onload=function(){if(200===s.status)if("text"===o)i(s.response);else{var e=new FileReader;e.addEventListener("load",function(){return i(e.result)},!1),e.addEventListener("error",function(e){return a(e)},!1),e.readAsDataURL(s.response)}else a("Failed to proxy resource "+r+" with status code "+s.status)},s.onerror=a;var A=n.indexOf("?")>-1?"&":"?";if(s.open("GET",""+n+A+"url="+encodeURIComponent(e)+"&responseType="+o),"text"!==o&&s instanceof XMLHttpRequest&&(s.responseType=o),t._options.imageTimeout){var l=t._options.imageTimeout;s.timeout=l,s.ontimeout=function(){return a("Timed out ("+l+"ms) proxying "+r)}}s.send()})},e}(),yre=/^data:image\/svg\+xml/i,vre=/^data:image\/.*;base64,/i,wre=/^data:image\/.*/i,xre=function(e){return Hte.SUPPORT_SVG_DRAWING||!Ere(e)},bre=function(e){return wre.test(e)},Bre=function(e){return vre.test(e)},Cre=function(e){return"blob"===e.substr(0,4)},Ere=function(e){return"svg"===e.substr(-3).toLowerCase()||yre.test(e)},kre=function(){function e(e,t){this.type=0,this.x=e,this.y=t}return e.prototype.add=function(t,n){return new e(this.x+t,this.y+n)},e}(),Sre=function(e,t,n){return new kre(e.x+(t.x-e.x)*n,e.y+(t.y-e.y)*n)},Fre=function(){function e(e,t,n,r){this.type=1,this.start=e,this.startControl=t,this.endControl=n,this.end=r}return e.prototype.subdivide=function(t,n){var r=Sre(this.start,this.startControl,t),i=Sre(this.startControl,this.endControl,t),a=Sre(this.endControl,this.end,t),o=Sre(r,i,t),s=Sre(i,a,t),A=Sre(o,s,t);return n?new e(this.start,r,o,A):new e(A,s,a,this.end)},e.prototype.add=function(t,n){return new e(this.start.add(t,n),this.startControl.add(t,n),this.endControl.add(t,n),this.end.add(t,n))},e.prototype.reverse=function(){return new e(this.end,this.endControl,this.startControl,this.start)},e}(),Qre=function(e){return 1===e.type},jre=function(){return function(e){var t=e.styles,n=e.bounds,r=$9(t.borderTopLeftRadius,n.width,n.height),i=r[0],a=r[1],o=$9(t.borderTopRightRadius,n.width,n.height),s=o[0],A=o[1],l=$9(t.borderBottomRightRadius,n.width,n.height),c=l[0],u=l[1],d=$9(t.borderBottomLeftRadius,n.width,n.height),h=d[0],p=d[1],f=[];f.push((i+s)/n.width),f.push((h+c)/n.width),f.push((a+p)/n.height),f.push((A+u)/n.height);var m=Math.max.apply(Math,f);m>1&&(i/=m,a/=m,s/=m,A/=m,c/=m,u/=m,h/=m,p/=m);var g=n.width-s,y=n.height-u,v=n.width-c,w=n.height-p,x=t.borderTopWidth,b=t.borderRightWidth,B=t.borderBottomWidth,C=t.borderLeftWidth,E=W9(t.paddingTop,e.bounds.width),k=W9(t.paddingRight,e.bounds.width),S=W9(t.paddingBottom,e.bounds.width),F=W9(t.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=i>0||a>0?Ure(n.left+C/3,n.top+x/3,i-C/3,a-x/3,ere.TOP_LEFT):new kre(n.left+C/3,n.top+x/3),this.topRightBorderDoubleOuterBox=i>0||a>0?Ure(n.left+g,n.top+x/3,s-b/3,A-x/3,ere.TOP_RIGHT):new kre(n.left+n.width-b/3,n.top+x/3),this.bottomRightBorderDoubleOuterBox=c>0||u>0?Ure(n.left+v,n.top+y,c-b/3,u-B/3,ere.BOTTOM_RIGHT):new kre(n.left+n.width-b/3,n.top+n.height-B/3),this.bottomLeftBorderDoubleOuterBox=h>0||p>0?Ure(n.left+C/3,n.top+w,h-C/3,p-B/3,ere.BOTTOM_LEFT):new kre(n.left+C/3,n.top+n.height-B/3),this.topLeftBorderDoubleInnerBox=i>0||a>0?Ure(n.left+2*C/3,n.top+2*x/3,i-2*C/3,a-2*x/3,ere.TOP_LEFT):new kre(n.left+2*C/3,n.top+2*x/3),this.topRightBorderDoubleInnerBox=i>0||a>0?Ure(n.left+g,n.top+2*x/3,s-2*b/3,A-2*x/3,ere.TOP_RIGHT):new kre(n.left+n.width-2*b/3,n.top+2*x/3),this.bottomRightBorderDoubleInnerBox=c>0||u>0?Ure(n.left+v,n.top+y,c-2*b/3,u-2*B/3,ere.BOTTOM_RIGHT):new kre(n.left+n.width-2*b/3,n.top+n.height-2*B/3),this.bottomLeftBorderDoubleInnerBox=h>0||p>0?Ure(n.left+2*C/3,n.top+w,h-2*C/3,p-2*B/3,ere.BOTTOM_LEFT):new kre(n.left+2*C/3,n.top+n.height-2*B/3),this.topLeftBorderStroke=i>0||a>0?Ure(n.left+C/2,n.top+x/2,i-C/2,a-x/2,ere.TOP_LEFT):new kre(n.left+C/2,n.top+x/2),this.topRightBorderStroke=i>0||a>0?Ure(n.left+g,n.top+x/2,s-b/2,A-x/2,ere.TOP_RIGHT):new kre(n.left+n.width-b/2,n.top+x/2),this.bottomRightBorderStroke=c>0||u>0?Ure(n.left+v,n.top+y,c-b/2,u-B/2,ere.BOTTOM_RIGHT):new kre(n.left+n.width-b/2,n.top+n.height-B/2),this.bottomLeftBorderStroke=h>0||p>0?Ure(n.left+C/2,n.top+w,h-C/2,p-B/2,ere.BOTTOM_LEFT):new kre(n.left+C/2,n.top+n.height-B/2),this.topLeftBorderBox=i>0||a>0?Ure(n.left,n.top,i,a,ere.TOP_LEFT):new kre(n.left,n.top),this.topRightBorderBox=s>0||A>0?Ure(n.left+g,n.top,s,A,ere.TOP_RIGHT):new kre(n.left+n.width,n.top),this.bottomRightBorderBox=c>0||u>0?Ure(n.left+v,n.top+y,c,u,ere.BOTTOM_RIGHT):new kre(n.left+n.width,n.top+n.height),this.bottomLeftBorderBox=h>0||p>0?Ure(n.left,n.top+w,h,p,ere.BOTTOM_LEFT):new kre(n.left,n.top+n.height),this.topLeftPaddingBox=i>0||a>0?Ure(n.left+C,n.top+x,Math.max(0,i-C),Math.max(0,a-x),ere.TOP_LEFT):new kre(n.left+C,n.top+x),this.topRightPaddingBox=s>0||A>0?Ure(n.left+Math.min(g,n.width-b),n.top+x,g>n.width+b?0:Math.max(0,s-b),Math.max(0,A-x),ere.TOP_RIGHT):new kre(n.left+n.width-b,n.top+x),this.bottomRightPaddingBox=c>0||u>0?Ure(n.left+Math.min(v,n.width-C),n.top+Math.min(y,n.height-B),Math.max(0,c-b),Math.max(0,u-B),ere.BOTTOM_RIGHT):new kre(n.left+n.width-b,n.top+n.height-B),this.bottomLeftPaddingBox=h>0||p>0?Ure(n.left+C,n.top+Math.min(w,n.height-B),Math.max(0,h-C),Math.max(0,p-B),ere.BOTTOM_LEFT):new kre(n.left+C,n.top+n.height-B),this.topLeftContentBox=i>0||a>0?Ure(n.left+C+F,n.top+x+E,Math.max(0,i-(C+F)),Math.max(0,a-(x+E)),ere.TOP_LEFT):new kre(n.left+C+F,n.top+x+E),this.topRightContentBox=s>0||A>0?Ure(n.left+Math.min(g,n.width+C+F),n.top+x+E,g>n.width+C+F?0:s-C+F,A-(x+E),ere.TOP_RIGHT):new kre(n.left+n.width-(b+k),n.top+x+E),this.bottomRightContentBox=c>0||u>0?Ure(n.left+Math.min(v,n.width-(C+F)),n.top+Math.min(y,n.height+x+E),Math.max(0,c-(b+k)),u-(B+S),ere.BOTTOM_RIGHT):new kre(n.left+n.width-(b+k),n.top+n.height-(B+S)),this.bottomLeftContentBox=h>0||p>0?Ure(n.left+C+F,n.top+w,Math.max(0,h-(C+F)),p-(B+S),ere.BOTTOM_LEFT):new kre(n.left+C+F,n.top+n.height-(B+S))}}();(tre=ere||(ere={}))[tre.TOP_LEFT=0]="TOP_LEFT",tre[tre.TOP_RIGHT=1]="TOP_RIGHT",tre[tre.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",tre[tre.BOTTOM_LEFT=3]="BOTTOM_LEFT";var Ure=function(e,t,n,r,i){var a=(Math.sqrt(2)-1)/3*4,o=n*a,s=r*a,A=e+n,l=t+r;switch(i){case ere.TOP_LEFT:return new Fre(new kre(e,l),new kre(e,l-s),new kre(A-o,t),new kre(A,t));case ere.TOP_RIGHT:return new Fre(new kre(e,t),new kre(e+o,t),new kre(A,l-s),new kre(A,l));case ere.BOTTOM_RIGHT:return new Fre(new kre(A,t),new kre(A,t+s),new kre(e+o,l),new kre(e,l));case ere.BOTTOM_LEFT:default:return new Fre(new kre(A,l),new kre(A-o,l),new kre(e,t+s),new kre(e,t))}},Ore=function(e){return[e.topLeftBorderBox,e.topRightBorderBox,e.bottomRightBorderBox,e.bottomLeftBorderBox]},Nre=function(e){return[e.topLeftPaddingBox,e.topRightPaddingBox,e.bottomRightPaddingBox,e.bottomLeftPaddingBox]},Ire=function(){return function(e,t,n){this.offsetX=e,this.offsetY=t,this.matrix=n,this.type=0,this.target=6}}(),Tre=function(){return function(e,t){this.path=e,this.target=t,this.type=1}}(),Pre=function(){return function(e){this.opacity=e,this.type=2,this.target=6}}(),Mre=function(e){return 1===e.type},Dre=function(e,t){return e.length===t.length&&e.some(function(e,n){return e===t[n]})},Lre=function(){return function(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}}(),Hre=function(){function e(e,t){if(this.container=e,this.parent=t,this.effects=[],this.curves=new jre(this.container),this.container.styles.opacity<1&&this.effects.push(new Pre(this.container.styles.opacity)),null!==this.container.styles.transform){var n=this.container.bounds.left+this.container.styles.transformOrigin[0].number,r=this.container.bounds.top+this.container.styles.transformOrigin[1].number,i=this.container.styles.transform;this.effects.push(new Ire(n,r,i))}if(0!==this.container.styles.overflowX){var a=Ore(this.curves),o=Nre(this.curves);Dre(a,o)?this.effects.push(new Tre(a,6)):(this.effects.push(new Tre(a,2)),this.effects.push(new Tre(o,4)))}}return e.prototype.getEffects=function(e){for(var t=-1===[2,3].indexOf(this.container.styles.position),n=this.parent,r=this.effects.slice(0);n;){var i=n.effects.filter(function(e){return!Mre(e)});if(t||0!==n.container.styles.position||!n.parent){if(r.unshift.apply(r,i),t=-1===[2,3].indexOf(n.container.styles.position),0!==n.container.styles.overflowX){var a=Ore(n.curves),o=Nre(n.curves);Dre(a,o)||r.unshift(new Tre(o,6))}}else r.unshift.apply(r,i);n=n.parent}return r.filter(function(t){return ete(t.target,e)})},e}(),_re=function(e,t,n,r){e.container.elements.forEach(function(i){var a=ete(i.flags,4),o=ete(i.flags,2),s=new Hre(i,e);ete(i.styles.display,2048)&&r.push(s);var A=ete(i.flags,8)?[]:r;if(a||o){var l=a||i.styles.isPositioned()?n:t,c=new Lre(s);if(i.styles.isPositioned()||i.styles.opacity<1||i.styles.isTransformed()){var u=i.styles.zIndex.order;if(u<0){var d=0;l.negativeZIndex.some(function(e,t){return u>e.element.container.styles.zIndex.order?(d=t,!1):d>0}),l.negativeZIndex.splice(d,0,c)}else if(u>0){var h=0;l.positiveZIndex.some(function(e,t){return u>=e.element.container.styles.zIndex.order?(h=t+1,!1):h>0}),l.positiveZIndex.splice(h,0,c)}else l.zeroOrAutoZIndexOrTransformedOrOpacity.push(c)}else i.styles.isFloating()?l.nonPositionedFloats.push(c):l.nonPositionedInlineLevel.push(c);_re(s,c,a?c:n,A)}else i.styles.isInlineLevel()?t.inlineLevel.push(s):t.nonInlineLevel.push(s),_re(s,t,n,A);ete(i.flags,8)&&Rre(i,A)})},Rre=function(e,t){for(var n=e instanceof nne?e.start:1,r=e instanceof nne&&e.reversed,i=0;i<t.length;i++){var a=t[i];a.container instanceof tne&&"number"==typeof a.container.value&&0!==a.container.value&&(n=a.container.value),a.listValue=Yne(n,a.container.styles.listStyleType,!0),n+=r?-1:1}},Kre=function(e,t){switch(t){case 0:return Vre(e.topLeftBorderBox,e.topLeftPaddingBox,e.topRightBorderBox,e.topRightPaddingBox);case 1:return Vre(e.topRightBorderBox,e.topRightPaddingBox,e.bottomRightBorderBox,e.bottomRightPaddingBox);case 2:return Vre(e.bottomRightBorderBox,e.bottomRightPaddingBox,e.bottomLeftBorderBox,e.bottomLeftPaddingBox);default:return Vre(e.bottomLeftBorderBox,e.bottomLeftPaddingBox,e.topLeftBorderBox,e.topLeftPaddingBox)}},zre=function(e,t){var n=[];return Qre(e)?n.push(e.subdivide(.5,!1)):n.push(e),Qre(t)?n.push(t.subdivide(.5,!0)):n.push(t),n},Vre=function(e,t,n,r){var i=[];return Qre(e)?i.push(e.subdivide(.5,!1)):i.push(e),Qre(n)?i.push(n.subdivide(.5,!0)):i.push(n),Qre(r)?i.push(r.subdivide(.5,!0).reverse()):i.push(r),Qre(t)?i.push(t.subdivide(.5,!1).reverse()):i.push(t),i},$re=function(e){var t=e.bounds,n=e.styles;return t.add(n.borderLeftWidth,n.borderTopWidth,-(n.borderRightWidth+n.borderLeftWidth),-(n.borderTopWidth+n.borderBottomWidth))},Wre=function(e){var t=e.styles,n=e.bounds,r=W9(t.paddingLeft,n.width),i=W9(t.paddingRight,n.width),a=W9(t.paddingTop,n.width),o=W9(t.paddingBottom,n.width);return n.add(r+t.borderLeftWidth,a+t.borderTopWidth,-(t.borderRightWidth+t.borderLeftWidth+r+i),-(t.borderTopWidth+t.borderBottomWidth+a+o))},Gre=function(e,t,n){var r,i,a=(r=Jre(e.styles.backgroundOrigin,t),i=e,0===r?i.bounds:2===r?Wre(i):$re(i)),o=function(e,t){return 0===e?t.bounds:2===e?Wre(t):$re(t)}(Jre(e.styles.backgroundClip,t),e),s=Yre(Jre(e.styles.backgroundSize,t),n,a),A=s[0],l=s[1],c=$9(Jre(e.styles.backgroundPosition,t),a.width-A,a.height-l);return[Zre(Jre(e.styles.backgroundRepeat,t),c,s,a,o),Math.round(a.left+c[0]),Math.round(a.top+c[1]),A,l]},qre=function(e){return N9(e)&&e.value===Q7.AUTO},Xre=function(e){return"number"==typeof e},Yre=function(e,t,n){var r=t[0],i=t[1],a=t[2],o=e[0],s=e[1];if(!o)return[0,0];if(_9(o)&&s&&_9(s))return[W9(o,n.width),W9(s,n.height)];var A=Xre(a);if(N9(o)&&(o.value===Q7.CONTAIN||o.value===Q7.COVER))return Xre(a)?n.width/n.height<a!=(o.value===Q7.COVER)?[n.width,n.width/a]:[n.height*a,n.height]:[n.width,n.height];var l=Xre(r),c=Xre(i),u=l||c;if(qre(o)&&(!s||qre(s)))return l&&c?[r,i]:A||u?u&&A?[l?r:i*a,c?i:r/a]:[l?r:n.width,c?i:n.height]:[n.width,n.height];if(A){var d=0,h=0;return _9(o)?d=W9(o,n.width):_9(s)&&(h=W9(s,n.height)),qre(o)?d=h*a:s&&!qre(s)||(h=d/a),[d,h]}var p=null,f=null;if(_9(o)?p=W9(o,n.width):s&&_9(s)&&(f=W9(s,n.height)),null===p||s&&!qre(s)||(f=l&&c?p/r*i:n.height),null!==f&&qre(o)&&(p=l&&c?f/i*r:n.width),null!==p&&null!==f)return[p,f];throw new Error("Unable to calculate background-size for element")},Jre=function(e,t){var n=e[t];return void 0===n?e[0]:n},Zre=function(e,t,n,r,i){var a=t[0],o=t[1],s=n[0],A=n[1];switch(e){case 2:return[new kre(Math.round(r.left),Math.round(r.top+o)),new kre(Math.round(r.left+r.width),Math.round(r.top+o)),new kre(Math.round(r.left+r.width),Math.round(A+r.top+o)),new kre(Math.round(r.left),Math.round(A+r.top+o))];case 3:return[new kre(Math.round(r.left+a),Math.round(r.top)),new kre(Math.round(r.left+a+s),Math.round(r.top)),new kre(Math.round(r.left+a+s),Math.round(r.height+r.top)),new kre(Math.round(r.left+a),Math.round(r.height+r.top))];case 1:return[new kre(Math.round(r.left+a),Math.round(r.top+o)),new kre(Math.round(r.left+a+s),Math.round(r.top+o)),new kre(Math.round(r.left+a+s),Math.round(r.top+o+A)),new kre(Math.round(r.left+a),Math.round(r.top+o+A))];default:return[new kre(Math.round(i.left),Math.round(i.top)),new kre(Math.round(i.left+i.width),Math.round(i.top)),new kre(Math.round(i.left+i.width),Math.round(i.height+i.top)),new kre(Math.round(i.left),Math.round(i.height+i.top))]}},eie="Hidden Text",tie=function(){function e(e){this._data={},this._document=e}return e.prototype.parseMetrics=function(e,t){var n=this._document.createElement("div"),r=this._document.createElement("img"),i=this._document.createElement("span"),a=this._document.body;n.style.visibility="hidden",n.style.fontFamily=e,n.style.fontSize=t,n.style.margin="0",n.style.padding="0",n.style.whiteSpace="nowrap",a.appendChild(n),r.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",r.width=1,r.height=1,r.style.margin="0",r.style.padding="0",r.style.verticalAlign="baseline",i.style.fontFamily=e,i.style.fontSize=t,i.style.margin="0",i.style.padding="0",i.appendChild(this._document.createTextNode(eie)),n.appendChild(i),n.appendChild(r);var o=r.offsetTop-i.offsetTop+2;n.removeChild(i),n.appendChild(this._document.createTextNode(eie)),n.style.lineHeight="normal",r.style.verticalAlign="super";var s=r.offsetTop-n.offsetTop+2;return a.removeChild(n),{baseline:o,middle:s}},e.prototype.getMetrics=function(e,t){var n=e+" "+t;return void 0===this._data[n]&&(this._data[n]=this.parseMetrics(e,t)),this._data[n]},e}(),nie=function(){return function(e,t){this.context=e,this.options=t}}(),rie=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r._activeEffects=[],r.canvas=n.canvas?n.canvas:document.createElement("canvas"),r.ctx=r.canvas.getContext("2d"),n.canvas||(r.canvas.width=Math.floor(n.width*n.scale),r.canvas.height=Math.floor(n.height*n.scale),r.canvas.style.width=n.width+"px",r.canvas.style.height=n.height+"px"),r.fontMetrics=new tie(document),r.ctx.scale(r.options.scale,r.options.scale),r.ctx.translate(-n.x,-n.y),r.ctx.textBaseline="bottom",r._activeEffects=[],r.context.logger.debug("Canvas renderer initialized ("+n.width+"x"+n.height+") with scale "+n.scale),r}return T6(t,e),t.prototype.applyEffects=function(e){for(var t=this;this._activeEffects.length;)this.popEffect();e.forEach(function(e){return t.applyEffect(e)})},t.prototype.applyEffect=function(e){this.ctx.save(),function(e){return 2===e.type}(e)&&(this.ctx.globalAlpha=e.opacity),function(e){return 0===e.type}(e)&&(this.ctx.translate(e.offsetX,e.offsetY),this.ctx.transform(e.matrix[0],e.matrix[1],e.matrix[2],e.matrix[3],e.matrix[4],e.matrix[5]),this.ctx.translate(-e.offsetX,-e.offsetY)),Mre(e)&&(this.path(e.path),this.ctx.clip()),this._activeEffects.push(e)},t.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},t.prototype.renderStack=function(e){return M6(this,0,void 0,function(){return D6(this,function(t){switch(t.label){case 0:return e.element.container.styles.isVisible()?[4,this.renderStackContent(e)]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}})})},t.prototype.renderNode=function(e){return M6(this,0,void 0,function(){return D6(this,function(t){switch(t.label){case 0:return ete(e.container.flags,16),e.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(e)]:[3,3];case 1:return t.sent(),[4,this.renderNodeContent(e)];case 2:t.sent(),t.label=3;case 3:return[2]}})})},t.prototype.renderTextWithLetterSpacing=function(e,t,n){var r=this;0===t?this.ctx.fillText(e.text,e.bounds.left,e.bounds.top+n):zte(e.text).reduce(function(t,i){return r.ctx.fillText(i,t,e.bounds.top+n),t+r.ctx.measureText(i).width},e.bounds.left)},t.prototype.createFontStyle=function(e){var t=e.fontVariant.filter(function(e){return"normal"===e||"small-caps"===e}).join(""),n=Aie(e.fontFamily).join(", "),r=U9(e.fontSize)?""+e.fontSize.number+e.fontSize.unit:e.fontSize.number+"px";return[[e.fontStyle,t,e.fontWeight,r,n].join(" "),n,r]},t.prototype.renderTextNode=function(e,t){return M6(this,0,void 0,function(){var n,r,i,a,o,s,A,l,c=this;return D6(this,function(u){return n=this.createFontStyle(t),r=n[0],i=n[1],a=n[2],this.ctx.font=r,this.ctx.direction=1===t.direction?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",o=this.fontMetrics.getMetrics(i,a),s=o.baseline,A=o.middle,l=t.paintOrder,e.textBounds.forEach(function(e){l.forEach(function(n){switch(n){case 0:c.ctx.fillStyle=n7(t.color),c.renderTextWithLetterSpacing(e,t.letterSpacing,s);var r=t.textShadow;r.length&&e.text.trim().length&&(r.slice(0).reverse().forEach(function(n){c.ctx.shadowColor=n7(n.color),c.ctx.shadowOffsetX=n.offsetX.number*c.options.scale,c.ctx.shadowOffsetY=n.offsetY.number*c.options.scale,c.ctx.shadowBlur=n.blur.number,c.renderTextWithLetterSpacing(e,t.letterSpacing,s)}),c.ctx.shadowColor="",c.ctx.shadowOffsetX=0,c.ctx.shadowOffsetY=0,c.ctx.shadowBlur=0),t.textDecorationLine.length&&(c.ctx.fillStyle=n7(t.textDecorationColor||t.color),t.textDecorationLine.forEach(function(t){switch(t){case 1:c.ctx.fillRect(e.bounds.left,Math.round(e.bounds.top+s),e.bounds.width,1);break;case 2:c.ctx.fillRect(e.bounds.left,Math.round(e.bounds.top),e.bounds.width,1);break;case 3:c.ctx.fillRect(e.bounds.left,Math.ceil(e.bounds.top+A),e.bounds.width,1)}}));break;case 1:t.webkitTextStrokeWidth&&e.text.trim().length&&(c.ctx.strokeStyle=n7(t.webkitTextStrokeColor),c.ctx.lineWidth=t.webkitTextStrokeWidth,c.ctx.lineJoin=window.chrome?"miter":"round",c.ctx.strokeText(e.text,e.bounds.left,e.bounds.top+s)),c.ctx.strokeStyle="",c.ctx.lineWidth=0,c.ctx.lineJoin="miter"}})}),[2]})})},t.prototype.renderReplacedElement=function(e,t,n){if(n&&e.intrinsicWidth>0&&e.intrinsicHeight>0){var r=Wre(e),i=Nre(t);this.path(i),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(n,0,0,e.intrinsicWidth,e.intrinsicHeight,r.left,r.top,r.width,r.height),this.ctx.restore()}},t.prototype.renderNodeContent=function(e){return M6(this,0,void 0,function(){var n,r,i,a,o,s,A,l,c,u,d,h,p,f,m,g,y,v;return D6(this,function(w){switch(w.label){case 0:this.applyEffects(e.getEffects(4)),n=e.container,r=e.curves,i=n.styles,a=0,o=n.textNodes,w.label=1;case 1:return a<o.length?(s=o[a],[4,this.renderTextNode(s,i)]):[3,4];case 2:w.sent(),w.label=3;case 3:return a++,[3,1];case 4:if(!(n instanceof Jte))return[3,8];w.label=5;case 5:return w.trys.push([5,7,,8]),[4,this.context.cache.match(n.src)];case 6:return m=w.sent(),this.renderReplacedElement(n,r,m),[3,8];case 7:return w.sent(),this.context.logger.error("Error loading image "+n.src),[3,8];case 8:if(n instanceof Zte&&this.renderReplacedElement(n,r,n.canvas),!(n instanceof ene))return[3,12];w.label=9;case 9:return w.trys.push([9,11,,12]),[4,this.context.cache.match(n.svg)];case 10:return m=w.sent(),this.renderReplacedElement(n,r,m),[3,12];case 11:return w.sent(),this.context.logger.error("Error loading svg "+n.svg.substring(0,255)),[3,12];case 12:return n instanceof dne&&n.tree?[4,new t(this.context,{scale:this.options.scale,backgroundColor:n.backgroundColor,x:0,y:0,width:n.width,height:n.height}).render(n.tree)]:[3,14];case 13:A=w.sent(),n.width&&n.height&&this.ctx.drawImage(A,0,0,n.width,n.height,n.bounds.left,n.bounds.top,n.bounds.width,n.bounds.height),w.label=14;case 14:if(n instanceof lne&&(l=Math.min(n.bounds.width,n.bounds.height),n.type===ane?n.checked&&(this.ctx.save(),this.path([new kre(n.bounds.left+.39363*l,n.bounds.top+.79*l),new kre(n.bounds.left+.16*l,n.bounds.top+.5549*l),new kre(n.bounds.left+.27347*l,n.bounds.top+.44071*l),new kre(n.bounds.left+.39694*l,n.bounds.top+.5649*l),new kre(n.bounds.left+.72983*l,n.bounds.top+.23*l),new kre(n.bounds.left+.84*l,n.bounds.top+.34085*l),new kre(n.bounds.left+.39363*l,n.bounds.top+.79*l)]),this.ctx.fillStyle=n7(Ane),this.ctx.fill(),this.ctx.restore()):n.type===one&&n.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(n.bounds.left+l/2,n.bounds.top+l/2,l/4,0,2*Math.PI,!0),this.ctx.fillStyle=n7(Ane),this.ctx.fill(),this.ctx.restore())),iie(n)&&n.value.length){switch(c=this.createFontStyle(i),y=c[0],u=c[1],d=this.fontMetrics.getMetrics(y,u).baseline,this.ctx.font=y,this.ctx.fillStyle=n7(i.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=oie(n.styles.textAlign),v=Wre(n),h=0,n.styles.textAlign){case 1:h+=v.width/2;break;case 2:h+=v.width}p=v.add(h,0,0,-v.height/2+1),this.ctx.save(),this.path([new kre(v.left,v.top),new kre(v.left+v.width,v.top),new kre(v.left+v.width,v.top+v.height),new kre(v.left,v.top+v.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new _te(n.value,p),i.letterSpacing,d),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!ete(n.styles.display,2048))return[3,20];if(null===n.styles.listStyleImage)return[3,19];if(0!==(f=n.styles.listStyleImage).type)return[3,18];m=void 0,g=f.url,w.label=15;case 15:return w.trys.push([15,17,,18]),[4,this.context.cache.match(g)];case 16:return m=w.sent(),this.ctx.drawImage(m,n.bounds.left-(m.width+10),n.bounds.top),[3,18];case 17:return w.sent(),this.context.logger.error("Error loading list-style-image "+g),[3,18];case 18:return[3,20];case 19:e.listValue&&-1!==n.styles.listStyleType&&(y=this.createFontStyle(i)[0],this.ctx.font=y,this.ctx.fillStyle=n7(i.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",v=new H6(n.bounds.left,n.bounds.top+W9(n.styles.paddingTop,n.bounds.width),n.bounds.width,gee(i.lineHeight,i.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new _te(e.listValue,v),i.letterSpacing,gee(i.lineHeight,i.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),w.label=20;case 20:return[2]}})})},t.prototype.renderStackContent=function(e){return M6(this,0,void 0,function(){var t,n,r,i,a,o,s,A,l,c,u,d,h,p,f;return D6(this,function(m){switch(m.label){case 0:return ete(e.element.container.flags,16),[4,this.renderNodeBackgroundAndBorders(e.element)];case 1:m.sent(),t=0,n=e.negativeZIndex,m.label=2;case 2:return t<n.length?(f=n[t],[4,this.renderStack(f)]):[3,5];case 3:m.sent(),m.label=4;case 4:return t++,[3,2];case 5:return[4,this.renderNodeContent(e.element)];case 6:m.sent(),r=0,i=e.nonInlineLevel,m.label=7;case 7:return r<i.length?(f=i[r],[4,this.renderNode(f)]):[3,10];case 8:m.sent(),m.label=9;case 9:return r++,[3,7];case 10:a=0,o=e.nonPositionedFloats,m.label=11;case 11:return a<o.length?(f=o[a],[4,this.renderStack(f)]):[3,14];case 12:m.sent(),m.label=13;case 13:return a++,[3,11];case 14:s=0,A=e.nonPositionedInlineLevel,m.label=15;case 15:return s<A.length?(f=A[s],[4,this.renderStack(f)]):[3,18];case 16:m.sent(),m.label=17;case 17:return s++,[3,15];case 18:l=0,c=e.inlineLevel,m.label=19;case 19:return l<c.length?(f=c[l],[4,this.renderNode(f)]):[3,22];case 20:m.sent(),m.label=21;case 21:return l++,[3,19];case 22:u=0,d=e.zeroOrAutoZIndexOrTransformedOrOpacity,m.label=23;case 23:return u<d.length?(f=d[u],[4,this.renderStack(f)]):[3,26];case 24:m.sent(),m.label=25;case 25:return u++,[3,23];case 26:h=0,p=e.positiveZIndex,m.label=27;case 27:return h<p.length?(f=p[h],[4,this.renderStack(f)]):[3,30];case 28:m.sent(),m.label=29;case 29:return h++,[3,27];case 30:return[2]}})})},t.prototype.mask=function(e){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(e.slice(0).reverse()),this.ctx.closePath()},t.prototype.path=function(e){this.ctx.beginPath(),this.formatPath(e),this.ctx.closePath()},t.prototype.formatPath=function(e){var t=this;e.forEach(function(e,n){var r=Qre(e)?e.start:e;0===n?t.ctx.moveTo(r.x,r.y):t.ctx.lineTo(r.x,r.y),Qre(e)&&t.ctx.bezierCurveTo(e.startControl.x,e.startControl.y,e.endControl.x,e.endControl.y,e.end.x,e.end.y)})},t.prototype.renderRepeat=function(e,t,n,r){this.path(e),this.ctx.fillStyle=t,this.ctx.translate(n,r),this.ctx.fill(),this.ctx.translate(-n,-r)},t.prototype.resizeImage=function(e,t,n){var r;if(e.width===t&&e.height===n)return e;var i=(null!==(r=this.canvas.ownerDocument)&&void 0!==r?r:document).createElement("canvas");return i.width=Math.max(1,t),i.height=Math.max(1,n),i.getContext("2d").drawImage(e,0,0,e.width,e.height,0,0,t,n),i},t.prototype.renderBackgroundImage=function(e){return M6(this,0,void 0,function(){var t,n,r,i,a,o;return D6(this,function(s){switch(s.label){case 0:t=e.styles.backgroundImage.length-1,n=function(n){var i,a,o,s,A,l,c,u,d,h,p,f,m,g,y,v,w,x,b,B,C,E,k,S,F,Q,j,U,O,N,I;return D6(this,function(T){switch(T.label){case 0:if(0!==n.type)return[3,5];i=void 0,a=n.url,T.label=1;case 1:return T.trys.push([1,3,,4]),[4,r.context.cache.match(a)];case 2:return i=T.sent(),[3,4];case 3:return T.sent(),r.context.logger.error("Error loading background-image "+a),[3,4];case 4:return i&&(o=Gre(e,t,[i.width,i.height,i.width/i.height]),v=o[0],E=o[1],k=o[2],b=o[3],B=o[4],g=r.ctx.createPattern(r.resizeImage(i,b,B),"repeat"),r.renderRepeat(v,g,E,k)),[3,6];case 5:1===n.type?(s=Gre(e,t,[null,null,null]),v=s[0],E=s[1],k=s[2],b=s[3],B=s[4],A=f7(n.angle,b,B),l=A[0],c=A[1],u=A[2],d=A[3],h=A[4],(p=document.createElement("canvas")).width=b,p.height=B,f=p.getContext("2d"),m=f.createLinearGradient(c,d,u,h),p7(n.stops,l).forEach(function(e){return m.addColorStop(e.stop,n7(e.color))}),f.fillStyle=m,f.fillRect(0,0,b,B),b>0&&B>0&&(g=r.ctx.createPattern(p,"repeat"),r.renderRepeat(v,g,E,k))):function(e){return 2===e.type}(n)&&(y=Gre(e,t,[null,null,null]),v=y[0],w=y[1],x=y[2],b=y[3],B=y[4],C=0===n.position.length?[z9]:n.position,E=W9(C[0],b),k=W9(C[C.length-1],B),S=function(e,t,n,r,i){var a=0,o=0;switch(e.size){case 0:0===e.shape?a=o=Math.min(Math.abs(t),Math.abs(t-r),Math.abs(n),Math.abs(n-i)):1===e.shape&&(a=Math.min(Math.abs(t),Math.abs(t-r)),o=Math.min(Math.abs(n),Math.abs(n-i)));break;case 2:if(0===e.shape)a=o=Math.min(m7(t,n),m7(t,n-i),m7(t-r,n),m7(t-r,n-i));else if(1===e.shape){var s=Math.min(Math.abs(n),Math.abs(n-i))/Math.min(Math.abs(t),Math.abs(t-r)),A=g7(r,i,t,n,!0),l=A[0],c=A[1];o=s*(a=m7(l-t,(c-n)/s))}break;case 1:0===e.shape?a=o=Math.max(Math.abs(t),Math.abs(t-r),Math.abs(n),Math.abs(n-i)):1===e.shape&&(a=Math.max(Math.abs(t),Math.abs(t-r)),o=Math.max(Math.abs(n),Math.abs(n-i)));break;case 3:if(0===e.shape)a=o=Math.max(m7(t,n),m7(t,n-i),m7(t-r,n),m7(t-r,n-i));else if(1===e.shape){s=Math.max(Math.abs(n),Math.abs(n-i))/Math.max(Math.abs(t),Math.abs(t-r));var u=g7(r,i,t,n,!1);l=u[0],c=u[1],o=s*(a=m7(l-t,(c-n)/s))}}return Array.isArray(e.size)&&(a=W9(e.size[0],r),o=2===e.size.length?W9(e.size[1],i):a),[a,o]}(n,E,k,b,B),F=S[0],Q=S[1],F>0&&Q>0&&(j=r.ctx.createRadialGradient(w+E,x+k,0,w+E,x+k,F),p7(n.stops,2*F).forEach(function(e){return j.addColorStop(e.stop,n7(e.color))}),r.path(v),r.ctx.fillStyle=j,F!==Q?(U=e.bounds.left+.5*e.bounds.width,O=e.bounds.top+.5*e.bounds.height,I=1/(N=Q/F),r.ctx.save(),r.ctx.translate(U,O),r.ctx.transform(1,0,0,N,0,0),r.ctx.translate(-U,-O),r.ctx.fillRect(w,I*(x-O)+O,b,B*I),r.ctx.restore()):r.ctx.fill())),T.label=6;case 6:return t--,[2]}})},r=this,i=0,a=e.styles.backgroundImage.slice(0).reverse(),s.label=1;case 1:return i<a.length?(o=a[i],[5,n(o)]):[3,4];case 2:s.sent(),s.label=3;case 3:return i++,[3,1];case 4:return[2]}})})},t.prototype.renderSolidBorder=function(e,t,n){return M6(this,0,void 0,function(){return D6(this,function(r){return this.path(Kre(n,t)),this.ctx.fillStyle=n7(e),this.ctx.fill(),[2]})})},t.prototype.renderDoubleBorder=function(e,t,n,r){return M6(this,0,void 0,function(){var i,a;return D6(this,function(o){switch(o.label){case 0:return t<3?[4,this.renderSolidBorder(e,n,r)]:[3,2];case 1:return o.sent(),[2];case 2:return i=function(e,t){switch(t){case 0:return Vre(e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox,e.topRightBorderBox,e.topRightBorderDoubleOuterBox);case 1:return Vre(e.topRightBorderBox,e.topRightBorderDoubleOuterBox,e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox);case 2:return Vre(e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox,e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox);default:return Vre(e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox,e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox)}}(r,n),this.path(i),this.ctx.fillStyle=n7(e),this.ctx.fill(),a=function(e,t){switch(t){case 0:return Vre(e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox,e.topRightBorderDoubleInnerBox,e.topRightPaddingBox);case 1:return Vre(e.topRightBorderDoubleInnerBox,e.topRightPaddingBox,e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox);case 2:return Vre(e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox,e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox);default:return Vre(e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox,e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox)}}(r,n),this.path(a),this.ctx.fill(),[2]}})})},t.prototype.renderNodeBackgroundAndBorders=function(e){return M6(this,0,void 0,function(){var t,n,r,i,a,o,s,A,l=this;return D6(this,function(c){switch(c.label){case 0:return this.applyEffects(e.getEffects(2)),t=e.container.styles,n=!t7(t.backgroundColor)||t.backgroundImage.length,r=[{style:t.borderTopStyle,color:t.borderTopColor,width:t.borderTopWidth},{style:t.borderRightStyle,color:t.borderRightColor,width:t.borderRightWidth},{style:t.borderBottomStyle,color:t.borderBottomColor,width:t.borderBottomWidth},{style:t.borderLeftStyle,color:t.borderLeftColor,width:t.borderLeftWidth}],i=aie(Jre(t.backgroundClip,0),e.curves),n||t.boxShadow.length?(this.ctx.save(),this.path(i),this.ctx.clip(),t7(t.backgroundColor)||(this.ctx.fillStyle=n7(t.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(e.container)]):[3,2];case 1:c.sent(),this.ctx.restore(),t.boxShadow.slice(0).reverse().forEach(function(t){l.ctx.save();var n,r,i,a,o,s=Ore(e.curves),A=t.inset?0:1e4,c=(n=s,r=-A+(t.inset?1:-1)*t.spread.number,i=(t.inset?1:-1)*t.spread.number,a=t.spread.number*(t.inset?-2:2),o=t.spread.number*(t.inset?-2:2),n.map(function(e,t){switch(t){case 0:return e.add(r,i);case 1:return e.add(r+a,i);case 2:return e.add(r+a,i+o);case 3:return e.add(r,i+o)}return e}));t.inset?(l.path(s),l.ctx.clip(),l.mask(c)):(l.mask(s),l.ctx.clip(),l.path(c)),l.ctx.shadowOffsetX=t.offsetX.number+A,l.ctx.shadowOffsetY=t.offsetY.number,l.ctx.shadowColor=n7(t.color),l.ctx.shadowBlur=t.blur.number,l.ctx.fillStyle=t.inset?n7(t.color):"rgba(0,0,0,1)",l.ctx.fill(),l.ctx.restore()}),c.label=2;case 2:a=0,o=0,s=r,c.label=3;case 3:return o<s.length?0!==(A=s[o]).style&&!t7(A.color)&&A.width>0?2!==A.style?[3,5]:[4,this.renderDashedDottedBorder(A.color,A.width,a,e.curves,2)]:[3,11]:[3,13];case 4:return c.sent(),[3,11];case 5:return 3!==A.style?[3,7]:[4,this.renderDashedDottedBorder(A.color,A.width,a,e.curves,3)];case 6:return c.sent(),[3,11];case 7:return 4!==A.style?[3,9]:[4,this.renderDoubleBorder(A.color,A.width,a,e.curves)];case 8:return c.sent(),[3,11];case 9:return[4,this.renderSolidBorder(A.color,a,e.curves)];case 10:c.sent(),c.label=11;case 11:a++,c.label=12;case 12:return o++,[3,3];case 13:return[2]}})})},t.prototype.renderDashedDottedBorder=function(e,t,n,r,i){return M6(this,0,void 0,function(){var a,o,s,A,l,c,u,d,h,p,f,m,g,y,v,w;return D6(this,function(x){return this.ctx.save(),a=function(e,t){switch(t){case 0:return zre(e.topLeftBorderStroke,e.topRightBorderStroke);case 1:return zre(e.topRightBorderStroke,e.bottomRightBorderStroke);case 2:return zre(e.bottomRightBorderStroke,e.bottomLeftBorderStroke);default:return zre(e.bottomLeftBorderStroke,e.topLeftBorderStroke)}}(r,n),o=Kre(r,n),2===i&&(this.path(o),this.ctx.clip()),Qre(o[0])?(s=o[0].start.x,A=o[0].start.y):(s=o[0].x,A=o[0].y),Qre(o[1])?(l=o[1].end.x,c=o[1].end.y):(l=o[1].x,c=o[1].y),u=0===n||2===n?Math.abs(s-l):Math.abs(A-c),this.ctx.beginPath(),3===i?this.formatPath(a):this.formatPath(o.slice(0,2)),d=t<3?3*t:2*t,h=t<3?2*t:t,3===i&&(d=t,h=t),p=!0,u<=2*d?p=!1:u<=2*d+h?(d*=f=u/(2*d+h),h*=f):(m=Math.floor((u+h)/(d+h)),g=(u-m*d)/(m-1),h=(y=(u-(m+1)*d)/m)<=0||Math.abs(h-g)<Math.abs(h-y)?g:y),p&&(3===i?this.ctx.setLineDash([0,d+h]):this.ctx.setLineDash([d,h])),3===i?(this.ctx.lineCap="round",this.ctx.lineWidth=t):this.ctx.lineWidth=2*t+1.1,this.ctx.strokeStyle=n7(e),this.ctx.stroke(),this.ctx.setLineDash([]),2===i&&(Qre(o[0])&&(v=o[3],w=o[0],this.ctx.beginPath(),this.formatPath([new kre(v.end.x,v.end.y),new kre(w.start.x,w.start.y)]),this.ctx.stroke()),Qre(o[1])&&(v=o[1],w=o[2],this.ctx.beginPath(),this.formatPath([new kre(v.end.x,v.end.y),new kre(w.start.x,w.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},t.prototype.render=function(e){return M6(this,0,void 0,function(){var t;return D6(this,function(n){switch(n.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=n7(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),r=new Hre(e,null),i=new Lre(r),_re(r,i,i,a=[]),Rre(r.container,a),t=i,[4,this.renderStack(t)];case 1:return n.sent(),this.applyEffects([]),[2,this.canvas]}var r,i,a})})},t}(nie),iie=function(e){return e instanceof une||(e instanceof cne||e instanceof lne&&e.type!==one&&e.type!==ane)},aie=function(e,t){switch(e){case 0:return Ore(t);case 2:return function(e){return[e.topLeftContentBox,e.topRightContentBox,e.bottomRightContentBox,e.bottomLeftContentBox]}(t);default:return Nre(t)}},oie=function(e){switch(e){case 1:return"center";case 2:return"right";default:return"left"}},sie=["-apple-system","system-ui"],Aie=function(e){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?e.filter(function(e){return-1===sie.indexOf(e)}):e},lie=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.canvas=n.canvas?n.canvas:document.createElement("canvas"),r.ctx=r.canvas.getContext("2d"),r.options=n,r.canvas.width=Math.floor(n.width*n.scale),r.canvas.height=Math.floor(n.height*n.scale),r.canvas.style.width=n.width+"px",r.canvas.style.height=n.height+"px",r.ctx.scale(r.options.scale,r.options.scale),r.ctx.translate(-n.x,-n.y),r.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+n.width+"x"+n.height+" at "+n.x+","+n.y+") with scale "+n.scale),r}return T6(t,e),t.prototype.render=function(e){return M6(this,0,void 0,function(){var t,n;return D6(this,function(r){switch(r.label){case 0:return t=Dte(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,e),[4,cie(t)];case 1:return n=r.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=n7(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(n,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},t}(nie),cie=function(e){return new Promise(function(t,n){var r=new Image;r.onload=function(){t(r)},r.onerror=n,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent((new XMLSerializer).serializeToString(e))})},uie=function(){function e(e){var t=e.id,n=e.enabled;this.id=t,this.enabled=n,this.start=Date.now()}return e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&("undefined"!=typeof window&&window.console&&"function"==typeof console.debug?console.debug.apply(console,L6([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},e.prototype.getTime=function(){return Date.now()-this.start},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&"undefined"!=typeof window&&window.console&&"function"==typeof console.info&&console.info.apply(console,L6([this.id,this.getTime()+"ms"],e))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&("undefined"!=typeof window&&window.console&&"function"==typeof console.warn?console.warn.apply(console,L6([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&("undefined"!=typeof window&&window.console&&"function"==typeof console.error?console.error.apply(console,L6([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},e.instances={},e}(),die=function(){function e(t,n){var r;this.windowBounds=n,this.instanceName="#"+e.instanceCount++,this.logger=new uie({id:this.instanceName,enabled:t.logging}),this.cache=null!==(r=t.cache)&&void 0!==r?r:new gre(this,t)}return e.instanceCount=1,e}();"undefined"!=typeof window&&mre.setContext(window);var hie=function(e,t){return M6(void 0,0,void 0,function(){var n,r,i,a,o,s,A,l,c,u,d,h,p,f,m,g,y,v,w,x,b,B,C,E,k,S,F,Q,j,U,O,N,I,T,P,M,D,L;return D6(this,function(H){switch(H.label){case 0:if(!e||"object"!=typeof e)return[2,Promise.reject("Invalid element provided as first argument")];if(!(n=e.ownerDocument))throw new Error("Element is not attached to a Document");if(!(r=n.defaultView))throw new Error("Document is not attached to a Window");return i={allowTaint:null!==(B=t.allowTaint)&&void 0!==B&&B,imageTimeout:null!==(C=t.imageTimeout)&&void 0!==C?C:15e3,proxy:t.proxy,useCORS:null!==(E=t.useCORS)&&void 0!==E&&E},a=P6({logging:null===(k=t.logging)||void 0===k||k,cache:t.cache},i),o={windowWidth:null!==(S=t.windowWidth)&&void 0!==S?S:r.innerWidth,windowHeight:null!==(F=t.windowHeight)&&void 0!==F?F:r.innerHeight,scrollX:null!==(Q=t.scrollX)&&void 0!==Q?Q:r.pageXOffset,scrollY:null!==(j=t.scrollY)&&void 0!==j?j:r.pageYOffset},s=new H6(o.scrollX,o.scrollY,o.windowWidth,o.windowHeight),A=new die(a,s),l=null!==(U=t.foreignObjectRendering)&&void 0!==U&&U,c={allowTaint:null!==(O=t.allowTaint)&&void 0!==O&&O,onclone:t.onclone,ignoreElements:t.ignoreElements,inlineImages:l,copyStyles:l},A.logger.debug("Starting document clone with size "+s.width+"x"+s.height+" scrolled to "+-s.left+","+-s.top),u=new Zne(A,e,c),(d=u.clonedReferenceElement)?[4,u.toIFrame(n,s)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return h=H.sent(),p=Sne(d)||"HTML"===d.tagName?function(e){var t=e.body,n=e.documentElement;if(!t||!n)throw new Error("Unable to get document size");var r=Math.max(Math.max(t.scrollWidth,n.scrollWidth),Math.max(t.offsetWidth,n.offsetWidth),Math.max(t.clientWidth,n.clientWidth)),i=Math.max(Math.max(t.scrollHeight,n.scrollHeight),Math.max(t.offsetHeight,n.offsetHeight),Math.max(t.clientHeight,n.clientHeight));return new H6(0,0,r,i)}(d.ownerDocument):_6(A,d),f=p.width,m=p.height,g=p.left,y=p.top,v=pie(A,d,t.backgroundColor),w={canvas:t.canvas,backgroundColor:v,scale:null!==(I=null!==(N=t.scale)&&void 0!==N?N:r.devicePixelRatio)&&void 0!==I?I:1,x:(null!==(T=t.x)&&void 0!==T?T:0)+g,y:(null!==(P=t.y)&&void 0!==P?P:0)+y,width:null!==(M=t.width)&&void 0!==M?M:Math.ceil(f),height:null!==(D=t.height)&&void 0!==D?D:Math.ceil(m)},l?(A.logger.debug("Document cloned, using foreign object rendering"),[4,new lie(A,w).render(d)]):[3,3];case 2:return x=H.sent(),[3,5];case 3:return A.logger.debug("Document cloned, element located at "+g+","+y+" with size "+f+"x"+m+" using computed rendering"),A.logger.debug("Starting DOM parsing"),b=mne(A,d),v===b.styles.backgroundColor&&(b.styles.backgroundColor=c7.TRANSPARENT),A.logger.debug("Starting renderer for element at "+w.x+","+w.y+" with size "+w.width+"x"+w.height),[4,new rie(A,w).render(b)];case 4:x=H.sent(),H.label=5;case 5:return(null===(L=t.removeContainer)||void 0===L||L)&&(Zne.destroy(h)||A.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),A.logger.debug("Finished rendering"),[2,x]}})})},pie=function(e,t,n){var r=t.ownerDocument,i=r.documentElement?l7(e,getComputedStyle(r.documentElement).backgroundColor):c7.TRANSPARENT,a=r.body?l7(e,getComputedStyle(r.body).backgroundColor):c7.TRANSPARENT,o="string"==typeof n?l7(e,n):null===n?c7.TRANSPARENT:4294967295;return t===r.documentElement?t7(i)?t7(a)?o:a:i:o};const fie=["#3b82f6","#8b5cf6","#06b6d4","#10b981","#f59e0b","#ef4444","#ec4899","#6366f1","#14b8a6","#f97316","#84cc16","#a855f7","#0ea5e9","#22c55e","#eab308"];function mie(e,t=0){return 0===t?e:fie[t%fie.length]}function gie(e){return Math.abs(e)>=1e6?`${(e/1e6).toFixed(1)}M`:Math.abs(e)>=1e3?`${(e/1e3).toFixed(1)}K`:e.toLocaleString()}function yie({active:e,payload:t,label:n,xLabel:r,yLabel:i}){return e&&(null==t?void 0:t.length)?Ie.jsxs("div",{className:"bg-white px-3 py-2 rounded-lg shadow-lg border border-gray-100 text-xs max-w-[220px]",style:{zIndex:50},children:[Ie.jsxs("p",{className:"font-medium text-gray-700 truncate mb-0.5",children:[r,": ",Ie.jsx("span",{className:"text-gray-900",children:n})]}),t.map((e,t)=>{var n;return Ie.jsxs("p",{className:"text-gray-600",style:{color:e.color},children:[i,": ",Ie.jsx("span",{className:"font-semibold",children:null==(n=e.value)?void 0:n.toLocaleString()})]},t)})]}):null}function vie({active:e,payload:t}){var n,r;if(!e||!(null==t?void 0:t.length))return null;const i=t[0];return Ie.jsxs("div",{className:"bg-white px-3 py-2 rounded-lg shadow-lg border border-gray-100 text-xs",style:{zIndex:50},children:[Ie.jsx("p",{className:"font-medium text-gray-700",children:i.name}),Ie.jsxs("p",{className:"text-gray-600",children:["Value: ",Ie.jsx("span",{className:"font-semibold",children:null==(n=i.value)?void 0:n.toLocaleString()})]}),Ie.jsxs("p",{className:"text-gray-400",children:[(100*((null==(r=i.payload)?void 0:r.percent)??0)).toFixed(1),"%"]})]})}function wie({type:e,color:t}){const n="w-3.5 h-3.5",r={color:t};switch(e){case"serial_data_line":return Ie.jsx(dm,{className:n,style:r});case"serial_data_scatter":return Ie.jsx(Xp,{className:n,style:r});case"pie_chart_data":return Ie.jsx(Af,{className:n,style:r});default:return Ie.jsx(sf,{className:n,style:r})}}function xie({onClick:e,title:t,disabled:n,children:r}){return Ie.jsx("button",{onClick:e,disabled:n,title:t,className:"p-1 rounded-md transition-all duration-150 "+(n?"text-gray-300 cursor-not-allowed":"text-gray-500 hover:text-gray-700 hover:bg-gray-200/60 active:scale-95"),children:r})}const bie=30;const Bie=Te.memo(function({serialData:e,responseType:t,primaryColor:n}){var r,i,a;const o=Te.useRef(null),[s,A]=Te.useState(!1),l=Te.useMemo(()=>{var n;if("serial_data_line"===t)return"line";if("serial_data_scatter"===t)return"scatter";if("pie_chart_data"===t)return"pie";if("serial_data_bar"===t)return"bar";const r=null==(n=e.graph_type)?void 0:n.toLowerCase();return"line"===r?"line":"scatter"===r?"scatter":"pie"===r?"pie":"bar"},[t,e.graph_type]),c=Te.useMemo(()=>{const t=e.data.x||[],n=e.data.y||[];return t.map((e,t)=>({name:e,value:n[t]??0}))},[e]),u=c.length,d="pie"===l,h=Math.min(29,u-1),[p,f]=Te.useState(0),[m,g]=Te.useState(h),y=m-p+1,v=Te.useCallback(e=>{e&&"number"==typeof e.startIndex&&"number"==typeof e.endIndex&&(f(e.startIndex),g(e.endIndex))},[]),w=Te.useCallback(()=>{const e=Math.floor((p+m)/2),t=Math.max(Math.floor(y/4),Math.floor(2.5)),n=Math.max(0,e-t),r=Math.min(u-1,e+t);r-n+1>=5&&(f(n),g(r))},[p,m,y,u]),x=Te.useCallback(()=>{const e=Math.floor((p+m)/2),t=Math.min(y,Math.floor(u/2)),n=Math.max(0,e-t),r=Math.min(u-1,e+t);f(n),g(r)},[p,m,y,u]),b=Te.useCallback(()=>{f(0),g(u-1)},[u]),B=Te.useCallback(()=>{f(0),g(Math.min(29,u-1))},[u]),C=Math.max(1,Math.floor(y/3)),E=Te.useCallback(()=>{const e=Math.min(C,p);e>0&&(f(p-e),g(m-e))},[C,p,m]),k=Te.useCallback(()=>{const e=Math.min(C,u-1-m);e>0&&(f(p+e),g(m+e))},[C,p,m,u]),S=Te.useCallback(async()=>{if(o.current&&!s){A(!0);try{const n=await(e=o.current,t={backgroundColor:"#ffffff",scale:2,logging:!1,useCORS:!0},void 0===t&&(t={}),hie(e,t)),r=document.createElement("a");r.download=`chart-${Date.now()}.png`,r.href=n.toDataURL("image/png"),r.click()}catch(n){console.error("PNG export failed:",n)}finally{A(!1)}var e,t}},[s]),F=Te.useMemo(()=>{if(!d)return[];const e=[...c].sort((e,t)=>t.value-e.value);if(e.length<=15)return e;return[...e.slice(0,14),{name:"Other",value:e.slice(14).reduce((e,t)=>e+t.value,0)}]},[d,c]),Q=(null==(r=e.legends)?void 0:r.title)||"Chart",j=(null==(i=e.legends)?void 0:i.x)||"X",U=(null==(a=e.legends)?void 0:a.y)||"Y",O={dataKey:"name",tick:{fontSize:9,fill:"#9ca3af"},tickLine:!1,axisLine:{stroke:"#e5e7eb"},interval:Math.max(0,Math.floor(y/10)),angle:-35,textAnchor:"end",height:45},N={tick:{fontSize:9,fill:"#9ca3af"},tickLine:!1,axisLine:{stroke:"#e5e7eb"},tickFormatter:gie,width:48},I=!d&&u>bie,T=y>5,P=y<u,M=p>0,D=m<u-1,L=0===p&&m===u-1;return Ie.jsxs("div",{className:"mt-3 bg-white rounded-xl border border-gray-200 overflow-hidden shadow-sm",ref:o,children:[Ie.jsxs("div",{className:"flex items-center justify-between px-3 pt-2.5 pb-1",children:[Ie.jsxs("p",{className:"text-xs font-semibold text-gray-700 flex items-center gap-1.5 min-w-0",children:[Ie.jsx(wie,{type:t,color:n}),Ie.jsx("span",{className:"truncate",children:Q})]}),Ie.jsxs("div",{className:"flex items-center gap-0.5 flex-shrink-0",children:[!d&&Ie.jsxs(Ie.Fragment,{children:[Ie.jsx(xie,{onClick:w,title:"Zoom in",disabled:!T,children:Ie.jsx(bm,{className:"w-3.5 h-3.5"})}),Ie.jsx(xie,{onClick:x,title:"Zoom out",disabled:!P,children:Ie.jsx(Bm,{className:"w-3.5 h-3.5"})}),Ie.jsx(xie,{onClick:L?B:b,title:L?"Fit view":"Reset zoom",children:L?Ie.jsx(Mf,{className:"w-3.5 h-3.5"}):Ie.jsx(Jf,{className:"w-3.5 h-3.5"})}),Ie.jsx("div",{className:"w-px h-3.5 bg-gray-200 mx-0.5"})]}),!d&&u>bie&&Ie.jsxs(Ie.Fragment,{children:[Ie.jsx(xie,{onClick:E,title:"Pan left",disabled:!M,children:Ie.jsx(uf,{className:"w-3.5 h-3.5"})}),Ie.jsx(xie,{onClick:k,title:"Pan right",disabled:!D,children:Ie.jsx(df,{className:"w-3.5 h-3.5"})}),Ie.jsx("div",{className:"w-px h-3.5 bg-gray-200 mx-0.5"})]}),Ie.jsx(xie,{onClick:S,title:"Save as PNG",disabled:s,children:Ie.jsx(of,{className:"w-3.5 h-3.5"})})]})]}),!d&&Ie.jsxs("div",{className:"px-3 pb-1 flex items-center gap-2",children:[Ie.jsxs("span",{className:"text-[10px] text-gray-400",children:["Showing ",p+1,"–",m+1," of ",u]}),!d&&u>bie&&Ie.jsx("span",{className:"text-[10px] text-gray-300",children:"|"}),!d&&u>bie&&Ie.jsx("span",{className:"text-[10px] text-gray-400",children:"Drag brush below to scroll"})]}),Ie.jsx("div",{className:"px-1",style:{width:"100%",height:d?260:I?280:240},children:Ie.jsx(eP,{width:"100%",height:"100%",children:"bar"===l?Ie.jsxs(w6,{data:c,margin:{top:8,right:12,bottom:4,left:0},children:[Ie.jsx(p2,{strokeDasharray:"3 3",stroke:"#f3f4f6",vertical:!1}),Ie.jsx(r3,{...O}),Ie.jsx(m3,{...N}),Ie.jsx(OX,{content:Ie.jsx(yie,{xLabel:j,yLabel:U})}),Ie.jsx(p5,{dataKey:"value",fill:n,radius:[3,3,0,0],maxBarSize:28,animationDuration:400}),I&&Ie.jsx(x1,{dataKey:"name",height:22,stroke:n,fill:"#f9fafb",travellerWidth:8,startIndex:p,endIndex:m,onChange:v,tickFormatter:()=>""})]}):"line"===l?Ie.jsxs(y6,{data:c,margin:{top:8,right:12,bottom:4,left:0},children:[Ie.jsx(p2,{strokeDasharray:"3 3",stroke:"#f3f4f6",vertical:!1}),Ie.jsx(r3,{...O}),Ie.jsx(m3,{...N}),Ie.jsx(OX,{content:Ie.jsx(yie,{xLabel:j,yLabel:U})}),Ie.jsx(b4,{type:"monotone",dataKey:"value",stroke:n,strokeWidth:2,dot:y<=50&&{fill:n,r:2,strokeWidth:0},activeDot:{r:5,fill:n,stroke:"#fff",strokeWidth:2},animationDuration:400}),I&&Ie.jsx(x1,{dataKey:"name",height:22,stroke:n,fill:"#f9fafb",travellerWidth:8,startIndex:p,endIndex:m,onChange:v,tickFormatter:()=>""})]}):"scatter"===l?Ie.jsxs(N6,{margin:{top:8,right:12,bottom:4,left:0},children:[Ie.jsx(p2,{strokeDasharray:"3 3",stroke:"#f3f4f6",vertical:!1}),Ie.jsx(r3,{...O}),Ie.jsx(m3,{dataKey:"value",name:U,...N}),Ie.jsx(OX,{content:Ie.jsx(yie,{xLabel:j,yLabel:U})}),Ie.jsx(L5,{data:c.slice(p,m+1),fill:n,fillOpacity:.7,animationDuration:400})]}):Ie.jsxs(U6,{children:[Ie.jsx(OX,{content:Ie.jsx(vie,{})}),Ie.jsx(A0,{data:F,dataKey:"value",nameKey:"name",cx:"50%",cy:"45%",outerRadius:85,innerRadius:40,paddingAngle:2,animationDuration:500,label:({name:e,percent:t})=>`${(null==e?void 0:e.length)>12?e.slice(0,12)+"…":e} ${(100*t).toFixed(0)}%`,labelLine:{stroke:"#d1d5db",strokeWidth:1},children:F.map((e,t)=>Ie.jsx(NX,{fill:mie(n,t),stroke:"#fff",strokeWidth:1.5},t))}),Ie.jsx(vM,{wrapperStyle:{fontSize:10,color:"#6b7280",paddingTop:4},iconSize:8,iconType:"circle"})]})})}),Ie.jsx("div",{className:"flex items-center justify-between px-3 pb-2 pt-0.5",children:d?Ie.jsxs("div",{className:"text-[10px] text-gray-400",children:[u," items"]}):Ie.jsxs("div",{className:"flex gap-3 text-[10px] text-gray-400",children:[Ie.jsxs("span",{children:["X: ",j]}),Ie.jsxs("span",{children:["Y: ",U]})]})})]})});Bie.displayName="ChartRenderer";const Cie=[{label:"Parsing your request",icon:rf,duration:1400},{label:"Inferring your intent",icon:em,duration:1800},{label:"Locating relevant data",icon:xf,duration:2200},{label:"Constructing the query",icon:rm,duration:1600},{label:"Running validations",icon:Of,duration:2e3},{label:"Compiling the results",icon:qf,duration:1800},{label:"Presenting your insights",icon:om,duration:2e3}];function Eie({primaryColor:e}){const[t,n]=Te.useState(0),r=Te.useRef(null);Te.useEffect(()=>{const e=()=>{n(t=>{const n=t+1;return n>=Cie.length?t:(r.current=setTimeout(e,Cie[n].duration),n)})};return r.current=setTimeout(e,Cie[0].duration),()=>{r.current&&clearTimeout(r.current)}},[]);const i=Te.useMemo(()=>Math.min((t+1)/Cie.length*100,100),[t]),a=Cie[t],o=a.icon;return Ie.jsxs("div",{className:"py-1",children:[Ie.jsx(hl,{mode:"wait",children:Ie.jsxs(ch.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},exit:{opacity:0,y:-8},transition:{duration:.25,ease:"easeOut"},className:"flex items-center gap-2",children:[Ie.jsxs("div",{className:"relative flex-shrink-0 w-[18px] h-[18px]",children:[Ie.jsx(ch.div,{className:"absolute inset-[-4px] rounded-full",style:{background:`${e}10`},animate:{scale:[1,1.8,1],opacity:[.4,0,.4]},transition:{duration:2,repeat:1/0,ease:"easeInOut"}}),Ie.jsxs("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",className:"block",children:[Ie.jsx("circle",{cx:"9",cy:"9",r:"7.5",stroke:`${e}20`,strokeWidth:"2"}),Ie.jsx(ch.circle,{cx:"9",cy:"9",r:"7.5",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeDasharray:"32 15",fill:"none",animate:{rotate:360},transition:{duration:1,repeat:1/0,ease:"linear"},style:{transformOrigin:"center"}})]})]}),Ie.jsx(o,{className:"w-3.5 h-3.5 flex-shrink-0",style:{color:e}}),Ie.jsx("span",{className:"text-[13px] text-gray-600 font-medium leading-snug",children:a.label}),Ie.jsx("span",{className:"inline-flex gap-[2px] ml-0.5 flex-shrink-0",children:[0,1,2].map(t=>Ie.jsx(ch.span,{className:"block w-[3px] h-[3px] rounded-full",style:{background:e},animate:{opacity:[.15,.8,.15]},transition:{duration:.9,repeat:1/0,delay:.18*t,ease:"easeInOut"}},t))})]},t)}),Ie.jsxs("div",{className:"flex items-center gap-2 mt-2.5",children:[Ie.jsx("div",{className:"flex-1 h-[2px] rounded-full bg-gray-100 overflow-hidden",children:Ie.jsx(ch.div,{className:"h-full rounded-full",style:{background:`linear-gradient(90deg, ${e}, ${e}bb)`},initial:{width:"0%"},animate:{width:`${i}%`},transition:{duration:.5,ease:"easeOut"}})}),Ie.jsxs("span",{className:"text-[10px] font-medium tabular-nums text-gray-400",children:[t+1,"/",Cie.length]})]})]})}const kie=new Set(["serial_data","serial_data_bar","serial_data_line","serial_data_scatter","pie_chart_data"]);function Sie({url:e}){return Ie.jsx("div",{className:"mt-2 rounded-xl overflow-hidden border border-gray-100",children:Ie.jsx("img",{src:e,alt:"Agent response",className:"w-full h-auto max-h-64 object-contain bg-gray-50"})})}function Fie({label:e,value:t}){return Ie.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] text-gray-400 bg-gray-50 px-1.5 py-0.5 rounded",children:[Ie.jsx(bf,{className:"w-2.5 h-2.5"}),e,": ",t]})}function Qie({sql:e,primaryColor:t}){const[n,r]=Te.useState(!1);return Ie.jsxs(ch.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},transition:{duration:.2},className:"mt-2 rounded-lg border border-gray-200 overflow-hidden",children:[Ie.jsxs("div",{className:"flex items-center justify-between px-3 py-1.5 bg-gray-50 border-b border-gray-100",children:[Ie.jsxs("span",{className:"text-[10px] font-medium text-gray-500 flex items-center gap-1",children:[Ie.jsx(vf,{className:"w-3 h-3"}),"Generated SQL"]}),Ie.jsxs("button",{onClick:async()=>{try{await navigator.clipboard.writeText(e),r(!0),setTimeout(()=>r(!1),2e3)}catch(t){console.error("Failed to copy SQL:",t)}},className:"text-[10px] text-gray-400 hover:text-gray-600 flex items-center gap-0.5 transition-colors",children:[n?Ie.jsx(lf,{className:"w-3 h-3 text-green-500"}):Ie.jsx(wf,{className:"w-3 h-3"}),n?"Copied":"Copy"]})]}),Ie.jsx("pre",{className:"px-3 py-2 text-[11px] text-gray-700 bg-gray-50/50 overflow-x-auto whitespace-pre-wrap break-all font-mono leading-relaxed",children:e})]})}function jie({onClick:e,title:t,active:n,activeClass:r,children:i}){return Ie.jsx("button",{onClick:e,className:`p-1.5 rounded-lg transition-all duration-200 ${n?r||"bg-blue-100 text-blue-600":"text-gray-400 hover:text-gray-600 hover:bg-gray-100"}`,title:t,children:i})}const Uie=Te.memo(function({message:e,onFeedback:t,primaryColor:n}){var r,i,a;const[o,s]=Te.useState(!1),[A,l]=Te.useState(!1),c="user"===e.role,u=e.isLoading,d=!c&&e.serialData&&e.responseType&&kie.has(e.responseType),h=!c&&e.imageUrl&&"image_png"===e.responseType,p=!c&&!!e.generatedSql,f=!c&&!!(null==(a=null==(i=null==(r=e.serialData)?void 0:r.data)?void 0:i.x)?void 0:a.length),m=c?null:e.metaData,g=e.timestamp?function(e){try{return new Date(e).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}catch{return""}}(e.timestamp):"";return Ie.jsxs(ch.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},className:"flex gap-3 "+(c?"flex-row-reverse":"flex-row"),children:[Ie.jsx("div",{className:"flex-shrink-0 w-9 h-9 rounded-xl flex items-center justify-center shadow-sm "+(c?"bg-gradient-to-br from-gray-100 to-gray-200":""),style:c?void 0:{background:`linear-gradient(135deg, ${n}20, ${n}35)`},children:c?Ie.jsx(fm,{className:"w-4 h-4 text-gray-600"}):Ie.jsx(tf,{className:"w-4 h-4",style:{color:n}})}),Ie.jsxs("div",{className:"flex flex-col max-w-[85%] "+(c?"items-end":"items-start"),children:[Ie.jsx("div",{className:"px-4 py-3 rounded-2xl shadow-sm "+(c?"rounded-tr-md text-white":"rounded-tl-md bg-white border border-gray-100 text-gray-800"),style:c?{background:`linear-gradient(135deg, ${n}, ${n}dd)`}:void 0,children:u?Ie.jsx(Eie,{primaryColor:n}):Ie.jsxs(Ie.Fragment,{children:[Ie.jsx(_k,{answer:e.content}),d&&e.serialData&&e.responseType&&Ie.jsx(Bie,{serialData:e.serialData,responseType:e.responseType,primaryColor:n}),h&&e.imageUrl&&Ie.jsx(Sie,{url:e.imageUrl}),Ie.jsx(hl,{children:A&&p&&e.generatedSql&&Ie.jsx(Qie,{sql:e.generatedSql,primaryColor:n})})]})}),!u&&Ie.jsxs("div",{className:"flex items-center gap-1.5 mt-1 px-1 flex-wrap",children:[m&&m.row_count>0&&Ie.jsx(Fie,{label:"Rows",value:m.row_count}),m&&m.execution_status&&"success"!==m.execution_status&&Ie.jsx(Fie,{label:"Status",value:m.execution_status}),g&&Ie.jsxs("span",{className:"inline-flex items-center gap-0.5 text-[10px] text-gray-300",children:[Ie.jsx(yf,{className:"w-2.5 h-2.5"}),g]})]}),!c&&!u&&Ie.jsxs("div",{className:"flex items-center gap-0.5 mt-1 px-1 flex-wrap",children:[Ie.jsx(jie,{onClick:async()=>{try{await navigator.clipboard.writeText(e.content||""),s(!0),setTimeout(()=>s(!1),2e3)}catch(t){console.error("Failed to copy:",t)}},title:"Copy response",children:o?Ie.jsx(lf,{className:"w-3.5 h-3.5 text-green-500"}):Ie.jsx(wf,{className:"w-3.5 h-3.5"})}),p&&Ie.jsx(jie,{onClick:()=>l(!A),title:A?"Hide SQL":"View SQL",active:A,activeClass:"bg-indigo-50 text-indigo-600",children:Ie.jsx(vf,{className:"w-3.5 h-3.5"})}),f&&e.serialData&&Ie.jsx(jie,{onClick:()=>{var t;return function(e,t){var n,r;const i=e.data.x||[],a=e.data.y||[];let o=`${(null==(n=e.legends)?void 0:n.x)||"X"},${(null==(r=e.legends)?void 0:r.y)||"Y"}\n`;for(let l=0;l<i.length;l++)o+=`${String(i[l]).includes(",")?`"${i[l]}"`:i[l]},${a[l]??""}\n`;const s=new Blob([o],{type:"text/csv;charset=utf-8;"}),A=document.createElement("a");A.href=URL.createObjectURL(s),A.download=`${t.replace(/[^a-zA-Z0-9]/g,"_")}_${Date.now()}.csv`,A.click(),URL.revokeObjectURL(A.href)}(e.serialData,(null==(t=e.serialData.legends)?void 0:t.title)||"data")},title:"Download CSV",children:Ie.jsx(Cf,{className:"w-3.5 h-3.5"})}),Ie.jsx("div",{className:"w-px h-3 bg-gray-200 mx-0.5"}),Ie.jsx(jie,{onClick:()=>t(e.id,"positive"),title:"Helpful",active:"positive"===e.feedback,activeClass:"bg-green-100 text-green-600",children:Ie.jsx(lm,{className:"w-3.5 h-3.5"})}),Ie.jsx(jie,{onClick:()=>t(e.id,"negative"),title:"Not helpful",active:"negative"===e.feedback,activeClass:"bg-red-100 text-red-600",children:Ie.jsx(Am,{className:"w-3.5 h-3.5"})})]})]})]})},(e,t)=>e.message.id===t.message.id&&e.message.content===t.message.content&&e.message.feedback===t.message.feedback&&e.message.isLoading===t.message.isLoading&&e.primaryColor===t.primaryColor&&e.onFeedback===t.onFeedback);function Oie({question:e,onClick:t,primaryColor:n,index:r}){return Ie.jsx(ch.button,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.1*r},onClick:t,className:"group text-left p-3 rounded-xl border border-gray-200 bg-white hover:border-transparent hover:shadow-md transition-all duration-200",style:{"--hover-bg":`${n}08`},onMouseEnter:e=>{e.currentTarget.style.borderColor=n,e.currentTarget.style.backgroundColor=`${n}08`},onMouseLeave:e=>{e.currentTarget.style.borderColor="#e5e7eb",e.currentTarget.style.backgroundColor="white"},children:Ie.jsx("p",{className:"text-sm text-gray-700 group-hover:text-gray-900 line-clamp-2",children:e})})}function Nie({onSelectQuestion:e,primaryColor:t}){return Ie.jsxs("div",{className:"flex flex-col items-center justify-center h-full px-4 py-6 overflow-y-auto",children:[Ie.jsxs(ch.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.4},className:"flex flex-col items-center mb-8",children:[Ie.jsxs(ch.div,{className:"relative w-20 h-20 mb-5",initial:{rotate:-10},animate:{rotate:0},transition:{duration:.5,type:"spring"},children:[Ie.jsx("div",{className:"absolute inset-0 rounded-2xl shadow-xl",style:{background:`linear-gradient(135deg, ${t}, ${t}cc)`}}),Ie.jsx("div",{className:"absolute inset-0 rounded-2xl opacity-50",style:{background:`linear-gradient(135deg, transparent, ${t}40)`}}),Ie.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:Ie.jsx(xm,{className:"w-10 h-10 text-white drop-shadow-lg"})})]}),Ie.jsx(ch.h2,{className:"text-2xl font-bold text-gray-900 mb-2",initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.2},children:"Ask Ultra"}),Ie.jsx(ch.p,{className:"text-sm text-gray-500 text-center max-w-xs leading-relaxed",initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.3},children:"Your AI-powered assistant for real-time logistics insights and data queries"})]}),Ie.jsxs("div",{className:"w-full max-w-md",children:[Ie.jsxs(ch.div,{className:"flex items-center gap-2 mb-4",initial:{opacity:0},animate:{opacity:1},transition:{delay:.4},children:[Ie.jsx("div",{className:"w-6 h-6 rounded-lg flex items-center justify-center",style:{backgroundColor:"#fef3c7"},children:Ie.jsx(om,{className:"w-3.5 h-3.5 text-amber-500"})}),Ie.jsx("span",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wider",children:"Try asking"})]}),Ie.jsx("div",{className:"grid grid-cols-1 gap-3",children:Dk.map((n,r)=>Ie.jsx(Oie,{question:n.text,onClick:()=>e(n.text),primaryColor:t,index:r},n.id))})]})]})}function Iie(){return"undefined"==typeof window?null:window.SpeechRecognition||window.webkitSpeechRecognition||null}function Tie({color:e}){return Ie.jsx("span",{className:"inline-flex items-center gap-[2px] h-4",children:[0,1,2,3,4].map(t=>Ie.jsx(ch.span,{className:"block w-[3px] rounded-full",style:{background:e},animate:{height:["6px","14px","6px"]},transition:{duration:.6,repeat:1/0,delay:.1*t,ease:"easeInOut"}},t))})}function Pie({value:e,onChange:t,onSend:n,isSending:r,primaryColor:i,placeholder:a="Ask me anything about your data..."}){const o=Te.useRef(null),s=Te.useRef(null),A=Te.useRef(""),[l,c]=Te.useState(!1),[u]=Te.useState(()=>!!Iie());Te.useEffect(()=>{(()=>{const e=o.current;e&&(e.style.height="auto",e.style.height=`${Math.min(e.scrollHeight,120)}px`)})()},[e]),Te.useEffect(()=>{o.current&&o.current.focus()},[]),Te.useEffect(()=>()=>{if(s.current)try{s.current.abort()}catch{}},[]);const d=Te.useCallback(()=>{if(l||r)return;const e=Iie();if(!e)return;const i=new e;i.continuous=!1,i.interimResults=!0,i.lang="en-US",A.current="",i.onstart=()=>{c(!0)},i.onresult=e=>{let n="",r="";for(let t=0;t<e.results.length;t++){const i=e.results[t][0].transcript;e.results[t].isFinal?r+=i:n+=i}A.current=r,t((r+n).trim())},i.onerror=()=>{c(!1),s.current=null},i.onend=()=>{c(!1),s.current=null;const e=A.current.trim();e&&(t(e),setTimeout(()=>n(),50))},s.current=i,i.start()},[l,r,t,n]);return Ie.jsxs("div",{className:"border-t bg-gradient-to-t from-gray-50 to-white p-4",children:[Ie.jsxs("div",{className:"flex items-end gap-2 p-2 rounded-2xl border bg-white shadow-sm focus-within:shadow-md transition-all duration-200 "+(l?"border-blue-200 shadow-blue-50":"border-gray-200 focus-within:border-gray-300"),style:l?{borderColor:`${i}40`}:void 0,children:[l?Ie.jsxs("div",{className:"flex-1 flex items-center gap-3 py-2 px-2 min-h-[36px]",children:[Ie.jsx(Tie,{color:i}),Ie.jsx("span",{className:"text-sm text-gray-500 truncate",children:e||"Listening…"})]}):Ie.jsx("textarea",{ref:o,value:e,onChange:e=>t(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),n())},placeholder:a,rows:1,className:"flex-1 bg-transparent border-none outline-none resize-none text-sm text-gray-800 placeholder-gray-400 min-h-[36px] max-h-[120px] py-2 px-1",disabled:r}),u&&!r&&!e.trim()&&!l&&Ie.jsx(ch.button,{onClick:d,className:"relative flex-shrink-0 w-10 h-10 rounded-xl flex items-center justify-center transition-all duration-200",style:{background:`${i}10`,color:i},whileHover:{scale:1.05},whileTap:{scale:.95},title:"Voice input",children:Ie.jsx(Hf,{className:"w-4 h-4"})}),Ie.jsx(ch.button,{onClick:n,disabled:(!e.trim()||r)&&!l,className:"flex-shrink-0 w-10 h-10 rounded-xl flex items-center justify-center text-white transition-all duration-200 disabled:opacity-40 disabled:cursor-not-allowed shadow-sm hover:shadow-md",style:{background:e.trim()&&!r?`linear-gradient(135deg, ${i}, ${i}dd)`:"#d1d5db"},whileHover:e.trim()&&!r?{scale:1.05}:{},whileTap:e.trim()&&!r?{scale:.95}:{},children:r?Ie.jsx(Nf,{className:"w-4 h-4 animate-spin"}):Ie.jsx(tm,{className:"w-4 h-4"})})]}),Ie.jsxs("p",{className:"text-xs text-gray-400 text-center mt-2",children:["Press"," ",Ie.jsx("kbd",{className:"px-1.5 py-0.5 bg-gray-100 rounded text-gray-500 font-mono text-[10px]",children:"Enter"})," ","to send",u&&Ie.jsxs("span",{className:"text-gray-300",children:[" · tap ",Ie.jsx(Hf,{className:"inline w-3 h-3 -mt-0.5"})," to speak"]})]})]})}function Mie(e){const t=new Date(e),n=(new Date).getTime()-t.getTime(),r=Math.floor(n/6e4),i=Math.floor(n/36e5),a=Math.floor(n/864e5);return r<1?"Just now":r<60?`${r}m ago`:i<24?`${i}h ago`:a<7?`${a}d ago`:t.toLocaleDateString("en-US",{month:"short",day:"numeric"})}function Die(e){return e.title?e.title.length>50?e.title.substring(0,50)+"...":e.title:"New conversation"}function Lie({session:e,isActive:t,onSelect:n,onDelete:r,primaryColor:i}){const[a,o]=Te.useState(!1);return Ie.jsx(ch.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},exit:{opacity:0,x:-10},className:"group relative p-3 rounded-xl cursor-pointer transition-all duration-200 "+(t?"bg-white shadow-sm border border-gray-200":"hover:bg-white/60"),onClick:n,onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),style:t?{borderColor:`${i}40`}:void 0,children:Ie.jsxs("div",{className:"flex items-start gap-3",children:[Ie.jsx("div",{className:"flex-shrink-0 w-8 h-8 rounded-lg flex items-center justify-center "+(t?"":"bg-gray-100"),style:t?{backgroundColor:`${i}15`}:void 0,children:Ie.jsx(Lf,{className:"w-4 h-4",style:{color:t?i:"#6b7280"}})}),Ie.jsxs("div",{className:"flex-1 min-w-0",children:[Ie.jsx("p",{className:"text-sm font-medium truncate "+(t?"text-gray-900":"text-gray-700"),children:Die(e)}),Ie.jsxs("div",{className:"flex items-center gap-1.5 mt-1",children:[Ie.jsx(yf,{className:"w-3 h-3 text-gray-400"}),Ie.jsx("span",{className:"text-xs text-gray-400",children:Mie(e.updatedAt)}),e.totalTurns>0&&Ie.jsxs(Ie.Fragment,{children:[Ie.jsx("span",{className:"text-xs text-gray-300",children:"•"}),Ie.jsxs("span",{className:"text-xs text-gray-400",children:[e.totalTurns," ",1===e.totalTurns?"turn":"turns"]})]})]})]}),Ie.jsx(hl,{children:a&&Ie.jsx(ch.button,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},onClick:e=>{e.stopPropagation(),r()},className:"absolute right-2 top-1/2 -translate-y-1/2 p-2 rounded-lg text-gray-400 hover:text-red-500 hover:bg-red-50 transition-colors",title:"Delete conversation",children:Ie.jsx(cm,{className:"w-4 h-4"})})})]})})}function Hie({isOpen:e,onClose:t,sessions:n,isLoading:r,currentConversationId:i,onSelectSession:a,onDeleteSession:o,onNewConversation:s,primaryColor:A}){return Ie.jsx(hl,{children:e&&Ie.jsxs(Ie.Fragment,{children:[Ie.jsx(ch.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"absolute inset-0 bg-black/10 z-10",onClick:t}),Ie.jsxs(ch.div,{initial:{x:"-100%",opacity:0},animate:{x:0,opacity:1},exit:{x:"-100%",opacity:0},transition:{type:"spring",damping:25,stiffness:300},className:"absolute left-0 top-0 bottom-0 w-72 bg-gradient-to-b from-gray-50 to-white border-r border-gray-200 z-20 flex flex-col shadow-xl",children:[Ie.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-gray-100",children:[Ie.jsx("h3",{className:"font-semibold text-gray-900",children:"Chat History"}),Ie.jsx("button",{onClick:t,className:"p-1.5 rounded-lg text-gray-400 hover:text-gray-600 hover:bg-gray-100 transition-colors",children:Ie.jsx(wm,{className:"w-5 h-5"})})]}),Ie.jsx("div",{className:"p-3 border-b border-gray-100",children:Ie.jsxs(ch.button,{onClick:s,className:"w-full flex items-center justify-center gap-2 px-4 py-2.5 rounded-xl text-white font-medium shadow-sm hover:shadow-md transition-all",style:{background:`linear-gradient(135deg, ${A}, ${A}dd)`},whileHover:{scale:1.02},whileTap:{scale:.98},children:[Ie.jsx(Wf,{className:"w-4 h-4"}),"New Conversation"]})}),Ie.jsx("div",{className:"flex-1 overflow-y-auto p-2",children:r?Ie.jsx("div",{className:"flex items-center justify-center py-8",children:Ie.jsx(Nf,{className:"w-6 h-6 animate-spin text-gray-400"})}):0===n.length?Ie.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[Ie.jsx("div",{className:"w-12 h-12 rounded-full bg-gray-100 flex items-center justify-center mb-3",children:Ie.jsx(Lf,{className:"w-6 h-6 text-gray-400"})}),Ie.jsx("p",{className:"text-sm text-gray-500",children:"No conversations yet"}),Ie.jsx("p",{className:"text-xs text-gray-400 mt-1",children:"Start a new conversation to begin"})]}):Ie.jsx("div",{className:"space-y-1",children:n.map(e=>Ie.jsx(Lie,{session:e,isActive:e.chatSessionId===i,onSelect:()=>a(e.chatSessionId),onDelete:()=>o(e.chatSessionId),primaryColor:A},e.chatSessionId))})})]})]})})}function _ie({primaryColor:e,hasMessages:t,onToggleHistory:n,onNewConversation:r,onExportConversation:i}){const[a,o]=Te.useState(!1);return Ie.jsx("div",{className:"px-4 py-3 flex items-center justify-end",children:Ie.jsxs("div",{className:"flex items-center gap-1 justify-end",children:[t&&i&&Ie.jsx(ch.button,{onClick:()=>{null==i||i(),o(!0),setTimeout(()=>o(!1),2e3)},className:"p-2 rounded-lg text-gray-500 hover:text-gray-700 hover:bg-gray-100 transition-colors",title:"Copy conversation",whileHover:{scale:1.05},whileTap:{scale:.95},children:a?Ie.jsx(lf,{className:"w-5 h-5 text-green-500"}):Ie.jsx(gf,{className:"w-5 h-5"})}),Ie.jsx(ch.button,{onClick:n,className:"p-2 rounded-lg text-gray-500 hover:text-gray-700 hover:bg-gray-100 transition-colors",title:"Chat history",whileHover:{scale:1.05},whileTap:{scale:.95},children:Ie.jsx(Qf,{className:"w-5 h-5"})}),t&&Ie.jsx(ch.button,{onClick:r,className:"p-2 rounded-lg text-gray-500 hover:text-gray-700 hover:bg-gray-100 transition-colors",title:"New conversation",whileHover:{scale:1.05},whileTap:{scale:.95},children:Ie.jsx(Jf,{className:"w-5 h-5"})})]})})}const Rie=Te.memo(function({primaryColor:e}){const t=Hk(e=>e.inputValue),n=Hk(e=>e.isSending),r=Hk(e=>e.setInputValue),i=Hk(e=>e.sendMessage),a=Te.useCallback(()=>{const e=Hk.getState().inputValue;e.trim()&&i(e)},[i]);return Ie.jsx(Pie,{value:t,onChange:r,onSend:a,isSending:n,primaryColor:e})}),Kie=Te.memo(function({primaryColor:e}){const t=Hk(e=>e.messages),n=Hk(e=>e.hasOlderTurns),r=Hk(e=>e.isLoadingOlderTurns),i=Hk(e=>e.loadOlderTurns),a=Hk(e=>e.submitFeedback),o=Te.useRef(null),s=Te.useRef(null),A=Te.useRef(0);Te.useEffect(()=>{const e=A.current,n=t.length;if(n>e&&o.current){const r=t[n-1],i=e>0?t[e-1]:null;i&&(null==r?void 0:r.id)===(null==i?void 0:i.id)||o.current.scrollIntoView({behavior:"smooth"})}A.current=n},[t]);const l=Te.useCallback(()=>{const e=s.current;if(e&&e.scrollTop<60&&n&&!r){const t=e.scrollHeight;i().then(()=>{requestAnimationFrame(()=>{if(s.current){const e=s.current.scrollHeight;s.current.scrollTop=e-t}})})}},[n,r,i]),c=Te.useCallback((e,t)=>{a(e,t)},[a]);return Ie.jsxs("div",{ref:s,className:"h-full overflow-y-auto px-4 py-4",onScroll:l,children:[r&&Ie.jsxs("div",{className:"flex items-center justify-center py-3 mb-2",children:[Ie.jsx(Nf,{className:"w-5 h-5 animate-spin text-gray-400 mr-2"}),Ie.jsx("span",{className:"text-xs text-gray-400",children:"Loading older messages..."})]}),n&&!r&&Ie.jsxs("button",{onClick:()=>i(),className:"w-full flex items-center justify-center gap-1.5 py-2 mb-3 text-xs text-gray-400 hover:text-gray-600 transition-colors",children:[Ie.jsx(hf,{className:"w-4 h-4"}),"Load older messages"]}),Ie.jsx("div",{className:"space-y-4 max-w-2xl mx-auto",children:Ie.jsx(hl,{initial:!1,children:t.map(t=>Ie.jsx(Uie,{message:t,onFeedback:c,primaryColor:e},t.id))})}),Ie.jsx("div",{ref:o,className:"h-4"})]})});function zie(){const{theme:e}=ea(),t=Hk(e=>e.isLoading),n=Hk(e=>e.error),r=Hk(e=>e.sessions),i=Hk(e=>e.isLoadingHistory),a=Hk(e=>e.showHistory),o=Hk(e=>e.conversationId),s=Hk(e=>e.messages.length),A=Hk(e=>e.toggleHistory),l=Hk(e=>e.loadSession),c=Hk(e=>e.deleteSession),u=Hk(e=>e.startNewConversation),d=Hk(e=>e.fetchSessions),h=Hk(e=>e.sendMessage),p=e.primaryColor||"#1e40af",f=s>0;Te.useEffect(()=>{d()},[d]);const m=Te.useCallback(e=>{h(e)},[h]),g=Te.useCallback(()=>{const e=Hk.getState().messages;if(!e.length)return;const t=e.filter(e=>!e.isLoading).map(e=>{var t,n;const r="user"===e.role?"You":"Agent",i=e.timestamp?new Date(e.timestamp).toLocaleString([],{dateStyle:"short",timeStyle:"short"}):"";let a=`[${r}]${i?` (${i})`:""}\n${e.content||""}`;return e.generatedSql&&(a+=`\n\nSQL: ${e.generatedSql}`),(null==(n=null==(t=e.serialData)?void 0:t.legends)?void 0:n.title)&&(a+=`\n[Chart: ${e.serialData.legends.title} — ${e.serialData.data.x.length} data points]`),a}).join("\n\n─────────────────────\n\n");navigator.clipboard.writeText(t).catch(e=>console.error("Export failed:",e))},[]);return Ie.jsxs("div",{className:"relative flex flex-col h-full bg-gradient-to-b from-gray-50 to-white overflow-hidden",style:{fontFamily:e.fontFamily},children:[Ie.jsx(Hie,{isOpen:a,onClose:A,sessions:r,isLoading:i,currentConversationId:o,onSelectSession:l,onDeleteSession:c,onNewConversation:u,primaryColor:p}),Ie.jsx(_ie,{primaryColor:p,hasMessages:f,onToggleHistory:A,onNewConversation:u,onExportConversation:g}),Ie.jsx(hl,{children:n&&Ie.jsx(ch.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"mx-4 mt-3 p-3 bg-red-50 border border-red-200 rounded-xl",children:Ie.jsx("p",{className:"text-sm text-red-600",children:n})})}),Ie.jsx(hl,{children:t&&Ie.jsx(ch.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"absolute inset-0 bg-white/80 z-30 flex items-center justify-center",children:Ie.jsxs("div",{className:"flex flex-col items-center gap-3",children:[Ie.jsx(Nf,{className:"w-8 h-8 animate-spin",style:{color:p}}),Ie.jsx("p",{className:"text-sm text-gray-500",children:"Loading conversation..."})]})})}),Ie.jsx("div",{className:"flex-1 overflow-hidden",children:f||t?Ie.jsx(Kie,{primaryColor:p}):Ie.jsx(Nie,{onSelectQuestion:m,primaryColor:p})}),Ie.jsx(Rie,{primaryColor:p})]})}function Vie(){return Ie.jsxs(Sg,{children:[Ie.jsx(Eg,{path:"/",element:Ie.jsx($v,{})}),Ie.jsx(Eg,{path:"/search",element:Ie.jsx(My,{})}),Ie.jsx(Eg,{path:"/results",element:Ie.jsx(Vy,{})}),Ie.jsx(Eg,{path:"/call-details/:callId",element:Ie.jsx(tv,{})}),Ie.jsx(Eg,{path:"/call-logs/:callId",element:Ie.jsx(tv,{})}),Ie.jsx(Eg,{path:"/history",element:Ie.jsx(Av,{})}),Ie.jsx(Eg,{path:"/call-logs",element:Ie.jsx(uv,{})}),Ie.jsx(Eg,{path:"/email-leads",element:Ie.jsx(Bv,{})}),Ie.jsx(Eg,{path:"/email-leads/:leadId",element:Ie.jsx(jv,{})}),Ie.jsx(Eg,{path:"/email-leads/:leadId/action",element:Ie.jsx(Rv,{})}),Ie.jsx(Eg,{path:"/data-agent",element:Ie.jsx(Nk,{})}),Ie.jsx(Eg,{path:"/v2-data-agent",element:Ie.jsx(zie,{})}),Ie.jsx(Eg,{path:"*",element:Ie.jsx(Cg,{to:"/",replace:!0})})]})}class $ie extends Te.Component{constructor(e){super(e),Se(this,"handleReset",()=>{this.setState({hasError:!1,error:void 0})}),this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){console.error("ErrorBoundary caught an error:",e,t)}render(){return this.state.hasError?this.props.fallback?this.props.fallback:Ie.jsx("div",{className:"flex items-center justify-center h-full p-4",children:Ie.jsxs(Cy,{className:"p-6 max-w-md w-full text-center",children:[Ie.jsx("div",{className:"flex justify-center mb-4",children:Ie.jsx(hm,{className:"h-12 w-12 text-red-500"})}),Ie.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Something went wrong"}),Ie.jsx("p",{className:"text-gray-600 mb-4 text-sm",children:"An error occurred while loading this page. Please try again."}),Ie.jsxs("div",{className:"space-y-2",children:[Ie.jsx(Up,{onClick:this.handleReset,className:"w-full",children:"Try Again"}),Ie.jsx(Up,{variant:"outline",onClick:()=>window.location.reload(),className:"w-full",children:"Reload Page"})]}),"development"===process.env.NODE_ENV&&this.state.error&&Ie.jsxs("details",{className:"mt-4 text-left",children:[Ie.jsx("summary",{className:"cursor-pointer text-sm text-gray-500",children:"Error Details"}),Ie.jsx("pre",{className:"mt-2 text-xs bg-gray-100 p-2 rounded overflow-auto",children:this.state.error.stack})]})]})}):this.props.children}}class Wie{static async login2FA(e,t){var n,r,i;try{return(await Vi.post("/workspace/users/tenant/application/2_fa_auth",{email:e,tenant_id:t})).data}catch(a){if(console.log("Login 2FA Error:",a),404===(null==(n=a.response)?void 0:n.status))throw new Error("User not found");if(null==(i=null==(r=a.response)?void 0:r.data)?void 0:i.detail)throw new Error(a.response.data.detail);throw new Error("Failed to send OTP. Please try again.")}}static async verifyOTP(e,t,n){var r,i,a,o;try{const r=await Vi.post("/workspace/users/tenant/application/otp_validate",{email:e,tenant_id:t,otp:n});return console.log("Verify OTP Response:",r.data),r.data}catch(s){if(400===(null==(r=s.response)?void 0:r.status)||401===(null==(i=s.response)?void 0:i.status))throw new Error("Invalid or expired OTP");if(null==(o=null==(a=s.response)?void 0:a.data)?void 0:o.detail)throw new Error(s.response.data.detail);throw new Error("Failed to verify OTP. Please try again.")}}}function Gie({onAuthSuccess:e}){const{theme:t,tenantId:n,email:r}=ea(),[i,a]=Te.useState({step:"email",email:r||"",otp:"",isLoading:!1,error:null,otpSent:!1,countdown:0}),o=Te.useRef(null),s=Te.useRef(null),A=Te.useRef(null);Te.useEffect(()=>{var e,t;"email"===i.step?null==(e=o.current)||e.focus():"otp"===i.step&&(null==(t=s.current)||t.focus())},[i.step]),Te.useEffect(()=>(i.countdown>0&&(A.current=setTimeout(()=>{a(e=>({...e,countdown:e.countdown-1}))},1e3)),()=>{A.current&&clearTimeout(A.current)}),[i.countdown]);const l=async e=>{var t,r,o;if(e.preventDefault(),o=i.email,/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(o))if(a(e=>({...e,isLoading:!0,error:null})),n)try{await Wie.login2FA(i.email,n);a(e=>({...e,step:"otp",isLoading:!1,otpSent:!0,countdown:60}))}catch(s){console.log("Login 2FA Error:",null==(t=s.response)?void 0:t.data);let e="Failed to send OTP. Please try again.";404===(null==(r=s.response)?void 0:r.status)?e="User not found. Please check your email address.":s.message&&(e=s.message),a(t=>({...t,isLoading:!1,error:e}))}else a(e=>({...e,isLoading:!1,error:"Tenant ID is required"}));else a(e=>({...e,error:"Please enter a valid email address"}))},c=async t=>{var r,o;if(t.preventDefault(),o=i.otp,/^\d{6}$/.test(o))if(a(e=>({...e,isLoading:!0,error:null})),n)try{const t=await Wie.verifyOTP(i.email,n,i.otp);console.log("Verify OTP Response:",t),Bi(t.data.bearer),Qi(),a(e=>({...e,step:"success",isLoading:!1})),setTimeout(()=>{e(i.email,t.data.bearer)},1500)}catch(s){let e="Invalid OTP. Please try again.";400===(null==(r=s.response)?void 0:r.status)?e="Invalid or expired OTP. Please try again.":s.message&&(e=s.message),a(t=>({...t,isLoading:!1,error:e}))}else a(e=>({...e,isLoading:!1,error:"Tenant ID is required"}));else a(e=>({...e,error:"Please enter a valid 6-digit OTP"}))},u=async()=>{var e;if(!(i.countdown>0))if(a(e=>({...e,isLoading:!0,error:null})),n)try{await Wie.login2FA(i.email,n);a(e=>({...e,isLoading:!1,countdown:60,error:null}))}catch(t){let n="Failed to resend OTP. Please try again.";404===(null==(e=t.response)?void 0:e.status)?n="User not found. Please check your email address.":t.message&&(n=t.message),a(e=>({...e,isLoading:!1,error:n}))}else a(e=>({...e,isLoading:!1,error:"Tenant ID is required"}))},d=()=>{a(e=>({...e,step:"email",otp:"",error:null,otpSent:!1,countdown:0}))};return Ie.jsx("div",{className:"flex flex-col h-full w-full",style:{fontFamily:t.fontFamily},children:Ie.jsx("div",{className:"flex-1 flex items-center justify-center px-6 py-8 w-full",children:Ie.jsxs("div",{className:"w-full max-w-md mx-auto",children:[Ie.jsxs(hl,{mode:"wait",children:["email"===i.step&&Ie.jsxs(ch.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},transition:{duration:.3},className:"space-y-6",children:[Ie.jsxs("div",{className:"text-center space-y-2",children:[Ie.jsx("div",{className:"w-16 h-16 rounded-full flex items-center justify-center mx-auto mb-4",style:{backgroundColor:t.primaryColor+"20"},children:Ie.jsx(Tf,{className:"h-8 w-8",style:{color:t.primaryColor}})}),Ie.jsx("h2",{className:"text-xl font-semibold",style:{fontFamily:t.fontFamily,color:t.headerBg},children:"Welcome Back"}),Ie.jsx("p",{className:"text-gray-600 text-sm",style:{fontFamily:t.fontFamily},children:"Enter your email address to continue"})]}),Ie.jsxs("form",{onSubmit:l,className:"space-y-4",children:[Ie.jsx("div",{children:Ie.jsx(Ey,{ref:o,type:"email",value:i.email,onChange:e=>a(t=>({...t,email:e.target.value,error:null})),placeholder:"Enter your email address",disabled:i.isLoading,className:"w-full",style:{fontFamily:t.fontFamily},"aria-label":"Email address"})}),Ie.jsx(Up,{type:"submit",disabled:!i.email||i.isLoading,className:"w-full flex items-center justify-center gap-2",style:{backgroundColor:t.primaryColor,fontFamily:t.fontFamily},children:i.isLoading?Ie.jsx(Nf,{className:"h-4 w-4 animate-spin text-white"}):Ie.jsxs(Ie.Fragment,{children:["Continue",Ie.jsx(Jp,{className:"h-4 w-4"})]})})]})]},"email"),"otp"===i.step&&Ie.jsxs(ch.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},transition:{duration:.3},className:"space-y-6",children:[Ie.jsxs("div",{className:"text-center space-y-2",children:[Ie.jsx("div",{className:"w-16 h-16 rounded-full flex items-center justify-center mx-auto mb-4",style:{backgroundColor:t.primaryColor+"20"},children:Ie.jsx(im,{className:"h-8 w-8",style:{color:t.primaryColor}})}),Ie.jsx("h2",{className:"text-xl font-semibold",style:{fontFamily:t.fontFamily,color:t.headerBg},children:"Verify Your Email"}),Ie.jsx("p",{className:"text-gray-600 text-sm",style:{fontFamily:t.fontFamily},children:"We've sent a 6-digit code to"}),Ie.jsx("p",{className:"font-medium text-sm",style:{fontFamily:t.fontFamily,color:t.primaryColor},children:i.email})]}),Ie.jsxs("form",{onSubmit:c,className:"space-y-4",children:[Ie.jsx("div",{children:Ie.jsx(Ey,{ref:s,type:"text",inputMode:"numeric",pattern:"[0-9]*",maxLength:6,value:i.otp,onChange:e=>{const t=e.target.value.replace(/\D/g,"");a(e=>({...e,otp:t,error:null}))},placeholder:"Enter 6-digit code",disabled:i.isLoading,className:"w-full text-center text-lg tracking-widest",style:{fontFamily:t.fontFamily},"aria-label":"One-time password"})}),Ie.jsx(Up,{type:"submit",disabled:6!==i.otp.length||i.isLoading,className:"w-full flex items-center justify-center gap-2",style:{backgroundColor:t.primaryColor,fontFamily:t.fontFamily},children:i.isLoading?Ie.jsx(Nf,{className:"h-4 w-4 animate-spin text-white"}):Ie.jsxs(Ie.Fragment,{children:["Verify Code",Ie.jsx(Jp,{className:"h-4 w-4"})]})})]}),Ie.jsxs("div",{className:"text-center space-y-2",children:[Ie.jsx("p",{className:"text-sm text-gray-600",style:{fontFamily:t.fontFamily},children:"Didn't receive the code?"}),Ie.jsx(Up,{variant:"ghost",size:"sm",onClick:u,disabled:i.countdown>0||i.isLoading,style:{fontFamily:t.fontFamily},children:i.countdown>0?`Resend in ${i.countdown}s`:"Resend Code"}),Ie.jsx(Up,{variant:"ghost",size:"sm",onClick:d,disabled:i.isLoading,style:{fontFamily:t.fontFamily},children:"Change Email"})]})]},"otp"),"success"===i.step&&Ie.jsxs(ch.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.5},className:"text-center space-y-6",children:[Ie.jsx("div",{className:"w-20 h-20 rounded-full flex items-center justify-center mx-auto",style:{backgroundColor:"#10b98120"},children:Ie.jsx(ff,{className:"h-10 w-10 text-green-500"})}),Ie.jsxs("div",{className:"space-y-2",children:[Ie.jsx("h2",{className:"text-xl font-semibold text-green-600",style:{fontFamily:t.fontFamily},children:"Authentication Successful!"}),Ie.jsx("p",{className:"text-gray-600 text-sm",style:{fontFamily:t.fontFamily},children:"Redirecting to dashboard..."})]}),Ie.jsx("div",{className:"flex justify-center",children:Ie.jsx(Nf,{className:"h-6 w-6 animate-spin text-primary"})})]},"success")]}),Ie.jsx(hl,{children:i.error&&Ie.jsxs(ch.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"mt-4 p-3 bg-red-50 border border-red-200 rounded-lg flex items-center gap-2",children:[Ie.jsx(pf,{className:"h-4 w-4 text-red-500 flex-shrink-0"}),Ie.jsx("p",{className:"text-sm text-red-700",style:{fontFamily:t.fontFamily},children:i.error})]})})]})})})}function qie({error:e,onRetry:t,isRetrying:n=!1,errorType:r="validation"}){const i="network"===r||"server"===r||"rate_limit"===r;return Ie.jsx("div",{className:"flex-1 flex items-center justify-center p-6",children:Ie.jsxs("div",{className:"max-w-sm w-full text-center",children:[Ie.jsx("div",{className:"flex justify-center mb-4",children:Ie.jsx("div",{className:"p-3 rounded-full "+("rate_limit"===r?"bg-orange-100":"bg-red-100"),children:(()=>{switch(r){case"network":return Ie.jsx(ym,{className:"w-6 h-6 text-red-600"});case"rate_limit":return Ie.jsx(hm,{className:"w-6 h-6 text-orange-600"});default:return Ie.jsx(hm,{className:"w-6 h-6 text-red-600"})}})()})}),Ie.jsx("h2",{className:"text-lg font-semibold text-gray-900 mb-2",children:(()=>{switch(r){case"network":return"Connection Error";case"rate_limit":return"Rate Limit Exceeded";case"server":return"Server Error";default:return"Access Denied"}})()}),Ie.jsx("p",{className:"text-gray-600 text-sm mb-4",children:e}),Ie.jsxs("div",{className:"bg-gray-50 rounded-lg p-3 mb-4",children:[Ie.jsxs("div",{className:"flex items-center justify-center mb-2",children:[Ie.jsx(Uf,{className:"w-4 h-4 text-gray-500 mr-2"}),Ie.jsx("span",{className:"text-xs font-medium text-gray-700",children:"network"===r?"Connection Issue":"API Key Required"})]}),Ie.jsx("p",{className:"text-xs text-gray-500",children:(()=>{switch(r){case"network":return"Unable to connect to the validation server. Please check your internet connection.";case"rate_limit":return"Too many validation requests. Please wait a moment before trying again.";case"server":return"The validation server is currently unavailable. Please try again later.";default:return"Please provide a valid Pangents API key to access the widget."}})()})]}),i&&t&&Ie.jsx(Up,{onClick:t,disabled:n,variant:"outline",size:"sm",className:"mb-4",children:n?Ie.jsxs(Ie.Fragment,{children:[Ie.jsx(Xf,{className:"w-4 h-4 mr-2 animate-spin"}),"Retrying..."]}):Ie.jsxs(Ie.Fragment,{children:[Ie.jsx(Xf,{className:"w-4 h-4 mr-2"}),"Try Again"]})}),Ie.jsx("div",{className:"text-xs text-gray-400",children:Ie.jsx("p",{children:"validation"===r?"Contact your administrator for API key access.":"If the problem persists, contact support."})})]})})}function Xie(){return function(){if("undefined"==typeof window)return null;const e=new URLSearchParams(window.location.search);return e.get("apiKey")||e.get("api_key")}()||("undefined"!=typeof window&&(null==(e=window.PangentsConfig)?void 0:e.apiKey)?window.PangentsConfig.apiKey:null);var e}const Yie=(e,t,n,r)=>({message:e,status:t,code:n,details:r,timestamp:(new Date).toISOString()}),Jie="/settings/applications/validate",Zie="/workspace/users/tenant/application/auth",eae=9e5,tae="api_key_validation_",nae="pangents_bearer_token",rae=3,iae=1e3,aae=1e4,oae=10,sae=6e4,Aae="api_key_validation_rate_limit";class lae{static sanitizeApiKey(e){if("string"!=typeof e)throw new Error("API key must be a string");const t=e.trim().replace(/[\x00-\x1F\x7F]/g,"");if(t.length<this.MIN_KEY_LENGTH||t.length>this.MAX_KEY_LENGTH)throw new Error(`API key length must be between ${this.MIN_KEY_LENGTH} and ${this.MAX_KEY_LENGTH} characters`);return t}static validateApiKeyFormat(e){return this.API_KEY_PATTERN.test(e)}static isValidApiKey(e){try{const t=this.sanitizeApiKey(e);return this.validateApiKeyFormat(t)?{isValid:!0}:{isValid:!1,error:"Invalid API key format."}}catch(t){return{isValid:!1,error:t instanceof Error?t.message:"Invalid API key format."}}}}Se(lae,"API_KEY_PATTERN",/^[A-Za-z0-9_-]{32,64}$/),Se(lae,"MAX_KEY_LENGTH",100),Se(lae,"MIN_KEY_LENGTH",20);class cae{static getRequestHistory(){try{const e=localStorage.getItem(Aae);return e?JSON.parse(e):[]}catch{return[]}}static setRequestHistory(e){try{localStorage.setItem(Aae,JSON.stringify(e))}catch{}}static isRateLimited(){const e=Date.now();return this.getRequestHistory().filter(t=>e-t<sae).length>=oae}static recordRequest(){const e=Date.now(),t=[...this.getRequestHistory(),e].filter(t=>e-t<sae);this.setRequestHistory(t)}static getRemainingRequests(){const e=Date.now(),t=this.getRequestHistory().filter(t=>e-t<sae);return Math.max(0,oae-t.length)}static getResetTime(){const e=this.getRequestHistory();if(0===e.length)return 0;return Math.min(...e)+sae}}class uae{static getCacheKey(e){const t=btoa(e).replace(/[^a-zA-Z0-9]/g,"").substring(0,16);return`${tae}${t}`}static get(e){try{if(this.shouldClearCacheForApiKey(e))return this.clear(),null;const t=this.getCacheKey(e),n=localStorage.getItem(t);if(!n)return null;const r=JSON.parse(n);return Date.now()>r.expiresAt?(this.remove(e),null):r}catch{return null}}static shouldClearCacheForApiKey(e){try{const{apiKeyTracker:t}=require("../cache/ApiKeyTracker");return t.getCurrentApiKey()||t.initialize(e),t.hasApiKeyChanged(e)?(t.updateApiKey(e),!0):t.shouldClearCache()}catch(t){return console.warn("[ValidationCache] Failed to check API key alignment:",t),!1}}static set(e,t){try{const r=this.getCacheKey(e);localStorage.setItem(r,JSON.stringify(t));try{const{apiKeyTracker:e}=require("../cache/ApiKeyTracker");e.markCacheAligned()}catch(n){console.warn("[ValidationCache] Failed to mark cache as aligned:",n)}}catch{}}static remove(e){try{const t=this.getCacheKey(e);localStorage.removeItem(t)}catch{}}static clear(){try{Object.keys(localStorage).forEach(e=>{e.startsWith(tae)&&localStorage.removeItem(e)});try{const{apiKeyTracker:e}=require("../cache/ApiKeyTracker");e.markCacheAligned()}catch(e){console.warn("[ValidationCache] Failed to reset cache alignment:",e)}}catch{}}static getStats(){try{const e=Object.keys(localStorage).filter(e=>e.startsWith(tae));let t=0,n=0;const r=Date.now();return e.forEach(e=>{try{const i=localStorage.getItem(e);if(i){const e=JSON.parse(i);r>e.expiresAt?n++:t++}}catch{}}),{totalCached:e.length,validCached:t,expiredCached:n}}catch{return{totalCached:0,validCached:0,expiredCached:0}}}}class dae{static recordCacheHit(){this.metrics.cacheHits++,this.metrics.totalRequests++}static recordCacheMiss(){this.metrics.cacheMisses++}static recordValidationSuccess(e){this.metrics.validationSuccesses++,this.metrics.totalRequests++,this.updateAverageResponseTime(e),this.metrics.lastRequestTime=Date.now()}static recordValidationFailure(e){this.metrics.validationFailures++,this.metrics.totalRequests++,this.updateAverageResponseTime(e),this.metrics.lastRequestTime=Date.now()}static recordNetworkError(){this.metrics.networkErrors++,this.metrics.totalRequests++,this.metrics.lastRequestTime=Date.now()}static updateAverageResponseTime(e){const t=this.metrics.validationSuccesses+this.metrics.validationFailures;this.metrics.averageResponseTime=1===t?e:(this.metrics.averageResponseTime*(t-1)+e)/t}static getMetrics(){return{...this.metrics}}static getCacheHitRate(){const e=this.metrics.cacheHits+this.metrics.cacheMisses;return e>0?this.metrics.cacheHits/e:0}static getSuccessRate(){const e=this.metrics.validationSuccesses+this.metrics.validationFailures;return e>0?this.metrics.validationSuccesses/e:0}static reset(){this.metrics={totalRequests:0,cacheHits:0,cacheMisses:0,validationSuccesses:0,validationFailures:0,networkErrors:0,averageResponseTime:0,lastRequestTime:0}}}Se(dae,"metrics",{totalRequests:0,cacheHits:0,cacheMisses:0,validationSuccesses:0,validationFailures:0,networkErrors:0,averageResponseTime:0,lastRequestTime:0});class hae{static async makeTenantAuthRequest(e,t,n,r=0){var i,a,o,s,A,l;const c=Date.now();try{const r=await Vi.post(Zie,{email:t,tenant_id:n},{timeout:aae,headers:{"Content-Type":"application/json",api_key:e,request_origin:"tenant"},transformRequest:[e=>JSON.stringify(e)],transformResponse:[e=>"string"==typeof e?JSON.parse(e):e]}),i=Date.now()-c;return dae.recordValidationSuccess(i),r.data}catch(u){const d=Date.now()-c;if(401===(null==(i=u.response)?void 0:i.status))throw dae.recordValidationFailure(d),Yie("Invalid API key or credentials",401,"INVALID_API_KEY");if(403===(null==(a=u.response)?void 0:a.status))throw dae.recordValidationFailure(d),Yie("Access forbidden. Invalid tenant or email.",403,"FORBIDDEN");if(429===(null==(o=u.response)?void 0:o.status))throw dae.recordValidationFailure(d),Yie("Rate limit exceeded",429,"RATE_LIMIT_EXCEEDED");if(r<rae&&(!u.response||u.response.status>=500))return await new Promise(e=>setTimeout(e,iae*Math.pow(2,r))),this.makeTenantAuthRequest(e,t,n,r+1);throw dae.recordNetworkError(),Yie((null==(A=null==(s=u.response)?void 0:s.data)?void 0:A.detail)||"Network error occurred",(null==(l=u.response)?void 0:l.status)||0,"NETWORK_ERROR")}}static async makeValidationRequest(e,t,n=0){var r,i,a,o,s;const A=Date.now();try{const n=await Vi.post(Jie,{api_key:e,tenant_id:t},{timeout:aae,headers:{"Content-Type":"application/json",api_key:e,request_origin:"tenant"}}),r=Date.now()-A;return dae.recordValidationSuccess(r),n.data}catch(l){const c=Date.now()-A;if(401===(null==(r=l.response)?void 0:r.status))throw dae.recordValidationFailure(c),Yie("Invalid API key",401,"INVALID_API_KEY");if(429===(null==(i=l.response)?void 0:i.status))throw dae.recordValidationFailure(c),Yie("Rate limit exceeded",429,"RATE_LIMIT_EXCEEDED");if(n<rae&&(!l.response||l.response.status>=500))return await new Promise(e=>setTimeout(e,iae*Math.pow(2,n))),this.makeValidationRequest(e,t,n+1);throw dae.recordNetworkError(),Yie((null==(o=null==(a=l.response)?void 0:a.data)?void 0:o.detail)||"Network error occurred",(null==(s=l.response)?void 0:s.status)||0,"NETWORK_ERROR")}}static saveBearerToken(e){try{localStorage.setItem(nae,e)}catch{}}static getBearerToken(){try{return localStorage.getItem(nae)}catch{return null}}static clearBearerToken(){try{localStorage.removeItem(nae)}catch{}}static saveAuthEmail(e){try{localStorage.setItem("pangents_auth_email",e)}catch{}}static getAuthEmail(){try{return localStorage.getItem("pangents_auth_email")}catch{return null}}static clearAuthEmail(){try{localStorage.removeItem("pangents_auth_email")}catch{}}static hasValidSession(){const e=this.getBearerToken(),t=this.getAuthEmail();return!(!e||!t)}static getExistingSession(){const e=this.getBearerToken(),t=this.getAuthEmail();return e&&t?{bearerToken:e,email:t}:null}static clearAllAuthData(){this.clearBearerToken(),this.clearAuthEmail(),this.clearCache()}static async validateWithTenantAuth(e,t,n){var r;const i=this.getExistingSession();if(i)return console.log("[ApiKeyValidation] Found existing session, using cached auth"),{isValid:!0,bearerToken:i.bearerToken,email:i.email,fromCache:!0};try{if(cae.isRateLimited()){const e=cae.getResetTime();return{isValid:!1,error:`Rate limit exceeded. Please try again in ${Math.ceil((e-Date.now())/1e3)} seconds.`}}cae.recordRequest();const i=await this.makeTenantAuthRequest(e,t,n);return console.log("[ApiKeyValidation] Auth response:",i),i.status&&(null==(r=i.data)?void 0:r.bearer)?(this.saveBearerToken(i.data.bearer),t&&this.saveAuthEmail(t),{isValid:!0,bearerToken:i.data.bearer,email:t,fromCache:!1}):{isValid:!1,error:"Authentication failed. No bearer token received."}}catch(a){const e=(null==a?void 0:a.message)||"Authentication request failed";return this.clearBearerToken(),{isValid:!1,error:e}}}static async validateApiKey(e,t){try{const n=lae.sanitizeApiKey(e),r=lae.isValidApiKey(n);if(!r.isValid)return{isValid:!1,error:r.error};if(cae.isRateLimited()){const e=cae.getResetTime();return{isValid:!1,error:`Rate limit exceeded. Please try again in ${Math.ceil((e-Date.now())/1e3)} seconds.`}}const i=uae.get(n);if(console.log("cached",i),i)return dae.recordCacheHit(),{isValid:i.isValid,response:i.response,error:i.error,fromCache:!0};dae.recordCacheMiss(),cae.recordRequest();const a=await this.makeValidationRequest(n,t),o=a.success&&a.data.valid,s=Date.now(),A={isValid:o,response:a.data,cachedAt:s,expiresAt:s+eae};return uae.set(n,A),{isValid:o,response:a.data,fromCache:!1}}catch(n){const t=(null==n?void 0:n.message)||"Validation request failed";console.log("Text Error",t);const r=Date.now(),i={isValid:!1,error:t,cachedAt:r,expiresAt:r+eae/3};try{const t=lae.sanitizeApiKey(e);uae.set(t,i)}catch{}return{isValid:!1,error:t}}}static clearCache(){uae.clear()}static getCacheStats(){return uae.getStats()}static getMetrics(){return{...dae.getMetrics(),cacheHitRate:dae.getCacheHitRate(),successRate:dae.getSuccessRate(),rateLimitInfo:{remainingRequests:cae.getRemainingRequests(),resetTime:cae.getResetTime(),isLimited:cae.isRateLimited()}}}static resetMetrics(){dae.reset()}static async prevalidateApiKey(e){try{await this.validateApiKey(e)}catch{}}static async validateMultipleApiKeys(e){return(await Promise.allSettled(e.map(async e=>({apiKey:e,...await this.validateApiKey(e)})))).map((t,n)=>"fulfilled"===t.status?t.value:{apiKey:e[n],isValid:!1,error:"Validation failed"})}}const pae="pangents_current_api_key",fae="pangents_cache_api_key_alignment",mae=class e{constructor(){Se(this,"currentApiKey",null),Se(this,"listeners",new Set),Se(this,"initialized",!1)}static getInstance(){return e.instance||(e.instance=new e),e.instance}initialize(e){if(this.initialized)return;const t=this.getStoredApiKey(),n=t!==e;this.currentApiKey=e,this.storeApiKey(e);let r="initial_load";n&&null!==t?r="key_change":n||null===t||(r="page_reload"),(n||"initial_load"===r)&&this.notifyListeners({previousKey:t,currentKey:e,timestamp:Date.now(),reason:r}),this.initialized=!0}updateApiKey(e){const t=this.currentApiKey,n=t!==e;return n&&(this.currentApiKey=e,this.storeApiKey(e),this.notifyListeners({previousKey:t,currentKey:e,timestamp:Date.now(),reason:"key_change"})),n}getCurrentApiKey(){return this.currentApiKey}hasApiKeyChanged(e){return this.currentApiKey!==e}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}getCacheAlignment(){const e=this.getCacheAlignmentInfo(),t=e.apiKey===this.currentApiKey;return{currentApiKey:this.currentApiKey,cacheApiKey:e.apiKey,isAligned:t,lastUpdate:e.timestamp}}markCacheAligned(){this.setCacheAlignmentInfo({apiKey:this.currentApiKey,timestamp:Date.now()})}shouldClearCache(){const e=this.getCacheAlignment();return!e.isAligned&&null!==e.cacheApiKey}reset(){this.currentApiKey=null,this.initialized=!1,this.listeners.clear(),this.clearStoredData()}getStoredApiKey(){try{return localStorage.getItem(pae)}catch(e){return console.warn("[ApiKeyTracker] Failed to get stored API key:",e),null}}storeApiKey(e){try{e?localStorage.setItem(pae,e):localStorage.removeItem(pae)}catch(t){console.warn("[ApiKeyTracker] Failed to store API key:",t)}}getCacheAlignmentInfo(){try{const e=localStorage.getItem(fae);if(e)return JSON.parse(e)}catch(e){console.warn("[ApiKeyTracker] Failed to get cache alignment info:",e)}return{apiKey:null,timestamp:0}}setCacheAlignmentInfo(e){try{localStorage.setItem(fae,JSON.stringify(e))}catch(t){console.warn("[ApiKeyTracker] Failed to set cache alignment info:",t)}}notifyListeners(e){this.listeners.forEach(t=>{try{t(e)}catch(n){console.error("[ApiKeyTracker] Error in listener:",n)}})}clearStoredData(){try{localStorage.removeItem(pae),localStorage.removeItem(fae)}catch(e){console.warn("[ApiKeyTracker] Failed to clear stored data:",e)}}};Se(mae,"instance",null);const gae=mae.getInstance();function yae(){const{closeWidget:e,theme:t,isAuthenticated:n,user:r,logout:i,environment:a}=ea(),[o,s]=Te.useState(!1),[A,l]=Te.useState(!1);return Te.useEffect(()=>{const e=new CustomEvent("widget:aspect_ratio_lock",{detail:{locked:A}});window.dispatchEvent(e)},[A]),Ie.jsxs("div",{className:"flex items-center justify-between p-3 sm:p-4 border-b relative overflow-hidden",style:{background:`\n linear-gradient(\n to right,\n ${t.primaryColor}ff 0%,\n ${t.primaryColor}f2 40%,\n ${t.primaryColor}cc 100%\n )\n `,color:t.headerText,fontFamily:t.fontFamily},children:[Ie.jsx("div",{className:"absolute inset-0 pointer-events-none",style:{background:"\n linear-gradient(\n to right,\n transparent 0%,\n #ffffff11 20%,\n #ffffff44 45%,\n #ffffff66 50%,\n #ffffff44 55%,\n #ffffff11 80%,\n transparent 100%\n)\n ",backgroundSize:"300% 100%",animation:"headerShimmer 3s linear infinite",mixBlendMode:"screen"}}),Ie.jsx("div",{className:"flex items-center gap-2",children:Ie.jsx("div",{className:"flex flex-col",children:Ie.jsxs("div",{className:"flex items-center gap-2",children:[Ie.jsx("h2",{id:"search-modal-title",className:"font-semibold",children:"Ultra Agents"}),a&&"production"!==a&&Ie.jsx("span",{className:"px-2 py-1 text-xs font-medium rounded-full bg-orange-500 text-white border border-orange-500",children:"development"===a?"DEV":"STAGING"})]})})}),Ie.jsxs("div",{className:"flex items-center gap-2",children:[n&&Ie.jsx(Up,{variant:"ghost",size:"sm",onClick:i,className:"h-8 px-2 text-xs hover:bg-white/10",style:{color:t.headerText},"aria-label":"Logout",children:Ie.jsx(Gf,{className:"h-4 w-4"})}),Ie.jsx(Up,{variant:"ghost",size:"sm",onClick:()=>{s(e=>{const t=!e;return window.dispatchEvent(new CustomEvent("widget:maximize_toggle",{detail:{maximized:t}})),t})},className:"h-8 w-8 p-0 hover:bg-white/10",style:{color:t.headerText},"aria-label":o?"Exit full-screen":"Enter full-screen",children:o?Ie.jsx(Rf,{className:"h-4 w-4"}):Ie.jsx(Df,{className:"h-4 w-4"})}),Ie.jsxs(Up,{variant:"ghost",size:"sm",onClick:e,className:"h-8 w-8 p-0 hover:bg-white/10",style:{color:t.headerText},"aria-label":"Close search modal",children:[Ie.jsx(wm,{className:"h-4 w-4"}),Ie.jsx("span",{className:"sr-only",children:"Close search"})]})]})]})}function vae(){const e=Ag();return Te.useEffect(()=>{e.pathname&&(Li.saveCurrentRoute(e.pathname),console.log("[RouteTracker] Saved route:",e.pathname))},[e.pathname]),null}function wae(){const e=ug(),t=Ag(),{theme:n,user:r}=ea(),i=[{id:"Home",label:"Home",icon:jf,path:"/"},{id:"Email",label:"Email",icon:If,path:"/email-leads"},{id:"DataAgentV2",label:"Data Agent V2",icon:ef,path:"/v2-data-agent"}],a=t.pathname,o=n.primaryColor||"#1e40af";return Ie.jsxs("div",{className:"w-14 flex flex-col items-center py-4 h-full relative overflow-hidden",style:{fontFamily:n.fontFamily,background:`\n linear-gradient(\n to top,\n ${o}ff 0%,\n ${o}f2 40%,\n ${o}f2 45%,\n ${o}f2 50%,\n ${o}cc 100%\n )\n `},"aria-label":"Sidebar navigation",children:[Ie.jsx("div",{className:"absolute inset-0 pointer-events-none",style:{background:"\n linear-gradient(\n to top,\n transparent 0%,\n #ffffff11 20%,\n #ffffff44 45%,\n #ffffff66 50%,\n #ffffff44 55%,\n #ffffff11 80%,\n transparent 100%\n )\n ",backgroundSize:"100% 100%",animation:"sidebarShimmer 3s ease-in-out infinite",mixBlendMode:"screen"}}),Ie.jsx("div",{className:"flex flex-col items-center gap-3 w-full px-2 relative z-10",children:i.map(t=>{const n=a===t.path||"/"!==t.path&&a.startsWith(t.path);return Ie.jsx("button",{onClick:()=>e(t.path),title:t.label,"aria-label":t.label,className:`\n group relative flex items-center justify-center w-10 h-10 rounded-xl transition-all duration-200\n ${n?"bg-white shadow-md":"bg-white/20 hover:bg-white/40"}\n `,children:Ie.jsx(t.icon,{className:"h-5 w-5 transition-transform duration-200 "+(n?"scale-105":"group-hover:scale-105"),style:{color:n?o:"white"}})},t.id)})})]})}function xae(){const{isAuthenticated:e,setCurrentScreen:t,login:n,apiKey:r,tenantId:i}=ea(),[a,o]=Te.useState({isValid:!1,isLoading:!0});Te.useEffect(()=>{const e=r||Xie();gae.initialize(e);const t=gae.subscribe(e=>{console.log("[WidgetPopup] API key change detected:",{reason:e.reason,hasChanged:e.previousKey!==e.currentKey,timestamp:new Date(e.timestamp).toISOString()}),("key_change"===e.reason||"page_reload"===e.reason&&e.previousKey!==e.currentKey)&&(console.log("[WidgetPopup] Clearing cache due to API key change"),hae.clearCache(),Li.clearApiKey(),e.currentKey&&s(!0))}),n=()=>{console.log("[WidgetPopup] API key invalidated by server"),o({isValid:!1,isLoading:!1,error:"API key has been invalidated. Please check your credentials.",errorType:"validation"})};return window.addEventListener("api:key_invalid",n),()=>{t(),window.removeEventListener("api:key_invalid",n)}},[]);const s=async(e=!1)=>{var t,n,a,s,A;const l=r||Xie();if(l){gae.updateApiKey(l)&&!e&&(console.log("[WidgetPopup] API key changed, clearing cache"),hae.clearCache(),e=!0)}if(l)if(i)try{o(e=>({...e,isLoading:!0})),e&&(hae.clearCache(),hae.clearAllAuthData());const t=await hae.validateApiKey(l,i);t.isValid?(Li.saveApiKey(l),console.log("[WidgetPopup] API key validated successfully")):(Li.clearApiKey(),hae.clearAllAuthData()),o({isValid:t.isValid,isLoading:!1,error:t.isValid?void 0:t.error||"Invalid credentials. Access denied.",errorType:t.isValid?void 0:"validation"})}catch(c){console.error("API key validation failed:",c);let e="network",r="Connection failed. Please check your internet connection.";(null==(t=c.message)?void 0:t.includes("Rate limit"))?(e="rate_limit",r=c.message):(null==(n=c.message)?void 0:n.includes("Invalid API key"))||(null==(a=c.message)?void 0:a.includes("Invalid credentials"))?(e="validation",r="Invalid credentials. Access denied."):(null==(s=c.message)?void 0:s.includes("forbidden"))?(e="validation",r="Access forbidden. Invalid tenant or email."):(null==(A=c.response)?void 0:A.status)>=500&&(e="server",r="Server error. Please try again later."),o({isValid:!1,isLoading:!1,error:r,errorType:e})}else o({isValid:!1,isLoading:!1,error:"Tenant ID is required for authentication.",errorType:"validation"});else o({isValid:!1,isLoading:!1,error:"API key is required to access the Pangents chatbot widget.",errorType:"validation"})};Te.useRef({}),Te.useEffect(()=>{s()},[r,i]);const A=()=>{s(!0)};if(a.isLoading)return Ie.jsxs("div",{className:"flex items-center justify-center p-8 w-full h-full",children:[Ie.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"}),Ie.jsx("span",{className:"ml-3 text-sm text-gray-600",children:"Validating API key..."})]});if(!a.isValid)return Ie.jsx(qie,{error:a.error,errorType:a.errorType,onRetry:A,isRetrying:a.isLoading});const l=(e,r)=>{n(e,r),t("chat")};return e?Ie.jsx("div",{className:"flex-1 flex flex-col overflow-hidden",children:Ie.jsx("div",{className:"flex-1 overflow-hidden",children:Ie.jsx($ie,{children:Ie.jsx(Vie,{})})})}):Ie.jsx("div",{className:"flex-1 flex flex-col overflow-hidden w-full",children:Ie.jsx(Gie,{onAuthSuccess:l})})}function bae(e){const t=e.trim().split(/\s+/);switch(t.length){case 1:return{top:t[0],right:t[0],bottom:t[0],left:t[0]};case 2:return{top:t[0],right:t[1],bottom:t[0],left:t[1]};case 3:return{top:t[0],right:t[1],bottom:t[2],left:t[1]};case 4:return{top:t[0],right:t[1],bottom:t[2],left:t[3]};default:return{top:"0px",right:"0px",bottom:"0px",left:"0px"}}}function Bae(e){const{left:t,right:n}=bae(e);return`${t} + ${n}`}function Cae(e){const{top:t,bottom:n}=bae(e);return`${t} + ${n}`}function Eae({position:e="bottom-right",paddingWidgetContainer:t,zIndex:n}){const{isOpen:r,theme:i,closeWidget:a,isAuthenticated:o}=ea(),s="bottom-left"===e||"top-left"===e,A=Te.useRef(null),[l,c]=Te.useState(()=>({width:Math.min(.38*window.innerWidth,650),height:window.innerHeight})),u=Te.useMemo(()=>{if(r){const e=Li.getCurrentRoute();return console.log("[WidgetPopup] Loading initial route:",e||"/"),e||"/"}return"/"},[r]),[d,h]=Te.useState(!1),[p,f]=Te.useState(null),[m,g]=Te.useState(!1),[y,v]=Te.useState(!1),w=Te.useRef(l.width/Math.max(l.height,1));Te.useEffect(()=>{const e=e=>{const t=e.detail;t&&"boolean"==typeof t.locked&&g(t.locked)};return window.addEventListener("widget:aspect_ratio_lock",e),()=>window.removeEventListener("widget:aspect_ratio_lock",e)},[]),Te.useEffect(()=>{const e=e=>{const t=e.detail;t&&"boolean"==typeof t.maximized&&v(t.maximized)};return window.addEventListener("widget:maximize_toggle",e),()=>window.removeEventListener("widget:maximize_toggle",e)},[]),Te.useEffect(()=>{w.current=l.width/Math.max(l.height,1)},[l]);const x=Math.min(.95*window.innerWidth,950),b=window.innerHeight,B=(e,t)=>{t.preventDefault(),t.stopPropagation(),h(!0),f({x:t.clientX,y:t.clientY,width:l.width,height:l.height,edge:e})};return Te.useEffect(()=>{const e=e=>{if(!d||!p)return;let t=0,n=0;p.edge.includes("right")&&(t=e.clientX-p.x),p.edge.includes("left")&&(t=p.x-e.clientX),p.edge.includes("bottom")&&(n=e.clientY-p.y),p.edge.includes("top")&&(n=p.y-e.clientY);let r=p.width+t,i=p.height+n;const a="left"===p.edge||"right"===p.edge;if(m&&!a){const e=w.current;Math.abs(t)>Math.abs(n)?i=r/e:r=i*e}a&&(i=p.height),r=Math.max(320,Math.min(x,r)),i=Math.max(400,Math.min(b,i)),c({width:r,height:i})},t=()=>{h(!1),f(null)};return window.addEventListener("mousemove",e),window.addEventListener("mouseup",t),()=>{window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",t)}},[d,p,m]),Te.useEffect(()=>{const e=()=>{c(e=>{const t=Math.min(.95*window.innerWidth,950),n=window.innerHeight;return{width:Math.min(e.width,t),height:n}})};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),console.log("WidgetPopup: Component rendered"),console.log("WidgetPopup: isOpen state:",r),console.log("WidgetPopup: isAuthenticated:",o),console.log("WidgetPopup: theme:",i),Te.useEffect(()=>{const e=e=>{"Escape"===e.key&&r&&a()};if(r){document.addEventListener("keydown",e);const t=document.querySelector('[role="dialog"]');t&&t.focus()}return()=>{document.removeEventListener("keydown",e)}},[r,a]),Ie.jsx(hl,{children:r&&Ie.jsxs(ch.div,{className:"fixed inset-0 z-50",style:{zIndex:n??999999},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3},children:[Ie.jsx(ch.div,{className:"absolute inset-0 bg-black/10",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:a}),Ie.jsx(ch.div,{ref:A,id:"pangents-widget-container",className:"fixed top-0 "+(s?"left-0":"right-0"),style:{width:y?t?`calc(100vw - ${Bae(t)})`:`${window.innerWidth}px`:`${l.width}px`,height:y?t?`calc(100vh - ${Cae(t)})`:`${window.innerHeight}px`:`${l.height}px`,...t?{padding:t}:{}},initial:{x:s?"-100%":"100%"},animate:{x:0},exit:{x:s?"-100%":"100%"},transition:{type:"spring",stiffness:300,damping:30},role:"dialog","aria-modal":"true","aria-labelledby":"search-modal-title",tabIndex:-1,children:Ie.jsxs(Cy,{className:"h-full flex flex-col overflow-hidden shadow-2xl rounded-none",style:{fontFamily:i.fontFamily},children:[Ie.jsxs(Bg,{initialEntries:[u],initialIndex:0,children:[Ie.jsx(vae,{}),Ie.jsx(yae,{}),Ie.jsxs("div",{className:"flex flex-1 min-h-0",children:[o?Ie.jsx(wae,{}):null,Ie.jsx(xae,{})]})]},`router-${r}`),Ie.jsx("div",{id:"widget-toast-container",style:{position:"absolute",top:"60px",left:"10px",right:"10px",zIndex:999999,pointerEvents:"none"},children:Ie.jsx(By,{position:"top-center",richColors:!0,closeButton:!0,expand:!1,visibleToasts:3,containerAriaLabel:"Notifications",toastOptions:{style:{marginTop:"0px",pointerEvents:"auto"},className:"widget-toast"}})}),Ie.jsxs("div",{className:"absolute inset-0 pointer-events-none",children:[Ie.jsx("div",{className:"absolute top-0 left-0 right-0 h-3 pointer-events-auto focus:bg-blue-500/60","aria-label":"Resize top",role:"slider",onMouseDown:e=>B("top",e),style:{cursor:"ns-resize"}}),Ie.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-3 pointer-events-auto focus:bg-blue-500/60","aria-label":"Resize bottom",role:"slider",onMouseDown:e=>B("bottom",e),style:{cursor:"ns-resize"}}),Ie.jsx("div",{className:"absolute top-0 bottom-0 left-0 w-3 pointer-events-auto focus:bg-blue-500/60","aria-label":"Resize left",role:"slider",onMouseDown:e=>B("left",e),style:{cursor:"ew-resize"}}),Ie.jsx("div",{className:"absolute top-0 bottom-0 right-0 w-3 pointer-events-auto focus:bg-blue-500/60","aria-label":"Resize right",role:"slider",onMouseDown:e=>B("right",e),style:{cursor:"ew-resize"}}),Ie.jsx("div",{className:"absolute top-0 left-0 w-4 h-4 pointer-events-auto focus:bg-blue-500/60","aria-label":"Resize top-left",role:"slider",onMouseDown:e=>B("top-left",e),style:{cursor:"nwse-resize"}}),Ie.jsx("div",{className:"absolute top-0 right-0 w-4 h-4 pointer-events-auto focus:bg-blue-500/60","aria-label":"Resize top-right",role:"slider",onMouseDown:e=>B("top-right",e),style:{cursor:"nesw-resize"}}),Ie.jsx("div",{className:"absolute bottom-0 left-0 w-4 h-4 pointer-events-auto focus:bg-blue-500/60","aria-label":"Resize bottom-left",role:"slider",onMouseDown:e=>B("bottom-left",e),style:{cursor:"nesw-resize"}}),Ie.jsx("div",{className:"absolute bottom-0 right-0 w-4 h-4 pointer-events-auto focus:bg-blue-500/60","aria-label":"Resize bottom-right",role:"slider",onMouseDown:e=>B("bottom-right",e),style:{cursor:"nwse-resize"}})]})]})})]})})}function kae({theme:e,className:t,position:n,margin:r,paddingWidgetContainer:i,pangentsApiKey:a,tenantId:o,email:s,zIndex:A,environment:l}){const c=Te.useRef(null),[u,d]=Te.useState(null);return Te.useEffect(()=>{if(!c.current||u)return;const e=c.current.shadowRoot,t=e||c.current.attachShadow({mode:"open"}),n=window.__PANGENTS_WIDGET_CSS||'*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:host,.pg-widget-root{--background: 0 0% 100%;--foreground: 0 0% 3.9%;--card: 0 0% 100%;--card-foreground: 0 0% 3.9%;--popover: 0 0% 100%;--popover-foreground: 0 0% 3.9%;--primary: 0 0% 9%;--primary-foreground: 0 0% 98%;--secondary: 0 0% 96.1%;--secondary-foreground: 0 0% 9%;--muted: 0 0% 96.1%;--muted-foreground: 0 0% 45.1%;--accent: 0 0% 96.1%;--accent-foreground: 0 0% 9%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 0 0% 98%;--border: 0 0% 89.8%;--input: 0 0% 89.8%;--ring: 0 0% 3.9%;--chart-1: 12 76% 61%;--chart-2: 173 58% 39%;--chart-3: 197 37% 24%;--chart-4: 43 74% 66%;--chart-5: 27 87% 67%;--radius: .5rem}:host(.pg-dark),.pg-widget-root.pg-dark{--background: 0 0% 3.9%;--foreground: 0 0% 98%;--card: 0 0% 3.9%;--card-foreground: 0 0% 98%;--popover: 0 0% 3.9%;--popover-foreground: 0 0% 98%;--primary: 0 0% 98%;--primary-foreground: 0 0% 9%;--secondary: 0 0% 14.9%;--secondary-foreground: 0 0% 98%;--muted: 0 0% 14.9%;--muted-foreground: 0 0% 63.9%;--accent: 0 0% 14.9%;--accent-foreground: 0 0% 98%;--destructive: 0 62.8% 30.6%;--destructive-foreground: 0 0% 98%;--border: 0 0% 14.9%;--input: 0 0% 14.9%;--ring: 0 0% 83.1%;--chart-1: 220 70% 50%;--chart-2: 160 60% 45%;--chart-3: 30 80% 55%;--chart-4: 280 65% 60%;--chart-5: 340 75% 55%}*{border-color:hsl(var(--border))}.pg-widget-root{background-color:hsl(var(--background));color:hsl(var(--foreground))}.\\!container{width:100%!important;margin-right:auto!important;margin-left:auto!important}.container{width:100%;margin-right:auto;margin-left:auto}@media(min-width:640px){.\\!container{max-width:640px!important}.container{max-width:640px}}@media(min-width:768px){.\\!container{max-width:768px!important}.container{max-width:768px}}@media(min-width:1024px){.\\!container{max-width:1024px!important}.container{max-width:1024px}}@media(min-width:1280px){.\\!container{max-width:1280px!important}.container{max-width:1280px}}@media(min-width:1536px){.\\!container{max-width:1536px!important}.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-\\[-4px\\]{top:-4px;right:-4px;bottom:-4px;left:-4px}.-right-1{right:-.25rem}.-top-1{top:-.25rem}.bottom-0{bottom:0}.bottom-6{bottom:1.5rem}.left-0{left:0}.left-2\\.5{left:.625rem}.left-3{left:.75rem}.left-6{left:1.5rem}.right-0{right:0}.right-2{right:.5rem}.right-3{right:.75rem}.right-6{right:1.5rem}.top-0{top:0}.top-1\\/2{top:50%}.top-6{top:1.5rem}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-50{z-index:50}.col-span-2{grid-column:span 2 / span 2}.col-span-full{grid-column:1 / -1}.mx-0\\.5{margin-left:.125rem;margin-right:.125rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-3{margin-top:.75rem;margin-bottom:.75rem}.my-4{margin-top:1rem;margin-bottom:1rem}.-ml-1{margin-left:-.25rem}.-mt-0\\.5{margin-top:-.125rem}.mb-0\\.5{margin-bottom:.125rem}.mb-1{margin-bottom:.25rem}.mb-1\\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-0\\.5{margin-left:.125rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mt-0\\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-2\\.5{margin-top:.625rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-auto{margin-top:auto}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-0\\.5{height:.125rem}.h-1{height:.25rem}.h-1\\.5{height:.375rem}.h-10{height:2.5rem}.h-12{height:3rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\\.5{height:.625rem}.h-20{height:5rem}.h-24{height:6rem}.h-3{height:.75rem}.h-3\\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\\[18px\\]{height:18px}.h-\\[1px\\]{height:1px}.h-\\[2px\\]{height:2px}.h-\\[3px\\]{height:3px}.h-auto{height:auto}.h-full{height:100%}.max-h-40{max-height:10rem}.max-h-48{max-height:12rem}.max-h-60{max-height:15rem}.max-h-64{max-height:16rem}.max-h-80{max-height:20rem}.max-h-96{max-height:24rem}.max-h-\\[120px\\]{max-height:120px}.min-h-0{min-height:0px}.min-h-\\[110px\\]{min-height:110px}.min-h-\\[120px\\]{min-height:120px}.min-h-\\[130px\\]{min-height:130px}.min-h-\\[140px\\]{min-height:140px}.min-h-\\[36px\\]{min-height:36px}.min-h-full{min-height:100%}.min-h-screen{min-height:100vh}.w-1\\.5{width:.375rem}.w-10{width:2.5rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\\.5{width:.625rem}.w-20{width:5rem}.w-28{width:7rem}.w-3{width:.75rem}.w-3\\.5{width:.875rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-80{width:20rem}.w-9{width:2.25rem}.w-\\[18px\\]{width:18px}.w-\\[3px\\]{width:3px}.w-full{width:100%}.w-px{width:1px}.min-w-0{min-width:0px}.min-w-\\[20px\\]{min-width:20px}.min-w-full{min-width:100%}.max-w-2xl{max-width:42rem}.max-w-4xl{max-width:56rem}.max-w-6xl{max-width:72rem}.max-w-\\[220px\\]{max-width:220px}.max-w-\\[80\\%\\]{max-width:80%}.max-w-\\[85\\%\\]{max-width:85%}.max-w-full{max-width:100%}.max-w-md{max-width:28rem}.max-w-none{max-width:none}.max-w-sm{max-width:24rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.-translate-y-1\\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-105{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.resize{resize:both}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-\\[2px\\]{gap:2px}.gap-y-2{row-gap:.5rem}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-0\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-none{border-radius:0}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:.75rem}.rounded-tl-md{border-top-left-radius:calc(var(--radius) - 2px)}.rounded-tr-md{border-top-right-radius:calc(var(--radius) - 2px)}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l-4{border-left-width:4px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-none{border-style:none}.border-amber-200{--tw-border-opacity: 1;border-color:rgb(253 230 138 / var(--tw-border-opacity, 1))}.border-blue-200{--tw-border-opacity: 1;border-color:rgb(191 219 254 / var(--tw-border-opacity, 1))}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.border-blue-600{--tw-border-opacity: 1;border-color:rgb(37 99 235 / var(--tw-border-opacity, 1))}.border-gray-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity, 1))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.border-green-200{--tw-border-opacity: 1;border-color:rgb(187 247 208 / var(--tw-border-opacity, 1))}.border-input{border-color:hsl(var(--input))}.border-orange-200{--tw-border-opacity: 1;border-color:rgb(254 215 170 / var(--tw-border-opacity, 1))}.border-orange-500{--tw-border-opacity: 1;border-color:rgb(249 115 22 / var(--tw-border-opacity, 1))}.border-primary{border-color:hsl(var(--primary))}.border-red-200{--tw-border-opacity: 1;border-color:rgb(254 202 202 / var(--tw-border-opacity, 1))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.border-transparent{border-color:transparent}.border-white{--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity, 1))}.border-yellow-200{--tw-border-opacity: 1;border-color:rgb(254 240 138 / var(--tw-border-opacity, 1))}.border-t-blue-500{--tw-border-opacity: 1;border-top-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.bg-amber-100{--tw-bg-opacity: 1;background-color:rgb(254 243 199 / var(--tw-bg-opacity, 1))}.bg-amber-50{--tw-bg-opacity: 1;background-color:rgb(255 251 235 / var(--tw-bg-opacity, 1))}.bg-amber-500{--tw-bg-opacity: 1;background-color:rgb(245 158 11 / var(--tw-bg-opacity, 1))}.bg-background{background-color:hsl(var(--background))}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.bg-black\\/10{background-color:#0000001a}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.bg-card{background-color:hsl(var(--card))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity, 1))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.bg-gray-50\\/50{background-color:#f9fafb80}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.bg-green-50{--tw-bg-opacity: 1;background-color:rgb(240 253 244 / var(--tw-bg-opacity, 1))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-indigo-50{--tw-bg-opacity: 1;background-color:rgb(238 242 255 / var(--tw-bg-opacity, 1))}.bg-muted{background-color:hsl(var(--muted))}.bg-orange-100{--tw-bg-opacity: 1;background-color:rgb(255 237 213 / var(--tw-bg-opacity, 1))}.bg-orange-50{--tw-bg-opacity: 1;background-color:rgb(255 247 237 / var(--tw-bg-opacity, 1))}.bg-orange-500{--tw-bg-opacity: 1;background-color:rgb(249 115 22 / var(--tw-bg-opacity, 1))}.bg-purple-100{--tw-bg-opacity: 1;background-color:rgb(243 232 255 / var(--tw-bg-opacity, 1))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity, 1))}.bg-secondary{background-color:hsl(var(--secondary))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-white\\/20{background-color:#fff3}.bg-white\\/30{background-color:#ffffff4d}.bg-white\\/80{background-color:#fffc}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity, 1))}.bg-yellow-200{--tw-bg-opacity: 1;background-color:rgb(254 240 138 / var(--tw-bg-opacity, 1))}.bg-yellow-50{--tw-bg-opacity: 1;background-color:rgb(254 252 232 / var(--tw-bg-opacity, 1))}.bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity, 1))}.bg-yellow-600{--tw-bg-opacity: 1;background-color:rgb(202 138 4 / var(--tw-bg-opacity, 1))}.bg-opacity-50{--tw-bg-opacity: .5}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-t{background-image:linear-gradient(to top,var(--tw-gradient-stops))}.from-gray-100{--tw-gradient-from: #f3f4f6 var(--tw-gradient-from-position);--tw-gradient-to: rgb(243 244 246 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-gray-50{--tw-gradient-from: #f9fafb var(--tw-gradient-from-position);--tw-gradient-to: rgb(249 250 251 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-gray-200{--tw-gradient-to: #e5e7eb var(--tw-gradient-to-position)}.to-white{--tw-gradient-to: #fff var(--tw-gradient-to-position)}.fill-current{fill:currentColor}.fill-yellow-400{fill:#facc15}.object-contain{-o-object-fit:contain;object-fit:contain}.p-0{padding:0}.p-0\\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\\.5{padding:.375rem}.p-2{padding:.5rem}.p-2\\.5{padding:.625rem}.p-3{padding:.75rem}.p-3\\.5{padding:.875rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-1{padding-bottom:.25rem}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pb-6{padding-bottom:1.5rem}.pb-8{padding-bottom:2rem}.pl-10{padding-left:2.5rem}.pl-8{padding-left:2rem}.pl-9{padding-left:2.25rem}.pr-10{padding-right:2.5rem}.pr-3{padding-right:.75rem}.pr-4{padding-right:1rem}.pt-0{padding-top:0}.pt-0\\.5{padding-top:.125rem}.pt-2{padding-top:.5rem}.pt-2\\.5{padding-top:.625rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.pt-5{padding-top:1.25rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[13px\\]{font-size:13px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-6{line-height:1.5rem}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.text-amber-500{--tw-text-opacity: 1;color:rgb(245 158 11 / var(--tw-text-opacity, 1))}.text-amber-600{--tw-text-opacity: 1;color:rgb(217 119 6 / var(--tw-text-opacity, 1))}.text-amber-700{--tw-text-opacity: 1;color:rgb(180 83 9 / var(--tw-text-opacity, 1))}.text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-blue-800{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity, 1))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.text-green-800{--tw-text-opacity: 1;color:rgb(22 101 52 / var(--tw-text-opacity, 1))}.text-indigo-600{--tw-text-opacity: 1;color:rgb(79 70 229 / var(--tw-text-opacity, 1))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-orange-600{--tw-text-opacity: 1;color:rgb(234 88 12 / var(--tw-text-opacity, 1))}.text-orange-700{--tw-text-opacity: 1;color:rgb(194 65 12 / var(--tw-text-opacity, 1))}.text-primary{color:hsl(var(--primary))}.text-purple-800{--tw-text-opacity: 1;color:rgb(107 33 168 / var(--tw-text-opacity, 1))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity, 1))}.text-red-800{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity, 1))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity, 1))}.text-yellow-600{--tw-text-opacity: 1;color:rgb(202 138 4 / var(--tw-text-opacity, 1))}.text-yellow-800{--tw-text-opacity: 1;color:rgb(133 77 14 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.placeholder-gray-400::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}.placeholder-gray-400::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}.opacity-25{opacity:.25}.opacity-50{opacity:.5}.opacity-75{opacity:.75}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-blue-50{--tw-shadow-color: #eff6ff;--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-inset{--tw-ring-inset: inset}.ring-gray-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity, 1))}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-lg{--tw-drop-shadow: drop-shadow(0 10px 8px rgb(0 0 0 / .04)) drop-shadow(0 4px 3px rgb(0 0 0 / .1));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-shadow{transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.duration-150{animation-duration:.15s}.duration-200{animation-duration:.2s}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.running{animation-play-state:running}:root{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";line-height:1.5;font-weight:400;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.widget-bubble-button svg{width:2rem!important;height:2rem!important}.widget-bubble-button img{width:2rem!important;height:2rem!important;max-width:2rem!important}.widget-toast{position:relative!important;max-width:calc(100% - 20px)!important;margin:0 auto!important}[data-sonner-toaster]{position:absolute!important;width:100%!important;max-width:100%!important}[data-sonner-toaster] [data-sonner-toast]{max-width:calc(100% - 20px)!important;margin:0 auto!important}@media screen and (-webkit-min-device-pixel-ratio:2){.widget-container{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}*{text-rendering:optimizeLegibility}.mac-optimized-padding{padding:.75rem!important}button{letter-spacing:.025em}}@supports (-webkit-appearance: none){input[type=text],input[type=email],input[type=password],input[type=date],input[type=time],select{-webkit-appearance:none;border-radius:.375rem}.flex{display:flex}}@media(max-width:450px){html{font-size:14px}.text-xs{font-size:.7rem!important}.text-sm{font-size:.8rem!important}}@media(max-width:380px){html{font-size:13px}.text-xs{font-size:.65rem!important}.text-sm{font-size:.75rem!important}}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:#0000001a;border-radius:10px}::-webkit-scrollbar-thumb:hover{background:#0003}.dark ::-webkit-scrollbar-thumb{background:#ffffff1a}.dark ::-webkit-scrollbar-thumb:hover{background:#fff3}@keyframes shimmer{0%{transform:translate(-100%)}to{transform:translate(100%)}}@keyframes shimmerVertical{0%{transform:translateY(100%)}to{transform:translateY(-100%)}}@keyframes sidebarShimmer{0%{transform:translateY(100%)}to{transform:translateY(-100%)}}@keyframes headerShimmer{0%{background-position:0% 0%}to{background-position:100% 0%}}.ai-answer-container{line-height:1.6}.table-scroll{width:100%;max-width:100%;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}.ai-table{width:-moz-max-content;width:max-content;min-width:100%;border-collapse:collapse}.shaky-gradient{filter:blur(24px);transform-origin:center;background-size:200% 200%;animation:shakyMotion 2s steps(1) infinite}@keyframes shakyMotion{0%{background-position:40% 60%;transform:scale(1.1) translate(0) rotate(0)}10%{background-position:45% 55%;transform:scale(1.12) translate(-6px,4px) rotate(.3deg)}20%{background-position:50% 65%;transform:scale(1.15) translate(8px,-6px) rotate(-.4deg)}30%{background-position:55% 50%;transform:scale(1.13) translate(-10px,8px) rotate(.6deg)}40%{background-position:48% 58%;transform:scale(1.14) translate(6px,-4px) rotate(-.5deg)}50%{background-position:60% 45%;transform:scale(1.16) translate(-8px,6px) rotate(.4deg)}70%{background-position:52% 62%;transform:scale(1.13) translate(10px,-6px) rotate(-.3deg)}to{background-position:40% 60%;transform:scale(1.1) translate(0) rotate(0)}}.file\\:border-0::file-selector-button{border-width:0px}.file\\:bg-transparent::file-selector-button{background-color:transparent}.file\\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:font-medium::file-selector-button{font-weight:500}.file\\:text-foreground::file-selector-button{color:hsl(var(--foreground))}.placeholder\\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.focus-within\\:border-gray-300:focus-within{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.focus-within\\:shadow-md:focus-within{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\\:border-blue-300:hover{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity, 1))}.hover\\:border-gray-300:hover{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.hover\\:border-transparent:hover{border-color:transparent}.hover\\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\\:bg-amber-600:hover{--tw-bg-opacity: 1;background-color:rgb(217 119 6 / var(--tw-bg-opacity, 1))}.hover\\:bg-blue-50:hover{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.hover\\:bg-blue-600:hover{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.hover\\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity, 1))}.hover\\:bg-destructive\\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.hover\\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.hover\\:bg-gray-200\\/60:hover{background-color:#e5e7eb99}.hover\\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.hover\\:bg-green-50:hover{--tw-bg-opacity: 1;background-color:rgb(240 253 244 / var(--tw-bg-opacity, 1))}.hover\\:bg-red-50:hover{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.hover\\:bg-red-700:hover{--tw-bg-opacity: 1;background-color:rgb(185 28 28 / var(--tw-bg-opacity, 1))}.hover\\:bg-secondary\\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\\:bg-white\\/10:hover{background-color:#ffffff1a}.hover\\:bg-white\\/40:hover{background-color:#fff6}.hover\\:bg-white\\/60:hover{background-color:#fff9}.hover\\:bg-yellow-700:hover{--tw-bg-opacity: 1;background-color:rgb(161 98 7 / var(--tw-bg-opacity, 1))}.hover\\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\\:text-blue-800:hover{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.hover\\:text-gray-600:hover{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.hover\\:text-gray-700:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.hover\\:text-gray-800:hover{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.hover\\:text-gray-900:hover{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.hover\\:text-green-600:hover{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.hover\\:text-red-500:hover{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.hover\\:text-red-600:hover{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.hover\\:text-red-800:hover{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity, 1))}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:opacity-90:hover{opacity:.9}.hover\\:shadow-lg:hover{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\\:shadow-md:hover{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\\:shadow-xl:hover{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\\:\\[background-color\\:var\\(--hover-bg\\)\\]:hover{background-color:var(--hover-bg)}.focus\\:border-transparent:focus{border-color:transparent}.focus\\:bg-blue-500\\/60:focus{background-color:#3b82f699}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity, 1))}.focus\\:ring-indigo-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity, 1))}.focus\\:ring-red-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity, 1))}.focus\\:ring-yellow-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(234 179 8 / var(--tw-ring-opacity, 1))}.focus\\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:ring-1:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.active\\:scale-95:active{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\\:bg-accent\\/80:active{background-color:hsl(var(--accent) / .8)}.active\\:bg-destructive\\/95:active{background-color:hsl(var(--destructive) / .95)}.active\\:bg-secondary\\/90:active{background-color:hsl(var(--secondary) / .9)}.active\\:underline:active{text-decoration-line:underline}.active\\:\\[background-color\\:var\\(--active-bg\\)\\]:active{background-color:var(--active-bg)}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-40:disabled{opacity:.4}.disabled\\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\\:scale-105{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\\:text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.data-\\[state\\=active\\]\\:bg-background[data-state=active]{background-color:hsl(var(--background))}.data-\\[state\\=active\\]\\:text-foreground[data-state=active]{color:hsl(var(--foreground))}.data-\\[state\\=active\\]\\:shadow[data-state=active]{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}@media(min-width:640px){.sm\\:mx-0{margin-left:0;margin-right:0}.sm\\:my-8{margin-top:2rem;margin-bottom:2rem}.sm\\:ml-3{margin-left:.75rem}.sm\\:ml-4{margin-left:1rem}.sm\\:mt-0{margin-top:0}.sm\\:inline{display:inline}.sm\\:flex{display:flex}.sm\\:hidden{display:none}.sm\\:h-10{height:2.5rem}.sm\\:w-10{width:2.5rem}.sm\\:w-auto{width:auto}.sm\\:w-full{width:100%}.sm\\:max-w-lg{max-width:32rem}.sm\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\\:flex-row-reverse{flex-direction:row-reverse}.sm\\:items-start{align-items:flex-start}.sm\\:items-center{align-items:center}.sm\\:p-0{padding:0}.sm\\:p-4{padding:1rem}.sm\\:p-6{padding:1.5rem}.sm\\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\\:pb-4{padding-bottom:1rem}.sm\\:text-left{text-align:left}}@media(min-width:768px){.md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.md\\:text-sm{font-size:.875rem;line-height:1.25rem}}@media(min-width:1024px){.lg\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}.\\[\\&_svg\\]\\:pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:size-4 svg{width:1rem;height:1rem}.\\[\\&_svg\\]\\:shrink-0 svg{flex-shrink:0}';if(e){const t=e.getElementById("pg-widget-shadow-mount"),r=e.getElementById("pangents-widget-styles");if(r&&n&&r.textContent!==n&&(r.textContent=n),t)return void d(t)}const r=document.createElement("style");r.id="pangents-widget-styles",r.textContent=n,t.appendChild(r);const i=document.createElement("div");i.id="pg-widget-shadow-mount",t.appendChild(i),d(i)},[u]),Ie.jsx("div",{ref:c,className:t?`pg-widget-root ${t}`:"pg-widget-root",style:{zIndex:A??9999},children:u&&Pe.createPortal(Ie.jsx(Ht,{client:Uy,children:Ie.jsxs(Zi,{initialTheme:e,apiKey:a,tenantId:o,email:s,themeTarget:u,environment:l,children:[Ie.jsx(Kp,{position:n,margin:r,zIndex:A}),Ie.jsx(Eae,{position:n,paddingWidgetContainer:i,zIndex:A})]})}),u)})}var Sae,Fae={};var Qae=function(){if(Sae)return Fae;Sae=1;var e=Pe;if("production"===process.env.NODE_ENV)Fae.createRoot=e.createRoot,Fae.hydrateRoot=e.hydrateRoot;else{var t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;Fae.createRoot=function(n,r){t.usingClientEntryPoint=!0;try{return e.createRoot(n,r)}finally{t.usingClientEntryPoint=!1}},Fae.hydrateRoot=function(n,r,i){t.usingClientEntryPoint=!0;try{return e.hydrateRoot(n,r,i)}finally{t.usingClientEntryPoint=!1}}}return Fae}();const jae=new class{constructor(){Se(this,"container",null),Se(this,"shadow",null),Se(this,"mountEl",null),Se(this,"root",null),Se(this,"config",{})}init(e){const t={...e};if(this.container&&this.root){const e=JSON.stringify(this.config.theme)!==JSON.stringify(t.theme),n=this.config.position!==t.position,r=this.config.margin!==t.margin,i=this.config.paddingWidgetContainer!==t.paddingWidgetContainer,a=this.config.zIndex!==t.zIndex;if(!(!e||n||r||i||a))return this.config=t,void this.render();if(n||r||i||a)return this.config=t,this.createContainer(),void this.render()}this.config=t,this.createContainer(),this.render()}createContainer(){this.container&&this.destroy(),this.container=document.createElement("div"),this.container.id="pangents-chatbot-widget",this.container.style.zIndex=String(this.config.zIndex||9999),this.shadow=this.container.attachShadow({mode:"open"}),this.mountEl=document.createElement("div"),this.mountEl.id="pg-widget-mount";const e=window.__PANGENTS_WIDGET_CSS||"";if(e){const t=document.createElement("style");t.id="pangents-widget-styles",t.textContent=e,this.shadow.appendChild(t)}this.shadow.appendChild(this.mountEl),document.body.appendChild(this.container)}render(){this.mountEl&&(this.root||(this.root=Qae.createRoot(this.mountEl)),this.root.render(Ie.jsx(Te.StrictMode,{children:Ie.jsx(kae,{theme:this.config.theme,position:this.config.position,margin:this.config.margin,paddingWidgetContainer:this.config.paddingWidgetContainer,pangentsApiKey:this.config.pangentsApiKey,tenantId:this.config.tenantId,email:this.config.email,environment:this.config.environment},JSON.stringify(this.config.theme))})))}destroy(){this.root&&(this.root.unmount(),this.root=null),this.shadow=null,this.mountEl=null,this.container&&this.container.parentNode&&(this.container.parentNode.removeChild(this.container),this.container=null)}updateConfig(e){const t={...this.config,...e};JSON.stringify(this.config.theme),JSON.stringify(t.theme);const n=this.config.position!==t.position,r=this.config.margin!==t.margin,i=this.config.paddingWidgetContainer!==t.paddingWidgetContainer,a=this.config.zIndex!==t.zIndex;this.config=t,n||r||i||a?(this.createContainer(),this.render()):this.render()}updateTheme(e){e&&(this.config={...this.config,theme:e},this.render())}};"undefined"!=typeof window&&(window.Chatbot=jae),exports.Chatbot=jae,exports.Widget=kae;
|
|
90
|
+
//# sourceMappingURL=widget-embed-CmAr6iD-.cjs.js.map
|